/* ═══════════════════════════════════════════════════════════════════
   How It Works page styles
   ═══════════════════════════════════════════════════════════════════ */

:root {
    --nw-delta:  #6366f1;
    --nw-theta:  #8b5cf6;
    --nw-alpha:  #06b6d4;
    --nw-beta:   #10b981;
    --nw-gamma:  #f59e0b;
}

/* ── PAGE HERO ─────────────────────────────────────────────────── */
.hiw-hero {
    padding: var(--size-8) var(--size-7);
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
    border-color: rgba(99,102,241,0.3);
    color: #f8fafc;
}

.hiw-hero .eyebrow { color: #a5b4fc; }

.page-h1 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 800;
    background: linear-gradient(120deg, #e0e7ff 0%, #a5b4fc 50%, #67e8f9 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hiw-hero .lede { color: rgba(248,250,252,0.75); max-width: 64ch; }

/* ── CONTENT SECTIONS ──────────────────────────────────────────── */
.content-section {
    display: grid;
    gap: var(--size-5);
}

.section-header { max-width: 70ch; }

.section-header h2 {
    margin: 0;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 800;
    line-height: 1.1;
}

.section-lede {
    margin: 0;
    color: var(--site-text-muted);
    line-height: 1.8;
    max-width: 62ch;
}

/* ── TWO COLUMN ────────────────────────────────────────────────── */
.two-col {
    display: grid;
    gap: var(--size-6);
    align-items: start;
}

@media (min-width: 860px) {
    .two-col { grid-template-columns: 1fr 380px; }
    .two-col-flip { grid-template-columns: 380px 1fr; }
    .two-col-flip > :first-child { order: 2; }
    .two-col-flip > :last-child  { order: 1; }
}

.prose { display: grid; gap: var(--size-4); }

.prose p {
    margin: 0;
    color: var(--site-text);
    line-height: 1.8;
}

.prose h2 {
    margin: 0;
    font-size: clamp(1.6rem, 2.5vw, 2.2rem);
    font-weight: 800;
}

/* ── MECHANISM DIAGRAM ─────────────────────────────────────────── */
.mechanism-diagram {
    padding: var(--size-5);
    display: grid;
    gap: 0;
}

.mech-step {
    display: flex;
    gap: var(--size-4);
    align-items: flex-start;
    padding: var(--size-3) 0;
}

.mech-num {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--nw-delta), var(--nw-alpha));
    color: white;
    font-weight: 800;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mech-step strong {
    display: block;
    font-size: 0.9rem;
    margin-bottom: var(--size-1);
}

.mech-step p {
    margin: 0;
    font-size: 0.82rem;
    color: var(--site-text-muted);
    line-height: 1.65;
}

.mech-arrow {
    text-align: center;
    color: var(--site-text-muted);
    font-size: 1.2rem;
    padding: 0 0 0 1rem;
}

/* ── METHODS GRID ──────────────────────────────────────────────── */
.methods-grid {
    display: grid;
    gap: var(--size-4);
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.method-card {
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.method-header {
    display: flex;
    flex-direction: column;
    gap: var(--size-2);
    padding: var(--size-5);
    color: white;
}

.method-binaural  { background: linear-gradient(135deg, #312e81, #6366f1); }
.method-isochronic{ background: linear-gradient(135deg, #064e3b, #10b981); }
.method-monaural  { background: linear-gradient(135deg, #1e3a5f, #06b6d4); }

.method-icon {
    font-size: 1.8rem;
    line-height: 1;
}

.method-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 800;
}

.method-badge {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    background: rgba(255,255,255,0.18);
    padding: 0.2em 0.65em;
    border-radius: var(--radius-round);
    align-self: flex-start;
}

.method-body {
    padding: var(--size-5);
    display: grid;
    gap: var(--size-3);
    flex: 1;
}

.method-body p {
    margin: 0;
    font-size: 0.88rem;
    color: var(--site-text-muted);
    line-height: 1.75;
}

.method-body h4 {
    margin: 0;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--site-text-muted);
}

.method-body ul {
    margin: 0;
    padding-left: var(--size-5);
    display: grid;
    gap: var(--size-1);
}

.method-body li {
    font-size: 0.85rem;
    color: var(--site-text);
    line-height: 1.6;
}

.method-example {
    margin-top: auto;
    padding: var(--size-3);
    border-radius: var(--radius-3);
    background: var(--gray-1);
}

.method-example code {
    display: block;
    font-size: 0.78rem;
    background: none;
    padding: 0;
    color: var(--site-accent-strong);
}

/* ── CHECK LIST ────────────────────────────────────────────────── */
.check-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: var(--size-2);
}

.check-list li {
    padding-left: 1.6em;
    position: relative;
    line-height: 1.7;
    font-size: 0.92rem;
}

.check-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--nw-beta);
    font-weight: 700;
}

/* ── AUDIO DIAGRAM ─────────────────────────────────────────────── */
.audio-diagram {
    padding: var(--size-5);
    display: grid;
    gap: var(--size-3);
}

.audio-sphere {
    position: relative;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: radial-gradient(circle at 38% 38%, rgba(99,102,241,0.18), rgba(6,182,212,0.06));
    border: 2px dashed rgba(99,102,241,0.35);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sphere-center {
    font-size: 2.5rem;
    z-index: 2;
}

.sphere-label {
    position: absolute;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--site-accent-strong);
    background: rgba(255,255,255,0.9);
    padding: 0.15em 0.45em;
    border-radius: var(--radius-round);
    border: 1px solid var(--site-border);
}

.sphere-label.top    { top: 10px;    left: 50%; transform: translateX(-50%); }
.sphere-label.bottom { bottom: 10px; left: 50%; transform: translateX(-50%); }
.sphere-label.left   { left: 10px;   top: 50%;  transform: translateY(-50%); }
.sphere-label.right  { right: 10px;  top: 50%;  transform: translateY(-50%); }
.sphere-label.front  { bottom: 40px; left: 20px; }
.sphere-label.back   { top: 40px; right: 20px; }

.diagram-caption {
    margin: 0;
    text-align: center;
    font-size: 0.78rem;
    color: var(--site-text-muted);
}

/* ── TIMELINE ──────────────────────────────────────────────────── */
.timeline {
    display: grid;
    gap: 0;
    position: relative;
    padding-left: 100px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 80px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--nw-delta), var(--nw-alpha), var(--nw-beta));
    opacity: 0.35;
}

.tl-item {
    display: grid;
    grid-template-columns: 80px 16px 1fr;
    align-items: start;
    gap: 0 var(--size-4);
    margin-left: -100px;
    padding: var(--size-4) 0;
}

.tl-time {
    text-align: right;
    font-size: 0.75rem;
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--site-accent-strong);
    padding-top: 0.9rem;
    line-height: 1.4;
}

.tl-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--nw-delta), var(--nw-alpha));
    margin-top: 0.85rem;
    flex-shrink: 0;
    border: 3px solid white;
    box-shadow: 0 0 0 2px var(--nw-delta);
}

.tl-content {
    padding: var(--size-4) var(--size-5);
    display: grid;
    gap: var(--size-2);
}

.tl-content strong {
    font-size: 1rem;
}

.tl-content p {
    margin: 0;
    font-size: 0.88rem;
    color: var(--site-text-muted);
    line-height: 1.75;
}

/* ── HIW CTA ───────────────────────────────────────────────────── */
.hiw-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--size-5);
    padding: var(--size-6) var(--size-7);
    background: linear-gradient(135deg, #1e1b4b 0%, #0f172a 100%);
    border-color: rgba(99,102,241,0.25);
    color: #f8fafc;
}

.hiw-cta h2 {
    margin: 0;
    font-size: clamp(1.4rem, 2.5vw, 2rem);
    font-weight: 800;
    color: white;
}

.hiw-cta p { margin: 0; color: rgba(248,250,252,0.65); font-size: 0.92rem; }

.cta-actions {
    display: flex;
    gap: var(--size-3);
    flex-wrap: wrap;
}

/* ── RESPONSIVE ────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .methods-grid { grid-template-columns: 1fr; }
    .audio-diagram { display: none; }
}

@media (max-width: 640px) {
    .hiw-hero { padding: var(--size-6) var(--size-5); }
    .timeline { padding-left: 0; }
    .tl-time  { display: none; }
    .timeline::before { left: 8px; }
    .tl-item {
        grid-template-columns: 16px 1fr;
        margin-left: 0;
    }
}
