/* ============================================================
   Prompt — prompt.spencer.st
   Single landing page. Tokens live in colors_and_type.css.
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg-dark);
  color: var(--fg-on-dark);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

em { font-style: normal; }

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--s-4);
}

:focus-visible {
  outline: 2px solid var(--cta-fill);
  outline-offset: 3px;
  border-radius: var(--r-xs);
}

/* ── Hero ──────────────────────────────────────────────────── */

.hero {
  position: relative;
  isolation: isolate;
  min-height: 100svh;
  display: flex;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 60% 50%;
}

/* Warms the photo toward the brand and buys contrast for the copy. */
.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg,
      rgba(29,10,29,0.72) 0%,
      rgba(29,10,29,0.38) 34%,
      rgba(29,10,29,0.78) 78%,
      rgba(29,10,29,0.94) 100%),
    linear-gradient(120deg,
      rgba(228,109,49,0.26) 0%,
      rgba(228,109,49,0) 58%);
}

.hero-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--s-10);
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: var(--s-8) var(--s-4) var(--s-6);
}

/* Brand */
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  align-self: flex-start;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--t-h3);
  letter-spacing: var(--ls-tight);
  color: var(--fg-on-dark);
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
}

/* Copy block — takes the slack so the footer sits at the bottom. */
.hero-copy {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  max-width: 13ch;
  font-size: clamp(46px, 8.4vw, 96px);
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: var(--fg-on-dark);
  text-wrap: balance;
}

.hero h1 em {
  font-style: italic;
  color: var(--golden-hour);
}

.hero-sub {
  max-width: 46ch;
  margin: var(--s-6) 0 0;
  max-width: 40ch;
  font-size: clamp(16px, 2.1vw, 20px);
  line-height: var(--lh-body);
  letter-spacing: var(--ls-snug);
  color: var(--fg-on-dark-2);
}

/* CTA */
.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-4);
  margin-top: var(--s-8);
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  padding: 16px var(--s-6);
  border-radius: var(--r-pill);
  background: var(--cta-fill);
  color: var(--p-ink);
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: 16px;
  letter-spacing: var(--ls-snug);
  box-shadow: var(--shadow-pop);
  transition: transform 160ms ease, background-color 160ms ease;
}

.cta i { font-size: 20px; }

.cta:hover {
  background: var(--p-lemon-soft);
  transform: translateY(-1px);
}

.cta:active { transform: translateY(0); }

.cta-meta {
  font-family: var(--font-mono);
  font-size: var(--t-meta);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.62);
}

/* Footer inside the hero, so the first screen is the whole story. */
.hero-foot {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-6);
  padding-top: var(--s-5);
  border-top: 1px solid rgba(255,255,255,0.16);
  font-size: var(--t-body-sm);
  letter-spacing: var(--ls-snug);
  color: rgba(255,255,255,0.58);
}

.hero-foot a { transition: color 140ms ease; }
.hero-foot a:hover { color: var(--golden-hour); }

/* ── Screens ───────────────────────────────────────────────── */

.screens {
  padding: clamp(72px, 12vw, 140px) 0 clamp(80px, 13vw, 160px);
  background: var(--bg-dark);
}

.screens-h {
  margin: 0 0 clamp(40px, 6vw, 72px);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(30px, 5vw, 52px);
  line-height: 1.04;
  letter-spacing: -0.035em;
  color: var(--fg-on-dark);
  text-wrap: balance;
}

.screens-h em {
  font-style: italic;
  color: var(--golden-hour);
}

.screens-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 3vw, 40px);
}

.phone {
  position: relative;
  margin: 0;
  aspect-ratio: 1206 / 2622;
  border-radius: clamp(20px, 3vw, 34px);
  overflow: hidden;
  background: rgba(255,255,255,0.04);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.12),
    0 24px 48px rgba(0,0,0,0.45);
}

.phone img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Until real screenshots land, show a calm placeholder rather than a broken icon. */
.phone.is-empty img { display: none; }

.phone.is-empty::after {
  content: "Screenshot";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: var(--t-meta);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.28);
  background: var(--grad-haze);
  background-blend-mode: overlay;
  opacity: 0.5;
}

/* ── Responsive ────────────────────────────────────────────── */

@media (max-width: 760px) {
  .hero-inner {
    gap: var(--s-8);
    padding: var(--s-6) var(--s-4) var(--s-5);
  }

  .hero-copy { max-width: none; }

  .cta { width: 100%; justify-content: center; }
  .cta-row { gap: var(--s-3); }
  .cta-meta { width: 100%; text-align: center; }

  .hero-foot { gap: var(--s-4); }

  /* Three phones side by side stop reading below ~760px. */
  .screens-row {
    grid-template-columns: repeat(3, 68vw);
    gap: var(--s-4);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    /* Let the row bleed to the viewport edges inside the padded wrap. */
    margin: 0 calc(-1 * var(--s-4));
    padding: 0 var(--s-4) var(--s-4);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .screens-row::-webkit-scrollbar { display: none; }

  .phone { scroll-snap-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0.01ms !important; }
}
