/* ---- Self-hosted Sora (variable font, weights 400–800) ---- */
@font-face {
  font-family: "Sora";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(assets/fonts/sora-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Sora";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(assets/fonts/sora-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---- Theme (placeholder palette — swap --accent to match real logo) ---- */
:root {
  --bg: #0c0d10;
  --surface: #15171c;
  --text: #f5f6f8;
  --muted: #9aa0aa;
  --accent: #ffc107;       /* "five star" gold */
  --accent-soft: rgba(255, 193, 7, 0.18);

  /* Phone is sized off viewport height so it stays big but never overflows */
  --phone-w: min(86vw, clamp(210px, 31vh, 320px));
  --drop-dur: 1.1s;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  /* Tall enough to give scroll room to drive the heal */
  min-height: 250vh;
  font-family: "Sora", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(255,193,7,0.10), transparent 60%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
}

/* ---------------- Sticky phone stage ---------------- */
.stage {
  position: sticky;
  top: 0;
  /* Stage is shorter than the viewport so the countdown peeks beneath it on load */
  height: 72vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: clamp(14px, 4vh, 44px);
  overflow: hidden;
  z-index: 1;
}

/* ---------------- Phone mockup ---------------- */
.phone {
  width: var(--phone-w);
  aspect-ratio: 300 / 620;
  position: relative;
  will-change: transform;
}

/* Initial drop-in on load (added via JS class) */
.phone.is-dropping {
  animation: drop var(--drop-dur) cubic-bezier(0.32, 0.72, 0.2, 1.4) both;
}
.phone.is-impact { animation: shake 0.5s ease-out both; }

@keyframes drop {
  0%   { transform: translateY(-120vh) rotate(-8deg); }
  70%  { transform: translateY(0) rotate(2deg); }
  85%  { transform: translateY(-3%) rotate(-1deg); }
  100% { transform: translateY(0) rotate(0deg); }
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px) rotate(-1deg); }
  40% { transform: translateX(6px) rotate(1deg); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

.phone__body {
  position: absolute;
  inset: 0;
  border-radius: 14% / 7%;
  background: linear-gradient(160deg, #2a2d34, #111318);
  padding: 3.2%;
  box-shadow:
    0 2px 4px rgba(0,0,0,0.6) inset,
    0 30px 60px rgba(0,0,0,0.55),
    0 0 0 2px rgba(255,255,255,0.04);
}

.phone__notch {
  position: absolute;
  top: 3.6%;
  left: 50%;
  transform: translateX(-50%);
  width: 34%;
  height: 2.6%;
  background: #050608;
  border-radius: 0 0 12px 12px;
  z-index: 3;
}

.phone__screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 11% / 6%;
  overflow: hidden;
  background: radial-gradient(120% 80% at 50% 40%, #1b2b4a 0%, #0a1120 70%, #05080f 100%);
}

/* Screen glow strengthens as the screen heals (driven by --heal: 0..1) */
.screen__glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(80% 60% at 50% 45%, var(--accent-soft), transparent 70%);
  opacity: calc(var(--heal, 0) * 0.9);
  transition: opacity 0.2s linear;
}

/* ---------------- Cracks ---------------- */
.cracks {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  /* Whole crack layer fades out as it heals */
  opacity: calc(1 - var(--heal, 0));
  filter: drop-shadow(0 0 1px rgba(255,255,255,0.5));
}
.cracks path {
  /* dash values are set per-path in JS so they can retract on scroll */
  transition: stroke-dashoffset 0.1s linear;
}

/* ---------------- Scroll prompt ---------------- */
.scroll-cue {
  margin-top: 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--accent);
  transition: opacity 0.45s ease;
}
.scroll-cue__text {
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: clamp(0.85rem, 3.6vw, 1.05rem);
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.8);
}
.scroll-cue__arrow {
  font-size: 1.7rem;
  line-height: 0.5;
  animation: cueBob 1.5s ease-in-out infinite;
}
.scroll-cue.is-hidden { opacity: 0; }
@keyframes cueBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(7px); }
}

/* ---------------- Scrolling content ---------------- */
.content {
  position: relative;
  z-index: 2;
  /* stage already reserves 72vh; small nudge keeps the countdown peeking on load */
  padding-top: 2vh;
}

.hero {
  text-align: center;
  padding: 0 24px 8vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.brand { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-top: 44px; }
.brand__logo { max-width: 130px; max-height: 130px; height: auto; object-fit: contain; }
.brand__fallback {
  width: 96px; height: 96px;
  display: grid; place-items: center;
  border-radius: 22px;
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 0 40px var(--accent-soft);
}
.brand__name {
  margin: 0;
  font-size: clamp(1.6rem, 6vw, 2.6rem);
  font-weight: 800;
  letter-spacing: 0.02em;
}

.tagline { margin: 16px 0 0; color: var(--muted); font-size: clamp(1rem, 3.6vw, 1.25rem); }
.coming {
  margin: 0;
  font-weight: 700;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  font-size: clamp(0.8rem, 3vw, 1rem);
  color: var(--accent);
}

/* ---------------- Countdown ---------------- */
.countdown {
  display: flex;
  gap: clamp(10px, 3vw, 22px);
  margin-top: 18px;
}
.unit {
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  padding: 14px clamp(10px, 3.5vw, 20px);
  min-width: clamp(58px, 17vw, 84px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.unit__num {
  font-size: clamp(1.5rem, 7vw, 2.4rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.unit__label {
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.countdown__done {
  margin-top: 28px;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent);
}

/* ---------------- Info ---------------- */
.info {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  justify-content: center;
  padding: 6vh 24px;
  max-width: 760px;
  margin: 0 auto;
}
.info__card {
  flex: 1 1 240px;
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 18px;
  padding: 26px;
  text-align: center;
}
.info__card h2 {
  margin: 0 0 10px;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
}
.info__card p { margin: 0; color: var(--muted); }
.phone-link {
  display: inline-block;
  font-size: clamp(1.4rem, 6vw, 1.9rem);
  font-weight: 800;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: 0.02em;
}
.phone-link:hover { text-decoration: underline; }
.muted { color: var(--muted); }

.footer {
  text-align: center;
  padding: 5vh 24px 6vh;
  color: var(--muted);
  font-size: 0.85rem;
}

/* ---------------- Reduced motion ---------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .phone.is-dropping, .phone.is-impact { animation: none; }
  .scroll-cue__arrow { animation: none; }
}
