/* Mobile-first guide — stable phone layout */

:root {
  --ink: #070f18;
  --gold: #f5b942;
  --gold-soft: #f0d6a0;
  --fog: #f4f7fb;
  --muted: rgba(244, 247, 251, 0.78);
  --line: rgba(245, 185, 66, 0.4);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  width: 100%;
  height: 100%;
  background: #02060c;
  color: var(--fog);
  font-family: "Figtree", system-ui, sans-serif;
  overflow: hidden;
  -webkit-text-size-adjust: 100%;
}

.stage-wrap {
  width: 100%;
  height: 100%;
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  background: linear-gradient(180deg, #02060c, #0a1624 50%, #071018);
}

.stage {
  position: relative;
  width: 100%;
  max-width: 430px;
  height: 100%;
  min-height: 100dvh;
  background: var(--ink);
  overflow: hidden;
}

.progress {
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 3px;
  background: rgba(255,255,255,0.08);
  z-index: 40;
}
.progress > i {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--gold);
}

.top-cta {
  position: absolute;
  top: calc(0.55rem + var(--safe-top));
  right: 0.55rem;
  z-index: 35;
}
.top-cta a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0.35rem 0.65rem;
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 800;
  color: #1a1200;
  background: linear-gradient(180deg, #f5b942, #c8922a);
}

.slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: minmax(0, 52%) minmax(0, 48%);
  padding: calc(1.1rem + var(--safe-top)) 1rem calc(4.8rem + var(--safe-bottom));
  opacity: 0;
  pointer-events: none;
  z-index: 2;
}
.slide.active {
  opacity: 1;
  pointer-events: auto;
}
.slide.center {
  grid-template-rows: 1fr;
  place-items: center;
  text-align: center;
}

.visual {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding-top: 0.4rem;
}
.copy {
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding-top: 0.35rem;
}
.slide.center .copy { overflow: visible; }

.step-pill {
  display: inline-flex;
  border: 1px solid var(--line);
  color: var(--gold);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.28rem 0.5rem;
  margin-bottom: 0.4rem;
}

.headline {
  font-family: "Bricolage Grotesque", Georgia, serif;
  font-weight: 800;
  font-size: clamp(1.25rem, 5.8vw, 1.7rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  max-width: 16ch;
}
.slide.center .headline {
  max-width: 18ch;
  margin-inline: auto;
}

.caption {
  margin-top: 0.4rem;
  font-size: clamp(0.88rem, 3.5vw, 1rem);
  color: var(--muted);
  line-height: 1.4;
  max-width: 36ch;
}
.slide.center .caption { margin-inline: auto; }

.bullets {
  margin-top: 0.55rem;
  display: grid;
  gap: 0.3rem;
}
.bullets li {
  list-style: none;
  padding-left: 0.9rem;
  position: relative;
  color: var(--gold-soft);
  font-size: 0.86rem;
  line-height: 1.3;
}
.bullets li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.42em;
  width: 0.35rem;
  height: 0.35rem;
  background: var(--gold);
}

.brand {
  font-family: "Bricolage Grotesque", Georgia, serif;
  font-weight: 800;
  font-size: clamp(2rem, 9vw, 2.7rem);
  letter-spacing: -0.03em;
}
.brand span { color: var(--gold); }
.note { display: none; }

.phone {
  height: min(46dvh, 340px);
  width: auto;
  aspect-ratio: 9 / 16;
  max-width: 72vw;
  border-radius: 1rem;
  border: 2px solid rgba(255,255,255,0.18);
  background: #000;
  overflow: hidden;
}
.phone img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: top center;
  display: block;
}

.frame {
  width: min(88vw, 380px);
  aspect-ratio: 16 / 9;
  border-radius: 0.7rem;
  border: 2px solid rgba(255,255,255,0.16);
  overflow: hidden;
  background: #000;
}
.frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.controls {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  padding: 0.65rem 0.75rem calc(0.8rem + var(--safe-bottom));
  background: linear-gradient(180deg, transparent, rgba(2,6,12,0.96) 40%);
}
.controls button {
  appearance: none;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(10,22,40,0.95);
  color: var(--fog);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  min-height: 46px;
  min-width: 68px;
  padding: 0.55rem 0.8rem;
  touch-action: manipulation;
}
.controls button.primary {
  border-color: var(--line);
  background: linear-gradient(180deg, #f5b942, #c8922a);
  color: #1a1200;
}
.counter {
  font-size: 0.78rem;
  color: var(--muted);
}

.sound-gate {
  position: absolute;
  inset: 0 0 calc(4.6rem + var(--safe-bottom)) 0;
  z-index: 50;
  display: grid;
  place-content: center;
  gap: 0.5rem;
  border: 0;
  background: rgba(2, 6, 12, 0.86);
  color: #fff;
  font: inherit;
  text-align: center;
  padding: 1.25rem;
  cursor: pointer;
  touch-action: manipulation;
}
.sound-gate[hidden] { display: none !important; }
.sound-gate__title {
  font-family: "Bricolage Grotesque", Georgia, serif;
  font-size: clamp(1.3rem, 6vw, 1.8rem);
  font-weight: 800;
  color: var(--gold);
}
.sound-gate__sub {
  color: rgba(255,255,255,0.75);
  font-size: 0.92rem;
  max-width: 28ch;
  margin-inline: auto;
  line-height: 1.4;
}
.sound-gate__hint {
  margin-top: 0.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.7rem 1.2rem;
  background: linear-gradient(180deg, #f5b942, #c8922a);
  color: #1a1200;
  font-weight: 800;
}

.vo-status {
  position: absolute;
  left: 0.75rem;
  right: 0.75rem;
  bottom: calc(3.55rem + var(--safe-bottom));
  z-index: 29;
  margin: 0;
  text-align: center;
  font-size: 0.78rem;
  color: rgba(244, 247, 251, 0.7);
  pointer-events: none;
}

audio[data-vo] {
  position: absolute;
  left: 0.6rem;
  right: 0.6rem;
  bottom: calc(3.7rem + var(--safe-bottom));
  z-index: 80;
  width: calc(100% - 1.2rem);
  height: 40px;
}

@media (min-width: 900px) {
  .stage {
    max-width: min(1000px, 100%);
    min-height: auto;
    height: min(100dvh - 1.5rem, 620px);
    margin: 0.75rem;
    border-radius: 0.5rem;
    box-shadow: 0 24px 70px rgba(0,0,0,0.45);
  }
  .stage-wrap {
    align-items: center;
    min-height: 100dvh;
  }
  .slide {
    grid-template-columns: 1.05fr 0.95fr;
    grid-template-rows: 1fr;
    align-items: center;
    gap: 1rem;
    padding: 1.4rem 1.5rem 3.4rem;
  }
  .slide.center {
    grid-template-columns: 1fr;
  }
  .visual { order: 2; }
  .copy { order: 1; overflow: visible; }
  .phone {
    height: auto;
    width: min(100%, 250px);
  }
}
