/* vacall.app — the app's look (DECISIONS.md T15), built from the same tokens as
   ios/Shared/Theme/Theme.swift and ios/Shared/Resources/Colors.xcassets. No fonts, no scripts, no images
   beyond our own. Every page shares this one file. */

:root {
    color-scheme: light dark;
    --sand: #FBF6EE;
    --card: #FFFFFF;
    --ink: #1E2A28;
    --ink-muted: #5E6B68;
    --brand: #0E6B6B;
    --on-brand: #FFFFFF;
    --sun: #F7B544;
    --on-sun: #1E2A28;
    --sun-ink: #8A5A00;
    --coral: #FF6B6B;
    --coral-ink: #B33636;
    --on-coral: #1E2A28;
    --line: #E8E0D2;
    --brand-soft: rgba(14, 107, 107, 0.10);
    --sun-soft: rgba(247, 181, 68, 0.22);
    --coral-soft: rgba(255, 107, 107, 0.16);
    --shadow: 0 8px 24px rgba(30, 42, 40, 0.08);
    --frame: #1E2A28;

    --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;
}

@media (prefers-color-scheme: dark) {
    :root {
        --sand: #121715;
        --card: #1C2420;
        --ink: #F1EEE6;
        --ink-muted: #A9B2AE;
        --brand: #4FC2B4;
        --on-brand: #0D1F1C;
        --sun: #FFC766;
        --on-sun: #1E2A28;
        --sun-ink: #FFC766;
        --coral: #FF7F7F;
        --coral-ink: #FF8F8F;
        --line: #2C3632;
        --brand-soft: rgba(79, 194, 180, 0.14);
        --sun-soft: rgba(255, 199, 102, 0.16);
        --coral-soft: rgba(255, 127, 127, 0.16);
        --shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
        --frame: #0A0D0C;
    }
}

/* ---------- 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, .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); }
.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 rgba(14, 107, 107, 0.25)); }
.brand-name { font-size: 1.35rem; font-weight: 800; letter-spacing: -0.01em; }

.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); }
.pill-sun { background: var(--sun-soft); color: var(--sun-ink); }
.pill-coral { background: var(--coral-soft); color: var(--coral-ink); }

.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; }
.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 rgba(30, 42, 40, 0.18), 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(--coral); color: var(--on-coral); }
.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); 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; }
}
