/* ==========================================================================
   Halea landing page
   Cream and warm neutrals as the ground. Violet only for actions and highlights.
   One 12-column container, one spacing scale, nothing absolutely positioned
   over text.
   ========================================================================== */

@font-face { font-family: "Poppins"; src: url("../assets/fonts/poppins-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("../assets/fonts/poppins-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("../assets/fonts/poppins-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  /* the app's palette (see the Halea palette mockups) */
  --ground: #FCFAFF;
  --wash: #F1DEFF;
  --card: #FFFFFF;
  --mist: #F3ECFC;
  --page: #ECE4F7;
  --ink: #1C1230;
  --muted: #5E5573;
  --line: #E4D9F4;
  --violet: #6C00F5;
  --violet-hover: #5A00CC;
  --lilac: #CD83FF;
  --brand: linear-gradient(135deg, #CD83FF 0%, #5B1AFC 100%);

  --font: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  --container: 1180px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --space: clamp(5rem, 10vw, 8.5rem);
  --radius: 26px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 4.5rem; }
body { margin: 0; overflow-x: clip; background: var(--ground); color: var(--ink); font: 400 1rem/1.65 var(--font); -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, dl, dd, figure { margin: 0; }
h1, h2, h3 { font-weight: 600; letter-spacing: -0.03em; line-height: 1.08; text-wrap: balance; }
:focus-visible { outline: 2px solid var(--violet); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--violet); color: #fff; }

.container { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }
.section { padding-block: var(--space); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: var(--ink); color: #fff; padding: .7rem 1rem; border-radius: 12px; text-decoration: none; }
.skip-link:focus { top: 1rem; }

.section-title { font-size: clamp(2rem, 4vw, 3.2rem); max-width: 18ch; }
.section-lede { margin-top: 1rem; max-width: 34rem; font-size: 1.08rem; color: var(--muted); }
.section-head { margin-bottom: 3rem; }
.small-print { margin-top: 1.5rem; font-size: .85rem; color: var(--muted); }
.aside { margin-top: 1.75rem; color: var(--muted); }
.aside a { color: var(--violet); font-weight: 600; text-underline-offset: 4px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; white-space: nowrap;
  min-height: 3.25rem; padding: 0 1.6rem; border: 0; border-radius: 999px; cursor: pointer;
  font: 600 .98rem/1 var(--font); text-decoration: none;
  transition: background-color .2s var(--ease), transform .2s var(--ease);
}
.btn:active { transform: scale(.98); }
.btn--sm { min-height: 2.6rem; padding: 0 1.15rem; font-size: .88rem; }
.btn--violet { background: var(--violet); color: #fff; }
.btn--violet:hover { background: var(--violet-hover); }
.btn--light { background: #fff; color: var(--ink); }
.btn--light:hover { background: var(--mist); }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(252, 250, 255, .92); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-bottom: 1px solid transparent; transition: border-color .2s var(--ease); }
.site-header.is-scrolled { border-bottom-color: var(--line); }
.nav { display: flex; align-items: center; gap: 2rem; height: 4.5rem; }
.nav__brand img { width: 104px; }
.nav__menu { display: flex; align-items: center; gap: 2rem; margin-left: auto; }
.nav__links { display: flex; gap: 1.75rem; list-style: none; margin: 0; padding: 0; }
.nav__links a { text-decoration: none; font-size: .92rem; font-weight: 500; color: var(--muted); }
.nav__links a:hover { color: var(--ink); }
.nav__toggle { display: none; position: relative; width: 44px; height: 44px; margin-left: auto; border: 0; background: none; cursor: pointer; }
.nav__bar { position: absolute; left: 11px; right: 11px; height: 2px; border-radius: 2px; background: var(--ink); transition: transform .3s var(--ease), top .3s var(--ease); }
.nav__bar:nth-of-type(2) { top: 17px; }
.nav__bar:nth-of-type(3) { top: 25px; }
.nav__toggle[aria-expanded="true"] .nav__bar:nth-of-type(2) { top: 21px; transform: rotate(45deg); }
.nav__toggle[aria-expanded="true"] .nav__bar:nth-of-type(3) { top: 21px; transform: rotate(-45deg); }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero { padding-block: clamp(3rem, 7vw, 6rem) clamp(4rem, 8vw, 7rem); background: radial-gradient(70% 70% at 100% 0%, var(--wash) 0%, rgba(241, 222, 255, 0) 70%); }
.hero__grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2.5rem, 6vw, 5rem); align-items: center; }
.hero__title { font-size: clamp(2.4rem, 4.6vw, 3.9rem); line-height: 1.04; letter-spacing: -0.035em; max-width: 16ch; }
.hero__lede { margin-top: 1.4rem; max-width: 31rem; font-size: clamp(1.05rem, 1.35vw, 1.18rem); color: var(--muted); }
.hero__soon { margin-top: 1rem; font-size: .88rem; color: var(--muted); }

.mini-form { margin-top: 2.25rem; max-width: 30rem; }
.mini-form__row {
  display: flex; gap: .4rem; padding: .35rem; border-radius: 999px;
  background: var(--card); border: 1.5px solid var(--line); transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.mini-form__row:focus-within { border-color: var(--violet); box-shadow: 0 0 0 4px rgba(108, 0, 245, .12); }
.mini-form__row input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 0 1.1rem; font: 400 1rem var(--font); color: var(--ink); }
.mini-form__row input:focus-visible { outline: none; }
.mini-form .consent { color: var(--muted); }
.mini-form .consent a { color: var(--ink); }

/* she comes out of the picture: the photo sits in an arch, the cut-out of her
   (same size, same position) sits on top and is allowed past the arch's edge */
.hero__visual { margin: 0; display: grid; justify-items: center; }
.pop { position: relative; width: min(100%, 470px); aspect-ratio: 4 / 5; margin-top: 2rem; }
.pop__frame { position: absolute; inset: 0; overflow: hidden; border-radius: 999px 999px var(--radius) var(--radius); background: var(--wash); }
.pop__img { position: absolute; left: -12%; top: -2%; width: 128%; height: auto; max-width: none; }
.pop__cut {
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent 1%, #000 9%, #000 62%, transparent 74%), linear-gradient(to right, #000 74%, transparent 84%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to bottom, transparent 1%, #000 9%, #000 62%, transparent 74%), linear-gradient(to right, #000 74%, transparent 84%);
  mask-composite: intersect;
}

/* ==========================================================================
   How it works
   ========================================================================== */
.how { background: var(--ground); }
.steps { list-style: none; margin: 3.5rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem; counter-reset: s; }
.steps li { padding-top: 1.5rem; border-top: 2px solid var(--ink); }
.steps__n { display: block; font-size: 3rem; font-weight: 600; line-height: 1; color: var(--violet); margin-bottom: 1.25rem; letter-spacing: -0.04em; }
.steps h3 { font-size: 1.35rem; margin-bottom: .5rem; }
.steps p { color: var(--muted); }

/* ==========================================================================
   Hair identity
   ========================================================================== */
.identity { background: var(--ground); border-top: 1px solid var(--line); }
.picker { padding: 1.75rem 0 2rem; border-top: 1px solid var(--line); }
.picker:last-of-type { border-bottom: 1px solid var(--line); }
.picker__label { font-weight: 600; margin-bottom: 1rem; }
.picker__chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.picker__chips button {
  min-height: 2.9rem; padding: 0 1.35rem; border-radius: 999px; cursor: pointer;
  border: 1.5px solid var(--line); background: var(--card); color: var(--ink); font: 500 1rem var(--font);
  transition: border-color .2s var(--ease), background-color .2s var(--ease), color .2s var(--ease);
}
.picker__chips button:hover { border-color: var(--ink); }
.picker__chips button[aria-selected="true"] { background: var(--violet); border-color: var(--violet); color: #fff; }
.picker__tip { margin-top: 1.25rem; max-width: 38rem; font-size: 1.15rem; }

/* ==========================================================================
   Split sections (stylists, edit)
   ========================================================================== */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2.5rem, 7vw, 6rem); align-items: center; }
.split--reverse > :first-child { order: 2; }

.stylists { background: var(--mist); }
.edit { background: var(--ground); }
.facts { margin-top: 2rem; border-top: 1px solid var(--line); }
.facts div { display: grid; grid-template-columns: 10rem 1fr; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.facts dt { font-weight: 600; }
.facts dd { color: var(--muted); }

/* her hair breaks out of the frame */
.breakout { position: relative; justify-self: center; width: min(100%, 440px); aspect-ratio: 4 / 5; margin-top: 3rem; }
.breakout__frame { position: absolute; inset: 0; overflow: hidden; border-radius: 999px 999px var(--radius) var(--radius); background: var(--mist); }
.breakout__frame img, .breakout__pop { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.22) translate(-6%, -4%); transform-origin: 50% 40%; }
.breakout__pop {
  pointer-events: none;
  -webkit-mask-image: linear-gradient(#000 52%, transparent 72%), linear-gradient(to right, transparent 4%, #000 16%, #000 88%, transparent 97%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(#000 52%, transparent 72%), linear-gradient(to right, transparent 4%, #000 16%, #000 88%, transparent 97%);
  mask-composite: intersect;
}

.edit__photo { border-radius: var(--radius); overflow: hidden; max-width: 460px; justify-self: end; }
.contents { list-style: none; margin: 2rem 0 0; padding: 0; border-top: 1px solid var(--line); }
.contents li { display: flex; align-items: baseline; gap: 1.1rem; padding: .95rem 0; border-bottom: 1px solid var(--line); font-size: 1.2rem; font-weight: 500; }
.contents li span { font-size: .8rem; font-weight: 600; color: var(--violet); }

/* ==========================================================================
   Waitlist (dark, like the app)
   ========================================================================== */
.waitlist { background: radial-gradient(60% 80% at 50% 0%, var(--wash) 0%, rgba(241, 222, 255, 0) 70%), var(--page); padding-block: var(--space); text-align: center; }
.waitlist__inner { max-width: 48rem; padding: clamp(2.5rem, 6vw, 4rem) clamp(1.5rem, 5vw, 3.5rem); background: var(--card); border-radius: 32px; box-shadow: inset 0 0 0 1px var(--line), 0 24px 60px rgba(72, 30, 150, .12); }
.waitlist__title { font-size: clamp(2.4rem, 5.5vw, 4.2rem); letter-spacing: -0.04em; }
.waitlist__lede { margin: 1rem auto 0; max-width: 30rem; color: var(--muted); font-size: 1.08rem; }
.waitlist__form { margin-top: 2.5rem; text-align: left; }
.field-row {
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(12.5rem, 1fr) auto; gap: .4rem; padding: .4rem;
  border-radius: 999px; background: var(--ground); border: 1.5px solid var(--line);
}
.field-row:focus-within { border-color: var(--violet); box-shadow: 0 0 0 4px rgba(108, 0, 245, .12); }
.field-row input, .field-row select { min-width: 0; min-height: 3.25rem; padding: 0 1.2rem; border: 0; border-radius: 999px; background: transparent; color: var(--ink); font: 400 1rem var(--font); }
.field-row input::placeholder { color: #7A7190; }
.field-row input:focus-visible, .field-row select:focus-visible { outline: none; }
.field-row select {
  -webkit-appearance: none; appearance: none; cursor: pointer; border-radius: 0; border-left: 1.5px solid var(--line);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%235E5573' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 1.1rem center; padding-right: 2.6rem;
}
.field-row select option { color: var(--ink); }

/* ---------- Shared form bits ---------- */
.consent { display: flex; gap: .65rem; align-items: flex-start; margin-top: 1rem; font-size: .82rem; line-height: 1.55; cursor: pointer; }
.consent input { flex: none; width: 1.05rem; height: 1.05rem; margin-top: .15rem; accent-color: var(--violet); }
.waitlist .consent { color: var(--muted); justify-content: center; text-align: left; }
.waitlist .consent a { color: var(--ink); }
.form-status { min-height: 1.5em; margin-top: .75rem; font-weight: 500; font-size: .95rem; }
.form-status.is-error { color: #C2185B; }
.waitlist .form-status { text-align: center; }

.form-status.is-success { color: var(--violet); }

[data-waitlist-form].is-sending button { opacity: .6; pointer-events: none; }

/* ---------- Footer ---------- */
.footer { background: var(--ground); color: var(--muted); padding: 2.5rem 0 2rem; border-top: 1px solid var(--line); }
.footer__grid { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem 2rem; }
.footer__brand img { width: 96px; }
.footer__links { display: flex; flex-wrap: wrap; gap: 1.75rem; list-style: none; margin: 0; padding: 0; }
.footer a { text-decoration: none; font-size: .92rem; }
.footer a:hover { color: var(--violet); }
.footer__legal { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--line); font-size: .78rem; color: var(--muted); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 960px) {
  .hero__grid { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; }
  .split--reverse > :first-child { order: 0; }
  .edit__photo { justify-self: start; }
  .steps { grid-template-columns: 1fr; gap: 2rem; }
}
@media (max-width: 860px) {
  .nav__toggle { display: block; }
  .nav__menu {
    position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 1.25rem;
    padding: .5rem var(--gutter) 1.75rem; background: var(--ground); border-bottom: 1px solid var(--line);
    opacity: 0; visibility: hidden; transform: translateY(-6px);
    transition: opacity .25s var(--ease), transform .25s var(--ease), visibility .25s;
  }
  .nav__menu.is-open { opacity: 1; visibility: visible; transform: none; }
  .nav__links { flex-direction: column; gap: 0; }
  .nav__links a { display: block; padding: .9rem 0; font-size: 1.1rem; color: var(--ink); border-bottom: 1px solid var(--line); }
  .facts div { grid-template-columns: 1fr; gap: .15rem; }
}
@media (max-width: 640px) {
  .mini-form__row { flex-direction: column; border-radius: 20px; padding: .4rem; }
  .mini-form__row input { min-height: 3rem; }
  .mini-form__row .btn { width: 100%; }
  .field-row { grid-template-columns: 1fr; border-radius: 20px; }
  .field-row select { border-left: 0; border-top: 1.5px solid var(--line); border-radius: 0; }
  .field-row .btn { width: 100%; }
  .waitlist .consent { justify-content: flex-start; text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
