/* Dream Slate — Ink & Ember */

:root {
  --paper: #f7f3ec;
  --paper-deep: #efe8db;
  --ink: #211d18;
  --ink-soft: #5c554b;
  --ember: #e85d2f;
  --ember-deep: #c94a20;
  --hairline: rgba(33, 29, 24, 0.14);
  --display: "Instrument Sans", -apple-system, system-ui, sans-serif;
  --body: "Instrument Sans", -apple-system, system-ui, sans-serif;
  /* The app's spring-ish ease — fast start, soft settle. */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

::selection { background: rgba(232, 93, 47, 0.25); }

/* ---------- Type ---------- */

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.7rem, 7vw, 4.6rem); }
h2 { font-size: clamp(2.2rem, 5.5vw, 3.6rem); }
h3 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); }

.accent { color: var(--ember); }

.lede {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--ink-soft);
  max-width: 34em;
  margin-top: 1.4rem;
}

.lede.center { margin-inline: auto; text-align: center; }

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 1.1rem clamp(1.25rem, 5vw, 4rem);
}

/* Progressive blur: stacked backdrop-filter layers, each masked to a
   lower band with a soft falloff — strong blur at the top edge fading
   to none, no hard line anywhere. */
.nav-blur {
  position: absolute;
  inset: 0 0 -28px 0;
  pointer-events: none;
  z-index: -1;
}

.nav-blur i {
  position: absolute;
  inset: 0;
}

.nav-blur i:nth-child(1) {
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  mask-image: linear-gradient(to bottom, black 45%, transparent 90%);
  -webkit-mask-image: linear-gradient(to bottom, black 45%, transparent 90%);
}

.nav-blur i:nth-child(2) {
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  mask-image: linear-gradient(to bottom, black 30%, transparent 70%);
  -webkit-mask-image: linear-gradient(to bottom, black 30%, transparent 70%);
}

.nav-blur i:nth-child(3) {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  mask-image: linear-gradient(to bottom, black 15%, transparent 50%);
  -webkit-mask-image: linear-gradient(to bottom, black 15%, transparent 50%);
}

.nav-blur i:nth-child(4) {
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  mask-image: linear-gradient(to bottom, black 0%, transparent 32%);
  -webkit-mask-image: linear-gradient(to bottom, black 0%, transparent 32%);
  background: linear-gradient(to bottom, color-mix(in srgb, var(--paper) 60%, transparent), transparent 60%);
}

.wordmark {
  font-family: var(--display);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}

.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 0.25s var(--ease);
}

.nav-link:hover { color: var(--ember); }

/* ---------- Buttons ---------- */

.button {
  display: inline-block;
  margin-top: 2.2rem;
  padding: 0.95rem 2rem;
  background: var(--ember);
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border-radius: 100px;
  transition: transform 0.35s var(--ease), background 0.25s;
}

.button:hover {
  background: var(--ember-deep);
  transform: translateY(-2px);
}

.button:active { transform: translateY(0) scale(0.98); }

/* ---------- Hero ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 5rem);
  max-width: 72rem;
  margin: 0 auto;
  padding: clamp(3rem, 9vh, 7rem) clamp(1.25rem, 5vw, 4rem) clamp(4rem, 10vh, 7rem);
}

.hero-phone {
  position: relative;
  display: flex;
  justify-content: center;
}

.cutout {
  position: absolute;
  width: clamp(110px, 12vw, 170px);
  filter: drop-shadow(0 18px 22px rgba(33, 29, 24, 0.18));
  pointer-events: none;
  will-change: transform;
}

.cutout-latte { top: -7%; left: -20%; }
.cutout-bagel { bottom: -4%; right: -19%; }

/* ---------- Device ---------- */
/* Real iPhone 16 Pro bezel (Apple Design Resources export) composited
   around the screenshot, so it just renders as one image. */

.device {
  display: block;
  width: clamp(250px, 27vw, 330px);
  height: auto;
  filter: drop-shadow(0 36px 60px rgba(33, 29, 24, 0.35));
  transition: transform 0.8s var(--ease);
}

.tilt-left  { transform: rotate(-3deg); }
.tilt-right { transform: rotate(3deg); }

.device:hover { transform: rotate(0deg) scale(1.015); }

/* ---------- Scene band ---------- */

.band {
  position: relative;
  max-height: 72vh;
  overflow: hidden;
}

.band img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 380px;
  object-fit: cover;
}

.band-caption {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: clamp(1.5rem, 5vw, 4rem);
}

.band-caption p {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.3rem, 2.8vw, 2rem);
  line-height: 1.3;
  color: var(--ink);
  text-align: right;
  max-width: 18em;
}

/* ---------- App intro ---------- */

.app-intro {
  text-align: center;
  max-width: 46rem;
  margin: 0 auto;
  padding: clamp(5rem, 12vh, 8rem) 1.25rem clamp(2rem, 5vh, 3.5rem);
}

/* ---------- Feature rows ---------- */

.feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 5rem);
  max-width: 64rem;
  margin: 0 auto;
  padding: clamp(3rem, 9vh, 6rem) clamp(1.25rem, 5vw, 4rem);
}

.feature.flip .feature-copy { order: 2; }
.feature.flip .feature-phone { order: 1; }

.feature-copy h3 { margin-bottom: 1rem; }
.feature-copy p { color: var(--ink-soft); max-width: 30em; }

.feature-phone { display: flex; justify-content: center; }

/* ---------- Closing ---------- */

.closing {
  text-align: center;
  padding: clamp(5rem, 14vh, 9rem) 1.25rem;
  background: var(--paper-deep);
  border-top: 1px solid var(--hairline);
}

/* ---------- Footer ---------- */

.footer {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 2rem clamp(1.25rem, 5vw, 4rem) 2.5rem;
  background: var(--paper-deep);
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.footer nav { display: flex; gap: 1.6rem; }

.footer a {
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 0.25s var(--ease);
}

.footer a:hover { color: var(--ember); }

/* ---------- Reveal animation ---------- */

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 0.9s var(--ease),
    transform 0.9s var(--ease);
}

.reveal.in {
  opacity: 1;
  transform: none;
}

.d1 { transition-delay: 0.08s; }
.d2 { transition-delay: 0.16s; }
.d3 { transition-delay: 0.24s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; filter: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Inner pages (privacy/terms) ---------- */

.page {
  max-width: 42rem;
  margin: 0 auto;
  padding: clamp(3rem, 8vh, 5rem) 1.25rem 5rem;
}

.page h1 { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: 1.5rem; }
.page h2 { font-size: 1.4rem; margin: 2.2rem 0 0.7rem; }
.page p { color: var(--ink-soft); margin-bottom: 1rem; }
.page a { color: var(--ember); }

.notice {
  padding: 0.9rem 1.2rem;
  background: var(--paper-deep);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  font-size: 0.92rem;
  margin-bottom: 2rem;
}

/* ---------- Mobile ---------- */

@media (max-width: 760px) {
  .hero,
  .feature {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-copy { order: 1; }
  .hero-phone { order: 2; margin-top: 1rem; }

  .feature .feature-copy,
  .feature.flip .feature-copy { order: 1; }
  .feature .feature-phone,
  .feature.flip .feature-phone { order: 2; }

  .feature-copy p, .lede { margin-inline: auto; }

  .device { width: min(72vw, 300px); }

  .cutout-latte { left: -2%; }
  .cutout-bagel { right: -2%; }

  .band-caption { align-items: flex-end; justify-content: center; }
  .band-caption p { text-align: center; }
}
