/* Random Number Generator+ — marketing site
   Palette mirrors the app (DesignSystem.swift): signature red, warm cream,
   dark-gray header. Theme-aware: warm-light by default, dark on request. */

:root {
  --bg: #ece6dc;
  --bg-alt: #f6f2ec;
  --surface: #ffffff;
  --ink: #3f3c39;
  --ink-soft: #6b665f;
  --line: rgba(88, 84, 80, 0.14);
  --red: #d65f5c;
  --red-strong: #c84646;
  --header: #585450;
  --ring: #4a4744;
  --shadow: 0 18px 40px rgba(63, 60, 57, 0.16);
  --radius: 18px;
  --maxw: 1080px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1b1917;
    --bg-alt: #221f1c;
    --surface: #27231f;
    --ink: #ece7df;
    --ink-soft: #a9a29a;
    --line: rgba(255, 255, 255, 0.10);
    --red: #e07370;
    --red-strong: #d65f5c;
    --header: #d8d2c9;
    --ring: #d8d2c9;
    --shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--red-strong); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--ink);
  font-size: 16px;
}
.brand:hover { text-decoration: none; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 22px; }
.nav a { color: var(--ink-soft); font-weight: 500; font-size: 15px; }
.nav a:hover { color: var(--ink); text-decoration: none; }
.nav .btn-sm { display: inline-flex; }
.lang-select {
  appearance: none;
  -webkit-appearance: none;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 7px 30px 7px 12px;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  /* Chevron (uses --ink via a neutral gray that reads in both themes). */
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><path d='M6 9l6 6 6-6'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
}
.lang-select:hover { border-color: var(--red); }
@media (max-width: 640px) {
  .nav a.hide-sm { display: none; }
}

/* ---------- Buttons ---------- */
.appstore {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #000;
  color: #fff;
  padding: 12px 18px;
  border-radius: 12px;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.14);
}
.appstore:hover { text-decoration: none; opacity: 0.9; }
.appstore svg { width: 22px; height: 22px; fill: #fff; }
.appstore .small { display: block; font-size: 11px; font-weight: 500; opacity: 0.85; line-height: 1; margin-bottom: 2px; }
.appstore .big { display: block; font-size: 17px; font-weight: 700; line-height: 1.1; }
.btn-sm {
  background: var(--red);
  color: #fff;
  padding: 8px 16px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
}
.btn-sm:hover { background: var(--red-strong); text-decoration: none; }

/* ---------- Hero ---------- */
.hero { padding: 72px 0 40px; }
.hero .wrap {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
.hero h1 {
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 18px;
  color: var(--ink);
}
.hero .lede { font-size: 19px; color: var(--ink-soft); margin: 0 0 28px; }
.hero .cta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.free-note { color: var(--ink-soft); font-size: 14px; }
.free-note strong { color: var(--red-strong); }
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; text-align: center; }
  .hero .cta { justify-content: center; }
  .phone { margin: 8px auto 0; }
}

/* ---------- Phone (real App Store screenshot in a bezel) ---------- */
.phone {
  width: 280px;
  background: #131211;
  border-radius: 42px;
  padding: 12px;
  box-shadow: var(--shadow);
  justify-self: center;
}
.phone img {
  display: block;
  width: 100%;
  border-radius: 30px;
}

/* ---------- Screenshot gallery ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  max-width: 780px;
  margin: 0 auto;
}
.gallery figure { margin: 0; text-align: center; }
.gallery img {
  width: 100%;
  border-radius: 24px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.gallery figcaption {
  margin-top: 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
}
@media (max-width: 620px) {
  .gallery { grid-template-columns: 1fr; max-width: 280px; }
}

/* ---------- Sections ---------- */
section { padding: 56px 0; }
.section-head { text-align: center; max-width: 620px; margin: 0 auto 44px; }
.section-head h2 { font-size: clamp(26px, 3.5vw, 34px); margin: 0 0 12px; letter-spacing: -0.01em; }
.section-head p { color: var(--ink-soft); font-size: 17px; margin: 0; }

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 820px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .features { grid-template-columns: 1fr; } }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
}
.card .ico {
  width: 44px; height: 44px; border-radius: 12px;
  background: color-mix(in srgb, var(--red) 16%, transparent);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.card .ico svg { width: 24px; height: 24px; stroke: var(--red-strong); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { margin: 0 0 8px; font-size: 18px; }
.card p { margin: 0; color: var(--ink-soft); font-size: 15px; }

/* ---------- Voice band ---------- */
.band { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.band .wrap { display: flex; align-items: center; gap: 40px; flex-wrap: wrap; justify-content: center; text-align: center; }
.band h2 { font-size: clamp(24px, 3vw, 30px); margin: 0 0 10px; }
.band p { color: var(--ink-soft); margin: 0 auto; max-width: 520px; }
.langs { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 18px; }
.langs span {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 999px; padding: 6px 14px; font-size: 14px; font-weight: 600; color: var(--ink);
}

/* ---------- CTA ---------- */
.cta-band { text-align: center; }
.cta-band h2 { font-size: clamp(26px, 3.5vw, 36px); margin: 0 0 22px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 34px 0; color: var(--ink-soft); font-size: 14px; }
.site-footer .wrap { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.site-footer .links { margin-left: auto; display: flex; gap: 20px; }
.site-footer a { color: var(--ink-soft); }
.site-footer a:hover { color: var(--ink); }

/* ---------- Legal / support pages ---------- */
.doc { max-width: 760px; margin: 0 auto; padding: 56px 22px 72px; }
.doc h1 { font-size: 34px; margin: 0 0 6px; letter-spacing: -0.01em; }
.doc .updated { color: var(--ink-soft); font-size: 14px; margin: 0 0 34px; }
.doc h2 { font-size: 21px; margin: 34px 0 10px; }
.doc p, .doc li { color: var(--ink); font-size: 16px; }
.doc ul { padding-left: 22px; }
.doc a.back { display: inline-block; margin-bottom: 28px; font-weight: 600; }
.doc .contact {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px 24px; margin-top: 28px;
}
