/* Hoopo — hoopo.ca
 *
 * Every colour, radius and type step here is lifted from the app's own theme
 * (lib/theme/hoopo_colors.dart, hoopo_tokens.dart, hoopo_theme.dart) so that
 * someone arriving from this page into the app sees one product rather than
 * two. Where a value differs it is because a 1440px page is not a 390px phone,
 * never because it was re-picked by eye.
 */

/* ── Type ────────────────────────────────────────────────────────────────
 * Self-hosted, not a CDN: the app bundles these same five files so there is
 * no network dependency at launch and no flash of fallback type. Same reason
 * applies here, and it keeps the page working under the CSP.
 */
@font-face {
  font-family: 'Plus Jakarta Sans';
  src: url('fonts/PlusJakartaSans-400.ttf') format('truetype');
  font-weight: 400; font-display: swap;
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  src: url('fonts/PlusJakartaSans-500.ttf') format('truetype');
  font-weight: 500; font-display: swap;
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  src: url('fonts/PlusJakartaSans-600.ttf') format('truetype');
  font-weight: 600; font-display: swap;
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  src: url('fonts/PlusJakartaSans-700.ttf') format('truetype');
  font-weight: 700; font-display: swap;
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  src: url('fonts/PlusJakartaSans-800.ttf') format('truetype');
  font-weight: 800; font-display: swap;
}

/* ── Tokens ──────────────────────────────────────────────────────────────
 * Light is the complete set. Dark redefines only the values, never the
 * component rules, so nothing can end up with one theme's text on the other
 * theme's ground.
 */
:root {
  --primary: #C2334D;
  --on-primary: #FFFFFF;
  --primary-container: #FFD9DE;
  --on-primary-container: #400010;

  /* The original brand coral. White on it is 2.39:1 — it fails AA and is
   * never a button. It is a wash behind dark text, nothing more. */
  --brand-coral: #FE8383;

  /* Teal means money throughout the app: payouts, refunds, what you keep. */
  --tertiary: #0F6E63;
  --tertiary-container: #B4F0E4;
  --on-tertiary-container: #00201C;

  --star: #F5A524;

  --surface: #FDFCFC;
  --surface-low: #F7F5F6;
  --surface-high: #EAE8E9;
  --on-surface: #191719;
  --on-surface-variant: #4E4A4E;
  --outline-variant: #E1DDDF;

  /* The app icon's own gradient, measured rather than picked: 4.14:1 at its
   * lightest against the knocked-out mark, 6.67:1 at its darkest. */
  --grad-from: #D6485F;
  --grad-to: #A82A41;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-xxl: 28px;

  --ease-out: cubic-bezier(0.215, 0.61, 0.355, 1);
  --shadow: 0 1px 2px rgb(25 23 25 / .04), 0 8px 24px -8px rgb(25 23 25 / .10);
  --shadow-lg: 0 2px 4px rgb(25 23 25 / .05), 0 24px 56px -16px rgb(25 23 25 / .22);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --primary: #FFB2BC;
    --on-primary: #67001F;
    --primary-container: #8E1737;
    --on-primary-container: #FFD9DE;

    --tertiary: #88D6C8;
    --tertiary-container: #00514A;
    --on-tertiary-container: #B4F0E4;

    --surface: #131113;
    --surface-low: #1B191A;
    --surface-high: #2B2829;
    --on-surface: #E6E1E2;
    --on-surface-variant: #CFC7CA;
    --outline-variant: #4B4649;

    --shadow: 0 1px 2px rgb(0 0 0 / .5), 0 8px 24px -8px rgb(0 0 0 / .6);
    --shadow-lg: 0 2px 4px rgb(0 0 0 / .5), 0 24px 56px -16px rgb(0 0 0 / .7);
  }
}

:root[data-theme="dark"] {
  --primary: #FFB2BC;
  --on-primary: #67001F;
  --primary-container: #8E1737;
  --on-primary-container: #FFD9DE;
  --tertiary: #88D6C8;
  --tertiary-container: #00514A;
  --on-tertiary-container: #B4F0E4;
  --surface: #131113;
  --surface-low: #1B191A;
  --surface-high: #2B2829;
  --on-surface: #E6E1E2;
  --on-surface-variant: #CFC7CA;
  --outline-variant: #4B4649;
  --shadow: 0 1px 2px rgb(0 0 0 / .5), 0 8px 24px -8px rgb(0 0 0 / .6);
  --shadow-lg: 0 2px 4px rgb(0 0 0 / .5), 0 24px 56px -16px rgb(0 0 0 / .7);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

body {
  margin: 0;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont,
               'Segoe UI', system-ui, sans-serif;
  /* Explicit, not inherited: the page is composited over a ground painted in
   * the viewer's own theme, and a transparent body borrows it. */
  background: var(--surface);
  color: var(--on-surface-variant);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  color: var(--on-surface);
  font-weight: 800;
  letter-spacing: -0.028em;
  line-height: 1.12;
  text-wrap: balance;
  margin: 0;
}
h1 { font-size: clamp(2.25rem, 1.3rem + 3.9vw, 4.25rem); letter-spacing: -0.034em; }
h2 { font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.75rem); }
h3 { font-size: clamp(1.15rem, 1rem + 0.6vw, 1.4rem); letter-spacing: -0.02em; line-height: 1.25; }

p { margin: 0; }
a { color: var(--primary); }

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

:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap { width: min(1140px, 100% - 2.5rem); margin-inline: auto; }

.eyebrow {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--primary);
  margin: 0 0 .75rem;
}

.lede {
  font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.3125rem);
  line-height: 1.5;
  max-width: 62ch;
}

.section { padding: clamp(3.5rem, 2rem + 6vw, 7rem) 0; }
.section--tint { background: var(--surface-low); }

/* ── Buttons ─────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 52px;            /* the app's own button height */
  padding: 0 1.5rem;
  border: 0;
  border-radius: var(--radius-md);
  font: inherit;
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: .007em;
  text-decoration: none;
  cursor: pointer;
  transition: transform .12s var(--ease-out), filter .12s var(--ease-out);
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(1px); }

.btn--primary { background: var(--primary); color: var(--on-primary); }
.btn--onDark  { background: #fff; color: #7A1028; }
.btn--ghost {
  background: transparent;
  color: var(--on-surface);
  box-shadow: inset 0 0 0 1.5px var(--outline-variant);
}

/* ── Header ──────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--outline-variant);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
  height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
  color: var(--on-surface);
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  margin-right: auto;
}
.brand svg { width: 26px; height: 28px; color: var(--primary); }
.site-header nav { display: flex; gap: 1.5rem; align-items: center; }
.site-header nav a {
  color: var(--on-surface-variant);
  text-decoration: none;
  font-size: .95rem;
  font-weight: 600;
}
.site-header nav a:hover { color: var(--on-surface); }
@media (max-width: 720px) { .site-header nav { display: none; } }

/* ── Hero ────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(152deg, var(--grad-from), var(--grad-to));
  color: #fff;
  padding: clamp(3.5rem, 2rem + 7vw, 7rem) 0 0;
}
/* A soft off-centre bloom so the gradient reads as lit rather than flat. */
.hero::before {
  content: '';
  position: absolute;
  inset: -40% -10% auto -30%;
  height: 120%;
  background: radial-gradient(ellipse at 30% 25%,
              rgb(255 255 255 / .22), transparent 62%);
  pointer-events: none;
}
.hero .wrap {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(2rem, 1rem + 4vw, 4.5rem);
  align-items: end;
}
.hero h1 { color: #fff; }
.hero__copy { padding-bottom: clamp(3rem, 2rem + 4vw, 5.5rem); }
.hero__sub {
  color: rgb(255 255 255 / .92);
  font-size: clamp(1.0625rem, 1rem + 0.45vw, 1.375rem);
  line-height: 1.45;
  max-width: 34ch;
  margin: 1.15rem 0 2rem;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.hero__note {
  margin-top: 1.5rem;
  font-size: .875rem;
  color: rgb(255 255 255 / .78);
}
.hero__shot { display: flex; justify-content: center; align-items: flex-end; }

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero__copy { padding-bottom: 1rem; }
  .hero__shot { margin-top: 1rem; }
}

/* ── Phone frame ─────────────────────────────────────────────────────────
 * Drawn in CSS rather than composited into the PNGs, so the raw screenshots
 * stay reusable for App Store listings and the frame stays crisp at any size.
 */
.phone {
  --w: 280px;
  position: relative;
  width: var(--w);
  aspect-ratio: 1206 / 2622;      /* iPhone 16 Pro */
  border-radius: calc(var(--w) * .155);
  padding: calc(var(--w) * .0295);
  background: linear-gradient(160deg, #4a4247, #211d20 40%, #3a3438);
  box-shadow: var(--shadow-lg);
  flex: none;
}
/* <picture> must not introduce a box of its own, or the img's height:100%
 * has nothing to resolve against and the shot collapses. */
.phone picture { display: contents; }
.phone img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: calc(var(--w) * .127);
  background: var(--surface-low);
}
/* The Dynamic Island. Small, but its absence is what makes a mock look fake. */
.phone::after {
  content: '';
  position: absolute;
  top: calc(var(--w) * .052);
  left: 50%;
  transform: translateX(-50%);
  width: calc(var(--w) * .30);
  height: calc(var(--w) * .088);
  background: #0b0a0b;
  border-radius: 999px;
}
.phone--lg { --w: clamp(240px, 20vw, 330px); }

/* ── How it works ────────────────────────────────────────────────────── */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 1rem + 2vw, 2.75rem);
  margin-top: 3rem;
}
.step { display: flex; flex-direction: column; gap: 1.25rem; }
.step__n {
  display: inline-grid;
  place-items: center;
  width: 34px; height: 34px;
  border-radius: 999px;
  background: var(--primary-container);
  color: var(--on-primary-container);
  font-size: .875rem;
  font-weight: 800;
}
.step h3 { margin-bottom: .4rem; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

/* ── Categories ──────────────────────────────────────────────────────── */
.cats { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 2.25rem; }
.cat {
  padding: .6rem 1.05rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--outline-variant);
  color: var(--on-surface);
  font-size: .9375rem;
  font-weight: 600;
}
.section--tint .cat { background: var(--surface); }

/* ── Trust ───────────────────────────────────────────────────────────── */
.trust {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-top: 3rem;
}
.card {
  background: var(--surface);
  border: 1px solid var(--outline-variant);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
}
.card__icon {
  display: inline-grid;
  place-items: center;
  width: 42px; height: 42px;
  border-radius: var(--radius-md);
  background: var(--tertiary-container);
  color: var(--on-tertiary-container);
  margin-bottom: 1rem;
}
.card__icon svg { width: 21px; height: 21px; }
.card h3 { margin-bottom: .45rem; }
.card p { font-size: .9375rem; }

/* ── Owners ──────────────────────────────────────────────────────────── */
.owners { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 1rem + 4vw, 5rem); align-items: center; }
@media (max-width: 860px) { .owners { grid-template-columns: 1fr; } }
.fee {
  margin-top: 2rem;
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-lg);
  background: var(--tertiary-container);
  color: var(--on-tertiary-container);
}
.fee strong { font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; }

/* ── Waitlist ────────────────────────────────────────────────────────── */
.cta { text-align: center; }
.cta form {
  display: flex;
  gap: .6rem;
  max-width: 460px;
  margin: 2rem auto 0;
}
.cta input {
  flex: 1;
  min-height: 52px;
  padding: 0 1.1rem;
  font: inherit;
  font-size: .95rem;
  color: var(--on-surface);
  background: var(--surface);
  border: 1.5px solid var(--outline-variant);
  border-radius: var(--radius-md);
}
.cta input::placeholder { color: var(--on-surface-variant); opacity: .8; }
.cta__msg { margin-top: 1rem; font-size: .9375rem; min-height: 1.4em; }
.cta__msg[data-state="ok"] { color: var(--tertiary); font-weight: 700; }
.cta__msg[data-state="error"] { color: #BA1A1A; font-weight: 700; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .cta__msg[data-state="error"] { color: #FFB4AB; }
}
@media (max-width: 520px) { .cta form { flex-direction: column; } }

/* ── Footer ──────────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--outline-variant);
  padding: 3rem 0 2.5rem;
  background: var(--surface);
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2.5rem;
  align-items: center;
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 1.5rem; margin-left: auto; }
.site-footer a { color: var(--on-surface-variant); text-decoration: none; font-size: .9375rem; }
.site-footer a:hover { color: var(--on-surface); text-decoration: underline; }
.site-footer small { display: block; width: 100%; color: var(--on-surface-variant); font-size: .875rem; }

/* ── Legal / prose pages ─────────────────────────────────────────────── */
.prose { max-width: 72ch; padding: clamp(2.5rem, 2rem + 3vw, 4.5rem) 0 5rem; }
.prose h1 { margin-bottom: .75rem; }
.prose h2 {
  font-size: clamp(1.25rem, 1.1rem + .7vw, 1.6rem);
  margin: 2.75rem 0 .75rem;
}
.prose h3 { margin: 1.75rem 0 .5rem; }
.prose p, .prose li { font-size: 1rem; line-height: 1.65; }
.prose p + p { margin-top: 1rem; }
.prose ul { padding-left: 1.25rem; margin: 1rem 0; }
.prose li + li { margin-top: .5rem; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.25rem 0; font-size: .9375rem; }
.prose th, .prose td { text-align: left; padding: .7rem .9rem; border-bottom: 1px solid var(--outline-variant); vertical-align: top; }
.prose th { color: var(--on-surface); font-weight: 700; }
.prose__meta { color: var(--on-surface-variant); font-size: .9375rem; }

/* Legal drafts are not legal advice, and the page has to say so where it
 * cannot be scrolled past rather than in a footnote. */
.notice {
  margin: 1.75rem 0 0;
  padding: 1.1rem 1.35rem;
  border-radius: var(--radius-md);
  background: var(--primary-container);
  color: var(--on-primary-container);
  font-size: .9375rem;
}

/* ── Bounce pages ────────────────────────────────────────────────────── */
.bounce {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 2rem 1.5rem;
  text-align: center;
}
.bounce__card { max-width: 27rem; }
.bounce__icon {
  display: inline-grid;
  place-items: center;
  width: 76px; height: 76px;
  margin: 0 auto 1.75rem;
  border-radius: var(--radius-xxl);
  background: var(--tertiary-container);
  color: var(--on-tertiary-container);
}
.bounce__icon svg { width: 38px; height: 38px; }
.bounce__icon--wait { background: var(--primary-container); color: var(--on-primary-container); }
.bounce h1 { font-size: clamp(1.6rem, 1.3rem + 1.4vw, 2.15rem); margin-bottom: .85rem; }
.bounce p { font-size: 1.0625rem; }
.bounce .btn { margin-top: 2rem; }
/* Revealed only once the deep link has visibly failed to fire. */
.bounce__manual { opacity: 0; transition: opacity .3s var(--ease-out); }
.bounce__manual.is-shown { opacity: 1; }
