/* Ostia website. No external fonts, scripts or requests: the site practises what the app promises. */

:root {
  --bg: #f8f7f3;
  --surface: #ffffff;
  --surface-2: #f0efea;
  --text: #20211f;
  --muted: #5f605b;
  --accent: #87977f;
  --accent-deep: #4f6149;
  --accent-soft: #e8ede5;
  --on-accent: #1b2418;
  --line: #e4e3dc;
  --night: #0f100e;
  --night-surface: #1d1f1c;
  --shadow: 0 1px 2px rgba(32, 33, 31, .06), 0 12px 32px rgba(32, 33, 31, .08);
  --radius: 20px;
  --max: 1080px;
  --font: system-ui, -apple-system, "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #151614;
    --surface: #1d1f1c;
    --surface-2: #252722;
    --text: #f1f1eb;
    --muted: #a5a79f;
    --accent: #a5b59c;
    --accent-deep: #a5b59c;
    --accent-soft: #303a2d;
    --on-accent: #1b2418;
    --line: #343630;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px rgba(0, 0, 0, .35);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 17px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-deep); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 10px 14px; border-radius: 10px; z-index: 10; }
.skip:focus { left: 8px; }

.wrap { width: min(100% - 40px, var(--max)); margin-inline: auto; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); font-weight: 600; letter-spacing: .18em; font-size: 15px; }
.brand img { width: 34px; height: 34px; border-radius: 9px; display: block; }
nav ul { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; align-items: center; }
nav a { text-decoration: none; color: var(--muted); font-size: 15px; padding: 10px 12px; border-radius: 10px; }
nav a:hover { color: var(--text); background: var(--surface-2); }
nav a.cta { color: var(--on-accent); background: var(--accent); font-weight: 600; }
nav a.cta:hover { background: var(--accent); filter: brightness(1.05); }
@media (max-width: 760px) { nav li:not(:last-child) { display: none; } }

/* ---------- hero ---------- */
.hero { padding: 72px 0 40px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; }
.eyebrow { display: inline-block; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-deep); font-weight: 600; margin-bottom: 18px; }
h1 { font-size: clamp(38px, 6vw, 64px); line-height: 1.05; letter-spacing: -.025em; font-weight: 500; margin: 0 0 22px; }
.lead { font-size: clamp(18px, 2.2vw, 21px); color: var(--muted); max-width: 33em; margin: 0 0 30px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 15px 24px; border-radius: 16px; font-weight: 600; font-size: 16px; text-decoration: none; border: 1px solid transparent; }
.btn.primary { background: var(--accent); color: var(--on-accent); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.ghost { border-color: var(--line); color: var(--text); background: var(--surface); }
.btn.ghost:hover { background: var(--surface-2); }
.fine { font-size: 14px; color: var(--muted); margin-top: 18px; }

@media (max-width: 860px) {
  .hero { padding-top: 40px; }
  .hero-grid { grid-template-columns: 1fr; }
}

/* ---------- phone mockups (pure HTML/CSS replicas of the app) ---------- */
.phones { position: relative; height: 560px; }
.phone {
  position: absolute; width: 236px; aspect-ratio: 9 / 19; border-radius: 38px; padding: 9px;
  background: #0b0b0a; box-shadow: var(--shadow), 0 30px 60px rgba(0, 0, 0, .25);
}
.phone.a { left: 0; top: 44px; transform: rotate(-3deg); }
.phone.b { right: 0; top: 0; transform: rotate(3deg); }
.screen { container-type: inline-size; height: 100%; border-radius: 30px; overflow: hidden; position: relative; display: flex; flex-direction: column; }
.screen.day { background: #151614; color: #f1f1eb; }
.screen.ring { background: #0f100e; color: #f1f1eb; align-items: center; text-align: center; }
.screen .pad { padding: 11cqw 8cqw 0; }
.lbl { font-size: 4.6cqw; color: #a5a79f; font-weight: 500; }
.big { font-size: 22cqw; line-height: 1; letter-spacing: -.04em; font-weight: 300; margin: 2cqw 0; white-space: nowrap; }
.sub { font-size: 5cqw; color: #a5a79f; }
.sub b { color: #a5b59c; font-weight: 500; }
.row { display: flex; align-items: center; justify-content: space-between; padding: 5cqw 8cqw; border-top: 1px solid #343630; }
.row .t { font-size: 12cqw; font-weight: 300; letter-spacing: -.03em; line-height: 1.05; }
.row small { display: block; font-size: 4.2cqw; color: #a5a79f; }
.row small.q { color: #a5b59c; margin-top: .8cqw; }
.sw { width: 15cqw; height: 8.6cqw; border-radius: 9cqw; background: #a5b59c; position: relative; flex: none; }
.sw::after { content: ""; position: absolute; right: 1.2cqw; top: 1.2cqw; width: 6.2cqw; height: 6.2cqw; border-radius: 50%; background: #1b2418; }
.sw.off { background: #2d2f2a; border: 1px solid #343630; }
.sw.off::after { right: auto; left: 1.2cqw; background: #5f615a; }
.row.dim .t, .row.dim small { opacity: .45; }
.fab { position: absolute; right: 6cqw; bottom: 7cqw; background: #a5b59c; color: #1b2418; font-size: 4.8cqw; font-weight: 600; padding: 4cqw 6cqw; border-radius: 4.5cqw; }
.tabs { display: none; position: absolute; left: 0; right: 0; bottom: 0; height: 15cqw; border-top: 1px solid #343630; justify-content: space-around; align-items: center; background: #151614; }
.tabs span { display: flex; flex-direction: column; align-items: center; gap: .8cqw; color: #8a8c84; }
.tabs svg { width: 6cqw; height: 6cqw; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tabs b { font-size: 2.6cqw; font-weight: 500; }
.tabs span.on { color: #a5b59c; }
.ring .top { margin-top: 18cqw; }
.ring .big { font-size: 25cqw; margin: 3cqw 0 0; }
.ring .card { margin: auto 6cqw 4cqw; align-self: stretch; background: #1d1f1c; border-radius: 6cqw; padding: 5cqw 4cqw; }
.ring .card .l { font-size: 4.4cqw; color: #a5a79f; }
.ring .card .v { font-size: 9cqw; font-weight: 500; color: #a5b59c; }
.ring .go { margin: 0 6cqw 3cqw; align-self: stretch; background: #a5b59c; color: #1b2418; border-radius: 6cqw; padding: 5.5cqw; font-size: 6cqw; font-weight: 600; }
.ring .links { font-size: 4.2cqw; color: #a5a79f; display: flex; justify-content: space-between; align-self: stretch; padding: 0 9cqw 7cqw; }
.ring .stand { margin-top: 5cqw; font-size: 4.6cqw; color: #a5a79f; }

@media (max-width: 860px) {
  .phones { height: 520px; max-width: 540px; margin: 0 auto; width: 100%; }
}
@media (max-width: 520px) {
  .phones { height: 380px; }
  .phone { width: 176px; border-radius: 28px; padding: 6px; }
  .screen { border-radius: 23px; }
}

/* ---------- sections ---------- */
section { padding: 84px 0; }
section.tint { background: var(--surface-2); }
h2 { font-size: clamp(30px, 4.2vw, 44px); line-height: 1.1; letter-spacing: -.02em; font-weight: 500; margin: 0 0 14px; }
.section-lead { color: var(--muted); font-size: 19px; max-width: 36em; margin: 0 0 48px; }
h3 { font-size: 19px; margin: 0 0 8px; font-weight: 600; letter-spacing: -.005em; }
p { margin: 0 0 14px; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: s; list-style: none; padding: 0; margin: 0; }
.steps li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; counter-increment: s; }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-deep); font-weight: 700; margin-bottom: 18px; }
.steps p { color: var(--muted); margin: 0; }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.feature p { color: var(--muted); margin: 0; font-size: 16px; }
.ico { width: 44px; height: 44px; border-radius: 13px; background: var(--accent-soft); display: grid; place-items: center; margin-bottom: 16px; }
.ico svg { width: 24px; height: 24px; stroke: var(--accent-deep); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 900px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 580px) { .grid { grid-template-columns: 1fr; } }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 28px; } }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.checks li { display: grid; grid-template-columns: 26px 1fr; gap: 12px; }
.checks svg { width: 26px; height: 26px; stroke: var(--accent-deep); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; margin-top: 2px; }
.checks b { font-weight: 600; }
.checks span { color: var(--muted); }

.private { background: var(--night); color: #f1f1eb; border-radius: 28px; padding: clamp(32px, 6vw, 64px); }
.private h2 { color: #f1f1eb; }
.private .section-lead { color: #a5a79f; margin-bottom: 32px; }
.private ul { list-style: none; padding: 0; margin: 0 0 32px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 28px; }
.private li { display: grid; grid-template-columns: 24px 1fr; gap: 12px; color: #d8d9d1; }
.private li svg { width: 24px; height: 24px; stroke: #a5b59c; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; margin-top: 3px; }
.private a { color: #a5b59c; }
@media (max-width: 700px) { .private ul { grid-template-columns: 1fr; } }

details { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 0 22px; margin-bottom: 12px; }
summary { cursor: pointer; padding: 20px 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--accent-deep); font-size: 24px; line-height: 1; }
details[open] summary::after { content: "–"; }
details p { color: var(--muted); padding-bottom: 6px; }

.final { text-align: center; }
.final .actions { justify-content: center; }
.final .lead { margin-inline: auto; }

footer { border-top: 1px solid var(--line); padding: 40px 0 56px; color: var(--muted); font-size: 15px; }
.foot { display: flex; flex-wrap: wrap; gap: 20px 40px; justify-content: space-between; align-items: flex-start; }
footer ul { list-style: none; padding: 0; margin: 0; display: flex; gap: 22px; flex-wrap: wrap; }
footer a { color: var(--muted); }
footer a:hover { color: var(--text); }
.todo { background: #fff3c4; color: #5a4300; border-radius: 4px; padding: 0 4px; }

/* ---------- document pages (privacy policy) ---------- */
.doc { padding: 56px 0 96px; }
.doc .wrap { max-width: 760px; }
.doc h1 { font-size: clamp(34px, 5vw, 48px); margin-bottom: 8px; }
.doc .meta { color: var(--muted); margin-bottom: 36px; }
.doc h2 { font-size: 26px; margin: 48px 0 12px; letter-spacing: -.01em; }
.doc h3 { margin-top: 28px; }
.doc ul { padding-left: 22px; }
.doc li { margin-bottom: 8px; }
.callout { background: var(--accent-soft); border: 1px solid var(--line); border-radius: 18px; padding: 22px 24px; margin: 28px 0; }
.callout p:last-child { margin-bottom: 0; }
.tablewrap { overflow-x: auto; margin: 18px 0; border: 1px solid var(--line); border-radius: 16px; }
table { border-collapse: collapse; width: 100%; font-size: 15px; background: var(--surface); }
th, td { text-align: left; padding: 14px 16px; vertical-align: top; border-bottom: 1px solid var(--line); }
th { background: var(--surface-2); font-weight: 600; }
tr:last-child td { border-bottom: 0; }
code { background: var(--surface-2); padding: 2px 6px; border-radius: 6px; font-size: .92em; }
