/* Reverse Duel website. Colours = the app's design tokens
   (lib/core/design_system/tokens/app_colors.dart); fonts = the app's
   Bricolage Grotesque + Figtree (SIL Open Font License), served from this
   site: no third-party requests, no cookies. */

@font-face {
  font-family: "Bricolage";
  src: url("fonts/BricolageGrotesque-ExtraBold.ttf") format("truetype");
  font-weight: 800;
  font-display: swap;
}
@font-face {
  font-family: "Figtree";
  src: url("fonts/Figtree-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Figtree";
  src: url("fonts/Figtree-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Figtree";
  src: url("fonts/Figtree-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #1e1b24;
  --paper: #fff6e8;
  --surface: #ffffff;
  --muted: #6f6878;
  --line: #eadcc6;
  --punch: #ff5a2c;
  --punch-soft: #ffe2d7;
  --flip: #13b5a5;
  --flip-soft: #cff3ee;
  --sunny: #ffd23f;
  --sunny-soft: #fff2c2;
  --stroke: 2.5px solid var(--ink);
  --shadow: 4px 4px 0 var(--ink);
  --radius: 22px;
  --display: "Bricolage", "Arial Black", system-ui, sans-serif;
  --body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1080px;
  --gutter: 16px;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
a:hover {
  color: var(--punch);
}
:focus-visible {
  outline: 3px solid var(--flip);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--ink);
  color: var(--paper);
  padding: 8px 14px;
  border-radius: 10px;
  z-index: 10;
}
.skip:focus {
  left: 8px;
}

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

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
}
h1 {
  font-size: clamp(2.3rem, 7vw, 4rem);
}
h2 {
  font-size: clamp(1.7rem, 4.5vw, 2.4rem);
}
h3 {
  font-size: 1.3rem;
  letter-spacing: -0.01em;
}
p {
  margin: 0 0 1em;
}

/* ── Header ─────────────────────────────────────────────────────────── */

.site-header {
  padding: 18px 0;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.logo:hover {
  color: inherit;
}
.logo img {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: var(--stroke);
}
.wordmark {
  position: relative;
  font-family: var(--display);
  font-weight: 800;
  font-size: 26px;
  line-height: 1;
  padding-bottom: 18px;
  direction: ltr;
}
.wordmark .r {
  display: inline-block;
  color: var(--punch);
  transform: scaleX(-1);
}
.wordmark .badge {
  position: absolute;
  left: 60px;
  top: 25px;
  font-size: 13px;
  background: var(--flip);
  border: 1.5px solid var(--ink);
  border-radius: 5px;
  padding: 2px 6px 1px;
  transform: rotate(5deg);
}
.nav {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.nav a {
  font-weight: 700;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 999px;
}
.nav a:hover,
.nav a[aria-current="page"] {
  background: var(--surface);
  box-shadow: inset 0 0 0 2px var(--ink);
  color: var(--ink);
}

/* ── Hero ───────────────────────────────────────────────────────────── */

.hero {
  padding: 32px 0 56px;
}
.hero .wrap {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px;
  align-items: center;
}
.eyebrow {
  display: inline-block;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--sunny);
  border: var(--stroke);
  border-radius: 999px;
  padding: 4px 12px;
  margin-bottom: 18px;
  transform: rotate(-2deg);
}
.lead {
  font-size: 1.2rem;
  color: var(--muted);
  max-width: 34em;
}
.stores {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 26px;
}
.store {
  display: inline-flex;
  flex-direction: column;
  min-width: 170px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 14px;
  padding: 9px 18px 10px;
  line-height: 1.2;
  box-shadow: 4px 4px 0 var(--punch);
}
.store small {
  font-size: 12px;
  opacity: 0.8;
}
.store strong {
  font-size: 18px;
}
.note {
  font-size: 14px;
  color: var(--muted);
  margin-top: 12px;
}

.stage {
  position: relative;
  justify-self: center;
  width: min(100%, 360px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}
.stage::before {
  content: "";
  position: absolute;
  inset: 6%;
  border-radius: 50%;
  background: var(--sunny-soft);
  border: var(--stroke);
}
.stage .icon {
  position: relative;
  width: 62%;
  border-radius: 28%;
  border: 3px solid var(--ink);
  box-shadow: 8px 8px 0 var(--ink);
  transform: rotate(-6deg);
}
.sticker {
  position: absolute;
  font-family: var(--display);
  font-weight: 800;
  font-size: 15px;
  border: var(--stroke);
  border-radius: 999px;
  padding: 6px 12px;
  box-shadow: 3px 3px 0 var(--ink);
  white-space: nowrap;
}
.sticker.one {
  background: var(--flip);
  top: 8%;
  right: 0;
  transform: rotate(6deg);
}
.sticker.two {
  background: var(--punch-soft);
  bottom: 9%;
  left: 0;
  transform: rotate(-5deg);
}

/* Waveform: forward bars mirrored, like the app's reveal. */
.wave {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 56px;
  margin-top: 28px;
  direction: ltr;
}
.wave span {
  flex: 1;
  max-width: 9px;
  border-radius: 9px;
  background: var(--ink);
}
.wave span:nth-child(1) {
  height: 30%;
}
.wave span:nth-child(2) {
  height: 55%;
}
.wave span:nth-child(3) {
  height: 80%;
}
.wave span:nth-child(4) {
  height: 45%;
}
.wave span:nth-child(5) {
  height: 95%;
}
.wave span:nth-child(6) {
  height: 60%;
}
.wave span:nth-child(7) {
  height: 35%;
}
.wave span:nth-child(8) {
  height: 70%;
}
.wave span:nth-child(9) {
  height: 100%;
}
.wave span:nth-child(10) {
  height: 50%;
}
.wave span:nth-child(11) {
  height: 25%;
}
.wave span:nth-child(12) {
  height: 40%;
}
.wave span:nth-child(13) {
  height: 40%;
}
.wave span:nth-child(14) {
  height: 25%;
}
.wave span:nth-child(15) {
  height: 50%;
}
.wave span:nth-child(16) {
  height: 100%;
}
.wave span:nth-child(17) {
  height: 70%;
}
.wave span:nth-child(18) {
  height: 35%;
}
.wave span:nth-child(19) {
  height: 60%;
}
.wave span:nth-child(20) {
  height: 95%;
}
.wave span:nth-child(21) {
  height: 45%;
}
.wave span:nth-child(22) {
  height: 80%;
}
.wave span:nth-child(23) {
  height: 55%;
}
.wave span:nth-child(24) {
  height: 30%;
}
.wave span:nth-child(n + 13) {
  background: var(--punch);
}

/* ── Sections ───────────────────────────────────────────────────────── */

section {
  padding: 56px 0;
}
.band {
  background: var(--surface);
  border-top: var(--stroke);
  border-bottom: var(--stroke);
}
.section-head {
  max-width: 40em;
  margin-bottom: 28px;
}
.section-head p {
  color: var(--muted);
  font-size: 1.1rem;
}

.grid {
  display: grid;
  gap: 20px;
}
.grid.three {
  grid-template-columns: repeat(3, 1fr);
}
.grid.four {
  grid-template-columns: repeat(4, 1fr);
}

.card {
  background: var(--surface);
  border: var(--stroke);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
}
.band .card {
  background: var(--paper);
}
.card p {
  color: var(--muted);
  margin: 0;
}
.step {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: var(--stroke);
  font-family: var(--display);
  font-weight: 800;
  margin-bottom: 14px;
}
.card:nth-child(1) .step {
  background: var(--punch);
}
.card:nth-child(2) .step {
  background: var(--sunny);
}
.card:nth-child(3) .step {
  background: var(--flip);
}
.card:nth-child(4) .step {
  background: var(--punch-soft);
}

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.facts li {
  background: var(--surface);
  border: var(--stroke);
  border-radius: 999px;
  padding: 8px 16px;
  font-weight: 700;
}

/* ── Documents (Support, Privacy, Terms) ────────────────────────────── */

.doc {
  padding: 24px 0 64px;
}
.doc .wrap {
  max-width: 760px;
}
.doc h1 {
  font-size: clamp(2rem, 6vw, 3rem);
}
.doc h2 {
  font-size: 1.5rem;
  margin-top: 2em;
}
.doc h3 {
  font-size: 1.15rem;
  margin-top: 1.5em;
}
.doc ul {
  padding-left: 1.3em;
}
.doc li {
  margin-bottom: 0.4em;
}
.meta {
  color: var(--muted);
}
.toc {
  background: var(--surface);
  border: var(--stroke);
  border-radius: 18px;
  padding: 16px 20px;
  margin: 24px 0;
}
.toc ol {
  margin: 0;
  padding-left: 1.3em;
  columns: 2;
  column-gap: 32px;
}
.contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: var(--flip-soft);
  border: var(--stroke);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 22px;
  margin: 24px 0 8px;
}
.contact p {
  margin: 0;
}
.button {
  display: inline-block;
  font-weight: 700;
  text-decoration: none;
  background: var(--punch);
  color: var(--ink);
  border: var(--stroke);
  border-radius: 999px;
  padding: 10px 20px;
  box-shadow: 3px 3px 0 var(--ink);
  overflow-wrap: anywhere;
}
.button:hover {
  color: var(--ink);
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--ink);
}
details {
  background: var(--surface);
  border: var(--stroke);
  border-radius: 16px;
  padding: 0 18px;
  margin-bottom: 12px;
}
summary {
  cursor: pointer;
  font-weight: 700;
  padding: 14px 0;
  list-style-position: outside;
}
details[open] summary {
  border-bottom: 2px solid var(--line);
  margin-bottom: 12px;
}
details > :last-child {
  margin-bottom: 16px;
}
table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0 20px;
  font-size: 15px;
  display: block;
  overflow-x: auto;
}
th,
td {
  text-align: left;
  vertical-align: top;
  border-bottom: 2px solid var(--line);
  padding: 10px 12px 10px 0;
}
th {
  font-weight: 700;
}

/* ── Footer ─────────────────────────────────────────────────────────── */

.site-footer {
  border-top: var(--stroke);
  padding: 28px 0 36px;
  font-size: 15px;
}
.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 12px 24px;
  flex-wrap: wrap;
}
.site-footer nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
.site-footer p {
  margin: 0;
  color: var(--muted);
}

/* ── Small screens ──────────────────────────────────────────────────── */

@media (max-width: 860px) {
  .hero .wrap {
    grid-template-columns: 1fr;
  }
  .stage {
    width: min(100%, 300px);
    order: -1;
  }
  .grid.three,
  .grid.four {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 560px) {
  body {
    font-size: 16px;
  }
  .grid.three,
  .grid.four {
    grid-template-columns: 1fr;
  }
  .toc ol {
    columns: 1;
  }
  .store {
    min-width: 0;
    flex: 1 1 140px;
  }
  .sticker {
    font-size: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .button:hover {
    transform: none;
  }
}
