/* Obby Hub — same "Sky Mix" look as the app (ObbyIos/DesignSystem/Tokens/Palette.swift, Color+Palette.swift):
   light sky ground with white studs, white panels with a navy outline + navy drop, gradient plates with a thick lip. */

@font-face { font-family: "Baloo 2"; src: url("fonts/baloo2_semibold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Baloo 2"; src: url("fonts/baloo2_bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Baloo 2"; src: url("fonts/baloo2_extrabold.ttf") format("truetype"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("fonts/nunito_regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("fonts/nunito_bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("fonts/nunito_extrabold.ttf") format("truetype"); font-weight: 800; font-display: swap; }

:root {
  --ink: #1d3466;
  --text: #1b2a5a;
  --paper: #ffffff;
  --cream: #f2faff;
  --muted: #4d6c9c;
  --rim: rgba(70, 140, 210, 0.18);
  /* Gradient trios: light top / base / lip (Palette.swift) */
  --orange-t: #ffb65a; --orange-b: #ff7417; --orange-l: #c9520a;
  --blue-t: #62cfff;   --blue-b: #1e87f0;   --blue-l: #135cc2;
  --green-t: #7df06a;  --green-b: #24c043;  --green-l: #12882d;
  --yellow-t: #ffe66a; --yellow-b: #ffb300; --yellow-l: #d27f00;
  --tab-t: #8fdbff;    --tab-b: #38b6f5;
  /* Tapes (Color.tapes) */
  --tape-blue: rgba(98, 207, 255, 0.9);
  --tape-yellow: rgba(255, 230, 106, 0.9);
  --tape-green: rgba(125, 240, 106, 0.9);
  --radius: 18px;
  --drop: 0 3px 0 var(--ink);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: "Nunito", system-ui, sans-serif;
  font-weight: 700;
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  /* Sky ground + faint white studs (CanvasBackdrop / DotPattern) */
  background:
    radial-gradient(circle at 12px 12px, rgba(255, 255, 255, 0.28) 4.5px, rgba(40, 110, 180, 0.05) 5px, transparent 6px) 0 0 / 24px 24px fixed,
    linear-gradient(180deg, #d3f0ff 0%, #b9e4fb 45%, #a2d8f6 100%) fixed;
  background-color: #b9e4fb;
  -webkit-font-smoothing: antialiased;
}

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

main { flex: 1; }

a { color: inherit; }

h1, h2, h3 { font-family: "Baloo 2", system-ui, sans-serif; line-height: 1.15; margin: 0; color: var(--text); }

.wrap { width: min(1080px, 100% - 32px); margin-inline: auto; }

/* Top bar: white glass + navy line (skyBarFill) */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--ink);
}
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 10px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: "Baloo 2", sans-serif; font-weight: 800; font-size: 21px; color: var(--ink); }
.brand img { width: 40px; height: 40px; border-radius: 11px; border: 2px solid var(--ink); box-shadow: 0 2px 0 var(--ink); }
.nav { display: flex; gap: 6px; flex-wrap: wrap; }
.nav a {
  text-decoration: none; font-family: "Baloo 2", sans-serif; font-weight: 800; font-size: 16px;
  padding: 4px 14px; border-radius: 999px; border: 2px solid transparent;
}
/* Selected tab plate (Palette.tabOn) */
.nav a:hover, .nav a[aria-current="page"] {
  color: #fff; border-color: var(--ink);
  background: linear-gradient(180deg, var(--tab-t), var(--tab-b));
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.4), 0 2px 0 var(--ink);
  text-shadow: 0 1px 0 var(--ink);
}

/* Gradient plate button: light top → base + thick lip + highlight + navy outline + navy drop (LabelPlate) */
.btn {
  --t: var(--green-t); --b: var(--green-b); --l: var(--green-l);
  display: inline-flex; align-items: center; gap: 10px;
  font-family: "Baloo 2", sans-serif; font-weight: 800; font-size: 20px;
  text-decoration: none; color: #fff;
  -webkit-text-stroke: 4px var(--ink); paint-order: stroke fill;
  background: linear-gradient(180deg, var(--t), var(--b));
  padding: 10px 24px 12px;
  border: 2px solid var(--ink); border-radius: 14px;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.4), inset 0 -5px 0 var(--l), 0 3px 0 var(--ink);
  transition: transform 0.08s ease-out, box-shadow 0.08s ease-out;
}
.btn:hover { transform: translateY(-1px); box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.4), inset 0 -5px 0 var(--l), 0 4px 0 var(--ink); }
.btn:active { transform: translateY(3px); box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.4), inset 0 -2px 0 var(--l), 0 0 0 var(--ink); }
.btn.secondary { --t: var(--blue-t); --b: var(--blue-b); --l: var(--blue-l); }
.btn svg { width: 22px; height: 22px; flex: none; filter: drop-shadow(0 1px 0 var(--ink)); }

/* Hero */
.hero { padding-block: 48px 32px; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 32px; align-items: center; }
.hero .wrap > * { min-width: 0; }
.hero-logo { width: min(520px, 100%); filter: drop-shadow(0 6px 0 rgba(29, 52, 102, 0.12)); }
.hero p.lead { font-size: 20px; color: var(--muted); margin: 18px 0 26px; max-width: 36ch; }
.hero .actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-art { position: relative; }
.hero-art img { width: 100%; animation: float 5s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@media (prefers-reduced-motion: reduce) { .hero-art img { animation: none; } }
.badge-soon {
  position: absolute; left: 2%; bottom: 6%;
  font-family: "Baloo 2", sans-serif; font-weight: 800; font-size: 18px; color: #fff;
  -webkit-text-stroke: 4px var(--ink); paint-order: stroke fill;
  background: linear-gradient(180deg, var(--yellow-t), var(--yellow-b));
  padding: 4px 18px 7px;
  border: 2px solid var(--ink); border-radius: 999px;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.45), inset 0 -4px 0 var(--yellow-l), 0 3px 0 var(--ink);
  transform: rotate(-6deg);
}

/* White panel with tape (SurfacePanel): navy outline, thin light rim inside, navy drop */
.card {
  position: relative;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: inset 0 0 0 3px var(--paper), inset 0 0 0 5px var(--rim), var(--drop);
  padding: 26px 24px 22px;
}
.card::before {
  content: ""; position: absolute; top: -12px; left: 50%;
  width: 84px; height: 24px; transform: translateX(-50%) rotate(-3deg);
  background: var(--tape, var(--tape-blue));
}
.card.tape-yellow { --tape: var(--tape-yellow); }
.card.tape-green { --tape: var(--tape-green); }

/* Sections */
section { padding-block: 40px; }
.section-title {
  font-size: clamp(32px, 5vw, 46px); font-weight: 800; text-align: center; margin-bottom: 10px;
  color: #fff; -webkit-text-stroke: 7px var(--ink); paint-order: stroke fill; text-shadow: 0 4px 0 var(--ink);
}
.section-sub { text-align: center; color: var(--muted); margin: 0 auto 38px; max-width: 52ch; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.features .card h3 { font-size: 24px; margin: 12px 0 6px; }
.features .card p { margin: 0; color: var(--muted); }
.feature-icon {
  width: 68px; height: 68px; border-radius: 16px; border: 2px solid var(--ink);
  display: grid; place-items: center;
  background: linear-gradient(180deg, #eaf6ff, #c3e4fa);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.6), 0 2px 0 var(--ink);
}
.feature-icon img { width: 52px; height: 52px; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; counter-reset: step; }
.step { text-align: center; }
.step::after {
  counter-increment: step; content: counter(step);
  position: absolute; top: -18px; right: -12px;
  width: 42px; height: 42px; display: grid; place-items: center;
  font-family: "Baloo 2", sans-serif; font-weight: 800; font-size: 22px; color: #fff;
  -webkit-text-stroke: 4px var(--ink); paint-order: stroke fill;
  background: linear-gradient(180deg, var(--orange-t), var(--orange-b));
  border: 2px solid var(--ink); border-radius: 50%;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.4), inset 0 -4px 0 var(--orange-l), 0 2px 0 var(--ink);
}
.step .emoji { font-size: 42px; line-height: 1; }
.step h3 { font-size: 22px; margin: 10px 0 4px; }
.step p { margin: 0; color: var(--muted); }

.cta { text-align: center; }
.cta .card { max-width: 640px; margin-inline: auto; padding: 36px 24px; }
.cta img { width: 96px; height: 96px; border-radius: 24px; border: 2px solid var(--ink); box-shadow: 0 3px 0 var(--ink); margin: 0 auto 14px; }
.cta h2 { font-size: 36px; margin-bottom: 8px; }
.cta p { color: var(--muted); margin: 0 0 22px; }

/* Footer */
footer { border-top: 2px solid var(--ink); background: rgba(255, 255, 255, 0.62); margin-top: 40px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 14px 28px; justify-content: space-between; align-items: center; padding-block: 22px; font-size: 15px; }
footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
footer a { font-weight: 800; color: var(--ink); text-decoration-thickness: 2px; text-underline-offset: 3px; }
footer .muted { color: var(--muted); }

/* Legal pages */
.legal { padding-block: 36px 20px; }
.legal .card { padding: 36px clamp(20px, 5vw, 56px); }
.legal h1 { font-size: clamp(34px, 6vw, 48px); font-weight: 800; }
.legal .meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 22px; }
.chip {
  font-size: 14px; font-weight: 800; padding: 3px 12px; border-radius: 999px;
  border: 2px solid var(--ink); background: var(--cream);
}
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 0 0 8px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.toc { background: var(--cream); border: 2px dashed var(--ink); border-radius: 14px; padding: 16px 20px; margin: 22px 0 8px; }
.legal .toc h2 { font-size: 20px; margin: 0 0 6px; }
.toc ol { margin: 0; padding-left: 22px; columns: 2; column-gap: 32px; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }
.legal h2 { font-size: 26px; margin: 34px 0 8px; scroll-margin-top: 80px; }
.legal h3 { font-size: 20px; margin: 20px 0 6px; }
.legal p, .legal li { font-weight: 400; }
.legal strong { font-weight: 800; }
.legal ul { padding-left: 22px; margin: 6px 0 12px; }
.legal li { margin: 3px 0; }
.legal p { margin: 8px 0; }
.legal a { color: var(--blue-l); }
.back-top { display: inline-block; margin-top: 28px; }

/* Phones */
@media (max-width: 820px) {
  .hero .wrap { grid-template-columns: 1fr; text-align: center; }
  .hero-logo { margin-inline: auto; }
  .hero p.lead { margin-inline: auto; }
  .hero .actions { justify-content: center; }
  .hero-art { max-width: 420px; margin-inline: auto; }
  .features, .steps { grid-template-columns: 1fr; gap: 30px; }
  .toc ol { columns: 1; }
}
@media (max-width: 480px) {
  body { font-size: 16px; }
  .brand span { display: none; }
  .nav a { padding: 4px 10px; font-size: 15px; }
  .facts { grid-template-columns: 1fr; }
  .facts dd { margin-bottom: 6px; }
}
