/* ==========================================================================
   GERMAN-A1-LETTERS-A-TO-Z-COURSE-PAGE.CSS — scoped Bauhaus retint + navbar redesign for the master
   curriculum hub page (all levels' letter grids).
   Every component here (.card, .level-bubble-card, .alphabet-bubble-card,
   .topic-chip-*, .hub-tag-badge/.badge-*) is a
   shared see-test.css class that already reads var(--tokens), so
   redeclaring the same "modern Bauhaus" token values used on
   german-a0-absolute-foundations.css/german-a0-grammar-path.css/german-courses-page.css at :root retints the
   whole page automatically — no per-component rules needed, same
   mechanism already used on german-a0-absolute-foundations.html/german-a0-grammar-path.html/
   german-a1-letter-c-course.html.

   Because this stylesheet is only ever linked from german-a1-letters-a-to-z-course-page.html and
   loads after see-test.css, none of this touches any other page. Uses
   "html:root" rather than plain ":root" for the override — see
   a1-highlights.css for why that extra specificity is worth the
   insurance.
   ========================================================================== */

html:root {
    --bg: #f7f2e7;
    --bg-wash-1: #f7f2e7;
    --bg-wash-2: #f7f2e7;
    --surface: #ffffff;
    --surface-2: #fbf7ee;
    --ink: #191726;
    --ink-soft: #5a5470;
    --ink-faint: #9089a3;
    --accent: #e0432b;
    --accent-2: #c23621;
    --accent-soft: rgba(224, 67, 43, 0.12);
    --gold: #b4870a;
    --gold-soft: rgba(239, 176, 0, 0.18);
    --line: #e7dec7;
    --line-strong: #d8cba8;

    --shadow-sm: 0 1px 2px rgba(25, 23, 38, 0.06), 0 1px 1px rgba(25, 23, 38, 0.04);
    --shadow-md: 0 10px 24px -8px rgba(25, 23, 38, 0.16), 0 2px 8px -2px rgba(25, 23, 38, 0.06);

    --serif: "Futura", "Avenir Next", Avenir, "Century Gothic", system-ui, sans-serif;

    --color-nom: #1d5fa6; --color-nom-bg: #e5eef8;
    --color-acc: #e0432b; --color-acc-bg: #fbe7e3;
    --color-irr: #b4870a; --color-irr-bg: #faf1d6;
    --color-coo: #0f7168; --color-coo-bg: #e2f2f0;
    --color-sub: #6c4ba6; --color-sub-bg: #eee8f7;
    --color-neg: #b8355f; --color-neg-bg: #f8e5eb;
}

@media (prefers-color-scheme: dark) {
    html:root {
        --bg: #131220;
        --bg-wash-1: #131220;
        --bg-wash-2: #131220;
        --surface: #1c1a2c;
        --surface-2: #211f34;
        --ink: #f3eee1;
        --ink-soft: #b3abc9;
        --ink-faint: #867f9c;
        --accent: #ff5b41;
        --accent-2: #ff7b62;
        --accent-soft: rgba(255, 91, 65, 0.16);
        --gold: #ffcb3d;
        --gold-soft: rgba(255, 203, 61, 0.18);
        --line: #33304a;
        --line-strong: #413c5c;

        --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
        --shadow-md: 0 10px 28px -10px rgba(0, 0, 0, 0.55);

        --color-nom: #5b98e8; --color-nom-bg: rgba(91, 152, 232, 0.16);
        --color-acc: #ff5b41; --color-acc-bg: rgba(255, 91, 65, 0.16);
        --color-irr: #ffcb3d; --color-irr-bg: rgba(255, 203, 61, 0.18);
        --color-coo: #2fb6a8; --color-coo-bg: rgba(47, 182, 168, 0.16);
        --color-sub: #9a7bd6; --color-sub-bg: rgba(154, 123, 214, 0.18);
        --color-neg: #e06a94; --color-neg-bg: rgba(224, 106, 148, 0.18);
    }
}

/* ================= NAVBAR (redesigned, scoped to this page only) ================= */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 28px;
    background: color-mix(in srgb, var(--bg) 92%, transparent);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.brand-mark {
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
}

.brand-word {
    font-family: var(--serif);
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: 0.01em;
    color: var(--ink);
}

.brand-word b {
    color: var(--accent);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

.nav-links > a {
    font-family: var(--mono);
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-decoration: none;
    padding: 9px 14px;
    border-radius: 8px;
    color: var(--ink-soft);
    transition: background 0.15s ease, color 0.15s ease;
}

.nav-links > a:hover {
    background: var(--surface-2);
    color: var(--ink);
}

.navbar .dropdown-item {
    position: relative;
}

.navbar .dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    font-family: var(--mono);
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 9px 14px;
    border-radius: 8px;
    color: var(--ink-soft);
    text-decoration: none;
    border: none;
    background: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.navbar .dropdown-trigger:hover,
.navbar .dropdown-item.open .dropdown-trigger {
    background: var(--surface-2);
    color: var(--ink);
}

.navbar .dropdown-trigger.active {
    color: var(--accent);
}

.navbar .caret {
    transition: transform 0.18s ease;
    font-size: 0.7em;
}

.navbar .dropdown-item.open .caret {
    transform: rotate(180deg);
}

.navbar .dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    min-width: 230px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow-md);
    padding: 14px 10px 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s;
    overflow: hidden;
}

/* Vibrant Bauhaus accent strip across the top of the popup — same three
   primaries used throughout the site's topic-color system (matches
   german-courses-page.html). */
.navbar .dropdown-menu::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), var(--gold), var(--color-nom));
}

.navbar .dropdown-item.open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.navbar .dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--ink-soft);
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.navbar .dropdown-menu a:hover {
    background: var(--surface-2);
    color: var(--ink);
    transform: translateX(2px);
}

/* --- Language flag swatches + "Soon" badges (matches german-courses-page.html) --- */
.dropdown-flag {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.15s ease;
}

.dropdown-flag-es {
    background: linear-gradient(to bottom, #c60b1e 0 25%, #ffc400 25% 75%, #c60b1e 75% 100%);
}

.dropdown-flag-fr {
    background: linear-gradient(to right, #0055a4 0 33.33%, #ffffff 33.33% 66.66%, #ef4135 66.66% 100%);
}

.navbar .dropdown-menu a:hover .dropdown-flag-es {
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1), 0 0 0 3px var(--color-acc-bg);
}

.navbar .dropdown-menu a:hover .dropdown-flag-fr {
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1), 0 0 0 3px var(--color-nom-bg);
}

.dropdown-lang-name {
    flex: 1;
}

.dropdown-soon-badge {
    font-family: var(--mono);
    font-size: 0.58rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--gold);
    background: var(--gold-soft);
    padding: 3px 7px;
    border-radius: 999px;
    flex-shrink: 0;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle span {
    width: 22px;
    height: 2px;
    background: var(--ink);
    border-radius: 2px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

@media (max-width: 860px) {
    .nav-links {
        position: fixed;
        inset: 60px 0 auto 0;
        background: var(--surface);
        flex-direction: column;
        align-items: stretch;
        padding: 10px;
        border-bottom: 1px solid var(--line);
        box-shadow: var(--shadow-md);
        transform: translateY(-8px);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
        gap: 2px;
    }

    .nav-links.open {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-links > a,
    .navbar .dropdown-trigger {
        width: 100%;
    }

    .navbar .dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        padding-left: 14px;
        margin-top: 0;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
    }

    /* The gradient strip is positioned relative to the popup's own box —
       once that box goes position:static for the mobile stacked layout,
       there's no floating panel left for it to sit across, so drop it. */
    .navbar .dropdown-menu::before {
        display: none;
    }

    .navbar .dropdown-item.open .dropdown-menu {
        display: flex;
    }

    .nav-toggle {
        display: flex;
    }
}

/* .curriculum-hub-section (see-test.css) is a normal in-flow section with
   its own top/bottom padding — just needs enough extra top padding to
   clear the now-fixed navbar instead of sliding underneath it. */
.curriculum-hub-section {
    padding-top: 94px;
}

/* --- Back link, matching .a0-back-link/.cj-back-link and the same
   pattern used across the other Bauhaus pages. --- */
.a1c-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    align-self: flex-start;
    margin-bottom: 20px;
    text-decoration: none;
    background: var(--accent-soft);
    color: var(--accent);
    border-radius: 999px;
    padding: 6px 16px 6px 6px;
    font-family: var(--mono);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.a1c-back-link-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--surface);
    color: var(--accent);
    flex-shrink: 0;
    transition: transform 0.15s ease;
}

.a1c-back-link:hover {
    background: var(--accent);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.a1c-back-link:hover .a1c-back-link-icon {
    transform: translateX(-2px);
}

/* --- Hero: the shared .card.level-section-banner-card (see-test.css)
   centers its contents and hardcodes h3/p sizing with !important for the
   curriculum-hub pickers it was designed for — reset here to a proper
   left-aligned Bauhaus hero with decorative shapes, matching
   german-a0-absolute-foundations.html/german-a0-grammar-path.html's hero treatment. */
.a1c-hero-card {
    display: block !important;
    text-align: left !important;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: 40px 36px !important;
    border-radius: 26px;
    box-shadow: var(--shadow-md);
}

.a1c-hero-card::before,
.a1c-hero-card::after {
    content: "";
    position: absolute;
    z-index: -1;
    border-radius: 50%;
}

.a1c-hero-card::before {
    width: 220px;
    height: 220px;
    right: -80px;
    top: -90px;
    background: radial-gradient(circle at 30% 30%, var(--gold), transparent 70%);
    opacity: 0.5;
}

.a1c-hero-card::after {
    width: 150px;
    height: 150px;
    right: 40px;
    top: 90px;
    border: 20px solid var(--color-nom);
    opacity: 0.16;
}

.a1c-hero-card > .hub-tag-badge {
    position: static;
    display: inline-flex;
    margin: 0 0 14px;
}

.a1c-hero-card h3 {
    font-size: clamp(1.6rem, 3.6vw, 2.2rem) !important;
    font-weight: 800 !important;
    color: var(--ink) !important;
    letter-spacing: -0.01em !important;
    margin: 0 0 10px !important;
}

.a1c-hero-card > p {
    max-width: 620px !important;
    font-weight: 400;
    line-height: 1.6;
    margin: 0 0 24px !important;
}

.a1c-stats-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
    background: var(--surface-2);
}

.a1c-stat {
    flex: 1;
    min-width: 140px;
    padding: 14px 18px;
    text-align: left;
    border-left: 1px solid var(--line);
}

.a1c-stat:first-child {
    border-left: none;
}

.a1c-stat-num {
    display: block;
    font-family: var(--serif);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.01em;
}

.a1c-stat:nth-child(2) .a1c-stat-num { color: var(--color-nom); }
.a1c-stat:nth-child(3) .a1c-stat-num { color: var(--color-coo); }

.a1c-stat-label {
    display: block;
    font-family: var(--mono);
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ink-soft);
    margin-top: 3px;
}

/* --- Letter grid: every letter is currently "Coming Soon" (see
   .alpha-disabled in see-test.css for the muted card/status-pill look) —
   just a shared border radius override here to match this page's other
   rounded corners. --- */
.alphabet-bubble-card {
    border-radius: 14px;
}

.alpha-bubble-title {
    font-weight: 800;
}

/* --- Live Demo section: two "popup window" preview cards below the
   letter grid (mini lesson + flashcard deck), built from Letter A
   content. Every inner component (.choices-grid/.choice-box,
   .flashcard-*, .vocab-grid/.vocab-card, .*-article) is a shared
   see-test.css class that already reads var(--tokens), so it retints
   automatically with the rest of this page — only the window chrome
   and the mini-lesson-specific bits need new rules here. --- */
.a1c-demo-section {
    margin-top: 48px;
}

.a1c-demo-intro {
    max-width: 640px;
    margin-bottom: 24px;
}

.a1c-demo-intro > .hub-tag-badge {
    position: static;
    display: inline-flex;
    margin: 0 0 12px;
}

.a1c-demo-intro h3 {
    font-family: var(--serif);
    font-size: clamp(1.4rem, 3vw, 1.8rem);
    font-weight: 800;
    color: var(--ink);
    letter-spacing: -0.01em;
    margin: 0 0 8px;
}

.a1c-demo-intro p {
    color: var(--ink-soft);
    line-height: 1.6;
    margin: 0;
}

.a1c-demo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
    margin-bottom: 24px;
}

.a1c-demo-grid:last-child {
    margin-bottom: 0;
}

.a1c-demo-grid.a1c-demo-grid-primary {
    grid-template-columns: 1fr;
}

@media (max-width: 900px) {
    .a1c-demo-grid {
        grid-template-columns: 1fr;
    }
}

/* "Popup window" chrome: a titlebar with three dots (echoing the brand
   mark's nom/acc/irr colors) sitting on top of a normal card body. */
.a1c-demo-window {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.a1c-demo-titlebar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: var(--surface-2);
    border-bottom: 1px solid var(--line);
}

.a1c-demo-dots {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.a1c-demo-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    display: inline-block;
}

.a1c-demo-dot.dot-nom { background: var(--color-nom); }
.a1c-demo-dot.dot-acc { background: var(--color-acc); }
.a1c-demo-dot.dot-irr { background: var(--color-irr); }

.a1c-demo-titlebar-label {
    font-family: var(--mono);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: lowercase;
    letter-spacing: 0.02em;
    color: var(--ink-faint);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.a1c-demo-body {
    padding: 24px;
}

.a1c-demo-body h4 {
    font-family: var(--serif);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--ink);
    margin: 0 0 14px;
}

/* --- Full-width replica widget: a condensed clone of see-test.html's
   3-column layout (topic sidebar / story / grammar reference) squeezed
   into one popup window body. --- */
.a1c-demo-replica-grid {
    display: grid;
    grid-template-columns: 200px 1fr 260px;
    gap: 28px;
}

@media (max-width: 900px) {
    .a1c-demo-replica-grid {
        grid-template-columns: 1fr;
    }
    .a1c-demo-replica-sidebar,
    .a1c-demo-replica-story {
        border-right: none !important;
        padding-right: 0 !important;
        border-bottom: 1px solid var(--line);
        padding-bottom: 24px;
    }
}

.a1c-demo-replica-sidebar {
    border-right: 1px solid var(--line);
    padding-right: 24px;
}

.a1c-demo-replica-sidebar h2 {
    font-family: var(--mono);
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--gold);
    text-transform: uppercase;
    margin: 0 0 10px;
}

.a1c-demo-replica-sidebar .topic {
    cursor: pointer;
}

.a1c-demo-replica-hint {
    margin: 10px 0 0;
    font-size: 0.7rem;
    color: var(--ink-faint);
    font-style: italic;
}

.a1c-demo-replica-story {
    border-right: 1px solid var(--line);
    padding-right: 24px;
}

.a1c-demo-replica-story h4 {
    margin-top: 10px;
}

.a1c-demo-replica-text {
    font-family: var(--serif);
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--ink);
    line-height: 1.8;
    margin: 0 0 12px;
}

.a1c-demo-replica-translation {
    font-size: 0.82rem;
    font-style: italic;
    color: var(--ink-faint);
    margin: 0;
}

.a1c-demo-vocab-word {
    color: var(--ink);
    font-weight: 800;
    border-bottom: 1px dotted var(--ink-faint);
}

.a1c-demo-replica-reference .hints-header {
    margin-bottom: 14px;
}

.a1c-demo-replica-reference > div + div {
    margin-top: 20px;
}

/* --- Flashcard + vocab windows: reuse shared components as-is, just
   cap the vocab list's height so the "popup" doesn't run the full
   length of all 84 cards. --- */
.a1c-demo-vocab-window .a1c-demo-vocab-scroll {
    max-height: 480px;
    overflow-y: auto;
    padding: 20px 24px;
}

/* --- Reveal on scroll --- */
.a1c-reveal {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: no-preference) {
    .a1c-reveal {
        opacity: 0;
        transform: translateY(16px);
        transition: opacity 0.5s ease, transform 0.5s ease;
    }

    .a1c-reveal.is-visible {
        opacity: 1;
        transform: none;
    }
}
