/* ECHO.11 frequency session page — shared styles.
   Used by every /​frequency page (10Hz, 40Hz, ...). Palette: Cloud
   Dancer + Geist grays; type: IBM Plex Mono + Outfit. Dark palette
   tokens come from quiet-mode.css. */

:root {
    --bg: #fafafa;
    --text: #1a1a1a;
    --text-secondary: #4a4a4a;
    --text-light: #595959;
    --white: #fff;
    --border: #e0e0e0;
    --accent: #2dd4f0;
    --accent-dim: rgba(45,212,240,0.25);
    --mono: 'IBM Plex Mono', monospace;
    --sans: 'Outfit', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 18px; scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--sans);
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    font-weight: 300;
    overflow-x: hidden;
    cursor: none;
}

/* Cursor */
.cursor-dot {
    width: 20px; height: 20px;
    background: rgba(100,100,100,0.6);
    border-radius: 50%;
    position: fixed; pointer-events: none;
    z-index: 9999; transform: translate(-50%,-50%);
    transition: width .2s, height .2s;
    mix-blend-mode: difference;
}
.cursor-dot.hover { width: 36px; height: 36px; }
a, button { cursor: pointer; }
@media (max-width: 768px) { body { cursor: auto; } .cursor-dot { display: none; } }

/* ── HEADER ── */
header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    background: rgba(250,250,250,0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}
.header-inner {
    max-width: 1600px; margin: 0 auto;
    padding: 1.2rem 2.5rem;
    display: flex; justify-content: space-between; align-items: center;
}
.logo {
    font-family: var(--mono); font-size: 1.1rem; font-weight: 500;
    color: var(--text); text-decoration: none;
}
.header-right { display: flex; align-items: center; gap: 1.5rem; }
.clock { font-family: var(--mono); font-size: 1rem; color: var(--text); }
.back-link {
    font-family: var(--mono); font-size: 0.78rem;
    letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--text-light); text-decoration: none; transition: color .2s;
}
.back-link:hover { color: var(--text); }

/* Hamburger */
.hamburger {
    width: 26px; height: 18px;
    display: flex; flex-direction: column; justify-content: space-between;
    cursor: pointer; background: none; border: none; padding: 0;
}
.hamburger span {
    width: 100%; height: 1.5px; background: var(--text); transition: all .3s ease;
}
.hamburger.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Side menu */
.side-menu {
    position: fixed; top: 0; right: -350px; width: 350px; height: 100vh;
    background: var(--bg); z-index: 999;
    display: flex; flex-direction: column; justify-content: center;
    padding: 3rem;
    transition: right .4s cubic-bezier(0.25,0.46,0.45,0.94), visibility 0s linear .4s;
    visibility: hidden;
    box-shadow: -10px 0 40px rgba(0,0,0,0.15);
}
.side-menu.active { right: 0; visibility: visible; transition-delay: 0s; }
.side-menu nav { display: flex; flex-direction: column; gap: 2rem; }
.side-menu a {
    font-size: 1.5rem; font-weight: 300; color: var(--text);
    text-decoration: none; transition: opacity .2s, transform .2s;
}
.side-menu a:hover { opacity: .6; transform: translateX(10px); }
.side-menu a.current { font-weight: 500; }
.menu-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.4); z-index: 998;
    opacity: 0; visibility: hidden; transition: all .3s;
}
.menu-overlay.active { opacity: 1; visibility: visible; }

/* App teaser (coming soon) in side menu */
.menu-app {
    margin-top: 0.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.menu-app-title {
    font-size: 1.5rem;
    font-weight: 300;
    color: #0284c7;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}
.menu-app-badge {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #0369a1;
    background: #e0f4fa;
    border: 1px solid #7dd3fc;
    border-radius: 999px;
    padding: 0.25em 0.8em;
    white-space: nowrap;
}
.menu-app-desc {
    font-size: 0.85rem;
    font-weight: 300;
    color: var(--text-light);
}
body.a11y-high-contrast .menu-app-title { color: var(--text) !important; }
body.a11y-high-contrast .menu-app-badge {
    color: var(--text) !important;
    background: var(--bg) !important;
    border-color: var(--text) !important;
}
body.a11y-high-contrast .menu-app-desc { color: var(--text) !important; }
html[data-theme="dark"] .menu-app-title { color: #2dd4f0; }
html[data-theme="dark"] .menu-app-badge {
    color: #7ce4f5;
    background: rgba(45, 212, 240, 0.12);
    border-color: rgba(45, 212, 240, 0.4);
}
@media (max-width: 768px) { .side-menu { width: 100%; right: -100%; } }

/* ── HERO — VIDEO PLAYER ── */
.hero {
    min-height: 100vh;
    position: relative;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}

/* Video fills hero */
.hero-video {
    position: absolute; inset: 0; z-index: 1;
}
.hero-video video {
    width: 100%; height: 100%;
    object-fit: cover;
    filter: grayscale(20%);
}

/* Light gradient overlay — fades video into white at bottom */
.hero-overlay {
    position: absolute; inset: 0; z-index: 2;
    background: linear-gradient(
        to bottom,
        rgba(250,250,250,0.15) 0%,
        rgba(250,250,250,0.3)  40%,
        rgba(250,250,250,0.85) 75%,
        rgba(250,250,250,1)    100%
    );
}

/* Player card — floats over video */
.player-card {
    position: relative; z-index: 10;
    display: flex; flex-direction: column; align-items: center;
    text-align: center;
    padding: 9rem 2rem 6rem;
    width: 100%;
}

.freq-eyebrow {
    font-family: var(--mono);
    font-size: 0.7rem; letter-spacing: 0.25em; text-transform: uppercase;
    color: var(--text-secondary); margin-bottom: 1.6rem;
}

/* One H1 carries the full keyword phrase; the number keeps the
   big display styling, the rest reads as the mono subtitle. */
.freq-h1 { font-weight: 200; }
.freq-title {
    display: block;
    font-size: clamp(3.5rem, 9vw, 7rem);
    font-weight: 200; letter-spacing: -0.04em; line-height: 1;
    color: var(--text); margin-bottom: 0.4rem;
}
.freq-subtitle {
    display: block;
    font-family: var(--mono); font-weight: 400;
    font-size: clamp(0.75rem, 1.5vw, 1rem);
    letter-spacing: 0.22em; text-transform: uppercase;
    color: var(--text-secondary); margin-bottom: 3.8rem;
    max-width: 100%;
}

/* Timer ring */
.timer-wrap {
    position: relative; width: 200px; height: 200px;
    margin-bottom: 3rem;
}

/* Breathing halo — soft organic glow behind the ring.
   8s cycle = 4s in, 4s out, matching a calm breath pace. */
.breath-halo {
    position: absolute; inset: -38%;
    border-radius: 50%;
    background: radial-gradient(circle,
        rgba(45,212,240,0.28) 0%,
        rgba(45,212,240,0.14) 42%,
        rgba(45,212,240,0)   70%);
    filter: blur(24px);
    opacity: 0;
    transform: scale(0.82);
    transition: opacity 1.8s ease;
    pointer-events: none;
    z-index: 0;
    will-change: transform, opacity;
}
.timer-wrap.playing .breath-halo {
    opacity: 1;
    animation: breathe 8s ease-in-out infinite;
}
@keyframes breathe {
    0%   { transform: scale(0.82); opacity: 0.55; }
    50%  { transform: scale(1.16); opacity: 1; }
    100% { transform: scale(0.82); opacity: 0.55; }
}
.timer-svg, .timer-inner { position: relative; z-index: 1; }

/* Live waveform — the actual binaural beat, drawn from an
   AnalyserNode tap on the audio graph while the session plays.
   Sits between the halo and the timer ring. */
.wave-canvas {
    position: absolute; inset: -60px;
    width: calc(100% + 120px); height: calc(100% + 120px);
    pointer-events: none;
    z-index: 0;
    opacity: 0;
    transition: opacity 1.8s ease;
    color: var(--accent); /* stroke color — follows light/dark theme */
}
.timer-wrap.playing .wave-canvas { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
    .wave-canvas { display: none; }
}

/* Breath guide — inhale/exhale text, synced to the halo cycle */
.breath-guide {
    position: relative;
    height: 1.4em;
    margin-bottom: 0.6rem;
    opacity: 0;
    transition: opacity 1.5s ease;
    pointer-events: none;
}
.breath-guide span {
    position: absolute; left: 50%; transform: translateX(-50%);
    font-family: var(--mono); font-size: 0.72rem;
    letter-spacing: 0.28em; text-transform: uppercase;
    color: var(--text-secondary);
    white-space: nowrap;
    opacity: 0;
}
body.session-active .breath-guide { opacity: 1; }
body.session-active .breath-guide .breath-in  { animation: breath-in-txt 8s ease-in-out infinite; }
body.session-active .breath-guide .breath-out { animation: breath-out-txt 8s ease-in-out infinite; }
@keyframes breath-in-txt {
    0% { opacity: 0.9; } 40% { opacity: 0.9; }
    50% { opacity: 0; } 90% { opacity: 0; } 100% { opacity: 0.9; }
}
@keyframes breath-out-txt {
    0% { opacity: 0; } 40% { opacity: 0; }
    50% { opacity: 0.9; } 90% { opacity: 0.9; } 100% { opacity: 0; }
}

/* Focus mode — while the session plays, everything else recedes */
header, .freq-eyebrow, .freq-title, .freq-subtitle,
.meta-row, .player-crosslink, .scroll-cue, .science, .footer-banner, footer {
    transition: opacity 1.8s ease;
}
body.session-active .freq-eyebrow,
body.session-active .freq-subtitle,
body.session-active .meta-row,
body.session-active .player-crosslink,
body.session-active .scroll-cue,
body.session-active .science,
body.session-active .footer-banner,
body.session-active footer { opacity: 0.15; }
body.session-active .freq-title { opacity: 0.35; }
body.session-active header { opacity: 0.25; }
@media (hover: hover) {
    body.session-active header:hover,
    body.session-active .science:hover,
    body.session-active footer:hover { opacity: 0.9; transition: opacity 0.6s ease; }
}

/* Touch devices: no hover exists, so dimmed regions become
   tap-proof during a session — no accidental navigation away
   mid-breath. Pausing restores everything instantly. */
@media (hover: none) {
    body.session-active header,
    body.session-active .science,
    body.session-active .footer-banner,
    body.session-active footer,
    body.session-active .meta-row,
    body.session-active .player-crosslink,
    body.session-active .scroll-cue { pointer-events: none; }
}

/* Narrow phones (≤390px): keep labels legible without overflow */
@media (max-width: 390px) {
    .freq-subtitle { letter-spacing: 0.14em; }
    .breath-guide span { font-size: 0.66rem; letter-spacing: 0.22em; }
    .state-text { font-size: 0.66rem; letter-spacing: 0.09em; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .timer-wrap.playing .breath-halo { animation: none; opacity: 0.55; transform: scale(1); }
    body.session-active .breath-guide { opacity: 0; }
}
/* Fills .timer-wrap rather than keeping the 200x200 of its width/height
   attributes: the wrap drops to 160px under 768px, and a fixed-size SVG
   overflows it by 40px, throwing the ring 20px right and 20px down of
   the play button and waveform. The viewBox handles the scaling. */
.timer-svg {
    transform: rotate(-90deg);
    display: block;
    width: 100%; height: 100%;
}
.ring-bg   { fill: none; stroke: var(--border); stroke-width: 1.5; }
.ring-prog {
    fill: none; stroke: var(--text); stroke-width: 1.5;
    stroke-linecap: round;
    stroke-dasharray: 565;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 1s linear, stroke .3s;
}
.timer-wrap.playing .ring-prog { stroke: var(--accent); filter: drop-shadow(0 0 4px var(--accent-dim)); }
.timer-inner {
    position: absolute; inset: 0;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 0.7rem;
    perspective: 600px;
}
.timer-time {
    font-family: var(--mono); font-size: 1.3rem; font-weight: 500;
    color: var(--text-secondary); line-height: 1;
}

/* Play button — a glass instrument porthole, not a flat icon.
   Layered like the book cover: a dimensional base surface, a
   static highlight so it reads as glass even at rest (mobile
   has no hover), and a pointer-tracked sheen + gentle tilt on
   desktop that makes it feel like a physical lens the light
   moves across. */
.play-btn {
    position: relative;
    width: 64px; height: 64px; border-radius: 50%;
    border: 1.5px solid var(--accent);
    background:
        radial-gradient(circle at 32% 26%, rgba(255,255,255,0.16), rgba(255,255,255,0) 45%),
        radial-gradient(circle at 50% 42%, #232a2f, #05070a 78%);
    color: var(--accent);
    display: flex; align-items: center; justify-content: center;
    transform-style: preserve-3d;
    transition: box-shadow .6s ease, transform .5s cubic-bezier(0.16,1,0.3,1), border-color .6s ease;
    box-shadow:
        0 0 0 1px rgba(45,212,240,0.15),
        0 4px 24px rgba(0,0,0,0.18),
        0 0 18px var(--accent-dim),
        inset 0 1.5px 1.5px rgba(255,255,255,0.2),
        inset 0 -3px 6px rgba(0,0,0,0.55);
    will-change: transform;
}
.play-btn.tracking { transition: box-shadow .6s ease, border-color .6s ease; }
.play-btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 6px;
}
/* rotating dashed HUD ring — the instrument bezel */
.play-btn::before {
    content: ''; position: absolute; inset: -9px; border-radius: 50%;
    border: 1px dashed rgba(45,212,240,0.4);
    animation: hud-spin 14s linear infinite;
}
/* pointer-tracked light sheen — inert (opacity 0) until JS
   activates it on hover; harmless if JS never runs */
.play-btn::after {
    content: '';
    position: absolute; inset: 0; border-radius: 50%;
    background: radial-gradient(circle at var(--shx, 50%) var(--shy, 50%), rgba(255,255,255,0.4), rgba(255,255,255,0) 55%);
    mix-blend-mode: soft-light;
    opacity: var(--sheen, 0);
    transition: opacity .5s ease;
    pointer-events: none;
}
.play-btn:hover { box-shadow: 0 0 0 1px rgba(45,212,240,0.3), 0 4px 24px rgba(0,0,0,0.22), 0 0 28px var(--accent), inset 0 1.5px 1.5px rgba(255,255,255,0.25), inset 0 -3px 6px rgba(0,0,0,0.55); }
.play-btn.playing {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px rgba(45,212,240,0.35), 0 4px 24px rgba(0,0,0,0.22), 0 0 26px var(--accent), inset 0 1.5px 1.5px rgba(255,255,255,0.22), inset 0 -3px 6px rgba(0,0,0,0.55);
}
.play-btn svg { position: relative; z-index: 1; width: 22px; height: 22px; filter: drop-shadow(0 0 4px var(--accent-dim)); }
@keyframes hud-spin { to { transform: rotate(360deg); } }
@media (hover: none) {
    .play-btn { animation: play-btn-drift 9s ease-in-out infinite; }
}
@keyframes play-btn-drift {
    0%, 100% { transform: rotateX(0) rotateY(0); }
    50%      { transform: rotateX(2deg) rotateY(-3deg); }
}
@media (prefers-reduced-motion: reduce) {
    .play-btn::before { animation: none; }
    .play-btn { animation: none !important; transform: none !important; transition: box-shadow .3s ease, border-color .3s ease; }
    .play-btn::after { display: none; }
}

.state-text {
    font-family: var(--mono); font-size: 0.72rem;
    letter-spacing: 0.12em; text-transform: uppercase;
    color: var(--text-light); margin-bottom: 2.2rem; min-height: 1.2em;
    transition: opacity 0.5s ease;
}

/* Loop toggle — mono pill under the state line; aria-pressed drives
   the visual state so assistive tech and CSS read the same source */
.loop-toggle {
    font-family: var(--mono); font-size: 0.65rem;
    letter-spacing: 0.15em; text-transform: uppercase;
    color: var(--text-light); background: none;
    border: 1px solid var(--border);
    padding: 0.45rem 0.95rem; margin-bottom: 2rem;
    display: inline-flex; align-items: center; gap: 0.55rem;
    transition: color .25s ease, border-color .25s ease;
}
.loop-toggle:hover { color: var(--text); border-color: var(--text); }
.loop-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.loop-toggle .loop-ind {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--border); transition: background .25s ease, box-shadow .25s ease;
}
.loop-toggle[aria-pressed="true"] { color: var(--text); border-color: var(--text); }
.loop-toggle[aria-pressed="true"] .loop-ind {
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent-dim);
}

/* Meta row — sessions + headphones note share one line */
.meta-row {
    display: flex; align-items: center; gap: 1.5rem;
    justify-content: center; margin-bottom: 2rem;
    flex-wrap: wrap;
}
.sessions-row { display: flex; align-items: center; gap: 0.6rem; }
.sessions-row[hidden] { display: none; }
.sessions-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--text);
    animation: blink 2.5s infinite;
}
@keyframes blink { 0%,100% { opacity:1; } 50% { opacity: 0.2; } }
.sessions-text {
    font-family: var(--mono); font-size: 0.72rem;
    letter-spacing: 0.08em; color: var(--text-light);
}
.sessions-num { color: var(--text-secondary); }

/* Headphones note */
.phones-note {
    display: flex; align-items: center; gap: 0.5rem;
    font-family: var(--mono); font-size: 0.7rem;
    color: var(--text-light);
}
.phones-note svg { width: 15px; height: 15px; }

/* Player cross-link — quiet mono pointer to the paired session */
.player-crosslink { margin-bottom: 2rem; }
.player-crosslink a {
    font-family: var(--mono); font-size: 0.68rem;
    letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--text-light); text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color .25s ease, border-color .25s ease;
}
.player-crosslink a:hover { color: var(--text); border-color: var(--text); }
.player-crosslink a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Scroll cue */
.scroll-cue {
    display: flex; flex-direction: column; align-items: center; gap: 0.4rem;
    font-family: var(--mono); font-size: 0.65rem;
    letter-spacing: 0.15em; text-transform: uppercase;
    color: var(--text-light);
    animation: fadeUp 1.5s ease 2s both;
}
.scroll-cue svg { width: 16px; animation: nudge 2s infinite; }
@keyframes nudge { 0%,100%{transform:translateY(0)} 50%{transform:translateY(4px)} }
@keyframes fadeUp { from{opacity:0;transform:translateY(10px)} to{opacity:1;transform:translateY(0)} }

/* ── SCIENCE SECTION ── */
.science {
    background: var(--white);
    border-top: 1px solid var(--border);
    padding: 6rem 2.5rem;
}
.science-inner { max-width: 960px; margin: 0 auto; }

.section-label {
    font-size: 0.75rem; letter-spacing: 0.2em; text-transform: uppercase;
    color: var(--text-light); margin-bottom: 3rem;
    display: flex; align-items: center; gap: 1rem;
}
.section-label::after { content:''; flex:1; height:1px; background: var(--border); }

/* Frequency diagram */
.freq-diagram {
    display: grid; grid-template-columns: 1fr auto 1fr;
    border: 1px solid var(--border);
    margin-bottom: 4rem;
}
.ear { padding: 2rem; }
.ear.right { text-align: right; }
.ear-tag {
    font-family: var(--mono); font-size: 0.62rem;
    letter-spacing: 0.2em; text-transform: uppercase;
    color: var(--text-light); margin-bottom: 0.5rem;
}
.ear-hz {
    font-family: var(--mono); font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 600; color: var(--text); line-height: 1;
}
.ear-note { font-size: 0.82rem; color: var(--text-secondary); margin-top: 0.4rem; }
.brain {
    padding: 2rem;
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    text-align: center; display: flex; flex-direction: column; justify-content: center;
}
.brain-tag {
    font-family: var(--mono); font-size: 0.6rem;
    letter-spacing: 0.2em; text-transform: uppercase;
    color: var(--text-light); margin-bottom: 0.4rem;
}
.brain-hz {
    font-family: var(--mono); font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 600; color: var(--text); line-height: 1;
}
.brain-wave { font-size: 0.78rem; color: var(--text-secondary); margin-top: 0.3rem; }

/* Info grid */
.info-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1px; background: var(--border); margin-bottom: 4rem;
}
.info-block { background: var(--bg); padding: 2.2rem; }
/* The last text block stretches over the leftover tracks and the
   image takes a full row, so the grid never shows an empty cell
   at any column count auto-fit settles on. */
.info-block-wide { grid-column: span 2; }
.info-block-img { padding: 0; grid-column: 1 / -1; aspect-ratio: 3 / 2; }
.info-block-img img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%; display: block; filter: grayscale(15%); }
.info-q {
    font-family: var(--mono); font-size: 0.68rem;
    letter-spacing: 0.15em; text-transform: uppercase;
    color: var(--text-light); margin-bottom: 1rem;
}
.info-a { font-size: 0.95rem; color: var(--text-secondary); line-height: 1.85; font-weight: 300; }
.info-a strong { color: var(--text); font-weight: 500; }

.feel-tags { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1rem; }
.feel-tag {
    border: 1px solid var(--border); padding: 0.3rem 0.8rem;
    font-size: 0.78rem; color: var(--text-secondary);
}

/* Session modals — headphone check + completion */
.modal-overlay {
    position: fixed; inset: 0; z-index: 1000;
    background: rgba(8,10,11,0.55); backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden; transition: opacity .25s;
    padding: 1.5rem;
}
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal-card {
    width: 100%; max-width: 420px;
    background: var(--white); border: 1px solid var(--border);
    padding: 2.5rem 2.2rem; text-align: center;
    transform: translateY(12px); transition: transform .25s;
}
.modal-overlay.active .modal-card { transform: translateY(0); }
.modal-icon {
    width: 48px; height: 48px; margin: 0 auto 1.4rem;
    border-radius: 50%; border: 1.5px solid var(--accent);
    display: flex; align-items: center; justify-content: center;
    color: var(--accent); box-shadow: 0 0 16px var(--accent-dim);
}
.modal-icon svg { width: 22px; height: 22px; }
.modal-title { font-size: 1.3rem; font-weight: 500; margin-bottom: 0.7rem; }
.modal-text { font-size: 0.92rem; color: var(--text-secondary); line-height: 1.7; font-weight: 300; margin-bottom: 1.8rem; }
.modal-actions { display: flex; flex-direction: column; gap: 0.7rem; }
.modal-btn {
    font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase;
    padding: 0.9rem 1.2rem; text-decoration: none; cursor: pointer; border: none;
    transition: opacity .2s, transform .2s;
}
.modal-btn:hover { transform: translateY(-1px); }
.modal-btn-primary { background: var(--text); color: var(--white); }
.modal-btn-primary:hover { opacity: 0.85; }
.modal-btn-ghost { background: none; color: var(--text-secondary); border: 1px solid var(--border); }
.modal-btn-ghost:hover { color: var(--text); border-color: var(--text); }
.modal-meta { font-family: var(--mono); font-size: 0.7rem; color: var(--text-light); margin-top: 1.5rem; letter-spacing: 0.05em; }

/* Research callout */
.callout {
    border: 1px solid var(--border); border-left: 3px solid var(--text);
    padding: 2rem 2.5rem; background: var(--white); margin-bottom: 4rem;
}
.callout-tag {
    font-family: var(--mono); font-size: 0.65rem;
    letter-spacing: 0.2em; text-transform: uppercase;
    color: var(--text-light); margin-bottom: 1rem; display: block;
}
.callout p { font-size: 0.95rem; color: var(--text-secondary); line-height: 1.85; font-weight: 300; }
.callout p strong { color: var(--text); font-weight: 500; }
.callout a {
    color: var(--text); font-size: 0.82rem;
    display: inline-block; margin-top: 1rem;
    text-decoration: underline;
}

/* Research card — what the evidence actually supports */
.callout .research-headline {
    font-family: var(--sans); font-size: clamp(1.15rem, 2.2vw, 1.5rem);
    font-weight: 500; color: var(--text); line-height: 1.4;
    margin-bottom: 1.1rem;
}
.callout .research-note {
    margin-top: 1.6rem; padding-top: 1.2rem;
    border-top: 1px solid var(--border);
    font-size: 0.82rem; color: var(--text-light);
    line-height: 1.75; font-weight: 300;
}
.callout .research-note a {
    color: var(--text-light); font-size: inherit;
    margin-top: 0; text-decoration: underline;
}
.callout .research-note a:hover { color: var(--text); }

/* Full disclaimer */
.disclaimer {
    margin-top: 4rem; padding: 2rem 2.5rem;
    border: 1px solid var(--border); background: var(--bg);
}
.disclaimer p {
    font-size: 0.85rem; color: var(--text-light);
    line-height: 1.85; font-weight: 300;
}
.disclaimer p + p { margin-top: 1rem; }
.disclaimer:target { border-color: var(--text); }

/* Quiet continuation → book */
.next-step {
    margin-top: 5rem;
    padding-top: 3rem;
    border-top: 1px solid var(--border);
    text-align: center;
}
.next-step-tag {
    font-family: var(--mono); font-size: 0.65rem;
    letter-spacing: 0.2em; text-transform: uppercase;
    color: var(--text-light); display: block; margin-bottom: 1rem;
}
.next-step p {
    font-size: 1.05rem; color: var(--text-secondary);
    font-weight: 300; max-width: 34rem; margin: 0 auto 1.5rem;
}
.next-step a {
    font-family: var(--mono); font-size: 0.82rem;
    letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--text); text-decoration: none;
    border-bottom: 1px solid var(--text);
    padding-bottom: 2px;
    transition: opacity .25s;
}
.next-step a:hover { opacity: 0.55; }

/* Footer */
.footer-banner { width: 100%; overflow: hidden; }
.footer-banner img { width: 100%; display: block; filter: grayscale(100%); object-fit: contain; }
footer { padding: 4rem 2.5rem; background: var(--bg); }
.footer-inner {
    max-width: 1400px; margin: 0 auto;
    display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr auto;
    gap: 3rem; align-items: start;
}
.footer-brand { font-family: var(--mono); font-size: clamp(2rem,4vw,3rem); font-weight: 600; letter-spacing: -0.02em; }
.footer-contact h4, .footer-col h4 { font-size: .95rem; font-weight: 500; margin-bottom: .8rem; }
.footer-contact a, .footer-col a { color: var(--text); text-decoration: none; font-size: .95rem; font-weight: 300; }
.footer-contact a:hover, .footer-col a:hover { opacity: .6; }
.footer-col { display: flex; flex-direction: column; gap: .5rem; }
.footer-col span { color: var(--text-secondary); font-size: .95rem; font-weight: 300; }
.footer-icon svg { width: 24px; height: 24px; }
@media (max-width: 900px) { .footer-inner { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1/-1; } }
@media (max-width: 600px) { .footer-inner { grid-template-columns: 1fr; } }
.footer-legal {
    max-width: 1400px; margin: 0 auto; padding-top: 2rem;
    border-top: 1px solid var(--border);
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem;
}
.footer-legal p, .footer-legal a { font-size: .85rem; color: var(--text-light); font-weight: 300; text-decoration: none; }
.footer-legal a:hover { color: var(--text); }
.footer-legal-links { display: flex; gap: 1.5rem; }

/* Reveal */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .8s ease; }
.reveal.visible { opacity: 1; transform: none; }

@media (max-width: 768px) {
    .header-inner { padding: 1rem 1.5rem; }
    .freq-diagram { grid-template-columns: 1fr; }
    .brain { border-left: none; border-right: none; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); text-align: left; align-items: flex-start; }
    .ear.right { text-align: left; }
    .science { padding: 4rem 1.5rem; }
    footer { padding: 3rem 1.5rem; }
    .player-card { padding: 6rem 1.5rem 2.5rem; }
    .timer-wrap { width: 160px; height: 160px; }
    /* lighter GPU load: smaller blur radius on mobile */
    .breath-halo { filter: blur(16px); inset: -32%; }
    .play-btn { width: 56px; height: 56px; }
    .play-btn svg { width: 22px; height: 22px; }
    .timer-time { font-size: 1.1rem; }
    .meta-row { flex-direction: column; gap: 0.7rem; }
    .scroll-cue { display: none; }
    /* .info-block-img forces `grid-column: span 2` so auto-fit
       can be pushed into a 2-column layout even when only one
       280px track fits — the row (and the whole grid, since a
       spanning item can widen every track) overflows the
       viewport and gets silently clipped by overflow-x:hidden,
       cutting off the right half of every answer. Force a
       single column below the point auto-fit would collapse
       to one anyway. */
    .info-grid { grid-template-columns: 1fr; }
    .info-block-wide { grid-column: span 1; }
    .info-block-img { grid-column: span 1; aspect-ratio: 16/10; }
}
@media (prefers-reduced-motion: reduce) {
    .reveal { opacity:1; transform:none; }
    .sessions-dot { animation:none; }
    .scroll-cue { animation:none; opacity:1; }
}

.skip-link {
    position: absolute;
    top: -50px;
    left: 0;
    background: var(--text);
    color: var(--white);
    padding: 12px 20px;
    z-index: 9999;
    transition: top 0.3s;
    text-decoration: none;
}

.skip-link:focus {
    top: 0;
}
/* ── DARK MODE — the 2am palette ──
   Night-time anxiety is the core use case; a bright screen
   works against the session. Scoped to Quiet Mode's data-theme
   (stored choice → night hours → system preference, resolved
   in <head> before first paint). The palette variables live in
   assets/css/quiet-mode.css, shared by the whole site. */
html[data-theme="dark"] .hero-video video { filter: grayscale(20%) brightness(0.5); }
html[data-theme="dark"] .hero-overlay {
    background: linear-gradient(
        to bottom,
        rgba(14,16,19,0.3)  0%,
        rgba(14,16,19,0.5)  40%,
        rgba(14,16,19,0.92) 75%,
        rgba(14,16,19,1)    100%
    );
}
html[data-theme="dark"] .menu-overlay { background: rgba(0,0,0,0.6); }
html[data-theme="dark"] .side-menu { box-shadow: -10px 0 40px rgba(0,0,0,0.6); }
html[data-theme="dark"] .modal-overlay { background: rgba(0,0,0,0.72); }

