/* Hoppi website. Tokens mirror apps/mobile (spec section 8.1). */
:root {
  --primary: #E2602F;
  --on-primary: #FFFFFF;
  --bg: #FAF6F0;
  --card: #FFFFFF;
  --text: #2A2320;
  --text-2: #6E625B;
  --chip: #F1E9E2;
  --success: #6F8F72;
  --highlight: #FCE3D3;
  --link: #8F3F1F;
  --border: #EDE3DA;
  --shadow: 0 2px 8px rgba(42, 35, 32, 0.06);
  --shadow-lg: 0 18px 40px rgba(42, 35, 32, 0.12);
  --radius-btn: 14px;
  --radius-card: 24px;
  --gutter: 20px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --primary: #F07A4A;
    --on-primary: #1C1816;
    --bg: #1C1816;
    --card: #26211E;
    --text: #F3ECE6;
    --text-2: #B8ACA3;
    --chip: #332B27;
    --success: #8FAE92;
    --highlight: #4A3328;
    --link: #E3845C;
    --border: #3A322D;
    --shadow: none;
    --shadow-lg: none;
    color-scheme: dark;
  }
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.6 "Nunito", -apple-system, system-ui, "Segoe UI", sans-serif;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 12px; letter-spacing: -0.01em; }
h1 { font-size: clamp(34px, 6vw, 54px); font-weight: 800; }
h2 { font-size: clamp(26px, 4vw, 36px); font-weight: 800; }
h3 { font-size: 19px; font-weight: 700; }
p { margin: 0 0 14px; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 var(--gutter); }
.muted { color: var(--text-2); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; z-index: 10; background: var(--card); padding: 8px 12px; }

/* Header */
.site-header { padding: 16px 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 800; font-size: 20px; }
.brand img { width: 40px; height: 40px; border-radius: 10px; }
.nav { display: flex; gap: 4px; }
.nav a { color: var(--text); text-decoration: none; font-weight: 700; font-size: 15px; padding: 8px 12px; border-radius: 10px; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--chip); }

/* Hero */
.hero { position: relative; padding: 28px 0 56px; }
.hero::before {
  content: ""; position: absolute; inset: 0 0 30% 0; z-index: -1;
  background: linear-gradient(180deg, var(--highlight) 0%, transparent 100%);
  opacity: 0.55;
}
.hero .wrap { display: grid; gap: 32px; align-items: center; }
.eyebrow { display: inline-block; font-size: 14px; font-weight: 700; color: var(--link); background: var(--highlight); padding: 4px 12px; border-radius: 999px; margin-bottom: 16px; }
.lead { font-size: 20px; color: var(--text-2); max-width: 34ch; }
.points { list-style: none; padding: 0; margin: 20px 0 28px; display: flex; flex-wrap: wrap; gap: 8px; }
.points li { display: flex; align-items: center; gap: 6px; background: var(--card); border: 1px solid var(--border); border-radius: 999px; padding: 6px 14px 6px 10px; font-size: 15px; font-weight: 700; }
.points svg { color: var(--success); flex: none; }
.hero-art { position: relative; display: flex; justify-content: center; }
.hero-art .phone { width: min(270px, 70vw); }
.hero-art .mascot { position: absolute; width: min(190px, 40vw); left: 50%; bottom: -24px; transform: translateX(-118%); filter: drop-shadow(0 10px 18px rgba(42, 35, 32, 0.18)); }

/* Store availability */
.stores { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.store {
  display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 18px;
  border-radius: var(--radius-btn); background: var(--text); color: var(--bg); text-decoration: none;
}
.store svg { flex: none; }
.store small { display: block; font-size: 11px; font-weight: 600; opacity: 0.8; line-height: 1.2; }
.store strong { display: block; font-size: 17px; line-height: 1.2; }
.store[aria-disabled="true"] { opacity: 0.88; cursor: default; }
.soon { font-size: 14px; color: var(--text-2); width: 100%; margin: 4px 0 0; }

/* Phone frame */
.phone { border-radius: 38px; padding: 8px; background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow-lg); }
.phone img { border-radius: 30px; width: 100%; aspect-ratio: 460 / 1000; object-fit: cover; }

/* Sections */
section { padding: 56px 0; }
.section-head { max-width: 620px; margin-bottom: 32px; }
.feature { display: grid; gap: 28px; align-items: center; }
.feature + .feature { margin-top: 64px; }
.feature .phone { width: min(260px, 72vw); margin: 0 auto; }
.feature ul { padding-left: 0; list-style: none; margin: 16px 0 0; }
.feature li { position: relative; padding-left: 28px; margin-bottom: 10px; }
.feature li::before { content: ""; position: absolute; left: 4px; top: 10px; width: 10px; height: 10px; border-radius: 50%; background: var(--primary); }
.feature h3 { font-size: clamp(24px, 3vw, 30px); font-weight: 800; }
.tag { display: inline-block; font-size: 13px; font-weight: 700; color: var(--text-2); background: var(--chip); padding: 2px 10px; border-radius: 8px; margin-bottom: 12px; }

.band { background: var(--card); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 24px; box-shadow: var(--shadow); }
.band .card { background: var(--bg); box-shadow: none; }
.card p { color: var(--text-2); margin: 0; font-size: 16px; }
.icon { width: 44px; height: 44px; border-radius: 14px; background: var(--highlight); color: var(--link); display: grid; place-items: center; margin-bottom: 14px; }

.discover { display: grid; gap: 24px; align-items: center; }
.discover img { width: min(260px, 60vw); margin: 0 auto; }

/* Plans */
.plans { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.plan h3 { font-size: 22px; }
.plan ul { list-style: none; padding: 0; margin: 16px 0 0; }
.plan li { display: flex; gap: 10px; padding: 8px 0; border-top: 1px solid var(--border); font-size: 16px; }
.plan li:first-child { border-top: 0; }
.plan li svg { flex: none; margin-top: 4px; color: var(--success); }
.plan.pro { border: 2px solid var(--primary); }
.plan .note { margin-top: 16px; font-size: 15px; color: var(--text-2); }

.privacy-strip { display: grid; gap: 24px; align-items: center; }

/* Long-form pages */
.doc { max-width: 700px; padding-top: 16px; padding-bottom: 64px; }
.doc h1 { font-size: clamp(32px, 5vw, 42px); }
.doc h2 { font-size: 22px; margin-top: 36px; }
.doc h3 { margin-top: 24px; }
.doc ul { padding-left: 22px; }
.doc li { margin-bottom: 6px; }
.summary { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 20px 24px; margin: 24px 0; }
.summary ul { margin: 8px 0 0; }

details { background: var(--card); border: 1px solid var(--border); border-radius: 16px; margin-bottom: 10px; }
summary { cursor: pointer; padding: 16px 48px 16px 20px; font-weight: 700; list-style: none; position: relative; }
summary::-webkit-details-marker { display: none; }
summary::after { content: ""; position: absolute; right: 22px; top: 50%; width: 9px; height: 9px; border-right: 2px solid var(--text-2); border-bottom: 2px solid var(--text-2); transform: translateY(-70%) rotate(45deg); transition: transform 0.2s; }
details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
details > div { padding: 0 20px 16px; color: var(--text-2); }
details > div p:last-child { margin-bottom: 0; }

.contact { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; background: var(--highlight); border-radius: var(--radius-card); padding: 24px; margin: 40px 0 0; }
.contact img { width: 96px; }
.contact div { flex: 1 1 240px; }
.contact p { margin: 0 0 12px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px;
  border-radius: var(--radius-btn); background: var(--primary); color: var(--on-primary);
  font-weight: 800; font-size: 17px; text-decoration: none;
}
.btn:hover { filter: brightness(1.05); }

/* Guides (reference pages) */
[hidden] { display: none !important; }
.guide-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; }
.guide-nav a { color: var(--text); text-decoration: none; font-weight: 700; font-size: 15px; padding: 6px 14px; border-radius: 999px; background: var(--chip); }
.guide-nav a[aria-current="page"] { background: var(--highlight); color: var(--link); }
.guide .lead { max-width: none; font-size: 19px; }
.table-wrap { overflow-x: auto; margin: 0 0 16px; border: 1px solid var(--border); border-radius: 16px; background: var(--card); }
table.ref { width: 100%; border-collapse: collapse; font-size: 16px; }
.ref th, .ref td { text-align: left; vertical-align: top; padding: 12px 14px; border-top: 1px solid var(--border); overflow-wrap: anywhere; }
.ref thead th { border-top: 0; font-size: 14px; color: var(--text-2); background: var(--chip); }
.ref tbody th { font-weight: 700; white-space: nowrap; }
.ref.num td, .ref.num tbody th { font-variant-numeric: tabular-nums; }
.ref code { font: 700 16px/1.4 "Nunito", system-ui, sans-serif; color: var(--link); white-space: nowrap; }
.ref tr:target { background: var(--highlight); }
.how { color: var(--text-2); font-size: 15px; }
.weight-num { display: inline-grid; place-items: center; min-width: 26px; height: 26px; margin-right: 4px; border-radius: 8px; background: var(--highlight); color: var(--link); font-size: 14px; }
.cta { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; background: var(--highlight); border-radius: var(--radius-card); padding: 24px; margin: 48px 0 0; }
.cta img { width: 112px; }
.cta div { flex: 1 1 240px; }
.cta h2 { margin-top: 0; }
.cta .stores { margin-top: 16px; }
.guide-grid { display: grid; gap: 16px; margin-top: 24px; }
.guide-card { display: block; color: var(--text); text-decoration: none; }
.guide-card h2 { font-size: 21px; margin: 0 0 6px; color: var(--link); }
.guide-card:hover { border-color: var(--primary); }
@media (max-width: 420px) {
  .ref th, .ref td { padding: 10px; }
  .ref tbody th { white-space: normal; }
}

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 32px 0 40px; font-size: 15px; color: var(--text-2); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; align-items: center; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.site-footer a { color: var(--text-2); }

@media (min-width: 820px) {
  .hero { padding: 48px 0 88px; }
  .hero .wrap { grid-template-columns: 1.15fr 0.85fr; }
  .hero-art .mascot { transform: translateX(-130%); }
  .feature { grid-template-columns: 1fr 1fr; gap: 56px; }
  .feature.flip .copy { order: 2; }
  .grid { grid-template-columns: repeat(3, 1fr); }
  .discover, .privacy-strip { grid-template-columns: 1fr 1.4fr; gap: 48px; }
  section { padding: 80px 0; }
}

@media (max-width: 420px) {
  .nav a { padding: 8px; font-size: 14px; }
  .brand span { display: none; }
}
