/* Inarvi site. Monochrome tokens mirror the app theme
   (client/app/composeApp/.../ui/theme/Theme.kt). No external fonts or assets. */

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

:root {
    color-scheme: light dark;
    --bg: #f3f3f1;
    --surface: #ffffff;
    --surface-2: #ededea;
    --ink: #151514;
    --muted: #5e5e5a;
    --line: #e0e0dc;
    --line-strong: #c9c9c4;
    --accent: #1b1b1a;
    --on-accent: #ffffff;
    --ok: #2f7a4e;
    --shadow: 0 1px 2px rgba(20, 20, 19, .04), 0 12px 32px rgba(20, 20, 19, .06);
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0b0b0b;
        --surface: #151515;
        --surface-2: #1f1f1e;
        --ink: #f1f1ee;
        --muted: #a2a29e;
        --line: #2a2a29;
        --line-strong: #3a3a38;
        --accent: #f1f1ee;
        --on-accent: #111110;
        --ok: #5fc48a;
        --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 16px 40px rgba(0, 0, 0, .35);
    }
}

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

body {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--bg);
    color: var(--ink);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.6;
    font-size: 16px;
    overflow-x: hidden;
}

a { color: var(--ink); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
img { max-width: 100%; display: block; }

.card {
    background: var(--surface);
    border: 1px solid var(--line);
}

/* ---------- Header ---------- */
.site-header {
    position: sticky; top: 0; z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px 20px;
    padding: 14px max(16px, calc((100% - 1080px) / 2));
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    -webkit-backdrop-filter: blur(18px) saturate(1.4);
    backdrop-filter: blur(18px) saturate(1.4);
    border-bottom: 1px solid var(--line);
}
.brand {
    display: flex; align-items: center; gap: 9px;
    font-weight: 650; font-size: 17px; letter-spacing: -.01em;
    color: var(--ink); text-decoration: none;
}
.brand img { width: 26px; height: 26px; }
.nav { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 14px; }
.nav a { color: var(--muted); text-decoration: none; padding: 2px 0; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }

@media (max-width: 640px) {
    .site-header { position: static; }
    .nav { width: 100%; gap: 2px 14px; font-size: 13.5px; }
}

/* ---------- Typography ---------- */
.container {
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
    padding: 48px 16px 56px;
    flex: 1;
}
h1 {
    font-size: clamp(34px, 7vw, 52px);
    font-weight: 300;
    letter-spacing: -.035em;
    line-height: 1.08;
    margin-bottom: 16px;
}
h2 {
    font-size: clamp(24px, 4.4vw, 30px);
    font-weight: 300;
    letter-spacing: -.025em;
    line-height: 1.2;
    margin: 40px 0 14px;
}
h3 { font-size: 17px; font-weight: 600; margin: 24px 0 8px; letter-spacing: -.01em; }
p { color: var(--muted); margin-bottom: 14px; }
strong { color: var(--ink); font-weight: 600; }
.lead { font-size: 18px; line-height: 1.55; max-width: 480px; margin: 0 0 28px; }
ul, ol { color: var(--muted); margin: 0 0 16px 22px; }
li { margin-bottom: 8px; padding-left: 2px; }
li::marker { color: var(--ink); }
.muted { color: var(--muted); font-size: 13.5px; }
.center { text-align: center; }
.eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 13px; font-weight: 600; color: var(--muted);
    padding: 6px 12px; border-radius: 999px; margin-bottom: 20px;
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    background: var(--accent); color: var(--on-accent);
    text-decoration: none;
    padding: 14px 24px; border-radius: 999px;
    font-size: 16px; font-weight: 600;
    border: 1px solid transparent;
    transition: transform .15s, box-shadow .2s, background .2s;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); text-decoration: none; }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn.secondary { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn.secondary:hover { background: var(--surface-2); }
.download-buttons { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
@media (max-width: 480px) {
    .download-buttons .btn { width: 100%; }
}

/* ---------- Hero ---------- */
main { width: 100%; overflow-x: clip; flex: 1; }
.hero {
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    padding: 56px 16px 40px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
    align-items: center;
}
.hero-copy .muted { margin-top: 16px; }
@media (min-width: 900px) {
    .hero { grid-template-columns: 1.1fr .9fr; padding-top: 80px; padding-bottom: 72px; }
}

/* Simple centered hero (paid, 404) */
.hero.simple { display: block; text-align: center; max-width: 620px; padding: 72px 16px; }
.hero.simple .lead { margin-left: auto; margin-right: auto; }
.hero .logo {
    width: 72px; height: 72px; border-radius: 22px;
    display: inline-flex; align-items: center; justify-content: center;
    margin-bottom: 24px;
    background: var(--surface); border: 1px solid var(--line);
}
.hero .logo svg { width: 36px; height: 36px; }
.hero .logo.ok { background: var(--ok); border-color: transparent; color: #fff; }

/* ---------- Phone mockup (CSS-built, mirrors the app home screen) ---------- */
.mock-wrap { display: flex; justify-content: center; }
.phone {
    width: min(290px, 80vw);
    aspect-ratio: 9 / 18.5;
    border-radius: 42px;
    background: var(--bg);
    border: 1px solid var(--line-strong);
    box-shadow: var(--shadow), 0 0 0 8px var(--surface), 0 0 0 9px var(--line);
    overflow: hidden;
    display: flex; flex-direction: column;
    color: var(--ink);
}
.phone .p-status { display: flex; justify-content: space-between; padding: 14px 24px 0; font-size: 11.5px; font-weight: 600; opacity: .7; }
.phone .p-top { display: flex; align-items: center; gap: 8px; padding: 16px 20px 0; font-weight: 650; font-size: 15px; }
.phone .p-top img { width: 22px; height: 22px; border-radius: 6px; }
.phone .p-body {
    flex: 1;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 18px; padding: 0 18px;
}
.phone .p-state { text-align: center; }
.phone .p-big { font-size: 26px; font-weight: 300; letter-spacing: -.03em; line-height: 1.15; }
.phone .p-small { color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.phone .p-power {
    width: 112px; height: 112px; border-radius: 50%;
    display: grid; place-items: center; cursor: pointer;
    background: var(--surface); color: var(--muted);
    border: 1px solid var(--line-strong);
    transition: background .3s, color .3s, box-shadow .3s;
}
.phone .p-power svg { width: 38px; height: 38px; }
.phone.on .p-power { background: var(--accent); color: var(--on-accent); border-color: transparent; box-shadow: 0 0 0 10px var(--surface-2); }
.phone .p-row {
    width: 100%; display: flex; align-items: center; justify-content: space-between;
    padding: 10px 14px; border-radius: 16px; font-size: 12.5px;
}
.phone .p-row span:last-child { color: var(--muted); }
.phone .p-change { font-size: 12.5px; font-weight: 600; padding: 8px 16px; border-radius: 999px; }
.phone .p-tabs {
    display: grid; grid-template-columns: repeat(4, 1fr);
    border-top: 1px solid var(--line); padding: 10px 6px 16px;
    font-size: 10px; color: var(--muted); text-align: center;
}
.phone .p-tabs span:first-child { color: var(--ink); font-weight: 650; }

/* ---------- Sections ---------- */
.section { width: 100%; max-width: 1080px; margin: 0 auto; padding: 40px 16px; }
.section-head { max-width: 640px; margin-bottom: 28px; }
.section-head h2 { margin-top: 0; }
.section-head p { margin-bottom: 0; }

/* Features */
.features { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 560px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .features { grid-template-columns: repeat(3, 1fr); } }
.feature { border-radius: 22px; padding: 22px 22px 20px; }
.feature-icon {
    width: 40px; height: 40px; border-radius: 12px;
    display: grid; place-items: center;
    background: var(--surface-2);
    color: var(--ink);
    margin-bottom: 14px;
}
.feature-icon svg { width: 20px; height: 20px; }
.feature-title { font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.feature-desc { font-size: 14.5px; color: var(--muted); margin-top: 4px; line-height: 1.5; }
@media (max-width: 559px) {
    .feature { display: grid; grid-template-columns: 40px 1fr; column-gap: 14px; padding: 18px; border-radius: 20px; }
    .feature-icon { grid-row: span 2; margin-bottom: 0; }
}

/* Downloads */
.platforms { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 720px) { .platforms { grid-template-columns: repeat(3, 1fr); } }
.platform { border-radius: 22px; padding: 22px; display: flex; flex-direction: column; gap: 8px; }
.platform.me { border-color: var(--accent); box-shadow: var(--shadow); }
.platform h3 { margin: 0; font-size: 20px; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.platform h3 svg { width: 22px; height: 22px; }
.platform .req { margin: 0 0 8px; font-size: 14px; }
.platform .btn { margin-top: auto; width: 100%; }
.platform .tag { display: none; font-size: 12px; font-weight: 650; color: var(--ok); }
.platform.me .tag { display: inline; }
.platform.soon { border-style: dashed; }
.platform.soon .btn { pointer-events: none; opacity: .55; }

/* Steps */
.steps { list-style: none; margin: 0; display: grid; gap: 12px; grid-template-columns: 1fr; counter-reset: step; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li {
    counter-increment: step;
    border-radius: 22px; padding: 20px 22px; margin: 0;
    color: var(--muted);
}
.steps li::before {
    content: counter(step);
    display: block;
    font-size: 34px; font-weight: 300; letter-spacing: -.03em; line-height: 1;
    color: var(--ink); margin-bottom: 10px;
}

/* Collapsible blocks: FAQ and install instructions */
.info details {
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface);
    margin-bottom: 10px;
}
.info summary {
    cursor: pointer; font-weight: 600; color: var(--ink);
    padding: 16px 48px 16px 20px; position: relative; list-style: none;
}
.info summary::-webkit-details-marker { display: none; }
.info summary::after {
    content: ""; position: absolute; right: 22px; top: 50%;
    width: 8px; height: 8px; margin-top: -6px;
    border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted);
    transform: rotate(45deg); transition: transform .2s;
}
.info details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.info details > p { margin: 0; padding: 0 20px 18px; }
.info details > ol { margin: 0 20px 0 42px; padding-bottom: 14px; }
.info { max-width: 820px; }

.cta { text-align: center; border-radius: 28px; padding: 40px 20px; }
.cta h2 { margin-top: 0; }
.cta .download-buttons { justify-content: center; }

/* ---------- Tariffs ---------- */
.trial { border-radius: 22px; padding: 20px 22px; margin: 24px 0 0; text-align: center; }
.trial strong { font-size: 18px; }
.trial p { margin: 4px 0 0; }
.plans { display: grid; grid-template-columns: 1fr; gap: 12px; margin: 28px 0 32px; }
@media (min-width: 640px) { .plans { grid-template-columns: repeat(3, 1fr); } }
.plan {
    position: relative;
    border-radius: 24px;
    padding: 26px 20px 22px;
    text-align: center;
}
.plan.popular { border-color: var(--accent); box-shadow: var(--shadow); }
.plan .period { font-size: 15px; color: var(--muted); }
.plan .price { font-size: 40px; font-weight: 300; letter-spacing: -.03em; margin: 6px 0 2px; line-height: 1.2; }
.plan .permonth { font-size: 13.5px; color: var(--muted); }
.badge {
    position: absolute; top: -11px; left: 50%; transform: translateX(-50%);
    font-size: 11.5px; font-weight: 650;
    color: var(--on-accent); background: var(--accent);
    border-radius: 999px; padding: 3px 12px;
    white-space: nowrap;
}

/* Payment methods */
.pay-methods { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 16px 0; }
.pay-badge {
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    padding: 5px 12px;
    font-size: 13px; font-weight: 600;
    color: var(--muted);
    background: var(--surface);
}

/* ---------- Footer ---------- */
.site-footer {
    border-top: 1px solid var(--line);
    padding: 32px 16px 40px;
    font-size: 13.5px;
    color: var(--muted);
    margin-top: 24px;
}
.site-footer .footer-inner { max-width: 1080px; margin: 0 auto; }
.site-footer .footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 12px; }
.site-footer .footer-links a { color: var(--muted); text-decoration: none; }
.site-footer .footer-links a:hover { color: var(--ink); }
.site-footer p { font-size: 13.5px; margin: 0; }

/* Legal pages: long numbered paragraphs read better a touch tighter */
.container > p { line-height: 1.65; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; }
}
