/* Roamly marketing + legal site.
   Palette mirrors lib/core/theme/app_colors.dart so the site and the app
   read as one product. Dark is the app's native mode, so the site follows
   the visitor's system setting rather than forcing light. */

:root {
  --horizon: #2E5BFF;
  --horizon-dark: #1F3FCC;
  --violet: #6A46F2;
  --cyan: #10A5B4;
  --sky: #5AD1FF;

  --bg: #FBFCFE;
  --surface: #F1F4F9;
  --raised: #FFFFFF;
  --border: #E3E8F0;
  --text: #0E1420;
  --muted: #4C596E;
  --faint: #97A3B6;
  --accent: #1F3FCC;
  --danger: #C13036;

  --radius: 16px;
  --radius-sm: 10px;
  --maxw: 760px;
  --shadow: 0 1px 2px rgba(14, 20, 32, .04), 0 8px 24px rgba(14, 20, 32, .06);

  --font-body: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #070B14;
    --surface: #0F1622;
    --raised: #131C2A;
    --border: #1A2333;
    --text: #F4F7FC;
    --muted: #B3BECE;
    --faint: #7E8CA0;
    --accent: #6E8CFF;
    --danger: #FF6B70;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

/* ---------- header ---------- */

.site-header {
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 19px;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.brand img { width: 28px; height: 28px; border-radius: 8px; display: block; }

.site-nav {
  display: flex;
  gap: 18px;
  font-size: 15px;
  flex-wrap: wrap;
}

.site-nav a { color: var(--muted); text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--accent); }

/* ---------- hero ---------- */

.hero {
  padding: 72px 0 56px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -40% 50% auto;
  width: 700px;
  height: 700px;
  transform: translateX(-50%);
  background: radial-gradient(circle, color-mix(in srgb, var(--violet) 22%, transparent) 0%, transparent 62%);
  pointer-events: none;
}

.hero > * { position: relative; }

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(34px, 7vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin: 0 0 16px;
  font-weight: 600;
}

.hero p.lede {
  font-size: clamp(17px, 2.4vw, 20px);
  color: var(--muted);
  max-width: 34em;
  margin: 0 auto 32px;
}

.gradient-text {
  background: linear-gradient(120deg, var(--horizon), var(--violet) 55%, var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.cta-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform .15s ease, opacity .15s ease;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: linear-gradient(120deg, var(--horizon), var(--violet));
  color: #fff;
}

.btn-secondary {
  background: var(--raised);
  color: var(--text);
  border-color: var(--border);
}

/* ---------- feature grid ---------- */

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
  padding: 8px 0 64px;
}

.feature {
  background: var(--raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}

.feature h3 {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.feature p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.55; }

.feature .icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  background: linear-gradient(120deg, var(--horizon), var(--violet));
  color: #fff;
}

.feature .icon svg { width: 20px; height: 20px; }

/* ---------- document pages ---------- */

main.doc { padding: 48px 0 96px; }

.doc h1 {
  font-family: var(--font-display);
  font-size: clamp(30px, 5.5vw, 40px);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
  font-weight: 600;
}

.doc .meta {
  color: var(--faint);
  font-size: 14px;
  margin: 0 0 36px;
}

.doc h2 {
  font-size: 21px;
  letter-spacing: -0.015em;
  margin: 44px 0 12px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-weight: 700;
}

.doc h3 { font-size: 17px; margin: 28px 0 8px; font-weight: 700; }

.doc p, .doc li { color: var(--text); }
.doc ul, .doc ol { padding-left: 22px; }
.doc li { margin-bottom: 8px; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }

.callout {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--horizon);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  margin: 24px 0;
  font-size: 16px;
}

.callout.warn { border-left-color: var(--danger); }
.callout p:first-child { margin-top: 0; }
.callout p:last-child { margin-bottom: 0; }
.callout strong { font-weight: 700; }

.table-scroll { overflow-x: auto; margin: 20px 0; }

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 15px;
  min-width: 520px;
}

th, td {
  text-align: left;
  vertical-align: top;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
}

th {
  font-weight: 700;
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

tbody tr:last-child td { border-bottom: none; }

.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 24px 0;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding: 0 0 20px 46px;
  margin: 0;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(120deg, var(--horizon), var(--violet));
}

.steps li strong { display: block; }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .9em;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1px 6px;
}

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0 48px;
  color: var(--faint);
  font-size: 14px;
}

.site-footer .links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--accent); }

@media (max-width: 520px) {
  body { font-size: 16px; }
  .hero { padding: 48px 0 40px; }
  main.doc { padding: 32px 0 64px; }
}
