:root {
  --ink: #0b141a;
  --ink-2: #111e26;
  --ink-3: #182a33;
  --cream: #f7f3e8;
  --muted: #9fb0b5;
  --mp: #e8590c;        /* MP_DOT in the app */
  --osm: #8a63c9;       /* OSM_DOT, lifted for a dark page */
  --ember: #ff8a3d;
  --glow: #ffc27a;
  --teal: #1f6b62;
  --chip: #2c6e3f;
  --display: "Big Shoulders Display", Impact, "Arial Narrow", sans-serif;
  --body: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; background: var(--ink); }
body {
  margin: 0;
  color: var(--cream);
  background: var(--ink);
  font: 400 17px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: var(--glow); }
img { display: block; max-width: 100%; }

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

.hero {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(120% 70% at 70% 30%, #3a2a2a 0%, transparent 60%),
    linear-gradient(#0e1d29 0%, #2a2230 45%, #0b141a 100%);
}
.terrain {
  position: absolute; inset: 0;
  z-index: -3;
  opacity: 0;
  transition: opacity 2.4s ease;
}
.terrain.ready { opacity: 1; }
.terrain .maplibregl-ctrl-attrib { display: none; }
.hero-shade {
  position: absolute; inset: 0; z-index: -2; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(11,20,26,.92) 0%, rgba(11,20,26,.72) 32%, rgba(11,20,26,.15) 58%, rgba(11,20,26,0) 70%),
    linear-gradient(180deg, rgba(11,20,26,.55) 0%, rgba(11,20,26,0) 22%, rgba(11,20,26,0) 70%, var(--ink) 100%);
}
.grain {
  position: absolute; inset: -50%; z-index: -1; pointer-events: none; opacity: .08;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); }
  40% { transform: translate(2%, -4%); } 60% { transform: translate(-4%, -1%); }
  80% { transform: translate(3%, 3%); } 100% { transform: translate(0, 0); }
}

.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: max(18px, env(safe-area-inset-top)) clamp(20px, 5vw, 64px) 0;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font: 900 28px/1 var(--display); letter-spacing: .06em; text-transform: uppercase;
  color: var(--cream); text-decoration: none;
}
.brand img { border-radius: 9px; box-shadow: 0 4px 18px rgba(0,0,0,.4); }
.nav-cta {
  color: var(--cream); text-decoration: none; font-weight: 600; font-size: 15px;
  padding: 8px 18px; border-radius: 999px;
  border: 1px solid rgba(247,243,232,.35);
  backdrop-filter: blur(8px); background: rgba(11,20,26,.25);
}

.hero-inner {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  align-items: center;
  gap: 24px;
  padding: 16px clamp(20px, 5vw, 64px) 84px;
  max-width: 1320px; width: 100%; margin: 0 auto;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  margin: 0 0 18px; font-size: 13px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted);
}
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot-mp { background: var(--mp); box-shadow: 0 0 12px var(--mp); }
.dot-osm { background: var(--osm); box-shadow: 0 0 12px var(--osm); margin-right: 6px; }

h1 {
  margin: 0;
  font: 900 clamp(60px, min(10.5vw, 16.5svh), 156px)/.86 var(--display);
  text-transform: uppercase;
  letter-spacing: -.005em;
  text-shadow: 0 6px 40px rgba(0,0,0,.45);
}
.burn {
  background: linear-gradient(180deg, #ffe0a8 0%, var(--ember) 45%, #d9480f 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 28px rgba(255,120,40,.35));
}
.lede { max-width: 30em; margin: 26px 0 32px; font-size: clamp(17px, 1.5vw, 20px); color: #e4ddcd; }

.ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 15px 26px; border-radius: 999px;
  font: 700 16px/1 var(--body); text-decoration: none; color: var(--cream);
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: linear-gradient(180deg, #ff7a2e, var(--mp));
  box-shadow: 0 10px 30px rgba(232,89,12,.45), inset 0 1px 0 rgba(255,255,255,.3);
  color: #fff;
}
.btn-primary:hover { box-shadow: 0 14px 40px rgba(232,89,12,.6), inset 0 1px 0 rgba(255,255,255,.3); }
.btn-primary[aria-disabled="true"] { background: #3a454b; box-shadow: none; color: #b8c2c5; cursor: default; transform: none; }
.btn-ghost { border: 1px solid rgba(247,243,232,.35); backdrop-filter: blur(8px); background: rgba(11,20,26,.25); }
.btn-small { padding: 11px 18px; font-size: 15px; background: var(--ink-3); border: 1px solid #2c4250; }
.btn-outline { background: transparent; border: 1px solid var(--glow); color: var(--glow); }

/* ---------- The phone ---------- */

.stage {
  position: relative;
  perspective: 1600px;
  display: grid; place-items: center;
  min-height: 560px;
}
.phone {
  --rx: 14deg; --ry: -26deg; --rz: 7deg;
  position: relative;
  width: clamp(220px, min(23vw, 38svh), 320px);
  aspect-ratio: 540 / 1200;
  border-radius: 13% / 6%;
  padding: 3.2%;
  background: linear-gradient(150deg, #3b4248 0%, #15191c 40%, #0b0d0f 100%);
  transform-style: preserve-3d;
  transform: rotateX(var(--rx)) rotateY(var(--ry)) rotateZ(var(--rz));
  box-shadow:
    1px 1px 0 #50585e inset,
    -1px -1px 0 #050607 inset,
    -40px 50px 80px rgba(0,0,0,.55),
    -10px 14px 24px rgba(0,0,0,.45);
  animation: hover 7s ease-in-out infinite;
  will-change: transform;
}
@keyframes hover {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -14px; }
}
.phone-edge {
  /* The frame's side, seen past the tilt. */
  position: absolute; inset: 0; border-radius: inherit;
  transform: translateZ(-10px) translateX(10px);
  background: linear-gradient(90deg, #2a3035, #0a0c0e);
  z-index: -1;
}
.phone-screen {
  position: relative; width: 100%; height: 100%;
  border-radius: 10.5% / 4.9%;
  overflow: hidden; background: #000;
}
.shot {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 1.1s ease;
}
.shot.is-on { opacity: 1; }
.glare {
  position: absolute; inset: -40%;
  background: linear-gradient(115deg, transparent 38%, rgba(255,255,255,.16) 46%, rgba(255,255,255,.04) 52%, transparent 60%);
  transform: translateX(var(--glare, 0%));
  pointer-events: none; mix-blend-mode: screen;
}
.phone-cam {
  position: absolute; top: 2.4%; left: 50%; width: 3.2%; aspect-ratio: 1;
  translate: -50% 0; border-radius: 50%; background: #050607;
  box-shadow: 0 0 0 2px #1b1f22;
}
.phone-shadow {
  position: absolute; bottom: 4%; left: 50%; width: 60%; height: 40px; translate: -50% 0;
  background: radial-gradient(closest-side, rgba(0,0,0,.6), transparent);
  filter: blur(8px); animation: shadow 7s ease-in-out infinite;
}
@keyframes shadow { 50% { scale: .85; opacity: .7; } }

.scene-tag {
  position: absolute; left: clamp(20px, 5vw, 64px); bottom: 34px;
  display: flex; flex-direction: column; gap: 2px;
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
  border-left: 2px solid var(--ember); padding-left: 12px;
  transition: opacity .6s ease;
}
.scene-tag.fade { opacity: 0; }
.scene-name { font: 700 18px/1.1 var(--display); letter-spacing: .1em; color: var(--cream); }
.scroll-cue {
  position: absolute; left: 50%; bottom: 26px; translate: -50% 0;
  width: 26px; height: 42px; border: 2px solid rgba(247,243,232,.45); border-radius: 14px;
}
.scroll-cue span {
  position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; translate: -50% 0;
  border-radius: 2px; background: var(--cream); animation: cue 1.8s ease-in-out infinite;
}
@keyframes cue { 0% { opacity: 0; top: 6px; } 40% { opacity: 1; } 100% { opacity: 0; top: 22px; } }

/* ---------- Ticker ---------- */

.ticker {
  overflow: hidden; white-space: nowrap;
  border-block: 1px solid #1d2d36;
  background: var(--ink-2);
  padding: 16px 0;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.ticker[hidden] { display: none; }
.ticker-track {
  display: inline-flex; gap: 40px; padding-left: 40px;
  animation: ticker 70s linear infinite;
  font: 700 22px/1 var(--display); letter-spacing: .12em; text-transform: uppercase; color: #6f8389;
}
.ticker-track span { display: inline-flex; align-items: center; gap: 40px; }
.ticker-track span::after { content: "▲"; font-size: 11px; color: var(--mp); }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */

main section {
  max-width: 1120px; margin: 0 auto;
  padding: clamp(72px, 10vw, 140px) clamp(20px, 5vw, 48px) 0;
}
.section-title {
  display: flex; align-items: baseline; gap: 18px;
  margin: 0 0 48px;
  font: 900 clamp(44px, 6vw, 84px)/.9 var(--display); text-transform: uppercase;
}
.section-title span { font-size: .38em; color: var(--mp); letter-spacing: .1em; }
h3 { margin: 0 0 10px; font: 700 clamp(26px, 2.6vw, 34px)/1.05 var(--display); letter-spacing: .02em; text-transform: uppercase; }

.feature {
  display: grid; grid-template-columns: 300px 1fr; gap: clamp(28px, 6vw, 80px);
  align-items: center; margin-bottom: clamp(56px, 8vw, 110px);
}
.feature.flip { grid-template-columns: 1fr 300px; }
.feature.flip .mini-phone { order: 2; }
.feature-copy p { margin: 0; color: #cfd6d4; font-size: 18px; max-width: 34em; }
.feature-copy b.osm { color: #b597ec; }
.feature-copy b.mp { color: var(--ember); }
.mini-phone {
  margin: 0; justify-self: center;
  width: min(260px, 70vw);
  padding: 9px; border-radius: 34px;
  background: linear-gradient(150deg, #3b4248, #0b0d0f);
  box-shadow: 0 40px 70px rgba(0,0,0,.5), 1px 1px 0 #50585e inset;
  transition: transform .8s cubic-bezier(.2,.7,.2,1), opacity .8s ease;
  opacity: 0;
}
.mini-phone img { border-radius: 26px; width: 100%; }
.tilt-left { transform: perspective(1200px) rotateY(18deg) rotateX(6deg) translateY(40px); }
.tilt-right { transform: perspective(1200px) rotateY(-18deg) rotateX(6deg) translateY(40px); }
.mini-phone.seen { opacity: 1; }
.tilt-left.seen { transform: perspective(1200px) rotateY(12deg) rotateX(4deg); }
.tilt-right.seen { transform: perspective(1200px) rotateY(-12deg) rotateX(4deg); }

/* ---------- Install ---------- */

.install-intro { margin: -24px 0 40px; color: var(--muted); font-size: 18px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.step {
  display: grid; grid-template-columns: 92px 1fr; gap: 8px;
  background: linear-gradient(180deg, var(--ink-2), #0d181f);
  border: 1px solid #1d2d36; border-radius: 22px;
  padding: 30px 30px 30px 18px;
}
.step-num {
  font: 900 96px/.8 var(--display); text-align: center;
  background: linear-gradient(180deg, var(--glow), var(--mp));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.step-body p { margin: 0 0 14px; color: #cfd6d4; }
.step-body .fine { font-size: 15px; color: var(--muted); margin: 14px 0 0; }
.step-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.hint { color: var(--muted); font-size: 15px; }
.howto { margin-top: 16px; font-size: 15px; color: #cfd6d4; }
.howto summary { cursor: pointer; color: var(--glow); font-weight: 600; }
.howto ol { margin: 10px 0 0; padding-left: 22px; }
.chip-demo { margin: 4px 0 6px; }
.chip {
  display: inline-block; padding: 12px 20px; border-radius: 999px;
  background: var(--chip); color: #fff; font-weight: 600; font-size: 17px;
  box-shadow: 0 0 0 0 rgba(44,110,63,.7);
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse { 70% { box-shadow: 0 0 0 16px rgba(44,110,63,0); } 100% { box-shadow: 0 0 0 0 rgba(44,110,63,0); } }

.qr-card {
  display: flex; align-items: center; gap: 24px;
  margin: 0 0 24px; padding: 22px; border-radius: 22px;
  background: var(--cream); color: var(--ink);
}
.qr-card[hidden] { display: none; }
.qr-card p { margin: 0; }
.qr { width: 132px; flex: none; }


/* ---------- Infra ---------- */

.spec {
  border: 1px solid #1d2d36; border-radius: 22px; overflow: hidden;
  font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 16px;
}
.spec-row {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 18px 26px; border-bottom: 1px solid #1d2d36;
}
.spec-row:last-child { border-bottom: 0; }
.spec-row:nth-child(odd) { background: var(--ink-2); }
.spec-row span { color: var(--muted); }
.spec-row b { color: var(--glow); font-weight: 600; text-align: right; }
.infra-note { margin: 20px 0 0; color: var(--muted); }

/* ---------- FAQ ---------- */

.faq details { border-bottom: 1px solid #1d2d36; padding: 20px 0; }
.faq summary {
  cursor: pointer; list-style: none;
  font: 700 26px/1.1 var(--display); text-transform: uppercase; letter-spacing: .03em;
  display: flex; justify-content: space-between; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--mp); transition: transform .2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { margin: 12px 0 0; color: #cfd6d4; max-width: 44em; }

.footer {
  max-width: 1120px; margin: 120px auto 0; padding: 32px clamp(20px, 5vw, 48px) max(40px, env(safe-area-inset-bottom));
  border-top: 1px solid #1d2d36; color: var(--muted); font-size: 14px;
}
.footer p { margin: 0 0 8px; }
.footer p:first-child { display: flex; align-items: center; gap: 8px; }
.footer img { border-radius: 5px; }
.attrib a { color: var(--muted); }

/* ---------- Small screens ---------- */

@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; padding-bottom: 110px; }
  .hero-shade {
    background: linear-gradient(180deg, rgba(11,20,26,.85) 0%, rgba(11,20,26,.6) 50%, rgba(11,20,26,.2) 70%, var(--ink) 100%);
  }
  .stage { min-height: 0; margin-top: 12px; }
  .phone { width: min(62vw, 260px); --ry: -20deg; }
  .scene-tag { bottom: 26px; }
  .scroll-cue { display: none; }
  .feature, .feature.flip { grid-template-columns: 1fr; }
  .feature.flip .mini-phone { order: 0; }
  .step { grid-template-columns: 1fr; padding: 24px; }
  .step-num { text-align: left; font-size: 72px; }
  .qr-card { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .mini-phone { opacity: 1; }
}
