/* ===========================================================
   BioStacks — Invitation gate
   Full-bleed split screen. No card, no frame. Editorial + minimal.
   System (SF / Apple) font stack, teal accent, zero dependencies.
   =========================================================== */

:root {
  --ink:        #112033;   /* deep navy headline — echoes the product */
  --body:       #5a6473;   /* muted body text */
  --faint:      #9aa3ae;   /* labels, captions */
  --hair:       #e6e8ed;   /* hairlines */
  --surface:    #fbfaf7;   /* warm ivory */
  --teal:       #0f766a;   /* deep pine-teal — premium, not minty */
  --teal-deep:  #0b5a50;
  --teal-tint:  rgba(15,118,106,.12);
  --bag:        #2b54b8;   /* cobalt — matches the cold-chain bag */
  --bag-deep:   #1f3f8c;   /* deeper cobalt for hover/active */
  --danger:     #c64a3f;

  --ease:  cubic-bezier(.22,.61,.36,1);
  --font:  -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
           "Helvetica Neue", "Segoe UI", Roboto, Arial, sans-serif;
  --mono:  ui-monospace, "SF Mono", "SFMono-Regular", Menlo, Consolas,
           "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- Split layout ---------- */
.split {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 58% 42%;
}

/* ============== MEDIA (left, full-bleed) ============== */
.media {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(160deg, #2a3340 0%, #11151b 60%, #05070a 100%);
}
.media__img, .media__img img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
}
.media__img img { object-fit: cover; object-position: center 38%; }
.media__scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(5,8,12,.28) 0%, rgba(5,8,12,0) 26%),
    linear-gradient(180deg, rgba(5,8,12,0) 40%, rgba(5,8,12,.42) 72%, rgba(5,8,12,.88) 100%);
}

.media__top {
  position: relative; z-index: 1;
  padding: clamp(28px, 3.4vw, 48px);
}
.wordmark {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .42em;
  color: rgba(255,255,255,.92);
}
.wordmark__r {
  font-size: .58em;
  font-weight: 600;
  letter-spacing: 0;
  top: -.7em;
  margin-left: .1em;
}

.media__bottom {
  position: absolute; z-index: 1;
  left: 0; right: 0; bottom: 0;
  padding: clamp(32px, 4vw, 56px);
  color: #fff;
}
.media__slides { position: relative; min-height: 116px; }
.slide {
  position: absolute; inset: 0;
  opacity: 0; transform: translateY(12px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
  pointer-events: none;
}
.slide.is-active { opacity: 1; transform: none; }
.slide__title {
  margin: 0 0 12px;
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 600;
  letter-spacing: -.025em;
  line-height: 1.05;
}
.slide__copy {
  margin: 0; max-width: 34ch;
  font-size: 16px; line-height: 1.55;
  color: rgba(255,255,255,.78);
}
.dots { display: flex; gap: 9px; margin-top: 28px; }
.dot {
  width: 7px; height: 7px; padding: 0; border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,.38);
  cursor: pointer;
  transition: width .35s var(--ease), background .35s var(--ease);
}
.dot.is-active { width: 26px; background: #fff; }

/* ============== PANEL (right, the form) ============== */
.panel {
  display: grid;
  grid-template-rows: 1fr auto;
  padding: clamp(36px, 4vw, 64px) clamp(28px, 5vw, 80px) clamp(28px, 3vw, 44px);
}
.panel__main { display: grid; place-items: center; }
.panel__inner { width: 100%; max-width: 380px; }

.view { display: none; animation: viewIn .5s var(--ease); }
.view.is-active { display: block; }
@keyframes viewIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

.eyebrow {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--teal-deep);
  margin-bottom: 18px;
}
.headline {
  margin: 0;
  font-size: clamp(34px, 3.6vw, 46px);
  font-weight: 600;
  letter-spacing: -.035em;
  line-height: 1.02;
  color: var(--ink);
}
.sub {
  margin: 16px 0 0;
  max-width: 32ch;
  font-size: 16px;
  line-height: 1.6;
  color: var(--body);
}

/* ---------- Form ---------- */
.form { margin-top: 36px; }
.field { position: relative; }
.form .field + .field { margin-top: 24px; }
.field__label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 12px;
}

/* underline-style input — editorial, no box */
.input {
  width: 100%;
  font-family: var(--font);
  font-size: 19px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1.5px solid var(--hair);
  border-radius: 0;
  padding: 10px 2px 14px;
  outline: none;
  transition: border-color .25s var(--ease);
}
.input::placeholder { color: #c4cad2; }
.input:focus { border-bottom-color: var(--teal); }

.input--code {
  text-align: center;
  font-family: var(--mono);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-size: 22px;
  padding: 10px 2px 16px;
}
.input--code::placeholder { letter-spacing: .3em; color: #d3d8de; }

/* error */
.input.is-error { border-bottom-color: var(--danger); }
.error {
  margin: 0;
  font-size: 13px; line-height: 1.4;
  color: var(--danger);
  opacity: 0; max-height: 0; overflow: hidden;
  transition: opacity .2s var(--ease), max-height .2s var(--ease), margin .2s var(--ease);
}
.error.is-visible { opacity: 1; max-height: 44px; margin: 12px 2px 0; }

@keyframes shake {
  10%, 90% { transform: translateX(-1px); }
  20%, 80% { transform: translateX(2px); }
  30%, 50%, 70% { transform: translateX(-5px); }
  40%, 60% { transform: translateX(5px); }
}
.shake { animation: shake .5s cubic-bezier(.36,.07,.19,.97) both; }

/* ---------- Button (flat, refined) ---------- */
.btn {
  width: 100%;
  margin-top: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .01em;
  color: #fff;
  background: var(--bag);
  border: 0;
  border-radius: 12px;
  padding: 17px 22px;
  cursor: pointer;
  transition: background .25s var(--ease), transform .12s var(--ease);
}
.btn:hover { background: var(--bag-deep); }
.btn:active { transform: scale(.99); }
.btn__arrow { transition: transform .25s var(--ease); }
.btn:hover .btn__arrow { transform: translateX(4px); }
.btn.is-success { background: var(--bag-deep); pointer-events: none; }
.btn.is-success .btn__arrow { display: none; }

/* quiet text link */
.link-quiet {
  display: block;
  margin-top: 22px;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  color: var(--faint);
  text-decoration: none;
  transition: color .2s var(--ease);
}
.link-quiet:hover { color: var(--ink); }

/* ---------- Foot ---------- */
.foot { margin-top: 44px; }
.foot__note {
  margin: 0 0 22px;
  font-size: 14px; line-height: 1.5;
  color: var(--body);
}
.link-accent {
  color: var(--teal-deep);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color .2s var(--ease);
}
.link-accent:hover { border-color: var(--teal-deep); }

/* ---------- Persistent panel footer (minimal) ---------- */
.panel__footer {
  max-width: 380px;
  width: 100%;
  margin: 0 auto;
}
.legal {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  font-size: 13px;
}
.legal a {
  color: var(--body);
  text-decoration: none;
  transition: color .2s var(--ease);
}
.legal a:hover { color: var(--teal-deep); }
.copyright {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 14px 0 0;
  font-size: 12px;
  color: var(--faint);
}
.copyright .lock { flex: none; color: var(--faint); }
.copyright .r { font-size: .72em; vertical-align: super; }

/* ---------- Done view ---------- */
.done__mark {
  width: 60px; height: 60px;
  margin: 0 0 26px;
  display: grid; place-items: center;
  font-size: 27px; color: #fff;
  background: var(--teal);
  border-radius: 999px;
  animation: pop .5s var(--ease) both;
}
@keyframes pop {
  0% { transform: scale(.5); opacity: 0; }
  60% { transform: scale(1.08); }
  100% { transform: scale(1); opacity: 1; }
}
.done .link-quiet { text-align: left; margin-top: 26px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; }
  .media { min-height: 42vh; }
  .media__bottom { padding: 28px; }
  .media__slides { min-height: 96px; }
  .panel { padding: 48px 28px 56px; }
  .panel__inner { max-width: 440px; margin: 0 auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
}
