/* static-page.css — shared styling for wakalix.com static sub-pages.
 * Requires base-tokens.css + wx-tokens.css to be loaded first.
 * No React, no component shapes — plain semantic HTML only.
 */

/* ── Skip-link (a11y: SEO-05 pattern) ──────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  z-index: 9999;
  padding: 10px 18px;
  background: var(--accent);
  color: var(--accent-fg);
  font-family: var(--font-ui);
  font-size: var(--t-14);
  font-weight: 600;
  border-radius: 0 0 var(--r-2) var(--r-2);
  text-decoration: none;
}
.skip-link.sr-only-focusable:focus,
.sr-only-focusable:focus {
  top: 0;
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* ── Reset ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ── Base ───────────────────────────────────────────────────────────────── */
body {
  font-family: var(--font-ui);
  font-size: var(--t-16);
  line-height: var(--lh-normal);
  color: var(--fg-1);
  background: var(--bg-app);
  -webkit-font-smoothing: antialiased;
}

/* ── Header ─────────────────────────────────────────────────────────────── */
.sp-header {
  border-bottom: var(--hairline) solid var(--border-1);
  background: var(--bg-base);
  position: sticky;
  top: 0;
  z-index: 100;
}
.sp-header-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 32px;
}
.sp-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--fg-1);
  font-size: var(--t-15);
  font-weight: 600;
}
.sp-logo img { width: 26px; height: 26px; }
.sp-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  list-style: none;
}
.sp-nav a {
  padding: 6px 12px;
  border-radius: var(--r-2);
  text-decoration: none;
  font-size: var(--t-14);
  font-weight: 500;
  color: var(--fg-2);
  transition: color 0.15s, background 0.15s;
}
.sp-nav a:hover { color: var(--fg-1); background: var(--bg-sunken); }
.sp-nav a[data-active] { color: var(--accent); }

/* ── Main content ───────────────────────────────────────────────────────── */
/* WI-S2.UX-02: widen main column to host the hero grid; body content (h2/p/ul)
 * still reads at 760px max via the descendant selectors below.            */
.sp-main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 56px 24px 96px;
}

/* ── Hero — shared pattern across all 12 sub-pages (WI-S2.UX-02) ───────────
 * Two-column grid: text (kicker + h1 + lede + CTA) on the left, per-page
 * inline SVG illustration on the right. Mirrors the homepage hero rhythm
 * (sections-a.jsx Hero) — dark surface, ambient accent glow, mono kicker
 * chip, Newsreader display h1, single primary CTA. Below 880px, stacks
 * vertically with the illustration first hidden then resized to thumbnail. */
.sp-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 56px;
  padding-bottom: 48px;
  border-bottom: var(--hairline) solid var(--border-1);
}
.sp-hero::before {
  content: "";
  position: absolute;
  top: -200px; left: -10%;
  width: 580px; height: 580px;
  background: radial-gradient(ellipse at center, oklch(from var(--accent) l c h / 0.13), transparent 60%);
  pointer-events: none;
  z-index: 0;
}
.sp-hero::after {
  content: "";
  position: absolute;
  top: -120px; right: -8%;
  width: 380px; height: 380px;
  background: radial-gradient(ellipse at center, oklch(from var(--tier-portfolio) l c h / 0.07), transparent 60%);
  pointer-events: none;
  z-index: 0;
}
.sp-hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
  max-width: 1120px;
  margin: 0 auto;
}
.sp-hero-text { min-width: 0; }
.sp-hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 30px;
  padding: 0 13px 0 10px;
  border-radius: var(--r-pill);
  background: var(--bg-raised);
  border: var(--hairline) solid var(--border-2);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-2);
  margin-bottom: 22px;
}
.sp-hero-kicker .sp-hero-mark {
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  flex-shrink: 0;
}
.sp-hero h1 {
  margin: 0 0 22px;
  max-width: 560px;
}
.sp-hero h1 .accent { color: var(--accent); }
.sp-hero-lede {
  font-size: var(--t-18);
  line-height: 1.55;
  color: var(--fg-2);
  max-width: 520px;
  margin: 0 0 28px;
}
.sp-hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 22px;
  background: var(--accent);
  color: var(--accent-fg);
  border: var(--hairline) solid oklch(from var(--accent) calc(l - 0.08) calc(c * 1.1) h);
  border-radius: var(--r-3);
  font-family: var(--font-ui);
  font-size: var(--t-15);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 oklch(1 0 0 / 0.18),
    inset 0 -1px 0 oklch(0 0 0 / 0.12),
    0 2px 4px oklch(from var(--accent) calc(l - 0.2) c h / 0.4),
    0 6px 16px oklch(from var(--accent) calc(l - 0.2) c h / 0.22);
  transition: transform 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.sp-hero-cta:hover {
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 oklch(1 0 0 / 0.22),
    inset 0 -1px 0 oklch(0 0 0 / 0.12),
    0 3px 6px oklch(from var(--accent) calc(l - 0.2) c h / 0.45),
    0 10px 22px oklch(from var(--accent) calc(l - 0.2) c h / 0.3);
}
.sp-hero-cta .arr {
  display: inline-block;
  transition: transform 0.15s var(--ease);
}
.sp-hero-cta:hover .arr { transform: translateX(3px); }

/* Hero illustration — per-page inline SVG. Shared visual language:
 * monoline 1.6px stroke; 3-color palette (accent, border-3, fg-3); JetBrains
 * Mono 9-10px labels; iso/30deg schematic feel; ~360x240 viewBox.        */
.sp-hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 240px;
}
.sp-hero-illu {
  width: 100%;
  max-width: 380px;
  height: auto;
  filter: drop-shadow(0 18px 32px oklch(0 0 0 / 0.5));
}
.sp-hero-illu .stroke     { fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.sp-hero-illu .stroke-thin{ fill: none; stroke: var(--accent); stroke-width: 1.1; stroke-linecap: round; stroke-linejoin: round; }
.sp-hero-illu .stroke-soft{ fill: none; stroke: var(--border-3); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.sp-hero-illu .stroke-ghost{ fill: none; stroke: var(--border-3); stroke-width: 1; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 2 3; opacity: 0.7; }
.sp-hero-illu .fill       { fill: var(--accent-soft); stroke: var(--accent-border); stroke-width: 1; }
.sp-hero-illu .fill-bg    { fill: var(--bg-raised); stroke: var(--border-2); stroke-width: 1; }
.sp-hero-illu .fill-accent{ fill: var(--accent); stroke: none; }
.sp-hero-illu .dot        { fill: var(--accent); }
.sp-hero-illu .dot-soft   { fill: var(--border-3); }
.sp-hero-illu .label      { font-family: var(--font-mono); font-size: 9px; fill: var(--fg-3); letter-spacing: 0.06em; }
.sp-hero-illu .label-em   { font-family: var(--font-mono); font-size: 9px; fill: var(--accent); letter-spacing: 0.06em; font-weight: 600; }
.sp-hero-illu .label-lg   { font-family: var(--font-mono); font-size: 11px; fill: var(--fg-2); letter-spacing: 0.06em; font-weight: 600; }

/* ── Body content (post-hero) — narrow column for readability ────────────── */
.sp-main > h2,
.sp-main > p,
.sp-main > ul,
.sp-main > ol,
.sp-main > .sp-cta-block,
.sp-main > .sp-form,
.sp-main > form {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

h1 {
  font-family: var(--font-display);
  font-size: clamp(var(--t-32), 4vw, var(--t-44));
  font-weight: 500;
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--fg-1);
  margin-bottom: 20px;
}

h2 {
  font-size: var(--t-20);
  font-weight: 600;
  color: var(--fg-1);
  margin-top: 48px;
  margin-bottom: 12px;
}

p {
  font-size: var(--t-16);
  line-height: var(--lh-loose);
  color: var(--fg-2);
  margin-bottom: 16px;
}

ul, ol {
  padding-left: 24px;
  margin-bottom: 16px;
}
li {
  font-size: var(--t-16);
  line-height: var(--lh-loose);
  color: var(--fg-2);
  margin-bottom: 6px;
}

/* ── Hero responsive ────────────────────────────────────────────────────── */
@media (max-width: 880px) {
  .sp-hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .sp-hero-text { order: 1; }
  .sp-hero-visual { order: 2; min-height: 180px; max-width: 320px; margin: 0 auto; }
}
@media (max-width: 480px) {
  .sp-main { padding: 40px 20px 80px; }
  .sp-hero { margin-bottom: 40px; padding-bottom: 36px; }
  .sp-hero-lede { font-size: var(--t-16); }
}

/* ── CTA button ─────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--r-3);
  font-family: var(--font-ui);
  font-size: var(--t-15);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
  text-decoration: none;
  border: none;
}
.btn-primary {
  background: var(--accent);
  color: var(--accent-fg);
}
.btn-primary:hover { background: var(--accent-hover); }
.sp-cta-block { margin-top: 48px; }

/* ── Contact form ───────────────────────────────────────────────────────── */
.sp-form { display: flex; flex-direction: column; gap: 18px; max-width: 520px; margin-top: 32px; }
.sp-field { display: flex; flex-direction: column; gap: 6px; }
.sp-field label { font-size: var(--t-13); font-weight: 500; color: var(--fg-2); }
.sp-field label .req { color: var(--accent); }
.sp-field input,
.sp-field select,
.sp-field textarea {
  padding: 10px 14px;
  border-radius: var(--r-2);
  border: var(--hairline) solid var(--border-2);
  background: var(--bg-sunken);
  color: var(--fg-1);
  font-family: var(--font-ui);
  font-size: var(--t-14);
  width: 100%;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.sp-field input:focus,
.sp-field select:focus,
.sp-field textarea:focus {
  border-color: var(--border-focus);
  box-shadow: var(--ring-accent);
}
.sp-field textarea { height: 120px; resize: vertical; }
.sp-honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.sp-form-note { font-size: var(--t-12); color: var(--fg-4); margin-top: 4px; }
.sp-form-status { font-size: var(--t-14); color: var(--fg-2); margin-top: 8px; min-height: 24px; }
.sp-form-status.success { color: var(--ok); }
.sp-form-status.error { color: var(--bad); }

/* ── Footer ─────────────────────────────────────────────────────────────── */
.sp-footer {
  border-top: var(--hairline) solid var(--border-1);
  background: var(--bg-base);
  padding: 32px 24px;
}
.sp-footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  justify-content: space-between;
  align-items: flex-start;
}
.sp-footer-related { flex: 1; min-width: 200px; }
.sp-footer-related h3 {
  font-size: var(--t-12);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--fg-3);
  margin-bottom: 10px;
}
.sp-footer-related ul { list-style: none; padding: 0; margin: 0; }
.sp-footer-related li { margin-bottom: 6px; }

/* ── Tree navigation: breadcrumbs (B-21; sub-nav rail removed B-25) ─────── */

/* Breadcrumbs */
.breadcrumbs {
  margin-bottom: 20px;
}
.breadcrumbs ol {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
  list-style: none;
  padding: 0;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-3);
  line-height: 1.4;
}
.breadcrumbs li + li::before {
  content: "/";
  margin: 0 6px;
  color: var(--fg-4);
  flex-shrink: 0;
}
.breadcrumbs a {
  color: var(--fg-3);
  text-decoration: none;
  transition: color .12s;
}
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}
.breadcrumbs [aria-current="page"] {
  color: var(--fg-1);
  font-weight: 500;
}

/* Back-to-homepage strip */
.sp-back-home {
  margin-top: 56px;
  padding-top: 20px;
  border-top: var(--hairline) solid var(--border-1);
}
.sp-back-home a {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-3);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color .12s;
}
.sp-back-home a:hover { color: var(--accent); }
.sp-footer-related a {
  font-size: var(--t-14);
  color: var(--fg-2);
  text-decoration: none;
}
.sp-footer-related a:hover { color: var(--accent); }
.sp-footer-entity {
  margin-top: 24px;
  padding-top: 20px;
  border-top: var(--hairline) solid var(--border-1);
  font-size: var(--t-12);
  color: var(--fg-4);
  max-width: 1120px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

/* ── Cycle-tag badge (OOP-3 B-07) ────────────────────────────────────────── */
.sp-cycle-badge-wrap {
  max-width: 760px;
  margin: 0 auto 32px;
}
.sp-cycle-badge {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 11px;
  border-radius: var(--r-pill);
  background: var(--accent-soft);
  border: var(--hairline) solid var(--accent-border);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ── Ladder footer (OOP-3 B-07) ──────────────────────────────────────────── */
.ladder-up {
  max-width: 760px;
  margin: 48px auto 0;
  padding: 18px 22px;
  border: var(--hairline) solid var(--border-2);
  border-radius: var(--r-3);
  background: var(--bg-raised);
}
.ladder-up p {
  font-size: var(--t-14);
  color: var(--fg-2);
  margin: 0;
  line-height: var(--lh-normal);
}
.ladder-up a { color: var(--accent); text-decoration: none; }
.ladder-up a:hover { text-decoration: underline; }

/* ── Persistent nav/footer shell (B-19) ──────────────────────────────────── */
/* FOUC-prevention styles applied before persistent-shell.js loads.
 * The full pnav-* / pfoot-* styles are injected by persistent-nav/footer.html. */
#persistent-nav {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--bg-base);
  border-bottom: var(--hairline) solid var(--border-1);
}
.nav-fallback {
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
  height: 56px;
}
.nav-fallback .brand-link {
  font-size: 15px;
  font-weight: 600;
  color: var(--fg-1);
  text-decoration: none;
}
.nav-fallback a {
  font-size: 13.5px;
  color: var(--fg-2);
  text-decoration: none;
}
.nav-fallback a:hover { color: var(--fg-1); }
.nav-fallback .btn {
  margin-left: auto;
  padding: 7px 14px;
  background: var(--accent);
  color: var(--accent-fg);
  border-radius: var(--r-3);
  font-size: 13px;
  font-weight: 600;
}
#persistent-footer {
  border-top: var(--hairline) solid var(--border-1);
  background: var(--bg-base);
  padding: 20px 32px;
}
#persistent-footer p {
  font-size: 13px;
  color: var(--fg-3);
  max-width: 1120px;
  margin: 0 auto;
}
#persistent-footer a { color: var(--accent); text-decoration: none; }
