/* Circl landing page. Tokens follow the app directive (section 4) and landing directive 4.1.1. */

/* ---------- tokens ---------- */
:root {
  --canvas: #F2F3F5;
  --surface: #FFFFFF;
  --surface-sunken: #E9EBEE;
  --divider: #E2E4E8;
  --text-primary: #16181D;
  --text-secondary: #5B606B;
  --action-primary: #16181D;
  --on-action-primary: #FFFFFF;
  --danger: #D92D20;

  --cobalt: #3355FF;
  --tint-cobalt: #E2E7FF;
  --tint-tomato: #FCE5E2;
  --tint-sunflower: #FFF7E4;
  --tint-mint: #E0F4ED;
  --tint-rose: #FDE6EF;
  --tint-grape: #ECE6FB;

  /* the single shadow (floating), and the tab-bar variant */
  --shadow-float: 0 8px 24px rgba(22, 24, 29, .12);
  --shadow-bar: 0 8px 24px rgba(22, 24, 29, .06);

  --radius-control: 14px;
  --radius-card: 24px;
  --radius-phone: 44px;

  --font-display: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-text: "Figtree", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* web type scale (4.2): linear between 360 px and 1280 px */
  --fs-display: clamp(2.75rem, 2.065rem + 3.043vw, 4.5rem);
  --fs-h2: clamp(1.875rem, 1.533rem + 1.522vw, 2.75rem);
  --fs-h3: clamp(1.375rem, 1.277rem + .435vw, 1.625rem);
  --fs-lead: clamp(1.125rem, 1.027rem + .435vw, 1.375rem);
  --fs-body: clamp(1rem, .951rem + .217vw, 1.125rem);
  --fs-small: .875rem;

  --margin: 20px;
  --section-pad: clamp(64px, 40.5px + 6.52vw, 120px);
  --header-h: 64px;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #14161B;
    --surface: #1D2026;
    --surface-sunken: #272B32;
    --divider: #2F333B;
    --text-primary: #F2F3F5;
    --text-secondary: #A3A8B3;
    --action-primary: #F2F3F5;
    --on-action-primary: #16181D;
    --danger: #F97066;

    --tint-cobalt: #222D5A;
    --tint-tomato: #4E2928;
    --tint-sunflower: #53482C;
    --tint-mint: #1E433B;
    --tint-rose: #4F2B3F;
    --tint-grape: #332B52;

    --shadow-float: 0 8px 24px rgba(0, 0, 0, .4);
    --shadow-bar: 0 8px 24px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}

@media (min-width: 768px) { :root { --margin: 32px; } }
@media (min-width: 1024px) { :root { --margin: 48px; } }

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--text-primary);
  font: 400 var(--fs-body)/1.53 var(--font-text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
main:focus { outline: none; }

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

.skip-link {
  position: absolute; left: var(--margin); top: -100px; z-index: 100;
  padding: 12px 16px; border-radius: var(--radius-control);
  background: var(--action-primary); color: var(--on-action-primary); font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 8px; }

/* French and English ragged text: no orphans where the browser supports it */
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }

/* ---------- type ---------- */
.display { font: 700 var(--fs-display)/1.07 var(--font-display); letter-spacing: -.02em; }
.display .line { display: block; }
.h2 { font: 600 var(--fs-h2)/1.16 var(--font-display); letter-spacing: -.015em; }
.h3 { font: 600 var(--fs-h3)/1.25 var(--font-display); letter-spacing: -.01em; }
.lead { font-size: var(--fs-lead); line-height: 1.5; color: var(--text-secondary); }
.body { font-size: var(--fs-body); line-height: 1.53; color: var(--text-secondary); }
.small { font: 500 var(--fs-small)/20px var(--font-text); color: var(--text-secondary); }
.center { text-align: center; }

/* placeholders the founder must answer before launch (directive section 3, claims rule) */
mark.todo { background: none; color: var(--danger); font-weight: 600; }

/* ---------- layout ---------- */
.container { width: min(1200px, 100% - 2 * var(--margin)); margin-inline: auto; }
.narrow { max-width: 720px; }
.section { padding-block: var(--section-pad); }
.grid { display: grid; gap: 40px; }
@media (min-width: 1024px) {
  .grid { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; align-items: center; }
}

/* ---------- buttons and fields (4.5) ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  height: 52px; padding: 0 24px; border: 0; border-radius: var(--radius-control);
  font: 600 16px/1 var(--font-text); text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: opacity .15s ease, transform .15s ease;
}
.btn:hover { text-decoration: none; opacity: .9; }
.btn:active { transform: scale(.98); }
.btn--primary { background: var(--action-primary); color: var(--on-action-primary); }
.btn--secondary { background: var(--surface-sunken); color: var(--text-primary); }
.btn--compact { height: 40px; padding: 0 16px; font-size: 15px; border-radius: 12px; }

.spinner {
  position: absolute; inset: 0; margin: auto; width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent; opacity: 0;
}
.is-loading .btn__label { visibility: hidden; }
.is-loading .spinner { opacity: 1; animation: spin .7s linear infinite; }
.is-loading .btn { cursor: progress; }
@keyframes spin { to { transform: rotate(360deg); } }

.field-label { display: block; margin-bottom: 8px; font: 600 var(--fs-small)/20px var(--font-text); color: var(--text-primary); }
.input {
  width: 100%; height: 52px; padding: 0 16px; min-width: 0;
  border: 2px solid transparent; border-radius: var(--radius-control);
  background: var(--surface-sunken); color: var(--text-primary);
  font: 400 16px/1 var(--font-text);
}
.input::placeholder { color: var(--text-secondary); opacity: 1; }
.input:focus { outline: none; border-color: var(--text-primary); }
.input[aria-invalid="true"] { border-color: var(--danger); }
.field-error { min-height: 0; color: var(--danger); font: 500 var(--fs-small)/20px var(--font-text); }
.field-error:not(:empty) { margin-top: 8px; }

/* ---------- waitlist ---------- */
.waitlist { max-width: 520px; }
.waitlist__row { display: grid; gap: 12px; }
.waitlist__row .btn { width: 100%; }
@media (min-width: 768px) {
  .waitlist__row { grid-template-columns: 1fr auto; }
  .waitlist__row .btn { width: auto; }
}
.waitlist__notes { margin-top: 12px; display: grid; gap: 4px; }
.waitlist__notes a { color: var(--text-primary); }
.waitlist__success {
  padding: 16px 20px; border-radius: var(--radius-control); background: var(--surface);
  font: 600 var(--fs-body)/1.5 var(--font-text); color: var(--text-primary);
}
.waitlist__success:focus { outline: none; }

/* ---------- store badges (placeholders until the official badges are added) ---------- */
.stores { display: flex; flex-wrap: wrap; gap: 12px; }
.store {
  display: inline-flex; flex-direction: column; justify-content: center; min-width: 150px; height: 52px; padding: 0 18px;
  border-radius: 10px; background: #000; color: #fff; text-decoration: none; border: 1px solid #A6A6A6;
}
.store__top { font: 500 11px/1.1 var(--font-text); }
.store__name { font: 600 18px/1.15 var(--font-text); }
.store:hover { text-decoration: none; opacity: .9; }

/* ---------- header (5.1) ---------- */
.header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: var(--surface); box-shadow: var(--shadow-bar);
}
.header__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.header__right { display: flex; align-items: center; gap: 12px; }
.logo { display: inline-flex; align-items: center; text-decoration: none; border-radius: 6px; }
.logo picture, .logo img { display: block; width: 91px; height: 32px; }
.lang { display: flex; align-items: center; gap: 2px; font: 600 var(--fs-small)/1 var(--font-text); }
.lang__item { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; border-radius: 10px; color: var(--text-secondary); text-decoration: none; }
.lang__item[aria-current] { color: var(--text-primary); }
a.lang__item:hover { background: var(--surface-sunken); color: var(--text-primary); }
@media (max-width: 400px) {
  .btn--compact { padding: 0 12px; font-size: 14px; }
  .lang__item { min-width: 32px; }
  .header__right { gap: 6px; }
}

/* ---------- bands and phone frame (4.3, 4.5) ---------- */
.band {
  position: relative; overflow: hidden; border-radius: var(--radius-card);
  display: flex; justify-content: center;
  /* mobile and tablet: show the top of the screen, let the frame run off the bottom edge */
  height: 472px; padding-top: 40px;
}
.band--hero { background: var(--cobalt); }
.band--cobalt { background: var(--tint-cobalt); }
.band--tomato { background: var(--tint-tomato); }
.band--sunflower { background: var(--tint-sunflower); }
.band--mint { background: var(--tint-mint); }
.band--rose { background: var(--tint-rose); }
.band--grape { background: var(--tint-grape); }

.phone {
  position: relative; z-index: 1; flex: none;
  width: min(300px, 100% - 48px); aspect-ratio: 9 / 19.5; height: max-content;
  border-radius: var(--radius-phone); overflow: hidden;
  background: var(--surface); outline: 1px solid var(--divider); outline-offset: -1px;
  box-shadow: var(--shadow-float);
}
.phone img { width: 100%; height: 100%; object-fit: cover; object-position: top; }

@media (min-width: 768px) { .band { height: 560px; padding-top: 56px; } }
@media (min-width: 1024px) {
  .band { height: auto; padding: 64px 48px; align-items: center; }
  .phone { width: 320px; }
}

.hero__ring {
  position: absolute; z-index: 0; width: 560px; height: 560px; max-width: none;
  left: 50%; top: 0; transform: translate(-50%, -30%);
}
@media (min-width: 1024px) { .hero__ring { width: 620px; height: 620px; top: 50%; transform: translate(-50%, -50%); } }

/* ---------- hero (5.2) ---------- */
.hero { padding-top: clamp(40px, 26px + 3.9vw, 96px); }
.hero__text { display: grid; gap: 24px; align-content: center; }
.hero__text .lead { max-width: 34ch; }
.hero__text .waitlist, .hero__text .stores { margin-top: 8px; }
@media (min-width: 1024px) {
  .hero__text { grid-column: 1 / 8; }
  .hero__media { grid-column: 8 / 13; }
}

/* ---------- problem (5.3) ---------- */
.problem .container { display: grid; gap: 20px; }
.problem .body { font-size: var(--fs-lead); line-height: 1.5; }

/* ---------- how it works (5.4) ---------- */
.how { padding-top: 0; }
.steps { display: grid; gap: 32px; margin-top: 48px; counter-reset: step; }
.step { display: grid; gap: 8px; justify-items: start; }
.step__num {
  display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin-bottom: 8px;
  border-radius: 50%; background: var(--action-primary); color: var(--on-action-primary); font: 600 18px/1 var(--font-text);
}
@media (min-width: 768px) {
  .steps { gap: 16px; }
  .step { padding: 32px 28px; border-radius: var(--radius-card); background: var(--surface); }
}
@media (min-width: 1024px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 24px; } }

/* ---------- features (5.5) ---------- */
.feature { padding-block: calc(var(--section-pad) / 2); }
.feature__text { display: grid; gap: 16px; max-width: 34rem; }
@media (min-width: 1024px) {
  .feature { padding-block: calc(var(--section-pad) / 2); }
  .feature--normal .feature__text { grid-column: 1 / 6; }
  .feature--normal .feature__media { grid-column: 7 / 13; }
  .feature--reverse .feature__media { grid-column: 1 / 7; grid-row: 1; }
  .feature--reverse .feature__text { grid-column: 8 / 13; }
}

/* ---------- privacy (5.6) ---------- */
.panel { padding: clamp(28px, 18px + 2.8vw, 64px); border-radius: var(--radius-card); background: var(--surface); }
.privacy__grid { display: grid; gap: 32px; margin-top: 40px; }
.privacy__item { display: grid; gap: 8px; }
.privacy__item .icon { margin-bottom: 4px; color: var(--text-primary); }
@media (min-width: 768px) { .privacy__grid { grid-template-columns: 1fr 1fr; gap: 40px 48px; } }

/* ---------- parents (5.7) ---------- */
.parents { padding-top: 0; }
.parents__text { display: grid; gap: 20px; }
.parents__list { display: grid; gap: 16px; }
.checklist { display: grid; gap: 12px; }
.checklist li { position: relative; padding-left: 32px; color: var(--text-secondary); }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: .2em; width: 20px; height: 20px; border-radius: 50%;
  background: var(--surface-sunken) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235B606B' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.checklist a { color: var(--text-primary); }
@media (max-width: 1023px) {
  .parents .grid { max-width: 640px; margin-inline: auto; }
  .parents__text { text-align: center; }
}
@media (min-width: 1024px) {
  .parents .grid { align-items: start; }
  .parents__text { grid-column: 1 / 6; }
  .parents__list { grid-column: 7 / 13; }
}

/* ---------- FAQ (5.8) ---------- */
.faq { padding-top: 0; }
.faq__list { margin-top: 32px; border-top: 1px solid var(--divider); }
.faq__item { border-bottom: 1px solid var(--divider); }
.faq__item summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 64px; padding: 16px 0; cursor: pointer; list-style: none;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary .h3 { font-size: clamp(1.125rem, 1.07rem + .24vw, 1.25rem); line-height: 1.35; }
.faq__item summary .icon { flex: none; color: var(--text-secondary); transition: transform .2s ease; }
.faq__item[open] summary .icon { transform: rotate(180deg); }
.faq__answer { padding: 0 40px 24px 0; }

/* ---------- final call to action (5.9) ---------- */
.cta { padding-top: 0; }
.cta__band {
  display: grid; justify-items: center; gap: 28px; text-align: center;
  padding: clamp(48px, 30px + 5vw, 96px) clamp(20px, 5vw, 64px);
  border-radius: var(--radius-card); background: var(--tint-cobalt);
}
.cta__band .waitlist { width: 100%; text-align: left; }
.cta__band .stores { justify-content: center; }

/* ---------- footer (5.10) ---------- */
.footer { padding-block: 48px; border-top: 1px solid var(--divider); }
.footer__inner { display: grid; gap: 28px; }
.footer__brand { display: grid; gap: 12px; justify-items: start; }
.footer__links { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer__links a { color: var(--text-primary); }
.footer__meta { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer__meta .lang { margin-left: -10px; }
@media (min-width: 1024px) {
  .footer__inner { grid-template-columns: 1fr auto; align-items: start; }
  .footer__links { justify-content: flex-end; max-width: 560px; }
  .footer__meta { grid-column: 1 / -1; }
}

/* ---------- legal pages (10) ---------- */
.legal .container { display: grid; gap: 16px; }
.legal h1 { margin-top: 8px; }
.legal h2 { margin-top: 24px; }
.legal__draft { padding: 12px 16px; border-radius: var(--radius-control); background: var(--surface); }

/* ---------- motion (6.4): only with JS and without reduced motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal .phone { opacity: 0; transform: translateY(16px); transition: opacity .3s ease-out, transform .3s ease-out; }
  .js .reveal.is-in .phone { opacity: 1; transform: none; }
}

/* honeypot field for spam bots: off-screen, never shown to people */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
