/* =========================================================
   hapiia: taste-skill structure + the original colours and type,
   light only, with soft SVG backgrounds (Haikei-style blobs, waves,
   dots) requested by the client.
   Palette: craie / nuit / soleil (accent) / lavande (soft) / ardoise.
   Radius system: pills for interactive elements, 28px for blocks.
   ========================================================= */
:root{
  --craie:   #F7F7F4;
  --nuit:    #17123F;
  --soleil:  #FFC53D;
  --lavande: #CBC5FF;
  --ardoise: #4A4672;
  --blanc:   #FFFFFF;
  --line:    #E2E0EC;
  --display: "Anybody", "Figtree", system-ui, sans-serif;
  --text:    "Figtree", system-ui, sans-serif;
  --r: 28px;
  --pad: clamp(1rem, 5vw, 4rem);
  --max: 1240px;
  color-scheme: light;
}

*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{ margin: 0; background: var(--craie); color: var(--nuit); font: 400 1.0625rem/1.65 var(--text); -webkit-font-smoothing: antialiased; }
h1, h2, h3{ margin: 0; font-family: var(--display); font-weight: 850; font-stretch: 108%; letter-spacing: -.02em; line-height: 1.02; text-wrap: balance; }
p{ margin: 0; }
a{ color: inherit; }
a, button{ touch-action: manipulation; }
[id]{ scroll-margin-top: 88px; }
:focus-visible{ outline: 3px solid var(--nuit); outline-offset: 3px; }
.sr-only{ position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip{ position: absolute; left: 1rem; top: -100px; z-index: 30; background: var(--nuit); color: var(--craie); padding: .7rem 1.1rem; border-radius: 999px; font-weight: 700; text-decoration: none; }
.skip:focus{ top: 1rem; }

/* ---------- buttons (pills) ---------- */
.btn{ display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; min-height: 52px; padding: 0 1.6rem; border-radius: 999px; border: 2px solid transparent; font-family: var(--text); font-weight: 700; font-size: 1.02rem; line-height: 1; text-decoration: none; cursor: pointer; transition: transform .2s cubic-bezier(.16,1,.3,1), background-color .2s ease, border-color .2s ease, color .2s ease; }
.btn:active{ transform: scale(.98); }
.btn-accent{ background: var(--soleil); color: var(--nuit); }
.btn-accent:hover{ transform: translateY(-2px); border-color: var(--nuit); }
.btn-ghost{ border-color: var(--nuit); color: var(--nuit); background: rgba(255,255,255,.6); }
.btn-ghost:hover{ background: var(--nuit); color: var(--craie); }
.btn-sm{ min-height: 42px; padding: 0 1.1rem; font-size: .95rem; }

/* ---------- nav ---------- */
.nav{ position: sticky; top: 0; z-index: 20; height: 70px; display: flex; align-items: center; gap: 2rem; padding: 0 var(--pad); background: rgba(247,247,244,.88); backdrop-filter: blur(12px); }
.nav-logo{ font: 900 1.55rem/1 var(--display); font-stretch: 120%; letter-spacing: -.03em; text-decoration: none; }
.nav-links{ display: flex; gap: 1.8rem; margin-left: auto; font-weight: 600; }
.nav-links a{ text-decoration: none; }
.nav-links a:hover{ text-decoration: underline; text-decoration-color: var(--soleil); text-decoration-thickness: 3px; text-underline-offset: .3em; }

/* ---------- hero: soft blobs behind an asymmetric split ---------- */
.hero-wrap{ background: var(--craie) url("../assets/bg/hero-blobs.svg?v=2") center / cover no-repeat; }
.hero{ max-width: var(--max); margin: 0 auto; padding: clamp(3rem, 7vw, 6rem) var(--pad) clamp(5rem, 9vw, 7rem); display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.hero h1{ font-size: clamp(2.6rem, 5.4vw, 4.5rem); max-width: 13ch; }
.hero-sub{ margin-top: 1.4rem; font-size: 1.2rem; color: var(--ardoise); max-width: 38ch; }
.hero-ctas{ display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }
/* the name, as an equation, on a white card over the soft blobs */
.hero-word{ background: rgba(255,255,255,.82); backdrop-filter: blur(6px); border-radius: var(--r); padding: clamp(1.8rem, 4vw, 2.8rem); display: grid; gap: .15rem; box-shadow: 0 30px 60px -30px rgba(23,18,63,.35); }
.eq{ display: flex; align-items: baseline; justify-content: space-between; font-family: var(--display); font-weight: 850; font-stretch: 112%; letter-spacing: -.03em; font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1.15; color: var(--nuit); }
.eq1 .term{ background: var(--soleil); padding: 0 .2em; border-radius: .25em; }
.eq2 .term, .eq3 .term{ box-shadow: inset 0 -.28em 0 var(--lavande); }
.eq .op{ color: var(--ardoise); font-weight: 600; font-stretch: 100%; }
.eq4{ margin-top: .7rem; padding-top: .9rem; border-top: 2px dashed var(--line); }
.eq4 .brand{ font-size: 1.3em; font-weight: 900; font-stretch: 125%; }

/* ---------- chores: nuit band framed by layered waves ---------- */
.chores{ position: relative; background: var(--nuit); color: var(--craie); padding: clamp(3rem, 7vw, 5rem) 0; margin: clamp(3rem, 7vw, 5rem) 0; }
.wave{ position: absolute; left: 0; right: 0; height: clamp(60px, 9vw, 140px); background-repeat: no-repeat; background-size: 100% 100%; pointer-events: none; }
.wave-top{ bottom: 100%; background-image: url("../assets/bg/wave-top.svg"); }
.wave-bottom{ top: 100%; background-image: url("../assets/bg/wave-bottom.svg"); }
.chores-head{ max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }
.chores h2{ font-size: clamp(2.1rem, 5vw, 4rem); color: var(--craie); }
.chores-sub{ margin-top: 1rem; color: var(--lavande); font-size: 1.15rem; max-width: 52ch; }
.marquee{ margin-top: 2.6rem; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track{ display: flex; gap: 1rem; width: max-content; }
.marquee-track span{ flex: none; padding: .9rem 1.5rem; border-radius: 999px; border: 2px solid rgba(203,197,255,.4); font-weight: 700; font-size: clamp(1.1rem, 2vw, 1.4rem); text-decoration: line-through; text-decoration-color: var(--soleil); text-decoration-thickness: 3px; color: var(--craie); }

/* ---------- bento: 3 content blocks = 3 cells ---------- */
.bento{ max-width: var(--max); margin: 0 auto; padding: clamp(4rem, 8vw, 6rem) var(--pad); display: grid; grid-template-columns: 1.3fr 1fr; grid-template-rows: auto auto; gap: 1rem; }
.cell{ border-radius: var(--r); padding: clamp(1.6rem, 3.5vw, 2.6rem); display: flex; flex-direction: column; justify-content: flex-end; gap: .8rem; min-height: 220px; }
.cell h2{ font-size: clamp(1.8rem, 3.4vw, 2.7rem); }
.cell p{ max-width: 40ch; }
.cell-big{ grid-row: 1 / 3; min-height: 440px; background: var(--lavande) url("../assets/bg/hero-blobs.svg?v=2") right bottom / 180% no-repeat; }
.cell-big p{ color: var(--nuit); }
.cell-accent{ background: var(--soleil); }
.cell-soft{ background: var(--blanc); border: 2px solid var(--line); }
.cell-soft p{ color: var(--ardoise); }

/* ---------- method: sticky heading + timeline with scroll progress ---------- */
.method{ max-width: var(--max); margin: 0 auto; padding: clamp(2rem, 5vw, 4rem) var(--pad) clamp(4rem, 8vw, 6rem); display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.method > h2{ font-size: clamp(2rem, 4.2vw, 3.3rem); position: sticky; top: 110px; }
.timeline{ list-style: none; margin: 0; padding: 0 0 0 2.2rem; position: relative; display: grid; gap: 2.6rem; }
.timeline::before, .timeline::after{ content: ""; position: absolute; left: 0; top: .5rem; bottom: .5rem; width: 4px; border-radius: 4px; }
.timeline::before{ background: var(--line); }
.timeline::after{ background: var(--soleil); transform-origin: top; }
.timeline h3{ font-size: 1.6rem; }
.timeline p{ margin-top: .4rem; color: var(--ardoise); }

/* ---------- team: type-as-statement ---------- */
.team{ max-width: var(--max); margin: 0 auto; padding: clamp(3rem, 7vw, 5rem) var(--pad); }
.team-line{ font-size: clamp(2.6rem, 7.4vw, 6.4rem); display: flex; flex-wrap: wrap; gap: 0 .35em; }
.team-line .hl{ background: var(--soleil); padding: 0 .15em; border-radius: .14em; }
.team-sub{ margin-top: 1.6rem; font-size: 1.2rem; color: var(--ardoise); max-width: 52ch; }

/* ---------- france: headline + fact pills ---------- */
.france{ max-width: var(--max); margin: 0 auto; padding: 0 var(--pad) clamp(4rem, 8vw, 6rem); display: flex; flex-wrap: wrap; align-items: center; gap: 1.2rem 2rem; }
.france h2{ font-size: clamp(1.9rem, 3.6vw, 2.8rem); }
.facts{ list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .6rem; }
.facts li{ padding: .55rem 1.1rem; border-radius: 999px; background: var(--blanc); border: 2px solid var(--lavande); font-weight: 700; }

/* ---------- quote: soleil band with soft dots ---------- */
.quote{ background: var(--soleil) url("../assets/bg/quote-dots.svg?v=2") center / cover no-repeat; border-radius: var(--r); margin: 0 clamp(.5rem, 2vw, 1.5rem); padding: clamp(4rem, 9vw, 6.5rem) var(--pad); text-align: center; }
.quote > *{ max-width: 760px; margin-left: auto; margin-right: auto; }
.quote h2{ font-size: clamp(2.2rem, 5.4vw, 4rem); }
.quote-sub{ margin-top: 1.2rem; max-width: 48ch; }
.form{ margin-top: 2.4rem; display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; text-align: left; }
.field{ display: grid; gap: .45rem; }
.field label{ font-weight: 700; font-size: .95rem; }
.field input, .field textarea{ width: 100%; padding: .85rem 1.1rem; border-radius: 16px; border: 2px solid var(--nuit); background: var(--blanc); color: var(--nuit); font: inherit; }
.help{ font-size: .9rem; color: var(--nuit); opacity: .8; }
.wide{ grid-column: 1 / -1; }
.quote .btn-accent{ background: var(--nuit); color: var(--craie); grid-column: 1 / -1; justify-self: center; }
.quote .btn-accent:hover{ border-color: var(--nuit); background: var(--ardoise); }
.note{ grid-column: 1 / -1; text-align: center; font-weight: 700; min-height: 1.5em; }

/* ---------- legal pages and 404 ---------- */
.page{ max-width: 780px; margin: 0 auto; padding: clamp(3rem, 8vw, 6rem) var(--pad); }
.page h1{ font-size: clamp(2.4rem, 7vw, 4.2rem); margin-bottom: 2rem; }
.page h2{ font-size: 1.6rem; margin: 2.2rem 0 .6rem; }
.page p{ color: var(--ardoise); }
.page p + p{ margin-top: .8rem; }
.page-actions{ margin-top: 2rem; }
.todo{ background: var(--lavande); color: var(--nuit); padding: .1em .4em; border-radius: .3em; font-weight: 700; }

/* ---------- footer ---------- */
.foot{ max-width: var(--max); margin: 0 auto; padding: 2.6rem var(--pad) 3rem; display: flex; flex-wrap: wrap; align-items: baseline; gap: 1rem 2rem; color: var(--ardoise); }
.foot-logo{ color: var(--nuit); font: 900 1.5rem/1 var(--display); font-stretch: 120%; }
.foot-links{ display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; margin-left: auto; }

/* ---------- mobile collapse (explicit, < 768px) ---------- */
@media (max-width: 767px){
  .nav-links{ display: none; }
  .nav .btn-sm{ margin-left: auto; }
  .hero, .method{ grid-template-columns: 1fr; }
  .method > h2{ position: static; }
  .bento{ grid-template-columns: 1fr; }
  .cell-big{ grid-row: auto; min-height: 300px; }
  .form{ grid-template-columns: 1fr; }
  .quote .btn-accent{ justify-self: stretch; }
}

/* =========================================================
   Motion (each motivated; all off under reduced motion):
   - the name's equation builds up once on the right card
   - the only marquee: the endless chores
   - timeline line fills with scroll (where you are)
   ========================================================= */
@media (prefers-reduced-motion: no-preference){
  .eq{ animation: pop .6s cubic-bezier(.2,.9,.3,1.3) both; }
  .eq1{ animation-delay: .2s; } .eq2{ animation-delay: .45s; } .eq3{ animation-delay: .7s; } .eq4{ animation-delay: 1s; }
  .marquee-track{ animation: slide 38s linear infinite; }
  .marquee:hover .marquee-track{ animation-play-state: paused; }
  @supports (animation-timeline: view()){
    .timeline{ view-timeline-name: --steps; }
    .timeline::after{ animation: fill linear both; animation-timeline: --steps; animation-range: entry 30% exit 60%; }
  }
}
@media (prefers-reduced-motion: reduce){
  .marquee-track{ flex-wrap: wrap; width: auto; padding: 0 var(--pad); }
  .marquee{ -webkit-mask-image: none; mask-image: none; }
}
@keyframes pop{ from{ opacity: 0; transform: translateY(.4em) scale(.8); } to{ opacity: 1; transform: none; } }
@keyframes slide{ to{ transform: translateX(calc(-50% - .5rem)); } }
@keyframes fill{ from{ transform: scaleY(0); } to{ transform: scaleY(1); } }
