/* RedFon site. Colours are the app's asset catalog tokens in the dark appearance (Resources/Assets.xcassets, Sources/AppTheme.swift). */
:root {
  color-scheme: dark;
  --canvas: #0f141a;
  --surface: #14191f;
  --ink: #e9eaec;
  --muted: #9fa5ad;
  --separator: #212830;
  --selection: #23282f;
  --accent: #df1637;
  --accent-text: #f6546c;
  --deep: #7a0b22;
  --fill-top: #f0324f;
  --fill-bottom: #c6102e;
  --glass: rgba(255, 255, 255, 0.06);
  --tile: rgba(255, 255, 255, 0.07);
  --edge: rgba(255, 255, 255, 0.1);
  --rim: inset 0 1px 0 rgba(255, 255, 255, 0.16);
  --radius: 16px;
  --card-radius: 28px;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --page: 1160px;
}

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

html {
  background: var(--canvas);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* GlowBackground: the dark canvas lit by red glows. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(640px 520px at 0% 0%, rgba(223, 22, 55, 0.4), transparent 70%),
    radial-gradient(560px 480px at 100% 100%, rgba(246, 84, 108, 0.16), transparent 70%),
    var(--canvas);
}

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

a {
  color: var(--accent-text);
  text-decoration: underline;
  text-decoration-color: rgba(246, 84, 108, 0.4);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: text-decoration-color 0.15s;
}
a:hover { text-decoration-color: currentColor; }
a:focus-visible, .badge:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 3px;
  border-radius: 6px;
}

code {
  font-family: var(--mono);
  font-size: 0.86em;
  padding: 0.1em 0.4em;
  border-radius: 6px;
  background: var(--tile);
  border: 1px solid var(--edge);
  overflow-wrap: anywhere;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.skip {
  position: absolute;
  left: 16px;
  top: -64px;
  z-index: 20;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
}
.skip:focus { top: 16px; }

.wrap {
  width: 100%;
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 24px;
}

/* Header: a glass bar, as the toolbar in the app. */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  padding-top: 14px;
}
.topbar .wrap { padding: 0 16px; }
.bar {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 10px 12px 10px 14px;
  border-radius: 20px;
  background: rgba(20, 25, 31, 0.62);
  border: 1px solid var(--edge);
  box-shadow: var(--rim), 0 12px 40px rgba(0, 0, 0, 0.35);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  backdrop-filter: blur(24px) saturate(160%);
}

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

/* The app icon with the glow of BrandMark. */
.mark {
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 22.5%;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18), 0 6px 16px rgba(223, 22, 55, 0.45);
}

.nav {
  display: flex;
  gap: 4px;
  margin-left: auto;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav::-webkit-scrollbar { display: none; }
.nav a {
  flex: none;
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s, background-color 0.15s;
}
.nav a:hover { color: var(--ink); background: var(--tile); }
.nav a[aria-current="page"] {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 0 1px var(--edge);
}

main { flex: 1; }

/* Kicker: a glowing red dot and a label above a section heading. */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  color: var(--accent-text);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.03em;
}
.kicker::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-text);
  box-shadow: 0 0 10px var(--accent-text);
}

.panel {
  background: rgba(20, 25, 31, 0.7);
  border: 1px solid var(--edge);
  border-radius: var(--card-radius);
  box-shadow: var(--rim), 0 30px 80px rgba(0, 0, 0, 0.35);
}

/* ---------- Home ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: center;
  gap: 48px;
  padding: 72px 0 96px;
}
.app-icon {
  width: 128px;
  height: 128px;
  margin-bottom: 32px;
  border-radius: 22.5%;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2), 0 24px 60px rgba(223, 22, 55, 0.5);
}
.hero h1 {
  margin: 0;
  font-size: clamp(56px, 8vw, 96px);
  line-height: 1;
  letter-spacing: -0.035em;
  font-weight: 800;
}
.lead {
  margin: 24px 0 32px;
  max-width: 30ch;
  color: var(--ink);
  font-size: clamp(19px, 2vw, 22px);
  line-height: 1.45;
}
.lead + .stores { margin-top: 0; }

.stores {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.badge { display: inline-block; border-radius: 9px; }
.badge img { height: 52px; width: auto; }
.badge img.play { height: 76px; margin: -12px -10px; }

.devices {
  position: relative;
  padding-bottom: 6%;
}
.devices .mac { width: 100%; }
.devices .phone {
  position: absolute;
  left: -6%;
  bottom: -4%;
  width: 27%;
  border-radius: 13% / 6%;
  filter: drop-shadow(0 30px 40px rgba(0, 0, 0, 0.6));
}

.section { padding: 0 0 112px; }
.section > h2, .features h2 {
  margin: 0 0 32px;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.025em;
  font-weight: 700;
}

.needs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}
.needs li {
  padding: 32px;
  font-size: 18px;
  line-height: 1.5;
}
.needs li + li { border-left: 1px solid var(--separator); }

.features {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 64px;
  align-items: start;
}
.shots {
  position: sticky;
  top: 112px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.shots img {
  border-radius: 13% / 6%;
  filter: drop-shadow(0 24px 40px rgba(0, 0, 0, 0.55));
}
.shots img:last-child { margin-top: 72px; }
.devices .phone.android { left: auto; right: -4%; }
.features.flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }

.rows {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--separator);
}
.rows li {
  position: relative;
  padding: 22px 0 22px 28px;
  border-bottom: 1px solid var(--separator);
  font-size: 18px;
  line-height: 1.55;
}
.rows li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 34px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-text);
  box-shadow: 0 0 10px var(--accent-text);
}

.limits { padding: 40px; }
.limits h2 { margin: 0 0 24px; font-size: 28px; letter-spacing: -0.02em; }
.limits ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 40px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.limits li {
  padding-left: 16px;
  border-left: 2px solid var(--separator);
  color: var(--muted);
}

.docs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.docs a {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  height: 100%;
  min-height: 120px;
  padding: 22px;
  border-radius: 22px;
  background: var(--tile);
  border: 1px solid var(--edge);
  box-shadow: var(--rim);
  color: var(--ink);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
  transition: background-color 0.15s, border-color 0.15s;
}
.docs a::after {
  content: "→";
  flex: none;
  color: var(--accent-text);
  transition: transform 0.15s;
}
.docs a:hover { background: rgba(255, 255, 255, 0.11); border-color: rgba(255, 255, 255, 0.16); }
.docs a:hover::after { transform: translateX(3px); }

/* ---------- Documents ---------- */

.doc {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 40px;
  align-items: start;
  padding-top: 48px;
  padding-bottom: 96px;
}
.doc.single { grid-template-columns: minmax(0, 1fr); max-width: 880px; }

.toc {
  position: sticky;
  top: 104px;
  font-size: 14px;
}
.toc p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.toc ol { margin: 0; padding: 0; list-style: none; border-left: 1px solid var(--separator); }
.toc a {
  display: block;
  margin-left: -1px;
  padding: 6px 0 6px 14px;
  border-left: 1px solid transparent;
  color: var(--muted);
  line-height: 1.35;
  text-decoration: none;
}
.toc a:hover { color: var(--ink); border-left-color: var(--accent-text); }

.prose { padding: 56px 64px 64px; min-width: 0; }
.prose h1 {
  margin: 0 0 16px;
  font-size: clamp(32px, 4.4vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.025em;
  font-weight: 700;
}
.prose .meta {
  display: inline-block;
  margin: 0 0 32px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--tile);
  border: 1px solid var(--edge);
  color: var(--muted);
  font-size: 13px;
}
.prose h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 48px 0 16px;
  padding-top: 40px;
  border-top: 1px solid var(--separator);
  font-size: 24px;
  line-height: 1.25;
  letter-spacing: -0.015em;
}
.prose h2::before {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-text);
  box-shadow: 0 0 10px var(--accent-text);
}
.prose h3 { margin: 32px 0 8px; font-size: 18px; line-height: 1.35; }
.prose p, .prose li { color: #d3d6da; }
.prose p { margin: 0 0 16px; }
.prose ul { margin: 0 0 16px; padding-left: 20px; }
.prose ul li { margin-bottom: 10px; }
.prose ul li::marker { color: var(--accent-text); }

.prose ol {
  counter-reset: step;
  margin: 8px 0 24px;
  padding: 0;
  list-style: none;
}
.prose ol li {
  counter-increment: step;
  position: relative;
  min-height: 30px;
  margin-bottom: 14px;
  padding-left: 46px;
}
.prose ol li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -1px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--tile);
  border: 1px solid var(--edge);
  color: var(--ink);
  font: 600 13px/1 var(--mono);
}

.prose table {
  width: 100%;
  margin: 8px 0 24px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 15px;
  line-height: 1.5;
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.03);
  overflow: hidden;
}
.prose th {
  padding: 12px 16px;
  background: var(--tile);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-align: left;
  text-transform: uppercase;
}
.prose td {
  padding: 14px 16px;
  border-top: 1px solid var(--separator);
  vertical-align: top;
  color: #d3d6da;
}
.prose td:first-child { color: var(--ink); font-weight: 500; width: 32%; }

/* ---------- Footer ---------- */

.footer {
  border-top: 1px solid var(--separator);
  background: rgba(15, 20, 26, 0.6);
}
.footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  padding-top: 28px;
  padding-bottom: 36px;
}
.footer p { margin: 0; color: var(--muted); font-size: 14px; }
.footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 14px; }
.footer nav a { color: var(--muted); text-decoration: none; }
.footer nav a:hover { color: var(--ink); }

/* ---------- Narrow screens ---------- */

@media (max-width: 980px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 56px; padding: 48px 0 80px; }
  .devices { margin-left: 6%; }
  .features, .features.flip { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .app-icon { width: 96px; height: 96px; margin-bottom: 24px; }
  .shots { position: static; max-width: 520px; order: 2; }
  .docs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .doc { grid-template-columns: minmax(0, 1fr); padding-top: 32px; }
  .toc { position: static; }
  .toc ol { columns: 2; column-gap: 24px; }
  .toc li { break-inside: avoid; }
}

@media (max-width: 720px) {
  .wrap { padding: 0 16px; }
  .topbar { position: static; }
  .topbar .wrap { padding: 0 10px; }
  .bar { flex-wrap: wrap; gap: 10px; padding: 10px; }
  .nav { flex-wrap: wrap; width: 100%; margin: 0; overflow: visible; }
  .nav a { padding: 6px 11px; background: var(--tile); }
  .section { padding-bottom: 80px; }
  .needs { grid-template-columns: minmax(0, 1fr); }
  .needs li { padding: 24px; }
  .needs li + li { border-left: 0; border-top: 1px solid var(--separator); }
  .limits { padding: 28px 24px; }
  .limits ul { grid-template-columns: minmax(0, 1fr); }
  .docs { grid-template-columns: minmax(0, 1fr); }
  .docs a { min-height: 0; align-items: center; }
  .shots img:last-child { margin-top: 40px; }
  .rows li { font-size: 17px; }
  .prose { padding: 32px 20px 40px; border-radius: 22px; }
  .prose h1 { font-size: 28px; overflow-wrap: break-word; hyphens: auto; }
  .prose .meta { border-radius: 14px; }
  .doc { padding-top: 24px; }
  .toc ol { columns: 1; }

  /* Tables become stacked cards: each cell carries its column name. */
  .prose table, .prose tbody, .prose tr, .prose td { display: block; width: 100%; }
  .prose table { border: 0; background: none; }
  .prose thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .prose tr {
    margin-bottom: 12px;
    border: 1px solid var(--edge);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.03);
    overflow: hidden;
  }
  .prose td { border-top: 1px solid var(--separator); }
  .prose td:first-child { width: 100%; border-top: 0; background: var(--tile); }
  .prose td[data-label]::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }
}

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