/* Indie Lab — shared styles */
:root {
  --paper: #F5F1E9;
  --paper-2: #ECE6DA;
  --paper-3: #E3DCCD;
  --surface: #FBF9F4;
  --ink: #22282A;
  --ink-2: #454C4B;
  --muted: #6F716A;
  --line: #DDD5C6;
  --line-strong: #CBC1AF;
  --accent: #B9521F;
  --accent-hover: #A2461A;
  --accent-soft: #F1DCCB;
  --ok: #3F7A4F;
  --shadow: 0 1px 2px rgba(60, 45, 25, .06), 0 12px 32px -12px rgba(60, 45, 25, .18);
  --shadow-lg: 0 2px 4px rgba(60, 45, 25, .05), 0 30px 60px -20px rgba(60, 45, 25, .28);
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --serif: "Instrument Serif", Georgia, serif;
  --container: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.1; letter-spacing: -0.025em; font-weight: 600; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
em.serif, .serif { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--accent-soft); }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
@media (max-width: 640px) { .container { padding: 0 16px; } }

.skip { position: absolute; left: 16px; top: -48px; z-index: 50; background: var(--ink); color: var(--paper); padding: 8px 14px; border-radius: var(--r-sm); transition: top .2s; }
.skip:focus { top: 12px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: -0.02em; font-size: 17px; }
.brand img { width: 34px; height: 34px; border-radius: 9px; box-shadow: 0 0 0 1px var(--line); }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a:not(.btn) { padding: 8px 12px; border-radius: var(--r-sm); font-size: 14.5px; color: var(--ink-2); transition: color .2s, background-color .2s; }
.nav a:not(.btn):hover { color: var(--ink); background: var(--paper-2); }
.nav a[aria-current="page"] { color: var(--ink); }
.nav .btn { margin-left: 8px; }
@media (max-width: 760px) { .nav a:not(.btn) { display: none; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 18px; border-radius: 10px;
  font: 500 15px/1 var(--sans); letter-spacing: -0.01em;
  border: 1px solid transparent; cursor: pointer;
  transition: background-color .2s, border-color .2s, color .2s, transform .15s ease;
}
.btn:active { transform: translateY(1px) scale(.985); }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: #0F1314; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-hover); }
.btn-ghost { border-color: var(--line-strong); color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--paper-2); border-color: var(--ink-2); }
.btn-sm { height: 38px; padding: 0 14px; font-size: 14px; }
.btn[aria-disabled="true"] { background: var(--paper-3); color: var(--muted); cursor: not-allowed; }
.btn .arrow { transition: transform .2s ease; }
.btn:hover .arrow, .link-arrow:hover .arrow { transform: translateX(3px); }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; border-bottom: 1px solid var(--line-strong); padding-bottom: 2px; transition: border-color .2s; }
.link-arrow:hover { border-color: var(--ink); }
.link-arrow .arrow { display: inline-block; transition: transform .2s ease; }

/* ---------- Labels ---------- */
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font: 500 13px/1 var(--mono); color: var(--muted); letter-spacing: 0.01em; }
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 6px; font: 500 12px/1.4 var(--mono); color: var(--ink-2); background: var(--paper-2); border: 1px solid var(--line); }
.status { display: inline-flex; align-items: center; gap: 7px; font: 500 12.5px/1 var(--mono); color: var(--ink-2); }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.status.live::before { background: var(--ok); box-shadow: 0 0 0 3px rgba(63, 122, 79, .18); }
.status.soon::before { background: var(--accent); }

/* ---------- Sections ---------- */
.section { padding: 112px 0; }
.section-tight { padding: 72px 0; }
.section-head { display: grid; grid-template-columns: 1fr; gap: 16px; margin-bottom: 56px; max-width: 720px; }
.section-head h2 { font-size: clamp(2rem, 4.2vw, 3.1rem); }
.section-head p { color: var(--muted); font-size: 18px; max-width: 60ch; }
.divider { border: 0; border-top: 1px solid var(--line); margin: 0; }
@media (max-width: 640px) { .section { padding: 80px 0; } .section-head { margin-bottom: 40px; } }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 72px 0 104px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(34, 40, 42, .06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(34, 40, 42, .06) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse 70% 65% at 70% 40%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 65% at 70% 40%, #000 20%, transparent 75%);
}
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(2.7rem, 6.2vw, 5.1rem); line-height: 1.02; letter-spacing: -0.045em; margin: 22px 0 24px; }
.hero h1 .serif { font-size: 1.08em; letter-spacing: -0.02em; }
.hero .lede { font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: var(--ink-2); max-width: 52ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 40px; }
@media (max-width: 960px) { .hero-grid { grid-template-columns: 1fr; gap: 64px; } .hero { padding-top: 48px; } }

/* Hero collage */
.collage { position: relative; aspect-ratio: 1 / .86; }
.window {
  position: absolute; left: 0; top: 6%; width: 88%;
  background: var(--surface); border-radius: var(--r-md); overflow: hidden;
  box-shadow: var(--shadow-lg); border: 1px solid var(--line);
}
.window-bar { display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; background: var(--paper-2); border-bottom: 1px solid var(--line); }
.window-bar span { width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); }
.window-bar small { margin-left: 10px; font: 500 11px/1 var(--mono); color: var(--muted); }
.window img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
.phone {
  position: absolute; right: 0; bottom: 0; width: 34%;
  border-radius: 26px; padding: 7px; background: #17191B;
  box-shadow: var(--shadow-lg); transform: rotate(3deg);
}
.phone img { border-radius: 20px; aspect-ratio: 9 / 18.5; object-fit: cover; object-position: top; }
.chip {
  position: absolute; left: 6%; bottom: 4%;
  display: flex; align-items: center; gap: 12px; padding: 10px 16px 10px 10px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow);
}
.chip img { width: 40px; height: 40px; border-radius: 10px; }
.chip strong { display: block; font-size: 14px; letter-spacing: -0.01em; }
.chip .status { font-size: 11.5px; }

/* ---------- Disciplines ---------- */
.disciplines { border-top: 1px solid var(--line); }
.discipline {
  display: grid; grid-template-columns: 80px minmax(0, 1.1fr) minmax(0, 1.4fr); gap: 32px;
  padding: 36px 0; border-bottom: 1px solid var(--line); align-items: start;
  transition: background-color .3s ease;
}
.discipline .num { font: 500 14px/1.9 var(--mono); color: var(--muted); }
.discipline h3 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
.discipline h3 .serif { color: var(--accent); }
.discipline p { color: var(--ink-2); max-width: 54ch; }
.discipline .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
@media (max-width: 760px) { .discipline { grid-template-columns: 1fr; gap: 12px; padding: 28px 0; } }

/* ---------- Work ---------- */
.feature-card {
  display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.25fr); gap: 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden;
  box-shadow: var(--shadow); transition: transform .35s cubic-bezier(.2, .8, .2, 1), box-shadow .35s ease;
}
.feature-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.feature-body { padding: 44px; display: flex; flex-direction: column; gap: 18px; }
.feature-body h3 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
.feature-body p { color: var(--ink-2); }
.feature-body .app-id { display: flex; align-items: center; gap: 14px; }
.feature-body .app-id img { width: 56px; height: 56px; border-radius: 14px; }
.feature-body .actions { margin-top: auto; padding-top: 12px; display: flex; flex-wrap: wrap; gap: 18px; align-items: center; }
.feature-media { background: var(--paper-2); padding: 40px 0 0 40px; display: flex; align-items: flex-end; }
.feature-media img { border-radius: 12px 0 0 0; border: 1px solid var(--line); border-right: 0; border-bottom: 0; box-shadow: var(--shadow); width: 100%; aspect-ratio: 16 / 10.5; object-fit: cover; object-position: top left; }
@media (max-width: 900px) { .feature-card { grid-template-columns: 1fr; } .feature-body { padding: 32px 24px; } .feature-media { padding: 24px 0 0 24px; } }

.work-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 20px; }
.work-card {
  display: flex; gap: 20px; padding: 28px; border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--line); transition: border-color .25s, transform .3s ease;
}
a.work-card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.work-card img { width: 64px; height: 64px; border-radius: 16px; flex: none; box-shadow: 0 0 0 1px var(--line); }
.work-card h3 { font-size: 20px; margin: 6px 0 8px; }
.work-card p { color: var(--muted); font-size: 15px; }
.work-card.placeholder { background: transparent; border-style: dashed; border-color: var(--line-strong); }
.work-card .flask { width: 64px; height: 64px; border-radius: 16px; flex: none; display: grid; place-items: center; background: var(--paper-2); color: var(--ink-2); }
@media (max-width: 760px) { .work-grid { grid-template-columns: 1fr; } .work-card { padding: 22px; } }

/* ---------- Process ---------- */
.process-wrap { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 64px; align-items: start; }
.process-wrap .section-head { position: sticky; top: 108px; margin-bottom: 0; }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps li { position: relative; padding: 0 0 40px 64px; counter-increment: step; }
.steps li::before {
  content: counter(step, decimal-leading-zero); position: absolute; left: 0; top: 0;
  width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px;
  font: 500 13px/1 var(--mono); background: var(--surface); border: 1px solid var(--line);
}
.steps li::after { content: ""; position: absolute; left: 20px; top: 48px; bottom: 8px; width: 1px; background: var(--line); }
.steps li:last-child { padding-bottom: 0; }
.steps li:last-child::after { display: none; }
.steps h3 { font-size: 21px; margin: 8px 0 8px; }
.steps p { color: var(--ink-2); max-width: 56ch; }
@media (max-width: 900px) { .process-wrap { grid-template-columns: 1fr; gap: 40px; } .process-wrap .section-head { position: static; } }

/* ---------- CTA ---------- */
.cta {
  position: relative; overflow: hidden; border-radius: 28px; padding: 72px 56px;
  background: var(--ink); color: var(--paper);
  display: grid; grid-template-columns: minmax(0, 1.4fr) auto; gap: 40px; align-items: end;
}
.cta::after {
  content: ""; position: absolute; right: -120px; top: -160px; width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle, rgba(185, 82, 31, .45), transparent 65%); pointer-events: none;
}
.cta h2 { font-size: clamp(2rem, 4.4vw, 3.4rem); letter-spacing: -0.04em; }
.cta p { color: #B9BCB5; margin-top: 16px; max-width: 52ch; font-size: 17px; }
.cta .eyebrow { color: #9DA19A; margin-bottom: 20px; }
.cta .btn-light { background: var(--paper); color: var(--ink); position: relative; z-index: 1; }
.cta .btn-light:hover { background: #fff; }
.cta-mail { display: block; margin-top: 14px; font: 500 13px/1 var(--mono); color: #9DA19A; text-align: right; position: relative; z-index: 1; }
@media (max-width: 760px) { .cta { grid-template-columns: 1fr; padding: 48px 24px; border-radius: 22px; } .cta-mail { text-align: left; } }

/* ---------- Footer ---------- */
.site-footer { padding: 64px 0 40px; margin-top: 40px; border-top: 1px solid var(--line); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.footer-grid p { color: var(--muted); font-size: 15px; margin-top: 14px; max-width: 34ch; }
.footer-grid h4 { font: 500 12.5px/1 var(--mono); color: var(--muted); letter-spacing: 0.02em; margin-bottom: 16px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 15px; }
.footer-grid ul a { color: var(--ink-2); transition: color .2s; }
.footer-grid ul a:hover { color: var(--ink); }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); font: 500 12.5px/1.4 var(--mono); color: var(--muted); }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > div:first-child { grid-column: 1 / -1; } }

/* ---------- Product pages ---------- */
.crumbs { display: flex; gap: 8px; align-items: center; font: 500 13px/1 var(--mono); color: var(--muted); }
.crumbs a:hover { color: var(--ink); }
.product-hero { padding: 56px 0 80px; }
.product-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 32px; align-items: center; margin-top: 40px; }
.product-head .app-icon { width: 112px; height: 112px; border-radius: 26px; box-shadow: 0 0 0 1px var(--line), var(--shadow); }
.product-head h1 { font-size: clamp(2.3rem, 5vw, 3.9rem); letter-spacing: -0.04em; margin: 10px 0 12px; }
.product-head .lede { color: var(--ink-2); font-size: 19px; max-width: 56ch; }
.product-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 32px; }
@media (max-width: 640px) { .product-head { grid-template-columns: 1fr; gap: 20px; } .product-head .app-icon { width: 84px; height: 84px; border-radius: 20px; } }

.notice { display: flex; gap: 12px; align-items: flex-start; margin-top: 28px; padding: 16px 18px; border-radius: var(--r-md); background: var(--paper-2); border: 1px solid var(--line); color: var(--ink-2); font-size: 15px; max-width: 640px; }

.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.facts div { padding: 22px 24px 22px 0; }
.facts div + div { padding-left: 24px; border-left: 1px solid var(--line); }
.facts dt { font: 500 12px/1 var(--mono); color: var(--muted); margin-bottom: 8px; }
.facts dd { margin: 0; font-weight: 500; }
@media (max-width: 760px) { .facts { grid-template-columns: 1fr 1fr; } .facts div:nth-child(3) { border-left: 0; padding-left: 0; } .facts div:nth-child(n+3) { border-top: 1px solid var(--line); } }

.features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.features article { padding: 32px 32px 32px 0; border-bottom: 1px solid var(--line); }
.features article:nth-child(even) { padding-left: 32px; padding-right: 0; border-left: 1px solid var(--line); }
.features h3 { font-size: 20px; margin-bottom: 8px; display: flex; align-items: center; gap: 10px; }
.features h3 .k { font: 500 12px/1 var(--mono); color: var(--accent); }
.features p { color: var(--ink-2); max-width: 48ch; }
@media (max-width: 760px) { .features { grid-template-columns: 1fr; } .features article, .features article:nth-child(even) { padding: 24px 0; border-left: 0; } }

.shots-wide { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.shots-wide figure { margin: 0; border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); }
.shots-wide figure:first-child { grid-column: 1 / -1; }
.shots-wide img { width: 100%; height: auto; }
.shots-phone { display: flex; gap: 20px; overflow-x: auto; padding: 4px 4px 20px; scroll-snap-type: x mandatory; }
.shots-phone img { height: 520px; width: auto; border-radius: 22px; border: 6px solid #17191B; scroll-snap-align: start; box-shadow: var(--shadow); }
@media (max-width: 760px) { .shots-wide { grid-template-columns: 1fr; } .shots-phone img { height: 420px; } }

/* ---------- Prose (privacy) ---------- */
.prose { max-width: 720px; }
.prose h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); letter-spacing: -0.04em; margin: 16px 0 12px; }
.prose .sub { font: 500 13px/1 var(--mono); color: var(--muted); margin-bottom: 40px; }
.prose h2 { font-size: 22px; margin: 48px 0 12px; }
.prose p, .prose li { color: var(--ink-2); }
.prose p + p { margin-top: 12px; }
.prose ul { margin: 12px 0; padding-left: 20px; display: grid; gap: 6px; }
.prose a { color: var(--accent); border-bottom: 1px solid currentColor; }

/* ---------- Reveal ---------- */
/* uses `translate` so it never fights hover `transform`s on the same element */
.js .reveal { opacity: 0; translate: 0 16px; }
.js .reveal.is-in { opacity: 1; translate: none; transition: opacity .7s cubic-bezier(.2, .8, .2, 1) var(--d, 0s), translate .7s cubic-bezier(.2, .8, .2, 1) var(--d, 0s), transform .35s cubic-bezier(.2, .8, .2, 1), box-shadow .35s ease, border-color .25s; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; translate: none; }
  *, *::before, *::after { transition-duration: 0s !important; }
}
.footer-mail { display: inline-block; margin-top: 14px; font: 500 13.5px/1 var(--mono); color: var(--ink-2); border-bottom: 1px solid var(--line-strong); padding-bottom: 3px; transition: color .2s, border-color .2s; }
.footer-mail:hover { color: var(--accent); border-color: currentColor; }
