/*
  befamous.group — one stylesheet for the landing page and the documents.

  Colours are the app's own (front/src/assets/styles/tokens.ts): the feed's near-black
  grounds, accent-orange-500, the warm browns for quiet text, the title medals.
  The landing is dark like the feed. The documents follow the reader's system theme,
  because a policy is read, not watched.
*/

@font-face { font-family: "DM Sans"; src: url("fonts/DMSans-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("fonts/DMSans-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("fonts/DMSans-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }

:root {
  /* light — the documents' default */
  --bg: #fafafa;              /* neutrals-white-100 */
  --surface: #ffffff;
  --surface-2: #f3f3f3;
  --line: #e5e4e4;
  --fg: #080708;              /* neutrals-black-500 */
  --fg-2: #675d55;            /* neutrals-brown-500 */
  --fg-3: #857d77;
  --accent: #ff602e;          /* accent-orange-500 */
  --accent-ink: #b54421;      /* accent-orange-700, for text on light */
  --accent-soft: #fff2ee;
  --on-accent: #ffffff;
  --gold: #c8920a; --silver: #7c8694; --bronze: #b06a35;
  --note-bg: #fffaec; --note-line: #e6b63c;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121112; --surface: #1b1a1b; --surface-2: #262526; --line: #343233;
    --fg: #fafafa; --fg-2: #b9b4b1; --fg-3: #99928d;
    --accent: #ff602e; --accent-ink: #ff9473; --accent-soft: #2b1a12; --on-accent: #ffffff;
    --gold: #e3b341; --silver: #b6bcc4; --bronze: #d0915e;
    --note-bg: #2d2510; --note-line: #997928;
    color-scheme: dark;
  }
}
:root[data-theme="dark"], .stage {
  --bg: #080708; --surface: #121112; --surface-2: #1b1a1b; --line: #262526;
  --fg: #fafafa; --fg-2: #b9b4b1; --fg-3: #99928d;
  --accent: #ff602e; --accent-ink: #ff9473; --accent-soft: #2b1a12; --on-accent: #ffffff;
  --gold: #e3b341; --silver: #b6bcc4; --bronze: #d0915e;
  --note-bg: #2d2510; --note-line: #997928;
  color-scheme: dark;
}
/* the landing is the feed: dark whatever the system says */
:root:has(body.stage) { color-scheme: dark; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 17px/1.55 "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { text-wrap: balance; margin: 0; line-height: 1.1; letter-spacing: -0.02em; }
p { margin: 0; }

.wrap {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}

/* ── header ─────────────────────────────────────────────── */
.top {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 19px; letter-spacing: -0.01em; }
.brand img { width: 34px; height: 34px; }
.nav { display: flex; gap: 22px; margin-left: auto; font-size: 15px; font-weight: 500; }
.nav a { text-decoration: none; color: var(--fg-2); }
.nav a:hover { color: var(--fg); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 999px;
  font: 700 16px/1 "DM Sans", system-ui, sans-serif; text-decoration: none;
  background: var(--accent); color: var(--on-accent); border: 0; cursor: pointer;
}
.btn:hover { background: #e8572a; }
.btn.quiet { background: var(--surface-2); color: var(--fg); }
.btn.quiet:hover { background: var(--line); }
.top .btn { min-height: 40px; padding: 0 18px; font-size: 15px; }

/* ── hero ───────────────────────────────────────────────── */
.hero { padding-block: 72px 96px; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent-ink);
}
.eyebrow::before { content: "#"; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 13px; letter-spacing: 0; }
.hero h1 { font-size: clamp(56px, 10vw, 120px); line-height: 0.92; margin-top: 20px; letter-spacing: -0.045em; }
.hero h1 em { font-style: normal; color: var(--accent); }
.lede { margin-top: 24px; font-size: 20px; line-height: 1.5; color: var(--fg-2); max-width: 32em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; align-items: center; }
.store-note { font-size: 14px; color: var(--fg-3); }

/* ── phone mockups ──────────────────────────────────────── */
.phone {
  position: relative; width: 300px; max-width: 100%; aspect-ratio: 300 / 620;
  margin-inline: auto; border-radius: 46px; padding: 10px;
  background: #1b1a1b; box-shadow: 0 0 0 1px #343233, 0 40px 80px -24px rgba(0, 0, 0, 0.7);
}
.screen { position: relative; height: 100%; border-radius: 37px; overflow: hidden; background: #080708; color: #fafafa; }
.screen .bar { position: absolute; inset: 0 0 auto; z-index: 3; display: flex; justify-content: center; gap: 16px; padding-top: 46px; font-size: 13px; font-weight: 700; color: rgba(255,255,255,0.6); }
.screen .bar b { color: #fff; position: relative; }
.screen .bar b::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; border-radius: 2px; background: #fff; }
.split { position: absolute; inset: 0; display: grid; grid-template-rows: 1fr 1fr; gap: 3px; }
.split .clip { background-size: cover; background-position: center; position: relative; }
.split .clip::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8,7,8,0.25), rgba(8,7,8,0) 30%, rgba(8,7,8,0) 60%, rgba(8,7,8,0.6)); }
.who { position: absolute; left: 14px; bottom: 12px; z-index: 2; display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; }
.who i { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 11px; }
.vs {
  position: absolute; left: 50%; top: 50%; z-index: 4; transform: translate(-50%, -50%);
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: #fff; font-weight: 700; font-size: 17px; letter-spacing: -0.02em;
  box-shadow: 0 0 0 4px #080708;
}
.rail { position: absolute; right: 10px; bottom: 20%; z-index: 4; display: grid; gap: 14px; justify-items: center; font-size: 11px; font-weight: 700; }
.rail span { display: grid; justify-items: center; gap: 3px; }
.rail svg { width: 26px; height: 26px; }
.vote {
  position: absolute; left: 14px; right: 14px; bottom: 16px; z-index: 4;
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
}
.vote span { height: 40px; border-radius: 999px; display: grid; place-items: center; font-size: 13px; font-weight: 700; background: rgba(255,255,255,0.16); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.vote span.on { background: var(--accent); }

.hero-art { position: relative; }
.hero-art .chip {
  position: absolute; z-index: 5; display: flex; align-items: center; gap: 10px;
  padding: 10px 14px 10px 10px; border-radius: 18px; font-size: 13px; font-weight: 700;
  background: #1b1a1b; color: #fafafa; box-shadow: 0 0 0 1px #343233, 0 18px 40px -12px rgba(0,0,0,0.6);
}
.hero-art .chip small { display: block; font-weight: 500; color: #b9b4b1; font-size: 12px; }
.chip .medal { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #2d2510; color: #e3b341; font-size: 15px; }
.chip.c1 { left: -8px; top: 22%; }
.chip.c2 { left: -8px; bottom: 24%; }
.chip .plus { color: #ff9473; }

/* ── sections ───────────────────────────────────────────── */
section { padding-block: 88px; }
section + section { border-top: 1px solid var(--line); }
.kicker { font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-3); }
.h2 { font-size: clamp(34px, 5vw, 56px); margin-top: 14px; max-width: 16em; }
.sub { margin-top: 18px; font-size: 19px; color: var(--fg-2); max-width: 36em; }

.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 48px; }
.mode { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 28px; padding: 32px; display: flex; flex-direction: column; gap: 22px; }
.mode .tag { align-self: flex-start; padding: 6px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); font-size: 13px; font-weight: 700; }
.mode h3 { font-size: 34px; letter-spacing: -0.03em; }
.mode h3 span { display: block; color: var(--accent); }
.mode ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; color: var(--fg-2); font-size: 16px; }
.mode li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; }
.mode li::before { content: ""; width: 8px; height: 8px; margin: 9px 0 0 6px; border-radius: 50%; background: var(--accent); }
.mode li b { color: var(--fg); font-weight: 700; }

.entries { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.entries div { position: relative; aspect-ratio: 9 / 14; border-radius: 14px; background-size: cover; background-position: center; overflow: hidden; }
.entries div::after { content: attr(data-rank); position: absolute; left: 8px; top: 8px; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: rgba(8,7,8,0.7); color: #fff; }
.entries div[data-rank="1"]::after { background: #e3b341; color: #2d2510; }
.entries div[data-rank="2"]::after { background: #b6bcc4; color: #23262b; }
.entries div[data-rank="3"]::after { background: #d0915e; color: #2e1e13; }

.duel { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; }
.duel div { aspect-ratio: 9 / 14; border-radius: 14px; background-size: cover; background-position: center; position: relative; overflow: hidden; }
.duel div span { position: absolute; left: 0; right: 0; bottom: 0; padding: 10px; font-size: 13px; font-weight: 700; color: #fff; background: linear-gradient(transparent, rgba(8,7,8,0.75)); }
.duel b { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; font-size: 15px; }
.meter { margin-top: 4px; display: grid; gap: 8px; }
.meter .track { height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; display: flex; }
.meter .track i { display: block; background: var(--accent); }
.meter .track i + i { background: var(--fg-3); }
.meter .legend { display: flex; justify-content: space-between; font-size: 13px; font-weight: 700; color: var(--fg-2); }

/* ── rankings ───────────────────────────────────────────── */
.rank-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.board { background: var(--surface); border: 1px solid var(--line); border-radius: 28px; padding: 20px; }
.board .tabs { display: flex; gap: 6px; padding: 4px; border-radius: 999px; background: var(--surface-2); margin-bottom: 12px; }
.board .tabs span { flex: 1; text-align: center; padding: 8px; border-radius: 999px; font-size: 14px; font-weight: 700; color: var(--fg-2); }
.board .tabs span.on { background: var(--surface); color: var(--fg); box-shadow: 0 1px 2px rgba(0,0,0,0.12); }
.row { display: grid; grid-template-columns: 30px 40px 1fr auto; align-items: center; gap: 12px; padding: 10px 8px; border-radius: 16px; }
.row + .row { border-top: 1px solid var(--line); }
.row .n { font-weight: 700; color: var(--fg-3); text-align: center; }
.row .n.g { color: var(--gold); } .row .n.s { color: var(--silver); } .row .n.b { color: var(--bronze); }
.row .av { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px; }
.row .nm { min-width: 0; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .nm small { display: block; font-weight: 500; font-size: 13px; color: var(--fg-3); }
.row .bp { font-weight: 700; font-variant-numeric: tabular-nums; }
.row .bp small { font-weight: 500; color: var(--fg-3); font-size: 12px; margin-left: 3px; }
.row.you { background: var(--accent-soft); border-top-color: transparent; }
.row.you + .row { border-top-color: transparent; }

.titles { display: grid; gap: 14px; margin-top: 32px; }
.title { display: grid; grid-template-columns: 48px 1fr; gap: 14px; align-items: center; }
.title .m { width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; font-weight: 700; }
.title .m.g { background: #2d2510; color: #e3b341; }
.title .m.s { background: #23262b; color: #b6bcc4; }
.title .m.b { background: #2e1e13; color: #d0915e; }
.title b { display: block; }
.title span { color: var(--fg-2); font-size: 15px; }

/* ── categories ─────────────────────────────────────────── */
.cats { margin-top: 40px; display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px 12px; }
.cat { min-width: 0; }
.cat div { aspect-ratio: 1; border-radius: 22px; background-size: cover; background-position: center; }
.cat span { display: block; margin-top: 10px; font-size: 15px; font-weight: 700; }
@media (max-width: 900px) { .cats { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 560px) { .cats { grid-template-columns: repeat(3, 1fr); } }

/* ── safety ─────────────────────────────────────────────── */
.safe-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 44px; }
.safe { min-width: 0; padding: 26px; border-radius: 24px; background: var(--surface); border: 1px solid var(--line); display: grid; gap: 10px; align-content: start; }
.safe .ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); }
.safe .ic svg { width: 22px; height: 22px; }
.safe b { font-size: 18px; }
.safe span { color: var(--fg-2); font-size: 15px; }

/* ── faq ────────────────────────────────────────────────── */
.faq { margin-top: 40px; display: grid; gap: 10px; max-width: 820px; }
.faq details { border-radius: 20px; background: var(--surface); border: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 20px 56px 20px 22px; font-weight: 700; font-size: 18px; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 22px; top: 50%; transform: translateY(-50%); font-size: 24px; color: var(--accent); }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 22px 22px; color: var(--fg-2); }
.faq a { color: var(--accent-ink); }

/* ── download band ──────────────────────────────────────── */
.band { background: var(--accent); color: #080708; border: 0 !important; }
.band .wrap { display: flex; flex-wrap: wrap; gap: 28px; align-items: center; justify-content: space-between; }
.band h2 { font-size: clamp(38px, 6vw, 72px); letter-spacing: -0.04em; }
.band p { margin-top: 12px; font-size: 18px; color: #080708; max-width: 30em; }
.band .btn { background: #080708; color: #fff; }
.band .btn:hover { background: #262526; }

/* ── footer ─────────────────────────────────────────────── */
.foot { padding-block: 48px; border-top: 1px solid var(--line); font-size: 15px; color: var(--fg-2); }
.foot .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.foot h4 { margin: 0 0 12px; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-3); }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--fg); text-decoration: underline; }
.foot .fine { grid-column: 1 / -1; padding-top: 24px; border-top: 1px solid var(--line); font-size: 13px; color: var(--fg-3); }

/* ── documents ──────────────────────────────────────────── */
.doc { padding-block: 56px 96px; }
.doc .wrap { max-width: 760px; }
.doc h1 { font-size: clamp(36px, 6vw, 52px); }
.doc .meta { margin-top: 14px; color: var(--fg-3); font-size: 15px; }
.doc h2 { font-size: 24px; margin-top: 48px; letter-spacing: -0.01em; }
.doc h3 { font-size: 18px; margin-top: 28px; }
.doc p, .doc ul, .doc ol { margin-top: 14px; color: var(--fg-2); }
.doc li { margin-top: 6px; }
.doc strong { color: var(--fg); }
.doc a { color: var(--accent-ink); }
.doc .toc { margin-top: 32px; padding: 20px 24px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); }
.doc .toc ol { margin: 0; padding-left: 20px; columns: 2; column-gap: 32px; }
.doc table { width: 100%; border-collapse: collapse; font-size: 15px; }
.doc .table { margin-top: 16px; overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); color: var(--fg-2); }
.doc th { color: var(--fg); background: var(--surface); font-weight: 700; }
.doc tr:last-child td { border-bottom: 0; }
.doc .steps { counter-reset: s; list-style: none; padding: 0; display: grid; gap: 12px; }
.doc .steps li { counter-increment: s; display: grid; grid-template-columns: 36px 1fr; gap: 12px; align-items: start; margin: 0; }
.doc .steps li::before { content: counter(s); width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; font-weight: 700; }
.card { margin-top: 20px; padding: 22px 24px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); }
.card p:first-child { margin-top: 0; }

/* Draft markers: text that is waiting for the company's own facts. Remove before going live. */
.todo { background: var(--note-bg); box-shadow: inset 0 -2px 0 var(--note-line); color: var(--fg); padding: 0 3px; border-radius: 3px; font-style: normal; }
.draft-banner { background: var(--note-bg); border-bottom: 1px solid var(--note-line); font-size: 14px; padding-block: 10px; }
.draft-banner .wrap { display: block; }

/* ── narrow ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero .wrap, .rank-grid { grid-template-columns: 1fr; }
  .hero { padding-block: 40px 72px; }
  .modes, .safe-grid { grid-template-columns: 1fr; }
  .foot .wrap { grid-template-columns: 1fr 1fr; }
  .foot .wrap > :first-child { grid-column: 1 / -1; }
  .nav { display: none; }
  .top .btn { margin-left: auto; }
}
@media (max-width: 560px) {
  section { padding-block: 64px; }
  .mode { padding: 22px; }
  .doc .toc ol { columns: 1; }
  .hero-art .chip.c1 { left: 0; }
  .hero-art .chip.c2 { left: 0; }
}
