/* ACG Research Mission 02 — Kaua'i
   Values taken from Figma: Nike ACG -> Research Missions, RSVP Page.
   Breakpoints follow the Figma frames: 375 / 834 / 1440. */

@font-face {
  font-family: "Helvetica Now Display";
  src: url("fonts/helveticanowdisplay-xbold.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --orange: #ff7334;
  --sand: #f0f0f0;
  --white: #fff;

  --display: "Helvetica Now Display", "Helvetica Neue", Arial, sans-serif;
  --mono: "Courier New", Courier, monospace;

  /* type scale — identical at every breakpoint */
  --h1: 32px;
  --h2: 17px;
  --h3: 12px;        /* section titles */
  --body: 14px;      /* landing copy and list */
  --detail: 12px;    /* mission details block */
  --note: 12px;      /* register notes */
  --cta: 14px;
  --field: 9px;      /* form labels and inputs */
  --courier: 12px;
  --detail-w: 300px;
  --detail-pad: 10px;

  /* landing composition — mobile frame 375 x 1889 */
  --bar-w: 359.902px;
  --lock-t: 55px;
  --lock-w: 361px;
  --lock-mark-w: 147px;
  --lock-mark-h: 126px;
  --lock-line-w: 361.37px;
  --lock-line-h: 25.245px;
  --lock-sub-w: 184.583px;
  --lock-sub-h: 25.25px;
  --lock-place-w: 325.06px;
  --lock-place-h: 121.687px;
  --body-w: 335px;
  --body-t: 539px;
  --lead-w: 335px;
  --tail-w: 243px;
  --lock-stack: 400.182px;
  --content-h: 1271px;   /* Figma: landing copy column height */
  --topo-up-t: 410px;
  --topo-lo-t: 1446px;

  --col: 280.29px; /* form column, fixed at every breakpoint */
}

* { box-sizing: border-box; }

svg[hidden] { display: none; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--sand);
  color: var(--orange);
  font-family: var(--display);
  font-weight: 800;
  overflow-x: hidden;
}

img { display: block; border: 0; }

.screen { display: none; }
body[data-view="landing"]   #landing   { display: block; }
body[data-view="form"]      #form      { display: block; }
body[data-view="confirmed"] #confirmed { display: block; }

/* ---------------------------------------------------------------- header */

.bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  width: var(--bar-w);
  margin: 0 auto;
  padding-top: 7px;
  font-family: var(--mono);
  font-weight: 400;
  font-size: var(--courier);
  line-height: 8px;
  text-transform: uppercase;
}

.bar__side { width: 100px; flex: none; }
.bar__side--end { text-align: right; }

.bar__mark {
  display: block;
  flex: none;
  width: 29px;
  height: 22px;
  fill: currentColor;
}

.landing .bar { color: var(--sand); position: relative; z-index: 3; }
.form .bar,
.status .bar { color: var(--orange); }
.form .bar .bar__mark,
.status .bar .bar__mark { width: 35px; height: 30px; }

/* --------------------------------------------------------------- landing */

.landing {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  padding-bottom: 79px;
  background: #16331a url("img/bg-mobile.webp") center top / cover no-repeat;
}

/* 25% black scrim behind the header row */
.landing::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 32px;
  background: linear-gradient(180deg, rgb(0 0 0 / 25%), rgb(0 0 0 / 0%));
  z-index: 1;
}

.topo {
  position: absolute;
  left: 0;
  width: 100%;
  height: auto;
  z-index: 1;
  pointer-events: none;
}
.topo--upper { top: var(--topo-up-t); }
.topo--lower { top: var(--topo-lo-t); }
.topo--wide { display: none; }

/* lockup: mark, mission line, sub line, place mark — gaps 69 / 7 / 7 */
.lockup {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: var(--lock-w);
  margin: calc(var(--lock-t) - 29px) auto 0; /* the bar occupies 7 + 22 */
  color: var(--sand);
}

.lockup__mark  { width: var(--lock-mark-w);  height: var(--lock-mark-h); margin-bottom: 69px; }
.lockup__line  { width: var(--lock-line-w);  height: var(--lock-line-h); margin-bottom: 7px; }
.lockup__sub   { width: var(--lock-sub-w);   height: var(--lock-sub-h);  margin-bottom: 26px; }
.lockup__place { width: var(--lock-place-w); height: var(--lock-place-h); }

/* body and CTA sit in a fixed-height column, spaced apart, as in Figma */
.landing__content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: var(--body-w);
  min-height: var(--content-h);
  margin: calc(var(--body-t) - var(--lock-t) - var(--lock-stack)) auto 0;
  color: var(--sand);
}

.detail {
  width: var(--detail-w);
  margin: 0 auto;
  padding: var(--detail-pad) 0;
  color: var(--sand);
  font-size: var(--detail);
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
  white-space: pre-line;
}

.brief { margin: 35px 0 0; font-size: var(--body); line-height: 1; }
.brief p { margin: 0; }

.expect { margin-top: 35px; }

.expect__title {
  margin: 0 0 10px;
  color: var(--white);
  font-size: var(--body);
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}

.expect__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: var(--body);
  line-height: 1;
}

.expect__list li { position: relative; padding-left: 11px; }

.expect__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--white);
}

.expect__note { margin: 5px 0 0; font-size: var(--body); line-height: 1; }

.landing__cta { margin-top: 55px; text-align: center; }
.landing__content > .landing__cta { margin-top: 55px; }

.note {
  margin: 0 auto;
  font-size: var(--note);
  line-height: 1;
  text-transform: uppercase;
}
.note--lead { width: var(--lead-w); }

.buttons {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 286px;
  margin: 33px auto 0;
}

.h1 {
  margin: 0;
  font-size: var(--h1);
  line-height: 0.9;
  font-weight: 800;
  text-transform: uppercase;
}

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

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 50px;
  border: 1px solid transparent;
  border-radius: 5.84px;
  font-family: var(--display);
  font-weight: 800;
  text-transform: uppercase;
  cursor: pointer;
  appearance: none;
}

.btn--ghost {
  background: var(--sand);
  border-color: var(--sand);
  color: #000;
  font-size: var(--h2);
  line-height: 1;
}

.btn--solid {
  width: 280px;
  background: var(--orange);
  color: var(--sand);
  font-size: var(--cta);
  line-height: 0.85;
}

.btn[disabled] { opacity: 0.45; cursor: default; }

/* ------------------------------------------------------------------ form */

.form,
.status { padding: 0 8px 60px; }

.form__title,
.status__title {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 304px;
  height: 53px; /* fixed text box, as in Figma */
  margin: 33px auto 0;
  font-size: var(--h1);
  line-height: 0.9;
  text-align: center;
  text-transform: uppercase;
}

.form__steps { margin-top: 60px; }

.step { display: none; border: 0; padding: 0; margin: 0; }
.step[data-active] { display: block; }

.section { width: var(--col); margin: 0 auto; }

.section__title {
  margin: 0 0 16px;
  font-size: var(--h3);
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
}

.fields {
  display: flex;
  flex-direction: column;
  gap: 7.508px;
}

.fields--tight { gap: 10px; }
.fields--loose { gap: 20px; }

.field { display: flex; flex-direction: column; }
.field--asked { gap: 10px; }

.field__label {
  font-size: var(--field);
  line-height: 1;
}
.field__label--centre { text-align: center; text-transform: uppercase; }

.field input,
.field textarea {
  display: block;
  width: 100%;
  padding: 10px 8px;
  border: 0.7px solid var(--orange);
  border-radius: 1.668px;
  background: transparent;
  color: var(--orange);
  font-family: var(--display);
  font-weight: 800;
  font-size: var(--field);
  line-height: 1;
  text-transform: uppercase;
  appearance: none;
}

.field input { height: calc(var(--field) + 21.4px); }   /* text + 10/10 padding + hairline */
.field textarea {
  height: calc(var(--field) * 2 + 21.4px); /* same, two lines */
  resize: none;
  overflow: hidden;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--orange);
  opacity: 1;
  text-transform: uppercase;
}

.field input:focus,
.field textarea:focus { outline: 1px solid var(--orange); outline-offset: 1px; }
.field[data-invalid] input,
.field[data-invalid] textarea { border-width: 1.5px; }

.rule {
  height: 65px;
  margin: 0;
  border: 0;
  background: repeating-linear-gradient(
    to right,
    var(--orange) 0 2.19px,
    transparent 2.19px 4.38px
  ) center / 100% 0.7px no-repeat;
}

.form__foot {
  width: 280px;
  margin: 30px auto 0;
  text-align: center;
}

.back {
  display: inline-block;
  margin-top: 15px;
  border: 0;
  padding: 0;
  background: none;
  color: var(--orange);
  font-family: var(--display);
  font-weight: 800;
  font-size: var(--field);
  line-height: 1;
  text-transform: uppercase;
  cursor: pointer;
}

.error {
  margin: 12px auto 0;
  width: var(--col);
  font-size: var(--field);
  line-height: 1.2;
  text-transform: uppercase;
}
.error:empty { margin: 0; }

/* ---------------------------------------------------------------- status */

.status { min-height: 100vh; text-align: center; }

.status__title {
  width: auto;
  height: auto;
  margin: 0 auto;
  padding-top: 44vh; /* matches the title position in both Figma frames */
}

.status__note {
  width: 286px;
  margin: 48px auto 0;
  font-size: var(--note);
  line-height: 1;
  text-transform: uppercase;
}

/* ------------------------------------------------------------- 834 frame */

@media (min-width: 768px) {
  :root {
    --bar-w: 380px;
    --lock-t: 45px;
    --lock-w: 380px;
    --lock-mark-w: 158px;
    --lock-mark-h: 135px;
    --lock-line-w: 380px;
    --lock-line-h: 26.547px;
    --lock-sub-w: 194.087px;
    --lock-sub-h: 26.55px;
    --body-w: 380px;
    --body-t: 549px;
    --lead-w: 272px;
    --lock-stack: 411.784px;
    --content-h: 1204px;
    --topo-up-t: 427px;
    --topo-lo-t: 1396.5px;
    --body: 16px;
    --detail: 14px;
    --note: 14px;
    --field: 12px;
    --h3: 14px;
    --col: 340px;
  }

  .landing { background-image: url("img/bg-tablet.webp"); padding-bottom: 100px; }

  .topo { display: none; }
  .topo--wide { display: block; }

  .form__title { margin-top: 220px; }
  .form__steps { margin-top: 30px; }
  .form .bar, .status .bar { width: 550px; }
}

/* ------------------------------------------------------------ 1440 frame */

@media (min-width: 1200px) {
  :root {
    --bar-w: 550px;
    --lock-t: 44.9px;
    --lock-w: 525px;
    --lock-mark-w: 197px;
    --lock-mark-h: 169px;
    --lock-line-w: 525px;
    --lock-line-h: 36.68px;
    --lock-sub-w: 268.14px;
    --lock-sub-h: 36.68px;
    --lock-place-w: 415.77px;
    --lock-place-h: 155.64px;
    --body-w: 550px;
    --body-t: 665px;
    --lead-w: 430px;
    --tail-w: 472px;
    --lock-stack: 500px;
    --content-h: 1387.79px;
    --topo-up-t: 294.92px;
    --topo-lo-t: 1600px;
    --body: 18px;
    --detail: 18px;
    --note: 18px;
    --field: 13px;
    --h3: 15px;
    --col: 380px;
    --detail-w: 450px;
    --detail-pad: 20px;
  }

  .landing { background-image: url("img/bg-desktop.webp"); padding-bottom: 92px; }

  /* River lines hold the height they are drawn at so they stay put vertically,
     and widen past the viewport so the ends always run off screen. */
  .topo--upper.topo--wide {
    left: calc(50% - max(973.638px, 67.615vw) - 218.362px);
    top: 294.92px;
    width: max(1947.276px, 135.23vw);
    height: 674.295px;
  }

  .topo--lower.topo--wide {
    left: calc(50% - max(720px, 50vw));
    width: max(1440px, 100vw);
    height: 279px;
  }

  .status__note { width: 360px; }
}

@media (prefers-reduced-motion: no-preference) {
  .step[data-active] { animation: fade 0.18s ease-out; }
  @keyframes fade { from { opacity: 0; } to { opacity: 1; } }
}
