/* ============ TOKENS ============ */
:root {
  --bg: #08090C;
  --bg-2: #0E1016;
  --bg-3: #14171F;
  --ink: #F4F3EE;
  --ink-dim: #9A9CA6;
  --ink-faint: #4A4D58;
  --line: rgba(255,255,255,0.08);
  --line-strong: rgba(255,255,255,0.14);
  --accent: #B4B8FF;          /* periwinkle glow (bell lavender) */
  --accent-deep: #7B80E8;
  --accent-2: #FFD4B8;         /* warm peach contrast */
  --glass: rgba(180,184,255,0.04);
  --radius: 14px;
  --max: 1280px;

  --serif: 'Instrument Serif', 'Times New Roman', serif;
  --sans: 'Geist', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  overflow-x: hidden;
  letter-spacing: -0.005em;
}
/* subtle film grain */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
@media (min-width: 768px) { .wrap { padding: 0 40px; } }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img, svg { display: block; max-width: 100%; }

/* ============ NAV ============ */
nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 18px 0;
  transition: background .3s, border-color .3s, backdrop-filter .3s;
  border-bottom: 1px solid transparent;
}
nav.scrolled {
  background: rgba(8,9,12,0.7);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border-bottom-color: var(--line);
}
.nav-inner { display:flex; align-items:center; justify-content: space-between; }
.brand { display:flex; align-items:center; gap: 10px; font-weight: 500; font-size: 17px; letter-spacing: -0.02em; }
.brand-mark { width: 28px; height: 28px; }
.nav-links { display: none; gap: 32px; font-size: 14px; color: var(--ink-dim); }
.nav-links a:hover { color: var(--ink); }
@media (min-width: 820px) { .nav-links { display: flex; } }
.nav-cta {
  padding: 9px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 100px;
  font-size: 13.5px;
  font-weight: 500;
  background: rgba(255,255,255,0.03);
  transition: all .2s;
}
.nav-cta:hover { background: var(--accent); color: #0B0C18; border-color: var(--accent); }

/* ============ HERO ============ */
.hero {
  position: relative;
  padding: 140px 0 80px;
  overflow: hidden;
  min-height: 100vh;
  display: flex;
  align-items: center;
}
@media (min-width: 768px) { .hero { padding: 160px 0 120px; } }

/* radar rings behind */
.radar {
  position: absolute;
  left: 50%;
  top: 60%;
  transform: translate(-50%, -50%);
  width: 1400px; height: 1400px;
  pointer-events: none;
  z-index: 0;
}
@media (min-width: 900px) {
  .radar { left: 70%; top: 50%; width: 1600px; height: 1600px; }
}
.ring {
  position: absolute; inset: 50% auto auto 50%;
  width: 120px; height: 120px;
  margin: -60px 0 0 -60px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  opacity: 0;
  animation: pulse 5s cubic-bezier(.2,.6,.3,1) infinite;
}
.ring:nth-child(2){ animation-delay: 1s; }
.ring:nth-child(3){ animation-delay: 2s; }
.ring:nth-child(4){ animation-delay: 3s; }
.ring:nth-child(5){ animation-delay: 4s; }
@keyframes pulse {
  0% { transform: scale(0.2); opacity: 0.55; border-width: 2px; }
  70% { opacity: 0.08; }
  100% { transform: scale(8); opacity: 0; border-width: 1px; }
}
/* radial glow under hero */
.glow {
  position: absolute; left: 50%; top: 55%;
  transform: translate(-50%, -50%);
  width: 900px; height: 900px;
  background: radial-gradient(circle at center, rgba(180,184,255,0.14), rgba(180,184,255,0) 60%);
  pointer-events: none;
  z-index: 0;
}
@media (min-width: 900px) {
  .glow { left: 70%; }
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr;
  gap: 64px;
  align-items: center;
}
@media (min-width: 900px) {
  .hero-inner { grid-template-columns: 1.1fr 0.9fr; gap: 40px; }
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 14px 7px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 100px;
  font-size: 12.5px;
  color: var(--ink-dim);
  background: rgba(255,255,255,0.02);
  font-family: var(--mono);
  letter-spacing: 0.02em;
}
.eyebrow .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent);
  animation: beacon 2.2s ease-out infinite;
}
@keyframes beacon {
  0%, 100% { box-shadow: 0 0 0 0 rgba(180,184,255,0.6); }
  70% { box-shadow: 0 0 0 10px rgba(180,184,255,0); }
}

h1.hero-title {
  margin-top: 24px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(38px, 9vw, 88px);
  line-height: 0.98;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
h1.hero-title em {
  font-style: italic;
  color: var(--accent);
  position: relative;
}
h1.hero-title .scan {
  position: relative;
  display: inline-block;
  color: var(--accent);
  font-style: italic;
}
h1.hero-title .scan::before {
  content: '';
  position: absolute;
  left: 0; right: 0;
  bottom: 0.02em;
  height: 1px;
  background: var(--accent);
  opacity: 0.35;
  transform-origin: left;
  animation: scanDraw 1.6s cubic-bezier(.7,0,.3,1) .5s both;
}
@keyframes scanDraw {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

.hero-sub {
  margin-top: 28px;
  max-width: 520px;
  font-size: clamp(16px, 1.5vw, 18.5px);
  line-height: 1.55;
  color: var(--ink-dim);
  text-wrap: pretty;
}
.hero-sub strong { color: var(--ink); font-weight: 500; }

.cta-row {
  margin-top: 40px;
  display: flex; flex-wrap: wrap; gap: 12px;
}

/* store badges — original design, not Apple/Google branded */
.store-btn {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 12px 20px 12px 16px;
  background: var(--ink);
  color: #0B0C18;
  border-radius: 12px;
  border: 1px solid var(--ink);
  transition: transform .2s, box-shadow .2s;
  font-weight: 500;
}
.store-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px -12px rgba(180,184,255,0.35);
}
.store-btn.alt {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.store-btn.alt:hover { border-color: var(--accent); color: var(--accent); box-shadow: none; }
.store-btn svg { flex: 0 0 auto; }
.store-btn .s-top { font-size: 10.5px; opacity: 0.7; font-family: var(--mono); letter-spacing: 0.05em; text-transform: uppercase; line-height: 1.2; }
.store-btn .s-bot { font-size: 15px; line-height: 1.1; margin-top: 2px; font-weight: 600; letter-spacing: -0.01em; }

.meta-row {
  margin-top: 28px;
  display: flex; flex-wrap: wrap; gap: 20px 28px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-dim);
  letter-spacing: 0.02em;
}
.meta-row span { display: inline-flex; align-items: center; gap: 8px; }
.meta-row .check { color: var(--accent); }

/* ============ iPhone mockup ============ */
.phone-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  perspective: 1400px;
  z-index: 3;
}
.phone {
  position: relative;
  width: 290px;
  height: 600px;
  transform: rotate(-4deg) rotateY(-8deg) rotateX(4deg);
  transform-style: preserve-3d;
  animation: float 7s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: rotate(-4deg) rotateY(-8deg) rotateX(4deg) translateY(0); }
  50% { transform: rotate(-4deg) rotateY(-8deg) rotateX(4deg) translateY(-14px); }
}
@media (min-width: 900px) { .phone { width: 310px; height: 640px; } }

.phone-body {
  position: absolute; inset: 0;
  background: linear-gradient(160deg, #1A1C26 0%, #0A0B10 100%);
  border-radius: 46px;
  border: 1px solid rgba(255,255,255,0.08);
  padding: 10px;
  box-shadow:
    0 2px 0 rgba(255,255,255,0.04) inset,
    0 50px 100px -30px rgba(0,0,0,0.8),
    0 0 0 1px rgba(0,0,0,0.4),
    -40px 60px 120px -40px rgba(180,184,255,0.2);
}
.phone-screen {
  position: relative;
  width: 100%; height: 100%;
  border-radius: 38px;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 10%, rgba(180,184,255,0.15), transparent 50%),
    radial-gradient(circle at 80% 90%, rgba(255,212,184,0.08), transparent 50%),
    linear-gradient(180deg, #0B0C14 0%, #06060A 100%);
}
/* dynamic island */
.island {
  position: absolute;
  top: 10px; left: 50%;
  transform: translateX(-50%);
  width: 100px; height: 28px;
  background: #000;
  border-radius: 20px;
  z-index: 10;
}
/* lockscreen */
.lock-time {
  position: absolute;
  top: 70px; left: 50%;
  transform: translateX(-50%);
  text-align: center;
  color: rgba(255,255,255,0.9);
}
.lock-time .hhmm {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 72px;
  letter-spacing: -0.04em;
  line-height: 1;
}
.lock-time .date {
  font-size: 13px;
  color: rgba(255,255,255,0.7);
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* stacked notifications */
.notif-stack {
  position: absolute;
  left: 12px; right: 12px;
  top: 230px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.notif {
  background: rgba(28,30,40,0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  padding: 11px 12px;
  display: flex;
  gap: 10px;
  font-size: 12px;
  opacity: 0;
  transform: translateY(8px) scale(0.97);
  animation: notifIn .7s cubic-bezier(.2,.7,.2,1) forwards;
}
.notif:nth-child(1){ animation-delay: 0.4s; }
.notif:nth-child(2){ animation-delay: 1.6s; }
.notif:nth-child(3){ animation-delay: 2.8s; }
@keyframes notifIn {
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.notif.primary {
  background: linear-gradient(180deg, rgba(180,184,255,0.22), rgba(180,184,255,0.08));
  border-color: rgba(180,184,255,0.35);
  box-shadow: 0 10px 30px -10px rgba(180,184,255,0.4), 0 0 0 1px rgba(180,184,255,0.1) inset;
}
.notif-icon {
  width: 30px; height: 30px; border-radius: 8px;
  flex: 0 0 auto;
  display: grid; place-items: center;
  background: #0E1018;
  border: 1px solid rgba(255,255,255,0.05);
}
.notif.primary .notif-icon {
  background: var(--accent);
  border-color: var(--accent);
}
.notif-body { flex: 1; min-width: 0; }
.notif-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.notif-app { font-weight: 600; font-size: 11.5px; color: var(--ink); letter-spacing: -0.005em; }
.notif.dim .notif-app { color: rgba(255,255,255,0.7); }
.notif-time { font-size: 10px; color: rgba(255,255,255,0.5); flex: 0 0 auto; }
.notif-title { font-weight: 500; font-size: 12px; color: var(--ink); margin-top: 1px; }
.notif-msg { color: rgba(255,255,255,0.65); font-size: 11.5px; line-height: 1.35; margin-top: 1px; }
.notif.primary .notif-msg strong { color: var(--ink); font-weight: 500; }
.notif.dim { opacity: 0.4; animation-name: notifInDim; }
@keyframes notifInDim { to { opacity: 0.4; transform: translateY(0) scale(1); } }

.phone-home { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); width: 110px; height: 4px; border-radius: 2px; background: rgba(255,255,255,0.4); }

/* small floating badge next to phone */
.float-badge {
  position: absolute;
  padding: 10px 14px;
  background: rgba(20,22,30,0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-dim);
  display: none;
  animation: float 7s ease-in-out infinite reverse;
  z-index: 5;
  white-space: nowrap;
  box-shadow: 0 10px 30px -10px rgba(0,0,0,0.6);
}
@media (min-width: 1000px) { .float-badge { display: block; } }
.float-badge.top-l { top: 60px; left: -70px; }
.float-badge.top-l::before {
  content: "";
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #5AE28A;
  margin-right: 8px;
  vertical-align: middle;
  box-shadow: 0 0 8px #5AE28A;
}
.float-badge.bot-r { bottom: 110px; right: -20px; }
@media (min-width: 1200px) { .float-badge.bot-r { right: -50px; } }
.float-badge.bot-r strong { color: var(--accent); font-weight: 500; }

/* ============ SECTION GENERIC ============ */
section { position: relative; padding: 100px 0; }
@media (min-width: 768px) { section { padding: 140px 0; } }

.section-head { max-width: 640px; margin-bottom: 64px; }
.kicker {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 18px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}
.kicker::before {
  content: "";
  display: block;
  width: 28px; height: 1px;
  background: var(--accent);
}
.section-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(32px, 5.5vw, 54px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.section-title em { font-style: italic; color: var(--accent); }
.section-sub {
  margin-top: 18px;
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink-dim);
  max-width: 520px;
  text-wrap: pretty;
}

/* ============ HOW IT WORKS ============ */
.how {
  background: linear-gradient(180deg, transparent 0%, rgba(180,184,255,0.02) 50%, transparent 100%);
}
.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
}
@media (min-width: 800px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
}
.step {
  background: var(--bg);
  padding: 40px 32px 48px;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 320px;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .8s ease, transform .8s ease;
}
.step.in { opacity: 1; transform: translateY(0); }
.step:nth-child(2) { transition-delay: .12s; }
.step:nth-child(3) { transition-delay: .24s; }

.step-num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-faint);
  letter-spacing: 0.1em;
  margin-bottom: 80px;
}
.step-icon {
  position: absolute;
  top: 36px;
  right: 32px;
  width: 56px; height: 56px;
  border-radius: 14px;
  display: grid; place-items: center;
  background: radial-gradient(circle at 30% 20%, rgba(180,184,255,0.18), rgba(180,184,255,0.03) 70%);
  border: 1px solid rgba(180,184,255,0.2);
  color: var(--accent);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 8px 24px -12px rgba(180,184,255,0.35);
}
.step-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 30px;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
  max-width: 280px;
}
.step-text {
  font-size: 15px;
  color: var(--ink-dim);
  line-height: 1.5;
  max-width: 320px;
  text-wrap: pretty;
}

/* ============ WHY ============ */
.why-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
@media (min-width: 800px) {
  .why-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
}
.why {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 36px 32px 36px;
  background: linear-gradient(180deg, rgba(255,255,255,0.015), transparent);
  position: relative;
  overflow: hidden;
  transition: transform .3s, border-color .3s;
  opacity: 0; transform: translateY(20px);
}
.why.in { opacity: 1; transform: translateY(0); transition: opacity .8s, transform .8s, border-color .3s; }
.why:nth-child(2).in { transition-delay: .12s; }
.why:nth-child(3).in { transition-delay: .24s; }
.why:hover { border-color: rgba(180,184,255,0.3); }
.why::after {
  content: "";
  position: absolute;
  top: 0; right: 0;
  width: 180px; height: 180px;
  background: radial-gradient(circle at top right, rgba(180,184,255,0.08), transparent 70%);
  opacity: 0;
  transition: opacity .4s;
  pointer-events: none;
}
.why:hover::after { opacity: 1; }
.why-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: grid; place-items: center;
  background: rgba(180,184,255,0.08);
  color: var(--accent);
  margin-bottom: 24px;
}
.why-title {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 12px;
}
.why-text {
  color: var(--ink-dim);
  font-size: 15px;
  line-height: 1.55;
  text-wrap: pretty;
}

/* ============ COMPOSE / LIVE PROMPT ============ */
.compose {
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 8px;
  background: var(--bg-2);
  max-width: 720px;
  margin: 64px auto 0;
  box-shadow: 0 30px 80px -40px rgba(180,184,255,0.3);
}
.compose-inner {
  background: var(--bg);
  border-radius: 18px;
  padding: 28px 28px 24px;
}
.compose-label {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-faint);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.compose-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.compose-text {
  font-family: var(--serif);
  font-size: clamp(22px, 3vw, 32px);
  line-height: 1.3;
  letter-spacing: -0.015em;
  font-style: italic;
  color: var(--ink);
  min-height: 1.6em;
}
.compose-text .caret {
  display: inline-block;
  width: 2px; height: 1em;
  background: var(--accent);
  vertical-align: -0.15em;
  margin-left: 2px;
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.compose-chips {
  margin-top: 24px;
  display: flex; flex-wrap: wrap; gap: 8px;
}
.compose-chip {
  padding: 6px 12px;
  font-size: 12.5px;
  border: 1px solid var(--line-strong);
  color: var(--ink-dim);
  border-radius: 100px;
  background: rgba(255,255,255,0.02);
  font-family: var(--sans);
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
}
.compose-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(180,184,255,0.06);
}
.compose-chip.active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(180,184,255,0.1);
}

/* ============ CTA FINAL ============ */
.final {
  padding: 140px 0 160px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.final::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center top, rgba(180,184,255,0.12), transparent 60%);
  pointer-events: none;
}
.final-inner { position: relative; }
.final-title {
  font-family: var(--serif);
  font-size: clamp(40px, 7vw, 88px);
  line-height: 0.98;
  letter-spacing: -0.03em;
  max-width: 14ch;
  margin: 0 auto;
  text-wrap: balance;
}
.final-title em { font-style: italic; color: var(--accent); }
.final-sub {
  margin: 28px auto 0;
  color: var(--ink-dim);
  font-size: 17px;
  max-width: 48ch;
  text-wrap: pretty;
}
.final .cta-row { justify-content: center; margin-top: 44px; }
.final-legal {
  margin-top: 40px;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--ink-faint);
  letter-spacing: 0.05em;
}

/* ============ FOOTER ============ */
footer {
  padding: 40px 0 60px;
  border-top: 1px solid var(--line);
  font-size: 13.5px;
  color: var(--ink-dim);
}
.foot-inner {
  display: flex; flex-wrap: wrap; gap: 20px;
  justify-content: space-between; align-items: center;
}
.foot-links { display: flex; flex-wrap: wrap; gap: 24px; }
.foot-links a:hover { color: var(--ink); }
.foot-brand { display: flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.02em; }

/* utility */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .8s, transform .8s; }
.reveal.in { opacity: 1; transform: translateY(0); }

/* divider glyph */
.divider {
  display: flex; align-items: center; justify-content: center;
  gap: 14px;
  padding: 60px 0 0;
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-align: center;
}
.divider .line { width: 80px; height: 1px; background: var(--line); flex: 0 1 80px; }

/* respect reduced-motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
