/* ============================================================
   Neil's Garage — shared design system
   Brand: green #5FA83E ("NEIL'S") + blue #1D7AB4 ("GARAGE"),
   navy ink #123A54. Type: Archivo Black / Archivo / Inter.
   ============================================================ */

/* ---- Tokens: light (bare :root) ---- */
:root {
  --green: #4E9A34;        /* deeper green for text-on-white contrast */
  --green-brand: #5FA83E;  /* pure brand green for large fills/wordmark */
  --blue: #1D7AB4;
  --blue-deep: #155E8C;
  --navy: #123A54;         /* ink */
  --ink: #123A54;
  --ink-muted: #4E6A7D;
  --ground: #ffffff;
  --surface: #F1F6F9;      /* blue-tinted off-white */
  --surface-2: #E7F0F5;
  --line: #D6E3EC;
  --line-strong: #BFD3E0;
  --on-accent: #ffffff;
  --shadow: 0 1px 2px rgba(18,58,84,.06), 0 8px 24px rgba(18,58,84,.08);
  --shadow-lg: 0 2px 6px rgba(18,58,84,.08), 0 24px 60px rgba(18,58,84,.16);
  --radius: 14px;
  --radius-sm: 9px;
  --maxw: 1120px;
  --font-display: "Archivo Black", "Archivo", system-ui, sans-serif;
  --font-head: "Archivo", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

/* ---- Tokens: dark via OS (only when no explicit light choice) ---- */
:root:not([data-theme="light"]) {
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --green: #74C24C;
    --green-brand: #6FBE47;
    --blue: #46A0D6;
    --blue-deep: #2E86C0;
    --navy: #0B1D2B;
    --ink: #E9F1F6;
    --ink-muted: #9DB6C6;
    --ground: #0C1D2B;
    --surface: #112A3C;
    --surface-2: #16344A;
    --line: #21415A;
    --line-strong: #2C5273;
    --on-accent: #08161f;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 28px rgba(0,0,0,.35);
    --shadow-lg: 0 2px 8px rgba(0,0,0,.4), 0 28px 64px rgba(0,0,0,.5);
  }
}
/* ---- Tokens: dark via explicit toggle ---- */
:root[data-theme="dark"] {
  --green: #74C24C;
  --green-brand: #6FBE47;
  --blue: #46A0D6;
  --blue-deep: #2E86C0;
  --navy: #0B1D2B;
  --ink: #E9F1F6;
  --ink-muted: #9DB6C6;
  --ground: #0C1D2B;
  --surface: #112A3C;
  --surface-2: #16344A;
  --line: #21415A;
  --line-strong: #2C5273;
  --on-accent: #08161f;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 28px rgba(0,0,0,.35);
  --shadow-lg: 0 2px 8px rgba(0,0,0,.4), 0 28px 64px rgba(0,0,0,.5);
}

/* ---- Reset / base ---- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid var(--green-brand); outline-offset: 2px; border-radius: 4px; }

h1, h2, h3, h4 { font-family: var(--font-head); color: var(--ink); text-wrap: balance; line-height: 1.12; margin: 0; font-weight: 800; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }

.eyebrow {
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--green);
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  font-family: var(--font-head); font-weight: 700; font-size: 15.5px;
  padding: 12px 22px; border-radius: 999px; border: 1.5px solid transparent;
  cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
@media (prefers-reduced-motion: reduce) { .btn:hover { transform: none; } }
.btn-primary { background: var(--green-brand); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--green); }
.btn-blue { background: var(--blue); color: #fff; box-shadow: var(--shadow); }
.btn-blue:hover { background: var(--blue-deep); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); }

/* ---- Header ---- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--ground) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 20px; }
.wordmark { font-family: var(--font-display); font-size: 22px; letter-spacing: -.01em; display: inline-flex; gap: .28em; align-items: baseline; text-decoration: none; }
.wordmark:hover { text-decoration: none; }
.wordmark .n { color: var(--green-brand); }
.wordmark .g { color: var(--blue); }
.wordmark .dot { color: var(--ink-muted); }
.nav { display: flex; align-items: center; gap: 26px; }
.nav a { font-family: var(--font-head); font-weight: 600; font-size: 15px; color: var(--ink); }
.nav a:hover { color: var(--blue); text-decoration: none; }
.theme-toggle {
  background: var(--surface); border: 1px solid var(--line); color: var(--ink);
  width: 38px; height: 38px; border-radius: 999px; cursor: pointer; font-size: 16px;
  display: inline-flex; align-items: center; justify-content: center;
}
.theme-toggle:hover { border-color: var(--blue); }
.nav-links { display: flex; align-items: center; gap: 26px; }
@media (max-width: 720px) { .nav-links { display: none; } }

/* ---- Hero ---- */
.hero { position: relative; overflow: hidden; padding: 76px 0 64px; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(60% 90% at 82% 0%, color-mix(in srgb, var(--blue) 16%, transparent), transparent 60%),
    radial-gradient(50% 80% at 0% 100%, color-mix(in srgb, var(--green-brand) 14%, transparent), transparent 60%);
  pointer-events: none;
}
.hero .container { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr 1fr; gap: 54px; align-items: center; }
@media (max-width: 900px) { .hero .container { grid-template-columns: 1fr; gap: 34px; } }
.hero h1 { font-size: clamp(38px, 6vw, 62px); letter-spacing: -0.02em; }
.hero h1 .hl { color: var(--green); }
.hero .lede { font-size: 19px; color: var(--ink-muted); max-width: 46ch; margin-top: 18px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.hero-stats { display: flex; gap: 30px; margin-top: 34px; flex-wrap: wrap; }
.hero-stats .s { }
.hero-stats .num { font-family: var(--font-display); font-size: 26px; color: var(--ink); font-variant-numeric: tabular-nums; }
.hero-stats .lbl { font-size: 13px; color: var(--ink-muted); text-transform: uppercase; letter-spacing: .08em; }

/* ---- Video card / embed ---- */
.embed { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); border: 1px solid var(--line); background: var(--surface); }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.embed-vert { aspect-ratio: 9 / 16; max-width: 340px; }
.embed .thumb { width: 100%; height: 100%; object-fit: cover; }
.play-badge {
  position: absolute; left: 14px; bottom: 14px; z-index: 2;
  background: color-mix(in srgb, var(--navy) 80%, transparent); color: #fff;
  font-family: var(--font-head); font-weight: 700; font-size: 13px;
  padding: 7px 13px 7px 11px; border-radius: 999px; display: inline-flex; gap: 7px; align-items: center;
}

/* ---- Sections ---- */
section { padding: 62px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 34px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(26px, 3.4vw, 36px); }
.section-head p { color: var(--ink-muted); margin: 8px 0 0; max-width: 52ch; }
.bg-surface { background: var(--surface); }

/* ---- Pillars ---- */
.pillars { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 760px) { .pillars { grid-template-columns: 1fr; } }
.pillar {
  position: relative; padding: 30px; border-radius: var(--radius); background: var(--ground);
  border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden;
}
.pillar::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; }
.pillar.green::before { background: var(--green-brand); }
.pillar.blue::before { background: var(--blue); }
.pillar .tag { font-family: var(--font-head); font-weight: 700; font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase; }
.pillar.green .tag { color: var(--green); }
.pillar.blue .tag { color: var(--blue); }
.pillar h3 { font-size: 22px; margin: 10px 0 8px; }
.pillar p { color: var(--ink-muted); margin: 0 0 16px; font-size: 15.5px; }
.pillar ul { margin: 0; padding-left: 18px; color: var(--ink-muted); font-size: 15px; }
.pillar li { margin-bottom: 5px; }

/* ---- Video grid ---- */
.vgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 900px) { .vgrid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .vgrid { grid-template-columns: 1fr; } }
.vcard { background: var(--ground); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .16s ease, box-shadow .16s ease; display: flex; flex-direction: column; }
.vcard:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); text-decoration: none; }
@media (prefers-reduced-motion: reduce) { .vcard:hover { transform: none; } }
.vcard .vthumb { aspect-ratio: 16/9; position: relative; background: var(--surface-2); overflow: hidden; }
.vcard .vthumb img { width: 100%; height: 100%; object-fit: cover; }
.vcard .vchip { position: absolute; top: 10px; left: 10px; font-family: var(--font-head); font-weight: 700; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; color: #fff; }
.vchip.green { background: var(--green-brand); }
.vchip.blue { background: var(--blue); }
.vcard .vbody { padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.vcard .vmeta { font-size: 12.5px; color: var(--ink-muted); text-transform: uppercase; letter-spacing: .06em; }
.vcard h3 { font-size: 18px; line-height: 1.2; }
.vcard .vexc { color: var(--ink-muted); font-size: 14.5px; margin: 0; }
.vcard .vmore { margin-top: auto; font-family: var(--font-head); font-weight: 700; font-size: 14px; color: var(--blue); padding-top: 6px; }

/* ---- Placeholder thumb (no image yet) ---- */
.ph-thumb { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--surface-2), var(--surface));
  color: var(--ink-muted); font-family: var(--font-display); font-size: 15px; letter-spacing: .04em; text-align: center; padding: 12px; }

/* ---- CTA band ---- */
.cta-band { background: linear-gradient(120deg, var(--navy), var(--blue-deep)); color: #fff; border-radius: var(--radius); padding: 46px 40px; box-shadow: var(--shadow-lg); text-align: center; }
.cta-band h2 { color: #fff; font-size: clamp(24px, 3vw, 34px); }
.cta-band p { color: rgba(255,255,255,.82); max-width: 48ch; margin: 12px auto 24px; }
.subscribe { display: flex; gap: 10px; max-width: 460px; margin: 0 auto; flex-wrap: wrap; justify-content: center; }
.subscribe input { flex: 1; min-width: 220px; padding: 13px 16px; border-radius: 999px; border: 1px solid rgba(255,255,255,.35); background: rgba(255,255,255,.12); color: #fff; font-family: var(--font-body); font-size: 15px; }
.subscribe input::placeholder { color: rgba(255,255,255,.7); }

/* ---- About strip ---- */
.about-strip { display: grid; grid-template-columns: 200px 1fr; gap: 34px; align-items: center; }
@media (max-width: 700px) { .about-strip { grid-template-columns: 1fr; text-align: center; } }
.about-avatar { width: 200px; height: 200px; border-radius: 50%; background: var(--surface-2); border: 4px solid var(--ground); box-shadow: var(--shadow); overflow: hidden; margin: 0 auto; }
.about-avatar .ph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-family: var(--font-display); color: var(--blue); font-size: 30px; }

/* ---- Article ---- */
.article-hero { padding: 44px 0 20px; }
.breadcrumb { font-size: 13.5px; color: var(--ink-muted); margin-bottom: 14px; }
.breadcrumb a { color: var(--ink-muted); }
.article-title { font-size: clamp(30px, 4.6vw, 46px); letter-spacing: -0.02em; }
.article-meta { display: flex; gap: 16px; flex-wrap: wrap; color: var(--ink-muted); font-size: 14px; margin-top: 14px; align-items: center; }
.article-meta .pill { background: var(--surface); border: 1px solid var(--line); padding: 3px 12px; border-radius: 999px; font-family: var(--font-head); font-weight: 600; font-size: 12.5px; }
.prose { font-size: 18px; line-height: 1.72; }
.prose h2 { font-size: 27px; margin: 40px 0 14px; }
.prose h3 { font-size: 20px; margin: 28px 0 10px; }
.prose p { margin: 0 0 1.1em; }
.prose ul, .prose ol { padding-left: 22px; margin: 0 0 1.2em; }
.prose li { margin-bottom: 7px; }
.prose a { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; }
.prose strong { color: var(--ink); }
.lead { font-size: 20px; color: var(--ink-muted); line-height: 1.6; }

/* spec table */
.spec-table { width: 100%; border-collapse: collapse; margin: 8px 0 24px; font-variant-numeric: tabular-nums; overflow: hidden; border-radius: var(--radius-sm); border: 1px solid var(--line); }
.spec-table th, .spec-table td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 15.5px; }
.spec-table th { background: var(--surface); font-family: var(--font-head); width: 42%; color: var(--ink); }
.spec-table tr:last-child td, .spec-table tr:last-child th { border-bottom: 0; }
.table-wrap { overflow-x: auto; }

/* timestamps / show notes */
.notes-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 26px; margin: 8px 0 24px; }
.notes-box h3 { margin-top: 0; }
.chapters { list-style: none; padding: 0; margin: 0; }
.chapters li { display: flex; gap: 14px; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 15.5px; }
.chapters li:last-child { border-bottom: 0; }
.chapters .t { font-family: var(--font-head); font-weight: 700; color: var(--blue); font-variant-numeric: tabular-nums; min-width: 52px; }

/* FAQ */
.faq details { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 4px 18px; margin-bottom: 10px; background: var(--ground); }
.faq summary { cursor: pointer; font-family: var(--font-head); font-weight: 700; font-size: 16.5px; padding: 12px 0; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 22px; color: var(--green); font-weight: 400; }
.faq details[open] summary::after { content: "\2013"; }
.faq details[open] summary { border-bottom: 1px solid var(--line); }
.faq .fa { padding: 12px 0 14px; color: var(--ink-muted); font-size: 16px; }

.share-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 30px 0; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.share-row .lbl { font-family: var(--font-head); font-weight: 700; font-size: 14px; color: var(--ink-muted); }

.article-layout { display: grid; grid-template-columns: 1fr 300px; gap: 48px; align-items: start; }
@media (max-width: 960px) { .article-layout { grid-template-columns: 1fr; } }
.aside { position: sticky; top: 90px; display: flex; flex-direction: column; gap: 20px; }
.aside-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; background: var(--surface); }
.aside-card h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .1em; color: var(--green); margin-bottom: 12px; }

/* ---- Footer ---- */
.site-footer { background: var(--navy); color: #cfe0ea; padding: 52px 0 34px; margin-top: 20px; }
:root[data-theme="dark"] .site-footer, :root:not([data-theme="light"]) .site-footer { border-top: 1px solid var(--line); }
.site-footer .container { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 30px; }
@media (max-width: 700px) { .site-footer .container { grid-template-columns: 1fr; gap: 26px; } }
.site-footer h4 { color: #fff; font-size: 13px; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 12px; }
.site-footer a { color: #cfe0ea; font-size: 15px; display: block; margin-bottom: 8px; }
.site-footer a:hover { color: #fff; }
.footer-word { font-family: var(--font-display); font-size: 22px; }
.footer-word .n { color: var(--green-brand); } .footer-word .g { color: #7fc0ea; }
.footer-note { color: #8fb0c4; font-size: 13.5px; margin-top: 14px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 30px; padding-top: 18px; color: #8fb0c4; font-size: 13px; text-align: center; }

/* utilities */
.mt0 { margin-top: 0; } .center { text-align: center; }
.badge-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.badge { font-family: var(--font-head); font-weight: 600; font-size: 13px; padding: 6px 13px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-muted); }
