/* so-where.app — the app's look (DECISIONS.md T15), the same tokens as ios/Shared/Theme/Theme.swift and
   ios/Shared/Resources/Colors.xcassets (the app moves to palette A after the web). No fonts, no scripts, no images
   beyond our own. Every page shares this one file. */

/* Palette A „Slunce na terakotě" (DECISIONS.md T15 addendum, docs/brand-warm-2026-10-18.md): terracotta,
   sun and sand, the sea as the only cool accent. Text on a tint uses the darker *-ink variant so every
   text pair stays at 4.5:1 or above (contrast in the doc and in docs/NIGHT.md). */
:root {
    color-scheme: light dark;
    --sand: #FFF4E4;
    --card: #FFFFFF;
    --ink: #3A2216;
    --ink-muted: #7A5B4A;
    --brand: #BE4A25;
    --brand-ink: #A33E1D;
    --on-brand: #FFFFFF;
    --sun: #FFBC3A;
    --on-sun: #3A2216;
    --sun-ink: #80530A;
    /* The text-safe sea: the doc's #2D86C9 is a fill accent and only 3.9:1 on white. */
    --sea: #1A6CA5;
    --on-sea: #FFFFFF;
    --line: #F1E2CD;
    --brand-soft: #FBE3D6;
    --sun-soft: #FFF0D4;
    --sea-soft: #DCEBF7;
    --shadow: 0 8px 24px rgba(58, 34, 22, 0.08);
    --mark-shadow: rgba(190, 74, 37, 0.28);
    --phone-shadow: rgba(58, 34, 22, 0.20);
    --frame: #3A2216;

    --radius-card: 22px;
    --radius-button: 16px;
    --radius-pill: 999px;
    --page: 16px;
    --max: 960px;
    --spring: cubic-bezier(0.34, 1.4, 0.64, 1);

    --font-body: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-round: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Dark is a warm brown, never green-black. */
@media (prefers-color-scheme: dark) {
    :root {
        --sand: #21160F;
        --card: #2F2119;
        --ink: #FCEBD8;
        --ink-muted: #C9AE9C;
        --brand: #FF8A5C;
        --brand-ink: #FF8A5C;
        --on-brand: #2A140A;
        --sun: #FFC857;
        --on-sun: #3A2216;
        --sun-ink: #FFC857;
        --sea: #6FB7EE;
        --on-sea: #12202B;
        --line: #433024;
        --brand-soft: #4A2A1C;
        --sun-soft: #503C23;
        --sea-soft: #1D3344;
        --shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
        --mark-shadow: rgba(0, 0, 0, 0.35);
        --phone-shadow: rgba(0, 0, 0, 0.45);
        --frame: #140D09;
    }
}

/* ---------- Base ---------- */

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--sand);
    color: var(--ink);
    font: 17px/1.55 var(--font-body);
    overflow-wrap: break-word;
}

h1, h2, h3, .brand-name, .hero-sub, .pill, .button, .step-number, .bubble {
    font-family: var(--font-round);
}

h1, h2, h3 { line-height: 1.15; margin: 0 0 12px; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.2rem, 7vw, 3.6rem); font-weight: 800; }
h2 { font-size: 1.55rem; font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 14px; }

a { color: var(--brand); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; border-radius: 6px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--page); }
.muted { color: var(--ink-muted); }
/* Text for screen readers only: the landing header shows just the mark, the name stays readable. */
.visually-hidden {
    position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
    clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip {
    position: absolute; left: -9999px; top: 8px;
    background: var(--card); color: var(--ink); padding: 10px 14px; border-radius: var(--radius-button);
}
.skip:focus { left: 8px; z-index: 10; }

/* ---------- Header and footer ---------- */

.site-header .wrap {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding-top: 16px; padding-bottom: 16px;
}

.brand {
    display: inline-flex; align-items: center; gap: 10px; min-height: 44px;
    color: var(--ink); text-decoration: none;
}
.brand svg { width: 40px; height: 40px; flex: none; filter: drop-shadow(0 4px 8px var(--mark-shadow)); }
.brand-name { font-size: 1.35rem; font-weight: 800; letter-spacing: -0.01em; white-space: nowrap; }

.lang { display: inline-flex; gap: 4px; padding: 4px; background: var(--card); border-radius: var(--radius-pill); box-shadow: var(--shadow); }
.lang a {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 44px; min-height: 36px; padding: 0 10px;
    border-radius: var(--radius-pill); color: var(--ink-muted);
    font: 700 0.85rem/1 var(--font-round); text-decoration: none; letter-spacing: 0.04em;
}
.lang a[aria-current="page"] { background: var(--brand); color: var(--on-brand); }

.site-footer { margin-top: 56px; padding: 28px 0 40px; border-top: 1px solid var(--line); color: var(--ink-muted); font-size: 0.95rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.site-footer p { margin: 0; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.site-footer nav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); font-weight: 600; }

/* ---------- Pills and buttons ---------- */

.pill {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 14px; border-radius: var(--radius-pill);
    font-size: 0.9rem; font-weight: 700; line-height: 1.3;
}
.pill-brand { background: var(--brand-soft); color: var(--brand-ink); }
.pill-sun { background: var(--sun-soft); color: var(--sun-ink); }
.pill-sea { background: var(--sea-soft); color: var(--sea); }

.button {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    min-height: 52px; padding: 12px 22px; border-radius: var(--radius-button);
    background: var(--brand); color: var(--on-brand);
    font-size: 1.05rem; font-weight: 700; text-decoration: none; text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.35s var(--spring);
}
.button:hover { transform: translateY(-2px); }
.button:active { transform: scale(0.97); }
.button.secondary { background: var(--card); color: var(--brand); box-shadow: inset 0 0 0 2px var(--brand); }
/* The App Store placeholder: a link to "#" until the app is published, so it does not invite a tap. */
.button.soon {
    cursor: default;
    border-radius: var(--radius-pill); background: var(--card); color: var(--ink);
    box-shadow: inset 0 0 0 2px var(--line), var(--shadow);
}
.button.soon svg { width: 22px; height: 22px; flex: none; }
.button.soon:hover { transform: none; }

/* ---------- Hero ---------- */

.hero { display: grid; gap: 40px; padding-top: 20px; align-items: center; }
/* The name is the question (T19); the line under it answers who decides. */
.hero-sub { margin: -4px 0 18px; font-size: clamp(1.3rem, 4vw, 1.7rem); font-weight: 800; line-height: 1.2; color: var(--brand); }
.hero-copy .lead { font-size: 1.15rem; color: var(--ink-muted); max-width: 34rem; }
.hero-copy .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }

/* The app's action banner: a sun speech bubble with a tail. */
.bubble {
    position: relative; display: inline-block;
    margin: 4px 0 26px; padding: 12px 22px;
    background: var(--sun); color: var(--on-sun);
    border-radius: var(--radius-card);
    font-size: 1.3rem; font-weight: 800;
    box-shadow: var(--shadow);
    transform: rotate(-2deg);
}
.bubble::after {
    content: ""; position: absolute; left: 26px; bottom: -11px;
    width: 26px; height: 16px; background: var(--sun);
    clip-path: polygon(0 0, 100% 0, 10% 100%);
}

/* ---------- Phones ---------- */

.phones { display: flex; justify-content: center; align-items: flex-start; gap: 24px; }

.phone {
    margin: 0; padding: 10px; width: min(290px, 78vw);
    background: var(--frame); border-radius: 46px;
    box-shadow: 0 24px 48px var(--phone-shadow), inset 0 0 0 2px rgba(255, 255, 255, 0.08);
}
.phone picture, .phone img { display: block; width: 100%; height: auto; border-radius: 36px; }
.phone img { aspect-ratio: 414 / 900; background: var(--sand); }
.phone-main { transform: rotate(-3deg); }
.phone-side { display: none; transform: rotate(4deg) translateY(48px); }

/* ---------- Steps ---------- */

.section { margin-top: 64px; }
.section-head { margin-bottom: 20px; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }

.card {
    background: var(--card); border-radius: var(--radius-card); padding: 22px;
    box-shadow: var(--shadow);
}
.step { position: relative; transition: transform 0.35s var(--spring); }
.step:hover { transform: translateY(-4px) rotate(-0.5deg); }
.step p { color: var(--ink-muted); }
.step p:last-child { margin-bottom: 0; }
.step .chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 14px; }

.step-number {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; margin-bottom: 14px;
    border-radius: var(--radius-pill); background: var(--brand); color: var(--on-brand);
    font-size: 1.25rem; font-weight: 800;
}
.step:nth-child(2) .step-number { background: var(--sea); color: var(--on-sea); }
.step:nth-child(3) .step-number { background: var(--sun); color: var(--on-sun); }

/* ---------- Text pages (privacy, support) ---------- */

/* Text pages keep the header's left edge; the measure stays readable. */
.doc > * { max-width: 720px; }
.doc h1 { font-size: clamp(2rem, 6vw, 2.8rem); }
.doc h2 { margin-top: 36px; font-size: 1.3rem; }
.doc .card { margin: 20px 0; }
.doc .card > :first-child { margin-top: 0; }
.doc .card > :last-child { margin-bottom: 0; }
.doc ul { margin: 0 0 14px; padding-left: 1.25em; }
.doc li { margin-bottom: 6px; }
.doc .updated { color: var(--ink-muted); }

.faq { display: grid; gap: 12px; margin-top: 16px; }
.faq details { background: var(--card); border-radius: var(--radius-card); box-shadow: var(--shadow); }
.faq summary {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    min-height: 56px; padding: 14px 22px; cursor: pointer; list-style: none;
    font: 700 1.05rem/1.3 var(--font-round);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
    content: "+"; flex: none; display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border-radius: var(--radius-pill);
    background: var(--brand-soft); color: var(--brand-ink); font-size: 1.3rem;
    transition: transform 0.35s var(--spring);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding: 0 22px 18px; color: var(--ink-muted); }
.faq details > div p:last-child { margin-bottom: 0; }

.mail { font-weight: 700; font-size: 1.15rem; }

/* ---------- Hand-off pages (/join, /open) ---------- */

.handoff { max-width: 520px; margin-top: 24px; }
.handoff .card > :last-child { margin-bottom: 0; }
.handoff p[lang="cs"] { color: var(--ink-muted); }
.handoff .actions { display: flex; flex-direction: column; gap: 12px; margin: 18px 0; }
.handoff .actions .button { width: 100%; }

/* ---------- Wider screens ---------- */

@media (min-width: 760px) {
    :root { --page: 24px; }
    .steps { grid-template-columns: repeat(3, 1fr); }
    .hero { grid-template-columns: 1.05fr 1fr; padding-top: 40px; }
    .phone { width: 250px; }
}

@media (min-width: 900px) {
    .phone-side { display: block; }
    .phones { justify-content: flex-start; }
    .phone { width: 230px; }
}

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: no-preference) {
    .bubble { animation: breathe 3.2s ease-in-out infinite; }
    @keyframes breathe {
        0%, 100% { transform: rotate(-2deg) scale(1); }
        50% { transform: rotate(-2deg) scale(1.03); }
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .step:hover, .button:hover { transform: none; }
}
