/* =========================================================================
   SPIRAL by GLENDER — Front-end UI system (2026 redesign)
   Layout system ported from the reference spec (WEB UI/IMPLEMENTACAO-UI.md):
   container, section rhythm, type scale, component geometry, motion.
   Brand: charcoal + the SPIRAL gold family. No other colours.
   Loaded after app.css on the landing; loaded on every page via header.php.
   ========================================================================= */

:root {
  /* brand (canonical, keep) */
  --gl-bg: #050508;
  --gl-panel: #0d0e13;
  --gl-panel-2: #12141b;
  --gl-panel-3: #181a23;
  --gl-popover: #1d202a;
  --gl-line: rgba(255, 255, 255, 0.075);
  --gl-line-2: rgba(255, 255, 255, 0.14);
  --gl-text: #f3f0ea;
  --gl-muted: #9a9aa8;
  --gl-dim: #6f7180;
  --gl-disabled: #4a4c57;
  --gl-gold: #f7b84b;
  --gl-gold-2: #ffd080;
  --gl-gold-soft: rgba(247, 184, 75, 0.12);
  --gl-gold-line: rgba(247, 184, 75, 0.55);
  --gl-ink: #0a0b10;
  --gl-success: #6aa86d;
  --gl-danger: #c9443d;

  /* semantic aliases */
  --background: var(--gl-bg);
  --surface: var(--gl-panel);
  --surface-2: var(--gl-panel-2);
  --surface-elevated: var(--gl-popover);
  --foreground: var(--gl-text);
  --muted: var(--gl-muted);
  --muted-foreground: var(--gl-dim);
  --primary: var(--gl-gold);
  --primary-hover: var(--gl-gold-2);
  --border: var(--gl-line);
  --input: var(--gl-line-2);
  --focus-ring: var(--gl-gold-line);

  /* structural (reference §2.2 / §4) */
  --gl-maxw: 1200px;
  --gl-gutter: clamp(20px, 4vw, 40px);
  --gl-section: clamp(76px, 10vw, 120px);
  --gl-section-tight: clamp(62px, 8vw, 96px);
  --gl-r-xs: 8px;
  --gl-r-sm: 10px;
  --gl-r: 12px;
  --gl-r-lg: 18px;
  --gl-r-xl: 22px;
  --gl-pill: 999px;
  --gl-el-1: 0 0 0 1px var(--gl-line), 0 1px 2px rgba(0, 0, 0, 0.5), 0 6px 18px -8px rgba(0, 0, 0, 0.75);
  --gl-el-2: 0 0 0 1px var(--gl-line-2), 0 2px 8px rgba(0, 0, 0, 0.55), 0 18px 44px -18px rgba(0, 0, 0, 0.85);
  --gl-t: 0.24s cubic-bezier(0.2, 0.7, 0.2, 1);
  --gl-ease-hero: cubic-bezier(0.19, 1, 0.22, 1);
  --gl-serif: Georgia, "Times New Roman", serif;
  --gl-sans: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --gl-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
}

/* ── Layout ─────────────────────────────────────────────── */
.site-main { display: block; }
.gl-wrap {
  width: 100%;
  max-width: var(--gl-maxw);
  margin-inline: auto;
  padding-inline: var(--gl-gutter);
}
.gl-section { padding-block: var(--gl-section); }
.gl-section-tight { padding-block: var(--gl-section-tight); }
.gl-dash { border-top: 1px dashed var(--gl-line-2); }
.gl-center { text-align: center; }

/* ── Type scale (reference ratios, brand faces) ─────────── */
.gl-h1 {
  font-family: var(--gl-serif);
  font-size: clamp(2.3rem, 4.4vw, 3.5rem);
  line-height: 1.06;
  letter-spacing: -0.01em;
  font-weight: 800;
  color: #fbf9f5;
  margin: 0;
  overflow-wrap: break-word;
}
.gl-h1 em { font-style: italic; font-weight: 800; color: var(--gl-gold); }

/* Rotating word (reference `.rotw`: animated width, .24s fade/slide swap). */
.gl-h1 .gl-key { white-space: nowrap; }
.gl-rotw {
  display: inline-block;
  position: relative;
  white-space: nowrap;
  text-align: start;
  transition: width 0.34s cubic-bezier(0.4, 0, 0.2, 1);
}
.gl-rotw-in { display: inline-block; transition: opacity 0.24s ease, transform 0.24s ease; }
.gl-rotw-in.out { opacity: 0; transform: translateY(-0.16em); }
@media (prefers-reduced-motion: reduce) {
  .gl-rotw, .gl-rotw-in { transition: none; }
}
.gl-h2 {
  font-family: var(--gl-sans);
  font-size: clamp(2.05rem, 4.5vw, 3.9rem);
  line-height: 1.07;
  letter-spacing: -0.035em;
  font-weight: 800;
  color: var(--gl-text);
  margin: 0;
  overflow-wrap: break-word;
}
.gl-h3 {
  font-family: var(--gl-sans);
  font-size: clamp(1.5rem, 2.9vw, 2.7rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 800;
  color: var(--gl-text);
  margin: 0;
}
.gl-h4 {
  font-family: var(--gl-serif);
  font-size: clamp(1.3rem, 2vw, 1.7rem);
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #fbf9f5;
  margin: 0;
}
.gl-lead {
  font-size: clamp(1.08rem, 1.55vw, 1.28rem);
  line-height: 1.6;
  color: var(--gl-muted);
  margin: 0;
}
.gl-body { font-size: 1rem; line-height: 1.75; color: var(--gl-muted); margin: 0; }
.gl-meta {
  font-family: var(--gl-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.gl-em { color: var(--gl-gold); }
.gl-serif { font-family: var(--gl-serif); }
.gl-measure { max-width: 62ch; }
.gl-measure-sm { max-width: 54ch; }

/* Section head (reference §5) */
.gl-head { max-width: 52rem; margin-inline: auto; text-align: center; }
.gl-head .gl-lead { max-width: 46rem; margin: 20px auto 0; }

/* Pill tag over headings */
.gl-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border: 1px solid var(--gl-line-2);
  border-radius: var(--gl-pill);
  background: var(--gl-panel-2);
  color: var(--gl-dim);
}
.gl-pill .gl-dot,
.gl-kicker .gl-dot { display: inline-block; width: 6px; height: 6px; border-radius: 999px; background: var(--gl-gold); }
.gl-kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--gl-dim);
}
.gl-kicker-dash { display: inline-block; width: 24px; height: 1px; background: var(--gl-gold); }

/* ── Buttons (reference §6.2) ───────────────────────────── */
.gl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 11px 20px;
  border-radius: var(--gl-r-sm);
  border: 1px solid transparent;
  font-family: var(--gl-sans);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--gl-t), border-color var(--gl-t), color var(--gl-t), box-shadow var(--gl-t), transform var(--gl-t);
}
.gl-btn-primary {
  background: linear-gradient(135deg, var(--gl-gold) 0%, var(--gl-gold-2) 100%);
  color: var(--gl-ink);
  box-shadow: 0 4px 20px rgba(247, 184, 75, 0.18);
}
.gl-btn-primary:hover {
  box-shadow: 0 8px 28px rgba(247, 184, 75, 0.3);
  transform: translateY(-1px);
}
.gl-btn-ghost {
  background: var(--gl-panel-2);
  border-color: var(--gl-line-2);
  color: var(--gl-text);
}
.gl-btn-ghost:hover { border-color: var(--gl-gold-line); color: var(--gl-gold-2); }
.gl-btn-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--gl-gold-2);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: color var(--gl-t);
}
.gl-btn-link:hover { color: var(--gl-gold); }
.gl-btn .gl-arr { transition: transform var(--gl-t); }
.gl-btn:hover .gl-arr { transform: translateX(3px); }

/* ── Cards / chips ──────────────────────────────────────── */
.gl-card {
  background: var(--gl-panel);
  border: 1px solid var(--gl-line);
  border-radius: var(--gl-r-lg);
  transition: border-color var(--gl-t), box-shadow var(--gl-t), transform var(--gl-t);
}
.gl-card-hover:hover { border-color: var(--gl-gold-line); box-shadow: var(--gl-el-2); }
.gl-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--gl-line-2);
  border-radius: var(--gl-r);
  background: var(--gl-panel-2);
  color: var(--gl-muted);
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  transition: border-color var(--gl-t), color var(--gl-t);
}
.gl-chip:hover { border-color: var(--gl-gold-line); color: var(--gl-text); }
.gl-chip-dot { display: inline-block; width: 6px; height: 6px; flex: none; border-radius: 999px; background: var(--gl-gold); }

/* ── Header (reference §6.1): transparent at the top, glass pill on scroll ── */
.gl-header {
  position: sticky;
  top: 0;
  z-index: 40;
  padding-top: 0;
  background: transparent;
}
body.admin-bar .gl-header { top: 32px; }
.gl-header-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 72px;
  max-width: var(--gl-maxw);
  margin-inline: auto;
  padding-inline: var(--gl-gutter);
  border-radius: 0;
  background: transparent;
}
/* Transitions only arm after the first real user scroll: load-time scroll
   restoration must swap states instantly, without animating. */
.gl-header.is-ready { transition: padding-top 0.28s cubic-bezier(0.4, 0, 0.2, 1); }
.gl-header.is-ready .gl-header-inner {
  transition:
    max-width 0.28s cubic-bezier(0.4, 0, 0.2, 1),
    min-height 0.28s cubic-bezier(0.4, 0, 0.2, 1),
    padding 0.28s cubic-bezier(0.4, 0, 0.2, 1),
    border-radius 0.28s cubic-bezier(0.4, 0, 0.2, 1),
    background-color 0.28s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}
.gl-header.is-scrolled { padding-top: 11px; }
.gl-header.is-scrolled .gl-header-inner {
  max-width: 980px;
  min-height: 61px;
  border-radius: 999px;
  padding-inline: 18px 10px;
  background: rgba(5, 5, 8, 0.78);
  backdrop-filter: blur(14px) saturate(1.85);
  -webkit-backdrop-filter: blur(14px) saturate(1.85);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45), 0 2px 8px rgba(0, 0, 0, 0.3);
}
/* Tighter rhythm inside the pill so the full nav still fits */
.gl-header.is-scrolled .gl-nav { gap: 0; }
.gl-header.is-scrolled .gl-nav a { padding: 0 7px; font-size: 11px; }
.gl-header.is-scrolled .gl-header-cta .gl-btn { min-height: 38px; padding: 8px 13px; font-size: 12.5px; }
.gl-header.is-scrolled .gl-brand img { width: 34px; height: 34px; }
.gl-header.is-scrolled .gl-brand-sub { display: none; }
.gl-header.is-scrolled .gl-brand-title { font-size: 13px; }
.gl-brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; flex: none; }
.gl-brand img { width: 40px; height: 40px; object-fit: contain; filter: drop-shadow(0 8px 18px rgba(247, 184, 75, 0.22)); }
.gl-brand-title {
  display: block;
  font-family: var(--gl-serif);
  font-size: 14px;
  letter-spacing: 2.2px;
  text-transform: uppercase;
  color: #fff;
  white-space: nowrap;
}
.gl-brand-title span { color: var(--gl-gold); }
.gl-brand-sub {
  display: block;
  margin-top: 1px;
  color: var(--gl-dim);
  font-family: var(--gl-mono);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  white-space: nowrap;
}
.gl-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.gl-nav ul { display: flex; align-items: center; gap: 4px; margin: 0; padding: 0; list-style: none; }
.gl-nav li { display: inline-flex; }
.gl-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 10px;
  border-radius: var(--gl-pill);
  color: var(--gl-muted);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--gl-t), background-color var(--gl-t);
}
.gl-nav a:hover { color: var(--gl-text); background: rgba(255, 255, 255, 0.04); }
.gl-nav a.gl-nav-highlight { color: var(--gl-gold); }
.gl-header-cta { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.gl-header-cta .gl-btn { min-height: 40px; padding: 9px 16px; font-size: 13px; }
.gl-nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--gl-line-2);
  border-radius: var(--gl-pill);
  background: transparent;
  color: var(--gl-text);
  cursor: pointer;
}
.gl-nav-toggle:hover { border-color: var(--gl-gold-line); color: var(--gl-gold); }
.gl-mobile-menu { display: none; border-top: 1px solid var(--gl-line); background: var(--gl-bg); }
.gl-mobile-menu a {
  display: flex;
  align-items: center;
  min-height: 50px;
  color: var(--gl-muted);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid var(--gl-line);
}
.gl-mobile-menu a:hover { color: var(--gl-gold); }
.gl-mobile-menu a:last-child { border-bottom: 0; }

/* ── Landing: hero (reference geometry: fills the viewport, ticker at the base) ── */
.gl-landing { position: relative; }
.gl-hero {
  position: relative;
  min-height: min(100svh, 1040px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(40px, 5vh, 80px) 0 clamp(28px, 4vh, 52px);
  overflow: clip;
}
.gl-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(42% 34% at 72% 10%, rgba(247, 184, 75, 0.07), transparent 70%);
}
.gl-hero > * { position: relative; z-index: 1; }
.gl-hero-grid {
  display: grid;
  gap: clamp(28px, 4.5vw, 72px);
  align-items: center;
  width: 100%;
}
@media (min-width: 1024px) {
  .gl-hero-grid { grid-template-columns: minmax(0, 1.16fr) minmax(0, 0.84fr); }
}
.gl-hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 22px;
  min-width: 0;
}
.gl-hero-copy .gl-h1,
.gl-hero-copy .gl-hero-lead,
.gl-hero-copy .gl-hero-note,
.gl-hero-copy .gl-hero-cta,
.gl-hero-copy .gl-hero-facts,
.gl-hero-copy .gl-footline { margin-top: 0; }
.gl-hero-lead { max-width: 46ch; }
.gl-hero-note { color: rgba(247, 184, 75, 0.55); font-size: 13px; letter-spacing: 0.8px; font-weight: 600; }
.gl-hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.gl-hero-facts { display: flex; flex-wrap: wrap; gap: 10px 22px; color: var(--gl-dim); }
.gl-hero-facts > span { display: inline-flex; align-items: center; gap: 8px; }
.gl-footline { margin-top: 2px; color: var(--gl-dim); }

/* Hero entrance — ported verbatim from the reference (.rise: 1s, 26px, staggered). */
@keyframes gl-rise { to { opacity: 1; transform: none; } }
@keyframes gl-rise-y { 0% { transform: translateY(26px); } to { transform: none; } }
.gl-rise {
  opacity: 0;
  transform: translateY(26px);
  animation: gl-rise 1s var(--gl-ease-hero) forwards;
}
.gl-rise.d1 { animation-delay: 0.12s; }
.gl-rise.d2 { animation-delay: 0.26s; }
.gl-rise.d3 { animation-delay: 0.42s; }
.gl-rise.d4 { animation-delay: 0.58s; }
.gl-rise.d5 { animation-delay: 0.74s; }
@media (prefers-reduced-motion: reduce) {
  .gl-rise { opacity: 1; animation-name: gl-rise-y; animation-duration: 0.01ms; }
}

/* Hero ticker — reference .ticker: 46s drift, dashed hairlines, fade mask, pause on hover. */
.gl-ticker {
  position: relative;
  margin-top: clamp(34px, 6vh, 64px);
  border-top: 1px dashed var(--gl-line-2);
  border-bottom: 1px dashed var(--gl-line-2);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.gl-ticker-track { display: flex; width: max-content; animation: gl-tick 46s linear infinite; }
.gl-ticker:hover .gl-ticker-track { animation-play-state: paused; }
.gl-ticker-set { display: flex; align-items: center; gap: 44px; padding: 14px 22px; flex: none; }
.gl-ticker-set span {
  font-family: var(--gl-mono);
  font-size: 0.7rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gl-dim);
  white-space: nowrap;
}
.gl-ticker-set span b { color: var(--gl-gold); font-weight: 500; }
@keyframes gl-tick { to { transform: translate(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .gl-ticker-track { animation: none; }
}

/* Engine mode (loading or dashboard): the site chrome never shows. */
body.spiral-app-mode .gl-footer,
body.spiral-dashboard .gl-footer,
body.spiral-dashboard .gl-header,
body.spiral-dashboard .gl-ticker {
  display: none !important;
}
.gl-hero-aside { min-width: 0; }
.gl-engine-card {
  background: var(--gl-panel);
  border: 1px solid var(--gl-line);
  border-radius: var(--gl-r-lg);
  box-shadow: var(--gl-el-1);
  padding: 18px;
}
.gl-engine-card .spiral-steps { gap: 8px; }
.gl-engine-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--gl-line);
  color: var(--gl-gold);
}
.gl-engine-head .gl-meta { color: var(--gl-gold); }
.gl-engine-head span.gl-status { color: var(--gl-dim); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 700; }
.gl-steps { display: grid; gap: 10px; margin-top: 16px; }
.gl-step { display: flex; gap: 12px; align-items: flex-start; }
.gl-step .gl-step-dot {
  flex: none;
  width: 8px;
  height: 8px;
  margin-top: 6px;
  border-radius: 999px;
  background: var(--gl-gold);
  box-shadow: 0 0 10px rgba(247, 184, 75, 0.5);
}
.gl-step h3 {
  margin: 0;
  font-family: var(--gl-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--gl-text);
}
.gl-step p { margin: 3px 0 0; font-size: 12.5px; line-height: 1.6; color: var(--gl-dim); }

/* ── Landing: split sections rhythm ─────────────────────── */
.gl-alt { background: linear-gradient(180deg, rgba(255, 255, 255, 0.015), rgba(255, 255, 255, 0)); border-block: 1px dashed var(--gl-line-2); }

/* VS */
.gl-vs-grid { display: grid; gap: 22px; margin-top: 56px; }
@media (min-width: 1024px) { .gl-vs-grid { grid-template-columns: 1fr 1fr; } }
.gl-vs-col {
  display: flex;
  flex-direction: column;
  padding: 20px 22px 18px;
  border-radius: var(--gl-r-lg);
  border: 1px solid var(--gl-line);
  background: var(--gl-panel-2);
}
.gl-vs-col.us {
  background: var(--gl-panel);
  border-color: var(--gl-gold-line);
  box-shadow: 0 26px 60px -34px rgba(247, 184, 75, 0.35);
}
.gl-vs-rows { display: grid; gap: 10px; margin-top: 18px; }
.gl-vs-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid var(--gl-line);
  border-radius: var(--gl-r);
  background: var(--gl-panel);
  font-size: 13px;
  font-weight: 600;
  color: var(--gl-muted);
}
.gl-vs-col.us .gl-vs-row { background: var(--gl-panel-2); justify-content: flex-start; }
.gl-vs-row .gl-check { color: var(--gl-gold); flex: none; }
.gl-vs-tag {
  flex: none;
  padding: 3px 10px;
  border: 1px solid var(--gl-line-2);
  border-radius: var(--gl-pill);
  color: var(--gl-dim);
  font-family: var(--gl-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
}
.gl-vs-tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 18px; }
@media (min-width: 640px) { .gl-vs-tiles { grid-template-columns: repeat(4, 1fr); } }
.gl-vs-tile {
  padding: 12px;
  border: 1px solid var(--gl-line);
  border-radius: var(--gl-r);
  background: var(--gl-panel);
}
.gl-vs-col.us .gl-vs-tile { background: var(--gl-panel-2); }
.gl-vs-tile b { display: block; font-size: 22px; font-weight: 800; letter-spacing: -0.02em; color: var(--gl-dim); }
.gl-vs-col.us .gl-vs-tile b { color: var(--gl-gold); }
.gl-vs-tile span { display: block; margin-top: 6px; font-size: 10.5px; line-height: 1.4; color: var(--gl-dim); }
.gl-vs-total {
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px dashed var(--gl-line-2);
  border-radius: var(--gl-r);
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--gl-muted);
}
.gl-vs-col.us .gl-vs-total { border-color: var(--gl-gold-line); background: var(--gl-gold-soft); }
.gl-vs-note { margin-top: 14px; font-size: 12px; color: var(--gl-disabled); }
.gl-vs-col.us .gl-vs-note { color: var(--gl-text); font-weight: 600; }

/* Flow panels */
.gl-flow-grid { display: grid; gap: 16px; margin-top: 56px; }
@media (min-width: 768px) { .gl-flow-grid { grid-template-columns: 1fr 1fr; } }
.gl-flow-card { padding: 24px; }
.gl-flow-card .gl-flow-label { color: var(--gl-dim); }
.gl-flow-card .gl-flow-label b { color: var(--gl-gold); font-weight: 700; }
.gl-chip-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 18px; }
@media (min-width: 640px) { .gl-chip-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Stats */
.gl-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px 28px; }
@media (min-width: 860px) { .gl-stats { grid-template-columns: repeat(4, 1fr); } }
.gl-stat b {
  display: block;
  font-size: clamp(44px, 5.5vw, 76px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--gl-text);
}
.gl-stat.gold b { color: var(--gl-gold); }
.gl-stat span { display: block; margin-top: 12px; max-width: 24ch; font-size: 13px; line-height: 1.6; color: var(--gl-muted); }

/* How card with tabs (reference MCP-card) */
.gl-how-card {
  margin-top: 56px;
  border: 1px solid var(--gl-line);
  border-radius: var(--gl-r-xl);
  background: var(--gl-panel);
  box-shadow: var(--gl-el-2);
  overflow: hidden;
}
.gl-tabs {
  display: flex;
  gap: 4px;
  padding: 12px 12px 0;
  border-bottom: 1px solid var(--gl-line);
  overflow-x: auto;
  scrollbar-width: none;
}
.gl-tabs::-webkit-scrollbar { display: none; }
.gl-tab {
  flex: none;
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--gl-dim);
  font-family: var(--gl-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: color var(--gl-t), border-color var(--gl-t);
}
.gl-tab:hover { color: var(--gl-text); }
.gl-tab[aria-selected="true"] { color: var(--gl-gold); border-bottom-color: var(--gl-gold); }
.gl-panel { display: none; padding: clamp(22px, 4vw, 36px); }
.gl-panel.is-active { display: block; }
.gl-panel-grid { display: grid; gap: 36px; align-items: center; }
@media (min-width: 1024px) { .gl-panel-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); } }
.gl-panel-grid.flip > :first-child { order: 0; }
@media (min-width: 1024px) { .gl-panel-grid.flip > :first-child { order: 2; } }
.gl-panel-list { margin: 18px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.gl-panel-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: var(--gl-muted);
  font-size: 13.5px;
  line-height: 1.6;
}
.gl-panel-list li::before { content: "◆"; color: var(--gl-gold); font-size: 8px; line-height: 2.2; }
.gl-quote {
  margin: 52px auto 0;
  max-width: 52rem;
  padding: 28px;
  border: 1px solid var(--gl-line);
  border-radius: var(--gl-r-lg);
  background: var(--gl-panel);
}
.gl-quote blockquote {
  margin: 16px 0 0;
  padding-left: 24px;
  border-left: 2px solid var(--gl-gold);
  font-family: var(--gl-serif);
  font-size: clamp(1.15rem, 1.8vw, 1.5rem);
  line-height: 1.55;
  color: #fbf9f5;
}
.gl-cta-row { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* Monitor frame (workspace visuals, CSS/SVG only) */
.gl-frame {
  border: 1px solid var(--gl-line);
  border-radius: var(--gl-r-lg);
  background: var(--gl-panel-2);
  box-shadow: var(--gl-el-1);
  overflow: hidden;
}
.gl-frame-body { padding: 18px; }
.gl-frame-cap {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-top: 1px solid var(--gl-line);
  font-family: var(--gl-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gl-dim);
}
.gl-frame-cap b { color: var(--gl-gold); font-weight: 700; }
.gl-meter { display: grid; gap: 10px; }
.gl-meter-row { display: grid; grid-template-columns: 62px 1fr 54px; align-items: center; gap: 12px; font-family: var(--gl-mono); font-size: 10px; color: var(--gl-dim); }
.gl-meter-bar { height: 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); overflow: hidden; }
.gl-meter-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--gl-gold), var(--gl-gold-2)); }
.gl-meter-row span:last-child { text-align: right; color: var(--gl-muted); }

/* Gallery strip */
.gl-strip {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  padding-inline: var(--gl-gutter);
  padding-bottom: 8px;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
}
.gl-strip::-webkit-scrollbar { display: none; }
.gl-strip-item { flex: none; width: min(80vw, 520px); scroll-snap-align: start; }

/* Formats */
.gl-fmt-grid { display: grid; gap: 14px; margin-top: 40px; }
@media (min-width: 640px) { .gl-fmt-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .gl-fmt-grid { grid-template-columns: repeat(3, 1fr); } }
.gl-fmt-card { padding: 22px; display: flex; flex-direction: column; gap: 8px; }
.gl-fmt-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.gl-fmt-name { font-size: 16px; font-weight: 800; letter-spacing: 0.02em; color: var(--gl-text); }
.gl-fmt-tag {
  flex: none;
  padding: 3px 10px;
  border: 1px solid var(--gl-line-2);
  border-radius: var(--gl-pill);
  font-family: var(--gl-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--gl-dim);
}
.gl-fmt-tag.gold { border-color: var(--gl-gold-line); color: var(--gl-gold); }
.gl-fmt-card p { margin: 0; font-size: 12.5px; line-height: 1.6; color: var(--gl-dim); }
.gl-fmt-cta {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  border-color: var(--gl-gold-line);
  background: var(--gl-gold-soft);
  text-decoration: none;
}
.gl-fmt-cta b { color: var(--gl-gold); font-size: 16px; }
.gl-badge-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }

/* Cluster */
.gl-cluster { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 48px; }
.gl-cluster .gl-chip { min-height: 40px; border-radius: var(--gl-pill); padding-inline: 16px; font-family: var(--gl-mono); font-size: 11px; letter-spacing: 0.08em; }

/* Free band */
.gl-free-card {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: clamp(28px, 4vw, 44px);
  border: 1px solid var(--gl-gold-line);
  border-radius: var(--gl-r-xl);
  background: linear-gradient(135deg, rgba(247, 184, 75, 0.1), rgba(255, 255, 255, 0.015));
}
@media (min-width: 860px) { .gl-free-card { flex-direction: row; align-items: center; justify-content: space-between; } }
.gl-free-badge {
  flex: none;
  font-family: var(--gl-serif);
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--gl-gold);
  text-shadow: 0 0 40px rgba(247, 184, 75, 0.35);
}

/* FAQ (reference §6.6: grid-template-rows, never measured max-height) */
.gl-faq { max-width: 56rem; margin: 40px auto 0; }
.gl-qa { border-bottom: 1px dashed var(--gl-line-2); }
.gl-qa-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  min-height: 64px;
  padding: 22px 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  color: var(--gl-text);
  font-family: var(--gl-sans);
  font-size: 16px;
  font-weight: 600;
  transition: color var(--gl-t);
}
.gl-qa-q:hover { color: var(--gl-gold); }
.gl-qa-q .gl-pm { position: relative; flex: none; width: 18px; height: 18px; }
.gl-qa-q .gl-pm::before,
.gl-qa-q .gl-pm::after {
  content: "";
  position: absolute;
  background: var(--gl-gold);
  border-radius: 2px;
  transition: transform var(--gl-t);
}
.gl-qa-q .gl-pm::before { inset: 8px 0; }
.gl-qa-q .gl-pm::after { inset: 0 8px; }
.gl-qa.open .gl-qa-q .gl-pm::after { transform: scaleY(0); }
.gl-qa-a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.4s var(--gl-ease-hero); }
.gl-qa-a-in { overflow: hidden; }
.gl-qa.open .gl-qa-a { grid-template-rows: 1fr; }
.gl-qa-a p { margin: 0; padding: 0 0 26px; max-width: 68ch; font-size: 14.5px; line-height: 1.75; color: var(--gl-muted); }

/* Blog strip */
.gl-blog-grid { display: grid; gap: 16px; margin-top: 44px; }
@media (min-width: 768px) { .gl-blog-grid { grid-template-columns: repeat(3, 1fr); } }
.gl-blog-card { display: flex; flex-direction: column; overflow: hidden; text-decoration: none; }
.gl-blog-card-img img { display: block; width: 100%; height: 170px; object-fit: cover; }
.gl-blog-card-body { display: flex; flex-direction: column; gap: 8px; padding: 20px; }
.gl-blog-card-body span { font-family: var(--gl-mono); font-size: 9.5px; font-weight: 700; letter-spacing: 0.16em; color: var(--gl-gold); text-transform: uppercase; }
.gl-blog-card-body h3 { margin: 0; font-size: 16px; font-weight: 700; line-height: 1.35; color: var(--gl-text); }
.gl-blog-card-body p { margin: 0; font-size: 13px; line-height: 1.6; color: var(--gl-dim); }
.gl-blog-card-body .gl-btn-link { margin-top: 6px; }

/* Closer + newsletter */
.gl-closer {
  padding-block: clamp(104px, 12vw, 168px);
  border-top: 1px dashed var(--gl-line-2);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.015), rgba(255, 255, 255, 0));
}
.gl-closer-inner { display: flex; flex-direction: column; align-items: center; gap: 30px; text-align: center; }
.gl-closer .gl-h2 { max-width: 22ch; }
.gl-newsletter-card {
  display: block;
  width: 100%;
  max-width: 560px;
  border: 1px solid var(--gl-line);
  border-radius: var(--gl-r-lg);
  background: var(--gl-panel);
  padding: 24px;
  text-align: left;
}
.gl-newsletter-card .spiral-nl-msg,
.gl-newsletter-card .spiral-nl-error { margin-top: 10px; text-align: center; font-size: 12px; }
.gl-newsletter-card .spiral-nl-msg:empty,
.gl-newsletter-card .spiral-nl-error:empty { display: none !important; }
.gl-newsletter-card > div:empty { display: none; } /* the JS feedback slot, empty */
.gl-newsletter-kicker { display: flex; align-items: center; gap: 10px; color: var(--gl-gold); }
.gl-newsletter-card h3 { margin: 10px 0 6px; font-size: 17px; font-weight: 700; color: var(--gl-text); }
.gl-newsletter-card p { margin: 0; font-size: 13px; line-height: 1.65; color: var(--gl-dim); }
/* Neutralise the legacy app.css pill box (dark background, padding, border). */
.gl-newsletter-card .spiral-newsletter-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.gl-newsletter-card .spiral-newsletter-form input[type="email"] {
  flex: 1 1 220px;
  min-height: 46px;
  padding: 12px 16px;
  border: 1px solid var(--gl-line-2);
  border-radius: var(--gl-r-sm);
  background: var(--gl-panel-2);
  color: var(--gl-text);
  font-family: var(--gl-sans);
  font-size: 14px;
  outline: none;
  transition: border-color var(--gl-t), box-shadow var(--gl-t);
}
.gl-newsletter-card .spiral-newsletter-form input[type="email"]:focus {
  border-color: var(--gl-gold);
  box-shadow: 0 0 0 3px rgba(247, 184, 75, 0.18);
}
.gl-newsletter-card .spiral-newsletter-form button {
  min-height: 46px;
  padding: 0 22px;
  border: 0;
  border-radius: var(--gl-r-sm);
  background: linear-gradient(135deg, var(--gl-gold), var(--gl-gold-2));
  color: var(--gl-ink);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: box-shadow var(--gl-t), transform var(--gl-t);
}
.gl-newsletter-card .spiral-newsletter-form button:hover { box-shadow: 0 6px 24px rgba(247, 184, 75, 0.3); transform: translateY(-1px); }
.gl-newsletter-card .spiral-newsletter-form button:disabled { opacity: 0.6; cursor: wait; }

/* ── Footer (reference) ─────────────────────────────────── */
.gl-footer { border-top: 1px dashed var(--gl-line-2); background: #040407; }
.gl-foot-grid {
  display: grid;
  gap: 44px 40px;
  padding-block: clamp(56px, 7vw, 80px) 32px;
}
@media (min-width: 768px) { .gl-foot-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .gl-foot-grid { grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr)); } }
.gl-foot-brand .gl-brand-title { font-size: 15px; }
.gl-foot-brand p { margin: 16px 0 0; max-width: 42ch; font-size: 13px; line-height: 1.7; color: var(--gl-dim); }
.gl-foot-col h4 { margin: 0 0 16px; font-family: var(--gl-mono); font-size: 10px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gl-gold); }
.gl-foot-col ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.gl-foot-col a { color: var(--gl-muted); font-size: 13px; text-decoration: none; transition: color var(--gl-t); }
.gl-foot-col a:hover { color: var(--gl-text); }
.gl-foot-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-block: 22px;
  border-top: 1px dashed var(--gl-line);
  color: var(--gl-disabled);
  font-size: 12px;
}
.gl-foot-bottom a { color: var(--gl-disabled); text-decoration: none; }
.gl-foot-bottom a:hover { color: var(--gl-gold); }

/* ── Inner pages (blog, about, vs, contact, legal…) ─────── */
.gl-page-hero { padding-block: clamp(56px, 7vw, 96px) clamp(20px, 3vw, 36px); }
.gl-page-hero .gl-h1 { max-width: 24ch; }
.gl-page-hero .gl-lead { margin-top: 20px; max-width: 58ch; }
.gl-page-body { padding-block: 0 clamp(72px, 9vw, 120px); }
.gl-prose { max-width: 72ch; color: var(--gl-muted); font-size: 15.5px; line-height: 1.85; }
.gl-prose h2 { margin: 40px 0 12px; font-family: var(--gl-sans); font-size: clamp(1.4rem, 2.4vw, 1.9rem); font-weight: 800; letter-spacing: -0.02em; color: var(--gl-text); }
.gl-prose h3 { margin: 30px 0 10px; font-size: 1.15rem; font-weight: 700; color: var(--gl-text); }
.gl-prose p { margin: 14px 0; }
.gl-prose a { color: var(--gl-gold-2); text-decoration: underline; text-underline-offset: 2px; }
.gl-prose ul, .gl-prose ol { margin: 14px 0; padding-left: 22px; }
.gl-prose li { margin: 6px 0; }
.gl-prose strong { color: var(--gl-text); }
.gl-prose img { display: block; width: 100%; border-radius: var(--gl-r-lg); border: 1px solid var(--gl-line); margin: 22px 0; }
.gl-prose blockquote {
  margin: 24px 0;
  padding: 14px 20px;
  border-left: 2px solid var(--gl-gold);
  background: var(--gl-panel);
  border-radius: 0 var(--gl-r) var(--gl-r) 0;
  color: var(--gl-muted);
}
.gl-grid-3 { display: grid; gap: 16px; }
@media (min-width: 768px) { .gl-grid-3 { grid-template-columns: repeat(3, 1fr); } }
.gl-grid-2 { display: grid; gap: 16px; }
@media (min-width: 768px) { .gl-grid-2 { grid-template-columns: repeat(2, 1fr); } }

/* ── Motion (reference §7) ──────────────────────────────── */
.gl-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.9s var(--gl-ease-hero), transform 0.9s var(--gl-ease-hero);
}
.gl-reveal.in { opacity: 1; transform: none; }
.gl-reveal.d1 { transition-delay: 0.1s; }
.gl-reveal.d2 { transition-delay: 0.2s; }
.gl-reveal.d3 { transition-delay: 0.3s; }

@media (prefers-reduced-motion: reduce) {
  .gl-reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* Focus (reference §8) */
.gl-header a:focus-visible,
.gl-nav a:focus-visible,
.gl-btn:focus-visible,
.gl-tab:focus-visible,
.gl-qa-q:focus-visible,
.gl-mobile-menu a:focus-visible,
.gl-cluster .gl-chip:focus-visible,
.gl-footer a:focus-visible {
  outline: 2px solid var(--gl-gold);
  outline-offset: 3px;
}

/* Responsive */
@media (max-width: 900px) {
  .gl-header-inner { min-height: 64px; }
  .gl-nav { display: none; }
  .gl-header-cta { display: none; }
  .gl-nav-toggle { display: inline-flex; margin-left: auto; }
  .gl-mobile-menu.is-open { display: block; }
}
@media (max-width: 700px) {
  .gl-hero { padding-block: 40px; }
  .gl-engine-card { border-radius: var(--gl-r); }
  .gl-strip { gap: 16px; }
  .gl-foot-bottom { flex-direction: column; text-align: center; }
}

/* Reduced motion: stop everything that moves */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
