/* studio.css — the Development page and the blog.
   The homepage keeps its own filmic style; these pages are the workshop:
   warm charcoal, one clean sans (Geist) with a mono for labels, BSR amber as the only accent. */

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

:root {
  --bg: #0e0e0f;
  --surface: #151517;
  --surface-2: #1b1b1e;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #f2efe9;
  --muted: #a6a39b;
  --faint: #6f6c66;
  --accent: #e8952e;
  --accent-soft: rgba(232, 149, 46, 0.14);
  --live: #6fcf8e;
  --radius: 20px;
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1160px;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

html { background: var(--bg); color-scheme: dark; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* ───── Top bar ───── */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(14, 14, 15, 0.78);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 16px; }
.brand {
  font-weight: 600; font-size: 0.95rem; letter-spacing: -0.01em; text-decoration: none;
  display: inline-flex; align-items: center; gap: 10px;
}
.brand::before {
  content: ""; width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 12px rgba(232, 149, 46, 0.6);
}
.nav { display: flex; gap: 4px; }
.nav a {
  font-size: 0.88rem; color: var(--muted); text-decoration: none;
  padding: 7px 12px; border-radius: 999px; transition: color .2s, background .2s;
}
.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav a[aria-current="page"] { color: var(--text); background: var(--surface-2); }

/* ───── Hero ───── */
.hero { padding: clamp(56px, 10vw, 112px) 0 clamp(32px, 6vw, 64px); }
.eyebrow {
  font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(2.4rem, 6.4vw, 4.6rem); line-height: 1.02; letter-spacing: -0.035em;
  font-weight: 600; max-width: 14ch;
}
.hero h1 span { color: var(--muted); }
.hero .lede {
  margin-top: 22px; max-width: 60ch; font-size: clamp(1.02rem, 1.6vw, 1.15rem); color: var(--muted);
}
.stats { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.stat {
  font-family: var(--mono); font-size: 0.78rem; color: var(--muted);
  border: 1px solid var(--line-strong); border-radius: 999px; padding: 6px 12px;
}
.stat b { color: var(--text); font-weight: 500; }

/* ───── Sections ───── */
.section { padding: clamp(28px, 5vw, 48px) 0; }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  border-top: 1px solid var(--line); padding-top: 22px; margin-bottom: 22px;
}
.section-head h2 { font-size: clamp(1.25rem, 2.4vw, 1.6rem); letter-spacing: -0.02em; font-weight: 600; }
.section-head p { font-size: 0.95rem; color: var(--muted); max-width: 52ch; }
.count { font-family: var(--mono); font-size: 0.75rem; color: var(--faint); white-space: nowrap; }
.subhead {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--faint); margin: 28px 0 14px;
}
.subhead:first-of-type { margin-top: 0; }

/* ───── App cards ───── */
.grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
}
.card {
  --tint: 232, 149, 46;
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; text-decoration: none; color: inherit;
  transition: border-color .25s, transform .25s, box-shadow .25s;
}
a.card:hover, .card:hover {
  border-color: rgba(var(--tint), 0.45);
  box-shadow: 0 18px 50px -24px rgba(var(--tint), 0.45);
}
a.card:hover { transform: translateY(-2px); }

.media {
  position: relative; height: 300px; overflow: hidden;
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(var(--tint), 0.30), transparent 62%),
    linear-gradient(180deg, var(--surface-2), var(--surface));
  border-bottom: 1px solid var(--line);
}
.media .screen {
  width: min(58%, 210px); margin: 30px auto 0;
  border-radius: 24px; border: 1px solid var(--line-strong);
  box-shadow: 0 24px 60px -18px rgba(0, 0, 0, 0.85);
  transition: transform .45s cubic-bezier(.2,.7,.2,1);
}
.card:hover .media .screen { transform: translateY(-6px); }
/* Phone cards: Apple's iPhone 18 Pro simulator chrome (436 × 908 body, 402 × 874 display inset 17pt,
   side buttons in the outer 10pt), the screenshot masked to the display, and the small Dynamic Island on top.
   Same geometry as the Timeline page. */
.media .device { position: relative; width: min(66%, 238px); aspect-ratio: 456 / 928; margin: 26px auto 0;
  filter: drop-shadow(0 24px 26px rgba(0, 0, 0, 0.6)); transition: transform .45s cubic-bezier(.2,.7,.2,1); }
.card:hover .media .device { transform: translateY(-6px); }
.device .device-frame { position: absolute; inset: 0; width: 100%; height: 100%; }
.device .product-screen { position: absolute; left: 5.9210526%; top: 2.9094828%; width: 88.1578947%; height: 94.1810345%;
  -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%201206%202622%22%3E%3Cpath%20d%3D%22M%20952.015625%200%20C%20968.042969%200%20984.070312%200.046875%201000.101562%200.640625%20C%201018.460938%201.320312%201036.609375%202.714844%201054.730469%206.089844%20C%201091.304688%2012.90625%201124.570312%2027.703125%201151.433594%2054.566406%20C%201178.300781%2081.433594%201193.097656%20114.703125%201199.910156%20151.28125%20C%201203.285156%20169.386719%201204.679688%20187.527344%201205.359375%20205.875%20C%201205.949219%20221.75%201206%20237.621094%201206%20253.5%20L%201206%202368.5%20C%201206%202384.378906%201205.949219%202400.25%201205.359375%202416.125%20C%201204.679688%202434.472656%201203.285156%202452.613281%201199.910156%202470.71875%20C%201193.097656%202507.296875%201178.300781%202540.566406%201151.433594%202567.433594%20C%201124.570312%202594.296875%201091.304688%202609.09375%201054.730469%202615.910156%20C%201036.609375%202619.285156%201018.460938%202620.679688%201000.101562%202621.359375%20C%20984.070312%202621.953125%20968.042969%202622%20952.015625%202622%20L%20253.984375%202622%20C%20237.957031%202622%20221.929688%202621.953125%20205.898438%202621.359375%20C%20187.542969%202620.679688%20169.390625%202619.285156%20151.269531%202615.910156%20C%20114.695312%202609.09375%2081.429688%202594.296875%2054.566406%202567.433594%20C%2027.699219%202540.566406%2012.902344%202507.296875%206.089844%202470.71875%20C%202.714844%202452.613281%201.320312%202434.472656%200.640625%202416.125%20C%200.0507812%202400.25%200%202384.378906%200%202368.5%20L%200%20253.5%20C%200%20237.621094%200.0507812%20221.75%200.640625%20205.875%20C%201.320312%20187.527344%202.714844%20169.386719%206.089844%20151.28125%20C%2012.902344%20114.703125%2027.699219%2081.433594%2054.566406%2054.566406%20C%2081.429688%2027.703125%20114.695312%2012.90625%20151.269531%206.089844%20C%20169.390625%202.714844%20187.542969%201.320312%20205.898438%200.640625%20C%20221.929688%200.046875%20237.957031%200%20253.984375%200%20Z%20M%20952.015625%200%20%22%2F%3E%3C%2Fsvg%3E") center / 100% 100% no-repeat; mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%201206%202622%22%3E%3Cpath%20d%3D%22M%20952.015625%200%20C%20968.042969%200%20984.070312%200.046875%201000.101562%200.640625%20C%201018.460938%201.320312%201036.609375%202.714844%201054.730469%206.089844%20C%201091.304688%2012.90625%201124.570312%2027.703125%201151.433594%2054.566406%20C%201178.300781%2081.433594%201193.097656%20114.703125%201199.910156%20151.28125%20C%201203.285156%20169.386719%201204.679688%20187.527344%201205.359375%20205.875%20C%201205.949219%20221.75%201206%20237.621094%201206%20253.5%20L%201206%202368.5%20C%201206%202384.378906%201205.949219%202400.25%201205.359375%202416.125%20C%201204.679688%202434.472656%201203.285156%202452.613281%201199.910156%202470.71875%20C%201193.097656%202507.296875%201178.300781%202540.566406%201151.433594%202567.433594%20C%201124.570312%202594.296875%201091.304688%202609.09375%201054.730469%202615.910156%20C%201036.609375%202619.285156%201018.460938%202620.679688%201000.101562%202621.359375%20C%20984.070312%202621.953125%20968.042969%202622%20952.015625%202622%20L%20253.984375%202622%20C%20237.957031%202622%20221.929688%202621.953125%20205.898438%202621.359375%20C%20187.542969%202620.679688%20169.390625%202619.285156%20151.269531%202615.910156%20C%20114.695312%202609.09375%2081.429688%202594.296875%2054.566406%202567.433594%20C%2027.699219%202540.566406%2012.902344%202507.296875%206.089844%202470.71875%20C%202.714844%202452.613281%201.320312%202434.472656%200.640625%202416.125%20C%200.0507812%202400.25%200%202384.378906%200%202368.5%20L%200%20253.5%20C%200%20237.621094%200.0507812%20221.75%200.640625%20205.875%20C%201.320312%20187.527344%202.714844%20169.386719%206.089844%20151.28125%20C%2012.902344%20114.703125%2027.699219%2081.433594%2054.566406%2054.566406%20C%2081.429688%2027.703125%20114.695312%2012.90625%20151.269531%206.089844%20C%20169.390625%202.714844%20187.542969%201.320312%20205.898438%200.640625%20C%20221.929688%200.046875%20237.957031%200%20253.984375%200%20Z%20M%20952.015625%200%20%22%2F%3E%3C%2Fsvg%3E") center / 100% 100% no-repeat; }
.device .dynamic-island { position: absolute; left: 50%; top: 4.0948276%; width: 18.4210526%; height: 3.0172414%;
  transform: translateX(-50%); border-radius: 999px; background: #000; box-shadow: inset 0 0 0 .5px #161616; }
.device .dynamic-island::after { content: ''; position: absolute; right: 10%; top: 28%; width: 12%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 38% 35%, #14202b, #080b10 58%, #030303); }
.media.wide .screen { width: min(78%, 280px); border-radius: 18px; }
.media.landscape .screen { width: 86%; border-radius: 12px; margin-top: 40px; }
.media.icon-only { display: grid; place-items: center; }
.media.icon-only .big-icon {
  width: 116px; height: 116px; border-radius: 26px;
  box-shadow: 0 20px 50px -16px rgba(var(--tint), 0.55), 0 0 0 1px var(--line-strong);
}
.media.icon-only .soon {
  position: absolute; bottom: 16px; left: 0; right: 0; text-align: center;
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--faint);
}

.body { padding: 20px 20px 22px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.head { display: flex; gap: 12px; align-items: center; }
.head .icon { width: 44px; height: 44px; border-radius: 11px; box-shadow: 0 0 0 1px var(--line-strong); flex: none; }
.head h3 { font-size: 1.15rem; font-weight: 600; letter-spacing: -0.015em; line-height: 1.2; }
.head h3 small { font-weight: 400; color: var(--faint); font-size: 0.85em; }
.kicker { font-size: 0.88rem; color: rgb(var(--tint)); line-height: 1.35; }
.summary { font-size: 0.95rem; color: var(--muted); line-height: 1.6; flex: 1; }
.meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pill {
  font-family: var(--mono); font-size: 0.7rem; color: var(--muted);
  border: 1px solid var(--line-strong); border-radius: 999px; padding: 3px 9px;
}
.pill.status { color: var(--text); display: inline-flex; align-items: center; gap: 6px; }
.pill.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.pill.status.live::before { background: var(--live); }
.pill.status.soon::before { background: #d9c36a; }
.more { font-size: 0.85rem; color: var(--accent); margin-left: auto; white-space: nowrap; }

/* ───── Blog index cards ───── */
.post-card .media { height: 260px; }
.post-card .num { font-family: var(--mono); font-size: 0.72rem; color: var(--accent); letter-spacing: 0.1em; }
.post-card h3 { font-size: 1.35rem; font-weight: 600; letter-spacing: -0.02em; }

/* ───── Prose (blog index intro, posts) ───── */
.prose { max-width: 680px; }
.prose p { font-size: 1.07rem; line-height: 1.75; color: #d9d5cd; margin-bottom: 18px; }
.prose p em, .prose em { font-style: normal; color: var(--accent); }
.prose h2 {
  font-size: 1.35rem; font-weight: 600; letter-spacing: -0.02em; margin: 44px 0 14px;
  padding-top: 22px; border-top: 1px solid var(--line);
}
.prose h2:first-child { margin-top: 0; }
.prose a { color: var(--accent); text-underline-offset: 3px; }
.prose ul { list-style: none; margin: 0 0 22px; padding: 0; }
.prose li { position: relative; padding-left: 22px; margin-bottom: 10px; font-size: 1.02rem; line-height: 1.65; color: #d9d5cd; }
.prose li::before { content: ""; position: absolute; left: 4px; top: 0.72em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.prose li strong { color: var(--text); font-weight: 600; }

/* Posts */
.post-header { padding: clamp(48px, 9vw, 96px) 0 clamp(24px, 4vw, 40px); max-width: 780px; }
.post-header .eyebrow { margin-bottom: 14px; }
.post-header h1 { font-size: clamp(2.6rem, 7vw, 4.4rem); font-weight: 600; letter-spacing: -0.04em; line-height: 1; }
.post-header .lede { margin-top: 18px; font-size: clamp(1.05rem, 1.8vw, 1.25rem); color: var(--muted); max-width: 56ch; }
.post-header .divider { display: none; }

.shots {
  display: grid; gap: 16px; margin: 32px 0 12px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
}
.prose .shots { width: min(100vw - 2 * var(--gutter), 900px); }
.shots figure { margin: 0; }
.shots img {
  width: 100%; height: auto; border-radius: 22px; border: 1px solid var(--line-strong);
  box-shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.9);
}
.shots figcaption { font-family: var(--mono); font-size: 0.72rem; color: var(--faint); margin-top: 10px; text-align: center; }

.links { display: flex; flex-wrap: wrap; gap: 10px; margin: 36px 0 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
  background: var(--accent); color: #111; font-weight: 600; font-size: 0.92rem;
  padding: 10px 18px; border-radius: 999px; transition: filter .2s, transform .2s;
}
.btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn.ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px var(--line-strong); }
/* .prose a would otherwise paint button text accent-on-accent inside posts. */
.prose .btn { color: #111; text-decoration: none; }
.prose .btn.ghost { color: var(--text); }
.back { display: inline-block; margin-top: 28px; font-size: 0.9rem; color: var(--muted); text-decoration: none; }
.back:hover { color: var(--text); }

/* Callout (Development → blog, blog → Development) */
.callout {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 24px; margin: 8px 0 0;
}
.callout p { color: var(--muted); max-width: 60ch; }
.callout strong { color: var(--text); font-weight: 600; }

/* Maker banner: BSR mark, eyebrow, heading (as on the Timeline by BSR page) */
.closing { padding: 30px; }
.closing.family { margin-bottom: 28px; }
.maker { display: flex; align-items: center; gap: 22px; flex: 1 1 540px; }
.bsr-mark { flex: 0 0 auto; display: block; }
.bsr-mark img { display: block; height: 44px; width: auto; opacity: .86; }
.closing .eyebrow { font-size: .65rem; margin-bottom: 10px; color: var(--accent); }
.closing h2 { font-size: 1.24rem; font-weight: 500; letter-spacing: -.025em; margin-bottom: 5px; }
.closing p { font-size: .85rem; }
@media (max-width: 640px) {
  .closing { padding: 24px; }
  .maker { flex-direction: column; align-items: flex-start; gap: 16px; }
  .bsr-mark img { height: 38px; }
}

/* ───── Footer ───── */
.footer { border-top: 1px solid var(--line); margin-top: clamp(40px, 8vw, 80px); }
.footer .wrap {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  padding-top: 26px; padding-bottom: 40px;
  font-family: var(--mono); font-size: 0.75rem; color: var(--faint);
}
.footer a { color: var(--muted); text-decoration: none; }
.footer a:hover { color: var(--text); }
.footer .social { display: inline-flex; align-items: center; gap: 16px; }
/* Three footer groups: copyright left, site links truly centered, social icons right. Stacks on phones. */
@media (min-width: 700px) {
  .footer .wrap { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
  .footer .wrap > :last-child { justify-self: end; }
}
.footer .social a { display: block; }
.footer .social svg { display: block; width: 17px; height: 17px; fill: currentColor; }

/* ───── Motion ───── */
@media (prefers-reduced-motion: no-preference) {
  .rise { animation: rise .7s cubic-bezier(.2,.7,.2,1) both; }
  .rise.d1 { animation-delay: .06s; } .rise.d2 { animation-delay: .12s; } .rise.d3 { animation-delay: .18s; }
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

@media (max-width: 520px) {
  .media { height: 260px; }
  .nav a { padding: 7px 9px; }
  .section-head { flex-direction: column; gap: 6px; }
}

/* ───── Light theme (the blog) ─────
   <html class="light"> on a page turns it light, so the blog reads as the writing side next to the dark
   Development page. Amber stays the fill (buttons, dots) with black text on it; where amber is text on
   the light paper it deepens to --accent-ink so it stays readable. */
html.light {
  --bg: #f7f4ee;
  --surface: #ffffff;
  --surface-2: #f2eee6;
  --line: rgba(26, 24, 20, 0.09);
  --line-strong: rgba(26, 24, 20, 0.16);
  --text: #1a1814;
  --muted: #5f5a52;
  --faint: #8a847a;
  --accent-ink: #975708;
  --accent-soft: rgba(232, 149, 46, 0.16);
  color-scheme: light;
}
html.light .topbar { background: rgba(247, 244, 238, 0.82); }
html.light .eyebrow, html.light .more, html.light .post-card .num, html.light .closing .eyebrow,
html.light .prose em, html.light .prose a { color: var(--accent-ink); }
html.light .prose .btn { color: #111; }
html.light .prose .btn.ghost { color: var(--text); }
html.light .prose p, html.light .prose li { color: #34302a; }
html.light .kicker { color: color-mix(in srgb, rgb(var(--tint)) 60%, black); }
html.light .media .screen { box-shadow: 0 22px 44px -20px rgba(0, 0, 0, 0.35); }
html.light .media .device { filter: drop-shadow(0 18px 22px rgba(0, 0, 0, 0.28)); }
html.light .shots img { box-shadow: 0 22px 44px -22px rgba(0, 0, 0, 0.3); }
html.light .card:hover { box-shadow: 0 18px 44px -24px rgba(var(--tint), 0.55), 0 0 0 1px var(--line-strong); }
html.light .brand::before { box-shadow: 0 0 10px rgba(232, 149, 46, 0.45); }
