/* ================================
   PaisleyBio Website Styles
   Refined scientific instrument dark theme
   ================================ */

/* CSS Variables */
:root {
    /* Cool ink background scale */
    --bg-white: #090b10;          /* base, deepest */
    --bg-light: #0e1118;          /* elevated, alternating sections */
    --surface: #13171f;           /* cards */
    --surface-2: #181d27;         /* card hover */

    /* Brand */
    --primary-color: #3b8cff;     /* action blue */
    --primary-dark: #2566d8;
    --secondary-color: #56c2ff;   /* luminous cyan, distinct from primary */
    --accent-color: #56c2ff;

    /* Text (contrast bumped for AA on near black) */
    --text-dark: #eef2f8;         /* primary text (legacy name) */
    --text-light: #b3bccb;        /* dimmed body text */
    --text-faint: #7e8a9c;        /* captions */
    --eyebrow-color: #7fccff;     /* mono label, high contrast cyan */

    /* Lines */
    --border-color: rgba(255, 255, 255, 0.09);
    --border-strong: rgba(255, 255, 255, 0.18);

    /* Glow */
    --glow: rgba(86, 194, 255, 0.18);
    --glow-soft: rgba(59, 140, 255, 0.10);

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.55);

    /* Type */
    --font-sans: 'Hanken Grotesk', Arial, system-ui, -apple-system, sans-serif;
    --font-mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    color: var(--text-dark);
    background: var(--bg-white);
    line-height: 1.65;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

h1 { font-size: 3rem; }
h2 { font-size: 2.4rem; }
h3 { font-size: 1.6rem; }
h4 { font-size: 1.2rem; }

p {
    margin-bottom: 1rem;
    color: var(--text-light);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

::selection {
    background: var(--primary-color);
    color: #fff;
}

/* Visible focus for keyboard users */
a:focus-visible,
button:focus-visible,
input:focus-visible,
.btn:focus-visible {
    outline: 2px solid var(--secondary-color);
    outline-offset: 3px;
    border-radius: 6px;
}

/* Eyebrow label, the signature mono accent */
.eyebrow {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.74rem;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--eyebrow-color);
    margin-bottom: 1.1rem;
}

.section-title-block {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title-block .section-title {
    margin-bottom: 0;
}

/* Navigation */
.navbar {
    background: rgba(9, 11, 16, 0.72);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
}

/* Solid fallback where blur is unsupported */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .navbar { background: #0b0e14; }
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--text-dark);
}

.logo::after {
    content: ".";
    color: var(--secondary-color);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 0.5rem;
    align-items: center;
}

.nav-menu a {
    color: var(--text-light);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    position: relative;
}

.nav-menu a:not(.btn-primary):hover,
.nav-menu a.active:not(.btn-primary) {
    color: var(--text-dark);
}

.nav-menu a:not(.btn-primary).active::after {
    content: "";
    position: absolute;
    left: 1rem;
    right: 1rem;
    bottom: 0.15rem;
    height: 1px;
    background: var(--secondary-color);
}

.nav-menu .btn-primary {
    color: #fff !important;
    padding: 0.5rem 1.25rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 1.6rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.98rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
    font-family: inherit;
}

.btn-primary {
    background: var(--primary-color);
    color: #fff;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04), 0 8px 24px var(--glow-soft);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 12px 32px var(--glow);
}

.btn-secondary {
    background: transparent;
    color: var(--text-dark);
    border: 1px solid var(--border-strong);
}

.btn-secondary:hover {
    border-color: var(--secondary-color);
    color: var(--secondary-color);
    background: rgba(86, 194, 255, 0.06);
}

.btn-large {
    padding: 1rem 2.4rem;
    font-size: 1.05rem;
}

/* Hero */
.hero {
    position: relative;
    background: var(--bg-light);
    color: var(--text-dark);
    padding: 7rem 0 6rem;
    text-align: center;
    overflow: hidden;
    border-bottom: 1px solid var(--border-color);
}

/* Off center atmospheric glow */
.hero::before {
    content: "";
    position: absolute;
    top: -28%;
    left: 62%;
    transform: translateX(-50%);
    width: 820px;
    height: 640px;
    background: radial-gradient(ellipse at center,
        rgba(59, 140, 255, 0.18) 0%,
        rgba(86, 194, 255, 0.07) 38%,
        transparent 70%);
    pointer-events: none;
    animation: hero-glow 9s ease-in-out infinite;
}

/* Asymmetric spatial coordinate dot field */
.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.11) 1px, transparent 1.4px);
    background-size: 30px 30px;
    -webkit-mask-image: radial-gradient(ellipse 70% 75% at 70% 30%, #000 18%, transparent 70%);
    mask-image: radial-gradient(ellipse 70% 75% at 70% 30%, #000 18%, transparent 70%);
    opacity: 0.55;
    pointer-events: none;
}

@keyframes hero-glow {
    0%, 100% { opacity: 0.85; transform: translateX(-50%) scale(1); }
    50% { opacity: 1; transform: translateX(-50%) scale(1.06); }
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 840px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3.6rem;
    font-weight: 800;
    letter-spacing: -0.035em;
    margin-bottom: 1.5rem;
    line-height: 1.08;
    color: #f4f7fb;                        /* fallback before clip */
    background: linear-gradient(180deg, #ffffff 0%, #c7d2e0 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.gradient-accent {
    color: var(--secondary-color);
    -webkit-text-fill-color: var(--secondary-color);
    font-weight: 800;
}

.desktop-break { display: block; }

@media (max-width: 768px) {
    .desktop-break { display: inline; }
    .desktop-break::before { content: ' '; }
}

.hero-subtitle {
    font-size: 1.25rem;
    max-width: 620px;
    margin: 0 auto 2.5rem;
    color: var(--text-light);
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Staggered hero entrance */
.hero-content > * {
    opacity: 0;
    transform: translateY(16px);
    animation: rise 0.9s var(--ease-out) forwards;
}
.hero-content > .eyebrow { animation-delay: 0.05s; }
.hero-content > .hero-title { animation-delay: 0.18s; }
.hero-content > .hero-subtitle { animation-delay: 0.32s; }
.hero-content > .hero-buttons { animation-delay: 0.46s; }

@keyframes rise {
    to { opacity: 1; transform: translateY(0); }
}

/* Section titles */
.section-title {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-dark);
    letter-spacing: -0.025em;
}

/* Proof / content sections */
.proof-point {
    padding: 6rem 0;
    background: var(--bg-white);
    position: relative;
}

.proof-point + .proof-point { border-top: 1px solid var(--border-color); }

.alt-section {
    background: var(--bg-light);
}

.proof-description {
    max-width: 720px;
    margin: 0 auto;
    color: var(--text-light);
    font-size: 1.18rem;
    line-height: 1.75;
    text-align: center;
}

.proof-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-top: 1rem;
}

.proof-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.proof-card {
    padding: 2.25rem 1.75rem;
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    text-align: center;
    transition: var(--transition);
}

/* Detailed differentiator cards */
.proof-card--detail {
    position: relative;
    text-align: left;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.proof-card--detail::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.45s var(--ease-out);
}

.proof-card--detail:hover {
    transform: translateY(-4px);
    border-color: var(--border-strong);
    background: var(--surface-2);
    box-shadow: var(--shadow-md);
}

.proof-card--detail:hover::before {
    transform: scaleX(1);
}

.proof-card--detail .proof-label {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--eyebrow-color);
    margin: 0;
}

.proof-card--detail p:not(.proof-label) {
    color: var(--text-light);
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
}

.proof-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.inline-link {
    color: var(--secondary-color);
    font-weight: 600;
}
.inline-link:hover { text-decoration: underline; }

/* CTA */
.cta {
    position: relative;
    padding: 7rem 0;
    background: var(--bg-light);
    color: var(--text-dark);
    text-align: center;
    overflow: hidden;
    border-top: 1px solid var(--border-color);
}

.cta::before {
    content: "";
    position: absolute;
    bottom: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 700px;
    height: 500px;
    background: radial-gradient(ellipse at center, rgba(59, 140, 255, 0.14) 0%, transparent 70%);
    pointer-events: none;
}

.cta-content {
    position: relative;
    z-index: 1;
}

.cta-content h2 {
    font-size: 2.6rem;
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 2.5rem;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

.cta .btn {
    background: var(--primary-color);
    color: #fff;
    box-shadow: 0 8px 24px var(--glow-soft);
}

.cta .btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 12px 32px var(--glow);
}

/* Footer */
.footer {
    background: var(--bg-white);
    color: var(--text-dark);
    padding: 4rem 0 2.5rem;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 2.5rem;
}

.footer-section h3 {
    font-size: 1.35rem;
    margin-bottom: 0.75rem;
}

.footer-section h4 {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-faint);
    margin-bottom: 1rem;
}

.footer-section p {
    color: var(--text-light);
    max-width: 320px;
}

.footer-section ul { list-style: none; }
.footer-section ul li { margin-bottom: 0.6rem; }

.footer-section a {
    color: var(--text-light);
    font-size: 0.95rem;
}
.footer-section a:hover { color: var(--secondary-color); }

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 1.75rem;
}

.footer-bottom p {
    color: var(--text-faint);
    font-size: 0.85rem;
    margin: 0;
}

/* Scroll reveal, only active once JS marks the body */
body.reveal-ready .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
    will-change: opacity, transform;
}

body.reveal-ready .reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Reduced motion: no transforms or animation */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
    .hero-content > * { opacity: 1; transform: none; }
    body.reveal-ready .reveal { opacity: 1; transform: none; }
}

/* Responsive */
@media (max-width: 900px) {
    .footer-content { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .hero { padding: 5rem 0 4rem; }
    .hero::after { display: none; }       /* limit compositor layers on mobile */
    .hero-title { font-size: 2.5rem; }
    .hero-subtitle { font-size: 1.1rem; }
    .nav-menu { gap: 0.25rem; }
    .nav-menu a { padding: 0.5rem 0.7rem; font-size: 0.9rem; }
    .proof-grid { grid-template-columns: repeat(2, 1fr); }
    .proof-grid-3 { grid-template-columns: 1fr; }
    .footer-content { grid-template-columns: 1fr; gap: 2rem; }
    h1 { font-size: 2.2rem; }
    h2 { font-size: 1.8rem; }
    .cta-content h2 { font-size: 2rem; }
}

@media (max-width: 480px) {
    .hero { padding: 4rem 0 3rem; }
    .hero-title { font-size: 2.05rem; }
    .proof-point, .cta { padding: 3.5rem 0; }
    .proof-grid { grid-template-columns: 1fr; }
    .hero-buttons { flex-direction: column; }
    .btn { width: 100%; }
}
