/* ASCEND early-access pass — values transcribed from the design mockup
   (Early access pass-html). Dark graphite + one amber accent. */

:root {
  --bg: #0e0f11;
  --fg: #fafafa;
  --muted: #a1a1aa;
  --border: #2a2a2e;
  --ring: #71717a;
  --gold: #efc24b;
  --ink: #18181b;
  --card: #fafafa;
  --ok: #2eb88a;
  --bad: #ef4444;
  --bad-fg: #f87171;
}

* { box-sizing: border-box; }

/* The UA rule for [hidden] does not reach SVG elements, and the button's
   spinner and tick are SVG. */
[hidden] { display: none !important; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: Inter, system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.ea-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- shell ---------- */

.ea {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}

.ea-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.ea-scrim {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 60% 70% at 32% 50%,
    rgba(14, 15, 17, 0.82), rgba(14, 15, 17, 0.35) 70%, rgba(14, 15, 17, 0.2));
}

.ea-header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  height: 64px;
  padding: 0 28px;
  pointer-events: none;
}

.ea-logo {
  display: flex;
  align-items: baseline;
  font-family: Montserrat, Inter, sans-serif;
  font-weight: 800;
  font-size: 23px;
  letter-spacing: -0.01em;
  color: #fff;
}

.ea-logo svg { margin-right: 1px; }

.ea-main {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 24px 64px;
  pointer-events: none;
}

.ea-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 80px;
  width: 100%;
  max-width: 1040px;
  pointer-events: auto;
}

.ea-col { min-width: 0; }

/* ---------- copy ---------- */

.ea-eyebrow {
  margin: 0 0 12px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

.ea-h {
  margin: 0;
  font-size: 40px;
  line-height: 1.05;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.ea-lede {
  margin: 16px 0 0;
  max-width: 46ch;
  font-size: 16px;
  line-height: 1.625;
  color: var(--muted);
}

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

.ea-form {
  margin-top: 28px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  max-width: 480px;
}

.ea-field { flex: 1; min-width: 0; }

.ea-form input[type='email'] {
  width: 100%;
  min-width: 160px;
  height: 44px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--fg);
  font-family: inherit;
  font-size: 15px;
  transition: border-color .3s, box-shadow .3s, background-color .3s;
}

.ea-form input::placeholder { color: rgba(161, 161, 170, .7); }

.ea-form input:focus-visible {
  outline: none;
  border-color: var(--ring);
  box-shadow: 0 0 0 2px rgba(113, 113, 122, .4);
}

.ea-form input:disabled {
  color: var(--muted);
  background: rgba(39, 39, 42, .6);
  cursor: default;
}

.ea-form input[aria-invalid='true'] { border-color: var(--bad); }

.ea-help {
  margin: 12px 0 0;
  min-height: 20px;
  font-size: 12.5px;
  line-height: 20px;
  color: var(--muted);
}

.ea-help[data-tone='bad'] { color: var(--bad-fg); }

.ea-btn {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 12px;
  background: var(--card);
  color: var(--ink);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .3s, color .3s, opacity .3s;
}

.ea-btn:hover:not(:disabled) { background: rgba(250, 250, 250, .9); }
.ea-btn:disabled { cursor: default; opacity: .4; }
.ea-btn:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--ring); }

.ea-btn[data-state='busy'] { opacity: 1; }

.ea-btn[data-state='issued'] {
  background: rgba(46, 184, 138, 0.15);
  color: var(--fg);
  opacity: 1;
}

.ea-btn[data-state='issued']:hover:not(:disabled) { background: rgba(46, 184, 138, 0.15); }

.ea-link {
  margin-top: 2px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 12.5px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.ea-link:hover { color: var(--fg); }
.ea-link:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--ring); }

/* ---------- art + pass ---------- */

.ea-wrap {
  justify-self: end;
  position: relative;
  width: 580px;
  max-width: 100%;
  height: 660px;
}

.ea-agent {
  position: absolute;
  right: -60px;
  top: -60px;
  width: 560px;
  height: 560px;
  pointer-events: none;
}

.ea-agent-glow {
  position: absolute;
  inset: 8% 6% 4% 14%;
  border-radius: 50%;
  background: radial-gradient(circle at 55% 40%,
    rgba(239, 194, 75, 0.32), rgba(239, 194, 75, 0.08) 45%, transparent 70%);
  filter: blur(18px);
}

.ea-agent-art {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: grayscale(0.85) brightness(0.7) drop-shadow(0 30px 40px rgba(0, 0, 0, 0.6));
  transition: filter .8s ease;
  -webkit-mask-image: linear-gradient(to bottom, #000 78%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 78%, transparent 100%);
}

.ea-agent-art[data-issued='true'] {
  filter: drop-shadow(0 30px 40px rgba(0, 0, 0, 0.6));
}

.ea-stage {
  position: absolute;
  left: 160px;
  top: 290px;
  z-index: 1;
  width: 380px;
  max-width: 100%;
  perspective: 900px;
  opacity: .85;
}

.ea-stage[data-issued='true'] { opacity: 1; }

.ea-pass {
  --rx: 0deg; --ry: 0deg; --mx: 50%; --my: 50%; --shx: 0px; --shy: 24px;
  position: relative;
  width: 100%;
  aspect-ratio: 1.586 / 1;
  overflow: hidden;
  border-radius: 20px;
  background-color: var(--card);
  color: var(--ink);
  transform-style: preserve-3d;
  transform: rotateX(var(--ry)) rotateY(var(--rx));
  box-shadow:
    var(--shx) var(--shy) 48px -16px rgba(0, 0, 0, 0.55),
    0 1px 2px rgba(0, 0, 0, 0.35),
    inset 0 0 0 1px rgba(14, 15, 17, 0.15);
  background-image:
    linear-gradient(to right, rgba(14, 15, 17, 0.07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(14, 15, 17, 0.07) 1px, transparent 1px);
  background-size: 22px 22px;
  background-position: 11px 11px;
}

.ea-pass-body {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: calc(100% - 64px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
}

.ea-pass-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ea-pass-brand svg { flex: none; }

.ea-pass-brand span {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.8;
}

.ea-pass-name-row { min-width: 0; }

.ea-pass-name {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 26px;
  line-height: 1;
  font-weight: 600;
  letter-spacing: -0.025em;
  opacity: 0.35;
}

.ea-pass-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.ea-pass-meta {
  display: flex;
  align-items: flex-end;
  gap: 20px;
}

.ea-pass-key {
  display: block;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.6;
}

.ea-pass-val {
  display: block;
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
  opacity: 0.35;
}

.ea-pass-num {
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.025em;
}

.ea-pass-date {
  font-size: 11px;
  line-height: 1;
}

.ea-pass[data-issued='true'] .ea-pass-name,
.ea-pass[data-issued='true'] .ea-pass-val { opacity: 1; }

.ea-barcode {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 20px;
  opacity: 0.7;
}

.ea-barcode i {
  display: block;
  height: 100%;
  background: var(--ink);
}

.ea-pass-stub {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: 64px;
  border-left: 1px dashed rgba(14, 15, 17, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ea-notch {
  position: absolute;
  left: 0;
  width: 12px;
  height: 12px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: var(--bg);
}

.ea-notch-top { top: -6px; }
.ea-notch-bottom { bottom: -6px; }

.ea-stub-text {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  opacity: 0.7;
}

.ea-sheen {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  mix-blend-mode: multiply;
  opacity: 0;
  transition: opacity .5s;
  background-image:
    radial-gradient(200px circle at var(--mx) var(--my), rgba(46, 184, 138, 0.09), transparent 70%),
    linear-gradient(115deg, transparent 36%, rgba(239, 194, 75, 0.12) 46%, rgba(46, 184, 138, 0.11) 54%, transparent 64%);
  background-size: 100% 100%, 220% 100%;
  background-position: 0 0, var(--mx) 0;
  background-repeat: no-repeat;
}

.ea-pass[data-issued='true'] .ea-sheen { opacity: 1; }

.ea-sweep {
  position: absolute;
  inset: 0;
  pointer-events: none;
  mix-blend-mode: multiply;
  background-image: linear-gradient(115deg, transparent 38%,
    rgba(239, 194, 75, 0.16) 47%, rgba(46, 184, 138, 0.14) 53%, transparent 62%);
}

/* ---------- motion ---------- */

@keyframes eaSpin { to { transform: rotate(360deg); } }
.ea-spin { animation: eaSpin .9s linear infinite; }

@keyframes eaBreath { 0%, 100% { transform: scale(.97); } 50% { transform: scale(.97); } }
.ea-breath { animation: eaBreath 4s ease-in-out infinite; }

@keyframes eaIssue { from { transform: scale(.96); opacity: .85; } to { transform: none; opacity: 1; } }
.ea-live { animation: eaIssue .52s cubic-bezier(.22, 1, .36, 1) both; }

@keyframes eaName { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.ea-name-in { animation: eaName .3s cubic-bezier(.22, 1, .36, 1) .12s both; }

@keyframes eaFade { from { opacity: 0; } to { opacity: 1; } }
.ea-fade-in { animation: eaFade .32s cubic-bezier(.22, 1, .36, 1) .26s both; }

@keyframes eaSweep { from { transform: translateX(-120%); } to { transform: translateX(120%); } }
.ea-sweep:not([hidden]) { animation: eaSweep .9s cubic-bezier(.4, 0, .2, 1) .22s both; }

@keyframes eaFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.ea-float { animation: eaFloat 6s ease-in-out infinite; }

/* ---------- narrow ---------- */

@media (max-width: 860px) {
  /* minmax(0, 1fr), not 1fr: an auto minimum would let the 580px art column
     set the width of the whole grid and push the copy off a phone screen. */
  .ea-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .ea-h { font-size: 32px; }
  .ea-wrap {
    justify-self: center;
    width: 100%;
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }
  .ea-agent {
    position: relative;
    right: auto;
    top: auto;
    width: 340px;
    height: 340px;
    max-width: 100%;
  }
  .ea-stage {
    position: relative;
    left: auto;
    top: auto;
    bottom: auto;
    width: min(360px, 100%);
    margin-top: -90px;
  }
}

@media (max-width: 520px) {
  .ea-form { flex-wrap: wrap; max-width: 100%; }
  .ea-field { flex: 1 1 100%; }
  .ea-btn { width: 100%; }
  .ea-main { padding: 24px 16px 48px; }
  .ea-header { padding: 0 16px; }
  .ea-stage { width: 100%; max-width: 340px; }
}

@media (prefers-reduced-motion: reduce) {
  .ea-breath, .ea-live, .ea-sweep:not([hidden]), .ea-name-in,
  .ea-fade-in, .ea-spin, .ea-float { animation: none; }
  .ea-btn, .ea-agent-art, .ea-sheen { transition: none; }
}
