:root {
  --background: #0f0b08;
  --surface: #1d1712;
  --text: #f7efe4;
  --muted: #a59687;
  --accent: #d80032;
  --accent-secondary: #c9975f;
  --line: rgba(255, 255, 255, 0.11);
  --ease: cubic-bezier(.16, 1, .3, 1);
}

* { box-sizing: border-box; }

html, body {
  min-height: 100%;
  margin: 0;
  background: var(--background);
}

body {
  color: var(--text);
  font-family: "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.gateway {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: clamp(1rem, 2.5vh, 1.5rem);
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  max-width: 34rem;
  margin: 0 auto;
  padding: max(1.4rem, env(safe-area-inset-top)) 1rem max(1rem, env(safe-area-inset-bottom));
  overflow: hidden;
}

.gateway::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 50% 35%, rgba(216, 0, 50, 0.13), transparent 28rem),
    linear-gradient(180deg, #1a120c 0%, var(--background) 72%);
}

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.5rem;
  width: 100%;
  text-align: center;
  animation: enter .7s both var(--ease);
}

.brand h1 {
  margin: 0;
  font-size: clamp(2.4rem, 11vw, 3.4rem);
  font-weight: 720;
  line-height: 1;
  letter-spacing: -.055em;
}

.experience {
  display: grid;
  align-content: start;
  gap: clamp(.85rem, 2vh, 1.2rem);
  min-height: 0;
}

.teaser-frame {
  position: relative;
  width: min(100%, 25rem);
  aspect-ratio: 4 / 5;
  max-height: 53vh;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: clamp(1.1rem, 4vw, 1.6rem);
  background: var(--surface);
  box-shadow: 0 2rem 5rem rgba(0, 0, 0, .34);
  animation: enter .85s .1s both var(--ease);
}

.teaser-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.035);
  transition: opacity .75s ease, transform 2.4s ease-out;
}

.teaser-image.is-active {
  opacity: 1;
  transform: scale(1);
}

.loading-panel {
  width: min(100%, 25rem);
  margin: 0 auto;
  animation: enter .8s .22s both var(--ease);
}

.status-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .65rem;
}

.status {
  margin: 0;
  color: var(--text);
  font-size: .86rem;
  font-weight: 550;
  letter-spacing: -.01em;
}

.percentage {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .7rem;
  font-variant-numeric: tabular-nums;
}

.progress-track {
  position: relative;
  height: .34rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, .09);
}

.progress-fill {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-secondary), var(--accent));
  box-shadow: 0 0 1rem rgba(216, 0, 50, .34);
  transform: scaleX(0);
  transform-origin: left;
  will-change: transform;
}

.progress-shimmer {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent);
  transform: translateX(-100%);
  animation: shimmer 1.35s ease-in-out infinite;
}

.pulse-dots {
  display: flex;
  justify-content: center;
  gap: .32rem;
  margin-top: .8rem;
}

.pulse-dots i {
  width: .28rem;
  height: .28rem;
  border-radius: 50%;
  background: var(--muted);
  animation: pulse 1.1s ease-in-out infinite;
}

.pulse-dots i:nth-child(2) { animation-delay: .14s; }
.pulse-dots i:nth-child(3) { animation-delay: .28s; }

.cta {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 6rem;
  padding: .7rem .75rem .7rem 1.7rem;
  overflow: hidden;
  border: 1px solid rgba(255, 246, 238, .22);
  border-radius: 1.55rem;
  background: #291a11;
  box-shadow: 0 1.15rem 2.8rem rgba(25, 12, 3, .42), inset 0 1px 0 rgba(255,255,255,.24);
  color: var(--text);
  text-decoration: none;
  transition: transform .25s var(--ease), box-shadow .25s ease, background-color .25s ease;
  animation: enter .8s .35s both var(--ease);
  -webkit-tap-highlight-color: transparent;
  width: min(100%, 27rem);
  margin: 0 auto;
}

.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, var(--accent-secondary), var(--accent));
  clip-path: circle(0 at calc(100% - 3.05rem) 50%);
  animation: unlock-fill 3.2s .8s var(--ease) infinite;
}

.cta-label { position: relative; z-index: 1; display: grid; gap: .28rem; animation: label-invert 3.2s .8s var(--ease) infinite; }
.cta-label small { font-size: .63rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; opacity: .62; }
.cta-label strong { font-size: 1.18rem; font-weight: 740; letter-spacing: -.025em; }

.cta-action {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 4.6rem;
  height: 4.6rem;
  flex: 0 0 auto;
  border-radius: 1.25rem;
  background: var(--accent-secondary);
  animation: action-turn 3.2s .8s var(--ease) infinite;
  transition: transform .35s var(--ease), background-color .35s ease;
}

.cta-action svg {
  width: 1.6rem;
  height: 1.6rem;
  fill: none;
  stroke: var(--text);
  stroke-width: 1.6;
  transition: transform .35s var(--ease), stroke .35s ease;
}

.cta:hover { transform: translateY(-3px); box-shadow: 0 1.5rem 3.4rem rgba(25,12,3,.55), inset 0 1px 0 rgba(255,255,255,.3); }
.cta:hover::before { clip-path: circle(150% at calc(100% - 3.05rem) 50%); animation: none; }
.cta:hover .cta-label { color: #181008; animation: none; }
.cta:hover .cta-action { transform: rotate(90deg); background: #24170e; animation: none; }
.cta:hover .cta-action svg { stroke: var(--text); }
.cta:hover svg { transform: translateX(.22rem); animation: none; }
.cta:active { transform: scale(.985); }
.cta:focus-visible { outline: 2px solid var(--text); outline-offset: 4px; }

.noscript-link { position: fixed; inset: auto 1rem 1rem; color: white; text-align: center; }

@keyframes enter { from { opacity: 0; transform: translateY(1rem); } to { opacity: 1; transform: none; } }
@keyframes shimmer { to { transform: translateX(100%); } }
@keyframes pulse { 0%, 100% { opacity: .28; transform: scale(.75); } 50% { opacity: 1; transform: scale(1); } }
@keyframes unlock-fill { 0%, 35%, 100% { clip-path: circle(0 at calc(100% - 3.05rem) 50%); } 57%, 76% { clip-path: circle(150% at calc(100% - 3.05rem) 50%); } }
@keyframes label-invert { 0%, 42%, 90%, 100% { color: var(--text); transform: translateX(0); } 57%, 76% { color: #181008; transform: translateX(.25rem); } }
@keyframes action-turn { 0%, 35%, 100% { transform: rotate(0deg); background: var(--accent-secondary); } 57%, 76% { transform: rotate(90deg); background: #24170e; } }

@media (max-height: 43rem) {
  .gateway { gap: .65rem; padding-top: max(.75rem, env(safe-area-inset-top)); }
  .brand { min-height: 2rem; }
  .brand h1 { font-size: 2rem; }
  .teaser-frame { max-height: 46vh; width: min(76vw, 18rem); }
  .experience { gap: .7rem; }
  .pulse-dots { display: none; }
  .cta { min-height: 5.15rem; padding: .55rem .6rem .55rem 1.4rem; }
  .cta-action { width: 3.95rem; height: 3.95rem; }
}

@media (min-width: 48rem) {
  .gateway { max-width: 42rem; padding-inline: 2rem; }
  .teaser-frame, .loading-panel { width: min(100%, 27rem); }
  .teaser-frame { max-height: 56vh; }
  .cta { width: min(100%, 27rem); margin-inline: auto; }
}

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