/* ==========================================================
   Brand My Phone — theme tokens
   ========================================================== */
:root {
  --ink: #1d1d1f;
  --ink-2: #6e6e73;
  --ink-3: #86868b;
  --surface: #f5f5f7;
  --hairline: #d2d2d7;
  --white: #ffffff;

  /* Cosmic Orange accent */
  --accent: #f0621f;
  --accent-hover: #d9531a;
  --accent-soft: #fff1ea;
  --accent-border: #f8b48f;

  --font: -apple-system, system-ui, "SF Pro Display", "SF Pro Text", Inter, "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --radius: 16px;
  --nav-h: 50px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--white);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, p { margin: 0; }
button { font: inherit; cursor: pointer; }
img { max-width: 100%; display: block; }

.container { margin: 0 auto; padding: 0 24px; }
.container--5xl { max-width: 1024px; }
.container--4xl { max-width: 896px; }
.container--3xl { max-width: 768px; }

.sep { color: var(--ink-3); margin: 0 6px; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 8px; vertical-align: middle; position: relative; top: -1px; }
.dot--live { background: var(--accent); box-shadow: 0 0 0 3px rgba(240, 98, 31, .18); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 18px; height: 36px; border-radius: 6px;
  font-size: 14px; font-weight: 500; border: 1px solid transparent;
  transition: background .15s ease, transform .1s ease, opacity .15s;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(.98); }
.btn--ink { background: var(--accent); color: #fff; }
.btn--ink:hover { background: var(--accent-hover); }
.btn--accent { background: var(--accent); color: #fff; height: 44px; padding: 0 24px; font-size: 15px; }
.btn--accent:hover { background: var(--accent-hover); }
.btn--outline { background: #fff; color: var(--accent); border-color: var(--accent); height: 36px; }
.btn--outline:hover { background: var(--accent-soft); }
.btn--ghost { background: transparent; color: var(--ink-2); }
.btn--ghost:hover { background: var(--surface); }
.btn--sm { height: 34px; padding: 0 16px; font-size: 13px; }
.link { color: var(--accent); font-size: 15px; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255,255,255,.7);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(210,210,215,.7);
}
.nav__inner {
  max-width: 1120px; margin: 0 auto; padding: 0 24px; height: var(--nav-h);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
}
.nav__brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 600; font-size: 15px; }
.nav__brand:hover { text-decoration: none; }
.nav__phone { width: 16px; height: 30px; }
.nav__links { display: flex; gap: 24px; }
.nav__links a { color: var(--ink-2); font-size: 13px; }
.nav__links a:hover { color: var(--ink); text-decoration: none; }
.nav__right { display: flex; justify-content: flex-end; }

/* ---------- hero ---------- */
.hero { max-width: 1024px; margin: 0 auto; padding: 64px 24px 64px; text-align: center; }
.hero__stat { font-size: 13px; color: var(--ink-2); margin-bottom: 20px; }
.hero__stat strong { color: var(--ink); font-weight: 600; }
.hero__title {
  font-size: clamp(40px, 7vw, 64px); font-weight: 500; letter-spacing: -0.06em; line-height: 1.05;
  color: var(--ink);
}
.hero__sub { margin-top: 18px; font-size: 17px; color: var(--ink-2); }

.progress { max-width: 376px; margin: 40px auto 0; }
.progress__labels { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; color: var(--ink-2); }
.progress__raised strong { font-size: 26px; font-weight: 600; color: var(--accent); letter-spacing: -0.02em; margin-right: 4px; }
.progress__bar { height: 8px; background: #e5e5ea; border-radius: 999px; margin-top: 8px; overflow: hidden; }
.progress__fill { height: 100%; background: var(--accent); border-radius: 999px; transition: width .6s ease; }

/* ---------- phone stage ---------- */
/* Two photographs of the actual phone. Each sits on a fixed-size "canvas"
   (the photo's own pixel grid) that is scaled to the container by --s, set in
   app.js. Spots are positioned in canvas pixels, so they stay glued to the
   phone at any width. On the in-hand shot the back is a tilted plane, so the
   spots live inside a .plane whose matrix3d is the homography of that face. */
.stage { max-width: 340px; margin: 44px auto 0; }
.shot { position: relative; width: 100%; margin: 0 auto; }
.shot[hidden] { display: none; }
.shot__canvas {
  position: absolute; top: 0; left: 0;
  width: calc(var(--cw) * 1px); height: calc(var(--ch) * 1px);
  transform-origin: 0 0; transform: scale(var(--s, 1));
}
.shot__img {
  width: 100%; height: 100%; display: block; border-radius: 18px;
  box-shadow: 0 22px 44px -20px rgba(90,40,10,.45), 0 3px 10px rgba(0,0,0,.10);
}
/* the straight-on shot is cut out, so the shadow follows the phone, not a box */
.shot__img--cutout {
  border-radius: 0; box-shadow: none;
  filter: drop-shadow(0 18px 26px rgba(90,40,10,.28)) drop-shadow(0 2px 4px rgba(0,0,0,.14));
}
#shot-final .shot__img { border-radius: 20px; }

/* --- interactive spots (straight-on shot) --- */
.slot {
  position: absolute; padding: 0; border-radius: 8px;
  border: 1.5px dashed rgba(255,255,255,.85);
  background: rgba(255,255,255,.14);
  color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  text-shadow: 0 1px 2px rgba(120,50,10,.5);
  transition: background .15s, border-color .15s;
  cursor: pointer;
}
.slot:hover { background: rgba(255,255,255,.26); border-color: #fff; }
.slot:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.slot__label { font-size: 26px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.slot__price { font-size: 26px; opacity: .95; }
.slot[data-spot="4"] .slot__label,
.slot[data-spot="4"] .slot__price { font-size: 19px; }

/* --- a placed sticker (used in both views) --- */
.sticker {
  width: 100%; height: 100%; border-radius: 7px; overflow: hidden;
  container-type: size;
  background: #fff; display: flex; align-items: center; justify-content: center;
  color: var(--ink); font-weight: 700; text-align: center; line-height: 1.15;
  box-shadow: 0 1px 3px rgba(80,30,0,.45);
  position: relative;
}
.sticker img { width: 100%; height: 100%; object-fit: contain; padding: 7%; }
.sticker span { padding: 4%; font-size: 26cqh; }
/* mimic the light falling across the phone so stickers sit in the photo */
.sticker::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(118deg, rgba(255,255,255,.30) 0%, rgba(255,255,255,0) 38%, rgba(90,40,10,.10) 100%);
}
.slot.is-taken { border-style: none; background: none; padding: 0; }

/* "Final look": same phone, placeholders hidden, only placed stickers left */
.shot.is-final .slot { border-color: transparent; background: none; pointer-events: none; }
.shot.is-final .slot:not(.is-taken) { opacity: 0; }

.stage__controls { margin-top: 28px; }
.pill-toggle { display: inline-flex; background: #ececef; border-radius: 999px; padding: 3px; }
.pill-toggle__btn { border: 0; background: transparent; padding: 6px 14px; border-radius: 999px; font-size: 13px; color: var(--ink-2); }
.pill-toggle__btn.is-active { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.stage__hint { margin-top: 10px; font-size: 12px; color: var(--ink-3); }

.hero__statement { margin-top: 56px; font-size: 20px; color: var(--ink); }
.hero__statement--muted { margin-top: 16px; color: var(--ink-2); }
.hero__perks {
  list-style: none; margin: 32px auto 0; padding: 0; max-width: 620px;
  display: flex; flex-direction: column; gap: 12px; text-align: left;
}
.hero__perks li {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--surface); border-radius: 12px; padding: 14px 18px;
  font-size: 15px; line-height: 1.5; color: var(--ink);
}
.hero__perk-icon { font-size: 20px; line-height: 1.2; flex-shrink: 0; }
.hero__cta { margin-top: 32px; display: flex; gap: 16px; justify-content: center; align-items: center; }

/* ---------- dark section ---------- */
.ink { background: var(--ink); color: #fff; padding: 144px 24px; text-align: center; }
.ink__title { font-size: clamp(32px, 5.2vw, 60px); font-weight: 500; letter-spacing: -0.045em; line-height: 1.1; }
.ink__title span { color: #8e8e93; }
.ink__chevron { width: 28px; height: 28px; color: #8e8e93; margin-top: 64px; }

/* ---------- generic sections ---------- */
.section { padding: 96px 0; scroll-margin-top: 80px; }
.section--surface { background: var(--surface); }
.section + .section--surface, .section--surface + .section--surface { padding-top: 96px; }
.eyebrow { font-size: 13px; color: var(--ink-2); }
.section__title { margin-top: 18px; font-size: 40px; font-weight: 600; letter-spacing: -0.04em; line-height: 1.1; }
.section__title--center { text-align: center; margin-top: 0; }
.section__lead { margin-top: 14px; font-size: 17px; color: var(--ink-2); }
.section__note { margin-top: 10px; font-size: 13px; color: var(--ink-2); max-width: 480px; }
.fineprint { margin-top: 24px; font-size: 12px; color: var(--ink-3); line-height: 1.6; max-width: 560px; }

/* ---------- spots table ---------- */
.table-card { margin-top: 32px; background: #fff; border-radius: var(--radius); box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 24px -12px rgba(0,0,0,.08); overflow: hidden; }
.table__head, .row {
  display: grid; grid-template-columns: 2.4fr 1.3fr 1.3fr 1fr 110px; align-items: center; gap: 12px;
  padding: 0 24px;
}
.table__head { height: 44px; font-size: 12px; color: var(--ink-2); border-bottom: 1px solid #ececef; }
.row { min-height: 64px; border-bottom: 1px solid #ececef; }
.row:last-child { border-bottom: 0; }
.row__name { display: flex; align-items: center; gap: 12px; font-size: 15px; }
.row__num { width: 26px; height: 26px; border-radius: 8px; background: #ececef; color: var(--ink-2); font-size: 12px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.row__size { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); }
.badge { display: inline-flex; width: 20px; height: 20px; border-radius: 6px; background: #ececef; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; color: var(--ink-2); }
.row__holder { font-size: 13px; color: var(--ink-2); display: flex; align-items: center; gap: 8px; }
.row__holder img { height: 28px; width: auto; max-width: 96px; object-fit: contain; }
.row__holder a { color: var(--ink); font-weight: 500; }
.row__price { font-size: 15px; font-weight: 600; text-align: right; }
.row__price.is-taken { color: var(--ink-2); font-weight: 400; }
.row__action { display: flex; justify-content: flex-end; }
.row__taken { font-size: 12px; color: var(--ink-3); }

/* ---------- steps ---------- */
.steps { list-style: none; margin: 40px 0 0; padding: 0; display: flex; flex-direction: column; gap: 40px; }
.step { display: flex; gap: 24px; align-items: flex-start; }
.step__num { flex-shrink: 0; width: 38px; height: 38px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }
.step__title { font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
.step__text { margin-top: 8px; font-size: 16px; color: var(--ink-2); max-width: 580px; }

/* ---------- specs ---------- */
.specs-card { margin-top: 32px; background: #fff; border-radius: var(--radius); box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 24px -12px rgba(0,0,0,.08); overflow: hidden; }
.specs-card__head { display: flex; justify-content: space-between; align-items: center; padding: 22px 24px; border-bottom: 1px solid #ececef; }
.specs-card__name { font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
.specs-card__price { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.specs { margin: 0; }
.specs__row { display: grid; grid-template-columns: 130px 1fr; padding: 15px 24px; border-bottom: 1px solid #ececef; font-size: 14px; }
.specs__row:last-child { border-bottom: 0; }
.specs__row dt { color: var(--ink-2); }
.specs__row dd { margin: 0; color: var(--ink); }

/* ---------- FAQ ---------- */
.faq { margin-top: 40px; }
.faq__item { border-bottom: 1px solid #dcdce0; }
.faq__item summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center;
  padding: 22px 0; font-size: 16px; font-weight: 500;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after { content: "+"; font-size: 20px; font-weight: 300; color: var(--ink-2); transition: transform .2s; }
.faq__item[open] summary::after { transform: rotate(45deg); }
.faq__item p { padding: 0 0 22px; font-size: 15px; color: var(--ink-2); max-width: 640px; }

/* ---------- waitlist ---------- */
.waitlist-card { border: 1px solid var(--hairline); border-radius: 24px; padding: 40px; }
.waitlist-card__title { font-size: 28px; font-weight: 600; letter-spacing: -0.03em; }
.waitlist-card__text { margin-top: 14px; font-size: 16px; color: var(--ink-2); }
.waitlist-form { margin-top: 24px; }
.waitlist-form__fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.waitlist-form input { height: 44px; border: 1px solid var(--hairline); border-radius: 12px; padding: 0 16px; font: inherit; font-size: 14px; color: var(--ink); outline: none; }
.waitlist-form input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(240,98,31,.18); }
.waitlist-form .btn { height: 44px; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--hairline); padding: 56px 0 64px; }
.bio { display: flex; gap: 24px; align-items: flex-start; }
.bio__avatar { flex-shrink: 0; width: 68px; height: 68px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--accent); }
.bio__name { font-size: 15px; font-weight: 600; }
.bio__text { margin-top: 8px; font-size: 14px; color: var(--ink-2); max-width: 520px; line-height: 1.6; }
.footer__rule { border: 0; border-top: 1px solid var(--hairline); margin: 40px 0 24px; }
.footer__links { display: flex; gap: 16px; font-size: 12px; }
.footer__links a { color: var(--ink-2); }
.footer__legal { margin-top: 24px; font-size: 12px; color: var(--ink-2); }

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 24px; }
.modal[hidden] { display: none; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.4); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.modal__card { position: relative; background: #fff; border-radius: 28px; padding: 40px; width: 100%; max-width: 480px; box-shadow: 0 30px 60px -20px rgba(0,0,0,.4); }
.modal__close { position: absolute; top: 40px; right: 36px; width: 32px; height: 32px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); display: flex; align-items: center; justify-content: center; }
.modal__close:hover { background: var(--surface); }
.modal__title { font-size: 26px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.2; padding-right: 40px; }
.modal__meta { margin-top: 10px; font-size: 16px; color: var(--ink-2); }
.modal__status { margin-top: 6px; font-size: 17px; color: var(--ink); }
.modal__text { margin-top: 28px; font-size: 16px; line-height: 1.55; color: var(--ink-2); }
.modal__form input {
  display: block; width: 100%; margin-top: 24px; height: 56px; padding: 0 22px;
  border: 1.5px solid var(--hairline); border-radius: 8px; font: inherit; font-size: 17px; color: var(--ink); outline: none;
}
.modal__form input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(240,98,31,.18); }
.modal__offer { margin-top: 24px; }
.modal__offer label { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 8px; }
.modal__offer input { margin-top: 0 !important; }
.btn--block { display: flex; width: 100%; height: 56px; margin-top: 14px; font-size: 17px; font-weight: 600; }
.btn[disabled] { opacity: .6; cursor: default; }
.modal__msg { margin-top: 14px; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.modal__msg.is-success { color: #1a7f37; }
.modal__msg.is-error { color: #c0392b; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .nav__inner { grid-template-columns: 1fr auto; }
  .nav__links { display: none; }
}
@media (max-width: 720px) {
  .hero { padding-top: 40px; }
  .stage { padding: 28px 16px; border-radius: 20px; }
  .section { padding: 64px 0; }
  .section__title { font-size: 32px; }
  .ink { padding: 96px 24px; }
  .hero__statement { font-size: 18px; }
  .hero__cta { flex-direction: column; }

  .table__head { display: none; }
  .row { grid-template-columns: 1fr auto; grid-template-areas: "name price" "size holder" "action action"; padding: 18px 16px; row-gap: 10px; }
  .row__name { grid-area: name; }
  .row__price { grid-area: price; }
  .row__size { grid-area: size; }
  .row__holder { grid-area: holder; justify-content: flex-end; }
  .row__action { grid-area: action; justify-content: stretch; }
  .row__action .btn { width: 100%; }

  .specs__row { grid-template-columns: 1fr; gap: 4px; }
  .waitlist-card { padding: 28px 20px; }
  .modal { padding: 12px; align-items: flex-end; }
  .modal__card { padding: 28px 22px; border-radius: 22px; }
  .modal__close { top: 28px; right: 20px; }
  .modal__title { font-size: 22px; }
  .waitlist-form__fields { grid-template-columns: 1fr; }
  .bio { flex-direction: column; }
  .slot__label { font-size: 9px; }
  .slot__price { font-size: 10px; }
}
