:root {
  --ground: #F2F3EC;
  --ink: #17201A;
  --ink-soft: #4C574F;
  --carrot: #FF6B1A;
  --carrot-deep: #C94A08;
  --leaf: #7CCB5A;
  --line: rgba(23, 32, 26, .14);
  --display: "Bricolage Grotesque", "Avenir Next", system-ui, sans-serif;
  --mono: "DM Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --hand: "Shantell Sans", "Bradley Hand", cursive;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --pad: clamp(18px, 4vw, 48px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--display);
  font-size: 18px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  /* seed rows */
  background-image: radial-gradient(rgba(23, 32, 26, .13) 1px, transparent 1.4px);
  background-size: 26px 26px;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--carrot); outline-offset: 3px; border-radius: 6px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--ground); padding: 10px 14px; border-radius: 10px; z-index: 20; }
.skip:focus { left: 8px; }

/* ---------- header ---------- */
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px var(--pad);
  max-width: 1320px; margin: 0 auto;
  position: relative; z-index: 5;
}
.mark { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 1.05rem; letter-spacing: -.01em; }
.mark img { border-radius: 9px; }
.top nav { display: flex; gap: 4px; font-family: var(--mono); font-size: .8rem; }
.top nav a { text-decoration: none; padding: 8px 12px; border-radius: 999px; transition: background .2s, color .2s; }
.top nav a:hover { background: var(--ink); color: var(--ground); }

/* ---------- hero ---------- */
.hero {
  max-width: 1320px; margin: 0 auto;
  padding: clamp(12px, 3vw, 40px) var(--pad) clamp(48px, 8vw, 110px);
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: center; gap: clamp(16px, 3vw, 48px);
  min-height: min(84vh, 820px);
}
.eyebrow, .idx {
  font-family: var(--mono); font-size: .78rem; letter-spacing: .06em; text-transform: uppercase;
}
.eyebrow { color: var(--ink-soft); margin-bottom: 22px; }
h1 {
  font-size: clamp(3rem, 7.6vw, 6.9rem);
  line-height: .92; letter-spacing: -.03em; font-weight: 800;
  font-variation-settings: "wdth" 92;
  text-wrap: balance;
}
h1 em { font-style: normal; color: var(--carrot); position: relative; white-space: nowrap; }
h1 em::after {
  content: ""; position: absolute; left: 2%; right: 0; bottom: .06em; height: .09em;
  background: var(--leaf); border-radius: 99px; transform: rotate(-1.2deg);
}
.lede { margin-top: 28px; max-width: 30em; font-size: clamp(1.05rem, 1.5vw, 1.25rem); color: var(--ink-soft); text-wrap: pretty; }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 32px; padding: 15px 24px;
  background: var(--ink); color: var(--ground);
  border-radius: 999px; text-decoration: none; font-weight: 600; font-size: 1rem;
  transition: transform .25s var(--ease), background .2s;
}
.btn span { transition: transform .25s var(--ease); display: inline-block; }
.btn:hover { background: var(--carrot); color: var(--ink); }
.btn:hover span { transform: translateY(3px); }
.btn:active { transform: scale(.97); }

.hero-art { position: relative; aspect-ratio: 1 / 1; width: 100%; max-width: 640px; justify-self: center; }
.disc {
  position: absolute; inset: 9%;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 28%, #26342B 0%, var(--ink) 62%);
  box-shadow: 0 40px 80px -30px rgba(23, 32, 26, .55);
}
#scene {
  position: absolute; inset: -8%; width: 116%; height: 116%;
  touch-action: pan-y; cursor: grab; opacity: 0; transition: opacity .8s ease;
}
#scene.dragging { cursor: grabbing; }
#scene.over-tile { cursor: pointer; }
.has-3d #scene { opacity: 1; }
.fallback { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 4%; }
.fallback img { width: 24%; border-radius: 22%; box-shadow: 0 18px 30px -12px rgba(0, 0, 0, .6); }
.fallback img:nth-child(1) { transform: rotate(-8deg) translateY(10%); }
.fallback img:nth-child(3) { transform: rotate(7deg) translateY(-8%); }
.has-3d .fallback { display: none; }
.tile-label {
  position: absolute; left: 0; top: 0; pointer-events: none;
  font-family: var(--mono); font-size: .74rem; white-space: nowrap;
  background: var(--ground); color: var(--ink); padding: 6px 10px; border-radius: 999px;
  box-shadow: 0 6px 16px -6px rgba(0, 0, 0, .5);
  opacity: 0; transition: opacity .15s;
}
.tile-label.on { opacity: 1; }
.hint {
  position: absolute; right: 4%; bottom: 2%;
  font-family: var(--hand); font-size: 1rem; color: var(--ink-soft); transform: rotate(-4deg);
  display: none;
}
.has-3d .hint { display: block; }

/* ---------- apps ---------- */
.apps { max-width: 1320px; margin: 0 auto; padding: 0 var(--pad); display: grid; gap: clamp(18px, 3vw, 36px); }
.app {
  --bg: #fff; --fg: var(--ink); --accent: var(--carrot);
  background: var(--bg); color: var(--fg);
  border-radius: clamp(24px, 3.4vw, 44px);
  padding: clamp(26px, 5vw, 72px);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px);
  align-items: center;
  overflow: hidden; position: relative;
  scroll-margin-top: 16px;
}
.app--quest { --bg: #191A47; --fg: #FBF6E9; --accent: #FFC62B; }
.app--mpg { --bg: #1545C4; --fg: #F3FAFF; --accent: #5FE3DC; background: radial-gradient(circle at 0% 100%, #0FA3A6 0 min(46vw, 620px), transparent calc(min(46vw, 620px) + 1px)), #1545C4; }
.app--extras { --bg: #E5432D; --fg: #FFF8F2; --accent: #2B2440; }
.app:nth-child(even) .app-copy { order: 2; }

.idx { color: var(--accent); margin-bottom: 26px; }
.app--extras .idx { color: #FFE2D6; }
.app-head { display: flex; align-items: center; gap: 18px; }
.app-icon { width: 88px; height: 88px; border-radius: 22%; box-shadow: 0 14px 28px -12px rgba(0, 0, 0, .55); flex: none; }
h2 { font-size: clamp(2rem, 4.2vw, 3.5rem); line-height: .95; letter-spacing: -.025em; font-weight: 800; font-variation-settings: "wdth" 92; }
.sub { font-family: var(--mono); font-size: .82rem; opacity: .8; margin-top: 8px; }
.pitch { margin-top: 30px; font-size: clamp(1.3rem, 2.2vw, 1.75rem); line-height: 1.15; font-weight: 700; letter-spacing: -.02em; text-wrap: balance; }
.body { margin-top: 14px; max-width: 32em; opacity: .88; text-wrap: pretty; }
.facts { margin-top: 22px; display: grid; gap: 9px; font-size: .98rem; }
.facts li { display: flex; gap: 12px; align-items: baseline; }
.facts li::before { content: ""; flex: none; width: 9px; height: 9px; border-radius: 3px; background: var(--accent); transform: translateY(-1px) rotate(45deg); }
.app--extras .facts li::before { background: #FFF8F2; }
.btn--store { background: var(--fg); color: var(--bg); }
.app--mpg .btn--store { color: #1545C4; }
.btn--store:hover { background: var(--accent); color: #111; }
.btn--store:hover span { transform: translate(3px, -3px); }
.app--extras .btn--store:hover { color: #fff; }

/* screenshots */
.shots { display: flex; justify-content: center; align-items: center; padding: 16px 0; }
.shots img {
  width: 38%; max-width: 250px; border-radius: 26px;
  box-shadow: 0 30px 50px -22px rgba(0, 0, 0, .65), 0 0 0 1px rgba(255, 255, 255, .12);
  transition: transform .5s var(--ease);
}
.shots img:nth-child(1) { transform: rotate(-7deg) translate(14%, 4%); }
.shots img:nth-child(2) { transform: translateY(-4%); z-index: 2; }
.shots img:nth-child(3) { transform: rotate(7deg) translate(-14%, 4%); }
.shots:hover img:nth-child(1) { transform: rotate(-10deg) translate(2%, 3%); }
.shots:hover img:nth-child(3) { transform: rotate(10deg) translate(-2%, 3%); }
.shots--pair img { width: 44%; }
.shots--pair img:nth-child(2) { transform: rotate(6deg) translate(-10%, 5%); z-index: 0; }
.shots--pair:hover img:nth-child(2) { transform: rotate(9deg) translate(0, 5%); }

/* live converter */
.mpg-side { display: grid; gap: 28px; }
.converter {
  width: min(100%, 360px); margin: 0 auto;
  border-radius: 30px; overflow: hidden; position: relative;
  box-shadow: 0 30px 50px -22px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 255, 255, .22);
  font-variant-numeric: tabular-nums;
}
.half { display: grid; justify-items: center; gap: 2px; padding: 22px 16px; cursor: text; }
.half--top { background: linear-gradient(180deg, #5B2FD0, #2C3FD6); }
.half--bottom { background: linear-gradient(180deg, #19B7B4, #1293C2); }
.half input {
  width: 100%; border: 0; background: none; color: #fff; text-align: center;
  font: 800 clamp(2.6rem, 6vw, 3.6rem)/1 var(--display); letter-spacing: -.03em; padding: 0;
  caret-color: #fff; border-radius: 12px;
}
.half input:focus { outline: none; background: rgba(255, 255, 255, .12); }
.unit, .unit button { font-family: var(--mono); font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; color: rgba(255, 255, 255, .86); }
.unit button { background: rgba(255, 255, 255, .14); border: 0; border-radius: 999px; padding: 6px 12px; cursor: pointer; transition: background .2s, transform .15s; }
.unit button:hover { background: rgba(255, 255, 255, .28); }
.unit button:active { transform: scale(.95); }
.unit i { font-style: normal; margin-left: 4px; }
.try { position: absolute; left: 0; right: 0; bottom: 6px; text-align: center; font-family: var(--hand); font-size: .82rem; color: rgba(255, 255, 255, .8); pointer-events: none; }
.half--bottom { padding-bottom: 38px; }

/* stamps */
.stamps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(14px, 2.4vw, 26px); padding: 8px; }
.stamp {
  --hole: 7px;
  background: #fff; color: #2B2440; padding: 20px 20px 16px;
  -webkit-mask: linear-gradient(#000 0 0) center / calc(100% - var(--hole) * 3) calc(100% - var(--hole) * 3) no-repeat,
    radial-gradient(circle var(--hole) at center, #0000 98%, #000) calc(var(--hole) * -1.5) calc(var(--hole) * -1.5) / calc(var(--hole) * 3) calc(var(--hole) * 3) round;
  mask: linear-gradient(#000 0 0) center / calc(100% - var(--hole) * 3) calc(100% - var(--hole) * 3) no-repeat,
    radial-gradient(circle var(--hole) at center, #0000 98%, #000) calc(var(--hole) * -1.5) calc(var(--hole) * -1.5) / calc(var(--hole) * 3) calc(var(--hole) * 3) round;
  transition: transform .45s var(--ease);
  filter: drop-shadow(0 16px 18px rgba(60, 10, 0, .35));
}
.stamp img { width: 100%; aspect-ratio: 520 / 680; object-fit: cover; }
.stamp figcaption { font-family: var(--hand); font-size: .8rem; line-height: 1.25; margin-top: 10px; min-height: 4.6em; }
.stamp b { display: block; font-family: var(--display); font-weight: 800; font-size: .86rem; letter-spacing: -.01em; margin-bottom: 3px; }
.stamp:nth-child(1) { transform: rotate(-3deg); }
.stamp:nth-child(2) { transform: rotate(2.5deg) translateY(18px); }
.stamp:nth-child(3) { transform: rotate(2deg); }
.stamp:nth-child(4) { transform: rotate(-2.5deg) translateY(18px); }
.stamp:hover { transform: rotate(0) scale(1.04); z-index: 2; position: relative; }
.soon { margin-top: 32px; display: inline-flex; align-items: center; gap: 12px; padding: 13px 20px; border-radius: 999px; background: #2B2440; color: #FFF8F2; font-weight: 600; font-size: .98rem; }
.dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--leaf); box-shadow: 0 0 0 0 rgba(124, 203, 90, .7); animation: pulse 2.2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(124, 203, 90, 0); } 100% { box-shadow: 0 0 0 0 rgba(124, 203, 90, 0); } }

/* reveal on scroll */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
.js .reveal:nth-child(2) { transition-delay: .12s; }

/* ---------- footer ---------- */
.foot { max-width: 1320px; margin: 0 auto; padding: clamp(60px, 10vw, 130px) var(--pad) 28px; }
.foot-big { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px; padding-bottom: 36px; border-bottom: 1.5px solid var(--ink); }
.foot-big p { font-size: clamp(2.2rem, 5.4vw, 4.6rem); line-height: .95; letter-spacing: -.03em; font-weight: 800; font-variation-settings: "wdth" 92; }
.foot-big a { font-family: var(--mono); font-size: clamp(.9rem, 1.6vw, 1.1rem); text-decoration: none; background: var(--carrot); color: var(--ink); padding: 14px 20px; border-radius: 999px; transition: background .2s, color .2s; }
.foot-big a:hover { background: var(--ink); color: var(--ground); }
.foot-row { display: flex; flex-wrap: wrap; gap: 10px 26px; padding-top: 18px; font-family: var(--mono); font-size: .76rem; color: var(--ink-soft); }
.foot-row .fine { margin-left: auto; opacity: .75; }

/* ---------- small screens ---------- */
@media (max-width: 880px) {
  .hero { grid-template-columns: 1fr; min-height: 0; padding-top: 0; }
  .hero-art { order: -1; max-width: 440px; }
  .app { grid-template-columns: 1fr; }
  .app:nth-child(even) .app-copy { order: 0; }
  .app--mpg { background: radial-gradient(circle at 50% 100%, #0FA3A6 0 78vw, transparent calc(78vw + 1px)), #1545C4; }
  .foot-row .fine { margin-left: 0; }
}
@media (max-width: 640px) {
  .top nav { display: none; }
}
@media (max-width: 480px) {
  .app-icon { width: 68px; height: 68px; }
  .stamp { --hole: 5px; padding: 14px 14px 10px; }
  .stamp figcaption { font-size: .7rem; }
  .stamp b { font-size: .76rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}
