/* ══════════════════════════════════════════════════
   Shared chrome for generated pages (services, writing).
   Tokens, nav, buttons, section shell, contact and footer
   are copied from index.html so the pages match exactly.
   Generated pages: see scripts/build.js
══════════════════════════════════════════════════ */
:root {
  --white:    #FFFFFF;
  --off:      #F5F5F5;
  --border:   #E8E8E8;
  --ink:      #0D0D0D;
  --ink-2:    #3A3A3A;
  --ink-3:    #5A5A5A;
  --ink-4:    #666666;
  --orange:   #FF3D00;
  --orange-d: #D93200;
  --dark:     #0A0A0A;
  --dark-2:   #111111;
  --dark-3:   #1A1A1A;

  --sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'Space Mono', monospace;

  --ease:   cubic-bezier(0.16, 1, 0.3, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  --nav-h:  60px;
  --gutter: clamp(20px, 4vw, 64px);
  --mw:     1320px;
  --prose:  720px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: hidden; max-width: 100%; }
body {
  font-family: var(--sans); background: var(--white); color: var(--ink);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; border: none; background: none; cursor: pointer; }
img { display: block; max-width: 100%; }
ul { list-style: none; }

.skip { position: absolute; left: -9999px; top: 8px; padding: 8px 16px; background: var(--orange); color: #fff; font-size: 13px; font-weight: 600; border-radius: 6px; z-index: 10000; }
.skip:focus { left: 16px; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; border-radius: 3px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .rev { opacity: 1 !important; transform: none !important; }
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .5; } }

/* ── NAV (index.html) ── */
#nav {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-h); z-index: 200;
  display: flex; align-items: center;
  padding: 0 var(--gutter);
  transition: background .35s, border-color .35s, box-shadow .35s;
  background: rgba(255,255,255,.0);
}
#nav.scrolled {
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(255,255,255,.8);
}
.n-logo { font-family: var(--sans); font-size: 18px; font-weight: 800; letter-spacing: -.04em; color: var(--ink); flex: 1; }
.n-logo sup { font-size: 8px; font-weight: 700; font-style: normal; color: var(--orange); vertical-align: super; margin-left: 1px; letter-spacing: .04em; }
.n-links { display: flex; gap: 28px; }
.n-links a { font-size: 13px; font-weight: 600; color: var(--ink-3); letter-spacing: -.01em; transition: color .18s; position: relative; padding-bottom: 2px; }
.n-links a::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 1.5px; background: var(--orange); transition: width .25s var(--ease); }
.n-links a:hover, .n-links a[aria-current="page"] { color: var(--ink); }
.n-links a:hover::after, .n-links a[aria-current="page"]::after { width: 100%; }
.n-cta {
  display: inline-flex; align-items: center; gap: 7px; padding: 9px 18px;
  background: var(--ink); color: #fff; font-family: var(--sans); font-size: 13px;
  font-weight: 700; letter-spacing: -.01em; border-radius: 100px; margin-left: 24px;
  transition: background .18s, transform .3s var(--spring), box-shadow .3s; white-space: nowrap;
}
.n-cta:hover { background: var(--orange); transform: scale(1.04) translateY(-1px); box-shadow: 0 8px 24px rgba(255,61,0,.28); }
.n-cta svg { width: 12px; transition: transform .18s var(--ease); }
.n-cta:hover svg { transform: translate(2px,-2px); }

.n-ham {
  display: none; flex-direction: column; gap: 5px; width: 44px; height: 44px; padding: 10px;
  justify-content: center; align-items: center; margin-left: auto; cursor: pointer;
  background: none; border: none; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.n-ham span { display: block; width: 100%; height: 1.5px; background: var(--ink); border-radius: 2px; transform-origin: center; transition: transform .3s var(--ease), opacity .3s; }
.n-ham.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.n-ham.open span:nth-child(2) { opacity: 0; }
.n-ham.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
@media (max-width: 768px) {
  .n-links { display: none !important; }
  .n-cta { display: none !important; }
  .n-ham { display: flex !important; }
}
#mob-nav {
  position: fixed; top: var(--nav-h); left: 0; right: 0;
  background: var(--white); border-bottom: 1px solid var(--border);
  padding: 8px var(--gutter) 24px; z-index: 198;
  display: flex; flex-direction: column; visibility: hidden;
  transform: translateY(-8px); opacity: 0; pointer-events: none;
  transition: opacity .3s var(--ease), transform .3s var(--ease), visibility .3s;
}
#mob-nav.show { visibility: visible; opacity: 1; transform: translateY(0); pointer-events: auto; }
#mob-nav a { font-size: 16px; font-weight: 700; color: var(--ink); padding: 14px 0; border-bottom: 1px solid var(--border); letter-spacing: -.02em; transition: color .18s; }
#mob-nav a:last-of-type { border-bottom: none; }
#mob-nav a:hover, #mob-nav a:active { color: var(--orange); }

/* ── BUTTONS (index.html) ── */
.btn-black {
  display: inline-flex; align-items: center; gap: 8px; padding: 13px 28px;
  background: var(--ink); color: #fff; font-family: var(--sans); font-size: 14px;
  font-weight: 700; letter-spacing: -.02em; border-radius: 100px; white-space: nowrap;
  transition: background .18s, transform .3s var(--spring), box-shadow .3s;
}
.btn-black:hover { background: var(--orange); transform: scale(1.04) translateY(-2px); box-shadow: 0 10px 28px rgba(255,61,0,.28); }
.btn-black svg { width: 13px; transition: transform .18s var(--ease); }
.btn-black:hover svg { transform: translate(3px,-3px); }
.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 24px;
  border: 1.5px solid var(--border); color: var(--ink-2); border-radius: 100px;
  font-family: var(--sans); font-size: 14px; font-weight: 600; letter-spacing: -.02em; white-space: nowrap;
  transition: all .22s var(--ease);
}
.btn-ghost:hover { border-color: var(--ink); background: var(--ink); color: #fff; transform: scale(1.04) translateY(-2px); }

/* ── SECTION SHELL (index.html) ── */
.sec { padding: clamp(56px, 7vw, 96px) var(--gutter); border-bottom: 1px solid var(--border); }
.sec-inner { max-width: var(--mw); margin: 0 auto; }
.sec-label { display: flex; align-items: center; gap: 16px; margin-bottom: clamp(24px, 3vw, 40px); }
.sec-num { font-family: var(--mono); font-size: 10px; letter-spacing: .08em; color: var(--ink-4); background: var(--off); border: 1px solid var(--border); border-radius: 4px; padding: 3px 7px; flex-shrink: 0; }
.sec-tag { font-family: var(--mono); font-size: 10px; letter-spacing: .12em; color: var(--ink-4); text-transform: uppercase; }
.sec-rule { flex: 1; height: 1px; background: var(--border); }
.sec-title { font-family: var(--sans); font-size: clamp(28px, 4vw, 56px); font-weight: 800; letter-spacing: -.04em; line-height: 1.0; color: var(--ink); }
.sec-title em { font-style: italic; color: var(--ink-4); font-weight: 600; }

.rev { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.rev.on { opacity: 1; transform: translateY(0); }
.d1 { transition-delay: .1s; } .d2 { transition-delay: .2s; } .d3 { transition-delay: .3s; } .d4 { transition-delay: .4s; }

/* ── PAGE HERO ── */
/* Above the fold: CSS entrance like index.html's hero (fadeUp), no JS needed */
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.hero-in { animation: fadeUp .6s var(--ease) both; }
.hero-in.d1 { animation-delay: .1s; } .hero-in.d2 { animation-delay: .2s; } .hero-in.d3 { animation-delay: .3s; }
.pg-hero { padding: calc(var(--nav-h) + clamp(48px, 7vw, 96px)) var(--gutter) clamp(40px, 5vw, 72px); border-bottom: 1px solid var(--border); }
.pg-hero-inner { max-width: var(--mw); margin: 0 auto; }
.pg-eyebrow {
  font-family: var(--mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--orange-d); margin-bottom: 20px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.pg-eyebrow::after { content: ''; display: block; width: 48px; height: 1px; background: var(--orange); opacity: .4; }
.pg-eyebrow a { color: var(--ink-4); }
.pg-eyebrow a:hover { color: var(--ink); }
.pg-h1 { font-size: clamp(38px, 6.4vw, 88px); font-weight: 800; letter-spacing: -.045em; line-height: 1.0; color: var(--ink); max-width: 1100px; }
.pg-h1 em { font-style: italic; font-weight: 600; color: var(--ink-4); }
.pg-lead { margin-top: clamp(20px, 2.6vw, 32px); font-size: clamp(17px, 1.7vw, 21px); line-height: 1.65; color: var(--ink-2); font-weight: 500; max-width: 760px; }
.pg-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: clamp(24px, 3vw, 36px); }
.pg-meta { margin-top: 18px; font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-4); }
.pg-meta a { color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; }

/* ── PROSE ── */
.prose { font-size: clamp(16px, 1.45vw, 18px); line-height: 1.75; color: var(--ink-2); font-weight: 400; max-width: var(--prose); }
.prose > * + * { margin-top: 1.15em; }
.prose h2 { font-size: clamp(24px, 2.8vw, 34px); font-weight: 800; letter-spacing: -.035em; line-height: 1.12; color: var(--ink); margin-top: 2.1em; scroll-margin-top: calc(var(--nav-h) + 16px); }
.prose h3 { font-size: clamp(18px, 1.8vw, 21px); font-weight: 700; letter-spacing: -.02em; line-height: 1.3; color: var(--ink); margin-top: 1.8em; }
.prose h2 + *, .prose h3 + * { margin-top: .7em; }
.prose strong { color: var(--ink); font-weight: 700; }
.prose a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--orange); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
.prose a:hover { color: var(--orange); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose ul { list-style: none; padding-left: 0; }
.prose ul > li { position: relative; padding-left: 22px; }
.prose ul > li::before { content: ''; position: absolute; left: 2px; top: .78em; width: 8px; height: 1.5px; background: var(--orange); }
.prose ol > li { padding-left: 6px; }
.prose ol > li::marker { font-family: var(--mono); font-size: .8em; color: var(--ink-4); }
.prose li + li { margin-top: .5em; }
.prose blockquote { border-left: 2px solid var(--orange); padding: 4px 0 4px 20px; color: var(--ink); font-weight: 600; font-size: 1.06em; }
.prose code { font-family: var(--mono); font-size: .85em; background: var(--off); border: 1px solid var(--border); border-radius: 4px; padding: 1px 5px; }

/* Answer-first box */
.answer { border: 1px solid var(--border); border-left: 3px solid var(--orange); background: var(--off); border-radius: 0 14px 14px 0; padding: clamp(18px, 2.4vw, 26px) clamp(20px, 2.6vw, 30px); max-width: var(--prose); }
.answer-label { font-family: var(--mono); font-size: 9px; letter-spacing: .14em; text-transform: uppercase; color: #C42D00; margin-bottom: 8px; }
.answer p { font-size: clamp(16px, 1.55vw, 19px); line-height: 1.65; color: var(--ink); font-weight: 600; letter-spacing: -.01em; }

/* ── SERVICE PAGE SECTIONS ── */
.svc-sec .sec-title { max-width: 900px; font-size: clamp(26px, 3.4vw, 46px); line-height: 1.05; }
.svc-sec .prose { margin-top: clamp(20px, 2.4vw, 30px); }
.svc-sec .prose ol { list-style: none; padding: 0; counter-reset: step; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; max-width: none; }
.svc-sec .prose ol > li { counter-increment: step; border: 1px solid var(--border); border-radius: 16px; padding: 22px 20px 20px; margin: 0; background: var(--white); font-size: 15px; line-height: 1.6; }
.svc-sec .prose ol > li::before { content: counter(step, decimal-leading-zero); display: block; font-family: var(--mono); font-size: 10px; letter-spacing: .08em; color: var(--orange); margin-bottom: 12px; }
.svc-sec .prose ol > li strong { display: block; font-size: 17px; letter-spacing: -.02em; margin-bottom: 6px; }
.svc-sec .prose:has(ol) { max-width: none; }
.svc-sec .prose ul { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 10px 32px; max-width: 980px; }
.svc-sec .prose ul > li { margin: 0; }
.svc-sec .prose:has(ul) { max-width: 980px; }

/* ── FAQ (index.html) ── */
.faq-list { margin-top: clamp(28px, 3.5vw, 44px); border-top: 1px solid var(--border); max-width: 880px; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: clamp(18px, 2.2vw, 24px) 0; font-size: clamp(16px, 1.6vw, 20px); font-weight: 700; letter-spacing: -.02em; color: var(--ink);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: ''; flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--border);
  background: linear-gradient(var(--ink), var(--ink)) center / 10px 1.5px no-repeat, linear-gradient(var(--ink), var(--ink)) center / 1.5px 10px no-repeat;
  transition: transform .3s var(--ease), border-color .2s;
}
.faq-item summary:hover::after { border-color: var(--ink-4); }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .faq-a { padding: 0 52px clamp(20px, 2.4vw, 26px) 0; max-width: 772px; }
.faq-item .faq-a p { font-size: clamp(14px, 1.3vw, 16px); line-height: 1.7; color: var(--ink-3); font-weight: 500; }
.faq-item .faq-a p + p { margin-top: .8em; }
.faq-item .faq-a a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* ── ARTICLE ── */
.art-wrap { padding: clamp(40px, 5vw, 72px) var(--gutter) clamp(56px, 6vw, 88px); }
.art-inner { max-width: var(--prose); margin: 0 auto; }
.art-hero .pg-hero-inner { max-width: var(--prose); }
.art-hero .pg-h1 { font-size: clamp(34px, 5vw, 60px); line-height: 1.04; letter-spacing: -.04em; }
.art-draft { margin-bottom: 18px; display: inline-block; font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; background: #FFF4E5; color: #8A3B00; border: 1px solid #FFD8A8; border-radius: 100px; padding: 5px 12px; }
.art-toc { margin-top: clamp(28px, 3vw, 40px); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 18px 0; }
.art-toc-label { font-family: var(--mono); font-size: 9px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-4); margin-bottom: 10px; }
.art-toc ol { list-style: none; counter-reset: toc; }
.art-toc li { counter-increment: toc; font-size: 14px; font-weight: 600; color: var(--ink-3); padding: 4px 0; display: flex; gap: 12px; }
.art-toc li::before { content: counter(toc, decimal-leading-zero); font-family: var(--mono); font-size: 10px; color: var(--ink-4); padding-top: 3px; }
.art-toc a:hover { color: var(--ink); }

/* Related */
.related { margin-top: clamp(40px, 5vw, 64px); border-top: 1px solid var(--border); padding-top: clamp(24px, 3vw, 36px); }
.related-label { font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-4); margin-bottom: 14px; }
.related-list { display: grid; gap: 10px; }
.related-card { display: block; border: 1px solid var(--border); border-radius: 14px; padding: 18px 20px; transition: border-color .2s, transform .3s var(--ease); }
.related-card:hover { border-color: var(--ink); transform: translateY(-2px); }
.related-kind { font-family: var(--mono); font-size: 9px; letter-spacing: .12em; text-transform: uppercase; color: var(--orange-d); margin-bottom: 6px; }
.related-title { font-size: 17px; font-weight: 700; letter-spacing: -.02em; color: var(--ink); line-height: 1.3; }
.related-desc { font-size: 14px; color: var(--ink-3); line-height: 1.55; margin-top: 4px; }

/* ── WRITING HUB ── */
.hub-list { border-top: 1px solid var(--border); max-width: 980px; }
.hub-item { display: grid; grid-template-columns: 120px 1fr; gap: 24px; padding: clamp(20px, 2.6vw, 30px) 0; border-bottom: 1px solid var(--border); transition: padding .3s var(--ease); }
.hub-item:hover { padding-left: 8px; }
.hub-date { font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-4); padding-top: 6px; }
.hub-title { font-size: clamp(20px, 2.2vw, 28px); font-weight: 800; letter-spacing: -.03em; line-height: 1.15; color: var(--ink); }
.hub-item:hover .hub-title { color: var(--orange); }
.hub-desc { font-size: 15px; line-height: 1.6; color: var(--ink-3); margin-top: 8px; max-width: 680px; }
.hub-empty { font-size: 16px; color: var(--ink-3); line-height: 1.7; max-width: 640px; }
.svc-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.svc-card { display: flex; flex-direction: column; gap: 8px; border: 1px solid var(--border); border-radius: 16px; padding: 22px; transition: border-color .2s, transform .3s var(--ease); }
.svc-card:hover { border-color: var(--ink); transform: translateY(-2px); }
.svc-card-title { font-size: 18px; font-weight: 800; letter-spacing: -.03em; }
.svc-card-desc { font-size: 14px; color: var(--ink-3); line-height: 1.55; }
.svc-card-go { margin-top: auto; padding-top: 8px; font-size: 13px; font-weight: 700; color: var(--ink); }

/* ── FOOTER (index.html) ── */
footer {
  background: var(--dark); color: rgba(255,255,255,.25); padding: 20px var(--gutter);
  border-top: 1px solid rgba(255,255,255,.06);
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;
}
.ft-name { font-size: 13px; font-weight: 800; letter-spacing: -.03em; color: rgba(255,255,255,.72); }
.ft-name span { color: rgba(255,255,255,.55); font-weight: 500; }
.ft-links { display: flex; gap: 8px 18px; flex-wrap: wrap; }
.ft-links a { font-size: 11px; font-weight: 600; color: rgba(255,255,255,.55); letter-spacing: -.01em; transition: color .18s; }
.ft-links a:hover { color: rgba(255,255,255,.9); }
.ft-copy { font-family: var(--mono); font-size: 10px; letter-spacing: .04em; color: rgba(255,255,255,.5); }
.ft-avatar { display: none; }
@media (max-width: 768px) {
  footer { display: grid; grid-template-columns: 1fr 130px; grid-template-rows: auto auto auto; align-items: end; column-gap: 0; row-gap: 6px; padding: 14px var(--gutter) 0; overflow: visible; }
  .ft-avatar { display: block; grid-column: 2; grid-row: 1 / span 3; width: 130px; height: auto; align-self: end; justify-self: end; pointer-events: none; }
  .ft-name { grid-column: 1; }
  .ft-links { grid-column: 1; }
  .ft-copy { grid-column: 1; padding-bottom: 12px; }
}

@media (max-width: 600px) {
  .hub-item { grid-template-columns: 1fr; gap: 6px; }
  .hub-date { padding-top: 0; }
  .pg-actions { flex-direction: column; align-items: stretch; }
  .pg-actions .btn-black, .pg-actions .btn-ghost { justify-content: center; }
  .faq-item .faq-a { padding-right: 0; }
}
