/* The theme every inner page shares with the film homepage (insights, articles,
   work, products, built, UGC, demos, privacy). Loaded after each page's own
   sheet, so the structure stays and the surface matches the homepage: warm
   paper, ink type, one violet accent for what is live or tappable. Header and
   footer come from src/space-shell.js. Tokens mirror public/film/film.css. */

:root {
  --paper: #f6f3ec;
  --paper-2: #efe9dc;
  --ink: #15131c;
  --ink-2: #5d5869;
  --ink-3: #6b6677;
  --line: rgb(21 19 28 / 0.12);
  --line-soft: rgb(21 19 28 / 0.07);
  --blue: #5b3bff;
  --ember: #5b3bff;
  --violet: #5b3bff;
  --panel: #fffdf8;
  --white: #fffdf8;
  --night: #14122a;
  --bg: #f6f3ec;
  --shadow: none;
  --radius: 16px;
  --font: 'Hanken Grotesk', 'Zen Kaku Gothic New', -apple-system, BlinkMacSystemFont, 'Hiragino Kaku Gothic ProN', sans-serif;
  --mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: light;
}
html[lang='ja'] { --font: 'Zen Kaku Gothic New', 'Hanken Grotesk', -apple-system, 'Hiragino Kaku Gothic ProN', sans-serif; }
html { background: var(--paper-2); }
body { background: var(--bg) !important; color: var(--ink); font-family: var(--font); line-height: 1.45; -webkit-font-smoothing: antialiased; }
::selection { background: var(--violet); color: var(--white); }
a { text-decoration-color: rgb(91 59 255 / 0.5); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
main, .s-foot, .s-top { position: relative; z-index: 1; }

/* ---------- header, the homepage nav once it turns solid ---------- */
.s-top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 32px;
  padding: 14px var(--gut, 24px);
  color: var(--ink);
  background: rgb(246 243 236 / 0.86);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.s-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 500 16px 'Hanken Grotesk', sans-serif; letter-spacing: 0.02em; margin: 0; }
.s-brand b { font-weight: 700; }
.s-brand .mark { width: 24px; height: 24px; fill: currentColor; flex: none; }
.s-top nav { display: flex; gap: 28px; margin-left: auto; }
.s-top nav a { display: inline-flex; align-items: center; min-height: 24px; color: var(--ink); text-decoration: none; font-size: 13px; }
.s-top nav a:hover { text-decoration: underline; text-underline-offset: 3px; }
.s-top nav a[aria-current='page'] { text-decoration: underline; text-decoration-color: var(--violet); text-decoration-thickness: 2px; text-underline-offset: 6px; }
.s-cta { display: inline-flex; align-items: center; gap: 8px; min-height: 24px; color: var(--ink); text-decoration: none; font-size: 13px; white-space: nowrap; }
.s-cta::after { content: '✳'; font-size: 12px; color: var(--violet); }
.s-cta:hover { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 900px) {
  .s-top { gap: 16px; padding: 12px 16px; }
  .s-top nav { gap: 18px; overflow-x: auto; scrollbar-width: none; margin-left: 0; flex: 1; min-width: 0; }
  .s-top nav::-webkit-scrollbar { display: none; }
  .s-top nav a { white-space: nowrap; padding: 10px 0; }
  .s-brand span { display: none; }
  .s-cta { display: none; }
}

/* ---------- footer, the homepage's night footer ---------- */
.s-foot { display: grid; grid-template-columns: 1fr 1fr 2fr; gap: 24px; padding: 56px var(--gut, 24px) 64px; margin-top: 120px; background: var(--night); color: #cfcadf; font-size: 13px; line-height: 1.7; }
.s-foot p { margin: 0; }
.s-foot .s-brand { align-self: start; color: var(--white); }
.s-foot .s-brand .mark { width: 28px; height: 28px; }
.s-foot nav { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: flex-end; align-items: baseline; }
.s-foot a, .s-foot .cc-open { color: #cfcadf; text-decoration: none; background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
.s-foot a:hover, .s-foot .cc-open:hover { color: var(--white); text-decoration: underline; text-underline-offset: 3px; }
.s-foot a:focus-visible, .s-foot .cc-open:focus-visible { outline-color: var(--white); }
.nowrap { white-space: nowrap; }
@media (max-width: 900px) { .s-foot { grid-template-columns: 1fr; } .s-foot nav { justify-content: flex-start; } }

/* ---------- shared pieces from article.css ---------- */
.a-btn, .a-btn-lg { background: var(--ink) !important; color: var(--white) !important; border-radius: 999px; font-weight: 500; }
.a-btn:hover { background: var(--violet) !important; }
.i-list, .a-toc, .a-sources, .a-body blockquote, .a-body code, .a-cta { background: var(--panel); border: 1px solid var(--line); box-shadow: none; }
.a-cta, .a-cta h2, .a-cta p { color: var(--ink); }
.a-body a, .a-sources a, .i-title a:hover { color: var(--ink); text-decoration-color: var(--violet); }
.a-body th { background: rgb(21 19 28 / 0.04); }
.a-body hr { border-color: var(--line); }
.i-h1, .a-head h1, .a-cta h2, .p-head h1, .b-head h1, .u-head h1, .w-head h1, .d-head h1 { font-weight: 300; letter-spacing: -0.03em; line-height: 0.98; }
html[lang='ja'] .i-h1, html[lang='ja'] .a-head h1, html[lang='ja'] h1 { letter-spacing: 0; line-height: 1.12; }
.i-title, .a-body h2, .a-body h3 { font-weight: 500; }
.a-meta, .i-num, .a-back { color: var(--ink-3); }
.a-tag, .i-tag { color: var(--violet); }

/* ---------- built ---------- */
.b-card, .b-shot { box-shadow: none !important; border: 1px solid var(--line); }

/* ---------- products ---------- */
.p-dock, .p-dock-float { background: rgb(255 253 248 / 0.9) !important; border-color: var(--line) !important; box-shadow: none !important; }
.p-store, .p-badge { color: var(--white) !important; background: var(--ink) !important; border-color: var(--ink) !important; box-shadow: none !important; }

/* ---------- UGC ---------- */
.snd { background: rgb(20 18 42 / 0.82) !important; color: var(--white); }
.snd:hover { background: var(--night) !important; }
.snd[aria-pressed='true'] { background: var(--violet) !important; color: var(--white) !important; }
.u-phone.is-sound { box-shadow: 0 0 0 2px var(--violet) !important; }

/* ---------- demos ---------- */
.d-card, .d-objects, .d-form, .d-card a { background: var(--panel) !important; border: 1px solid var(--line); box-shadow: none !important; }
.d-open { color: var(--white) !important; background: var(--ink) !important; }
.d-card-title { color: var(--ink); font-weight: 500; }
.d-card-line, .d-meta { color: var(--ink-2) !important; }
.d-field input, .d-field select, .d-field textarea { background: var(--white) !important; color: var(--ink) !important; border-color: var(--line) !important; }
.d-form-note[data-tone='ok'] { color: #14693c !important; }
.d-form-note[data-tone='err'] { color: #b3261e !important; }

/* ---------- work ---------- */
.w-cover, .w-shot { box-shadow: none !important; border: 1px solid var(--line); }

/* Japanese breaks at phrase boundaries, never mid word */
:lang(ja) p, :lang(ja) h1, :lang(ja) h2, :lang(ja) h3, :lang(ja) li, :lang(ja) dd { word-break: auto-phrase; }
.w-canvas:focus-visible { box-shadow: inset 0 0 0 2px var(--violet) !important; }
.w-text:focus-visible { outline-color: var(--violet) !important; }
.b-url { color: var(--ink-2); }
.skip { position: absolute; left: -9999px; z-index: 30; }
.skip:focus { left: 16px; top: 16px; padding: 10px 14px; background: var(--white); color: var(--ink); border-radius: 10px; }
.lost h1 { font-weight: 500; }
.w-label span { color: var(--violet) !important; }
.w-log::before { background: var(--violet) !important; }
