/* ==========================================================================
   Panton Studio — shared styles
   Studio pages are dark. Title pages swap the tokens via .theme-* on <body>;
   the header follows the page tokens, the footer is always the studio's.
   ========================================================================== */

:root {
  --bg: #0b0b0d;
  --bg-2: #111114;
  --surface: #17171b;
  --surface-2: #202026;
  --line: #2a2a31;
  --ink: #f5f5f3;
  --ink-2: #cfcfd4;
  --muted: #8f8f98;
  --accent: #ff6b2c;
  --accent-ink: #ff8a55;
  --on-accent: #140803;

  --mark-bg: var(--ink);
  --mark-fg: var(--bg);

  --font-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-brand: var(--font-display);

  --maxw: 1200px;
  --gutter: clamp(16px, 4vw, 48px);
  --header-h: 68px;

  color-scheme: dark;
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-ink); text-underline-offset: .18em; }
h1, h2, h3, h4 { margin: 0; line-height: 1.1; }
p { margin: 0; }

.wrap { width: 100%; max-width: calc(var(--maxw) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 100; background: var(--surface); color: var(--ink); padding: 8px 14px; border-radius: 10px; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.mark { flex: none; }

/* ---------- Type ---------- */

.display {
  font-family: var(--font-display); font-stretch: 112%; font-weight: 800;
  font-size: clamp(2.75rem, 6.2vw, 5.25rem); line-height: .95; letter-spacing: -.035em;
  text-wrap: balance;
}
.h2 {
  font-family: var(--font-display); font-stretch: 108%; font-weight: 800;
  font-size: clamp(2rem, 4.4vw, 3.5rem); line-height: 1; letter-spacing: -.03em;
  text-wrap: balance;
}
.kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: .75rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: var(--accent-ink);
}
.kicker::before { content: ""; width: 22px; height: 2px; background: currentColor; }
.lede { font-size: clamp(1.0625rem, 1.5vw, 1.25rem); line-height: 1.6; color: var(--ink-2); max-width: 36em; text-wrap: pretty; }
.muted { color: var(--muted); }

.link-arrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--ink); text-decoration: none; }
.link-arrow::after { content: "→"; transition: transform .2s ease; }
.link-arrow:hover::after { transform: translateX(4px); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 50px; padding: 0 24px; border-radius: 10px;
  font-weight: 600; font-size: .9875rem; text-decoration: none; white-space: nowrap;
  background: var(--accent); color: var(--on-accent);
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-1px); background: var(--accent-ink); }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.btn.ghost:hover { box-shadow: inset 0 0 0 1px var(--ink-2); }
.btn.sm { height: 40px; padding: 0 16px; font-size: .9rem; border-radius: 9px; }

.store-buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.store-btn {
  display: inline-flex; align-items: center; gap: 9px;
  height: 52px; padding: 0 18px 0 13px; border-radius: 12px;
  background: #000; color: #fff; text-decoration: none;
  box-shadow: inset 0 0 0 1px #a6a6a6;
  transition: transform .15s ease;
}
.store-btn:hover { transform: translateY(-1px); }
.store-btn svg { width: 26px; height: 26px; flex: none; }
.store-btn span { display: flex; flex-direction: column; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
.store-btn small { font-size: 11px; line-height: 1.1; letter-spacing: .01em; }
.store-btn strong { font-size: 20px; line-height: 1.1; font-weight: 600; letter-spacing: -.015em; }
.store-btn.sm { height: 44px; padding: 0 14px 0 11px; border-radius: 10px; gap: 7px; }
.store-btn.sm svg { width: 22px; height: 22px; }
.store-btn.sm small { font-size: 9.5px; }
.store-btn.sm strong { font-size: 16.5px; }

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  /* Solid, with no backdrop blur: a blur redraws whatever scrolls under it on
     every frame, which made scrolling lag and cards flicker beneath it. */
  background: var(--bg);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 75%, transparent);
}
.site-header .wrap { position: relative; display: flex; align-items: center; gap: 24px; height: var(--header-h); }

.brand { display: inline-flex; align-items: center; gap: 12px; margin-right: auto; color: var(--ink); text-decoration: none; }
.brand .mark { width: 30px; height: 30px; }
.wordmark {
  font-family: var(--font-display); font-stretch: 125%; font-weight: 800;
  font-size: .9375rem; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap;
}
.wordmark span { font-weight: 400; color: var(--muted); margin-left: .3em; }

.nav { display: flex; gap: 2px; }
.nav a {
  padding: 8px 14px; border-radius: 8px;
  color: var(--ink-2); font-size: .9375rem; font-weight: 500; text-decoration: none; white-space: nowrap;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); background: var(--surface-2); }

.menu { display: none; }
.menu summary {
  list-style: none; cursor: pointer;
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 10px;
  box-shadow: inset 0 0 0 1px var(--line); color: var(--ink);
}
.menu summary::-webkit-details-marker { display: none; }
.menu summary svg { width: 20px; height: 20px; }
.menu[open] summary { background: var(--surface-2); }
.menu-panel {
  position: absolute; top: calc(var(--header-h) - 6px); right: var(--gutter); left: var(--gutter);
  display: flex; flex-direction: column; padding: 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 24px 48px -16px rgb(0 0 0 / .5);
}
.menu-panel a { padding: 13px 14px; border-radius: 9px; color: var(--ink); font-weight: 500; text-decoration: none; }
.menu-panel a:hover { background: var(--surface-2); }

@media (max-width: 800px) {
  .site-header .nav, .site-header .header-cta { display: none; }
  .menu { display: block; }
}

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

.section { padding: clamp(72px, 10vw, 136px) 0; }
.section.tight { padding-top: 0; }
.section-head {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px 32px;
  margin-bottom: clamp(32px, 5vw, 56px);
}
.section-head > div { display: flex; flex-direction: column; gap: 18px; max-width: 760px; }
.section-head p { color: var(--ink-2); font-size: 1.0625rem; max-width: 34em; }

/* ---------- Home: hero ---------- */

.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: min(calc(100svh - var(--header-h)), 900px);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding-top: 72px;
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, var(--bg) 0%, var(--bg) 34%, color-mix(in srgb, var(--bg) 55%, transparent) 58%, color-mix(in srgb, var(--bg) 15%, transparent) 100%),
    linear-gradient(0deg, var(--bg) 0%, transparent 38%),
    linear-gradient(180deg, var(--bg) 0%, transparent 14%);
}
.hero::after {
  content: ""; position: absolute; z-index: -3; width: 900px; height: 900px; right: -200px; top: -300px;
  background: radial-gradient(closest-side, rgb(255 107 44 / .22), transparent);
}

/* rolling wall of screenshots */
.hero-art {
  position: absolute; z-index: -2; top: -30%; bottom: -30%; left: 46%; right: -8%;
  display: flex; gap: 22px; justify-content: center;
  transform: rotate(-9deg);
}
.hero-art .col { flex: 0 0 210px; }
.hero-art .track { display: flex; flex-direction: column; gap: 22px; padding-bottom: 22px; animation: roll 70s linear infinite; }
.hero-art .col:nth-child(2) .track { animation-duration: 90s; animation-direction: reverse; }
.hero-art .col:nth-child(3) .track { animation-duration: 80s; }
.hero-art img { width: 100%; aspect-ratio: 520 / 1127; object-fit: cover; border-radius: 26px; border: 5px solid #1b1c20; }
@keyframes roll { to { transform: translateY(-50%); } }
@media (prefers-reduced-motion: reduce) { .hero-art .track { animation: none; } }
/* Off screen the wall stops (the homepage's script sets .still): its tall
   columns kept drawing new tiles, which held back every frame of scrolling. */
.hero.still .track { animation-play-state: paused; }

.hero-content { display: flex; flex-direction: column; gap: 24px; max-width: 820px; padding-bottom: clamp(40px, 5vw, 64px); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.stat { padding: 26px 24px 30px 0; }
.stat + .stat { padding-left: 24px; border-left: 1px solid var(--line); }
.stat strong { display: block; font-family: var(--font-display); font-stretch: 112%; font-weight: 800; font-size: clamp(1.625rem, 3vw, 2.25rem); letter-spacing: -.02em; line-height: 1.1; }
.stat span { color: var(--muted); font-size: .875rem; }

@media (max-width: 860px) {
  .hero { min-height: 0; padding-top: 72px; }
  .hero-art { left: -20%; right: -20%; opacity: .38; }
  .hero::before { background: linear-gradient(0deg, var(--bg) 18%, color-mix(in srgb, var(--bg) 60%, transparent) 70%, color-mix(in srgb, var(--bg) 40%, transparent)); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(3) { padding-left: 0; border-left: 0; }
  .stat:nth-child(n + 3) { border-top: 1px solid var(--line); }
}

/* ---------- Home: featured ---------- */

.featured {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  border-radius: 28px; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line);
}
@media (max-width: 900px) { .featured { grid-template-columns: 1fr; } }

.featured-art {
  position: relative; min-height: 480px; overflow: hidden;
  display: flex; justify-content: center; align-items: flex-start; gap: 18px; padding: 56px 24px 0;
}
.featured-art img {
  width: min(34%, 220px); border-radius: 30px; border: 6px solid #0d0f12;
  box-shadow: 0 30px 60px -24px rgb(0 0 0 / .5);
  transition: transform .5s cubic-bezier(.2, .8, .2, 1);
}
.featured-art img:nth-child(1) { transform: rotate(-6deg) translateY(56px); }
.featured-art img:nth-child(2) { transform: translateY(14px); z-index: 1; }
.featured-art img:nth-child(3) { transform: rotate(6deg) translateY(56px); }
.featured:hover .featured-art img:nth-child(1) { transform: rotate(-7deg) translateY(44px); }
.featured:hover .featured-art img:nth-child(3) { transform: rotate(7deg) translateY(44px); }
@media (max-width: 560px) {
  .featured-art { min-height: 360px; padding-top: 36px; }
  .featured-art img { width: 40%; }
  .featured-art img:nth-child(3) { display: none; }
}

.featured-copy { display: flex; flex-direction: column; justify-content: center; gap: 20px; padding: clamp(28px, 4.5vw, 64px); }
.featured-copy .title-id { display: flex; align-items: center; gap: 16px; }
.featured-copy .app-icon { width: 64px; height: 64px; }
.featured-copy h3 { font-family: var(--font-display); font-stretch: 108%; font-weight: 800; font-size: clamp(1.75rem, 3vw, 2.375rem); letter-spacing: -.025em; }
.featured-copy .genre { color: var(--muted); font-size: .9375rem; margin-top: 4px; }
.featured-copy > p { color: var(--ink-2); font-size: 1.0625rem; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.tags li { padding: 5px 11px; border-radius: 999px; font-size: .8125rem; font-weight: 500; color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); }

/* ---------- Home: titles ---------- */

.titles-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 28px); }
@media (max-width: 1040px) { .titles-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .titles-grid { grid-template-columns: 1fr; } }

.title-card {
  display: flex; flex-direction: column;
  border-radius: 22px; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line);
  color: inherit; text-decoration: none;
  transition: border-color .2s ease, transform .3s cubic-bezier(.2, .8, .2, 1);
}
a.title-card:hover { border-color: color-mix(in srgb, var(--ink) 30%, var(--line)); transform: translateY(-4px); }

.title-art {
  position: relative; aspect-ratio: 16 / 10; overflow: hidden;
  display: flex; justify-content: center; align-items: flex-start; gap: 16px; padding-top: 36px;
}
.title-art .shot {
  width: 32%; border-radius: 24px; border: 5px solid #0d0f12;
  box-shadow: 0 24px 48px -20px rgb(0 0 0 / .55);
  transition: transform .45s cubic-bezier(.2, .8, .2, 1);
}
.title-art .shot:first-of-type { transform: rotate(-4deg) translateY(16px); }
.title-art .shot:last-of-type { transform: rotate(4deg) translateY(30px); }
a.title-card:hover .title-art .shot:first-of-type { transform: rotate(-3deg) translateY(6px); }
a.title-card:hover .title-art .shot:last-of-type { transform: rotate(3deg) translateY(20px); }

.badge {
  position: absolute; top: 16px; left: 16px; z-index: 2;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 11px; border-radius: 999px;
  font-size: .75rem; font-weight: 600; letter-spacing: .02em; color: #fff;
  background: rgb(10 10 12 / .8);
}
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #3ddc84; }
.badge.soon::before { background: var(--accent); }
.badge.dev::before { background: #8f8f98; }

.title-meta { display: flex; align-items: center; gap: 14px; padding: 18px 20px 20px; }
.title-meta .app-icon { width: 52px; height: 52px; }
.title-meta > div:not(.app-icon) { flex: 1; min-width: 0; }
.monogram {
  display: grid; place-items: center;
  background: var(--surface-2); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line);
  font-family: var(--font-display); font-stretch: 112%; font-weight: 800; font-size: 1.125rem; letter-spacing: -.02em;
}
.title-meta h3 { font-family: var(--font-display); font-stretch: 106%; font-weight: 700; font-size: 1.25rem; letter-spacing: -.015em; }
.title-meta p { color: var(--muted); font-size: .875rem; margin-top: 3px; }
.title-meta .platforms { color: var(--muted); font-size: .8125rem; font-weight: 500; white-space: nowrap; }
.title-card .title-meta::after { content: "→"; color: var(--muted); transition: transform .2s ease, color .2s ease; }
a.title-card:hover .title-meta::after { transform: translateX(3px); color: var(--ink); }
div.title-card .title-meta::after { content: none; }
@media (max-width: 480px) { .title-meta .platforms { display: none; } }

.art-sketch {
  background-color: #f7f1e1;
  background-image:
    linear-gradient(90deg, transparent 26px, rgb(220 110 110 / .5) 26px 28px, transparent 28px),
    repeating-linear-gradient(to bottom, transparent 0 27px, rgb(120 150 200 / .3) 27px 28px);
}
.art-hydrate {
  background:
    radial-gradient(60% 70% at 20% 10%, rgb(255 255 255 / .25), transparent 60%),
    linear-gradient(160deg, #2a86ea 0%, #0b4aa6 100%);
}
.art-hollowkeep {
  background:
    radial-gradient(40% 55% at 50% 52%, rgb(232 147 90 / .35), transparent 70%),
    radial-gradient(70% 90% at 15% 100%, rgb(167 196 154 / .14), transparent 60%),
    #13211d;
}
.art-splitline {
  align-items: center; padding-top: 0;
  background:
    linear-gradient(rgb(255 255 255 / .045) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(90deg, rgb(255 255 255 / .045) 1px, transparent 1px) 0 0 / 32px 32px,
    radial-gradient(60% 70% at 50% 50%, rgb(61 220 132 / .1), transparent 70%),
    #101317;
}
.art-splitline svg { width: 70%; max-width: 360px; color: #3ddc84; }

/* A factory app's card, in its own colors (--card-bg, --card-accent), written by
   App Factory's tools/build-site.mjs between the homepage's factory:titles markers. */
.art-app {
  background:
    radial-gradient(70% 80% at 50% 0%, color-mix(in srgb, var(--card-accent) 24%, transparent), transparent 70%),
    var(--card-bg);
}
.title-art.art-app.wide { align-items: center; padding-top: 0; }
.title-art.art-app.wide .shot,
a.title-card:hover .title-art.art-app.wide .shot { width: 84%; border-radius: 18px; transform: none; }
.title-art.art-app.icon-only { align-items: center; padding-top: 0; }
.art-app.icon-only img { width: 30%; max-width: 150px; border-radius: 22.5%; box-shadow: 0 30px 70px -20px color-mix(in srgb, var(--card-accent) 45%, transparent), 0 0 0 1px rgb(255 255 255 / .06); }

/* ---------- Home: studio ---------- */

.studio-intro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px 64px; align-items: end; }
.studio-intro > div:first-child { display: flex; flex-direction: column; gap: 18px; }
.studio-intro .lede + .lede { margin-top: 16px; }
@media (max-width: 860px) { .studio-intro { grid-template-columns: 1fr; } }

.principles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: clamp(48px, 6vw, 80px); border-top: 1px solid var(--line); }
.principle { padding: 32px 32px 0 0; }
.principle + .principle { padding-left: 32px; border-left: 1px solid var(--line); }
.principle .num { font-family: var(--font-display); font-stretch: 112%; font-weight: 700; font-size: .875rem; color: var(--accent-ink); letter-spacing: .04em; }
.principle h3 { font-family: var(--font-display); font-stretch: 106%; font-weight: 700; font-size: 1.375rem; letter-spacing: -.015em; margin: 14px 0 10px; }
.principle p { color: var(--ink-2); }
@media (max-width: 860px) {
  .principles { grid-template-columns: 1fr; }
  .principle, .principle + .principle { padding: 28px 0; border-left: 0; }
  .principle + .principle { border-top: 1px solid var(--line); }
}

/* ---------- Home: contact ---------- */

.contact {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--bg-2); border-top: 1px solid var(--line);
}
.contact::before {
  content: ""; position: absolute; z-index: -1; width: 1000px; height: 700px; left: 50%; top: -360px; transform: translateX(-50%);
  background: radial-gradient(closest-side, rgb(255 107 44 / .16), transparent);
}
.contact-head { display: flex; flex-direction: column; gap: 22px; align-items: flex-start; }
.contact-email {
  font-family: var(--font-display); font-stretch: 112%; font-weight: 800;
  font-size: clamp(1.625rem, 5.6vw, 4.5rem); letter-spacing: -.035em; line-height: 1.05;
  color: var(--ink); text-decoration: none; overflow-wrap: anywhere;
  background: linear-gradient(var(--accent), var(--accent)) 0 100% / 0 3px no-repeat;
  transition: background-size .35s ease;
  padding-bottom: 6px;
}
.contact-email:hover { background-size: 100% 3px; }
.contact-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin-top: clamp(48px, 6vw, 80px); padding-top: 32px; border-top: 1px solid var(--line); }
.contact-cols h3 { font-size: 1rem; font-weight: 600; }
.contact-cols p { color: var(--muted); margin: 8px 0 14px; font-size: .9375rem; }
.contact-cols .links { display: flex; flex-direction: column; gap: 6px; }
.contact-cols a { color: var(--ink); font-weight: 500; text-decoration: none; }
.contact-cols a:hover { color: var(--accent-ink); }
.contact-cols .support-list { display: grid; grid-template-columns: repeat(2, minmax(0, max-content)); gap: 6px 20px; }
@media (max-width: 420px) { .contact-cols .support-list { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .contact-cols { grid-template-columns: 1fr; } }

/* ---------- Footer (always the studio's) ---------- */

.site-footer {
  --f-bg: #08080a; --f-ink: #f5f5f3; --f-muted: #8f8f98; --f-line: #1f1f25;
  --mark-bg: var(--f-ink); --mark-fg: var(--f-bg);
  position: relative; z-index: 1;
  background: var(--f-bg); color: var(--f-muted);
  padding: clamp(56px, 7vw, 88px) 0 32px; font-size: .9375rem;
}
.footer-top { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr)); gap: 40px; }
.footer-brand { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.footer-brand .brand { color: var(--f-ink); }
.footer-brand .wordmark span { color: var(--f-muted); }
.footer-brand p { max-width: 22em; }
.footer-brand a.email { color: var(--f-ink); font-weight: 500; text-decoration: none; }
.footer-brand a.email:hover { color: var(--accent); }
.footer-col h4 { color: var(--f-ink); font-size: .75rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 14px; }
.footer-col a { display: block; padding: 5px 0; color: var(--f-muted); text-decoration: none; }
.footer-col a:hover { color: var(--f-ink); }
.footer-note { display: block; padding-top: 10px; font-size: .8125rem; }
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 32px;
  margin-top: clamp(40px, 6vw, 72px); padding-top: 24px; border-top: 1px solid var(--f-line);
  font-size: .8125rem;
}
@media (max-width: 860px) { .footer-top { grid-template-columns: repeat(2, minmax(0, 1fr)); } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 420px) { .footer-top { grid-template-columns: 1fr; } }

/* ==========================================================================
   Inner pages (titles + press)
   ========================================================================== */

.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: .875rem; color: var(--muted); margin-bottom: 28px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); }

.app-icon { width: 72px; height: 72px; border-radius: 22.5%; flex: none; box-shadow: 0 4px 14px -4px rgb(0 0 0 / .35); }

.app-hero { position: relative; padding: clamp(32px, 5vw, 64px) 0 clamp(48px, 7vw, 96px); overflow: hidden; }
.app-hero-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(32px, 5vw, 64px); align-items: center; }
@media (max-width: 860px) { .app-hero-grid { grid-template-columns: 1fr; } }

.app-hero .app-icon { width: 108px; height: 108px; }
.app-hero h1 {
  font-family: var(--font-brand); font-size: clamp(2.75rem, 6.6vw, 4.75rem);
  line-height: 1; letter-spacing: -.035em; margin-top: 28px;
}
.app-sub { font-size: clamp(1.125rem, 2vw, 1.375rem); font-weight: 600; color: var(--accent); margin-top: 10px; }
.app-hero .lede { margin-top: 20px; }
.app-hero .store-buttons { margin-top: 30px; }
.meta { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 22px 0 0; }
.meta li { padding: 5px 12px; border-radius: 999px; font-size: .8125rem; font-weight: 600; color: var(--ink-2); background: color-mix(in srgb, var(--surface) 70%, transparent); box-shadow: inset 0 0 0 1px var(--line); }

.app-hero-visual { position: relative; display: grid; place-items: center; min-height: 420px; }

.phone {
  position: relative; z-index: 1;
  width: min(290px, 72vw); aspect-ratio: 520 / 1127;
  padding: 9px; border-radius: 46px;
  background: #0b0d10;
  box-shadow: 0 40px 80px -30px rgb(0 0 0 / .45), inset 0 0 0 1.5px #30343b;
}
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 37px; }
.phone.sm { width: clamp(200px, 58vw, 250px); padding: 7px; border-radius: 38px; box-shadow: 0 24px 48px -24px rgb(0 0 0 / .4), inset 0 0 0 1.5px #30343b; }
.phone.sm img { border-radius: 31px; }

/* Screenshot strip: centres when it fits, scrolls when it doesn't */
.gallery {
  display: flex; gap: clamp(16px, 2.4vw, 28px);
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin;
  padding: 8px max(var(--gutter), calc((100vw - var(--maxw)) / 2)) 28px;
  scroll-padding-inline: max(var(--gutter), calc((100vw - var(--maxw)) / 2));
}
.gallery > * { flex: none; scroll-snap-align: start; }
.gallery > :first-child { margin-inline-start: auto; }
.gallery > :last-child { margin-inline-end: auto; }

.app-page .section-head h2 { font-family: var(--font-brand); font-size: clamp(1.75rem, 3.6vw, 2.5rem); letter-spacing: -.02em; }

.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 2vw, 22px); }
@media (max-width: 900px) { .features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .features { grid-template-columns: 1fr; } }
.feature { padding: 26px; border-radius: 22px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.feature h3 { font-family: var(--font-brand); font-size: 1.25rem; letter-spacing: -.01em; margin: 16px 0 8px; }
.feature p { color: var(--ink-2); font-size: .975rem; }
.f-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; background: color-mix(in srgb, var(--accent-soft) 16%, transparent); color: var(--accent); }
.f-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.features-note { margin-top: 24px; color: var(--muted); text-align: center; }

.support-card {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px 48px; align-items: start;
  padding: clamp(28px, 4vw, 48px); border-radius: 28px;
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line);
}
@media (max-width: 760px) { .support-card { grid-template-columns: 1fr; } }
.support-card h2 { font-family: var(--font-brand); font-size: clamp(1.75rem, 3.4vw, 2.25rem); letter-spacing: -.02em; }
.support-card > div > p { color: var(--ink-2); margin-top: 12px; }
.support-links { list-style: none; margin: 0; padding: 0; }
.support-links li + li { border-top: 1px solid var(--line); }
.support-links a {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 14px 2px; color: var(--ink); font-weight: 550; text-decoration: none; overflow-wrap: anywhere;
}
.support-links a::after { content: "→"; color: var(--muted); transition: transform .2s ease; }
.support-links a:hover { color: var(--accent); }
.support-links a:hover::after { transform: translateX(3px); color: var(--accent); }

.more-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 640px) { .more-grid { grid-template-columns: 1fr; } }
.mini-card {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px; border-radius: 20px; text-decoration: none; color: var(--ink);
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line);
  transition: transform .2s ease;
}
.mini-card:hover { transform: translateY(-2px); }
.mini-card .app-icon { width: 52px; height: 52px; }
.mini-card div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mini-card strong { font-size: 1.0625rem; }
.mini-card span { color: var(--muted); font-size: .9375rem; }
.mini-card::after { content: "→"; color: var(--muted); }
.mini-card .mark { width: 52px; height: 52px; }

/* ---------- Theme: Hydrate+ ---------- */

.theme-hydrate {
  color-scheme: light;
  --bg: #f3f8fd;
  --surface: #ffffff;
  --surface-2: #e4effa;
  --ink: #0b2340;
  --ink-2: #2c4564;
  --muted: #5a7190;
  --line: #d4e3f2;
  --accent: #1565c0;
  --accent-ink: #0d4f9c;
  --accent-soft: #2b8cf0;
  --on-accent: #ffffff;
  --font-brand: "Nunito", ui-rounded, system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  .theme-hydrate {
    color-scheme: dark;
    --bg: #07131f;
    --surface: #0d1d2e;
    --surface-2: #13283d;
    --ink: #eaf3ff;
    --ink-2: #c3d5ea;
    --muted: #8aa2bd;
    --line: #1c3349;
    --accent: #72b6ff;
    --accent-ink: #9ccbff;
    --accent-soft: #3d9bff;
    --on-accent: #04121f;
  }
}
.theme-hydrate .app-hero h1, .theme-hydrate h2, .theme-hydrate h3 { font-weight: 800; }
.theme-hydrate .app-hero {
  background:
    radial-gradient(900px 520px at 85% 0%, color-mix(in srgb, var(--accent-soft) 26%, transparent), transparent 65%),
    linear-gradient(180deg, color-mix(in srgb, var(--accent-soft) 10%, var(--bg)), var(--bg));
}
.theme-hydrate .app-hero-visual::before {
  content: ""; position: absolute; width: min(420px, 92%); aspect-ratio: 1; border-radius: 50%;
  background:
    radial-gradient(circle at 32% 28%, rgb(255 255 255 / .55), transparent 28%),
    radial-gradient(circle at 50% 55%, #3fa2ff, #0f5fbf 70%);
  opacity: .9;
}
.theme-hydrate .wave { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 70px; color: var(--bg); }

/* ---------- Theme: Sketchbook Runner ---------- */

.theme-sketch {
  color-scheme: light;
  --bg: #f7f1e1;
  --surface: #fffcf3;
  --surface-2: #efe6cf;
  --ink: #1d2333;
  --ink-2: #3a4256;
  --muted: #6c6a62;
  --line: #ddd2b8;
  --accent: #2a55c4;
  --accent-ink: #1f44a3;
  --accent-soft: #f0a33a;
  --on-accent: #ffffff;
  --font-brand: "Patrick Hand", "Comic Sans MS", cursive;
  background-color: var(--bg);
  background-image: repeating-linear-gradient(to bottom, transparent 0 31px, rgb(120 150 200 / .24) 31px 32px);
}
.theme-sketch::before {
  content: ""; position: fixed; top: 0; bottom: 0; width: 2px;
  left: max(calc(var(--gutter) / 2 - 1px), calc((100vw - var(--maxw)) / 2 - 28px));
  background: rgb(220 110 110 / .5); pointer-events: none; z-index: 0;
}
.theme-sketch main { position: relative; z-index: 1; }
.theme-sketch h1, .theme-sketch h2, .theme-sketch h3 { font-weight: 400; letter-spacing: 0; }
.theme-sketch .app-hero h1 { font-size: clamp(3rem, 7.4vw, 5.25rem); }
.theme-sketch .app-hero h1 span, .theme-sketch.app-page .section-head h2 {
  text-decoration: underline; text-decoration-color: var(--accent-soft);
  text-decoration-thickness: 4px; text-underline-offset: 8px;
}
.theme-sketch.app-page .section-head h2 { font-size: clamp(2.25rem, 4.6vw, 3rem); letter-spacing: 0; }
.theme-sketch .app-sub { font-family: var(--font-brand); font-weight: 400; font-size: clamp(1.375rem, 2.6vw, 1.75rem); }
.theme-sketch .app-icon { box-shadow: 0 0 0 1.5px rgb(29 35 51 / .14), 0 4px 14px -4px rgb(0 0 0 / .25); }
.theme-sketch .ink-line { position: absolute; left: -6%; right: -6%; bottom: 16%; width: 112%; height: auto; z-index: 0; color: var(--accent); }

.theme-sketch .feature, .theme-sketch .support-card, .theme-sketch .mini-card {
  background: var(--surface);
  box-shadow: 2px 3px 0 rgb(29 35 51 / .12);
  border: 2px solid var(--ink);
  border-radius: 255px 18px 225px 18px / 18px 225px 18px 255px;
}
.theme-sketch .feature { padding: 28px 26px; }
.theme-sketch .feature:nth-child(odd) { transform: rotate(-.6deg); }
.theme-sketch .feature:nth-child(even) { transform: rotate(.5deg); }
.theme-sketch .feature h3 { font-size: 1.75rem; margin-top: 4px; }
.theme-sketch .f-num { font-family: var(--font-brand); color: var(--accent); font-size: 1.125rem; }
.theme-sketch .support-card h2 { font-size: clamp(2rem, 4vw, 2.5rem); }
.theme-sketch .meta li { background: var(--surface); }

.toc {
  padding: clamp(28px, 4vw, 48px) clamp(24px, 4vw, 56px);
  background: var(--surface); border: 2px solid var(--ink);
  border-radius: 18px 225px 18px 255px / 255px 18px 225px 18px;
  box-shadow: 3px 4px 0 rgb(29 35 51 / .12);
}
.toc h2 { font-family: var(--font-brand); font-size: clamp(2.25rem, 4.6vw, 3rem); text-decoration: underline; text-decoration-color: var(--accent-soft); text-decoration-thickness: 4px; text-underline-offset: 8px; }
.toc > p { color: var(--ink-2); margin-top: 12px; }
.toc ol { list-style: none; margin: 28px 0 0; padding: 0; columns: 2 320px; column-gap: 56px; counter-reset: ch; }
.toc li { break-inside: avoid; counter-increment: ch; display: grid; grid-template-columns: 44px 1fr; padding: 10px 0; border-bottom: 1.5px dashed var(--line); }
.toc li::before { content: counter(ch, decimal-leading-zero); font-family: var(--font-brand); color: var(--accent); font-size: 1.25rem; line-height: 1.5; }
.toc strong { font-family: var(--font-brand); font-weight: 400; font-size: 1.375rem; line-height: 1.35; display: block; }
.toc span { color: var(--muted); font-size: .9375rem; }

/* ---------- Factory apps' pages ----------
   App Factory's tools/build-site.mjs writes each one: the app's brand.json colors
   as the tokens above (.theme-app, in the page's own <style>), its corner radius
   as --app-radius, and look-* / buttons-* from its "look". */

.factory .section { padding: clamp(40px, 6vw, 80px) 0; }
.factory .section.more { padding-top: 0; }
.factory .app-hero h1 { letter-spacing: -.02em; }
.factory .app-icon.big { width: min(240px, 56vw); height: auto; }
.soon-note { margin-top: 30px; font-weight: 600; color: var(--accent-ink); }

.phone.wide { width: min(560px, 88vw); padding: 8px; border-radius: 30px; }
.app-hero-visual .phone.wide { width: min(100%, 560px); }
.app-hero-visual:has(.phone.wide) { min-height: 0; }
.phone.wide img { border-radius: 23px; }
.phone.sm.wide { width: clamp(300px, 80vw, 480px); border-radius: 26px; }
.phone.sm.wide img { border-radius: 19px; }
.factory .gallery figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.factory .gallery figcaption { max-width: 250px; color: var(--muted); font-size: .9375rem; line-height: 1.45; text-align: center; }
.factory .gallery figure:has(.wide) figcaption { max-width: 420px; }

.factory .feature { border-radius: calc(var(--app-radius) * 1.5); }
.factory .feature h3 { font-family: var(--font-body); font-size: .75rem; font-weight: 650; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-ink); margin: 0 0 12px; }
.factory .feature p, .factory .feature li { color: var(--ink-2); font-size: .975rem; }
.factory .feature ul { margin: 0; padding-left: 1.1em; }
.factory .feature li + li { margin-top: 6px; }
.factory .features-note { margin-top: 12px; }
.factory .features + .features-note { margin-top: 28px; }
.factory .support-card { border-radius: calc(var(--app-radius) * 2); }
.factory .support-card > div > p + p { margin-top: 10px; }
.factory .mini-card { border-radius: calc(var(--app-radius) * 1.4); }

.look-outlined .feature, .look-outlined .support-card, .look-outlined .mini-card { background: transparent; }
.look-plain .feature { background: transparent; box-shadow: none; border-radius: 0; padding: 22px 0 0; border-top: 1px solid var(--line); }
.buttons-pill .store-btn { border-radius: 999px; padding: 0 22px 0 16px; }

.policy-page .crumbs { margin-bottom: 36px; }
.policy { max-width: 720px; }
.policy h1 { font-family: var(--font-brand); font-size: clamp(2.25rem, 5vw, 3.25rem); letter-spacing: -.02em; margin-bottom: 18px; }
.prose.policy h2 { font-family: var(--font-body); font-stretch: normal; font-weight: 650; font-size: 1.1875rem; letter-spacing: 0; margin: 36px 0 10px; }
.policy ul { color: var(--ink-2); padding-left: 1.2em; margin: 14px 0 0; }
.policy li + li { margin-top: 6px; }

/* ---------- Press kit ---------- */

.page-hero { padding: clamp(40px, 6vw, 80px) 0 clamp(48px, 6vw, 72px); border-bottom: 1px solid var(--line); }
.page-hero .wrap > div { display: flex; flex-direction: column; gap: 22px; align-items: flex-start; max-width: 820px; }

.press-grid { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
@media (max-width: 860px) { .press-grid { grid-template-columns: 1fr; } }

.factsheet { position: sticky; top: calc(var(--header-h) + 24px); padding: 26px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); }
@media (max-width: 860px) { .factsheet { position: static; } }
.factsheet h2 { font-size: .75rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.facts { margin: 0; }
.facts div { padding: 12px 0; border-bottom: 1px solid var(--line); }
.facts div:last-child { border-bottom: 0; padding-bottom: 0; }
.facts dt { font-size: .8125rem; color: var(--muted); }
.facts dd { margin: 2px 0 0; color: var(--ink); font-weight: 500; }
.facts a { color: var(--ink); }
.title-list > span { display: block; }

.prose h2 { font-family: var(--font-display); font-stretch: 108%; font-weight: 800; font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -.02em; margin-bottom: 16px; }
.prose h3 { font-size: 1.0625rem; font-weight: 600; margin: 40px 0 14px; }
.prose p { color: var(--ink-2); }
.prose p + p { margin-top: 14px; }

.logo-row { display: flex; flex-wrap: wrap; gap: 14px; }
.logo-tile { display: flex; flex-direction: column; gap: 10px; width: 180px; }
.logo-tile .swatch { display: grid; place-items: center; aspect-ratio: 4 / 3; border-radius: 14px; border: 1px solid var(--line); }
.logo-tile .swatch img { width: 72px; }
.logo-tile .swatch.on-light { background: #f5f5f3; }
.logo-tile .swatch.on-dark { background: #000; }
.dl { display: flex; gap: 12px; font-size: .875rem; }
.dl a { color: var(--ink-2); text-decoration: none; font-weight: 500; }
.dl a:hover { color: var(--accent-ink); }

.kit { padding-top: clamp(48px, 6vw, 72px); margin-top: clamp(48px, 6vw, 72px); border-top: 1px solid var(--line); }
.kit-head { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 20px; margin-bottom: 28px; }
.kit-head .app-icon { width: 72px; height: 72px; }
.kit-head > div:not(.kit-links) { flex: 1; min-width: 200px; }
.kit-head h2 { margin: 0; }
.kit-head p { color: var(--muted); margin-top: 6px; }
.kit-links { display: flex; flex-wrap: wrap; gap: 8px; }

.kit-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 0 0 28px; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.kit-facts div { padding: 14px 16px; }
.kit-facts div + div { border-left: 1px solid var(--line); }
.kit-facts dt { font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.kit-facts dd { margin: 4px 0 0; font-weight: 600; }
@media (max-width: 640px) {
  .kit-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kit-facts div:nth-child(3) { border-left: 0; }
  .kit-facts div:nth-child(n + 3) { border-top: 1px solid var(--line); }
}
.kit ul { color: var(--ink-2); padding-left: 1.2em; margin: 14px 0 0; }
.kit li + li { margin-top: 6px; }

.asset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 12px; }
.asset-grid a { display: block; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); transition: border-color .2s ease, transform .2s ease; }
.asset-grid a:hover { border-color: var(--ink-2); transform: translateY(-2px); }
.asset-grid img { width: 100%; aspect-ratio: 520 / 1127; object-fit: cover; }
.asset-grid a.icon-asset img { aspect-ratio: 1; }

/* ---------- 404 ---------- */

.not-found { min-height: 64vh; display: grid; place-items: center; text-align: center; padding: 64px 0; }
.not-found > div { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.not-found p { color: var(--muted); font-size: 1.125rem; margin-bottom: 10px; }
