/* Connecta marketing site.
 *
 * Design thesis: the product's one real difference is that a photo does not travel unless the
 * recipient has asked to receive it. So the page withholds too — the hero shows a sealed panel where
 * every other dating site shows a face. That is the signature element; everything around it stays
 * quiet.
 *
 * The palette tokens are injected at @THEME-TOKENS@ by tools/build_marketing.py. A manual theme
 * toggle needs each palette in two selectors (media query + [data-theme]), and hand-maintaining four
 * blocks of hex is how a light-mode-only colour drifts out of sync. The generator owns the values.
 *
 * Two type roles carry the split: the humanist sans speaks for people, the monospace speaks for the
 * system. Anything the platform asserts — consent states, remaining slots, tier limits — is set in
 * mono. Nothing else is.
 *
 * No web fonts, no external requests: keeps the pages render-blocking-free and keeps visitor IPs
 * out of a font CDN's logs.
 */

:root {
    color-scheme: light;

    --paper: #ffffff;
    --blush: #fff5f5;
    --raise: #f7f1f1;
    --ink: #211e1e;
    --ink-strong: #161213;
    --muted: #595959;
    --line: #cec8c8;
    --line-strong: #8c8c8c;
    --brand: #e11d48;
    --on-brand: #ffffff;
    --brand-wash: #ffe4e7;
    --brand-ink: #3a0d1b;
    --ember: #c15030;
    --seal: #2a2733;
    --seal-line: #4b465c;
    --seal-ink: #d5d0de;

    --radius: 14px;
    --radius-lg: 22px;
    --wrap: 1140px;
    --step: clamp(3.5rem, 7vw, 6rem);
    --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme]) {
        color-scheme: dark;

        --paper: #121212;
        --blush: #1e1e1e;
        --raise: #241f1f;
        --ink: #f5e7e9;
        --ink-strong: #ffffff;
        --muted: #b5adad;
        --line: #3a3535;
        --line-strong: #7e7a7a;
        --brand: #ff6b7a;
        --on-brand: #4e001f;
        --brand-wash: #7e0839;
        --brand-ink: #ffd9e5;
        --ember: #ffb399;
        --seal: #16141d;
        --seal-line: #56506e;
        --seal-ink: #c4bed1;
    }
}

:root[data-theme="light"] {
    color-scheme: light;

    --paper: #ffffff;
    --blush: #fff5f5;
    --raise: #f7f1f1;
    --ink: #211e1e;
    --ink-strong: #161213;
    --muted: #595959;
    --line: #cec8c8;
    --line-strong: #8c8c8c;
    --brand: #e11d48;
    --on-brand: #ffffff;
    --brand-wash: #ffe4e7;
    --brand-ink: #3a0d1b;
    --ember: #c15030;
    --seal: #2a2733;
    --seal-line: #4b465c;
    --seal-ink: #d5d0de;
}

:root[data-theme="dark"] {
    color-scheme: dark;

    --paper: #121212;
    --blush: #1e1e1e;
    --raise: #241f1f;
    --ink: #f5e7e9;
    --ink-strong: #ffffff;
    --muted: #b5adad;
    --line: #3a3535;
    --line-strong: #7e7a7a;
    --brand: #ff6b7a;
    --on-brand: #4e001f;
    --brand-wash: #7e0839;
    --brand-ink: #ffd9e5;
    --ember: #ffb399;
    --seal: #16141d;
    --seal-line: #56506e;
    --seal-ink: #c4bed1;
}

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

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

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 1.0625rem;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; height: auto; }

a { color: inherit; }

:focus-visible {
    outline: 3px solid var(--brand);
    outline-offset: 3px;
    border-radius: 4px;
}

.wrap {
    width: 100%;
    max-width: var(--wrap);
    margin-inline: auto;
    padding-inline: 1.25rem;
}

.skip {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--brand);
    color: var(--on-brand);
    padding: 0.75rem 1.25rem;
    z-index: 20;
    font-weight: 600;
}
.skip:focus { left: 0; }

/* ── Type ─────────────────────────────────────────────────────────────────── */

h1, h2, h3 {
    color: var(--ink-strong);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.05;
    margin: 0 0 0.6em;
    text-wrap: balance;
}

h1 { font-size: clamp(2.6rem, 7.5vw, 4.5rem); }
h2 { font-size: clamp(1.85rem, 4vw, 2.7rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.35rem); letter-spacing: -0.015em; }

p { margin: 0 0 1.15em; }
p:last-child { margin-bottom: 0; }

.lede {
    font-size: clamp(1.15rem, 2.2vw, 1.4rem);
    line-height: 1.5;
    color: var(--ink);
    max-width: 34ch;
}

.small { font-size: 0.9rem; color: var(--muted); }

/* Trailing spacing lives in classes, not style="" attributes: the marketing CSP is
 * `style-src 'self'` with no 'unsafe-inline', so an inline style is simply not applied. */
.note { margin-top: 1.5rem; }
.more { margin-top: 2rem; }

/* The mono voice: only for things the system states as fact. */
.kicker {
    font-family: var(--mono);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
    margin: 0 0 1rem;
}

/* ── Header ───────────────────────────────────────────────────────────────── */

.site-head {
    position: sticky;
    top: 0;
    z-index: 10;
    background: color-mix(in srgb, var(--paper) 88%, transparent);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}

.head-row {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    min-height: 68px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    font-size: 1.2rem;
    color: var(--ink-strong);
    text-decoration: none;
}

.nav {
    display: flex;
    gap: 1.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav a {
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--muted);
    padding-block: 0.35rem;
    border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--ink-strong); }
.nav a[aria-current="page"] { color: var(--ink-strong); border-bottom-color: var(--brand); }

.head-row nav { margin-left: auto; }
.head-row > .btn { flex-shrink: 0; }

/* ── Theme toggle ─────────────────────────────────────────────────────────── */

/* Hidden until theme.js confirms scripting: a button that cannot do anything is worse than no
 * button, and the page is fully readable on whichever theme the OS asked for. */
.theme-toggle { display: none; }

:root[data-js="on"] .theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    /* 44px is the minimum comfortable touch target. */
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1.5px solid var(--line);
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    transition: color 0.12s ease, border-color 0.12s ease;
}

.theme-toggle:hover { color: var(--ink-strong); border-color: var(--line-strong); }

/* One icon, two states: the sun shows on a light page (press for dark), the moon on a dark one. */
.theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .sun-core,
:root[data-theme="dark"] .theme-toggle .sun-rays { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: block; }

@media (prefers-color-scheme: dark) {
    :root:not([data-theme]) .theme-toggle .sun-core,
    :root:not([data-theme]) .theme-toggle .sun-rays { display: none; }
    :root:not([data-theme]) .theme-toggle .moon { display: block; }
}

@media (prefers-reduced-motion: reduce) {
    .theme-toggle { transition: none; }
}

@media (max-width: 860px) {
    .head-row nav { order: 3; width: 100%; margin-left: 0; }
    .head-row { flex-wrap: wrap; padding-block: 0.75rem; gap: 0.75rem 1rem; }
    .head-row > .btn { margin-left: auto; }
    /* Scroll the strip sideways rather than letting "Jak to funguje" break across two lines. */
    .nav { gap: 1.1rem; overflow-x: auto; padding-bottom: 0.25rem; scrollbar-width: none; }
    .nav::-webkit-scrollbar { display: none; }
    .nav li { flex: 0 0 auto; }
    .nav a { white-space: nowrap; }
}

/* ── Buttons ──────────────────────────────────────────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 48px;
    padding: 0.75rem 1.5rem;
    border-radius: 999px;
    border: 1.5px solid transparent;
    font: inherit;
    font-weight: 650;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.12s ease, background-color 0.12s ease, border-color 0.12s ease;
}

.btn-sm { min-height: 40px; padding: 0.4rem 1.05rem; font-size: 0.92rem; }

.btn-solid { background: var(--brand); color: var(--on-brand); }
.btn-solid:hover { transform: translateY(-1px); background: color-mix(in srgb, var(--brand) 88%, black); }

.btn-line { border-color: var(--line-strong); color: var(--ink-strong); background: transparent; }
.btn-line:hover { border-color: var(--brand); color: var(--brand); }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .btn, .card { transition: none; }
    .btn-solid:hover { transform: none; }
}

/* ── Sections ─────────────────────────────────────────────────────────────── */

.band { padding-block: var(--step); }
.band-tint { background: var(--blush); }
.band-tight { padding-block: calc(var(--step) * 0.62); }

.band > .wrap > h2 { max-width: 24ch; }

.section-intro { max-width: 58ch; color: var(--muted); font-size: 1.075rem; margin-bottom: 2.5rem; }

/* ── Hero ─────────────────────────────────────────────────────────────────── */

.hero { padding-block: clamp(3rem, 6vw, 5.5rem) var(--step); }

.hero-grid {
    display: grid;
    gap: clamp(2.5rem, 5vw, 4.5rem);
    align-items: center;
}

@media (min-width: 900px) {
    .hero-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); }
}

.hero h1 { margin-bottom: 0.35em; }
.hero .lede { color: var(--muted); margin-bottom: 2rem; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 2.25rem; }

/* ── Signature: the sealed panel ──────────────────────────────────────────── */

.thread {
    background: var(--raise);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 1.35rem;
    display: grid;
    gap: 0.85rem;
    box-shadow: 0 24px 60px -34px rgba(22, 18, 19, 0.55);
}

.msg {
    max-width: 82%;
    padding: 0.7rem 1rem;
    border-radius: var(--radius);
    background: var(--paper);
    border: 1px solid var(--line);
    font-size: 0.97rem;
}

.msg-mine {
    justify-self: end;
    background: var(--brand-wash);
    border-color: transparent;
    color: var(--brand-ink);
}

.seal {
    justify-self: end;
    width: min(320px, 100%);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--seal-line);
}

.seal-face {
    /* No photograph, no illustration of one: the panel is the absence, drawn. */
    aspect-ratio: 4 / 3;
    display: grid;
    place-content: center;
    gap: 0.5rem;
    text-align: center;
    padding: 1rem;
    background:
        repeating-linear-gradient(135deg,
            transparent 0 11px,
            color-mix(in srgb, var(--seal-line) 55%, transparent) 11px 12px),
        var(--seal);
}

.seal-face .kicker { color: var(--seal-ink); margin: 0; }
.seal-face p { color: var(--seal-ink); font-size: 0.9rem; margin: 0; max-width: 26ch; }

.seal-states {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    padding: 0.6rem 0.75rem;
    background: var(--seal);
    border-top: 1px solid var(--seal-line);
}

.state {
    font-family: var(--mono);
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--seal-ink);
    border: 1px solid var(--seal-line);
    border-radius: 999px;
    padding: 0.2rem 0.6rem;
}
.state-yes { color: #7ee0a8; border-color: #2f6b48; }   /* 8.9:1 on --seal */
.state-wait { color: #f0c56b; border-color: #6b5326; }  /* 9.6:1 on --seal */

/* ── Founding counter ─────────────────────────────────────────────────────── */

.counter {
    border-top: 1px solid var(--line);
    padding-top: 1.25rem;
    max-width: 34ch;
}

.counter-num {
    display: block;
    font-family: var(--mono);
    font-variant-numeric: tabular-nums;
    font-size: clamp(1.9rem, 3.4vw, 2.4rem);
    font-weight: 700;
    color: var(--brand);
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.counter-label { display: block; font-size: 0.95rem; color: var(--muted); }

/* ── Cards & grids ────────────────────────────────────────────────────────── */

.grid {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}

.card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 1.6rem;
}

.card h3 { margin-bottom: 0.5rem; }
.card p { color: var(--muted); font-size: 0.98rem; }
.card .kicker { color: var(--ember); }

.band-tint .card { background: var(--paper); }

/* ── Steps (a real sequence, so it is numbered) ───────────────────────────── */

.steps { counter-reset: step; display: grid; gap: 1.5rem; }

.step {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 1.1rem;
    align-items: start;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--line);
}
.step:last-child { border-bottom: 0; padding-bottom: 0; }

.step::before {
    counter-increment: step;
    content: counter(step, decimal-leading-zero);
    font-family: var(--mono);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--brand);
    padding-top: 0.3rem;
}

.step h3 { margin-bottom: 0.35rem; }
.step p { color: var(--muted); margin: 0; }

/* ── Comparison table ─────────────────────────────────────────────────────── */

.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-lg); }

table { border-collapse: collapse; width: 100%; min-width: 520px; font-size: 0.97rem; }

caption { text-align: left; padding: 1rem 1.25rem; color: var(--muted); font-size: 0.9rem; }

th, td { padding: 0.9rem 1.25rem; text-align: left; border-bottom: 1px solid var(--line); }
tbody tr:last-child td { border-bottom: 0; }

thead th {
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 600;
    background: var(--blush);
}

tbody th { font-weight: 600; color: var(--ink-strong); }

td.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* ── Pricing ──────────────────────────────────────────────────────────────── */

.tiers { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr)); }

.tier { display: flex; flex-direction: column; gap: 1rem; }

.tier-featured { border-color: var(--brand); border-width: 2px; }

/* Two classes deep on purpose: `.card p` (0,1,1) outranks a bare `.price` (0,1,0) no matter which
 * comes later in the file, and would silently shrink the price back to body size. */
.tier .price {
    font-family: var(--mono);
    font-variant-numeric: tabular-nums;
    font-size: 2.3rem;
    font-weight: 700;
    color: var(--ink-strong);
    letter-spacing: -0.03em;
    line-height: 1;
}
/* Scoped to .unit on purpose: a bare `.price span` also caught the number itself, which is wrapped
 * in a span so the live pricing fetch can swap it. */
.tier .price .unit {
    display: block;
    margin-top: 0.45rem;
    font-family: var(--sans);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--muted);
    letter-spacing: 0;
}

.tier ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; font-size: 0.96rem; }
.tier li { padding-left: 1.5rem; position: relative; color: var(--muted); }
.tier li::before { content: "✓"; position: absolute; left: 0; color: var(--brand); font-weight: 700; }
.tier li.no { color: var(--muted); }
.tier li.no::before { content: "—"; color: var(--line-strong); }
.tier .btn { margin-top: auto; }

/* ── FAQ ──────────────────────────────────────────────────────────────────── */

.faq { display: grid; gap: 0.75rem; max-width: 46rem; }

details {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--paper);
}

summary {
    cursor: pointer;
    padding: 1.1rem 1.35rem;
    font-weight: 650;
    color: var(--ink-strong);
    list-style: none;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-family: var(--mono); color: var(--brand); font-size: 1.2rem; }
details[open] summary::after { content: "−"; }

details > div { padding: 0 1.35rem 1.25rem; color: var(--muted); }

/* ── Prose (legal pages) ──────────────────────────────────────────────────── */

.prose { max-width: 42rem; }
.prose h2 { font-size: clamp(1.3rem, 2.5vw, 1.6rem); margin-top: 2.5rem; }
.prose h2:first-of-type { margin-top: 0; }
.prose ul { color: var(--muted); padding-left: 1.25rem; display: grid; gap: 0.4rem; }
.prose a { color: var(--brand); }
/* The founder's line on /pribeh/. Set apart from the paragraphs above it, because a signature that
   reads as one more sentence of body copy stops being a signature. */
.signature { margin-top: 2.25rem; font-weight: 600; }

/* ── Closing call to action ───────────────────────────────────────────────── */

.closer { text-align: center; }
.closer h2 { margin-inline: auto; max-width: 18ch; }
.closer .lede { margin-inline: auto; max-width: 46ch; color: var(--muted); }
.closer .hero-actions { justify-content: center; margin-top: 2rem; margin-bottom: 0; }

/* ── Footer ───────────────────────────────────────────────────────────────── */

.site-foot {
    border-top: 1px solid var(--line);
    padding-block: var(--step) 2.5rem;
    background: var(--blush);
}

.foot-grid {
    display: grid;
    gap: 2.5rem;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
    margin-bottom: 3rem;
}

.foot-brand p { max-width: 30ch; margin-top: 1rem; }

.site-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.site-foot a { color: var(--muted); text-decoration: none; font-size: 0.94rem; }
.site-foot a:hover { color: var(--ink-strong); text-decoration: underline; }

.foot-legal { border-top: 1px solid var(--line); padding-top: 1.5rem; margin: 0; }
.foot-legal a { color: var(--muted); }

/* ── Theme-paired images ──────────────────────────────────────────────────
   Same four-selector shape as the colour tokens, and for the same reason: with a bare
   prefers-color-scheme query a visitor on a dark OS who picks light would keep the dark
   artwork — a light logo on a light header. `:not([data-theme])` lets the explicit choice
   win in both directions.
   Every selector here carries two classes so it outranks `.screen img { display: block }`
   below — a bare `.shot-dark` loses to it on specificity and both copies paint at once. */
.screen .shot-dark, .brand .logo-dark { display: none; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme]) .screen .shot-light,
    :root:not([data-theme]) .brand .logo-light { display: none; }
    :root:not([data-theme]) .screen .shot-dark,
    :root:not([data-theme]) .brand .logo-dark { display: block; }
}
:root[data-theme="light"] .screen .shot-light,
:root[data-theme="light"] .brand .logo-light { display: block; }
:root[data-theme="light"] .screen .shot-dark,
:root[data-theme="light"] .brand .logo-dark { display: none; }
:root[data-theme="dark"] .screen .shot-light,
:root[data-theme="dark"] .brand .logo-light { display: none; }
:root[data-theme="dark"] .screen .shot-dark,
:root[data-theme="dark"] .brand .logo-dark { display: block; }

/* ── App screenshots ──────────────────────────────────────────────────── */
.screens {
    display: grid;
    gap: 2rem 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
    margin-top: 2.75rem;
}

.screen { margin: 0; }

.screen img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--paper);
}

.screen figcaption { margin-top: 0.9rem; font-size: 0.94rem; color: var(--muted); }
.screen figcaption b { display: block; color: var(--ink-strong); font-weight: 650; margin-bottom: 0.2rem; }

/* Says out loud that the people on these screens are test accounts. The site's whole claim is
   that it does not invent users, so unlabelled demo profiles would undercut it. */
.screens-note { margin-top: 2rem; font-size: 0.9rem; color: var(--muted); }
