/* MONADOCORE — secondary-page proposals: the shared system. Tokens, header, grid, chapter mark, titles, copy, links, colophon and
   the reveal vocabulary are taken from the approved home-v7 so the three directions extend the homepage instead of restyling it.
   (Copied, not linked: the proposals never touch html/home-v7.) */
:root {
  --bg: #0e0e10; --bg-2: #131316; --bg-3: #19191d;
  --ink: #ece9e2; --ink-2: #c9c6bf; --muted: #8e939c;
  --line: rgba(236, 233, 226, 0.12); --line-2: rgba(236, 233, 226, 0.06);
  --crimson: #a3192a; --crimson-2: #d0283a; --cyan: #4fd8ff;
  --font-sans: "Familjen Grotesk", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: "DM Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --gutter: clamp(20px, 5vw, 80px); --col-gap: clamp(16px, 1.8vw, 28px);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --bg-projects: #0b0b0d; --bg-tools: #151519; --bg-blog: #0a0a0c; --bg-about: #10100f;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); color: var(--ink); scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { font-family: var(--font-sans); font-size: 17px; line-height: 1.5; background: var(--bg); min-height: 100vh; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
::selection { background: var(--crimson); color: #fff; }

/* header — identical to the homepage (wordmark left, four links right, veil once scrolled) */
.site-head { position: fixed; inset: 0 0 auto 0; z-index: 50; display: flex; justify-content: space-between; align-items: center; padding: 24px var(--gutter); pointer-events: none; }
.site-head > * { pointer-events: auto; }
.site-head::before { content: ""; position: absolute; inset: 0; height: 140%; background: linear-gradient(to bottom, rgba(14,14,16,0.92) 0%, rgba(14,14,16,0.6) 55%, rgba(14,14,16,0) 100%); opacity: 0; transition: opacity 0.4s; pointer-events: none; z-index: -1; }
.site-head.is-scrolled::before { opacity: 1; }
.wordmark { font-weight: 700; letter-spacing: 0.28em; font-size: 13px; color: var(--ink); }
.site-nav { display: flex; gap: 34px; }
.site-nav a { font-size: 13px; letter-spacing: 0.08em; color: var(--muted); position: relative; padding: 4px 0; transition: color 0.3s; }
.site-nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px; background: var(--crimson-2); transform: scaleX(0); transform-origin: left; transition: transform 0.35s var(--ease); }
.site-nav a:hover, .site-nav a.is-active { color: var(--ink); }
.site-nav a.is-active::after { transform: scaleX(1); }

/* page frame and grid */
.page { position: relative; padding-top: 128px; }
.grid { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); row-gap: 0; align-items: start; padding-left: var(--gutter); padding-right: var(--gutter); }
.tex { position: absolute; inset: 0; pointer-events: none; color: var(--ink); opacity: 0.05; }
.tex svg { position: absolute; left: 0; top: 0; width: 100%; height: 100%; }

/* chapter mark, return link, titles, copy — the homepage vocabulary */
.ch-mark { display: flex; align-items: center; gap: 16px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--muted); }
.ch-idx { color: var(--crimson-2); }
.ch-rule { display: block; height: 1px; width: 64px; background: var(--line); }
.return { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); transition: color 0.3s; }
.return::before { content: "←"; margin-right: 10px; color: var(--crimson-2); display: inline-block; transition: transform 0.3s var(--ease); }
.return:hover { color: var(--ink); } .return:hover::before { transform: translateX(-5px); }
.ch-title { font-size: clamp(3.5rem, 7vw, 6.6rem); font-weight: 600; letter-spacing: -0.04em; line-height: 0.92; position: relative; color: var(--ink); }
.ct-clip { display: block; overflow: hidden; } .ct-word { display: block; }
.ch-lede { font-size: clamp(1.15rem, 1.55vw, 1.45rem); color: var(--ink); line-height: 1.35; letter-spacing: -0.01em; }
.ch-body { color: var(--ink-2); font-size: 1rem; line-height: 1.55; text-wrap: balance; }
.link-arrow { display: inline-block; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink); position: relative; padding-bottom: 4px; }
.link-arrow::after { content: "→"; margin-left: 10px; color: var(--crimson-2); display: inline-block; transition: transform 0.3s var(--ease); }
.link-arrow:hover::after { transform: translateX(6px); }
.micro { display: flex; justify-content: space-between; gap: 16px; padding-top: 12px; border-top: 1px solid var(--line-2); font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.micro-idx { color: var(--ink-2); }
.mono { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.ph { color: var(--muted); }   /* placeholder marker */

/* reveal vocabulary: a section with data-reveal gets .in when ≥ 25 % is visible; children with data-rv rise 14 px and fade */
[data-rv] { opacity: 0; transform: translateY(14px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); transition-delay: var(--d, 0s); }
.in [data-rv] { opacity: 1; transform: none; }
.ch-title .ct-word { transform: translateY(104%); transition: transform 0.9s var(--ease) 0.2s; }
.in .ch-title .ct-word { transform: none; }
.ct-rule { position: absolute; left: 0; bottom: -14px; height: 1px; width: 0; background: var(--ink-2); opacity: 0.6; transition: width 1.1s var(--ease) 0.5s; }
.in .ct-rule { width: 100%; }

/* colophon — the homepage footer, unchanged */
.site-foot { padding: 26px var(--gutter) 30px; border-top: 1px solid var(--line-2); margin-top: clamp(64px, 9vh, 120px); }
.colophon { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.2em; text-transform: uppercase; line-height: 1.9; color: var(--muted); }
.colophon .col-a { color: var(--ink-2); } .colophon .col-c { opacity: 0.85; }
.colophon .col-sep { margin: 0 0.6em; color: var(--muted); opacity: 0.55; }

@media (prefers-reduced-motion: reduce) {
  [data-rv], .ct-word { opacity: 1 !important; transform: none !important; transition: none !important; }
  .ct-rule { width: 100% !important; transition: none !important; }
}
body.qa-static *, body.qa-static *::before, body.qa-static *::after { transition: none !important; animation-duration: 0.01s !important; animation-delay: 0s !important; }
@media (max-width: 820px) {
  .grid { grid-template-columns: minmax(0, 1fr); }
  .grid > * { grid-column: 1 / -1 !important; grid-row: auto !important; }
  .site-nav { gap: 16px; } .site-nav a { font-size: 11px; }
}
