/* StackJack — stackjack.app
   One stylesheet, no inline styles (the host CSP is style-src 'self').
   Palette follows the app: deep teal table, warm cream cards, coral, mustard and mint. */

@font-face {
  font-family: "Nunito";
  src: url("../fonts/nunito-latin.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Nunito";
  src: url("../fonts/nunito-latin-ext.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --deep: #082b35;
  --deeper: #061f27;
  --teal: #0f4c5c;
  --teal-2: #13606f;
  --cream: #f4ebd9;
  --paper: #fdf8ee;
  --sand: #ead9b8;
  --coral: #e8704a;
  --coral-deep: #c9542f;
  --mustard: #e9b44c;
  --mint: #8fd3c1;
  --ink: #1b1b1e;
  --muted: rgba(244, 235, 217, 0.78);
  --line: rgba(244, 235, 217, 0.16);
  --radius: 22px;
  --radius-lg: 32px;
  --shadow: 0 18px 50px rgba(2, 16, 21, 0.45);
  --wrap: 1160px;
  --font: "Nunito", ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body {
  margin: 0;
  background: var(--deep);
  color: var(--cream);
  font: 500 1.0625rem/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--mustard); text-underline-offset: 3px; }
a:hover { color: #f4c76a; }
:focus-visible { outline: 3px solid var(--mint); outline-offset: 3px; border-radius: 8px; }
h1, h2, h3 { font-weight: 900; line-height: 1.08; letter-spacing: -0.02em; margin: 0 0 0.5em; }
h2 { font-size: clamp(2rem, 4.4vw, 3.1rem); }
h3 { font-size: 1.3rem; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--mustard); color: var(--ink); padding: 10px 16px; border-radius: 12px; font-weight: 800; z-index: 100; }
.skip:focus { top: 12px; }
.eyebrow { display: inline-block; font-size: 0.8rem; font-weight: 900; letter-spacing: 0.16em; text-transform: uppercase; color: var(--mustard); margin-bottom: 14px; }
.lede { font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--muted); max-width: 40em; }
.center { text-align: center; }
.center .lede { margin-left: auto; margin-right: auto; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(6, 31, 39, 0.86);
  -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; gap: 18px; min-height: 68px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--cream); text-decoration: none; font-weight: 900; font-size: 1.35rem; letter-spacing: -0.02em; }
.logo img { width: 38px; height: 38px; border-radius: 10px; box-shadow: 0 4px 12px rgba(0,0,0,.35); }
.logo span { white-space: nowrap; }
.logo b { color: var(--mustard); font-weight: 900; }
.logo:hover { color: var(--cream); }
.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav a { color: var(--cream); text-decoration: none; font-weight: 700; font-size: 0.98rem; padding: 8px 12px; border-radius: 999px; }
.nav a:hover { background: rgba(244,235,217,.08); color: var(--cream); }
.nav .btn { margin-left: 8px; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--line); color: var(--cream); border-radius: 12px; padding: 8px 12px; font: inherit; font-weight: 800; cursor: pointer; }
@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 68px; flex-direction: column; align-items: stretch; padding: 12px 20px 20px; background: var(--deeper); border-bottom: 1px solid var(--line); }
  .nav.open { display: flex; }
  .nav a { padding: 12px 14px; }
  .nav .btn { margin: 8px 0 0; text-align: center; justify-content: center; }
}

/* ---------- buttons, badges ---------- */
.btn { display: inline-flex; align-items: center; gap: 10px; border-radius: 999px; padding: 13px 24px; font-weight: 900; font-size: 1.02rem; text-decoration: none; border: 0; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-mustard { background: var(--mustard); color: var(--ink); box-shadow: 0 6px 0 #b98622, 0 10px 24px rgba(0,0,0,.25); }
.btn-mustard:hover { color: var(--ink); }
.btn-coral { background: var(--coral); color: var(--ink); box-shadow: 0 6px 0 var(--coral-deep), 0 10px 24px rgba(0,0,0,.25); }
.btn-coral:hover { color: var(--ink); }
.btn-ghost { background: transparent; color: inherit; border: 2px solid currentColor; padding: 11px 22px; }
.btn-small { padding: 9px 18px; font-size: 0.95rem; }
.btn-small.btn-mustard { box-shadow: 0 4px 0 #b98622; }
.badges { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.badges a { display: inline-block; border-radius: 10px; }
.badges img { height: 54px; width: auto; }
.soon { display: inline-flex; align-items: center; gap: 10px; background: var(--deep); color: var(--cream); border-radius: 999px; padding: 10px 18px 10px 12px; font-weight: 800; }
.soon .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 4px rgba(143,211,193,.25); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 9px rgba(143,211,193,0); } }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 26px; }
.fine { font-size: 0.88rem; opacity: 0.8; margin-top: 14px; }

/* ---------- hero ---------- */
.hero { position: relative; background: #f1e3c8; color: var(--ink); overflow: hidden; }
.hero-art { position: absolute; inset: 0; }
.hero-art img { width: 100%; height: 100%; object-fit: cover; object-position: 18% center; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(241,227,200,.97) 0%, rgba(241,227,200,.9) 36%, rgba(241,227,200,0) 50%); pointer-events: none; }
.hero .wrap { position: relative; z-index: 1; min-height: min(80vh, 680px); display: flex; align-items: center; padding-top: 64px; padding-bottom: 64px; }
.hero-copy { max-width: 520px; }
.hero h1 { font-size: clamp(2.5rem, 4.6vw, 3.75rem); margin-bottom: 18px; }
.hero h1 .wordmark { display: block; font-size: 0.5em; letter-spacing: -0.01em; margin-bottom: 10px; color: var(--teal); }
.hero h1 .wordmark b { color: var(--coral-deep); }
.hero .lede { color: #3b3a36; }
.hero .eyebrow { color: var(--coral-deep); }
.hero .btn-ghost { color: var(--teal); }
.hero .fine { color: #4a463f; opacity: 1; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; padding: 0; list-style: none; }
.chips li { background: rgba(15,76,92,.1); color: var(--teal); border-radius: 999px; padding: 6px 12px; font-weight: 800; font-size: 0.86rem; }
@media (max-width: 860px) {
  .hero-art img { object-position: 70% center; }
  .hero::after { background: linear-gradient(180deg, rgba(241,227,200,0) 0, rgba(241,227,200,0) calc(max(46vw, 240px) - 60px), #f1e3c8 max(46vw, 240px)); }
  .hero-art { bottom: auto; height: 46vw; min-height: 240px; }
  .hero .wrap { min-height: 0; padding-top: calc(max(46vw, 240px) + 18px); padding-bottom: 48px; }
}

/* ---------- sections ---------- */
.section { padding: clamp(64px, 9vw, 120px) 0; position: relative; }
.section.alt { background: var(--deeper); }
.section.teal { background: radial-gradient(1200px 500px at 85% 0%, rgba(143,211,193,.10), transparent 60%), var(--teal); }
.section.paper { background: var(--paper); color: var(--ink); }
.section.paper .lede { color: #4a463f; }
.section.paper .eyebrow { color: var(--coral-deep); }
.starfield { background-image:
  radial-gradient(2px 2px at 12% 18%, rgba(244,235,217,.5), transparent 60%),
  radial-gradient(1.5px 1.5px at 72% 34%, rgba(244,235,217,.45), transparent 60%),
  radial-gradient(2px 2px at 40% 80%, rgba(244,235,217,.35), transparent 60%),
  radial-gradient(1.5px 1.5px at 88% 72%, rgba(244,235,217,.4), transparent 60%),
  radial-gradient(1.5px 1.5px at 24% 58%, rgba(244,235,217,.3), transparent 60%); }
.head { margin-bottom: clamp(32px, 5vw, 56px); }
.split { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(28px, 5vw, 72px); align-items: center; }
.split.reverse { grid-template-columns: 1.15fr 1fr; }
.split.reverse > :first-child { order: 2; }
@media (max-width: 900px) { .split, .split.reverse { grid-template-columns: 1fr; } .split.reverse > :first-child { order: 0; } }

/* steps */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; counter-reset: step; }
.steps li { display: grid; grid-template-columns: 52px 1fr; gap: 16px; align-items: start; }
.steps li::before { counter-increment: step; content: counter(step); width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--mustard); color: var(--ink); font-weight: 900; font-size: 1.5rem; box-shadow: 0 5px 0 #b98622; }
.steps h3 { margin: 4px 0 4px; }
.steps p { margin: 0; color: var(--muted); }
.callout { margin-top: 26px; border: 1px dashed rgba(233,180,76,.55); border-radius: var(--radius); padding: 16px 18px; color: var(--muted); }
.callout strong { color: var(--mustard); }

/* device frames */
.device { position: relative; margin: 0; }
.device img { border-radius: 14px; }
.device .frame { display: block; }
.phone-land { background: #0b0f12; padding: 12px; border-radius: 34px; box-shadow: var(--shadow), inset 0 0 0 2px #2a3236; }
.phone-land img { border-radius: 24px; }
.tablet { background: #0b0f12; padding: 14px; border-radius: 30px; box-shadow: var(--shadow), inset 0 0 0 2px #2a3236; max-width: 440px; margin: 0 auto; }
.device-tablet { max-width: 440px; margin: 0 auto; }
.tablet img { border-radius: 18px; }
.macwin img { border-radius: 12px; box-shadow: var(--shadow); }
.device figcaption { text-align: center; color: var(--muted); font-weight: 700; font-size: 0.92rem; margin-top: 14px; }
.tilt-l { transform: rotate(-1.5deg); }
.tilt-r { transform: rotate(1.2deg); }
@media (max-width: 900px) { .tilt-l, .tilt-r { transform: none; } }

/* cards grid */
.grid { display: grid; gap: 18px; grid-template-columns: repeat(3, 1fr); }
@media (max-width: 960px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid { grid-template-columns: 1fr; } }
.card { background: rgba(244,235,217,.05); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 6px; }
.card .emblem { width: 72px; height: 72px; border-radius: 18px; margin-bottom: 10px; box-shadow: 0 8px 20px rgba(0,0,0,.3); }
.card h3 { color: var(--mustard); margin: 0; }
.card p { color: var(--muted); margin: 0; }
.card .tag { align-self: flex-start; margin-top: auto; padding-top: 12px; font-size: 0.8rem; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; color: var(--mint); }

/* gadgets */
.gadgets { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.gadgets li { display: grid; grid-template-columns: 64px 1fr; gap: 14px; align-items: center; background: rgba(6,31,39,.45); border: 1px solid var(--line); border-radius: 18px; padding: 12px 14px; }
.gadgets img { width: 64px; height: 64px; border-radius: 14px; }
.gadgets strong { display: block; font-weight: 900; }
.gadgets span { display: block; color: var(--muted); font-size: 0.92rem; line-height: 1.4; }

/* checklist */
.checks { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 12px; }
.checks li { position: relative; padding-left: 36px; }
.checks li::before { content: ""; position: absolute; left: 0; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--mint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%23082b35' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat; }
.section.paper .checks li::before { background-color: var(--teal); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%23f4ebd9' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }

/* gallery */
.gallery { display: grid; grid-auto-flow: column; grid-auto-columns: min(78%, 620px); gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 6px 20px 26px; margin: 0 -20px; scrollbar-color: var(--teal-2) transparent; }
.gallery figure { scroll-snap-align: center; margin: 0; }
.gallery img { border-radius: 18px; border: 1px solid var(--line); box-shadow: var(--shadow); }
.gallery figcaption { color: var(--muted); font-weight: 700; font-size: 0.92rem; margin-top: 10px; text-align: center; }

/* screens trio */
.trio { display: grid; grid-template-columns: 1.35fr 0.8fr 1fr; gap: 26px; align-items: end; }
@media (max-width: 900px) { .trio { grid-template-columns: 1fr; } }

/* pricing */
.plans { display: grid; gap: 18px; grid-template-columns: repeat(3, 1fr); align-items: stretch; }
@media (max-width: 900px) { .plans { grid-template-columns: 1fr; } }
.plan { background: #fff; color: var(--ink); border-radius: var(--radius-lg); padding: 28px; border: 2px solid var(--sand); display: flex; flex-direction: column; }
.plan.featured { border-color: var(--mustard); box-shadow: 0 0 0 4px rgba(233,180,76,.25), 0 20px 50px rgba(8,43,53,.18); }
.plan h3 { margin: 0 0 4px; }
.plan .price { font-size: 2.4rem; font-weight: 900; letter-spacing: -0.02em; margin: 6px 0 2px; color: var(--teal); }
.plan .price small { font-size: 1rem; font-weight: 800; color: #6b655a; letter-spacing: 0; }
.plan ul { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 10px; }
.plan li { padding-left: 28px; position: relative; }
.plan li::before { content: "★"; position: absolute; left: 0; color: var(--coral); }
.plan .ribbon { align-self: flex-start; background: var(--mustard); color: var(--ink); font-weight: 900; font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; border-radius: 999px; padding: 4px 10px; margin-bottom: 10px; }

/* heritage */
.heritage { display: grid; grid-template-columns: 0.55fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.heritage .phone-tall { background: #0b0f12; padding: 10px; border-radius: 38px; max-width: 280px; box-shadow: var(--shadow), inset 0 0 0 2px #2a3236; transform: rotate(-3deg); }
.heritage .phone-tall img { border-radius: 30px; }
@media (max-width: 760px) { .heritage { grid-template-columns: 1fr; } .heritage .phone-tall { margin: 0 auto; } }

/* faces strip */
.faces { display: flex; justify-content: center; gap: 0; margin: 0 auto 30px; }
.faces img { width: 110px; border-radius: 12px; box-shadow: 0 12px 26px rgba(0,0,0,.35); border: 4px solid var(--paper); }
.faces img:nth-child(1) { transform: rotate(-10deg) translateY(10px); margin-right: -26px; }
.faces img:nth-child(3) { transform: rotate(10deg) translateY(10px); margin-left: -26px; }
.faces img:nth-child(2) { position: relative; z-index: 1; }

/* FAQ */
.faq { display: grid; gap: 12px; max-width: 860px; margin: 0 auto; }
.faq details { background: rgba(244,235,217,.05); border: 1px solid var(--line); border-radius: 18px; padding: 4px 20px; }
.faq summary { cursor: pointer; font-weight: 900; font-size: 1.08rem; padding: 14px 0; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--mustard); font-size: 1.4rem; line-height: 1; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); }

/* final band */
.band { background: var(--coral); color: var(--ink); text-align: center; }
.band h2 { margin-bottom: 10px; }
.band .lede { color: #3a1f15; margin-left: auto; margin-right: auto; }
.band .cta-row { justify-content: center; }
.band .soon { background: var(--ink); }
.band .btn-ghost { color: var(--ink); }

/* footer */
.site-footer { background: var(--deeper); border-top: 1px solid var(--line); padding: 56px 0 40px; font-size: 0.95rem; }
.lost-island { display: flex; gap: 18px; align-items: center; background: rgba(244,235,217,.05); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 36px; }
.lost-island img { width: 54px; height: 54px; flex: none; }
.lost-island p { margin: 0; color: var(--muted); }
.lost-island strong { color: var(--cream); }
.lost-island .btn { margin-left: auto; flex: none; }
@media (max-width: 700px) { .lost-island { flex-wrap: wrap; } .lost-island .btn { margin-left: 0; } }
.foot-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 28px; }
@media (max-width: 800px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
.foot-grid h4 { margin: 0 0 10px; font-size: 0.82rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--mustard); }
.foot-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.foot-grid a { color: var(--cream); text-decoration: none; }
.foot-grid a:hover { color: var(--mustard); text-decoration: underline; }
.legal-line { margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--line); color: rgba(244,235,217,.6); font-size: 0.82rem; }
.legal-line p { margin: 0 0 6px; }
.lang a[aria-current="page"] { color: var(--mustard); font-weight: 900; }

/* ---------- document pages (legal, support, press) ---------- */
.doc-hero { background: var(--teal); padding: 56px 0 40px; }
.doc-hero h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); margin: 0 0 8px; }
.doc-hero p { color: var(--muted); margin: 0; }
.doc-wrap { max-width: 900px; margin: 0 auto; padding: 0 20px; }
.doc { background: var(--paper); color: var(--ink); border-radius: var(--radius-lg); padding: clamp(24px, 5vw, 56px); margin: -24px auto 64px; position: relative; box-shadow: var(--shadow); font-size: 1.02rem; }
.doc h2 { font-size: 1.55rem; margin: 2em 0 0.6em; color: var(--teal); }
.doc h2:first-child { margin-top: 0; }
.doc h3 { font-size: 1.15rem; margin: 1.6em 0 0.5em; }
.doc a { color: var(--coral-deep); }
.doc ul, .doc ol { padding-left: 1.3em; }
.doc li { margin-bottom: 0.4em; }
.doc table { width: 100%; border-collapse: collapse; margin: 1em 0 1.4em; font-size: 0.95rem; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid #e4d7bd; }
.doc th { background: #f4ead6; font-weight: 900; }
.doc .table-scroll { overflow-x: auto; }
.doc .note { background: #fbefd5; border-left: 5px solid var(--mustard); border-radius: 12px; padding: 14px 16px; margin: 0 0 1.6em; }
.doc .summary { background: #e8f3ef; border-left: 5px solid var(--teal); border-radius: 12px; padding: 16px 18px; margin: 0 0 1.6em; }
.doc .toc { columns: 2; column-gap: 32px; padding-left: 1.2em; }
@media (max-width: 640px) { .doc .toc { columns: 1; } }
.doc dl dt { font-weight: 900; margin-top: 1em; }
.doc dl dd { margin: 0.2em 0 0; }
.doc .muted { color: #6b655a; font-size: 0.92rem; }
.press-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); margin: 1em 0; }
.press-grid a { display: block; border-radius: 14px; overflow: hidden; border: 1px solid #e4d7bd; background: #fff; text-decoration: none; color: var(--ink); font-weight: 800; font-size: 0.9rem; }
.press-grid img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.press-grid span { display: block; padding: 8px 10px; }
.kbd { display: inline-block; min-width: 1.8em; text-align: center; padding: 1px 7px; border-radius: 7px; border: 1px solid #cdbf9f; background: #fff; font-weight: 900; font-size: 0.9em; }

/* 404 */
.notfound { min-height: 60vh; display: grid; place-items: center; text-align: center; padding: 80px 20px; }
.notfound .big { font-size: clamp(5rem, 16vw, 9rem); font-weight: 900; color: var(--mustard); line-height: 1; }

@media print {
  .site-header, .site-footer, .doc-hero { display: none; }
  body { background: #fff; color: #000; }
  .doc { box-shadow: none; margin: 0; }
}
