/* Jacks Wild — jackswild.app
   Mirror Suit identity: Deep Water #0E262D · Lake #173943 · Porch Cream #F6EFE2 · Chip Coral #F07F5E.
   Display: Newsreader. UI: Figtree. Both OFL, self-hosted. */

@font-face { font-family: "Newsreader"; src: url("/assets/fonts/newsreader.woff") format("woff"); font-weight: 400 600; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("/assets/fonts/newsreader-italic.woff") format("woff"); font-weight: 400 500; font-style: italic; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("/assets/fonts/figtree.woff") format("woff"); font-weight: 300 900; font-display: swap; }

:root {
  color-scheme: dark;
  --well: #0A1E24;
  --bg: #0E262D;
  --lake: #173943;
  --lake-2: #1D4652;
  --cell: #1A404A;
  --line: rgba(246, 239, 226, .10);
  --line-2: rgba(246, 239, 226, .2);
  --cream: #F6EFE2;
  --text-2: #B9C6C4;
  --text-3: #8FA6A8;
  --coral: #F07F5E;
  --coral-soft: rgba(240, 127, 94, .14);
  --t1: #2598EE;
  --t2: #519841;
  --t3: #A678B3;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --wrap: 1160px;
  --ease: cubic-bezier(.22, .8, .3, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--cream);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, video, svg { display: block; max-width: 100%; }
a { color: var(--coral); text-underline-offset: 3px; }
a:hover { color: #F59A80; }
:focus-visible { outline: 2px solid var(--coral); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--coral); color: var(--bg); }

.wrap { width: min(var(--wrap), calc(100% - 48px)); margin: 0 auto; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--cream); color: var(--bg); padding: 8px 14px; border-radius: 8px; font-weight: 700; }
.skip:focus { left: 8px; }

/* ---------- Type ---------- */
.eyebrow { margin: 0 0 18px; color: var(--coral); font: 700 12px/1.2 var(--sans); letter-spacing: .16em; text-transform: uppercase; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; margin: 0; letter-spacing: -.02em; }
h1 { font-size: clamp(44px, 6.4vw, 84px); line-height: .98; }
.hero h1 em { display: block; }
.hero h1 { font-size: clamp(42px, 5vw, 70px); }
h1, h2, h3 { text-wrap: balance; }
h2 { font-size: clamp(34px, 4.6vw, 58px); line-height: 1.02; }
h3 { font-size: 26px; line-height: 1.12; letter-spacing: -.01em; }
h1 em, h2 em { font-style: italic; font-weight: 400; color: var(--coral); }
.lead { color: var(--text-2); font-size: clamp(18px, 1.6vw, 20px); line-height: 1.55; max-width: 34em; margin: 24px 0 0; }
p { margin: 0 0 16px; }

/* Art deco rule: two hairlines and a diamond */
.deco { display: flex; align-items: center; gap: 14px; color: var(--line-2); margin: 0 auto; width: min(320px, 70%); }
.deco::before, .deco::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--line-2)); }
.deco::after { background: linear-gradient(90deg, var(--line-2), transparent); }
.deco i { width: 8px; height: 8px; transform: rotate(45deg); border: 1px solid var(--coral); }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 40; background: rgba(14, 38, 45, .82); -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--cream); text-decoration: none; font: 600 23px/1 var(--serif); letter-spacing: -.02em; }
.brand:hover { color: var(--cream); }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a { color: var(--text-2); text-decoration: none; font-size: 15px; font-weight: 600; }
.nav a:hover { color: var(--cream); }
.nav .badge { transform: scale(.86); transform-origin: right center; }

/* ---------- App Store badge (drawn, not hotlinked) ---------- */
.badge { display: inline-flex; align-items: center; gap: 10px; height: 54px; padding: 0 20px 0 16px; border-radius: 12px; background: #000; color: #fff; text-decoration: none; border: 1px solid rgba(255, 255, 255, .28); transition: transform .2s var(--ease), border-color .2s; }
.badge:hover { color: #fff; border-color: rgba(255, 255, 255, .6); transform: translateY(-1px); }
.badge svg { width: 26px; height: 26px; flex: none; }
.badge span { display: flex; flex-direction: column; line-height: 1; font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif; }
.badge small { font-size: 11px; font-weight: 500; letter-spacing: .01em; }
.badge b { font-size: 22px; font-weight: 600; letter-spacing: -.02em; margin-top: 2px; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(56px, 8vw, 104px) 0 clamp(64px, 8vw, 112px); }
.hero::before { content: ""; position: absolute; inset: 0; background:
  radial-gradient(60rem 30rem at 85% 10%, rgba(37, 152, 238, .10), transparent 60%),
  radial-gradient(50rem 26rem at 10% 100%, rgba(240, 127, 94, .08), transparent 60%); pointer-events: none; }
.hero .wrap { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero-mark { width: 44px; margin-bottom: 28px; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 36px; }
.meta { color: var(--text-3); font-size: 14px; font-weight: 500; }
.meta b { color: var(--cream); font-weight: 600; }

.frame { position: relative; padding: 12px; border: 1px solid var(--line-2); border-radius: 26px; background: linear-gradient(160deg, rgba(246, 239, 226, .05), rgba(246, 239, 226, 0)); }
.frame::before { content: ""; position: absolute; inset: 5px; border: 1px solid var(--line); border-radius: 21px; pointer-events: none; }
.frame .corner { position: absolute; width: 10px; height: 10px; transform: rotate(45deg); background: var(--bg); border: 1px solid var(--coral); }
.frame .c1 { top: -6px; left: 50%; margin-left: -5px; }
.frame .c2 { bottom: -6px; left: 50%; margin-left: -5px; }
.hero video { width: 100%; height: auto; aspect-ratio: 1200 / 630; object-fit: cover; border-radius: 16px; background: var(--well) center / cover no-repeat; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .7); }

/* ---------- Facts strip ---------- */
.facts { border-block: 1px solid var(--line); background: var(--well); }
.facts ul { list-style: none; margin: 0 auto; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); }
.facts li { padding: 26px 20px; text-align: center; border-left: 1px solid var(--line); }
.facts li:first-child { border-left: 0; }
.facts b { display: block; font: 500 28px/1.1 var(--serif); letter-spacing: -.01em; }
.facts span { display: block; margin-top: 6px; color: var(--text-3); font-size: 14px; }

/* ---------- Sections ---------- */
section { scroll-margin-top: 80px; }
.section { padding: clamp(72px, 10vw, 136px) 0; }
.section-head { text-align: center; max-width: 760px; margin: 0 auto clamp(44px, 6vw, 72px); }
.section-head .lead { margin-left: auto; margin-right: auto; }
.section-head .deco { margin-bottom: 26px; }

/* How it plays: three rules as cards */
.rules { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.rule { position: relative; padding: 30px 28px 28px; border: 1px solid var(--line); border-radius: 20px; background: var(--lake); }
.rule .pip { display: grid; place-items: center; width: 56px; height: 76px; margin-bottom: 24px; border-radius: 8px; background: var(--cream); color: var(--bg); font: 600 22px/1 var(--serif); box-shadow: 0 10px 24px -12px rgba(0, 0, 0, .6); }
.rule .pip svg { width: 22px; height: 22px; }
.rule .pip.red { color: #B4442A; }
.rule .chip { width: 56px; height: 56px; margin: 10px 0 34px; border-radius: 50%; background: var(--t1); box-shadow: inset 0 0 0 5px rgba(255, 255, 255, .18), inset 0 0 0 9px var(--t1), inset 0 0 0 10px rgba(255, 255, 255, .55); }
.rule p { color: var(--text-2); margin: 12px 0 0; }

/* Feature rows */
.feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(36px, 7vw, 110px); align-items: center; padding: clamp(40px, 6vw, 72px) 0; }
.feature + .feature { border-top: 1px solid var(--line); }
.feature:nth-child(even) .phone-wrap { order: -1; }
.feature .copy { max-width: 470px; }
.feature:nth-child(even) .copy { justify-self: end; }
.feature p { color: var(--text-2); margin-top: 20px; }
.ticks { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 12px; }
.ticks li { position: relative; padding-left: 26px; color: var(--cream); font-size: 16px; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 8px; height: 8px; transform: rotate(45deg); background: var(--coral); }

.phone-wrap { position: relative; display: flex; justify-content: center; }
.phone-wrap::before { content: ""; position: absolute; width: 78%; aspect-ratio: 1; top: 50%; left: 50%; transform: translate(-50%, -50%); border-radius: 50%; border: 1px solid var(--line); box-shadow: 0 0 0 28px rgba(246, 239, 226, .02), 0 0 0 29px var(--line); }
.phone { position: relative; width: min(280px, 74vw); padding: 9px; border-radius: 50px; background: linear-gradient(145deg, #2a3438, #0b1114 40%, #1d2629); box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 40px 80px -30px rgba(0, 0, 0, .85); }
.phone img { width: 100%; aspect-ratio: 1206 / 2622; border-radius: 41px; background: var(--bg); }
.phone::after { content: ""; position: absolute; top: 19px; left: 50%; width: 30%; height: 24px; margin-left: -15%; border-radius: 14px; background: #000; }

/* Gallery */
.gallery { display: flex; gap: 22px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 8px max(24px, calc((100vw - var(--wrap)) / 2)) 28px; scrollbar-width: thin; scrollbar-color: var(--lake-2) transparent; }
.gallery figure { margin: 0; flex: none; scroll-snap-align: center; }
.gallery .phone { width: 230px; padding: 7px; border-radius: 38px; }
.gallery .phone img { border-radius: 31px; }
.gallery .phone::after { top: 15px; height: 18px; }
.gallery figcaption { margin-top: 16px; text-align: center; color: var(--text-3); font-size: 14px; font-weight: 600; }

/* Promise */
.promise { background: var(--well); border-block: 1px solid var(--line); }
.promise-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: 8px; }
.promise-grid div { padding: 10px 26px; border-left: 1px solid var(--line); }
.promise-grid div:first-child { border-left: 0; }
.promise-grid h3 { font-size: 22px; }
.promise-grid p { color: var(--text-2); font-size: 15px; margin-top: 10px; }

/* Final CTA */
.final { text-align: center; }
.final .app-icon { width: 112px; height: 112px; margin: 0 auto 32px; border-radius: 25px; box-shadow: 0 0 0 1px var(--line-2), 0 26px 60px -24px rgba(0, 0, 0, .8); }
.final .cta-row { justify-content: center; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 44px 0 52px; color: var(--text-3); font-size: 14px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 28px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.site-footer a { color: var(--text-2); text-decoration: none; font-weight: 600; }
.site-footer a:hover { color: var(--cream); }
.site-footer .made a { color: var(--cream); }

/* ---------- Documents (privacy, terms, support, 404) ---------- */
.doc { width: min(760px, calc(100% - 48px)); margin: 0 auto; padding: clamp(48px, 8vw, 96px) 0 clamp(64px, 9vw, 120px); }
.doc h1 { font-size: clamp(42px, 7vw, 68px); }
.doc .updated { color: var(--text-3); margin: 18px 0 40px; font-size: 15px; }
.doc h2 { font-size: 28px; line-height: 1.15; margin: 44px 0 12px; }
.doc p, .doc li { color: var(--text-2); }
.doc ul, .doc ol { padding-left: 22px; margin: 0 0 16px; }
.doc li { margin-bottom: 8px; }
.doc strong { color: var(--cream); }
.card { margin: 28px 0; padding: 26px 28px; border: 1px solid var(--line); border-radius: 20px; background: var(--lake); }
.card h2 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }
.mail { font: 500 24px/1.2 var(--serif); word-break: break-word; }
.faq details { border-top: 1px solid var(--line); padding: 18px 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font: 500 21px/1.3 var(--serif); list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--coral); font-family: var(--sans); font-weight: 600; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 12px 0 0; }
.notfound { min-height: 62vh; display: flex; flex-direction: column; justify-content: center; text-align: center; align-items: center; }
.notfound .cta-row { justify-content: center; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border-radius: 14px; background: var(--coral); color: #1a0f0b; font-weight: 700; text-decoration: none; }
.btn:hover { color: #1a0f0b; background: #F59A80; }
.btn.ghost { background: transparent; color: var(--cream); border: 1px solid var(--line-2); }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero .wrap { grid-template-columns: minmax(0, 1fr); }
  .hero-copy { text-align: center; }
  .hero-mark { margin-left: auto; margin-right: auto; }
  .lead { margin-left: auto; margin-right: auto; }
  .hero .cta-row { justify-content: center; }
  .rules { grid-template-columns: 1fr; max-width: 560px; margin: 0 auto; }
  .feature { grid-template-columns: minmax(0, 1fr); text-align: center; }
  .feature .copy, .feature:nth-child(even) .copy { justify-self: center; }
  .feature:nth-child(even) .phone-wrap { order: 0; }
  .ticks { justify-items: center; }
  .promise-grid { grid-template-columns: repeat(2, 1fr); gap: 28px 0; }
  .promise-grid div:nth-child(3) { border-left: 0; }
}
@media (max-width: 760px) {
  .nav a:not(.badge) { display: none; }
  .facts ul { grid-template-columns: repeat(2, 1fr); }
  .facts li:nth-child(3) { border-left: 0; }
  .facts li:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .wrap { width: calc(100% - 36px); }
  .site-header .wrap { height: 60px; }
  .brand { font-size: 20px; }
  .brand img { width: 30px; height: 30px; }
  .nav .badge { transform: none; height: 40px; padding: 0 12px 0 10px; border-radius: 10px; gap: 6px; }
  .nav .badge svg { width: 18px; height: 18px; }
  .nav .badge small { font-size: 8px; }
  .nav .badge b { font-size: 15px; }
  .frame { padding: 7px; border-radius: 18px; }
  .frame::before { inset: 3px; border-radius: 15px; }
  .hero video { border-radius: 12px; }
  .facts li { padding: 20px 10px; }
  .facts b { font-size: 23px; }
  .rule { padding: 26px 22px; }
  .promise-grid { grid-template-columns: 1fr; }
  .promise-grid div { border-left: 0; border-top: 1px solid var(--line); padding: 22px 4px 4px; }
  .promise-grid div:first-child { border-top: 0; padding-top: 0; }
  .site-footer .wrap { flex-direction: column; align-items: flex-start; }
  .doc { width: calc(100% - 36px); }
  .phone { width: min(260px, 66vw); }
  .hero-mark { width: 36px; margin-bottom: 20px; }
  .feature { padding: 48px 0; gap: 32px; }
  .card { padding: 22px 20px; }
}

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