/*
 * ordeks.ee landing page.
 *
 * Deliberately its own stylesheet rather than a slice of the app's Tailwind build
 * (#176): the marketing page and the product ship on different schedules, and a
 * landing page that cannot be edited without rebuilding the app is a landing page
 * nobody edits. The tokens below are copied from frontend/src/styles/app.css so the
 * two look like one product — if a brand colour changes there, change it here too.
 */

:root {
  --canvas: #f7f8fb;
  --surface: #ffffff;
  --ink: #0f1729;
  --ink-2: #475467;
  --muted: #8a94a6;
  --line: #e9edf3;
  --line-2: #dfe4ec;
  --accent: #2563eb;
  --accent-ink: #1d4ed8;
  --wash: #eef3ff;
  --wash-2: #f5f8ff;
  --ok: #16a34a;
  --radius-card: 14px;
  --radius-ctl: 9px;
  --shadow-soft: 0 1px 2px rgba(16, 24, 40, 0.04), 0 1px 3px rgba(16, 24, 40, 0.05);
  --shadow-lift: 0 12px 32px rgba(16, 24, 40, 0.08), 0 2px 8px rgba(16, 24, 40, 0.04);
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --page: 1120px;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/Inter-variable.woff2") format("woff2");
}

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

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-ink); }

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.1rem, 1.4rem + 2.6vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 1.1rem + 1.5vw, 2.1rem); font-weight: 700; }
h3 { font-size: 1.0625rem; font-weight: 650; letter-spacing: -0.01em; }
p { margin: 0 0 1rem; }

.wrap { width: 100%; max-width: var(--page); margin: 0 auto; padding: 0 24px; }
.section { padding: 88px 0; }
.section--wash { background: var(--canvas); border-block: 1px solid var(--line); }
.lead { font-size: 1.0625rem; color: var(--ink-2); max-width: 62ch; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .75rem;
  font-weight: 650;
  color: var(--accent-ink);
  margin: 0 0 .75rem;
}
.center { text-align: center; }
.center .lead { margin-inline: auto; }

/* ── controls ─────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  height: 44px;
  padding: 0 20px;
  border-radius: var(--radius-ctl);
  border: 1px solid transparent;
  font: inherit;
  font-weight: 650;
  font-size: .9375rem;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s, border-color .15s;
}
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-ink); }
.btn--ghost { background: transparent; color: var(--ink-2); border-color: var(--line-2); }
.btn--ghost:hover { background: var(--wash-2); }
.btn--sm { height: 36px; padding: 0 14px; font-size: .8125rem; }

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.trust { color: var(--muted); font-size: .875rem; margin: 1rem 0 0; }

/* ── header ───────────────────────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
  margin-right: auto;
}
.site-nav { display: flex; align-items: center; gap: 22px; }
.site-nav a {
  color: var(--ink-2);
  text-decoration: none;
  font-size: .9375rem;
  font-weight: 550;
}
.site-nav a:hover { color: var(--ink); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.lang { display: flex; align-items: center; gap: 4px; font-size: .8125rem; }
.lang a { color: var(--muted); text-decoration: none; font-weight: 600; }
.lang a[aria-current="true"] { color: var(--ink); }

/* ── hero ─────────────────────────────────────────────────────────────────── */

.hero { padding: 72px 0 64px; background:
  radial-gradient(1200px 420px at 78% -10%, var(--wash) 0%, rgba(238,243,255,0) 70%); }
.hero__grid { display: grid; gap: 48px; align-items: center; }
.hero__shot {
  border-radius: var(--radius-card);
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow-lift);
  overflow: hidden;
  background: var(--surface);
}

/* ── integration strip ────────────────────────────────────────────────────── */

.strip { padding: 28px 0; border-bottom: 1px solid var(--line); }
.strip__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px 40px;
}
.strip__mark {
  font-weight: 650;
  font-size: 1.0625rem;
  color: var(--ink-2);
  letter-spacing: -0.01em;
}
.strip__caption { color: var(--muted); font-size: .875rem; }

/* ── grids ────────────────────────────────────────────────────────────────── */

.cols { display: grid; gap: 24px; }
.cols--3 { grid-template-columns: 1fr; }
.cols--4 { grid-template-columns: 1fr; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-soft);
  padding: 24px;
}
.card p:last-child { margin-bottom: 0; }
.card__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: var(--wash);
  color: var(--accent-ink);
  font-size: .8125rem;
  font-weight: 700;
  margin-bottom: .75rem;
}

/* ── alternating feature blocks ───────────────────────────────────────────── */

.feature { display: grid; gap: 32px; align-items: center; padding: 40px 0; }
.feature + .feature { border-top: 1px solid var(--line); }
.feature__body p:last-child { margin-bottom: 0; }
.feature__shot {
  border-radius: var(--radius-card);
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  background: var(--canvas);
}
/* A handheld screenshot is a full phone screen — status bar and all — so it is shown
   in a device frame rather than as a bare rectangle, which reads as a cropped web
   page. The frame is CSS, not baked into the image: the screenshot stays a clean
   screenshot and the bezel can change without retaking anything.

   Also capped in height, or a portrait screen towers over the paragraph beside it and
   drags the page to twice its length. */
.phone {
  --bezel: 11px;
  width: fit-content;
  max-width: 100%;
  margin-inline: auto;
  padding: var(--bezel);
  background: linear-gradient(160deg, #232a3a 0%, #0f1729 60%);
  border-radius: 44px;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .12),
    var(--shadow-lift);
  position: relative;
}
.phone img {
  display: block;
  border-radius: 33px;
  max-height: 560px;
  width: auto;
}
/* The pill cut out of the top of the screen. Purely decorative. */
.phone::after {
  content: "";
  position: absolute;
  top: calc(var(--bezel) + 9px);
  left: 50%;
  transform: translateX(-50%);
  width: 78px;
  height: 20px;
  border-radius: 999px;
  background: #0b1220;
  pointer-events: none;
}

.shot-placeholder {
  aspect-ratio: 16 / 10;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: .8125rem;
  text-align: center;
  padding: 16px;
}

/* ── floor grid ───────────────────────────────────────────────────────────── */

.floor { display: grid; gap: 14px 28px; grid-template-columns: 1fr; margin: 0; padding: 0; list-style: none; }
.floor li { display: flex; gap: .625rem; color: var(--ink-2); }
.floor li::before {
  content: "";
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: .2rem;
  border-radius: 999px;
  background: var(--ok);
  opacity: .16;
  box-shadow: inset 0 0 0 2px var(--ok);
}

/* ── pricing ──────────────────────────────────────────────────────────────── */

.price-grid { display: grid; gap: 16px; grid-template-columns: 1fr; margin-top: 28px; }
.price {
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
  padding: 20px;
}
.price__amount { font-size: 1.75rem; font-weight: 700; letter-spacing: -0.02em; }
.price__unit { color: var(--muted); font-size: .875rem; }

/* Channel rates read as a rate card, one line per channel — three amounts crammed
   into a single tile was unreadable and looked like one price. */
.price--list { margin-top: 16px; }
.price--list h3 { margin-bottom: .75rem; }
.rate { margin: 0; }
.rate > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.rate > div:first-child { border-top: 0; }
.rate dt { color: var(--ink-2); }
.rate dd { margin: 0; font-weight: 650; font-variant-numeric: tabular-nums; }
.rate dd span { color: var(--muted); font-weight: 400; font-size: .875rem; }
.price--list .trust { margin-top: 14px; }

/* ── faq ──────────────────────────────────────────────────────────────────── */

.faq { max-width: 780px; margin: 0 auto; }
.faq details {
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
}
.faq summary {
  cursor: pointer;
  font-weight: 650;
  font-size: 1.0625rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  color: var(--muted);
  font-weight: 500;
  font-size: 1.25rem;
  line-height: 1;
}
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: .75rem 0 0; color: var(--ink-2); }

/* ── final cta + footer ───────────────────────────────────────────────────── */

.final { background: var(--ink); color: #fff; }
.final h2 { color: #fff; }
.final .lead { color: #c7cfdd; }
.final .btn--ghost { color: #fff; border-color: rgba(255, 255, 255, .28); }
.final .btn--ghost:hover { background: rgba(255, 255, 255, .08); }

.site-footer { padding: 40px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: .875rem; }
.site-footer a { color: var(--ink-2); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer__row { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; }
.site-footer__row + .site-footer__row { margin-top: 14px; }

/* ── legal pages (#205) ───────────────────────────────────────────────────── */

/* The privacy policy and terms, rendered from docs/marketing/legal/*.md into
   their own static pages so their text is in the HTML — Google Play's automated
   check reads the markup, not what JavaScript would have drawn. */

.legal { padding: 56px 0 88px; }
.legal .wrap { max-width: 800px; }
.legal__doc h1 { font-size: clamp(1.9rem, 1.4rem + 1.8vw, 2.6rem); margin-bottom: .35em; }
.legal__doc h2 {
  font-size: 1.25rem;
  margin: 2.5rem 0 .75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}
.legal__doc h2:first-of-type { margin-top: 2rem; }
.legal__doc p, .legal__doc li { color: var(--ink-2); }
.legal__doc ul { margin: 0 0 1rem; padding-left: 1.25rem; }
.legal__doc li { margin-bottom: .5rem; }
.legal__stamp { color: var(--muted); font-size: .875rem; margin-bottom: 2rem; }

.legal__table { overflow-x: auto; margin: 0 0 1.5rem; }
.legal__table table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: .9375rem; }
.legal__table th, .legal__table td {
  text-align: left;
  vertical-align: top;
  padding: 10px 14px;
  border: 1px solid var(--line);
  color: var(--ink-2);
}
.legal__table th { background: var(--canvas); color: var(--ink); font-weight: 650; }

.legal__back { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }

/* ── wider screens ────────────────────────────────────────────────────────── */

@media (min-width: 720px) {
  .cols--3 { grid-template-columns: repeat(3, 1fr); }
  .cols--4 { grid-template-columns: repeat(2, 1fr); }
  .floor { grid-template-columns: repeat(2, 1fr); }
  .price-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1000px) {
  .hero__grid { grid-template-columns: 1.05fr 1fr; }
  .cols--4 { grid-template-columns: repeat(4, 1fr); }
  .feature { grid-template-columns: 1fr 1.1fr; gap: 56px; padding: 56px 0; }
  .feature--flip .feature__body { order: 2; }
  .floor { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 860px) {
  .site-nav { display: none; }
}

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