/* ============================================================
   HyperStrategy — Refined Organic enhancement layer
   Loaded after styles.css; overrides only what needs to change.
   Palette is preserved (#83D8C8 / #69C0B1 / #134E4A).
   Blob remains the logo and visual anchor.
   ============================================================ */

:root {
    --font-display: 'Fraunces', 'Times New Roman', serif;
    --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
    --ink: #0F3D38;
    --ink-soft: #1F5853;
    --ink-mute: rgba(15, 61, 56, 0.62);
    --bone: #F4F8F2;
    --rule: rgba(15, 61, 56, 0.18);
    --rule-soft: rgba(15, 61, 56, 0.10);
    --surface-glass: rgba(244, 248, 242, 0.55);
    --surface-glass-strong: rgba(244, 248, 242, 0.78);
    --surface-deep: rgba(15, 61, 56, 0.06);
}

/* ----- Atmospheric backgrounds ----- */
.atmosphere {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.atmosphere-mesh {
    position: absolute;
    inset: -10%;
    background:
        radial-gradient(ellipse 60% 50% at 18% 22%, rgba(255, 255, 255, 0.42), transparent 60%),
        radial-gradient(ellipse 55% 45% at 82% 78%, rgba(105, 192, 177, 0.55), transparent 65%),
        radial-gradient(ellipse 70% 50% at 50% 100%, rgba(15, 61, 56, 0.18), transparent 70%);
    filter: blur(20px);
    opacity: 0.9;
}

.atmosphere-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(to right, rgba(15, 61, 56, 0.045) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(15, 61, 56, 0.045) 1px, transparent 1px);
    background-size: 88px 88px;
    mask-image: linear-gradient(to bottom, transparent, #000 18%, #000 72%, transparent);
    -webkit-mask-image: linear-gradient(to bottom, transparent, #000 18%, #000 72%, transparent);
}

.atmosphere-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    mix-blend-mode: screen;
}

.atmosphere-glow-1 {
    width: 520px;
    height: 520px;
    top: -120px;
    right: -80px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.7), transparent 60%);
    animation: atmosphere-drift 22s ease-in-out infinite alternate;
}

.atmosphere-glow-2 {
    width: 600px;
    height: 600px;
    bottom: -200px;
    left: -120px;
    background: radial-gradient(circle, rgba(42, 254, 183, 0.35), transparent 60%);
    animation: atmosphere-drift 28s ease-in-out -6s infinite alternate;
}

@keyframes atmosphere-drift {
    0%   { transform: translate3d(0, 0, 0) scale(1); }
    100% { transform: translate3d(40px, -30px, 0) scale(1.08); }
}

@media (prefers-reduced-motion: reduce) {
    .atmosphere-glow { animation: none; }
}

/* Hide atmosphere on mobile for perf, keep mint base */
@media (max-width: 768px) {
    .atmosphere-mesh,
    .atmosphere-glow { display: none; }
    .atmosphere-grid { background-size: 56px 56px; opacity: 0.6; }
}

/* Make sure content sits above atmosphere */
.wrapper { position: relative; z-index: 1; }

/* ============================================================
   Typography system
   ============================================================ */

body {
    font-family: var(--font-primary);
    font-feature-settings: 'ss01', 'cv11';
    color: var(--ink);
}

/* Hero tagline */
.hero .tagline,
.tagline {
    font-family: var(--font-display) !important;
    font-weight: 360 !important;
    font-size: clamp(3.4rem, 7.5vw, 7rem) !important;
    line-height: 1.35 !important;
    letter-spacing: -0.025em !important;
    color: var(--ink) !important;
    -webkit-text-fill-color: var(--ink) !important;
    background: none !important;
    -webkit-background-clip: initial !important;
    text-shadow: none !important;
    font-variation-settings: 'opsz' 144, 'SOFT' 30;
}

.tagline .line1,
.tagline .line2 {
    display: block !important;
}

.tagline .line1 { font-weight: 360; margin-bottom: 0.35em; }

.tagline .line2 {
    font-weight: 360;
    color: var(--ink);
    -webkit-text-fill-color: var(--ink);
    margin-top: 0.2em;
}

.tagline br { display: none !important; }

.tagline em {
    font-style: italic;
    font-weight: 320;
    color: #FFFFFF;
    -webkit-text-fill-color: #FFFFFF;
    font-variation-settings: 'opsz' 144, 'SOFT' 80;
    margin-right: 0.08em;
    padding-right: 0.04em;
}

.hero-eyebrow {
    margin-top: 1.6rem;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink-mute);
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
}

.hero-eyebrow::before {
    content: '';
    width: 28px;
    height: 1px;
    background: var(--ink-mute);
    display: inline-block;
}

/* Section headers — give them editorial weight */
.section-header h2,
section h2 {
    font-family: var(--font-display) !important;
    font-weight: 400 !important;
    font-style: italic;
    letter-spacing: -0.02em !important;
    color: var(--ink) !important;
    -webkit-text-fill-color: var(--ink) !important;
    font-variation-settings: 'opsz' 144, 'SOFT' 50;
    background: none !important;
    -webkit-background-clip: initial !important;
}

.section-line {
    background: var(--rule) !important;
    height: 1px !important;
    width: 56px !important;
}

/* About + strategy + faq body copy */
.protocol-description p,
.strategy-intro,
.point-text p,
.faq-answer p,
.justified-text {
    color: var(--ink-soft) !important;
    text-align: left !important;
    font-size: 1.025rem;
    line-height: 1.72;
    font-weight: 400;
    letter-spacing: 0.005em;
}

/* ============================================================
   Hero composition — asymmetric
   ============================================================ */

.hero {
    position: relative;
    padding-top: 2rem;
}

.hero-content {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: clamp(1.5rem, 4vw, 3rem);
    align-items: center;
}

.hero-text {
    grid-column: 1;
    text-align: left !important;
}

.hero-blob-animation {
    grid-column: 2;
    position: relative;
    justify-self: end;
    width: 100%;
    max-width: 560px;
}

/* Soft halo behind the blob to anchor it */
.hero-blob-animation::before {
    content: '';
    position: absolute;
    inset: 6%;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 0.5), transparent 65%);
    filter: blur(30px);
    z-index: -1;
}

/* CTAs — restrained editorial buttons */
.cta-buttons {
    margin-top: clamp(2rem, 5vw, 3.5rem);
    justify-content: flex-start !important;
    gap: 0.5rem !important;
    flex-wrap: wrap;
}

.animated-button {
    background: var(--surface-glass) !important;
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    border: 1px solid var(--rule) !important;
    border-radius: 999px !important;
    padding: 0.85rem 1.5rem !important;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.4) inset, 0 8px 24px -16px rgba(15, 61, 56, 0.4) !important;
    transition: transform 240ms cubic-bezier(.2,.7,.2,1), background 240ms ease, border-color 240ms ease !important;
    position: relative;
    overflow: hidden;
}

.animated-button .text {
    font-family: var(--font-mono) !important;
    font-size: 0.78rem !important;
    letter-spacing: 0.14em !important;
    text-transform: uppercase;
    color: var(--ink) !important;
    font-weight: 500;
}

.animated-button::after {
    content: '→';
    margin-left: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--ink-mute);
    transition: transform 240ms cubic-bezier(.2,.7,.2,1), color 240ms ease;
    display: inline-block;
    transform: translateX(0);
}

.animated-button:hover {
    background: var(--surface-glass-strong) !important;
    border-color: rgba(15, 61, 56, 0.32) !important;
    transform: translateY(-1px);
}

.animated-button:hover::after {
    transform: translateX(4px);
    color: var(--ink);
}

/* Defang the original circle accent — it conflicted */
.animated-button .circle { display: none !important; }

@media (max-width: 900px) {
    .hero-content {
        grid-template-columns: 1fr;
    }
    .hero-blob-animation {
        justify-self: center;
        max-width: 360px;
    }
    .hero-text { text-align: center !important; }
    .hero-eyebrow { justify-content: center; }
    .cta-buttons { justify-content: center !important; }
}

/* ============================================================
   Stats — hero metric + secondary row
   ============================================================ */

.stats-bar {
    margin-top: clamp(2.5rem, 6vw, 5rem);
    padding: clamp(1.75rem, 4vw, 2.75rem) clamp(1.5rem, 3vw, 2.5rem);
    background: var(--surface-glass);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    border: 1px solid var(--rule);
    border-radius: 24px;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.5) inset,
        0 30px 60px -40px rgba(15, 61, 56, 0.45);
    position: relative;
}

.stats-hero {
    padding-bottom: 1.75rem;
    border-bottom: 1px solid var(--rule-soft);
    margin-bottom: 1.5rem;
}

.stats-hero-meta {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink-mute);
    margin-bottom: 0.75rem;
}

.stats-hero-pulse {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #2AFEB7;
    box-shadow: 0 0 0 0 rgba(42, 254, 183, 0.7);
    animation: pulse 2.4s ease-out infinite;
}

@keyframes pulse {
    0%   { box-shadow: 0 0 0 0 rgba(42, 254, 183, 0.7); }
    70%  { box-shadow: 0 0 0 10px rgba(42, 254, 183, 0); }
    100% { box-shadow: 0 0 0 0 rgba(42, 254, 183, 0); }
}

.stats-hero-live {
    color: var(--ink);
    font-weight: 500;
}

.stats-hero-value {
    font-family: var(--font-display);
    font-variation-settings: 'opsz' 144, 'SOFT' 20;
    font-weight: 380;
    font-size: clamp(2.8rem, 7vw, 5rem);
    line-height: 1;
    letter-spacing: -0.035em;
    color: var(--ink);
    font-feature-settings: 'tnum', 'lnum';
    transition: opacity 200ms ease;
}

.stats-hero-value.is-updating {
    opacity: 0.55;
}

.stats-hero-sub {
    margin-top: 0.85rem;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    color: var(--ink-soft);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.stats-hero-divider { color: var(--ink-mute); }

/* Secondary stat grid */
.stats-bar .stats-grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 0 !important;
}

.stats-bar .stat-card {
    background: transparent !important;
    border: none !important;
    border-right: 1px solid var(--rule-soft) !important;
    border-radius: 0 !important;
    padding: 0.4rem 1.25rem !important;
    box-shadow: none !important;
    text-align: left !important;
    backdrop-filter: none !important;
}

.stats-bar .stat-card:first-child { padding-left: 0 !important; }
.stats-bar .stat-card:last-child  { border-right: none !important; padding-right: 0 !important; }

.stats-bar .stat-label {
    font-family: var(--font-mono) !important;
    font-size: 0.66rem !important;
    letter-spacing: 0.16em !important;
    text-transform: uppercase !important;
    color: var(--ink-mute) !important;
    margin-bottom: 0.5rem !important;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.stats-bar .stat-value {
    font-family: var(--font-display) !important;
    font-variation-settings: 'opsz' 60, 'SOFT' 20;
    font-weight: 400 !important;
    font-size: clamp(1.35rem, 2.4vw, 1.85rem) !important;
    color: var(--ink) !important;
    -webkit-text-fill-color: var(--ink) !important;
    background: none !important;
    -webkit-background-clip: initial !important;
    letter-spacing: -0.01em !important;
    line-height: 1.1 !important;
    font-feature-settings: 'tnum', 'lnum';
}

.stat-card-link {
    transition: transform 200ms ease;
}
.stat-card-link:hover .stat-value { color: var(--ink-soft) !important; }
.stat-card-link:hover { transform: translateY(-1px); }

/* NAV info tooltip */
.stat-info {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    color: var(--ink-mute);
    cursor: help;
    outline: none;
}

.stat-info-tip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: var(--ink);
    color: var(--bone);
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.04em;
    padding: 0.5rem 0.7rem;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease, transform 180ms ease;
    text-transform: none;
    z-index: 10;
}

.stat-info-tip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: var(--ink);
}

.stat-info:hover .stat-info-tip,
.stat-info:focus .stat-info-tip {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

@media (max-width: 720px) {
    .stats-bar .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
    .stats-bar .stat-card {
        border-right: none !important;
        border-bottom: 1px solid var(--rule-soft) !important;
        padding: 1rem 0 !important;
    }
    .stats-bar .stat-card:nth-last-child(-n+2) { border-bottom: none !important; }
    .stats-bar .stat-card:nth-child(odd)  { padding-right: 1rem !important; padding-left: 0 !important; }
    .stats-bar .stat-card:nth-child(even) { padding-left: 1rem !important; border-left: 1px solid var(--rule-soft); }
}

/* ============================================================
   About — editorial 2-col with drop cap + pull quote
   ============================================================ */

.about {
    margin-top: clamp(4rem, 8vw, 7rem);
}

.about-content {
    max-width: 1080px;
    margin: 0 auto;
}

.protocol-description {
    column-gap: 3rem;
    column-count: 1;
}

@media (min-width: 900px) {
    .protocol-description {
        column-count: 2;
    }
    .about-lede {
        column-span: all;
        max-width: 60ch;
        margin: 0 auto 2rem;
        font-size: 1.18rem !important;
    }
    .about-pullquote {
        column-span: all;
        margin: 1.25rem auto 2rem;
    }
}

.drop-cap {
    font-family: var(--font-display);
    font-variation-settings: 'opsz' 144, 'SOFT' 20;
    font-weight: 380;
    float: left;
    font-size: 4.4rem;
    line-height: 0.85;
    padding: 0.35rem 0.7rem 0 0;
    color: var(--ink);
    font-feature-settings: 'ss01';
}

.about-pullquote {
    font-family: var(--font-display);
    font-style: italic;
    font-variation-settings: 'opsz' 144, 'SOFT' 80;
    font-weight: 350;
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    line-height: 1.25;
    color: var(--ink);
    text-align: center;
    max-width: 36ch;
    padding: 1.5rem 0;
    border-top: 1px solid var(--rule-soft);
    border-bottom: 1px solid var(--rule-soft);
    position: relative;
}

.about-pullquote em {
    color: rgba(255, 255, 255, 0.95);
    font-weight: 320;
}

.about-pullquote-mark {
    display: block;
    font-size: 3rem;
    line-height: 0.6;
    color: var(--rule);
    margin-bottom: 0.4rem;
}

/* ============================================================
   Strategy section refinement
   ============================================================ */

.strategy { margin-top: clamp(4rem, 8vw, 7rem); }

.strategy-intro {
    max-width: 56ch;
    margin: 0 auto 2.5rem !important;
    text-align: center !important;
    font-size: 1.08rem !important;
}

.point-text h4 {
    font-family: var(--font-display) !important;
    font-weight: 420 !important;
    font-style: italic;
    font-size: 1.25rem !important;
    color: var(--ink) !important;
    letter-spacing: -0.01em;
    margin-bottom: 0.4rem;
}

.strategy-point {
    border-top: 1px solid var(--rule-soft);
    padding-top: 1.25rem;
    padding-bottom: 1.25rem;
}

/* ============================================================
   FAQ
   ============================================================ */

.faqs { margin-top: clamp(4rem, 8vw, 7rem); margin-bottom: 4rem; }

.faq-item {
    border-bottom: 1px solid var(--rule-soft) !important;
    background: transparent !important;
    border-radius: 0 !important;
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
}

.faq-question h3 {
    font-family: var(--font-display) !important;
    font-weight: 420 !important;
    font-style: italic;
    font-size: 1.18rem !important;
    color: var(--ink) !important;
}

/* ============================================================
   Header refinement
   ============================================================ */

header {
    border-bottom: 1px solid transparent;
    transition: border-color 240ms ease, background-color 240ms ease;
}

header.scrolled,
header[data-scrolled="true"] {
    border-bottom-color: var(--rule-soft);
}

.logo > div,
header .logo div {
    font-family: var(--font-display) !important;
    font-weight: 420 !important;
    font-style: italic;
    letter-spacing: -0.015em !important;
    font-variation-settings: 'opsz' 60, 'SOFT' 60;
}

.nav-link {
    font-family: var(--font-mono) !important;
    font-size: 0.72rem !important;
    letter-spacing: 0.18em !important;
    text-transform: uppercase;
    color: var(--ink) !important;
}

/* ============================================================
   Footer
   ============================================================ */

footer {
    border-top: 1px solid var(--rule-soft);
    margin-top: 3rem;
    padding: 2rem 0;
}

footer p {
    font-family: var(--font-mono) !important;
    font-size: 0.72rem !important;
    letter-spacing: 0.16em !important;
    text-transform: uppercase;
    color: var(--ink-soft) !important;
    text-align: center;
}

/* ============================================================
   Loading screen — match new identity
   ============================================================ */

.loading-screen .loading-fade > div {
    font-family: var(--font-display) !important;
    font-style: italic;
    font-weight: 400 !important;
    font-variation-settings: 'opsz' 144, 'SOFT' 60;
    color: var(--ink) !important;
    letter-spacing: -0.02em !important;
}

/* ============================================================
   Reveal animation — orchestrated stagger
   ============================================================ */

.reveal-element {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 700ms cubic-bezier(.2,.7,.2,1), transform 700ms cubic-bezier(.2,.7,.2,1);
}

.reveal-element.is-revealed,
.reveal-element.revealed,
.reveal-element[data-revealed="true"] {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .reveal-element { opacity: 1; transform: none; transition: none; }
}
