/* KinderCafe — shared styles in the look of the printed flyer */

@font-face { font-family: "Lexend"; font-weight: 400; font-display: swap; src: url("/fonts/lexend-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Lexend"; font-weight: 600; font-display: swap; src: url("/fonts/lexend-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Lexend"; font-weight: 700; font-display: swap; src: url("/fonts/lexend-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Caveat"; font-weight: 600; font-display: swap; src: url("/fonts/caveat-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Caveat"; font-weight: 600; font-display: swap; src: url("/fonts/caveat-cyrillic-600-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }

:root {
    --cream: #FBF8EF;
    --card: #FFFDF7;
    --sage: #ECEEDD;
    --forest: #1F3B1F;
    --olive: #5B7A2B;
    --olive-dark: #4F6B34;
    --text: #23331F;
    --muted: #5E6A55;
    --line: #D8DCC6;
    --ground: #7D9358;
    --alt: #F3F2E4;
    --topbar: rgba(251, 248, 239, 0.92);
    --btn: #5B7A2B;
    --btn-hover: #4F6B34;
    --footer-text: #F4F3E6;
    --landscape: url("/img/landscape.svg");
    color-scheme: light;
}

/* Dark theme: follows the system unless the visitor picked a theme (data-theme on <html>) */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --cream: #151B13;
        --card: #1C2419;
        --sage: #27321F;
        --forest: #E2EAD2;
        --olive: #A9C66F;
        --olive-dark: #93B25A;
        --text: #D6DDCB;
        --muted: #9DA892;
        --line: #33402D;
        --ground: #22301A;
        --alt: #192116;
        --topbar: rgba(21, 27, 19, 0.9);
        --footer-text: #DCE3CF;
        --landscape: url("/img/landscape-night.svg");
        color-scheme: dark;
    }
}
:root[data-theme="dark"] {
    --cream: #151B13;
    --card: #1C2419;
    --sage: #27321F;
    --forest: #E2EAD2;
    --olive: #A9C66F;
    --olive-dark: #93B25A;
    --text: #D6DDCB;
    --muted: #9DA892;
    --line: #33402D;
    --ground: #22301A;
    --alt: #192116;
    --topbar: rgba(21, 27, 19, 0.9);
    --footer-text: #DCE3CF;
    --landscape: url("/img/landscape-night.svg");
    color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { background: var(--ground); }

body {
    font-family: "Lexend", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text);
    background: var(--cream);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: var(--olive); }

main { flex: 1 0 auto; width: 100%; }

/* Divider with heart, as under the flyer title */
.divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--olive);
    margin: 1.25rem auto;
    max-width: 620px;
}
.divider::before, .divider::after { content: ""; flex: 1; height: 2px; background: var(--olive); opacity: 0.55; }
.divider svg { width: 18px; height: 16px; fill: currentColor; flex: none; }

/* Landscape + footer at the bottom of every page */
.landscape {
    flex: none;
    margin-top: 2.5rem;
    height: clamp(170px, 24vw, 380px);
    background: var(--landscape) center bottom / cover no-repeat;
}

.site-footer {
    flex: none;
    background: var(--ground);
    color: var(--footer-text);
    padding: 1rem 1rem 1.5rem;
    text-align: center;
    font-size: 0.9rem;
}
.site-footer a { color: var(--footer-text); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer .copy { margin-top: 0.35rem; opacity: 0.8; font-size: 0.8rem; }

/* ---------- Language + theme controls ---------- */
.site-controls { display: inline-flex; align-items: center; gap: 0.4rem; flex: none; }
.lang-switch {
    display: inline-flex;
    padding: 2px;
    border: 1.5px solid var(--line);
    border-radius: 999px;
    background: var(--card);
}
.lang-switch button,
.theme-btn {
    font: inherit;
    cursor: pointer;
    color: var(--forest);
    background: none;
    border: 0;
}
.lang-switch button {
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.03em;
}
.lang-switch button:hover { background: var(--sage); }
.lang-switch button[aria-pressed="true"] { background: var(--btn); color: #fff; }
.theme-btn {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border: 1.5px solid var(--line);
    border-radius: 50%;
    background: var(--card);
}
.theme-btn:hover { background: var(--sage); }
.theme-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; display: none; }
.theme-btn[data-mode="auto"] .i-auto,
.theme-btn[data-mode="light"] .i-light,
.theme-btn[data-mode="dark"] .i-dark { display: block; }
.lang-switch button:focus-visible, .theme-btn:focus-visible { outline: 2px solid var(--olive); outline-offset: 2px; }

.page-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.lang-note {
    margin-top: 1rem;
    padding: 0.7rem 1rem;
    border-radius: 12px;
    background: var(--sage);
    color: var(--forest);
    font-size: 0.92rem;
}
.lang-note[hidden] { display: none; }

/* ---------- Text pages (legal, 404) ---------- */
.page {
    max-width: 760px;
    margin: 0 auto;
    padding: 2.5rem 16px 0;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--forest);
    font-weight: 700;
    font-size: 1.35rem;
    text-decoration: none;
    letter-spacing: -0.01em;
}
.brand img { width: 44px; height: 44px; border-radius: 12px; background: var(--sage); }

.page h1 {
    color: var(--forest);
    font-size: 2.1rem;
    font-weight: 700;
    line-height: 1.2;
    margin-top: 1.75rem;
    letter-spacing: -0.01em;
}

.meta { color: var(--muted); font-size: 0.9rem; margin-top: 0.4rem; }

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 2rem;
    margin-top: 1.5rem;
}

.legal-content { font-weight: 400; overflow-wrap: anywhere; }
.legal-content p { margin-bottom: 1rem; }
.legal-content h2 { color: var(--forest); margin: 2rem 0 0.75rem; font-size: 1.4rem; font-weight: 600; }
.legal-content h2:first-child { margin-top: 0; }
.legal-content h3 { color: var(--forest); margin: 1.5rem 0 0.6rem; font-size: 1.15rem; font-weight: 600; }
.legal-content ul, .legal-content ol { margin-bottom: 1rem; padding-left: 1.5rem; }
.legal-content li { margin-bottom: 0.5rem; }
.legal-content li::marker { color: var(--olive); }
.legal-content strong { font-weight: 600; }
.legal-content a { color: var(--olive); text-underline-offset: 2px; }
.legal-content table { border-collapse: collapse; width: 100%; margin-bottom: 1rem; font-size: 0.95rem; display: block; overflow-x: auto; }
.legal-content th, .legal-content td { border: 1px solid var(--line); padding: 0.5rem 0.75rem; text-align: left; vertical-align: top; }
.legal-content th { background: var(--sage); font-weight: 600; }
.legal-content hr { border: none; border-top: 1px solid var(--line); margin: 1.5rem 0; }

.back {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 1.5rem;
    color: var(--olive);
    font-weight: 600;
    text-decoration: none;
}
.back:hover { text-decoration: underline; }

.page-list { list-style: none; }
.page-list li + li { border-top: 1px solid var(--line); }
.page-list a {
    display: flex;
    justify-content: space-between;
    padding: 0.9rem 0;
    color: var(--forest);
    font-weight: 600;
    font-size: 1.1rem;
    text-decoration: none;
}
.page-list a::after { content: "→"; color: var(--olive); }
.page-list a:hover { color: var(--olive); }

@media (max-width: 480px) {
    .page h1 { font-size: 1.6rem; }
    .card { padding: 1.25rem; border-radius: 16px; }
    .legal-content { font-size: 0.95rem; }
}

/* Controls need JavaScript — hide them when it is unavailable */
html:not(.js) .site-controls { display: none; }
