/* Inter Variable Font */
@font-face {
  font-family: 'Inter Variable';
  src: url('/static/fonts/InterVariable.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter Variable';
  src: url('/static/fonts/InterVariable-Italic.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

/* Geist Mono Font */
@font-face {
  font-family: 'Geist Mono';
  src: url('/static/fonts/GeistMono-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ZALIZE — Linear.app design system replica. Single source of truth.
   Tokens per docs/linear-design-spec.md (values measured on linear.app). */

/* ---------- Tokens ---------- */
:root {
  --font-regular: "Inter Variable", "SF Pro Display", -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --page-max-width: 1024px;
  --page-padding-inline: 24px;
  --header-height: 72px;

  --radius-8: 8px;
  --radius-10: 10px;
  --radius-12: 12px;
  --radius-16: 16px;
  --rounded-full: 9999px;

  --weight-medium: 510;
  --weight-title: 538;

  /* Typography scale (docs/typography-tokens.md) */
  --text-hero: 64px;        /* home hero h1 — line-height 1 */
  --text-page-hero: 56px;   /* inner page h1 — line-height 1.1 */
  --text-title: 40px;       /* section titles, stat values — line-height 1.1 */
  --text-statement: 28px;   /* statement / pull-quote — line-height 1.35 */
  --text-lead: 17px;        /* article/letter body, hero-sub — line-height 1.7 */
  --text-body: 15px;        /* default body copy — line-height 1.6 */
  --text-small: 13px;       /* captions, notes, meta — line-height 1.5 */
  --text-fig: 11px;         /* mono figure labels — tracking 0.08em */
  --tracking-tight: -0.022em;

  --speed-quick: 0.15s ease;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);

  /* Honest Precision v2 — light (default) */
  color-scheme: light;
  --color-bg-primary: #ffffff;
  --color-bg-secondary: #f5f6f8;
  --color-bg-tertiary: #eef0f2;
  --color-bg-quaternary: #e4e6ea;
  --color-bg-translucent: rgba(23, 24, 28, 0.03);
  --color-bg-translucent-hover: rgba(23, 24, 28, 0.05);
  --color-text-primary: #17181c;
  --color-text-secondary: #3f454f;
  --color-text-tertiary: #5b616b;
  --color-text-quaternary: #6b7079;
  --color-border-primary: #e4e6ea;
  --color-border-secondary: #d5d8dd;
  --color-border-translucent: rgba(23, 24, 28, 0.06);
  --color-header-border: rgba(23, 24, 28, 0.08);
  --color-btn-bg: #17181c;
  --color-btn-text: #ffffff;
  --color-brand-bg: #17181c;
  --color-accent: #17181c;
  --color-link-primary: #17181c;
  --color-panel: #ffffff;
  --shadow-dropdown: 0 16px 40px rgba(23, 24, 28, 0.14);
}

::selection { background: rgba(23, 24, 28, 0.12); }
html.dark ::selection { background: rgba(255, 255, 255, 0.18); }

html.dark {
  color-scheme: dark;
  --color-bg-primary: #101114;
  --color-bg-secondary: #17181c;
  --color-bg-tertiary: #1c1e23;
  --color-bg-quaternary: #26282e;
  --color-bg-translucent: rgba(255, 255, 255, 0.05);
  --color-bg-translucent-hover: rgba(255, 255, 255, 0.08);
  --color-text-primary: #f5f6f8;
  --color-text-secondary: #c9cdd4;
  --color-text-tertiary: #a6abb4;
  --color-text-quaternary: #8a919c;
  --color-border-primary: #26282e;
  --color-border-secondary: #34363d;
  --color-border-translucent: rgba(255, 255, 255, 0.06);
  --color-header-border: rgba(255, 255, 255, 0.08);
  --color-btn-bg: #f5f6f8;
  --color-btn-text: #101114;
  --color-brand-bg: #f5f6f8;
  --color-accent: #f5f6f8;
  --color-link-primary: #f5f6f8;
  --color-panel: #17181c;
  --shadow-dropdown: 0 16px 40px rgba(0, 0, 0, 0.4);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--color-bg-primary);
  color: var(--color-text-primary);
  font: 400 15px/1.6 var(--font-regular);
  font-feature-settings: "cv01", "ss03";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4, p, ul, ol { margin: 0; }

.container {
  max-width: calc(var(--page-max-width) + 2 * var(--page-padding-inline));
  margin: 0 auto;
  padding-inline: var(--page-padding-inline);
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-height);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: color-mix(in srgb, var(--color-bg-primary) 60%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color var(--speed-quick);
}
.site-header.scrolled { border-bottom-color: var(--color-header-border); }
.header-inner {
  display: flex;
  align-items: center;
  height: 100%;
  gap: 8px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: var(--weight-medium);
  letter-spacing: 0.02em;
  margin-right: auto;
}
.logo svg { width: auto; height: 20px; }
.nav-links {
  display: flex;
  align-items: center;
}
.nav-links > a, .nav-links > .nav-item > a {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 12px;
  font-size: 13px;
  color: var(--color-text-tertiary);
  border-radius: var(--radius-8);
  transition: color var(--speed-quick), background var(--speed-quick);
}
.nav-links > a:hover, .nav-links > .nav-item > a:hover {
  color: var(--color-text-primary);
  background: var(--color-bg-translucent);
}
.nav-links > a[aria-current],
.nav-links > .nav-item > a[aria-current] { color: var(--color-text-primary); }
/* dropdown */
.nav-item { position: relative; }
.nav-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: -16px;
  min-width: 480px;
  padding: 16px;
  background: var(--color-panel);
  border: 1px solid var(--color-border-translucent);
  border-radius: var(--radius-12);
  box-shadow: var(--shadow-dropdown);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity var(--speed-quick), transform var(--speed-quick), visibility var(--speed-quick);
}
.nav-item:hover .nav-dropdown,
.nav-item:focus-within .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.nav-dropdown a {
  display: block;
  padding: 10px 12px;
  border-radius: var(--radius-8);
  transition: background var(--speed-quick);
}
.nav-dropdown a:hover { background: var(--color-bg-translucent); }
.nav-dropdown .dd-title { display: block; font-size: 13px; color: var(--color-text-primary); font-weight: var(--weight-medium); }
.nav-dropdown .dd-desc { display: block; font-size: 13px; color: var(--color-text-tertiary); margin-top: 1px; }
.nav-dropdown .dd-all {
  grid-column: 1 / -1;
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--color-border-primary);
  font-size: 13px;
  color: var(--color-text-tertiary);
}
.nav-dropdown .dd-all:hover { color: var(--color-text-primary); }
.header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.lang-link {
  font-size: 13px;
  color: var(--color-text-tertiary);
  padding: 0 12px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius-8);
  transition: color var(--speed-quick);
}
.lang-link:hover { color: var(--color-text-primary); }
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  cursor: pointer;
  background: transparent;
  color: var(--color-text-tertiary);
  border: 0;
  border-radius: var(--radius-8);
  transition: color var(--speed-quick), background var(--speed-quick);
}
.theme-toggle:hover { color: var(--color-text-primary); background: var(--color-bg-translucent); }
.theme-toggle .tt-moon { display: none; }
html.dark .theme-toggle .tt-moon { display: block; }
html.dark .theme-toggle .tt-sun { display: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border-radius: var(--rounded-full);
  font-size: 13px;
  font-weight: var(--weight-medium);
  line-height: 1;
  white-space: nowrap;
  transition: background var(--speed-quick), color var(--speed-quick), border-color var(--speed-quick), transform var(--speed-quick);
}
.btn:active { transform: scale(0.97); }
.btn--primary {
  background: var(--color-btn-bg);
  color: var(--color-btn-text);
  border: 1px solid var(--color-btn-bg);
  box-shadow: 0 3px 2px rgba(0, 0, 0, 0.04), 0 1px 1px rgba(0, 0, 0, 0.07), 0 0 1px rgba(0, 0, 0, 0.08);
}
.btn--primary:hover { background: #26282d; border-color: #26282d; }
html.dark .btn--primary:hover { background: #ffffff; border-color: #ffffff; }
.btn--secondary {
  background: var(--color-bg-translucent);
  color: var(--color-text-primary);
  border: 1px solid transparent;
}
.btn--secondary:hover { background: var(--color-bg-translucent-hover); }
.btn--lg { height: 40px; padding: 0 16px; font-size: 14px; }

/* ---------- Hero ---------- */
.hero {
  padding-top: calc(var(--header-height) + 96px);
  padding-bottom: 96px;
}
.hero h1 {
  font-size: var(--text-hero);
  font-weight: var(--weight-medium);
  line-height: 1;
  letter-spacing: -0.022em;
  max-width: 800px;
  text-wrap: balance;
}
.hero .hero-sub {
  margin-top: 24px;
  font-size: 17px;
  line-height: 1.6;
  color: var(--color-text-tertiary);
  max-width: 560px;
}
.hero .hero-ctas { margin-top: 32px; display: flex; gap: 12px; flex-wrap: wrap; }

.page-hero {
  padding-top: calc(var(--header-height) + 80px);
  padding-bottom: 24px;
}
.page-hero h1 {
  font-size: var(--text-page-hero);
  font-weight: var(--weight-medium);
  line-height: 1.1;
  letter-spacing: -0.022em;
  max-width: 720px;
  text-wrap: balance;
}
.page-hero .hero-sub {
  margin-top: 20px;
  font-size: 17px;
  line-height: 1.6;
  color: var(--color-text-tertiary);
  max-width: 560px;
}

/* ---------- Sections ---------- */
.section { padding-block: 128px; }
.section--tight { padding-block: 64px; }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 48px;
}
.section-title {
  font-size: var(--text-title);
  font-weight: var(--weight-medium);
  line-height: 1.1;
  letter-spacing: -0.022em;
  text-wrap: balance;
}
.section-link {
  display: inline-block;
  padding: 4px 0;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--color-text-tertiary);
  letter-spacing: 0.02em;
  white-space: nowrap;
  transition: color var(--speed-quick);
}
.section-link:hover { color: var(--color-text-primary); }

/* Two-tone statement (Linear "A new species of product tool.") */
.statement {
  font-size: 32px;
  font-weight: var(--weight-medium);
  line-height: 1.33;
  letter-spacing: -0.015em;
  color: var(--color-text-primary);
  max-width: 960px;
}
.statement .dim { color: var(--color-text-tertiary); }

/* Three-column feature strip with hairline dividers */
.triptych {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 56px;
}
.triptych-col { border-left: 1px solid var(--color-border-primary); padding-left: 24px; }
.fig {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-quaternary);
}
.triptych-col h2 {
  margin-top: 200px;
  font-size: 14px;
  font-weight: var(--weight-medium);
  color: var(--color-text-primary);
}
.triptych-col p { margin-top: 8px; font-size: 14px; color: var(--color-text-tertiary); }
.triptych-col .glyph {
  margin-top: 28px;
  color: var(--color-text-tertiary);
}
.triptych-col .glyph svg { width: 100%; height: auto; display: block; }
.triptych-col .glyph + h2 { margin-top: 20px; }

.icon-row { margin-bottom: 56px; }
.icon-row .fig { text-decoration: none; }
.icon-row .fig:hover { color: var(--color-text-secondary); }
.icon-row-icons {
  margin-top: 16px;
  padding: 20px 0;
  border-top: 1px solid var(--color-border-primary);
  border-bottom: 1px solid var(--color-border-primary);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
}
.icon-row-icons img { opacity: 0.55; transition: opacity var(--speed-quick); }
.icon-row-icons img:hover { opacity: 1; }

/* Split feature block: title left, copy right */
.feature-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.feature-split h2 {
  font-size: 40px;
  font-weight: var(--weight-medium);
  line-height: 1.1;
  letter-spacing: -0.022em;
  text-wrap: balance;
}
.feature-split .feature-copy { font-size: 17px; line-height: 1.6; color: var(--color-text-secondary); }
.feature-split .feature-index {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--color-text-tertiary);
  transition: color var(--speed-quick);
}
.feature-split .feature-index:hover { color: var(--color-text-primary); }

/* ---------- Cards (unified product card spec) ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px;
  background: var(--color-bg-translucent);
  border: 1px solid var(--color-border-translucent);
  border-radius: var(--radius-10);
  transition: background var(--speed-quick), border-color var(--speed-quick);
}
.card:hover {
  background: var(--color-bg-translucent-hover);
  border-color: var(--color-border-secondary);
}
.card .card-icon { width: 40px; height: 40px; }
.card .card-icon img { width: 40px; height: 40px; border-radius: var(--radius-8); }
.card h3 { font-size: 17px; font-weight: var(--weight-medium); line-height: 1.4; }
.card p { font-size: 14px; color: var(--color-text-tertiary); }
.card .card-arrow {
  position: absolute;
  top: 24px;
  right: 24px;
  font-size: 14px;
  color: var(--color-text-quaternary);
  transition: color var(--speed-quick), transform var(--speed-quick);
}
.card:hover .card-arrow { color: var(--color-text-primary); transform: translate(2px, -2px); }

/* Work card (cover screenshot on top) */
.work-card { padding: 0; overflow: hidden; }
.work-card .card-media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-bottom: 1px solid var(--color-border-translucent);
  background: var(--color-bg-secondary);
  display: block;
}
.work-card .card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
  transition: transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.work-card:hover .card-media img { transform: scale(1.025); }
@media (prefers-reduced-motion: reduce) {
  .work-card .card-media img { transition: none; }
  .work-card:hover .card-media img { transform: none; }
}
.work-card .card-body {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 20px 20px;
}
.products-page .card.work-card { padding: 0; }
.work-card .card-body .card-arrow { top: 18px; right: 20px; }
.products-page .card.work-card .card-body .card-arrow { top: 18px; right: 20px; }

/* Works index list (portfolio-style rows) */
.works-list {
  border-top: 1px solid var(--color-border-primary);
}
.work-row {
  display: grid;
  grid-template-columns: 44px minmax(180px, 240px) 1fr auto 20px;
  align-items: baseline;
  gap: 16px;
  padding: 18px 8px;
  border-bottom: 1px solid var(--color-border-primary);
  transition: background var(--speed-quick);
}
.work-row:hover { background: var(--color-bg-translucent-hover); }
.work-row .work-no,
.work-row .work-cat {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--color-text-quaternary);
  font-variant-numeric: tabular-nums;
}
.work-row .work-name {
  font-size: 16px;
  font-weight: var(--weight-medium);
  color: var(--color-text-primary);
  transition: transform var(--speed-quick);
}
.js .work-row:hover .work-name { transform: translateX(4px); }
@media (prefers-reduced-motion: reduce) {
  .js .work-row:hover .work-name { transform: none; }
}
.work-row .work-desc {
  font-size: 14px;
  color: var(--color-text-tertiary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.work-row .card-arrow {
  position: static;
  justify-self: end;
  font-size: 14px;
  color: var(--color-text-quaternary);
  transition: color var(--speed-quick), transform var(--speed-quick);
}
.work-row:hover .card-arrow { color: var(--color-text-primary); transform: translate(2px, -2px); }
@media (max-width: 768px) {
  .work-row {
    grid-template-columns: 36px 1fr 20px;
    grid-template-areas:
      "no name arrow"
      "no desc arrow"
      "no cat arrow";
    row-gap: 4px;
    padding: 16px 4px;
  }
  .work-row .work-no { grid-area: no; }
  .work-row .work-name { grid-area: name; }
  .work-row .work-desc { grid-area: desc; white-space: normal; }
  .work-row .work-cat { grid-area: cat; }
  .work-row .card-arrow { grid-area: arrow; align-self: start; }
}

/* Card with deep links beneath */
.card-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.card-stack .card { flex: 1; }
.card-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  padding: 0 24px 8px;
  font-size: 13px;
}
.card-links a {
  display: inline-block;
  padding: 4px 0;
  color: var(--color-text-tertiary);
  transition: color var(--speed-quick);
}
.card-links a:hover { color: var(--color-text-primary); }

/* Media panel (large rounded frame) */
.media-panel {
  margin-top: 64px;
  border: 1px solid var(--color-border-translucent);
  border-radius: var(--radius-16);
  background: var(--color-bg-translucent);
  overflow: hidden;
}
.media-panel img { width: 100%; height: auto; }

/* ---------- Values (4-col divider columns) ---------- */
.value-cols {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}
.value-cols .vcol { border-left: 1px solid var(--color-border-primary); padding-left: 20px; }
.value-cols .fig { display: block; margin-bottom: 16px; }
.value-cols h3 { font-size: 14px; font-weight: var(--weight-medium); }
.value-cols p { margin-top: 8px; font-size: 14px; color: var(--color-text-tertiary); }

.value-cols--2 { grid-template-columns: repeat(2, 1fr); row-gap: 48px; }
@media (max-width: 768px) { .value-cols--2 { grid-template-columns: 1fr; } }

/* ---------- Accordion (values page) ---------- */
.acc-group { border-top: 1px solid var(--color-border-primary); }
.acc { border-bottom: 1px solid var(--color-border-primary); }
.acc summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  cursor: pointer;
  list-style: none;
  font-size: 17px;
  font-weight: var(--weight-medium);
  color: var(--color-text-primary);
  transition: color var(--speed-quick);
}
.acc summary::-webkit-details-marker { display: none; }
.acc summary::after {
  content: "+";
  font-size: 18px;
  color: var(--color-text-quaternary);
  transition: transform var(--speed-quick);
}
.acc[open] summary::after { transform: rotate(45deg); }
.acc ul { padding: 0 0 20px 20px; }
.acc li { font-size: 15px; color: var(--color-text-tertiary); margin-bottom: 8px; }

/* ---------- Post list ---------- */
.post-list { border-top: 1px solid var(--color-border-primary); }
.post-list a {
  display: flex;
  align-items: baseline;
  gap: 24px;
  padding: 20px 0;
  border-bottom: 1px solid var(--color-border-primary);
  transition: background var(--speed-quick);
}
.post-list .post-date {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--color-text-quaternary);
  min-width: 110px;
}
.post-list .post-name {
  font-size: 17px;
  font-weight: var(--weight-medium);
  color: var(--color-text-primary);
}
.post-list .post-arrow { margin-left: auto; color: var(--color-text-quaternary); transition: color var(--speed-quick), transform var(--speed-quick); }
.post-list a:hover .post-arrow { color: var(--color-text-primary); transform: translateX(2px); }

/* ---------- Article ---------- */
.article { max-width: 680px; margin: 0 auto; }
.article .back-link { font-size: 13px; color: var(--color-text-tertiary); }
.article .back-link:hover { color: var(--color-text-primary); }
.article .article-kicker { margin-top: 32px; }
.article h1 {
  margin-top: 12px;
  font-size: 48px;
  font-weight: var(--weight-medium);
  line-height: 1.1;
  letter-spacing: -0.022em;
}
.article .article-meta { margin-top: 16px; font-size: 13px; color: var(--color-text-quaternary); }
.article h2 {
  margin-top: 48px;
  font-size: 24px;
  font-weight: var(--weight-medium);
  line-height: 1.33;
  letter-spacing: -0.015em;
}
.article p, .article li { margin-top: 16px; font-size: 17px; line-height: 1.7; color: var(--color-text-secondary); text-wrap: pretty; }
.article ol { padding-left: 24px; }
.article .article-sign { margin-top: 48px; font-size: 14px; color: var(--color-text-quaternary); }

/* ---------- Products page density (Linear /features scale) ---------- */
.products-page .page-hero h1 { font-size: 44px; }
.products-page .page-hero .hero-sub { font-size: 16px; }
.products-page .section { padding-block: 56px; }
.products-page .bento-body { padding: 18px 20px 20px; }
.products-page .bento-title { gap: 10px; margin-bottom: 6px; }
.products-page .bento-title h3 { font-size: 16px; }
.products-page .bento-title img { width: 24px; height: 24px; }
.products-page .bento-body > p { font-size: 13px; line-height: 1.55; color: var(--color-text-tertiary); }
.products-page .card { padding: 20px; gap: 10px; }
.products-page .card h3 { font-size: 15px; }
.products-page .card p { font-size: 13px; line-height: 1.55; }
.products-page .card-icon img { width: 32px; height: 32px; }
.products-page .card .card-arrow { top: 20px; right: 20px; }
.products-page .pledges { margin-top: 10px; gap: 5px; }
.products-page .pledge { font-size: 9px; padding: 2px 7px; }
.products-page .card-links { font-size: 12px; }
@media (max-width: 900px) {
  .products-page .page-hero h1 { font-size: 32px; }
  .products-page .section { padding-block: 44px; }
}

/* ---------- Portfolio: work numbering, hero index, marquee, spotlight ---------- */
.hero-index { margin-top: 20px; }
.card-grid { counter-reset: work; }
.products-page .card-grid { counter-reset: work 4; }
.card-grid > .card, .card-grid > .card-stack > .card { counter-increment: work; }
.card-grid > .card::before, .card-grid > .card-stack > .card::before {
  content: counter(work, decimal-leading-zero);
  position: absolute;
  top: 26px;
  right: 48px;
  font: 400 11px/1 var(--font-mono);
  letter-spacing: 0.05em;
  color: var(--color-text-quaternary);
  font-variant-numeric: tabular-nums;
}
.products-page .card-grid > .card::before, .card-grid > .card-stack > .card::before { top: 22px; right: 44px; }
.card-grid > .work-card::before, .card-grid > .card-stack > .work-card::before {
  top: 10px;
  right: 10px;
  padding: 4px 7px;
  background: var(--color-bg-primary);
  border: 1px solid var(--color-border-secondary);
  border-radius: 6px;
  color: var(--color-text-tertiary);
  box-shadow: 0 1px 3px rgba(23, 24, 28, 0.08);
}
.products-page .card-grid > .work-card::before, .products-page .card-grid > .card-stack > .work-card::before { top: 10px; right: 10px; }

.works-marquee {
  overflow: hidden;
  border-block: 1px solid var(--color-border-primary);
  padding-block: 12px;
  margin-bottom: 48px;
}
.works-marquee-track {
  display: flex;
  width: max-content;
  white-space: nowrap;
  animation: works-scroll 48s linear infinite;
  font: 400 11px/1 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-quaternary);
}
.works-marquee:hover .works-marquee-track { animation-play-state: paused; }
@keyframes works-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .works-marquee-track { animation: none; }
}

@media (pointer: fine) {
  .js .card:hover, .js .bento-card:hover {
    background-image: radial-gradient(240px circle at var(--spot-x, 50%) var(--spot-y, 50%), rgba(23, 24, 28, 0.035), transparent 70%);
  }
  html.dark.js .card:hover, html.dark.js .bento-card:hover {
    background-image: radial-gradient(240px circle at var(--spot-x, 50%) var(--spot-y, 50%), rgba(255, 255, 255, 0.05), transparent 70%);
  }
}

/* ---------- QR mini demo ---------- */
.qr-demo { cursor: default; }
.qr-demo-media { display: flex; align-items: center; justify-content: center; }
.qr-demo-out {
  display: block;
  width: 200px;
  height: 200px;
  background: #fff;
  border-radius: var(--radius-8);
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(23, 24, 28, 0.1);
}
.qr-demo-out img, .qr-demo-out svg { width: 100%; height: 100%; display: block; }
.qr-demo-input {
  margin-top: 14px;
  width: 100%;
  height: 36px;
  padding: 0 12px;
  font: 400 13px/1 var(--font-regular);
  color: var(--color-text-primary);
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border-primary);
  border-radius: var(--radius-8);
  outline: none;
  transition: border-color var(--speed-quick);
}
.qr-demo-input:focus { border-color: var(--color-text-tertiary); }
.qr-demo-input::placeholder { color: var(--color-text-quaternary); }

/* ---------- Hero tagline ---------- */
.hero-tag {
  margin-top: 14px;
  font-size: 15px;
  color: var(--color-text-tertiary);
  letter-spacing: 0.01em;
}

/* ---------- Pledge badges ---------- */
.pledges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}
.pledge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-tertiary);
  border: 1px solid var(--color-border-primary);
  border-radius: var(--rounded-full);
  white-space: nowrap;
}
.pledge-intro {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 16px 0;
  border-top: 1px solid var(--color-border-primary);
  border-bottom: 1px solid var(--color-border-primary);
}
.pledge-intro .fig { margin-right: 4px; }
.pledge-intro .pledge { font-size: 11px; }
.pledge-intro p { flex-basis: 100%; margin-top: 4px; font-size: 13px; color: var(--color-text-tertiary); }

/* ---------- Audience quick links ---------- */
.audience {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.audience-col { border-left: 1px solid var(--color-border-primary); padding-left: 24px; }
.audience-col h2 {
  font-size: 15px;
  font-weight: var(--weight-medium);
  color: var(--color-text-primary);
}
.audience-col p { margin-top: 4px; font-size: 13px; color: var(--color-text-tertiary); }
.audience-col ul { margin-top: 10px; list-style: none; padding: 0; }
.audience-col li a {
  display: inline-block;
  padding: 3px 0;
  font-size: 13px;
  color: var(--color-text-secondary);
  transition: color var(--speed-quick);
}
.audience-col li a:hover { color: var(--color-text-primary); }
.audience-col li a::after { content: " ↗"; color: var(--color-text-quaternary); font-size: 11px; }
@media (max-width: 900px) {
  .audience { grid-template-columns: 1fr; gap: 24px; }
}

/* ---------- Open numbers ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  margin-top: 56px;
}
.stat { border-left: 1px solid var(--color-border-primary); padding-left: 24px; }
.stat-value {
  display: block;
  font-size: 40px;
  font-weight: var(--weight-medium);
  line-height: 1.1;
  letter-spacing: -0.022em;
  color: var(--color-text-primary);
}
.stat-label { margin-top: 8px; font-size: 14px; color: var(--color-text-secondary); }
.stat-note { margin-top: 4px; font-size: 13px; color: var(--color-text-tertiary); }
@media (max-width: 900px) {
  .stats { grid-template-columns: repeat(2, 1fr); gap: 32px 24px; margin-top: 40px; }
}

/* ---------- Studio letter ---------- */
.letter { max-width: 640px; }
.letter p { margin-top: 16px; font-size: 17px; line-height: 1.7; color: var(--color-text-secondary); text-wrap: pretty; }
.letter .letter-sign { margin-top: 32px; font-size: 15px; color: var(--color-text-primary); }
.letter .letter-sign .fig { display: block; margin-top: 4px; text-transform: none; letter-spacing: 0.02em; }

/* ---------- Legal ---------- */
.legal { max-width: 680px; margin: 0 auto; }
.legal h1 { font-size: 40px; font-weight: var(--weight-medium); letter-spacing: -0.022em; line-height: 1.1; }
.legal .legal-date { margin-top: 12px; font-size: 13px; color: var(--color-text-quaternary); }
.legal h2 { margin-top: 40px; font-size: 20px; font-weight: var(--weight-medium); }
.legal p, .legal li { margin-top: 12px; font-size: 15px; line-height: 1.7; color: var(--color-text-secondary); }
.legal ul { padding-left: 20px; }
.legal a { color: var(--color-link-primary); text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Contact card ---------- */
.contact-card {
  padding: 40px;
  background: var(--color-bg-translucent);
  border: 1px solid var(--color-border-translucent);
  border-radius: var(--radius-16);
}
.contact-card p { font-size: 17px; color: var(--color-text-secondary); max-width: 480px; }
.contact-card .contact-email {
  display: inline-block;
  margin-top: 24px;
  font-size: 24px;
  font-weight: var(--weight-medium);
  letter-spacing: -0.015em;
  color: var(--color-text-primary);
  border-bottom: 1px solid var(--color-border-secondary);
  padding-bottom: 2px;
  transition: border-color var(--speed-quick);
}
.contact-card .contact-email:hover { border-color: var(--color-text-primary); }

/* ---------- CTA ---------- */
.cta {
  padding-block: 160px;
  text-align: center;
}
.cta h2 {
  font-size: 56px;
  font-weight: var(--weight-medium);
  line-height: 1.06;
  letter-spacing: -0.022em;
  text-wrap: balance;
}
.cta .hero-ctas { margin-top: 32px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--color-border-primary);
  padding-block: 64px 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr repeat(5, 1fr);
  gap: 24px;
}
.footer-logo svg { width: 22px; height: 22px; color: var(--color-text-tertiary); }
.footer-col .footer-h {
  font-size: 13px;
  font-weight: var(--weight-medium);
  color: var(--color-text-primary);
  margin-bottom: 16px;
}
.footer-col ul { list-style: none; padding: 0; }
.footer-col li { margin-bottom: 4px; }
.footer-col a {
  display: inline-block;
  padding: 4px 0;
  font-size: 13px;
  color: var(--color-text-tertiary);
  transition: color var(--speed-quick);
}
.footer-col a:hover { color: var(--color-text-primary); }
.footer-bottom {
  margin-top: 56px;
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: var(--color-text-quaternary);
}
.footer-bottom a { color: inherit; }
.footer-bottom a:hover { color: var(--color-text-primary); }
.footer-bottom .spacer { margin-left: auto; }

/* ---------- Reveal animation ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s var(--ease-out-expo), transform 0.55s var(--ease-out-expo);
}
.js .reveal.in-view { opacity: 1; transform: none; }
.js .bento > .reveal:nth-child(2), .js .stats > .reveal:nth-child(2),
.js .card-grid > .reveal:nth-child(3n+2), .js .value-cols > .reveal:nth-child(2),
.js .audience > .reveal:nth-child(2) { transition-delay: 70ms; }
.js .bento > .reveal:nth-child(3), .js .stats > .reveal:nth-child(3),
.js .card-grid > .reveal:nth-child(3n), .js .value-cols > .reveal:nth-child(3),
.js .audience > .reveal:nth-child(3) { transition-delay: 140ms; }
.js .bento > .reveal:nth-child(4), .js .stats > .reveal:nth-child(4),
.js .value-cols > .reveal:nth-child(4) { transition-delay: 210ms; }
@media print {
  .js .reveal { opacity: 1 !important; transform: none !important; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  * { animation: none !important; transition: none !important; }
}

/* ---------- Premium polish: atmosphere, depth, stagger, detail ---------- */
.hero { position: relative; }
.hero::before {
  content: "";
  position: absolute;
  inset: -140px 0 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(640px 340px at 50% 0%, rgba(23, 24, 28, 0.04), transparent 70%);
}
html.dark .hero::before {
  background: radial-gradient(640px 340px at 50% 0%, rgba(245, 246, 248, 0.055), transparent 70%);
}
html.dark body {
  background-image: linear-gradient(180deg, #14151a 0%, #101114 360px);
  background-repeat: no-repeat;
}

.bento-card, .card {
  box-shadow: 0 1px 2px rgba(23, 24, 28, 0.04);
  transition: box-shadow var(--speed-quick), transform var(--speed-quick), background var(--speed-quick), border-color var(--speed-quick);
}
.bento-card:hover, .card:hover { box-shadow: 0 12px 32px rgba(23, 24, 28, 0.09); }
html.dark .bento-card, html.dark .card { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04); }
html.dark .bento-card:hover, html.dark .card:hover {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 12px 32px rgba(0, 0, 0, 0.38);
}

.stat-value, .footer-bottom, .fig { font-variant-numeric: tabular-nums; }

html { scrollbar-width: thin; scrollbar-color: var(--color-border-secondary) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--color-border-secondary);
  border-radius: var(--rounded-full);
  border: 2px solid transparent;
  background-clip: content-box;
}

/* ---------- Mobile nav ---------- */
.nav-toggle-input { display: none; }
.nav-toggle {
  display: none;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  border-radius: var(--radius-8);
}
.nav-toggle span {
  display: block;
  width: 16px;
  height: 1.5px;
  background: var(--color-text-primary);
  transition: transform var(--speed-quick), opacity var(--speed-quick);
}
.nav-drawer {
  display: none;
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  z-index: 99;
  background: var(--color-bg-primary);
  border-bottom: 1px solid var(--color-border-primary);
  padding: 8px var(--page-padding-inline) 24px;
  flex-direction: column;
}
.nav-drawer a {
  padding: 12px 0;
  font-size: 15px;
  color: var(--color-text-secondary);
  border-bottom: 1px solid var(--color-border-primary);
}
.nav-drawer a:last-child { border-bottom: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .triptych { grid-template-columns: 1fr; gap: 32px; margin-top: 48px; }
  .triptych-col .glyph { margin-top: 20px; max-width: 320px; }
  .feature-split { grid-template-columns: 1fr; gap: 24px; }
  .value-cols { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); row-gap: 40px; }
  .footer-logo { grid-column: 1 / -1; }
}
@media (max-width: 768px) {
  .nav-links, .header-actions .lang-link { display: none; }
  .nav-toggle { display: flex; }
  .nav-toggle-input:checked ~ .nav-drawer { display: flex; animation: drawer-in 0.2s var(--ease-out-expo); }
  .nav-toggle-input:checked ~ .site-header .nav-toggle span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
  .nav-toggle-input:checked ~ .site-header .nav-toggle span:nth-child(2) { opacity: 0; }
  .nav-toggle-input:checked ~ .site-header .nav-toggle span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }
  .hero { padding-top: calc(var(--header-height) + 56px); padding-bottom: 56px; }
  .hero h1 { font-size: 40px; line-height: 1.06; }
  .page-hero { padding-top: calc(var(--header-height) + 48px); }
  .page-hero h1 { font-size: 36px; }
  .section { padding-block: 72px; }
  .section-title { font-size: 28px; }
  .statement { font-size: 22px; }
  .cta { padding-block: 96px; }
  .cta h2 { font-size: 36px; }
  .card-grid { grid-template-columns: 1fr; }
  .value-cols { grid-template-columns: 1fr; }
  .article h1 { font-size: 34px; }
  .legal h1 { font-size: 30px; }
  .contact-card { padding: 24px; }
  .contact-card .contact-email { font-size: 18px; word-break: break-all; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 12px; margin-bottom: 32px; }
}

/* ---------- v2 IA components (bento / rows / prose / toc / cta-row / post-feature) ---------- */
.bento {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.bento-card {
  display: flex;
  flex-direction: column;
  background: var(--color-bg-translucent);
  border: 1px solid var(--color-border-translucent);
  border-radius: var(--radius-16);
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  transition: border-color var(--speed-quick), background var(--speed-quick), transform var(--speed-quick), box-shadow var(--speed-quick);
}
.bento-card:hover {
  border-color: var(--color-border-secondary);
  background: var(--color-bg-translucent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}
html.dark .bento-card:hover { box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35); }
.bento-card:hover .card-arrow { color: var(--color-text-primary); transform: translate(2px, -2px); }
.bento-media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-bottom: 1px solid var(--color-border-translucent);
  background: var(--color-bg-secondary);
}
.bento-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
}
.bento-body { padding: 24px; }
.bento-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.bento-title img { width: 28px; height: 28px; }
.bento-title h3 {
  margin: 0;
  font-size: 17px;
  font-weight: var(--weight-medium);
}
.bento-title .card-arrow { margin-left: auto; color: var(--color-text-quaternary); transition: color var(--speed-quick), transform var(--speed-quick); }
.bento-body p {
  margin: 0;
  font-size: 14px;
  color: var(--color-text-tertiary);
}
.bento-body .card-links { padding: 12px 0 0; }
.bento-stack { display: flex; flex-direction: column; }
.bento-stack .bento-card { flex: 1; }

/* Numbered principle rows (careers-style) */
.rows { border-bottom: 1px solid var(--color-border-primary); }
.row {
  display: grid;
  grid-template-columns: 48px 1fr 1.4fr;
  gap: 24px;
  padding: 24px 0;
  border-top: 1px solid var(--color-border-primary);
}
.row-num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--color-text-quaternary);
  padding-top: 3px;
}
.row h3 {
  margin: 0;
  font-size: 16px;
  font-weight: var(--weight-medium);
}
.row ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.row ul li {
  font-size: 14px;
  color: var(--color-text-tertiary);
}

/* Narrow prose (about-style narrative) */
.prose { max-width: 640px; }
.prose h2 {
  font-size: 24px;
  font-weight: var(--weight-medium);
  letter-spacing: -0.02em;
  margin: 0 0 24px;
}
.prose p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text-secondary);
  margin: 0 0 20px;
}

/* Legal: mono kicker + numbered TOC */
.legal-kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-quaternary);
}
.toc {
  margin: 32px 0 48px;
  padding: 24px 0;
  border-top: 1px solid var(--color-border-primary);
  border-bottom: 1px solid var(--color-border-primary);
  list-style: none;
  counter-reset: toc;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toc li { counter-increment: toc; }
.toc a {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--color-text-tertiary);
  text-decoration: none;
}
.toc a::before { content: counter(toc, decimal-leading-zero) ".  "; color: var(--color-text-quaternary); }
.toc a:hover { color: var(--color-text-primary); }

/* Inline CTA band (features-style one-liner) */
.cta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 96px;
}
.cta-row h2 {
  margin: 0;
  font-size: 32px;
  font-weight: var(--weight-medium);
  letter-spacing: -0.022em;
}
.cta-row .hero-ctas { margin: 0; }

/* Featured post card (now-style) */
.post-feature {
  display: block;
  padding: 32px;
  border: 1px solid var(--color-border-translucent);
  border-radius: var(--radius-16);
  background: var(--color-bg-translucent);
  color: inherit;
  text-decoration: none;
  transition: border-color var(--speed-quick), background var(--speed-quick);
}
.post-feature:hover {
  border-color: var(--color-border-secondary);
  background: var(--color-bg-translucent-hover);
}
.post-feature h2,
.post-feature h3 {
  margin: 12px 0 12px;
  font-size: 24px;
  font-weight: var(--weight-medium);
  letter-spacing: -0.02em;
}
.post-feature p {
  margin: 0 0 16px;
  font-size: 15px;
  color: var(--color-text-tertiary);
  max-width: 620px;
}
.post-feature .post-meta {
  font-size: 13px;
  color: var(--color-text-quaternary);
}

/* ---------- Accessibility: skip link + keyboard focus ---------- */
.skip-link {
  position: absolute;
  top: -48px;
  left: 16px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: var(--radius-8);
  background: var(--color-btn-bg);
  color: var(--color-btn-text);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: top var(--speed-quick);
}
.skip-link:focus-visible { top: 12px; }

a:focus-visible,
button:focus-visible,
.btn:focus-visible,
[role="button"]:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: var(--radius-8);
}
a:focus:not(:focus-visible),
button:focus:not(:focus-visible) { outline: none; }

@media (max-width: 900px) {
  .bento { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .row { grid-template-columns: 32px 1fr; }
  .row ul { grid-column: 2; }
  .cta-row { flex-direction: column; align-items: flex-start; padding-block: 72px; }
  .cta-row h2 { font-size: 28px; }
  .post-feature { padding: 24px; }
}

@keyframes drawer-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}

/* Highlights grid without work-number pills (full catalog is numbered below) */
.no-nums > .card::before,
.no-nums > .card-stack > .card::before {
  content: none;
}
