/* LearnLT web - shared design system. Mirrors the mobile app (0.7.0):
   cream surfaces, deep-green ink, sun-yellow pill buttons, soft cards
   and pastel icon circles. Page-specific files only add layout. */

:root {
    /* flag */
    --flag-yellow: #FDB913;
    --flag-green: #006A44;
    --flag-red: #C1272D;
    /* legacy names used by page CSS - kept, remapped to the new palette */
    --green: #1F6B45;
    --yellow: #F6C445;
    --red: #C0392B;
    --accent: #1F6B45;

    --bg: #FBF7ED;
    --bg-dim: #F3ECDC;
    --surface: #FFFCF6;
    --card: #FFFCF6;
    --ink: #1A3A25;
    --text: #1F2A22;
    --ink-muted: #6B7468;
    --border: #EFE6D4;
    --border-strong: #D9CFBA;

    --sun: #F6C445;
    --sun-hover: #F0B92A;
    --sun-soft: #FCEABA;
    --sun-pale: #FBEED1;
    --track: #FFF7E6;

    --leaf-bg: #DEEAB6;   --leaf: #3D6B2F;
    --sky-bg: #D1E4F1;    --sky: #2F6E9C;
    --coral-bg: #FBC5B8;  --coral: #C0392B;
    --lilac-bg: #E3DCF3;  --lilac: #5B3F9E;
    --teal-bg: #CDE9E4;   --teal: #17695F;
    --peach-bg: #FDC38F;  --peach: #A3240F;

    --radius-sm: 12px;
    --radius: 20px;
    --radius-lg: 28px;
    --shadow-sm: 0 1px 2px rgba(26, 58, 37, 0.05);
    --shadow: 0 1px 2px rgba(26, 58, 37, 0.04), 0 8px 24px rgba(26, 58, 37, 0.06);
    --shadow-lg: 0 2px 6px rgba(26, 58, 37, 0.05), 0 24px 48px rgba(26, 58, 37, 0.10);
    --font: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: var(--font);
    color: var(--text);
    line-height: 1.55;
    min-height: 100vh;
    background-color: var(--bg);
    background-image:
        radial-gradient(900px 600px at 100% -10%, rgba(246, 196, 69, 0.20), transparent 65%),
        radial-gradient(900px 700px at -10% 110%, rgba(222, 234, 182, 0.45), transparent 65%);
    background-attachment: fixed;
    background-repeat: no-repeat;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { color: var(--ink); letter-spacing: -0.015em; }
a { color: var(--green); }
::selection { background: var(--sun-soft); }

/* ---------------- Header ---------------- */
.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px max(24px, calc((100% - 1120px) / 2));
    background: rgba(251, 247, 237, 0.82);
    backdrop-filter: saturate(160%) blur(12px);
    -webkit-backdrop-filter: saturate(160%) blur(12px);
    border-bottom: 1px solid rgba(239, 230, 212, 0.9);
    position: sticky;
    top: 0;
    z-index: 50;
}

.brand {
    text-decoration: none;
    color: var(--ink);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.brand-logo { width: 34px; height: auto; display: block; }
.brand-mark {
    font-weight: 800;
    font-size: 22px;
    letter-spacing: -0.02em;
    line-height: 1;
    color: var(--ink);
}
.brand-mark__accent { color: var(--flag-green); }

.site-main { padding: 32px 24px; }

/* ---------------- Buttons ---------------- */
.cta-row {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 26px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
    appearance: none;
    -webkit-appearance: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    line-height: 1.2;
    transition: transform 120ms ease, background 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}
.btn:active { transform: scale(0.98); }
.btn:focus-visible {
    outline: 3px solid rgba(31, 107, 69, 0.35);
    outline-offset: 2px;
}
.btn--primary {
    background: var(--sun);
    color: var(--ink);
    box-shadow: 0 1px 0 rgba(26, 58, 37, 0.08), 0 6px 16px rgba(246, 196, 69, 0.35);
}
.btn--primary:hover { background: var(--sun-hover); transform: translateY(-1px); }
.btn--secondary {
    background: var(--card);
    color: var(--ink);
    border: 1.5px solid var(--border-strong);
}
.btn--secondary:hover { border-color: var(--ink); }
.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { background: #24502f; }

/* ---------------- Shared building blocks ---------------- */
.icon-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: var(--sun-pale);
    color: var(--ink);
}
.icon-circle svg { width: 24px; height: 24px; }
.icon-circle--leaf  { background: var(--leaf-bg);  color: var(--leaf); }
.icon-circle--sky   { background: var(--sky-bg);   color: var(--sky); }
.icon-circle--coral { background: var(--coral-bg); color: var(--coral); }
.icon-circle--lilac { background: var(--lilac-bg); color: var(--lilac); }
.icon-circle--teal  { background: var(--teal-bg);  color: var(--teal); }
.icon-circle--peach { background: var(--peach-bg); color: var(--peach); }
.icon-circle--sun   { background: var(--sun-soft); color: #8A5A00; }

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--sun-pale);
    color: var(--ink);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.01em;
}

/* Simple centred hero, used by the 404 page. The landing page has
   its own split hero in landing.css. */
.hero {
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
    padding: 48px 16px;
}
.hero-art { width: 200px; height: auto; margin: 0 auto 24px; display: block; }
.hero-title {
    font-size: clamp(32px, 5vw, 52px);
    font-weight: 800;
    margin: 0 0 12px;
    line-height: 1.08;
    letter-spacing: -0.03em;
}
.hero-tagline {
    font-size: 20px;
    color: var(--green);
    margin: 0 0 20px;
    font-weight: 700;
}
.hero-body {
    font-size: 17px;
    color: var(--ink-muted);
    margin: 0 0 28px;
}

/* ---------------- Top nav + account menu ---------------- */
.site-nav { display: flex; gap: 4px; align-items: center; }
.nav-link {
    color: var(--ink);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 15px;
    white-space: nowrap;
    transition: background 120ms ease;
}
.nav-link:hover { background: rgba(26, 58, 37, 0.06); }
.nav-link--cta {
    background: var(--sun);
    color: var(--ink);
    font-weight: 700;
    margin-left: 4px;
}
.nav-link--cta:hover { background: var(--sun-hover); }
@media (max-width: 560px) {
    .site-header { padding: 10px 16px; }
    .nav-link { padding: 8px 10px; font-size: 14px; }
    .nav-link--app, .site-nav > .nav-link[href="/support"] { display: none; }
    .brand-mark { font-size: 20px; }
}
.account-menu { position: relative; }
.account-menu__trigger {
    list-style: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    font-weight: 600;
    font-size: 14px;
    color: var(--ink);
}
.account-menu__trigger::-webkit-details-marker { display: none; }
.account-menu__trigger::marker { content: ''; }
.account-menu__trigger:hover { border-color: var(--green); }
.account-menu__name { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-menu__chevron { font-size: 10px; color: var(--ink-muted); transition: transform 120ms ease; }
.account-menu[open] .account-menu__chevron { transform: rotate(180deg); }
.account-menu__list {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    margin: 0;
    padding: 6px;
    list-style: none;
    min-width: 200px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.12);
    z-index: 100;
}
.account-menu__list li { padding: 0; }
.account-menu__list a,
.account-menu__list button {
    display: block;
    width: 100%;
    padding: 8px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--ink);
    font-size: 14px;
    font-weight: 500;
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
}
.account-menu__list a:hover,
.account-menu__list button:hover { background: rgba(0,0,0,0.04); color: var(--green); }
.account-menu__sep { height: 1px; background: var(--border); margin: 6px 0; padding: 0 !important; }
.account-menu__logout { margin: 0; }

/* ---------------- Footer store badges ---------------- */
.store-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 9px 18px;
    background: #111;
    color: #fff;
    text-decoration: none;
    border-radius: 14px;
    min-width: 168px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    transition: transform 120ms ease, box-shadow 120ms ease;
}
.store-badge:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18); }
.store-badge__text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
    text-align: left;
}
.store-badge__text small {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.85;
    font-weight: 600;
}
.store-badge__text strong { font-size: 14px; font-weight: 700; }

/* "Coming soon" variant - the badge renders but isn't clickable until
   the store URL lands in .env. pointer-events:none also stops the `#`
   href from jumping the page on accidental clicks. */
.store-badge--soon {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: none;
}

/* ---------------- Auth forms ---------------- */
.auth-body { min-height: 100vh; display: flex; flex-direction: column; }
.auth-main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 24px; }
.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--card);
    padding: 36px 32px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
}
.auth-card h1 { margin: 0 0 16px; font-size: 26px; font-weight: 800; }
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-form label { display: flex; flex-direction: column; gap: 6px; }
.auth-form label > span {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-muted);
}
.auth-form input {
    padding: 12px 14px;
    border: 1.5px solid var(--border-strong);
    border-radius: var(--radius-sm);
    font-size: 16px;
    background: #fff;
    color: var(--text);
    font-family: inherit;
}
.auth-form input:focus {
    outline: none;
    border-color: var(--green);
    box-shadow: 0 0 0 4px rgba(246, 196, 69, 0.35);
}
.btn--block { width: 100%; box-sizing: border-box; }
.form-error {
    background: rgba(193,39,45,0.10);
    border: 1px solid rgba(193,39,45,0.30);
    color: #842029;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 12px;
}
.form-notice {
    background: rgba(0,106,68,0.10);
    border: 1px solid rgba(0,106,68,0.30);
    color: #155724;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 12px;
}
.auth-foot {
    margin-top: 18px;
    text-align: center;
    font-size: 13px;
    color: var(--ink-muted);
}
.auth-foot a { color: var(--green); text-decoration: none; font-weight: 600; }
.auth-foot a:hover { text-decoration: underline; }

/* Small italic hint with a mailbox glyph - used on verify-sent and
   forgot-sent screens to nudge users towards their spam folder
   without making it the main message on the page. */
.mail-hint {
    margin: 10px 0 4px;
    text-align: center;
    font-size: 12px;
    line-height: 1.5;
    color: var(--ink-muted);
    font-style: italic;
}
.mail-hint::before {
    content: '📬';
    display: inline-block;
    margin-right: 4px;
    font-style: normal;
}

/* ---------------- AdSense slots ---------------- */
.ad-slot {
    margin: 24px auto;
    max-width: 760px;
    min-height: 90px;
}
.ad-slot--placeholder {
    background: repeating-linear-gradient(
        135deg,
        rgba(0,0,0,0.04) 0 8px,
        rgba(0,0,0,0.07) 8px 16px
    );
    border: 1px dashed var(--border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ink-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 24px;
}
.ad-slot__label { font-weight: 600; }

/* ---------------- Cookie banner (loaded on every page) ---------------- */
/* Make sure the HTML `hidden` attribute beats our `display: flex` -
   without `!important` the explicit display below would win and the
   banner would stay on-screen after the user picks a choice. */
.cookie-banner[hidden] { display: none !important; }

.cookie-banner {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 9999;
    background: var(--ink);
    color: #fff;
    border-radius: var(--radius);
    padding: 16px 20px;
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
    box-shadow: 0 12px 32px rgba(0,0,0,0.25);
    max-width: 880px;
    margin: 0 auto;
}
.cookie-banner__body {
    flex: 1 1 320px;
    font-size: 14px;
    line-height: 1.5;
}
.cookie-banner__body a { color: var(--yellow); text-decoration: underline; }
.cookie-banner__actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.cookie-banner .btn--secondary {
    background: transparent;
    color: white;
    border: 1px solid rgba(255,255,255,0.4);
}
.cookie-banner .btn--secondary:hover { border-color: white; }

/* Footer legal links - used on every page via layouts/app.twig. */

/* ---------------- Footer ---------------- */
.site-footer {
    margin-top: 48px;
    background: var(--ink);
    color: rgba(255, 255, 255, 0.72);
    padding: 56px 24px 28px;
    font-size: 14px;
}
.site-footer a { color: #fff; }
.footer-inner { max-width: 1120px; margin: 0 auto; }
.footer-top {
    display: grid;
    grid-template-columns: 1.1fr 2.4fr;
    gap: 48px;
    padding-bottom: 36px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.footer-brand .brand-mark { color: #fff; }
.footer-brand .brand-mark__accent { color: var(--sun); }
.footer-brand p { margin: 14px 0 20px; max-width: 32ch; line-height: 1.6; }
.footer-stores__row { display: flex; gap: 10px; flex-wrap: wrap; }
.footer-resources__title {
    margin: 0 0 16px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--sun);
    font-weight: 700;
}
.footer-resources__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}
.footer-resources__grid h4 {
    margin: 0 0 10px;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0;
}
.footer-resources__grid ul { list-style: none; padding: 0; margin: 0; }
.footer-resources__grid li { padding: 4px 0; font-size: 13px; line-height: 1.45; }
.footer-resources__grid a { color: #fff; text-decoration: none; font-weight: 600; }
.footer-resources__grid a:hover { color: var(--sun); }
.footer-resources__note { margin: 20px 0 0; font-size: 12px; color: rgba(255, 255, 255, 0.5); }
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    padding-top: 24px;
    font-size: 13px;
}
.footer-legal { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-legal a { color: rgba(255, 255, 255, 0.72); text-decoration: none; }
.footer-legal a:hover { color: #fff; }
@media (max-width: 900px) {
    .footer-top { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 720px) {
    .footer-resources__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 420px) {
    .footer-resources__grid { grid-template-columns: 1fr; }
}
.auth-footer { text-align: center; padding: 20px; color: var(--ink-muted); }

/* Illustrated icons (img/icons/*.webp) */
.ill { display: block; width: 64px; height: 64px; flex-shrink: 0; }
.ill--sm { width: 44px; height: 44px; }
.ill--lg { width: 88px; height: 88px; }
/* Icon sizes (v2 duotone set) - kept close to the old 48px circles */
.ill { width: 48px; height: 48px; }
