/* Tossa website. Same colours and type as the app: Sora for headings, Inter for text. */
:root {
  --accent: #2b59ff;
  --accent-strong: #1b3fd6;
  --on-accent: #ffffff;
  --bg: #ffffff;
  --surface: #f4f5f7;
  --selected: #eaf0ff;
  --text: #0e0f12;
  --muted: #5d6471;
  --border: #e6e8ec;
  --shadow: 0 24px 60px rgba(14, 22, 60, 0.14);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent: #4c74ff;
    --accent-strong: #6a8bff;
    --bg: #0d0e11;
    --surface: #17191e;
    --selected: #18213f;
    --text: #f3f4f6;
    --muted: #9aa0ab;
    --border: #2a2d35;
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: Sora, Inter, system-ui, sans-serif; letter-spacing: -0.02em; line-height: 1.15; margin: 0; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, .button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

img { max-width: 100%; height: auto; display: block; }

.wrap { width: min(1080px, 100% - 40px); margin-inline: auto; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-family: Sora, sans-serif; font-weight: 700; font-size: 22px; letter-spacing: -0.02em; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 32px; height: 32px; border-radius: 9px; background: #2b59ff; display: grid; place-items: center; }
.brand-mark svg { width: 100%; height: 100%; }
.nav { display: flex; gap: 22px; font-size: 15px; font-weight: 500; }
.nav a { color: var(--muted); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); text-decoration: none; }

/* Hero */
.hero { padding: 72px 0 40px; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(38px, 5.4vw, 60px); }
.hero p.lead { font-size: clamp(18px, 2vw, 21px); color: var(--muted); margin: 20px 0 28px; max-width: 34ch; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.button { display: inline-flex; align-items: center; gap: 10px; height: 52px; padding: 0 22px; border-radius: 16px; background: var(--accent); color: var(--on-accent); font-weight: 600; font-size: 16px; }
.button:hover { text-decoration: none; background: var(--accent-strong); }
.button.soon { background: var(--surface); color: var(--text); border: 1px solid var(--border); cursor: default; }
.button.soon:hover { background: var(--surface); }
.note { font-size: 14px; color: var(--muted); margin-top: 14px; }

.devices { position: relative; min-height: 420px; }
.tv { width: 100%; border-radius: 14px; border: 8px solid #0b0c10; background: #0b0c10; box-shadow: var(--shadow); }
.tv-stand { width: 34%; height: 10px; margin: 10px auto 0; border-radius: 6px; background: var(--border); }
.phone { position: absolute; right: -6px; bottom: -34px; width: 30%; height: auto; border-radius: 26px; border: 7px solid #0b0c10; background: #0b0c10; box-shadow: var(--shadow); }

/* Sections */
section { padding: 56px 0; }
section h2 { font-size: clamp(28px, 3.4vw, 38px); margin-bottom: 12px; }
section > .wrap > p.sub { color: var(--muted); max-width: 56ch; margin: 0 0 32px; }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card { background: var(--surface); border-radius: 20px; padding: 24px; }
.card h3 { font-size: 19px; margin-bottom: 8px; }
.card p { margin: 0; color: var(--muted); font-size: 16px; }
.icon { width: 44px; height: 44px; border-radius: 13px; background: var(--selected); color: var(--accent); display: grid; place-items: center; margin-bottom: 16px; }
.icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.steps { counter-reset: step; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding: 0; margin: 0; list-style: none; }
.steps li { counter-increment: step; border: 1px solid var(--border); border-radius: 20px; padding: 24px; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-weight: 700; font-size: 15px; margin-bottom: 14px; }
.steps h3 { font-size: 18px; margin-bottom: 6px; }
.steps p { margin: 0; color: var(--muted); font-size: 16px; }

.band { background: var(--surface); }
.band .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.band ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.band li { display: flex; gap: 12px; align-items: flex-start; }
.band li svg { flex: none; width: 22px; height: 22px; margin-top: 3px; fill: none; stroke: var(--accent); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 28px 0 40px; color: var(--muted); font-size: 15px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; align-items: center; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-footer a { color: var(--muted); white-space: nowrap; }

/* Reading pages: privacy, terms */
.doc { padding: 56px 0 72px; }
.doc .wrap { width: min(720px, 100% - 40px); }
.doc h1 { font-size: clamp(34px, 5vw, 46px); }
.doc .updated { color: var(--muted); margin: 10px 0 36px; font-size: 15px; }
.doc h2 { font-size: 22px; margin: 36px 0 10px; }
.doc p, .doc li { color: var(--text); }
.doc p { margin: 0 0 14px; }
.doc ul { padding-left: 22px; margin: 0 0 14px; }
.doc li { margin-bottom: 6px; }
.doc .summary { background: var(--surface); border-radius: 18px; padding: 20px 22px; margin-bottom: 8px; }
.doc .summary p:last-child { margin-bottom: 0; }

/* Create a code */
.create { padding: 64px 0 80px; }
.create .wrap { width: min(680px, 100% - 40px); }
.create h1 { font-size: clamp(34px, 5vw, 46px); }
.create p.lead { color: var(--muted); font-size: 19px; margin: 14px 0 30px; }
.create-form label { display: block; font-weight: 600; font-size: 15px; margin-bottom: 8px; }
.field { display: flex; gap: 10px; }
.field input { flex: 1; min-width: 0; height: 52px; padding: 0 16px; border-radius: 16px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; }
.field input:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.field input::placeholder { color: var(--muted); opacity: 0.8; }
button.button { border: 0; font-family: inherit; cursor: pointer; }
button.button.soon { border: 1px solid var(--border); }
button.button:disabled { opacity: 0.6; cursor: default; }
.form-message { color: #c62828; font-weight: 500; margin: 12px 0 0; }
.result { background: var(--surface); border-radius: 24px; padding: 30px 28px; text-align: center; }
.result-label { margin: 0; color: var(--muted); font-size: 15px; font-weight: 600; }
.code { margin: 6px 0 4px; font-family: Sora, sans-serif; font-weight: 700; font-size: clamp(52px, 13vw, 84px); letter-spacing: 0.06em; line-height: 1.1; color: var(--accent); -webkit-user-select: all; user-select: all; font-variant-numeric: tabular-nums; }
.result-link { margin: 0 0 6px; color: var(--muted); font-size: 15px; overflow-wrap: anywhere; }
.result .cta { justify-content: center; margin-top: 18px; }

/* Placeholder and error pages */
.center { min-height: 62vh; display: grid; place-items: center; text-align: center; padding: 56px 0; }
.center h1 { font-size: clamp(32px, 5vw, 46px); margin-bottom: 14px; }
.center p { color: var(--muted); max-width: 44ch; margin: 0 auto 24px; }

@media (prefers-color-scheme: dark) { .form-message { color: #ff8a80; } }

/* Narrow phones: the logo and three links have to share one row. */
@media (max-width: 420px) {
  .brand { font-size: 20px; gap: 8px; }
  .nav { gap: 12px; font-size: 14px; white-space: nowrap; }
}
@media (max-width: 350px) { .nav a[href="/terms"] { display: none; } }

/* Stacked on a phone. "flex: 1" would then apply to the height and squash the input, so the
   input keeps its own height here. */
@media (max-width: 520px) {
  .field { flex-direction: column; }
  .field input { flex: none; width: 100%; }
  .field .button { justify-content: center; }
}

@media (max-width: 820px) {
  .hero { padding-top: 44px; }
  .hero .wrap, .band .wrap { grid-template-columns: 1fr; }
  .devices { min-height: 0; margin-bottom: 34px; }
  .grid, .steps { grid-template-columns: 1fr; }
  .nav { gap: 16px; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
