/* Buddhist Meditation for Beginners — Earth-toned minimal design */
:root {
    --bg: #fbf8f0;
    --surface: #fffdf8;
    --text: #2a2926;
    --muted: #6f675d;
    --red: #7f3525;
    --gold: #c8ad7f;
    --gold-soft: #eee3d0;
    --dark: #1d1a17;
    --line: #e4ddd0;
    --green: #5e725b;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.68;
}
a { color: inherit; }

.parent-brand-bar {
    width: 100%;
    background: #29251f;
    border-bottom: 1px solid rgba(200,173,127,.24);
    color: #c9c1b3;
    font-size: .82rem;
}
.parent-brand-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: .55rem 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: .4rem;
    text-align: center;
}
.parent-brand-label { color: #aaa294; }
.parent-brand-link {
    display: inline-flex;
    align-items: center;
    gap: .28rem;
    color: #dfc18f;
    font-weight: 650;
    text-decoration: none;
}
.parent-brand-link:hover,
.parent-brand-link:focus-visible { color: #f1d7a8; text-decoration: underline; }

.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}
.site-header-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: .9rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
}
.site-brand {
    color: var(--red);
    font-weight: 760;
    text-decoration: none;
    max-width: 100%;
}
.site-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: .45rem 1rem;
    font-size: .89rem;
    align-items: center;
}
.site-nav a { color: #514b45; text-decoration: none; }
.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a.active {
    color: var(--red);
    text-decoration: underline;
    text-underline-offset: 4px;
}

.theme-toggle {
    border: 1px solid #d4c4a9;
    background: transparent;
    color: #514b45;
    padding: .35rem .65rem;
    border-radius: 4px;
    font: inherit;
    font-size: .9rem;
    min-height: 44px;
    cursor: pointer;
}

.hero {
    padding: 4.8rem 1rem 4.2rem;
    text-align: center;
    background: linear-gradient(180deg, #7f3525 0%, #693024 100%);
    color: #f7f4eb;
}
.hero-inner { max-width: 900px; margin: 0 auto; }
.hero h1 {
    margin: 0;
    font-size: clamp(2.1rem, 5vw, 3.4rem);
    line-height: 1.12;
}
.subtitle {
    max-width: 760px;
    margin: 1rem auto 0;
    color: #e8e0d5;
    font-size: 1.08rem;
}

.container {
    max-width: 1080px;
    margin: 3rem auto;
    padding: 0 1rem;
}
.grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 1.5rem;
    margin: 0;
}
.container > section + section { margin-top: 1.5rem; }
.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 2rem;
}
.card h2 {
    margin-top: 0;
    color: #4d2a20;
    line-height: 1.25;
}
.card h3 { color: #564235; }
.intro, .media-card { text-align: center; }

.practice-box {
    margin-top: 1.25rem;
    padding: 1.2rem 1.3rem;
    background: #f3eee4;
    border-left: 4px solid var(--green);
    border-radius: 6px;
}
.practice-box h3 { margin-top: 0; }

.steps {
    padding-left: 1.25rem;
}
.steps li { margin-bottom: .95rem; }

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    margin-top: 1.25rem;
}
.media-card .button-row { justify-content: center; }
.btn {
    display: inline-block;
    margin-top: .8rem;
    background: var(--gold);
    color: var(--dark);
    padding: .8rem 1.4rem;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 700;
}
.btn:hover, .btn:focus-visible { background: #b9a078; }
.btn-secondary {
    background: var(--gold-soft);
    border: 1px solid #d8c7a8;
}

.network-footer {
    background: var(--dark);
    color: #e6e0d4;
    padding: 3rem 1.5rem 1.5rem;
    border-top: 3px solid var(--red);
    font-size: .95rem;
}
.footer-container {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2.5rem;
}
.footer-brand h4,
.footer-links h5,
.footer-media h5 {
    color: #f7f4eb;
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.05rem;
}
.footer-brand p { color: #b5ae9f; margin: 0; }
.footer-links ul,
.footer-media ul { list-style: none; padding: 0; margin: 0; }
.footer-links li,
.footer-media li { margin-bottom: .6rem; }
.network-footer a { color: #c9af86; text-decoration: none; }
.network-footer a:hover,
.network-footer a:focus-visible { color: #f5d7a1; text-decoration: underline; }
.footer-bottom {
    max-width: 1100px;
    margin: 3rem auto 0;
    padding-top: 1.5rem;
    border-top: 1px solid #36312c;
    text-align: center;
    color: #8c8375;
    font-size: .85rem;
}

/* Dark mode */
html.dark-theme { color-scheme: dark; }
html.dark-theme body { background: #171512; color: #e7e1d7; }
html.dark-theme .site-header { background: #211e1a; border-color: #3a342e; }
html.dark-theme .site-brand { color: #d8b77f; }
html.dark-theme .site-nav a { color: #cfc6ba; }
html.dark-theme .site-nav a:hover,
html.dark-theme .site-nav a:focus-visible,
html.dark-theme .site-nav a.active { color: #e8c995; }
html.dark-theme .theme-toggle { background: #2a2621; color: #d8d0c4; border-color: #5a5147; }
html.dark-theme .hero { background: #51251c; }
html.dark-theme .card { background: #211e1a; border-color: #3a342e; }
html.dark-theme .card h2 { color: #e5c89d; }
html.dark-theme .card h3 { color: #dcc6a5; }
html.dark-theme .practice-box { background: #29251f; border-left-color: #879d82; }
html.dark-theme .btn-secondary { background: #302b25; color: #e7e1d7; border-color: #5a5147; }
html.dark-theme .network-footer { background: #11100e; }

@media (max-width: 920px) {
    .site-header-inner { flex-direction: column; align-items: flex-start; }
    .site-nav { justify-content: flex-start; }
}
@media (max-width: 768px) {
    .grid, .footer-container { grid-template-columns: 1fr; }
    .hero { padding: 3.6rem 1rem 3.1rem; }
    .footer-bottom { text-align: left; }
}
@media (max-width: 600px) {
    .parent-brand-inner { padding: .5rem 1rem; flex-wrap: wrap; font-size: .78rem; }
    .site-header-inner { padding: .8rem 1rem; }
    .site-nav { gap: .5rem .85rem; font-size: .86rem; }
    .card { padding: 1.4rem; }
    .button-row { flex-direction: column; }
    .btn { width: 100%; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}

/* =========================================================
   Mantra Meditation Videos
========================================================= */
.mantra-video-section {
    margin-top: 1.5rem;
}
.video-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
    margin-top: 1.5rem;
}
.video-card {
    min-width: 0;
}
.video-card h3 {
    margin-top: 0;
}
.video-card p {
    font-size: .93rem;
}
.video-card a {
    color: var(--red);
    font-weight: 650;
    text-decoration: none;
}
.video-card a:hover,
.video-card a:focus-visible {
    text-decoration: underline;
    text-underline-offset: 3px;
}
.video-embed {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    min-height: 204px;
    overflow: hidden;
    border-radius: 6px;
    background: #171512;
    border: 1px solid var(--line);
}
.video-embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    border: 0;
}

/* Practice navigation, readable mantra text, and consistent lesson endings. */
.skip-link {
    position: absolute;
    top: .5rem;
    left: 1rem;
    transform: translateY(-200%);
    padding: .65rem 1rem;
    background: var(--surface);
    color: var(--text);
    z-index: 100;
}
.skip-link:focus { transform: translateY(0); }
a:focus-visible, button:focus-visible, summary:focus-visible {
    outline: 3px solid var(--green);
    outline-offset: 4px;
}
.site-nav { font-size: .95rem; gap: .4rem 1rem; }
.site-nav > a { display: inline-flex; align-items: center; min-height: 44px; }
.practice-menu { position: relative; }
.practice-menu > summary {
    min-height: 44px;
    padding: .55rem .25rem;
    cursor: pointer;
    color: #514b45;
}
.practice-menu > summary.active { color: var(--red); font-weight: 700; }
.practice-menu-links {
    position: absolute;
    top: calc(100% + .35rem);
    left: 0;
    z-index: 20;
    width: 240px;
    max-width: calc(100vw - 2rem);
    padding: .5rem;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface);
    box-shadow: 0 8px 24px rgba(29,26,23,.12);
}
.practice-menu-links a { display: block; padding: .65rem .75rem; }
.hero-cta { margin-top: 1.6rem; }
.guide-byline { margin: 0 0 1.25rem; color: var(--muted); font-size: .95rem; }
.guide-byline a { text-underline-offset: 3px; }
.mantra-text {
    margin: 1.2rem 0;
    padding: 1rem 1.2rem;
    border-left: 3px solid var(--gold);
    background: #f3eee4;
    font-size: 1.2rem;
    line-height: 1.65;
    font-weight: 650;
    overflow-wrap: anywhere;
}
.pronunciation { color: var(--muted); }
.mantra-notes dt { font-weight: 700; margin-top: 1rem; }
.mantra-notes dd { margin: .3rem 0 0; }
.source-list { padding-left: 1.25rem; }
.source-list li + li { margin-top: .6rem; }
.source-list a, .next-lesson a { text-underline-offset: 3px; }
.source-note { font-size: .95rem; color: var(--muted); }
.session-plan { display: grid; gap: .75rem; margin: 1.25rem 0; }
.session-plan div { padding: .8rem 1rem; border-left: 3px solid var(--green); background: #f3eee4; }
.session-plan dt { font-weight: 700; }
.session-plan dd { margin: .25rem 0 0; }
.next-lesson .button-row { margin-top: .25rem; }
.card > :last-child { margin-bottom: 0; }
[id] { scroll-margin-top: 1.5rem; }
html.dark-theme .practice-menu > summary { color: #cfc6ba; }
html.dark-theme .practice-menu > summary.active { color: #e8c995; }
html.dark-theme .practice-menu-links { background: #211e1a; border-color: #5a5147; }
html.dark-theme .guide-byline,
html.dark-theme .pronunciation,
html.dark-theme .source-note { color: #c0b6a8; }
html.dark-theme .mantra-text,
html.dark-theme .session-plan div { background: #29251f; }
html.dark-theme .skip-link { background: #211e1a; color: #e7e1d7; }
html.dark-theme a:focus-visible,
html.dark-theme button:focus-visible,
html.dark-theme summary:focus-visible { outline-color: #a7be9f; }
@media (max-width: 600px) {
    .site-nav { gap: .25rem .9rem; font-size: .9rem; }
    .practice-menu-links { position: static; max-width: 100%; margin-top: .3rem; box-shadow: none; }
    .site-brand { line-height: 1.4; }
    .mantra-text { padding: .85rem; font-size: 1.1rem; }
    .card { padding: min(1.4rem, 5vw); }
}
html.dark-theme .video-card a {
    color: #dfc18f;
}
html.dark-theme .video-embed {
    border-color: #4b433a;
}
@media (max-width: 900px) {
    .video-grid {
        grid-template-columns: 1fr;
    }
}
