/* ============================================================
   SpoolOS — Shared subpage chrome
   Pulled from filamentsklad-landing.html (nav, footer, type, btns)
   Used by: about.html, faq.html, blog.html, industries.html, blog/post-*.html
   ============================================================ */
:root {
  --orange:        #FF5F00;
  --orange-600:    #E85500;
  --orange-700:    #C94900;
  --orange-100:    #FFE9D9;
  --lime:          #CFEC41;
  --lime-600:      #B8D435;
  --lime-100:      #F2FACF;

  --ink-900: #0E0E10;
  --ink-800: #1A1A1E;
  --ink-700: #26262C;
  --ink-600: #3A3A42;
  --ink-500: #5B5B66;
  --ink-400: #8A8A95;
  --ink-300: #B8B8C0;
  --ink-200: #DDDDE0;
  --ink-100: #EDEDEE;
  --ink-50:  #F6F6F4;
  --paper:     #FAFAF7;
  --paper-dim: #F2F2EC;

  --bg:        var(--paper);
  --bg-dim:    var(--paper-dim);
  --bg-raised: #FFFFFF;
  --fg:        var(--ink-900);
  --fg-muted:  var(--ink-500);
  --fg-faint:  var(--ink-400);
  --border:    var(--ink-200);
  --border-strong: var(--ink-900);
  --border-subtle: var(--ink-100);
  --accent:    var(--orange);
  --accent-fg: #FFFFFF;
  --highlight: var(--lime);
  --success:   #2E9E5B;
  --danger:    #D23F3F;

  --font-display: 'Manrope', ui-sans-serif, system-ui, sans-serif;
  --font-body:    'Manrope', ui-sans-serif, system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, monospace;

  --fs-display: clamp(48px, 7vw, 96px);
  --fs-h1:      clamp(36px, 4.6vw, 60px);
  --fs-h2:      clamp(28px, 3.2vw, 40px);
  --fs-h3:      clamp(20px, 1.9vw, 26px);
  --fs-lg:      18px;
  --fs-body:    16px;
  --fs-sm:      14px;
  --fs-xs:      12px;

  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 24px; --r-2xl: 32px;
  --shadow-xs:   0 1px 2px rgba(14,14,16,0.04);
  --shadow-sm:   0 2px 6px rgba(14,14,16,0.06);
  --shadow-md:   0 8px 24px rgba(14,14,16,0.08);
  --shadow-lg:   0 24px 60px rgba(14,14,16,0.14);
  --shadow-glow: 0 0 0 4px rgba(255,95,0,0.18);
  --ease-out:   cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur-fast:   140ms; --dur-base: 220ms; --dur-slow: 420ms;

  --max-w: 1200px;
}

[data-theme="dark"] {
  --bg:        var(--ink-900);
  --bg-dim:    var(--ink-800);
  --bg-raised: var(--ink-800);
  --fg:        var(--paper);
  --fg-muted:  var(--ink-300);
  --fg-faint:  var(--ink-500);
  --border:    var(--ink-700);
  --border-strong: var(--paper);
  --border-subtle: #232328;
  --shadow-md: 0 8px 24px rgba(0,0,0,0.6);
  --shadow-lg: 0 24px 60px rgba(0,0,0,0.7);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; }
a { color: inherit; }
::selection { background: var(--lime); color: var(--ink-900); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); font-weight: 800; letter-spacing: -0.035em; }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
p  { margin: 0 0 1em; max-width: 62ch; text-wrap: pretty; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--fg-muted);
  font-family: var(--font-mono);
}
.eyebrow::before {
  content: ''; display: inline-block;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--orange);
}
.dot {
  display: inline-block; width: 0.32em; height: 0.32em;
  background: var(--orange); border-radius: 50%;
  vertical-align: baseline; margin-left: 0.06em;
  transform: translateY(-0.04em);
}

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}
section { padding: clamp(56px, 7vw, 96px) 0; }
section + section { border-top: 1px solid var(--border-subtle); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px;
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: -0.01em;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  text-decoration: none;
  transition: all var(--dur-fast) var(--ease-out);
  white-space: nowrap;
}
.btn:focus-visible { outline: none; box-shadow: var(--shadow-glow); }
.btn-primary {
  background: var(--orange); color: #fff;
  box-shadow: 0 1px 0 rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.06);
}
.btn-primary:hover { background: var(--orange-600); transform: translateY(-1px); box-shadow: 0 6px 18px rgba(255,95,0,0.32); }
.btn-ghost {
  background: transparent; color: var(--fg);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--border-strong); background: var(--bg-dim); }
.btn-lg { padding: 14px 24px; font-size: 15px; }

/* ---------- Navbar ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in oklab, var(--bg) 78%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-base) var(--ease-out), background var(--dur-base) var(--ease-out);
}
.nav.scrolled { border-bottom-color: var(--border-subtle); }
.nav-inner {
  max-width: var(--max-w); margin: 0 auto;
  padding: 14px 24px;
  display: flex; align-items: center; gap: 24px;
}
.logo {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--fg);
  font-weight: 800; letter-spacing: -0.025em;
  font-size: 17px;
}
.logo .lo-icon { flex: 0 0 auto; }
.logo .lo-sub { color: var(--fg-faint); font-weight: 500; font-size: 13px; letter-spacing: 0; }
.nav-links {
  list-style: none; margin: 0 0 0 24px; padding: 0;
  display: flex; gap: 4px;
}
.nav-links li { display: flex; }
.nav-links a {
  padding: 8px 12px; border-radius: 8px;
  text-decoration: none;
  color: var(--fg-muted);
  font-size: var(--fs-sm); font-weight: 500;
  transition: color var(--dur-fast), background var(--dur-fast);
}
.nav-links a:hover { color: var(--fg); background: var(--bg-dim); }
.nav-links a[aria-current="page"] { color: var(--fg); background: var(--bg-dim); }
.nav-cta { display: flex; align-items: center; gap: 8px; }
.btn-nav-ghost {
  display: inline-flex; align-items: center;
  padding: 8px 14px;
  font-size: var(--fs-sm); font-weight: 600;
  color: var(--fg); text-decoration: none;
  border-radius: 999px;
  transition: background var(--dur-fast), color var(--dur-fast);
}
.btn-nav-ghost:hover { background: var(--bg-dim); color: var(--fg); }

.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  align-items: center; justify-content: center;
  flex-direction: column;
  gap: 4px;
  margin-left: 4px;
}
.nav-toggle:hover { background: var(--bg-dim); border-color: var(--border-strong); }
.nav-toggle-bar {
  display: block;
  width: 18px; height: 2px;
  background: var(--fg);
  border-radius: 2px;
  transition: transform var(--dur-fast), opacity var(--dur-fast);
}
.nav.open .nav-toggle-bar:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav.open .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav.open .nav-toggle-bar:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 800px) {
  .nav-inner { padding: 12px 16px; gap: 12px; }
  .nav-toggle { display: inline-flex; }
  .nav-cta .btn-primary { display: none; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    margin: 0;
    padding: 8px 16px 16px;
    flex-direction: column;
    gap: 4px;
    background: var(--bg);
    border-bottom: 1px solid var(--border-subtle);
    box-shadow: 0 12px 24px rgba(0,0,0,0.18);
  }
  .nav-links li { width: 100%; }
  .nav-links a { width: 100%; padding: 12px 14px; font-size: 16px; }
  .nav.open .nav-links { display: flex; }
}

/* ---------- Breadcrumb ---------- */
.crumbs {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-muted);
  letter-spacing: 0.04em;
  padding: 24px 0 0;
}
.crumbs ol { list-style: none; padding: 0; margin: 0; display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs a { color: var(--fg-muted); text-decoration: none; }
.crumbs a:hover { color: var(--orange); }
.crumbs li[aria-current="page"] { color: var(--fg); }
.crumbs li + li::before { content: '/'; margin-right: 8px; color: var(--fg-faint); }

/* ---------- Page hero ---------- */
.page-hero {
  padding: clamp(40px, 6vw, 80px) 0 clamp(32px, 4vw, 56px);
}
.page-hero h1 {
  margin-top: 16px;
  font-size: clamp(36px, 5vw, 64px);
}
.page-hero .lead {
  font-size: clamp(17px, 1.4vw, 20px);
  color: var(--fg-muted);
  margin-top: 18px;
  max-width: 640px;
  line-height: 1.55;
}
.page-hero .accent { color: var(--orange); }

/* ---------- Speakable summary block ---------- */
.speakable {
  margin: 24px 0 0;
  padding: 20px 24px;
  background: var(--bg-raised);
  border-left: 4px solid var(--orange);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  max-width: 720px;
  font-size: 16px;
  color: var(--fg);
  box-shadow: var(--shadow-xs);
}
.speakable strong {
  display: block;
  font-size: 11px;
  font-family: var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 6px;
}

/* ---------- Footer ---------- */
.footer {
  background: var(--bg);
  padding: 56px 0 32px;
  border-top: 1px solid var(--border-subtle);
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer .ft-brand { max-width: 320px; }
.footer .ft-brand p { color: var(--fg-muted); font-size: 14px; margin-top: 14px; }
.footer h4 {
  font-size: 12px; font-family: var(--font-mono);
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 14px;
}
.footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer ul a {
  color: var(--fg);
  text-decoration: none;
  font-size: 14px;
  transition: color var(--dur-fast);
}
.footer ul a:hover { color: var(--orange); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
  font-size: 12px; color: var(--fg-muted);
  font-family: var(--font-mono);
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom .reg { display: inline-flex; gap: 16px; flex-wrap: wrap; }
@media (max-width: 800px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

/* Google preferred-source pill (mirrors the block in landing.html): rotating
   conic ring in the four Google letter colours; the inner plate matches the
   footer background so only the ring shows. Transform-based (no @property)
   so it animates in every browser. Explicit animation:none under reduced
   motion because the global 0.01ms rule would leave an infinite animation
   restarting in a tight loop instead of stopping it. */
.gpref {
  position: relative;
  display: inline-flex;
  padding: 2px;
  border-radius: 999px;
  overflow: hidden;
  text-decoration: none;
  z-index: 0;
}
.gpref::before {
  content: "";
  position: absolute; z-index: -1; left: 50%; top: 50%;
  width: 300%; aspect-ratio: 1;
  background: conic-gradient(#4285F4, #EA4335, #FBBC05, #34A853, #4285F4);
  transform: translate(-50%, -50%) rotate(0turn);
  animation: gpref-spin 3.5s linear infinite;
}
.gpref-inner {
  display: inline-flex; align-items: center;
  border-radius: 999px;
  /* The rotating gradient IS the fill (owner request 2026-08-27, was a thin
     ring). The faint dark wash plus the shadow keep white text readable when
     the yellow segment sweeps under it. */
  background: rgba(0, 0, 0, 0.22);
  color: #fff;
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  padding: 9px 18px;
  font-size: 13px;
  text-align: center;
}
.gpref { max-width: 100%; transition: filter var(--dur-fast); }
.gpref:hover { filter: brightness(1.12); }
@keyframes gpref-spin { to { transform: translate(-50%, -50%) rotate(1turn); } }
@media (prefers-reduced-motion: reduce) { .gpref::before { animation: none; } }

/* ---------- Reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out);
}
.reveal.in { opacity: 1; transform: none; }

/* Mirrors the block in landing.html. Two jobs: honour a reduced-motion
   preference (WCAG 2.3.3), and make .reveal content visible even when
   seo-chrome.js never runs - without this, a JS failure leaves every
   revealed section stuck at opacity 0 for those users. */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
