/* The Gaslight — the game's nine colors (Gaslight/Design/Tokens.swift). */
:root {
  --brick: #6E3327;
  --wood: #3B2416;
  --felt: #1F4A3A;
  --brass: #E8B457;
  --light: #FFE7A8;
  --cream: #F2E6CF;
  --uptown: #E8A0B4;
  --downtown: #9ED0C1;
  --shadow: #1A1410;

  --ink: rgba(242, 230, 207, 0.86);
  --ink-soft: rgba(242, 230, 207, 0.66);
  --rule: rgba(242, 230, 207, 0.14);
  --display: "Playfair Display", "Iowan Old Style", Georgia, serif;
  --ui: "Avenir Next", Avenir, -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Segoe UI", sans-serif;
  --wrap: 1160px;
  color-scheme: dark;
}

@font-face {
  font-family: "Playfair Display";
  font-style: italic;
  font-weight: 600;
  font-display: swap;
  src: url("assets/fonts/playfair-semibold-italic.woff2") format("woff2");
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--shadow);
  color: var(--ink);
  font: 500 17px/1.6 var(--ui);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: var(--light); text-decoration-color: rgba(255, 231, 168, 0.4); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--light); }
img, video { display: block; max-width: 100%; }

/* Film grain over the whole page, barely there; it ties the painted
   frames, the game footage and the flat colors together. */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 100; pointer-events: none;
  opacity: 0.035;
  background: 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='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: linear-gradient(rgba(26, 20, 16, 0.92), rgba(26, 20, 16, 0.78));
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}
.nav-row { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--cream); text-decoration: none; font: 600 italic 21px/1 var(--display); }
.brand img { border-radius: 7px; }
.brand small { /* the rest of the App Store name, quietly */
  margin-left: 2px; color: var(--ink-soft);
  font: 500 13px/1 var(--ui); letter-spacing: 0.08em; text-transform: uppercase;
}
@media (max-width: 380px) { .brand small { display: none; } }
.nav-links { display: flex; gap: 24px; font-size: 15px; }
.nav-links a { color: var(--ink-soft); text-decoration: none; }
.nav-links a:hover { color: var(--cream); }

/* Hero */
.hero { position: relative; overflow: hidden; padding: 72px 0 88px; }
.hero-bg {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(26, 20, 16, 0.94) 0%, rgba(26, 20, 16, 0.78) 46%, rgba(26, 20, 16, 0.55) 100%),
    linear-gradient(0deg, var(--shadow) 0%, rgba(26, 20, 16, 0) 30%),
    url("assets/img/hero-street.webp") center / cover no-repeat;
}
.hero-row { position: relative; display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: center; }
.chip {
  display: inline-block; margin: 0 0 28px; padding: 6px 14px;
  border: 1px solid rgba(232, 180, 87, 0.5); border-radius: 999px;
  color: var(--brass); font-size: 13px; letter-spacing: 0.04em;
}
.above { margin: 0 0 4px; color: rgba(242, 230, 207, 0.72); font-size: 15px; letter-spacing: 0.08em; }
.sign {
  margin: 0; color: var(--light);
  font: 600 italic clamp(54px, 8vw, 104px)/1.04 var(--display);
  white-space: nowrap;
  text-shadow:
    0 0 3px rgba(255, 243, 208, 0.9),
    0 0 14px rgba(255, 231, 168, 0.75),
    0 0 40px rgba(232, 180, 87, 0.55),
    0 0 90px rgba(232, 180, 87, 0.3);
}
.address { margin: 14px 0 0; color: var(--brass); font-size: 14px; letter-spacing: 0.32em; text-transform: uppercase; }
.lede { max-width: 33em; margin: 28px 0 0; font-size: 19px; color: var(--ink); }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin-top: 32px; }
.pill {
  padding: 12px 20px; border-radius: 999px;
  background: rgba(242, 230, 207, 0.08); border: 1px solid var(--rule);
  color: var(--cream); font-size: 15px;
}
.link { font-size: 15px; }
.hero-device { margin: 0; display: grid; justify-items: center; }

/* Device frames — drawn here, not Apple's bezels */
.phone {
  width: min(270px, 64vw);
  padding: 9px;
  border-radius: 46px;
  background: linear-gradient(150deg, #57504a, #2a2622 40%, #1b1815);
  box-shadow:
    inset 0 0 0 1.5px rgba(255, 255, 255, 0.10),
    0 2px 0 rgba(255, 255, 255, 0.04),
    0 40px 80px rgba(0, 0, 0, 0.55),
    var(--lamp);
}
.phone video {
  width: 100%; aspect-ratio: 600 / 1304; object-fit: cover;
  border-radius: 37px; background: #000;
}
.ipad {
  width: min(560px, 100%);
  padding: 14px;
  border-radius: 30px;
  background: linear-gradient(150deg, #57504a, #2a2622 40%, #1b1815);
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.10), 0 40px 80px rgba(0, 0, 0, 0.5), var(--lamp);
}
.ipad video { width: 100%; aspect-ratio: 1200 / 838; object-fit: cover; border-radius: 16px; background: #000; }

/* Sections */
.section-title {
  margin: 0; text-align: center; color: var(--cream);
  font: 600 italic clamp(38px, 5.4vw, 64px)/1.1 var(--display);
}
.section-sub { max-width: 36em; margin: 14px auto 0; text-align: center; color: var(--ink-soft); font-size: 18px; }

.tables { padding: 96px 0 40px; }
.row {
  display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 56px; align-items: center;
  margin-top: 88px;
}
.row.flip .row-copy { order: 2; }
.tag {
  display: inline-block; margin: 0 0 14px; padding: 4px 12px; border-radius: 999px;
  background: rgba(232, 180, 87, 0.14); color: var(--brass); font-size: 13px; letter-spacing: 0.05em;
}
.row h3 { margin: 0; color: var(--cream); font: 600 italic clamp(32px, 3.6vw, 44px)/1.12 var(--display); }
.row-copy > p:not(.tag) { margin: 16px 0 0; font-size: 18px; }
.row ul { margin: 22px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.row li { position: relative; padding-left: 26px; color: var(--ink-soft); font-size: 16px; }
.row li::before {
  content: ""; position: absolute; left: 2px; top: 0.62em; width: 10px; height: 10px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, var(--cream) 60%);
  box-shadow: 0 0 0 1.5px var(--brass), 0 0 8px rgba(255, 231, 168, 0.6);
}

/* A stage is no box: the device sits on the page under its own lamp, with
   a faint hint of what's beneath it (felt, the brick wall, floorboards),
   all feathered into the dark so no edge shows. */
.stage {
  position: relative;
  min-height: 560px; padding: 56px 24px;
  display: grid; place-items: center;
  --floor: rgba(232, 180, 87, 0.05);
  --texture: none;
}
.stage::before,
.stage::after {
  content: ""; position: absolute; inset: -14% -20%;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(closest-side, #000 50%, transparent 100%);
  mask-image: radial-gradient(closest-side, #000 50%, transparent 100%);
}
.stage::before { /* the lamp, and the floor under the device */
  background:
    radial-gradient(ellipse 50% 32% at 50% 80%, var(--floor), transparent 72%),
    radial-gradient(ellipse 55% 50% at 50% 36%, rgba(255, 231, 168, 0.10), rgba(232, 180, 87, 0.035) 45%, transparent 72%);
}
.stage::after { background: var(--texture); opacity: 0.07; }
.stage > * { position: relative; z-index: 1; }
.stage-felt { --floor: rgba(31, 74, 58, 0.55); }
.stage-brick {
  --floor: rgba(110, 51, 39, 0.42);
  --texture: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='52'%3E%3Cg fill='none' stroke='%23F2E6CF' stroke-width='2'%3E%3Cpath d='M0 1H88M0 27H88M44 1V27M0 27V52M88 27V52'/%3E%3C/g%3E%3C/svg%3E");
}
.stage-wood {
  --floor: rgba(91, 56, 32, 0.55);
  --texture: repeating-linear-gradient(90deg, #F2E6CF 0 2px, transparent 2px 76px);
}
.stage-night { --floor: rgba(232, 180, 87, 0.07); }

/* Lit by the lamp above */
.phone, .ipad { --lamp: 0 0 90px rgba(255, 231, 168, 0.10); }

/* An iPhone lying flat on the felt, seen from a chair */
.flat { perspective: 1500px; }
.flat .phone { transform: rotateX(30deg) rotateZ(-14deg); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.10), 30px 60px 70px rgba(0, 0, 0, 0.55), var(--lamp); }

/* iPhone Duo: the left half is a cover that swings open on the hinge. A
   screen is lit only while the device is settled: shut, the outer screen
   shows the menu; open, the inner screen plays the table. Through the
   fold every screen is dark glass, so no moment shows half of one screen
   beside half of the other. */
.duo {
  --w: min(520px, 100%);
  --ease: cubic-bezier(0.55, 0, 0.25, 1);
  position: relative;
  width: var(--w); aspect-ratio: 1.42;
  perspective: 1800px;
  transform-style: preserve-3d;
  transform: translateX(-25%);                       /* shut, the right half centered */
  transition: transform 1.2s var(--ease);
}
.duo.open { transform: translateX(0); }
.duo-body {
  position: absolute; inset: 0 0 0 50%;
  visibility: hidden; transition: visibility 0s 1.2s; /* only once the cover has landed */
  border-radius: 0 24px 24px 0;
  background: linear-gradient(150deg, #57504a, #2a2622 40%, #1b1815);
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.5);
}
.duo.open .duo-body { visibility: visible; transition: visibility 0s 0s; }
.duo-body::after,
.duo-back::after { content: ""; position: absolute; top: 10px; bottom: 10px; background: #0b0908; }
.duo-body::after { left: 0; right: 10px; border-radius: 0 16px 16px 0; }
.duo-back::after { left: 10px; right: 0; border-radius: 16px 0 0 16px; }
.duo-screen { /* over both halves, lifted above the cover */
  position: absolute; z-index: 3; inset: 10px;
  transform: translateZ(2px);
  border-radius: 16px; overflow: hidden; background: #0b0908;
  opacity: 0; transition: opacity 0.3s ease;
}
.duo.lit .duo-screen { opacity: 1; }
.duo-screen video { width: 100%; height: 100%; object-fit: cover; }
.duo-hinge {
  position: absolute; z-index: 4; top: 0; bottom: 0; left: calc(50% - 1px); width: 2px;
  transform: translateZ(3px);
  background: linear-gradient(rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.12));
  opacity: 0; transition: opacity 0.4s ease;
}
.duo.lit .duo-hinge { opacity: 1; }
.duo-cover {
  position: absolute; z-index: 2; inset: 0 50% 0 0;
  transform-origin: 100% 50%;
  transform-style: preserve-3d;
  transform: translateZ(1px) rotateY(180deg);
  transition: transform 1.2s var(--ease);
}
.duo.open .duo-cover { transform: translateZ(1px) rotateY(0deg); }
.duo-face {
  position: absolute; inset: 0;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  background: linear-gradient(150deg, #57504a, #2a2622 40%, #1b1815);
}
.duo-back { /* the inner left half */
  border-radius: 24px 0 0 24px;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.5);
}
.duo-front { /* the outer screen, facing out when shut; like a book's cover,
                its hinge is the left edge, and those corners are nearly
                square, as on the device */
  transform: rotateY(180deg);
  border-radius: 6px 24px 24px 6px;
  padding: 9px;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.5);
}
.duo-front::before { /* its glass, dark while the screen is off */
  content: ""; position: absolute; inset: 9px; border-radius: 3px 16px 16px 3px; background: #0b0908;
}
.duo-front img {
  position: relative;
  width: 100%; height: 100%; object-fit: cover; border-radius: 3px 16px 16px 3px;
  opacity: 0; transition: opacity 0.3s ease;
}
.duo.shut .duo-front img { opacity: 1; }

/* Story */
.story { /* a shade warmer than the page, its seams faded */
  padding: 140px 0 120px;
  background: linear-gradient(var(--shadow), #201813 160px, #201813 calc(100% - 160px), var(--shadow));
}
.reel { list-style: none; margin: 56px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.reel li { display: grid; gap: 14px; align-content: start; }
.reel img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 14px; box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45); }
.reel span { /* one line each, sized to the narrowest frame */
  color: var(--cream); font: 600 italic clamp(15px, 1.25vw, 18px)/1.3 var(--display);
  white-space: nowrap;
}

/* Promise */
.promise { padding: 40px 0 112px; }
.promise-row {
  display: grid; justify-items: center; text-align: center; gap: 14px;
  padding: 56px 24px; border-radius: 30px;
  background: radial-gradient(ellipse at 50% 0%, rgba(255, 231, 168, 0.10), rgba(255, 231, 168, 0) 60%), rgba(242, 230, 207, 0.025);
  box-shadow: inset 0 0 0 1px rgba(242, 230, 207, 0.06);
}
.promise h2 { margin: 0; color: var(--cream); font: 600 italic clamp(30px, 4vw, 44px)/1.15 var(--display); }
.promise p { max-width: 34em; margin: 0; font-size: 18px; }

/* Footer */
.foot { border-top: 1px solid var(--rule); padding: 32px 0 48px; }
.foot-row { display: grid; grid-template-columns: 1fr auto; gap: 10px 24px; align-items: center; }
.sig { color: var(--cream); font: 600 italic 18px/1.3 var(--display); }
.foot nav { display: flex; gap: 20px; font-size: 15px; }
.foot nav a { color: var(--ink-soft); }
.note { grid-column: 1 / -1; color: rgba(242, 230, 207, 0.5); font-size: 14px; }

/* Text pages (privacy, support) */
.page { padding: 72px 0 96px; }
.page .wrap { max-width: 760px; }
.page h1 { margin: 0; color: var(--cream); font: 600 italic clamp(40px, 6vw, 60px)/1.1 var(--display); }
.page .meta { margin: 10px 0 0; color: var(--ink-soft); font-size: 15px; }
.page h2 { margin: 44px 0 0; color: var(--cream); font: 600 italic 28px/1.2 var(--display); }
.page p { margin: 14px 0 0; }
.page hr { margin: 56px 0 0; border: 0; border-top: 1px solid var(--rule); }
.page dl { margin: 18px 0 0; }
.page dt { margin-top: 22px; color: var(--cream); font-weight: 600; }
.page dd { margin: 6px 0 0; }

@media (max-width: 900px) {
  .hero { padding: 48px 0 64px; }
  .hero-row, .row { grid-template-columns: 1fr; gap: 40px; }
  .row.flip .row-copy { order: 0; }
  .row { margin-top: 72px; }
  .stage { min-height: 420px; padding: 40px 16px; }
  .reel { grid-template-columns: repeat(2, 1fr); }
  .reel span { font-size: 19px; }
  .nav-links { gap: 16px; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .nav-links a:not(:last-child) { display: none; }
  .reel { grid-template-columns: 1fr; }
  .lede, .row-copy > p:not(.tag), .section-sub, .promise p { font-size: 17px; }
  .address { letter-spacing: 0.22em; font-size: 12px; }
  .foot-row { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .duo, .duo-cover, .duo-hinge { transition: none; }
}
