/* ==========================================================================
   Vôlei da Lulu · v3 · athlete campaign
   One viewport: a signed-athlete launch poster. Black ground, one committed
   violet field, billboard-scale extra-condensed name, the athlete in front.
   ========================================================================== */

@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* palette */
  --c-black: #0A0A0A;
  --c-black-2: #141414;    /* modal sheet */
  --c-black-3: #1E1E1E;    /* inputs */
  --c-line: #3A3A3A;       /* hairlines on black */
  --c-white: #F4F4F0;      /* type */
  --c-white-2: #BDBDB6;    /* secondary type on black (8.9:1) */
  --c-violet: #8B3FD4;     /* the committed field */
  --c-violet-ink: #EFE6FA; /* secondary type on violet */
  --c-violet-hi: #B98AEA;  /* focus, small violet type on black */
  --c-warn: #FFB35C;

  /* roles */
  --bg: var(--c-black);
  --ink: var(--c-white);
  --ink-2: var(--c-white-2);
  --field: var(--c-violet);
  --focus: var(--c-violet-hi);

  --font: "Archivo", "Arial Narrow", sans-serif;
  --gutter: 16px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1); /* expo-like */
  --tap: 52px;

  /* parallax inputs, set by main.js on desktop */
  --px: 0;
  --py: 0;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100svh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
  caret-color: var(--c-violet-hi);
}
body.has-modal { overflow: hidden; }
::selection { background: var(--c-violet); color: var(--c-white); }
h1, h2, p, figure { margin: 0; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

.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;
}
.skip-link {
  position: absolute; left: var(--gutter); top: -60px; z-index: 20;
  padding: 10px 14px; background: var(--c-white); color: var(--c-black);
  font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* ==========================================================================
   Page frame
   ========================================================================== */

.page {
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.bar {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px var(--gutter);
}
.bar__brand { display: inline-flex; min-height: 44px; align-items: center; }
.bar__brand img { height: 26px; width: auto; } /* includes the circumflex: caps stay ~20px */
.bar__place {
  font-size: 12px;
  font-weight: 700;
  font-stretch: 75%;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-white);
}

/* ==========================================================================
   Hero (mobile first)
   ========================================================================== */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto auto auto;
  align-content: start;
  padding: 0 var(--gutter);
  isolation: isolate;
  --slab-h: min(118vw, 50svh);
  --name: clamp(64px, 28vw, 150px);
}

/* The committed violet field: behind the name and the athlete. */
.slab {
  position: absolute;
  z-index: -1;
  inset: 0 0 auto 0;
  height: var(--slab-h);
  background: var(--field);
  transform-origin: bottom;
  animation: slab-rise 900ms var(--ease-out) 80ms backwards;
}
/* the floor line where the athlete stands */
.slab::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--c-white);
  opacity: 0.55;
}

.title {
  grid-row: 1;
  position: relative;
  display: grid;
  padding-top: 18px;
  font-weight: 900;
}
.title__name {
  display: grid;
  font-stretch: 62%;
  font-size: var(--name);
  line-height: 0.8;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--c-white);
}
/* poster layering: VÔLEI runs behind the athlete, DA LULU crosses in front of her */
.title__row {
  position: relative;
  z-index: 1;
  display: block;
  overflow: hidden;
  /* room for the circumflex in VÔLEI inside the wipe mask, without moving the rows */
  padding-top: 0.16em;
  margin-top: -0.16em;
  padding-bottom: 0.04em;
  transform: translate3d(calc(var(--px) * -10px), calc(var(--py) * -6px), 0);
}
.title__row:nth-child(2) { z-index: 3; }
.title__row > span {
  display: block;
  animation: row-up 900ms var(--ease-out) backwards;
}
.title__row:nth-child(2) > span { animation-delay: 110ms; }

/* "chega em Lagoa Santa em maio de 2027": below the field, on black */
.title__line {
  position: relative;
  z-index: 3;
  display: block;
  max-width: 15ch;
  /* push the line below the violet field: field height - top pad - name height */
  margin-top: calc(var(--slab-h) - 18px - (1.68 * var(--name)) + 12px);
  font-stretch: 75%;
  font-size: clamp(30px, 8.6vw, 44px);
  line-height: 0.98;
  text-wrap: balance;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: var(--c-white);
  animation: fade-up 800ms var(--ease-out) 420ms backwards;
}
.title__date { color: var(--c-violet-hi); }

/* The athlete stands in front of her name, feet on the field's floor line. */
.athlete {
  position: absolute;
  z-index: 2;
  top: 0;
  left: calc(58% - var(--slab-h) / 3);
  height: var(--slab-h);
  width: auto;
  display: flex;
  justify-content: center;
  pointer-events: none;
  transform: translate3d(calc(var(--px) * 8px), calc(var(--py) * 4px), 0);
}
.athlete picture { display: block; height: 100%; }
.athlete__img {
  height: 100%;
  width: auto;
  object-fit: contain;
  object-position: bottom center;
  animation: athlete-in 1000ms var(--ease-out) 700ms backwards;
}
.athlete__tag {
  position: absolute;
  /* pinned to the page gutter (figure box starts at 58vw - slab/3), clear of her body */
  left: calc(var(--gutter) - 58vw + var(--slab-h) / 3);
  bottom: 10px;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 800;
  font-stretch: 75%;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c-white);
}

.pitch {
  position: relative;
  z-index: 3;
  display: grid;
  gap: 14px;
  margin-top: 14px;
  padding-bottom: 18px;
}
/* Lineup: the offers run in one line like a broadcast team sheet,
   separated by violet slashes, wrapping naturally on small screens. */
.lineup {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 0;
  margin: 0;
  padding: 0;
  list-style: none;
  animation: fade-up 800ms var(--ease-out) 480ms backwards;
}
.lineup li {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-size: clamp(17px, 4.8vw, 22px);
  font-weight: 800;
  font-stretch: 75%;
  line-height: 1.1;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--c-white);
  white-space: nowrap;
}
.lineup li:not(:last-child)::after {
  content: "/";
  margin: 0 10px 0 4px;
  font-weight: 400;
  color: var(--c-violet-hi);
  transform: skewX(-8deg);
}
.lineup__note {
  font-size: max(12px, 0.68em);
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--c-violet-hi);
}
.pitch__text {
  max-width: 34ch;
  font-size: 16px;
  line-height: 1.45;
  color: var(--ink-2);
  animation: fade-up 800ms var(--ease-out) 520ms backwards;
}

/* ==========================================================================
   CTA: lights from within on hover
   ========================================================================== */

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: var(--tap);
  width: 100%;
  padding: 0 20px 0 22px;
  border: 0;
  border-radius: 0;
  background: var(--c-white);
  color: var(--c-black);
  font-size: 17px;
  font-weight: 800;
  font-stretch: 80%;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  transition: color 320ms var(--ease-out), transform 260ms var(--ease-out);
  animation: fade-up 800ms var(--ease-out) 620ms backwards;
}
/* hover: the violet field rises through the button like the court lights coming on */
.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--c-violet);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 380ms var(--ease-out);
}
.cta__arrow { flex: none; transition: transform 260ms var(--ease-out); }
.cta:hover { color: var(--c-white); }
.cta:hover::before { transform: scaleY(1); }
.cta:hover .cta__arrow { transform: translateX(4px); }
.cta:active { transform: translateY(1px); }
.cta:disabled { cursor: progress; opacity: 0.7; }
.cta--block { width: 100%; justify-content: center; animation: none; }
.cta--ghost {
  background: transparent;
  color: var(--c-white);
  box-shadow: inset 0 0 0 1px var(--c-line);
}
.cta--ghost::before { background: var(--c-black-3); }
.cta--ghost:hover { box-shadow: inset 0 0 0 1px var(--c-white); }

/* ==========================================================================
   Footer
   ========================================================================== */

.foot {
  display: grid;
  gap: 4px;
  padding: 14px var(--gutter) 18px;
  border-top: 1px solid var(--c-line);
  font-size: 12px;
  color: var(--ink-2);
}
.foot p:first-child {
  font-weight: 700;
  color: var(--c-white);
}

/* ==========================================================================
   Modal
   ========================================================================== */

.modal {
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
}
.modal[open] { display: flex; align-items: flex-end; }
.modal::backdrop { background: rgba(10, 10, 10, 0.78);  }
.modal__card {
  position: relative;
  width: 100%;
  max-height: 94svh;
  overflow-y: auto;
  padding: 26px var(--gutter) 22px;
  background: var(--c-black-2);
  scrollbar-width: thin;
  scrollbar-color: var(--c-line) transparent;
  animation: sheet-up 420ms var(--ease-out);
}
.modal__card::-webkit-scrollbar { width: 6px; }
.modal__card::-webkit-scrollbar-thumb { background: var(--c-line); }
.modal__close {
  position: absolute;
  top: 10px;
  right: 8px;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: var(--c-white);
  cursor: pointer;
}
.modal__close:hover { color: var(--c-violet-hi); }
.modal__title {
  padding-right: 44px;
  font-size: clamp(34px, 9vw, 44px);
  font-weight: 900;
  font-stretch: 62%;
  line-height: 0.92;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.modal__desc { margin-top: 12px; color: var(--ink-2); max-width: 46ch; }
.modal__desc strong { color: var(--c-white); }
.modal__desc--small { font-size: 14px; }

.form { display: grid; gap: 16px; margin-top: 22px; }
.field { display: grid; gap: 6px; margin: 0; padding: 0; border: 0; min-width: 0; }
.field__label {
  padding: 0;
  font-size: 12px;
  font-weight: 800;
  font-stretch: 75%;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-white);
}
.field__optional { color: var(--ink-2); font-weight: 600; letter-spacing: 0.08em; }
.field__input {
  width: 100%;
  min-height: var(--tap);
  padding: 0 14px;
  border: 1px solid var(--c-line);
  border-radius: 0;
  background: var(--c-black-3);
  color: var(--c-white);
  font: inherit;
  font-size: 17px;
  transition: border-color 180ms var(--ease-out), box-shadow 180ms var(--ease-out);
}
.field__input::placeholder { color: #8E8E87; } /* 5.2:1 on --c-black-3 */
.field__input:hover { border-color: #5A5A5A; }
.field__input:focus { outline: none; border-color: var(--c-violet-hi); box-shadow: 0 0 0 3px rgba(139, 63, 212, 0.45); }
.field__input[aria-invalid="true"] { border-color: var(--c-warn); }
.field__hint { font-size: 13px; color: var(--ink-2); }
.field__error { font-size: 13px; color: var(--c-warn); min-height: 0; }
.field__error:empty { display: none; }

.chips__list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.chip { position: relative; display: inline-flex; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip__label {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--c-line);
  font-size: 14px;
  font-weight: 700;
  font-stretch: 85%;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--c-white);
  transition: background-color 180ms var(--ease-out), border-color 180ms var(--ease-out);
}
.chip input:hover + .chip__label { border-color: var(--c-white-2); }
.chip input:checked + .chip__label { background: var(--c-violet); border-color: var(--c-violet); }
.chip input:focus-visible + .chip__label { outline: 2px solid var(--focus); outline-offset: 2px; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__error { color: var(--c-warn); font-size: 14px; }
.form__error:empty { display: none; }
.privacy { font-size: 12px; color: var(--ink-2); }

.modal__view--success { display: grid; gap: 4px; padding-top: 6px; }
.modal__view--success[hidden] { display: none; }
.modal__view--success .cta { margin-top: 18px; }

/* ==========================================================================
   Motion
   ========================================================================== */

@keyframes row-up { from { transform: translateY(105%); } }
@keyframes slab-rise { from { transform: scaleY(0); } }
@keyframes athlete-in { from { transform: translateY(6%); opacity: 0; filter: blur(6px); } }
@keyframes fade-up { from { transform: translateY(12px); opacity: 0; } }
@keyframes sheet-up { from { transform: translateY(24px); opacity: 0; } }

/* ==========================================================================
   Desktop: name across the left, field on the right, athlete on the field
   ========================================================================== */

@media (min-width: 900px) {
  :root { --gutter: clamp(32px, 4vw, 64px); }

  .bar { padding: 22px var(--gutter); }
  .bar__brand img { height: 31px; }

  .hero {
    grid-template-columns: minmax(0, 58fr) minmax(0, 42fr);
    grid-template-rows: 1fr auto;
    align-content: stretch;
    padding: 0 var(--gutter);
    min-height: 0;
  }
  .slab {
    inset: -88px 0 0 calc(var(--body-x) - 48px);
    width: auto;
    height: auto;
  }
  .slab::after { display: none; }

  .title {
    grid-column: 1 / -1;
    grid-row: 1;
    align-self: center;
    /* clears the bar for the circumflex of VÔLEI */
    padding-top: calc(0.14 * var(--name));
  }
  /* sized by width AND height so the CTA stays above the fold on short laptops */
  .hero {
    --name: clamp(110px, min(20vw, 26svh), 320px);
    /* geometry is tied to the name so the athlete always overlaps its last letters:
       "DA LULU" is ~3.15 names wide; her body starts ~2.7 names in */
    --ath-h: min(86svh, 960px);
    --body-x: calc(var(--gutter) + 2.7 * var(--name));
  }
  .title__line {
    /* stays in the copy column, clear of the athlete's body */
    max-width: calc(2.7 * var(--name) - 24px);
    margin-top: 26px;
    font-size: clamp(30px, 2.8vw, 46px);
  }

  .athlete {
    top: auto;
    bottom: 0;
    right: auto;
    /* the stand-in/cut-out body sits ~25.8% into the image box (310/1200) */
    left: calc(var(--body-x) - 0.172 * var(--ath-h));
    height: var(--ath-h);
  }
  /* floor line: she stands on it */
  .hero::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 1px;
    background: var(--c-white);
    opacity: 0.45;
    z-index: 3;
  }
  /* jersey caption runs up the athlete's right edge, on the violet field */
  .athlete__tag {
    left: 100%;
    bottom: 32px;
    transform: rotate(180deg);
    writing-mode: vertical-rl;
    padding: 0 0 0 12px;
  }

  .pitch {
    grid-column: 1;
    grid-row: 2;
    /* reserve the column: copy and CTA stay clear of the athlete's body */
    max-width: min(calc(2.7 * var(--name) - 40px), 520px);
    gap: 22px;
    margin-top: 20px;
    padding-bottom: 40px;
  }
  .pitch__text { font-size: 17px; }


  .foot {
    grid-template-columns: auto 1fr;
    gap: 24px;
    padding: 16px var(--gutter);
  }
  .foot p:last-child { text-align: right; }

  .modal[open] { align-items: center; justify-content: center; padding: 24px; }
  .modal__card {
    max-width: 540px;
    max-height: calc(100svh - 48px);
    padding: 34px 36px 30px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
  }
  .title__row, .athlete { transform: none !important; }
}
