/* Ranked website — "creamsicle" palette to match the app. */
:root {
  --bg: #fffaf3;          /* vanilla */
  --surface: #f6eee3;     /* cream */
  --card: #ffffff;
  --tint: #fdecdb;        /* apricot cream */
  --peach: #f8b77e;
  --orange: #e4782a;      /* tangerine */
  --orange-ink: #b85514;  /* tangerine dark enough for text on vanilla */
  --ink: #2a211c;
  --muted: #6e615a;
  --line: rgba(42, 33, 28, 0.1);
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body: "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --logo: "Nunito", ui-rounded, "SF Pro Rounded", system-ui, sans-serif;
  --radius: 22px;
  --max: 1080px;
  --prose: 720px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 17px/1.65 var(--body);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--orange-ink); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--peach); outline-offset: 3px; border-radius: 6px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 12px; background: var(--card); padding: 8px 14px; z-index: 10; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 5; background: rgba(255, 250, 243, 0.92); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 8px; font: 900 25px/1 var(--logo); letter-spacing: -0.02em; color: var(--orange); text-decoration: none; }
.logo svg { width: 21px; height: 23px; transform: rotate(-8deg) translateY(-1px); }
.logo:hover { color: var(--orange); }
.nav { display: flex; gap: 22px; font-size: 15px; font-weight: 600; }
.nav a { color: var(--ink); text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--orange-ink); }
@media (max-width: 640px) { .nav { gap: 14px; font-size: 14px; } .nav .hide-sm { display: none; } }

/* ---------- Type ---------- */
h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -0.015em; color: var(--ink); text-wrap: balance; }
h1 { font-size: clamp(38px, 6.4vw, 64px); line-height: 1.04; margin: 0 0 18px; }
h2 { font-size: clamp(26px, 3.6vw, 36px); line-height: 1.15; margin: 0 0 14px; }
h3 { font-size: 21px; line-height: 1.3; margin: 0 0 6px; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--orange-ink); margin-bottom: 14px; }
.lede { font-size: 20px; color: var(--muted); max-width: 34ch; }
em.accent { font-style: italic; color: var(--orange); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 10px; height: 52px; padding: 0 26px; border-radius: 999px; font-weight: 700; font-size: 16px; text-decoration: none; border: 1px solid transparent; }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #000; color: #fff; }
.btn-ghost { background: var(--card); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { color: var(--orange-ink); }
.btn svg { width: 18px; height: 18px; }
.btn[aria-disabled="true"] { cursor: default; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.fine { font-size: 14px; color: var(--muted); margin-top: 14px; }

/* ---------- Home: hero ---------- */
.hero { padding: 64px 0 72px; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.hero-art { position: relative; display: flex; justify-content: center; min-height: 460px; }
.hero-art::before { content: ""; position: absolute; inset: 8% 0 4% 6%; background: radial-gradient(60% 60% at 50% 45%, var(--peach) 0%, rgba(248, 183, 126, 0.35) 45%, transparent 72%); z-index: 0; }
.phone { position: relative; z-index: 1; width: 236px; background: #1c1a19; border-radius: 38px; padding: 7px; box-shadow: 0 30px 60px -30px rgba(184, 85, 20, 0.55); }
.phone img { border-radius: 31px; aspect-ratio: 540 / 1170; object-fit: cover; background: var(--tint); }
.phone.back { transform: rotate(-7deg) translate(34px, 26px); }
.phone.front { transform: rotate(5deg) translate(-34px, -8px); margin-left: -120px; }
@media (max-width: 860px) {
  .hero { padding: 40px 0 56px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 36px; }
  .hero-art { min-height: 0; }
  .phone { width: 190px; border-radius: 30px; }
  .phone img { border-radius: 24px; }
  .phone.front { margin-left: -100px; }
}

/* ---------- Home: sections ---------- */
.section { padding: 76px 0; border-top: 1px solid var(--line); }
.section.alt { background: var(--card); }
.section-head { max-width: 640px; margin-bottom: 38px; }
.section-head p { color: var(--muted); margin: 0; }
.about { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.about p { margin: 0 0 16px; }
@media (max-width: 760px) { .about { grid-template-columns: 1fr; gap: 12px; } }

.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.cards.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 24px; }
.section.alt .card { background: var(--bg); }
.card p { margin: 0; color: var(--muted); font-size: 16px; }
.card .num { font: 600 34px/1 var(--display); color: var(--orange); margin-bottom: 14px; }
.icon { width: 44px; height: 44px; border-radius: 13px; background: var(--tint); color: var(--orange-ink); display: grid; place-items: center; margin-bottom: 16px; }
.icon svg { width: 22px; height: 22px; }
@media (max-width: 900px) { .cards.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .cards, .cards.four { grid-template-columns: 1fr; } }

.cta { text-align: center; background: var(--tint); border-radius: 32px; padding: 56px 24px; }
.cta p { color: var(--muted); max-width: 46ch; margin: 0 auto; }
.cta .btn-row { justify-content: center; }

/* ---------- Legal / prose pages ---------- */
.page-head { padding: 56px 0 30px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, var(--tint), var(--bg)); }
.page-head .wrap, .prose { max-width: calc(var(--prose) + 40px); }
.page-head h1 { font-size: clamp(34px, 5.4vw, 50px); margin-bottom: 8px; }
.page-head p { margin: 0; color: var(--muted); }
.prose { margin: 0 auto; padding: 36px 20px 80px; }
.prose h2 { font-size: 26px; margin: 44px 0 10px; scroll-margin-top: 84px; }
.prose h3 { font-size: 19px; margin: 26px 0 6px; font-family: var(--body); font-weight: 700; letter-spacing: 0; }
.prose p, .prose li { color: #3a302a; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin-bottom: 6px; }
.prose .caps { text-transform: uppercase; font-size: 15px; letter-spacing: 0.01em; }
.note { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--orange); border-radius: 14px; padding: 16px 18px; margin: 22px 0; }
.note.warn { background: #fff4ec; }
.note p:last-child, .note ul:last-child { margin-bottom: 0; }
.note p:first-child { margin-top: 0; }
.toc { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px 22px; margin: 8px 0 26px; }
.toc strong { display: block; font-size: 14px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.toc ol { margin: 0; columns: 2; column-gap: 28px; font-size: 15px; }
.toc li { break-inside: avoid; margin-bottom: 4px; }
@media (max-width: 600px) { .toc ol { columns: 1; } }
.fill { background: #fff1b8; border-radius: 4px; padding: 0 4px; }

table.hotlines { width: 100%; border-collapse: collapse; margin: 14px 0 6px; font-size: 16px; }
table.hotlines th, table.hotlines td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.hotlines th { font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
table.hotlines td:last-child { white-space: nowrap; font-weight: 700; }
@media (max-width: 520px) { table.hotlines td:last-child { white-space: normal; } }

details { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 4px 20px; margin-bottom: 12px; }
details summary { cursor: pointer; font-weight: 700; padding: 14px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
details summary::-webkit-details-marker { display: none; }
details summary::after { content: "+"; color: var(--orange); font-size: 22px; line-height: 1; }
details[open] summary::after { content: "–"; }
details p { margin-top: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #e9dfd6; padding: 56px 0 36px; font-size: 15px; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { color: var(--peach); text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.site-footer .logo { color: #fff; }
.site-footer h4 { font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; color: #b8aaa0; margin: 0 0 12px; font-weight: 700; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer .blurb { color: #b8aaa0; margin: 14px 0 16px; max-width: 30ch; }
.support-mail { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }
.legal-line { border-top: 1px solid rgba(255, 255, 255, 0.12); margin-top: 40px; padding-top: 22px; color: #b8aaa0; font-size: 13px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; }
.legal-line p { margin: 0; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media print { .site-header, .site-footer, .toc { display: none; } body { background: #fff; } }
