/* ==========================================================================
   Wooli · landing page
   Les couleurs et les polices sont celles de l'app (src/constants/theme.ts) :
   papier crème, brun doux, vert sauge, et le bois des meubles.
   ========================================================================== */

:root {
  --paper: #f8f2e6;        /* fond de l'app */
  --card: #fffdf7;         /* backgroundElement */
  --sheet: #fcf6eb;        /* le « paper » des planches de tenues */
  --ink: #4a3a28;          /* texte */
  --ink-soft: #77654f;     /* texte secondaire, assez foncé pour se lire */
  --muted: #a08f77;        /* textSecondary de l'app, pour les détails */
  --sage: #62804f;         /* bouton : la sauge de l'app, foncée pour le contraste */
  --sage-hover: #557245;
  --sage-light: #7e9b6b;   /* accent de l'app */
  --sage-soft: #dce6cc;    /* accentSoft */
  --border: #e7dcc7;
  --trim: #baa884;         /* liseré des boutons festonnés */
  --wood-top: #e9c896;
  --wood-front: #cf9d62;
  --wood-dark: #b07f48;
  --danger: #b4544a;

  --font-title: "Baloo 2", "Nunito", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;

  --page: 1360px;
  --gutter: clamp(16px, 3.5vw, 48px);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

h1,
h2,
h3 {
  font-family: var(--font-title);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

:focus-visible {
  outline: 3px solid var(--sage-light);
  outline-offset: 3px;
  border-radius: 8px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.wrap {
  width: 100%;
  max-width: var(--page);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ------------------------------------------------------------------ nav -- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgb(248 242 230 / 0.86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 84px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 1.75rem;
  line-height: 1;
  letter-spacing: -0.02em;
}

.brand img {
  display: block;
  width: 60px;
  height: 60px;
  filter: drop-shadow(0 4px 8px rgb(74 58 40 / 0.14));
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav__links a:not(.button) {
  font-weight: 700;
  text-decoration: none;
  color: var(--ink-soft);
}

.nav__links a:not(.button):hover {
  color: var(--ink);
}

@media (max-width: 720px) {
  .nav__links a:not(.button) {
    display: none;
  }
}

/* -------------------------------------------------------------- buttons -- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  background: var(--sage);
  color: var(--card);
  font: 800 1rem/1 var(--font-body);
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 6px 16px -8px rgb(70 95 55 / 0.7);
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.button:hover {
  background: var(--sage-hover);
}

.button:active {
  transform: scale(0.97);
}

.button--small {
  min-height: 42px;
  padding: 0 18px;
  font-size: 0.95rem;
}

.button--ghost {
  background: var(--card);
  color: var(--ink);
  border: 1.5px solid var(--border);
  box-shadow: none;
}

.button--ghost:hover {
  background: var(--sheet);
  border-color: var(--trim);
}

/* ----------------------------------------------------------------- hero -- */

.hero {
  position: relative;
  padding-block: clamp(24px, 5vw, 64px) clamp(48px, 7vw, 96px);
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: clamp(32px, 5vw, 72px);
}

.hero__copy {
  position: relative;
  z-index: 2;
}

.section__head h2,
.shelf__caption h3,
.maker h2,
.join__card h2,
.doc h2 {
  font-weight: 700;
}

.hero h1 {
  font-size: clamp(2.7rem, 2rem + 3.6vw, 4.6rem);
  max-width: 11ch;
}

.hero__lead {
  margin-top: 22px;
  max-width: 34rem;
  font-size: clamp(1.1rem, 1rem + 0.4vw, 1.3rem);
  line-height: 1.55;
  color: var(--ink-soft);
}

.hero .waitlist {
  margin-top: 32px;
}

.hero__visual {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 620px;
}

/* La tache sauge de l'écran d'accueil, en plus grand. */
.blob {
  position: absolute;
  inset: 6% 2% 4% 4%;
  background: var(--sage-soft);
  border-radius: 58% 42% 55% 45% / 47% 58% 42% 53%;
  z-index: 0;
}

.hero .iphone {
  --w: 320px;
  position: relative;
  z-index: 1;
  transform: rotate(2.5deg);
}

.sticker {
  position: absolute;
  z-index: 3;
  top: 3%;
  right: 2%;
  width: 124px;
  height: 124px;
  transform: rotate(-11deg);
}

.sticker svg {
  display: block;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 6px 10px rgb(74 58 40 / 0.16));
}

.sticker span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 26px;
  text-align: center;
  font: 800 1.02rem/1 var(--font-title);
  color: var(--ink);
}

@media (max-width: 900px) {
  .hero__grid {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    max-width: 13ch;
  }

  .hero__visual {
    min-height: 0;
    padding-block: 24px 8px;
  }

  .hero .iphone {
    --w: min(270px, 68vw);
  }

  .sticker {
    width: 104px;
    height: 104px;
    right: 4%;
  }

  .sticker span {
    font-size: 0.88rem;
    padding: 22px;
  }
}

/* -------------------------------------------------------------- iPhone -- */
/* Un iPhone 17 Pro en titane clair. Tout est en cqw : la coque s'adapte à
   la largeur qu'on lui donne (--w), proportions comprises. */

.iphone {
  --w: 280px;
  --ti-light: #ecebe7;
  --ti: #c9c5bf;
  --ti-dark: #96918a;
  width: var(--w);
  container-type: inline-size;
  flex: none;
}

.iphone__body {
  position: relative;
  padding: 1.35cqw;
  border-radius: 19.5cqw;
  background: linear-gradient(
    135deg,
    var(--ti-light) 0%,
    var(--ti) 22%,
    var(--ti-light) 46%,
    var(--ti-dark) 72%,
    var(--ti) 100%
  );
  box-shadow:
    0 2.5cqw 4cqw -1.5cqw rgb(74 58 40 / 0.35),
    0 10cqw 18cqw -6cqw rgb(74 58 40 / 0.45);
}

/* Les boutons sur la tranche : action, volume +, volume − à gauche ;
   alimentation et Camera Control à droite. */
.iphone__body::before,
.iphone__body::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1.1cqw;
  background-repeat: no-repeat;
}

.iphone__body::before {
  left: -0.85cqw;
  background-image:
    linear-gradient(90deg, var(--ti-dark), var(--ti)),
    linear-gradient(90deg, var(--ti-dark), var(--ti)),
    linear-gradient(90deg, var(--ti-dark), var(--ti));
  background-size: 100% 6.4cqw, 100% 13.5cqw, 100% 13.5cqw;
  background-position: 0 39cqw, 0 55cqw, 0 72cqw;
  border-radius: 1cqw 0 0 1cqw;
}

.iphone__body::after {
  right: -0.85cqw;
  background-image:
    linear-gradient(270deg, var(--ti-dark), var(--ti)),
    linear-gradient(270deg, var(--ti-dark), var(--ti));
  background-size: 100% 22cqw, 100% 14cqw;
  background-position: 0 60cqw, 0 118cqw;
}

.iphone__bezel {
  padding: 2.7cqw;
  border-radius: 18.2cqw;
  background: #121212;
  box-shadow: inset 0 0 0 0.35cqw #2a2a2a;
}

.iphone__screen {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1206 / 2622;
  border-radius: 15.4cqw;
  background: var(--card);
}

/* ---------------------------------------------------------------- shelf -- */

.section {
  padding-block: clamp(56px, 8vw, 112px);
}

.section__head {
  max-width: 40rem;
  margin-bottom: clamp(36px, 5vw, 64px);
}

.section__head h2 {
  font-size: clamp(2.1rem, 1.6rem + 2.2vw, 3.2rem);
}

.section__head p {
  margin-top: 14px;
  font-size: 1.15rem;
  color: var(--ink-soft);
}

.shelf {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

.shelf__item {
  display: flex;
  flex-direction: column;
}

.shelf__stage {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  padding-inline: 12px;
}

.shelf__stage .iphone {
  --w: min(260px, 100%);
  position: relative;
  z-index: 1;
  margin-bottom: -4px;
}

/* La planche : une face du dessus claire, un chant plus foncé, un peu de
   veinage. Les planches des trois colonnes se touchent et n'en font qu'une. */
.plank {
  position: relative;
  height: 30px;
  background:
    linear-gradient(180deg, var(--wood-top) 0 10px, transparent 10px),
    repeating-linear-gradient(
      92deg,
      rgb(255 255 255 / 0.06) 0 18px,
      rgb(120 80 30 / 0.06) 18px 31px
    ),
    linear-gradient(180deg, var(--wood-front), var(--wood-dark));
  box-shadow: 0 16px 18px -14px rgb(74 58 40 / 0.55);
}

.shelf__item:first-child .plank {
  border-radius: 8px 0 0 8px;
}

.shelf__item:last-child .plank {
  border-radius: 0 8px 8px 0;
}

.shelf__caption {
  padding: 26px clamp(12px, 2.2vw, 28px) 0;
}

.shelf__caption h3 {
  font-size: 1.6rem;
}

.shelf__caption p {
  margin-top: 8px;
  color: var(--ink-soft);
}

@media (max-width: 860px) {
  .shelf {
    grid-template-columns: 1fr;
    gap: 56px;
    max-width: 440px;
    margin-inline: auto;
  }

  .shelf__item .plank,
  .shelf__item:first-child .plank,
  .shelf__item:last-child .plank {
    border-radius: 8px;
  }

  .shelf__stage .iphone {
    --w: min(240px, 66vw);
  }

  .shelf__caption {
    padding-inline: 4px;
  }
}

/* ---------------------------------------------------------------- maker -- */

.maker {
  background: var(--sheet);
  border-block: 1px solid var(--border);
}

.maker__inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(20px, 4vw, 48px);
  align-items: start;
}

.maker__photo {
  width: clamp(88px, 12vw, 128px);
  height: clamp(88px, 12vw, 128px);
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--card);
  box-shadow: 0 8px 20px -10px rgb(74 58 40 / 0.5);
}

.maker h2 {
  font-size: clamp(2rem, 1.6rem + 1.6vw, 2.8rem);
}

.maker p {
  margin-top: 16px;
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 36rem;
}

.maker .button {
  margin-top: 28px;
}

@media (max-width: 560px) {
  .maker__inner {
    grid-template-columns: 1fr;
  }
}

/* -------------------------------------------------------------- join -- */

.join__card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(24px, 4vw, 56px);
  padding: clamp(28px, 5vw, 56px);
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 36px;
}

.join__card h2 {
  font-size: clamp(2.1rem, 1.6rem + 2vw, 3rem);
  max-width: 14ch;
}

.join__card > div > p {
  margin-top: 14px;
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 32rem;
}

.join__card .waitlist {
  margin-top: 28px;
}

.join__mascot {
  width: clamp(180px, 22vw, 260px);
}

@media (max-width: 760px) {
  .join__card {
    grid-template-columns: 1fr;
  }

  .join__mascot {
    order: -1;
    width: 170px;
    margin-bottom: -12px;
  }
}

/* ------------------------------------------------------------ waitlist -- */

.waitlist {
  max-width: 30rem;
}

.waitlist__field {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 999px;
  box-shadow: 0 10px 24px -18px rgb(74 58 40 / 0.6);
  transition: border-color 0.15s ease;
}

.waitlist__field:focus-within {
  border-color: var(--trim);
}

.waitlist__field input {
  flex: 1;
  min-width: 0;
  height: 48px;
  padding: 0 8px 0 18px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: 600 1.05rem var(--font-body);
}

.waitlist__field input::placeholder {
  color: var(--muted);
  opacity: 1;
}

.waitlist__field input:focus {
  outline: none;
}

.waitlist__field .button {
  flex: none;
}

.waitlist[aria-busy="true"] .button {
  opacity: 0.7;
  cursor: progress;
}

.waitlist__consent {
  margin-top: 12px;
  padding-inline: 18px;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--ink-soft);
}

.waitlist__consent a {
  color: var(--ink-soft);
  text-underline-offset: 2px;
}

.waitlist__status {
  margin-top: 10px;
  padding-inline: 18px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--danger);
}

.waitlist__status:empty {
  display: none;
}

.waitlist__done {
  display: none;
  align-items: center;
  gap: 14px;
  padding: 14px 20px 14px 10px;
  background: var(--sage-soft);
  border-radius: 28px;
  color: #3f5233;
}

.waitlist__done img {
  width: 64px;
  height: auto;
  flex: none;
}

.waitlist__done strong {
  display: block;
  font: 800 1.2rem/1.2 var(--font-title);
  color: var(--ink);
}

.waitlist[data-state="done"] .waitlist__field,
.waitlist[data-state="done"] .waitlist__consent,
.waitlist[data-state="done"] .waitlist__status {
  display: none;
}

.waitlist[data-state="done"] .waitlist__done {
  display: flex;
}

.waitlist__done:focus {
  outline: none;
}

/* Le champ piège : hors de l'écran, jamais atteint au clavier. */
.waitlist__trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

@media (max-width: 440px) {
  .waitlist__field {
    flex-direction: column;
    align-items: stretch;
    border-radius: 28px;
    padding: 8px;
  }

  .waitlist__field input {
    padding-inline: 14px;
  }

  .waitlist__consent,
  .waitlist__status {
    padding-inline: 6px;
  }
}

/* --------------------------------------------------------------- footer -- */

.footer {
  padding-block: 48px 56px;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 32px;
}

.footer .brand {
  font-size: 1.4rem;
  color: var(--ink);
}

.footer .brand img {
  width: 48px;
  height: 48px;
}

.footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
}

.footer a {
  font-weight: 700;
  text-decoration: none;
}

.footer a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer__credit {
  width: 100%;
  margin-top: 4px;
  color: var(--muted);
}

/* -------------------------------------------------------- pages légales -- */

.doc {
  max-width: 720px;
  padding-block: clamp(32px, 6vw, 72px) 80px;
}

.doc h1 {
  font-size: clamp(2.3rem, 1.8rem + 2.4vw, 3.4rem);
}

.doc__updated {
  margin-top: 10px;
  color: var(--muted);
}

.doc h2 {
  margin-top: 44px;
  font-size: 1.6rem;
}

.doc p,
.doc ul {
  margin-top: 12px;
  color: var(--ink-soft);
}

.doc ul {
  padding-left: 1.2em;
}

.doc li + li {
  margin-top: 6px;
}

.doc strong {
  color: var(--ink);
}

.notice {
  display: grid;
  justify-items: center;
  gap: 18px;
  max-width: 520px;
  margin: clamp(32px, 8vw, 96px) auto 96px;
  padding: clamp(28px, 6vw, 48px);
  text-align: center;
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 36px;
}

.notice img {
  width: 150px;
}

.notice h1 {
  font-size: clamp(2rem, 1.6rem + 2vw, 2.6rem);
}

.notice p {
  color: var(--ink-soft);
  font-size: 1.1rem;
}

.notice [data-state] {
  display: none;
}

.notice[data-state="ask"] [data-state="ask"],
.notice[data-state="done"] [data-state="done"],
.notice[data-state="invalid"] [data-state="invalid"] {
  display: contents;
}
