@font-face {
    font-family: 'Nunito Sans';
    font-style: normal;
    font-weight: 200 900;
    font-display: swap;
    src: url('/fonts/nunito-sans.woff2') format('woff2');
}

@font-face {
    font-family: 'Fraunces';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('/fonts/fraunces.woff2') format('woff2');
}

:root {
    --font-body: 'Nunito Sans', 'Helvetica Neue', Arial, sans-serif;
    --font-display: 'Fraunces', Georgia, 'Iowan Old Style', 'Palatino Linotype', serif;
    --accent-primary: #2d4739;
    --accent-secondary: #afbdb4;
    --theme-transition-duration: 560ms;
    --theme-transition-easing: cubic-bezier(0.22, 1, 0.36, 1);
    --content-width: 74rem;
}

:root[data-theme="light"] {
    --page-bg: #e6e9e4;
    --page-bg-alt: #f9fbf6;
    --page-bg-lower: #d8ded9;
    --surface: rgba(242, 244, 240, 0.82);
    --surface-strong: rgba(249, 251, 246, 0.94);
    --surface-soft: rgba(229, 234, 229, 0.84);
    --text-main: #1a1f1c;
    --text-muted: #596461;
    --text-faint: #76817d;
    --line-soft: rgba(45, 71, 57, 0.12);
    --line-strong: rgba(45, 71, 57, 0.20);
    --glow: rgba(175, 189, 180, 0.28);
    --cta-bg: linear-gradient(145deg, #345443, #274238);
    --cta-text: #f9fbf6;
    --shadow: 0 22px 70px rgba(45, 55, 50, 0.11);
    --shadow-card: 0 12px 30px rgba(45, 55, 50, 0.08);
}

:root[data-theme="dark"] {
    --accent-primary: #afbdb4;
    --page-bg: #202422;
    --page-bg-alt: #303432;
    --page-bg-lower: #111413;
    --surface: rgba(43, 48, 46, 0.84);
    --surface-strong: rgba(50, 55, 52, 0.94);
    --surface-soft: rgba(34, 38, 36, 0.88);
    --text-main: #f0f2ef;
    --text-muted: #c3c9c6;
    --text-faint: #9da6a1;
    --line-soft: rgba(240, 242, 239, 0.10);
    --line-strong: rgba(240, 242, 239, 0.18);
    --glow: rgba(175, 189, 180, 0.16);
    --cta-bg: linear-gradient(145deg, #c8d1cc, #8fa398);
    --cta-text: #1b201e;
    --shadow: 0 22px 70px rgba(0, 0, 0, 0.34);
    --shadow-card: 0 12px 32px rgba(0, 0, 0, 0.24);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    background: var(--page-bg);
}

html[data-theme-transition="true"] *,
html[data-theme-transition="true"] *::before,
html[data-theme-transition="true"] *::after {
    transition-property: color, background, background-color, border-color, box-shadow, opacity, fill, stroke;
    transition-duration: var(--theme-transition-duration);
    transition-timing-function: var(--theme-transition-easing);
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text-main);
    background:
        radial-gradient(circle at 12% 13%, var(--glow), transparent 28rem),
        radial-gradient(circle at 88% 72%, var(--glow), transparent 30rem),
        linear-gradient(145deg, var(--page-bg-alt), var(--page-bg) 55%, var(--page-bg-lower));
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 450;
    line-height: 1.68;
}

a {
    color: inherit;
}

button {
    font: inherit;
}

:focus-visible {
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(143, 163, 152, 0.32);
}

.site-shell {
    position: relative;
    min-height: 100vh;
}

.discovery-wrap {
    width: min(calc(100% - 2rem), var(--content-width));
    margin: 0 auto;
}

.discovery-hero {
    padding: clamp(4.5rem, 10vw, 8.5rem) 0 clamp(3rem, 7vw, 5.5rem);
}

.discovery-hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(18rem, 0.58fr);
    gap: clamp(2.5rem, 7vw, 6rem);
    align-items: end;
}

.discovery-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    margin-bottom: 1.2rem;
    color: var(--accent-primary);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.discovery-eyebrow::before {
    width: 2.4rem;
    height: 1px;
    background: currentColor;
    content: '';
    opacity: 0.56;
}

h1,
h2,
h3 {
    margin: 0;
    font-family: var(--font-display);
    font-optical-sizing: auto;
    font-weight: 700;
    font-variation-settings: 'SOFT' 60, 'WONK' 1;
    letter-spacing: -0.035em;
}

h1 {
    max-width: 12ch;
    font-size: clamp(3.4rem, 8vw, 6.8rem);
    line-height: 0.95;
}

.discovery-title-line {
    display: block;
}

.discovery-lead {
    max-width: 34rem;
    margin: 2rem 0 0;
    color: var(--text-muted);
    font-size: clamp(1.08rem, 2vw, 1.3rem);
    line-height: 1.7;
}

.discovery-hero-note {
    padding: clamp(1.5rem, 3vw, 2.1rem);
    border: 1px solid var(--line-soft);
    border-radius: 2rem;
    background: var(--surface);
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(16px);
}

.discovery-hero-note strong {
    display: block;
    margin-bottom: 0.65rem;
    font-family: var(--font-display);
    font-optical-sizing: auto;
    font-variation-settings: 'SOFT' 60, 'WONK' 1;
    font-size: 1.45rem;
    line-height: 1.1;
}

.discovery-hero-note p {
    margin: 0;
    color: var(--text-muted);
}

.discovery-practice-preview {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 0.82fr) minmax(20rem, 1.18fr);
    gap: clamp(1.5rem, 4vw, 3.5rem);
    align-items: center;
    margin-bottom: clamp(3rem, 7vw, 5.5rem);
    padding: clamp(1.5rem, 4vw, 3rem);
    scroll-margin-top: 6rem;
    border: 1px solid var(--line-soft);
    border-radius: clamp(1.8rem, 4vw, 2.8rem);
    background:
        radial-gradient(circle at 8% 12%, rgba(255, 255, 255, 0.48), transparent 30%),
        radial-gradient(circle at 88% 8%, rgba(175, 189, 180, 0.24), transparent 30%),
        linear-gradient(145deg, var(--surface-strong), var(--surface-soft));
    box-shadow: var(--shadow);
    overflow: hidden;
}

.discovery-practice-preview::after {
    position: absolute;
    right: -6rem;
    bottom: -8rem;
    width: 18rem;
    height: 18rem;
    border-radius: 50%;
    background: rgba(143, 163, 152, 0.12);
    content: '';
    pointer-events: none;
}

.discovery-preview-copy,
.discovery-practice-preview .voice-preview-player {
    position: relative;
    z-index: 1;
}

.discovery-preview-copy .discovery-eyebrow {
    margin-bottom: 0.9rem;
}

.discovery-preview-copy h2 {
    max-width: 14ch;
    font-size: clamp(2.25rem, 4.8vw, 3.75rem);
    line-height: 0.98;
}

.discovery-preview-copy p {
    max-width: 38rem;
    margin: 1.1rem 0 0;
    color: var(--text-muted);
    font-size: 1.04rem;
    line-height: 1.72;
}

:root[data-theme="dark"] .discovery-practice-preview {
    background:
        radial-gradient(circle at 8% 12%, rgba(240, 242, 239, 0.07), transparent 30%),
        radial-gradient(circle at 88% 8%, rgba(175, 189, 180, 0.10), transparent 30%),
        linear-gradient(145deg, var(--surface-strong), var(--surface-soft));
}

:root[data-theme="dark"] .discovery-practice-preview::after {
    background: rgba(175, 189, 180, 0.07);
}

.discovery-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 2rem;
}

.discovery-actions-repeat {
    grid-column: 1 / -1;
    margin-top: 0;
}

.discovery-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3.15rem;
    padding: 0.82rem 1.3rem;
    border: 1px solid transparent;
    border-radius: 999px;
    background: var(--cta-bg);
    color: var(--cta-text);
    font-weight: 800;
    text-decoration: none;
    box-shadow: var(--shadow-card);
}

.discovery-button.secondary {
    border-color: var(--line-strong);
    background: var(--surface-strong);
    color: var(--text-main);
    box-shadow: none;
}

.discovery-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(17rem, 0.34fr);
    gap: clamp(1.5rem, 4vw, 3rem);
    align-items: start;
    padding-bottom: clamp(4rem, 9vw, 7rem);
}

.discovery-article,
.discovery-aside {
    border: 1px solid var(--line-soft);
    border-radius: clamp(1.6rem, 4vw, 2.6rem);
    background: var(--surface);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.discovery-article {
    padding: clamp(1.6rem, 5vw, 4rem);
}

.discovery-aside {
    position: sticky;
    top: 7rem;
    padding: clamp(1.4rem, 3vw, 2rem);
}

.guide-section + .guide-section {
    margin-top: clamp(2.8rem, 6vw, 4.5rem);
    padding-top: clamp(2.5rem, 5vw, 4rem);
    border-top: 1px solid var(--line-soft);
}

.guide-section h2 {
    max-width: 19ch;
    font-size: clamp(2rem, 4.5vw, 3.35rem);
    line-height: 1.02;
}

.guide-section h3 {
    margin-top: 2rem;
    font-size: 1.4rem;
    line-height: 1.15;
}

.guide-section p,
.guide-section li,
.discovery-aside p {
    color: var(--text-muted);
}

.guide-section p {
    max-width: 47rem;
    margin: 1.25rem 0 0;
    font-size: 1.05rem;
}

.guide-points {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
    margin: 1.6rem 0 0;
    padding: 0;
    list-style: none;
}

.guide-points li {
    padding: 1.15rem 1.2rem;
    border: 1px solid var(--line-soft);
    border-radius: 1.25rem;
    background: var(--surface-soft);
}

.guide-points strong {
    display: block;
    margin-bottom: 0.35rem;
    color: var(--text-main);
}

.quiet-callout {
    margin-top: 1.8rem;
    padding: 1.3rem 1.45rem;
    border-left: 0.24rem solid var(--accent-secondary);
    border-radius: 0 1.2rem 1.2rem 0;
    background: var(--surface-soft);
    color: var(--text-muted);
}

.discovery-aside h2 {
    font-size: 1.7rem;
    line-height: 1.08;
}

.discovery-aside p {
    margin: 0.9rem 0 0;
}

.discovery-aside a:not(.discovery-button) {
    color: var(--accent-primary);
    font-weight: 800;
    text-underline-offset: 0.2em;
}

.discovery-aside .discovery-button {
    width: 100%;
    margin-top: 1.3rem;
}

.related-guides {
    padding-bottom: clamp(4rem, 9vw, 7rem);
}

.related-guides h2 {
    margin-bottom: 1.5rem;
    font-size: clamp(2rem, 4vw, 3rem);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.related-card {
    display: flex;
    min-height: 12rem;
    flex-direction: column;
    justify-content: space-between;
    padding: 1.5rem;
    border: 1px solid var(--line-soft);
    border-radius: 1.6rem;
    background: var(--surface);
    text-decoration: none;
    box-shadow: var(--shadow-card);
}

.related-card span {
    color: var(--accent-primary);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.related-card strong {
    margin-top: 2rem;
    font-family: var(--font-display);
    font-optical-sizing: auto;
    font-variation-settings: 'SOFT' 60, 'WONK' 1;
    font-size: 1.55rem;
    line-height: 1.05;
}

.discovery-footer {
    padding: 0 0 2rem;
}

.discovery-footer-card {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem 2rem;
    padding: 1.5rem 0;
    border-top: 1px solid var(--line-soft);
    color: var(--text-faint);
    font-size: 0.9rem;
}

.discovery-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem 1.2rem;
}

.discovery-footer a {
    text-underline-offset: 0.2em;
}

@media (max-width: 900px) {
    .discovery-hero-inner,
    .discovery-content,
    .discovery-practice-preview {
        grid-template-columns: 1fr;
    }

    .discovery-hero-note {
        max-width: 38rem;
    }

    .discovery-aside {
        position: static;
    }

    .related-grid {
        grid-template-columns: 1fr;
    }

    .related-card {
        min-height: 9rem;
    }
}

@media (max-width: 620px) {
    .discovery-wrap {
        width: min(calc(100% - 1.2rem), var(--content-width));
    }

    .discovery-hero {
        padding-top: 3.5rem;
    }

    h1 {
        font-size: clamp(3rem, 16vw, 4.5rem);
    }

    .guide-points {
        grid-template-columns: 1fr;
    }

    .discovery-actions,
    .discovery-actions .discovery-button {
        width: 100%;
    }

    .discovery-practice-preview {
        padding: 1.2rem;
        scroll-margin-top: 5.5rem;
    }

    .discovery-practice-preview .voice-preview-player {
        gap: 0.7rem;
        padding: 0.9rem;
    }

    .discovery-practice-preview .preview-practice-icon {
        width: 3.25rem;
        height: 3.25rem;
        border-radius: 1.15rem;
    }

    .discovery-practice-preview .voice-preview-button {
        width: 3.15rem;
        height: 3.15rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}
