/* ==========================================================================
   WheelPeek — guides stylesheet. /guides/ article + index pages ONLY.
   Self-contained: header, footer, buttons and every component live here — this
   file does NOT import site.css or home-v5.css. Immutable-cached, so it ships
   under a new filename whenever it changes.

   Design tokens, @font-face, buttons, header and footer are copied from the
   homepage (home-v5.css) so the guides read as the same product, but the two
   files are fully decoupled. These pages are ZERO-JS: no reveal animations, no
   hamburger script — the header collapses to brand + CTA on small screens with
   CSS only, and FAQs use native <details>.
   ========================================================================== */

/* ---------- font (self-hosted, latin subset, variable weight) ---------- */
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/assets/fonts/space-grotesk-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- design tokens (copied from home-v5.css) ---------- */
:root {
  --bg: #0A0C0F;
  --bg-2: #101317;
  --bg-3: #161A1F;
  --card: rgba(255, 255, 255, 0.03);
  --card-2: rgba(255, 255, 255, 0.05);
  --border: rgba(255, 255, 255, 0.08);
  --border-2: rgba(255, 255, 255, 0.16);
  --text: #F2F4F5;
  --muted: #9AA3AB;
  --muted-2: #8E959C; /* a11y: >=4.6:1 on #0A0C0F/#101317/#07090b */
  --accent: #00FFCC;
  --accent-2: #4dffdd;
  --accent-ink: #052A24;
  --accent-dim: rgba(0, 255, 204, 0.10);
  --accent-line: rgba(0, 255, 204, 0.28);
  --maxw: 1140px;
  --prose: 760px;
  --radius: 20px;
  --radius-sm: 14px;
  --shadow: 0 26px 70px rgba(0, 0, 0, 0.55);
  --shadow-sm: 0 12px 34px rgba(0, 0, 0, 0.40);
  --display: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Helvetica, Arial, sans-serif;
  --body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu,
    Cantarell, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Roboto Mono", monospace;
}

/* ---------- reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: var(--bg); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  letter-spacing: 0.1px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin: 0 0 0.4em;
  color: var(--text);
}
p { margin: 0 0 1rem; }
strong { color: var(--text); font-weight: 700; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* ---------- layout helpers ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.eyebrow {
  font-family: var(--mono);
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  margin: 0 0 1rem;
}
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 300;
  background: var(--accent); color: var(--accent-ink);
  padding: 10px 18px; border-radius: 0 0 12px 0; font-weight: 700;
}
.skip-link:focus { left: 0; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 14px 24px; border-radius: 999px;
  font-family: var(--body); font-weight: 700; font-size: 1rem; line-height: 1;
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: transform 0.16s ease, background 0.16s ease, box-shadow 0.16s ease,
    border-color 0.16s ease, color 0.16s ease;
}
.btn:hover { text-decoration: none; }
.btn svg { width: 19px; height: 19px; flex: none; }
.btn-primary {
  background: var(--accent); color: var(--accent-ink);
  box-shadow: 0 8px 24px rgba(0, 255, 204, 0.16);
}
.btn-primary:hover {
  background: var(--accent-2); transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(0, 255, 204, 0.30);
}
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border-2); }
.btn-ghost:hover { border-color: var(--accent-line); color: var(--accent); transform: translateY(-2px); }
.btn-lg { padding: 17px 32px; font-size: 1.08rem; }

/* ---------- header (glass, sticky; zero-JS) ---------- */
.site-header {
  position: sticky; top: 0; z-index: 200;
  background: rgba(10, 12, 15, 0.72);
  backdrop-filter: saturate(150%) blur(14px);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 68px; }
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--text); font-family: var(--display); font-weight: 700;
  font-size: 1.2rem; letter-spacing: -0.02em;
}
.brand:hover { text-decoration: none; }
.brand svg { width: 23px; height: 23px; flex: none; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a:not(.btn) {
  color: var(--muted); font-size: 0.95rem; font-weight: 500;
  padding: 9px 13px; border-radius: 9px; transition: color 0.15s ease, background 0.15s ease;
}
.nav-links a:not(.btn):hover { color: var(--text); background: var(--card-2); text-decoration: none; }
.nav-links a[aria-current="page"] { color: var(--text); }
.nav-links .btn { margin-left: 10px; padding: 10px 20px; font-size: 0.95rem; }

/* ---------- breadcrumb ---------- */
.crumbs {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  font-size: 0.85rem; color: var(--muted-2);
  padding: 22px 0 0;
}
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--text); }
.crumbs span { color: var(--border-2); }
.crumbs .here { color: var(--muted-2); }

/* ---------- article layout ---------- */
.prose { width: 100%; max-width: var(--prose); margin: 0 auto; padding: 0 24px 20px; }
.article-head { margin: 26px 0 40px; }
.article-head h1 {
  font-size: clamp(2.2rem, 5.4vw, 3.2rem);
  line-height: 1.04;
  margin: 0 0 0.5em;
}
.dek {
  color: #C7CDD2; font-size: clamp(1.12rem, 2vw, 1.32rem);
  line-height: 1.55; margin: 0 0 1.6rem; max-width: 40ch;
}
.byline {
  color: var(--muted-2); font-family: var(--mono); font-size: 0.82rem;
  letter-spacing: 0.02em; margin: 0; padding-bottom: 26px;
  border-bottom: 1px solid var(--border);
}

/* ---------- prose typography ---------- */
.article h2 {
  font-size: clamp(1.55rem, 3vw, 2rem);
  margin: 2.4em 0 0.6em;
  clear: both;
}
.article h2:first-of-type { margin-top: 1.4em; }
.article h3 {
  font-size: 1.22rem;
  margin: 1.8em 0 0.5em;
}
.article p { color: #CDD3D8; line-height: 1.75; margin: 0 0 1.15rem; }
.article a:not(.btn) { color: var(--accent); text-decoration: none; }
.article a:not(.btn):hover { text-decoration: underline; text-underline-offset: 3px; }
.article strong { color: var(--text); }

.article ul, .article ol { color: #CDD3D8; line-height: 1.7; margin: 0 0 1.3rem; padding-left: 0; }
.article ul { list-style: none; }
.article ul > li {
  position: relative; padding: 0 0 0 30px; margin-bottom: 11px;
}
.article ul > li::before {
  content: ""; position: absolute; left: 0; top: 3px; width: 20px; height: 20px;
  border-radius: 6px; background: var(--accent-dim); border: 1px solid var(--accent-line);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300FFCC' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center; background-size: 12px;
}
.article ol { list-style: none; counter-reset: step; }
.article ol > li {
  position: relative; padding: 0 0 0 42px; margin-bottom: 15px; min-height: 30px;
}
.article ol > li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: 1px;
  width: 28px; height: 28px; border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-weight: 700; font-size: 0.86rem;
  color: var(--accent); background: var(--accent-dim); border: 1px solid var(--accent-line);
}
.article li b, .article li strong { color: var(--text); }

/* ---------- tables (hairline + horizontal scroll on overflow) ---------- */
.table-wrap {
  overflow-x: auto; margin: 24px 0 28px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  -webkit-overflow-scrolling: touch;
}
.table-wrap table { border-collapse: collapse; width: 100%; min-width: 540px; font-size: 0.94rem; }
.table-wrap caption { text-align: left; color: var(--muted-2); font-size: 0.84rem; padding: 12px 16px 0; }
.table-wrap th, .table-wrap td {
  text-align: left; padding: 11px 16px;
  border-bottom: 1px solid var(--border); border-right: 1px solid var(--border);
  vertical-align: top; line-height: 1.5;
}
.table-wrap th { background: var(--card-2); color: var(--text); font-family: var(--display); font-weight: 700; letter-spacing: -0.01em; }
.table-wrap tr:last-child td { border-bottom: none; }
.table-wrap th:last-child, .table-wrap td:last-child { border-right: none; }
.table-wrap td code { font-family: var(--mono); font-size: 0.9em; color: var(--accent-2); background: var(--accent-dim); padding: 1px 6px; border-radius: 6px; }

/* ---------- callout (honest notes / tips) ---------- */
.callout {
  background: var(--accent-dim); border: 1px solid var(--accent-line);
  border-radius: var(--radius-sm); padding: 18px 20px; margin: 26px 0;
}
.callout p { color: var(--text); margin: 0; font-size: 0.96rem; line-height: 1.6; }
.callout p + p { margin-top: 0.7rem; }

/* ---------- figures ---------- */
figure { margin: 0; }
figcaption { color: var(--muted-2); font-size: 0.82rem; line-height: 1.5; margin-top: 10px; }

/* phone screenshot in a device frame, floated into the prose */
.fig-phone {
  float: right; width: 232px; max-width: 44%;
  margin: 8px 0 18px 28px;
}
.fig-phone .frame {
  border: 1px solid var(--border-2); border-radius: 28px;
  background: #05070a; padding: 7px; box-shadow: var(--shadow);
}
.fig-phone .frame img { border-radius: 21px; width: 100%; }
.fig-phone figcaption { text-align: center; }

/* light tile for square product photos */
.fig-tile {
  float: right; width: 230px; max-width: 44%; margin: 8px 0 18px 28px;
}
.fig-tile .frame {
  border-radius: var(--radius-sm); overflow: hidden;
  background: #F4F5F6; border: 1px solid rgba(0, 0, 0, 0.10); box-shadow: var(--shadow-sm);
}
.fig-tile .frame img { width: 100%; }
.fig-tile figcaption { text-align: center; }

/* wide bordered card (landscape share card) */
.fig-wide { margin: 28px 0; }
.fig-wide .frame {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  overflow: hidden; background: var(--bg-2); box-shadow: var(--shadow-sm);
}
.fig-wide .frame img { width: 100%; }
.fig-wide figcaption { text-align: center; }

/* ---------- FAQ (native details, homepage look) ---------- */
.faq { margin: 20px 0 0; }
.faq details {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--card); margin-bottom: 12px; overflow: hidden;
  transition: border-color 0.18s ease, background 0.18s ease;
}
.faq details[open] { border-color: var(--border-2); background: var(--card-2); }
.faq summary {
  list-style: none; cursor: pointer; padding: 18px 22px;
  font-family: var(--display); font-weight: 600; font-size: 1.02rem; letter-spacing: -0.01em;
  color: var(--text);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 20px; height: 20px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300FFCC' stroke-width='2.4' stroke-linecap='round'%3E%3Cline x1='12' y1='5' x2='12' y2='19'/%3E%3Cline x1='5' y1='12' x2='19' y2='12'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center;
  transition: transform 0.22s ease;
}
.faq details[open] summary::after { transform: rotate(135deg); }
.faq details p { color: var(--muted); padding: 0 22px 20px; margin: 0; font-size: 0.97rem; line-height: 1.7; }
.faq details p a { color: var(--accent); }

/* ---------- section spacing inside prose ---------- */
.article > section { margin: 0; }

/* ---------- related guides ---------- */
.related { clear: both; margin: 52px 0 0; padding-top: 40px; border-top: 1px solid var(--border); }
.related h2 { font-family: var(--display); font-size: 1.4rem; letter-spacing: -0.02em; margin: 0 0 22px; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
.related-card {
  display: flex; flex-direction: column; gap: 8px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 20px 20px 22px; transition: border-color 0.18s ease, transform 0.18s ease, background 0.18s ease;
}
.related-card:hover { border-color: var(--border-2); transform: translateY(-3px); background: var(--card-2); text-decoration: none; }
.related-card h3 { font-size: 1.05rem; margin: 0; color: var(--text); }
.related-card p { color: var(--muted); font-size: 0.9rem; line-height: 1.55; margin: 0; }
.related-card .go { color: var(--accent); font-size: 0.86rem; font-weight: 700; margin-top: auto; }

/* ---------- guides index ---------- */
.guides-hero { max-width: var(--prose); margin: 8px auto 44px; padding: 0 24px; text-align: center; }
.guides-hero h1 { font-size: clamp(2.3rem, 5.6vw, 3.4rem); margin: 0 0 0.4em; }
.guides-hero .dek { color: #C7CDD2; margin: 0 auto; max-width: 54ch; text-align: center; }
.guides-hero .crumbs { justify-content: center; }

.guide-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 0 auto; max-width: 920px; }
.guide-card {
  display: flex; flex-direction: column; gap: 12px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 30px 28px 28px;
  transition: border-color 0.18s ease, transform 0.18s ease, background 0.18s ease;
}
.guide-card:hover { border-color: var(--accent-line); transform: translateY(-4px); background: var(--card-2); text-decoration: none; }
.guide-num { font-family: var(--mono); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.16em; color: var(--accent); }
.guide-card h2 { font-size: 1.4rem; margin: 0; color: var(--text); }
.guide-card p { color: var(--muted); font-size: 0.98rem; line-height: 1.6; margin: 0; }
.guide-card .go { color: var(--accent); font-size: 0.92rem; font-weight: 700; margin-top: 6px; }

/* image strip on the index */
.guide-strip { max-width: 920px; margin: 46px auto 0; }
.guide-strip .strip-label { text-align: center; color: var(--muted-2); font-size: 0.85rem; margin: 0 0 16px; }
.guide-strip .strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.guide-strip .tile {
  border-radius: var(--radius-sm); overflow: hidden; background: #F4F5F6;
  border: 1px solid rgba(0, 0, 0, 0.10); box-shadow: var(--shadow-sm);
}
.guide-strip .tile img { width: 100%; aspect-ratio: 1 / 1; object-fit: contain; padding: 10%; }

/* ---------- CTA band before footer ---------- */
.cta-section { padding: 64px 0 88px; }
.cta-band {
  position: relative; overflow: hidden; isolation: isolate;
  border: 1px solid var(--border-2); border-radius: 28px;
  padding: 60px 44px; text-align: center;
  background: linear-gradient(160deg, #0d1f1b 0%, var(--bg-2) 58%);
}
.cta-band::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(120% 120% at 50% 12%, rgba(0, 255, 204, 0.16), transparent 55%);
}
.cta-band h2 { margin: 0 0 0.5em; font-size: clamp(1.9rem, 4.2vw, 3rem); }
.cta-band .lead { margin: 0 auto 1.8rem; color: #C7CDD2; font-size: 1.12rem; max-width: 46ch; }
.cta-band-actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.cta-band-sub { margin: 20px 0 0; color: var(--muted); font-size: 0.9rem; }
.cta-band-sub .sep { color: var(--muted-2); margin: 0 6px; }

/* ---------- footer (homepage pattern; .footer-h headings) ---------- */
.site-footer { border-top: 1px solid var(--border); background: #07090b; padding: 64px 0 40px; }
.footer-top { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 44px; }
.footer-brand .brand { margin-bottom: 14px; }
.footer-brand p { color: var(--muted); font-size: 0.94rem; max-width: 34ch; }
.footer-col .footer-h { font-family: var(--mono); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted-2); margin: 0 0 16px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: var(--muted); font-size: 0.94rem; }
.footer-col a:hover { color: var(--text); text-decoration: none; }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 26px; display: flex; flex-direction: column; gap: 10px; }
.footer-bottom p { margin: 0; }
.trademark { color: var(--muted-2); font-size: 0.82rem; max-width: 92ch; line-height: 1.55; }
.fm-credit { color: var(--muted-2); font-size: 0.82rem; }
.copyright { color: var(--muted-2); font-size: 0.86rem; }
.copyright a { color: var(--muted); }

/* ---------- responsive ---------- */
@media (max-width: 820px) {
  /* zero-JS mobile nav: hide text links, keep brand + CTA */
  .nav-links a:not(.btn) { display: none; }
  .nav-links .btn { margin-left: 0; }
}
@media (max-width: 720px) {
  .guide-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .fig-phone, .fig-tile { float: none; width: 100%; max-width: 260px; margin: 22px auto; }
  .guide-strip .strip { grid-template-columns: 1fr 1fr; gap: 12px; }
  .cta-band { padding: 48px 24px; }
  .cta-section { padding: 52px 0 68px; }
  .article h2 { margin-top: 2em; }
}
@media (max-width: 460px) {
  .footer-top { grid-template-columns: 1fr; gap: 26px; }
  .footer-brand { grid-column: 1 / -1; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
