/* ==========================================================================
   Hero — glitter headline, sparkle field, model photo, lead form card
   Mobile: stage (texture bg) + black form band. Desktop: single 692px stage.
   ========================================================================== */

.hero {
  --hero-pad-x: clamp(20px, calc(20px + 220 * (100vw - 390px) / 1290), 240px);
  --h1-size: clamp(45px, calc(45px + 19 * (100vw - 390px) / 1290), 64px);
  position: relative;
  overflow: hidden;
  background: var(--c-black);
}

/* Stretched noise texture: covers the stage only (mobile), everything (desktop) */
.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 493px;
  background: url('/wp-content/themes/ogle/assets/img/hero-bg-texture.webp') top / 100% 115% no-repeat;
}

.hero__inner {
  position: relative;
  height: 100%;
}

.hero__sparkles { display: none; }

.hero__deco {
  position: absolute;
  /* -98px at 390 (Figma -97.9), tracks the centered model on wider phones */
  left: calc(50% - 293px);
  top: -121px;
  width: 585px;
  max-width: none; /* escape the global img{max-width:100%} clamp */
  height: 585px;
  /* Figma color-dodges the bokeh in sRGB and the model's semi-transparent
     sparkle glow renders ~2x hotter through browser compositing, so the
     whole deco+model stack is pre-baked into this opaque asset (over the
     flat rgb(5,7,8) texture tone). Model lands at (83,13) in stage coords. */
  pointer-events: none;
}

/* Mobile model is baked into .hero__deco (see above) */
.hero__model { display: none; }

.hero__fade {
  position: absolute;
  top: 183px;
  left: 0;
  right: 0;
  height: 389px;
  background: linear-gradient(to top, #000 0%, #000 69.32%, rgba(0, 0, 0, 0) 100%);
  pointer-events: none;
}

.hero__copy {
  position: relative;
  padding: 243px 20px 0;
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--h1-size);
  line-height: 1.13;
  text-transform: uppercase;
}
.hero__title-glitter {
  background: url('/wp-content/themes/ogle/assets/img/glitter-texture.webp') center / cover;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero__title-pink { color: var(--c-pink); }

.hero__lede {
  margin-top: 11px; /* Figma ink gap 16, cap-trim compensated */
  margin-bottom: 23px; /* stage bottom pad 27, trim compensated */
  max-width: 322px; /* forces the designed 5-line wrap (Jakarta is narrower than Gordita) */
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 22.8px;
  color: var(--c-white);
}

/* ---- Form band / card ---- */
.hero__form-band {
  position: relative;
  background: var(--c-black);
  padding: 20px;
}

.hero__form {
  background: #f5f5f5;
  padding: 33px 20px 35px;
  max-width: 455px;
  margin-inline: auto;
}

.hero__form-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 28px;
  line-height: 31.64px;
  text-transform: uppercase;
  color: var(--c-pink);
}

.hero__fields {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.field {
  position: relative;
  height: 66px;
}
.field__input {
  position: absolute;
  left: 0;
  top: 26px;
  width: 100%;
  height: 40px;
  padding: 0 0 16px;
  border: 0;
  border-bottom: 1px solid var(--c-black);
  border-radius: 0;
  background: transparent;
  font-family: var(--font-label);
  font-weight: 700;
  font-size: 16px;
  line-height: 24px;
  color: #111111;
  caret-color: #0056fe;
  outline: none;
}
.field__label {
  position: absolute;
  left: 0;
  top: 26px;
  font-family: var(--font-label);
  font-weight: 400;
  font-size: 16px;
  line-height: 24px;
  color: var(--c-black);
  pointer-events: none;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), font-size 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.field__input:focus + .field__label,
.field__input:not(:placeholder-shown) + .field__label {
  transform: translateY(-26px);
  font-size: 12px;
}
.field__input:focus-visible {
  border-bottom-color: var(--c-pink);
  outline: 2px solid var(--c-pink);
  outline-offset: 3px;
}
.field__error {
  position: absolute;
  left: 0;
  top: 67px;
  font-family: var(--font-label);
  font-weight: 400;
  font-size: 12px;
  line-height: 1.3;
  color: var(--c-pink-deep);
}

.hero__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 58px;
  margin-top: 18px;
  border: 2px solid var(--c-pink);
  background: transparent;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 16px;
  line-height: 1;
  letter-spacing: 3.2px;
  text-transform: uppercase;
  color: var(--c-pink);
  transition: background-color 0.2s ease-out, border-color 0.2s ease-out, color 0.2s ease-out;
}
.hero__submit:hover {
  background: var(--c-pink);
  color: var(--c-white);
}
.hero__submit:active {
  background: var(--c-pink-deep);
  border-color: var(--c-pink-deep);
  color: var(--c-white);
}

.hero__consent {
  margin-top: 18px;
  font-family: 'Roboto', sans-serif;
  font-weight: 400;
  font-size: 10px;
  line-height: 20px;
  color: var(--c-black);
}

.hero__form-success {
  margin-top: 18px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 16px;
  line-height: 22.8px;
  color: var(--c-pink-deep);
}

/* ================= Desktop (>=900px) ================= */
@media (min-width: 900px) {
  .hero {
    --s: calc(min(100vw, 1680px) / 1680);
    --form-w: clamp(390px, calc(390px + 65 * (100vw - 900px) / 780), 455px);
    /* Constant: the fixed-size form card (27px top + 638px) needs 692px at
       every desktop width; the proportional bg leaves a dark gap below at
       mid widths, covered by the ::before texture. Exact at 1680. */
    height: 692px;
  }
  .hero::before {
    height: 100%;
    background-size: 100% 100%;
  }
  /* Sparkle field + model backdrop, composited in Figma (blend stack is not
     reproducible from flattened layer exports); lede/form regions patched out,
     real content overlays it. Scales proportionally with --s. */
  .hero__inner {
    max-width: 1680px;
    margin-inline: auto;
    background: url('/wp-content/themes/ogle/assets/img/hero-bg-desktop.webp') top center / 100% auto no-repeat;
  }

  .hero__deco,
  .hero__fade,
  .hero__sparkles { display: none; }

  .hero__copy {
    position: absolute;
    left: var(--hero-pad-x);
    top: 27px;
    bottom: 27px;
    /* 388px at 1680; shrinks at mid widths so it never runs under the form card */
    width: min(388px, calc(100vw - 2 * var(--hero-pad-x) - var(--form-w) - 24px));
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  /* Scale the headline with the shrinking column at mid widths (64px at 1680) */
  .hero__title {
    font-size: min(var(--h1-size), calc((100vw - 2 * var(--hero-pad-x) - var(--form-w) - 24px) * 64 / 388));
  }
  .hero__lede {
    margin-top: 23px; /* Figma gap 28, cap-trim compensated */
    margin-bottom: 0;
    width: 269px;
  }

  /* Model overlays its baked twin in the composite background 1:1
     (proportional anchoring keeps them glued at every width) */
  .hero__model {
    display: block;
    position: absolute;
    left: calc(534 * var(--s));
    top: calc(93 * var(--s));
    width: calc(447 * var(--s));
    height: auto;
    z-index: 2;
    /* Design clips the model 25px at the hero bottom (25/624 = 4.01%);
       proportional clip keeps the img flush with the scaled bg's bottom edge */
    clip-path: inset(0 0 4.01% 0);
  }

  .hero__form-band {
    position: absolute;
    right: var(--hero-pad-x);
    top: 27px;
    width: var(--form-w);
    background: none;
    padding: 0;
    /* Above the model: no overlap at 1680 (design gap 4px), but at mid widths
       the proportionally-anchored model would otherwise cover the fields */
    z-index: 3;
  }
  .hero__form {
    padding: 42px;
    max-width: none;
  }

  .hero__consent {
    font-family: var(--font-body);
    font-weight: 500;
  }
}
