/* BlueKnightMarketing — editorial heraldic design system */

:root {
  /* Brand reference (stable across themes) */
  --ink: #060F1F;
  --ink-2: #0C1A30;
  --ink-3: #15263F;
  --steel: #1F3358;
  --paper: #F4EEDF;
  --paper-2: #ECE3CC;

  /* Accent (flame) */
  --flame: #F39C12;
  --flame-deep: #D97706;
  --flame-soft: rgba(243, 156, 18, 0.18);

  /* DEFAULT THEME — Blue-dominant midnight */
  --bg: #060F1F;
  --bg-2: #0A1729;
  --fg: #F4EEDF;
  --card: #0E1D34;
  --card-2: #122642;
  --slab-bg: #122642;            /* "elevated" navy panels */
  --slab-fg: #F4EEDF;
  --rule: rgba(244, 238, 223, 0.12);
  --rule-strong: rgba(244, 238, 223, 0.32);
  --muted: rgba(244, 238, 223, 0.66);
  --soft: rgba(244, 238, 223, 0.05);

  /* Type */
  --serif: "Poppins", "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --sans: "Poppins", "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Poppins", "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Layout */
  --max: 1320px;
  --gutter: clamp(20px, 4vw, 64px);
  --pad-x: max(var(--gutter), calc((100% - var(--max)) / 2));
}

[data-theme="parchment"] {
  --bg: #FFFFFF;
  --bg-2: #EBF0FA;
  --fg: #0B1426;
  --card: #FFFFFF;
  --card-2: #FBFCFE;
  --slab-bg: #060F1F;        /* navy slab on white still pops */
  --slab-fg: #F4EEDF;
  --rule: rgba(11, 20, 38, 0.10);
  --rule-strong: rgba(11, 20, 38, 0.28);
  --muted: rgba(11, 20, 38, 0.60);
  --soft: rgba(11, 20, 38, 0.04);
}

[data-accent="crimson"] {
  --flame: #DC2A2A;
  --flame-deep: #A31919;
  --flame-soft: rgba(220, 42, 42, 0.16);
}
[data-accent="gold"] {
  --flame: #D4A24C;
  --flame-deep: #A87B1F;
  --flame-soft: rgba(212, 162, 76, 0.18);
}
[data-accent="royal"] {
  --flame: #3461E0;
  --flame-deep: #1F3FA1;
  --flame-soft: rgba(52, 97, 224, 0.18);
}
[data-accent="fire"] {
  --flame: #E85520;
  --flame-deep: #C44010;
  --flame-soft: rgba(232, 85, 32, 0.18);
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "cv11";
  text-rendering: optimizeLegibility;
  transition: background 0.4s ease, color 0.4s ease;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }

::selection { background: var(--flame); color: #fff; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* Parchment grain */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.06 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  mix-blend-mode: screen;
  opacity: 0.18;
}
[data-theme="parchment"] body::before { mix-blend-mode: multiply; opacity: 0.08; }

/* Layout shell */
.shell { padding-inline: var(--pad-x); }
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; }

/* Header */
.site-head {
  position: relative; top: auto; z-index: 50;
  padding: 10px var(--pad-x);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  background: #ffffff;
  -webkit-backdrop-filter: none;
  border-bottom: 1px solid rgba(11, 20, 38, 0.10);
  color: #060F1F;
}
/* brand + nav live together in a centered flex group */
.head-center {
  grid-column: 2;
  display: flex;
  align-items: center;
  gap: 52px; /* room for brand scale(1.14) without crowding nav */
}
.site-head .head-cta { grid-column: 3; justify-self: end; }
.site-head .nav-toggle { grid-column: 3; justify-self: end; }
@media (max-width: 880px) {
  .site-head { grid-template-columns: 1fr auto; }
  .head-center { grid-column: 1; justify-self: start; gap: 0; }
  .site-head .nav-toggle { grid-column: 2; }
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.brand-mark { width: 40px; height: 40px; object-fit: contain; }

/* .head-group no longer used — brand and nav are now separate grid children */
.brand-name {
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: -0.01em;
  line-height: 1;
}
.brand-name em { font-style: italic; color: var(--flame); font-weight: 400; }

.nav {
  display: flex; align-items: center; gap: 4px;
  font-family: var(--mono);
  font-size: 16px;
  line-height: 20.8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.nav a {
  text-decoration: none;
  padding: 5px 18px;
  border-radius: 999px;
  color: rgba(6,15,31,0.60);
  transition: color 0.2s, background 0.2s;
}
.nav a:hover { color: #060F1F; background: rgba(6,15,31,0.06); }
.nav a.is-current { color: #060F1F; background: rgba(6,15,31,0.06); }
.nav a.is-current::before {
  content: "·"; color: var(--flame); margin-right: 4px; font-size: 16px; line-height: 0;
}

.head-cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px;
  background: #060F1F;
  color: #ffffff;
  text-decoration: none;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 999px;
  border: 1px solid #060F1F;
  transition: transform 0.2s;
}
.head-cta:hover { transform: translateY(-1px); }
.head-cta .arrow { transition: transform 0.2s; }
.head-cta:hover .arrow { transform: translateX(3px); }

/* Mobile nav */
.nav-toggle {
  display: none;
  background: none; border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--fg);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
@media (max-width: 880px) {
  .nav { display: none; }
  .head-cta { display: none; }
  .nav-toggle { display: inline-flex; }
  .site-head.is-open .nav {
    display: flex;
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: #ffffff;
    padding: 16px var(--pad-x);
    border-bottom: 1px solid rgba(11,20,38,0.10);
  }
  .site-head.is-open .nav a { padding: 14px 8px; }
}

/* Eyebrow + headline atoms */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow::before {
  content: ""; width: 28px; height: 1px; background: var(--flame);
}
.eyebrow .num { color: var(--flame); }

h1, h2, h3, h4 { font-family: var(--sans); font-weight: 700; margin: 0; line-height: 1.1; letter-spacing: -0.02em; }
h1 em, h2 em, h3 em { font-style: normal; color: var(--flame); font-weight: 800; }

.display {
  font-family: var(--serif);
  font-size: clamp(52px, 8vw, 128px);
  line-height: 1.0;
  letter-spacing: -0.025em;
  margin: 0;
}
.display em { font-style: italic; color: var(--flame); }
.h-xl { font-family: var(--serif); font-size: clamp(40px, 5.6vw, 80px); line-height: 1.0; letter-spacing: -0.02em; }
.h-lg { font-family: var(--serif); font-size: clamp(32px, 3.4vw, 48px); line-height: 1.05; letter-spacing: -0.015em; }
.h-md { font-family: var(--serif); font-size: clamp(24px, 2.4vw, 32px); line-height: 1.15; }

.lead {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(20px, 2.1vw, 26px);
  line-height: 1.35;
  color: var(--fg);
  max-width: 56ch;
  opacity: 0.88;
}
.body-p {
  font-size: 17px;
  line-height: 1.55;
  color: var(--fg);
  opacity: 0.78;
  max-width: 60ch;
}

/* CTAs */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px 50px;
  border-radius: 50px;
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.2s, background 0.2s, color 0.2s, border-color 0.2s;
}
.btn .arrow { transition: transform 0.25s ease; }
.btn:hover .arrow { transform: translateX(4px); }
.btn-primary {
  background: var(--flame);
  color: #fff;
  border-color: var(--flame);
  box-shadow: 0 12px 30px -12px var(--flame);
}
.btn-primary:hover { background: var(--flame-deep); border-color: var(--flame-deep); }
.btn-ghost {
  background: transparent;
  color: var(--fg);
  border-color: var(--rule-strong);
}
.btn-ghost:hover { background: var(--soft); }
.btn-dark {
  background: var(--fg); color: var(--bg); border-color: var(--fg);
}
.btn-dark:hover { transform: translateY(-1px); }

/* Heraldic divider ornament */
.ornament {
  display: flex; align-items: center; justify-content: center;
  gap: 16px;
  color: var(--rule-strong);
  font-size: 12px;
  margin: 64px auto;
  max-width: 200px;
}
.ornament::before, .ornament::after {
  content: ""; flex: 1; height: 1px; background: currentColor;
}
.ornament svg { color: var(--flame); }

/* Footer */
.site-foot {
  margin-top: 80px;
  padding: 44px var(--pad-x) 24px;
  border-top: 1px solid var(--rule);
  background: var(--bg);
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: clamp(20px, 3vw, 48px);
  max-width: var(--max);
  margin-inline: auto;
  align-items: start;
}
.foot-brand {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.foot-brand .brand { margin: 0; }
.foot-social {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 10px;
  align-items: center;
}
.foot-social__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--soft);
  border: 1px solid var(--rule);
  color: var(--fg);
  text-decoration: none;
  transition: transform 0.2s ease, background 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.foot-social__link:hover {
  transform: translateY(-2px);
  border-color: transparent;
  box-shadow: 0 8px 18px -8px rgba(0, 0, 0, 0.35);
}
/* Per-platform hover backgrounds (brand colours) */
.foot-social__link--gmaps:hover     { background: #FFFFFF; }
.foot-social__link--instagram:hover { background: radial-gradient(circle at 30% 110%, #FDD96B 0%, #FA8E37 24%, #DA2877 45%, #B72A8C 70%, #6E37AF 100%); }
.foot-social__link--linkedin:hover  { background: #0A66C2; }
.foot-social__link--x:hover         { background: #000; border-color: #000; }
.foot-social__link--facebook:hover  { background: #1877F2; }

/* Light-mode default: outline-style icons need a darker baseline color */
[data-theme="parchment"] .foot-social__link svg path,
[data-theme="parchment"] .foot-social__link svg rect,
[data-theme="parchment"] .foot-social__link svg circle { stroke: currentColor; }
[data-theme="parchment"] .foot-social__link--instagram svg [fill="#fff"] { fill: var(--fg); }
[data-theme="parchment"] .foot-social__link--instagram svg [stroke="#fff"] { stroke: var(--fg); }
[data-theme="parchment"] .foot-social__link--linkedin svg path { fill: var(--fg); }
[data-theme="parchment"] .foot-social__link--x svg path { fill: var(--fg); }
[data-theme="parchment"] .foot-social__link--facebook svg path { fill: var(--fg); }
/* On hover the brand background takes over — restore white glyphs */
[data-theme="parchment"] .foot-social__link--instagram:hover svg [fill="#fff"] { fill: #fff; }
[data-theme="parchment"] .foot-social__link--instagram:hover svg [stroke="#fff"] { stroke: #fff; }
[data-theme="parchment"] .foot-social__link--linkedin:hover svg path,
[data-theme="parchment"] .foot-social__link--x:hover svg path,
[data-theme="parchment"] .foot-social__link--facebook:hover svg path { fill: #fff; }

.foot-col h5 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 12px;
  font-weight: 500;
}
.foot-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.foot-col a {
  text-decoration: none;
  color: var(--fg);
  font-size: 14px;
  line-height: 1.7;
  display: inline-block;
  padding: 1px 0;
}
.foot-col a:hover { color: var(--flame); }
.foot-meta {
  max-width: var(--max);
  margin: 24px auto 0;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: center;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
@media (max-width: 760px) {
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .foot-brand { grid-column: 1 / -1; }
}

/* Tweaks panel */
.tweaks-btn {
  position: fixed; right: 20px; bottom: 20px;
  z-index: 80;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--fg); color: var(--bg);
  border: none;
  box-shadow: 0 12px 30px -8px rgba(0,0,0,0.3);
  display: grid; place-items: center;
  font-family: var(--serif); font-size: 22px;
}
.tweaks-panel {
  position: fixed; right: 20px; bottom: 80px;
  z-index: 80;
  width: 280px;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 24px 60px -20px rgba(0,0,0,0.35);
  display: none;
  flex-direction: column; gap: 16px;
}
.tweaks-panel.is-open { display: flex; }
.tweaks-panel h4 { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin: 0; font-weight: 500; }
.tweaks-row { display: flex; gap: 8px; }
.tweak-pill {
  flex: 1;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--rule);
  background: transparent;
  color: var(--fg);
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase;
}
.tweak-pill[aria-pressed="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.tweak-swatch {
  width: 36px; height: 36px; border-radius: 50%;
  border: 2px solid var(--rule);
  cursor: pointer;
  position: relative;
}
.tweak-swatch[aria-pressed="true"] { border-color: var(--fg); }
.tweak-swatch[aria-pressed="true"]::after {
  content: ""; position: absolute; inset: -6px; border: 1px solid var(--fg); border-radius: 50%;
}


/* ===================================== */
/* ANIMATIONS                            */
/* ===================================== */

/* Scroll-reveal primitive */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s cubic-bezier(.2,.7,.2,1), transform 0.9s cubic-bezier(.2,.7,.2,1);
  transition-delay: var(--rd, 0ms);
  will-change: opacity, transform;
}
[data-reveal="left"] { transform: translateX(-28px); }
[data-reveal="right"] { transform: translateX(28px); }
[data-reveal="scale"] { transform: scale(0.94); }
[data-reveal].is-in { opacity: 1; transform: none; }

/* Hero ambient aurora — slow drifting orange/blue glows behind everything */
.hero { isolation: isolate; }
.hero::before, .hero::after {
  content: "";
  position: absolute;
  inset: auto;
  width: 70vw; height: 70vw;
  max-width: 900px; max-height: 900px;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
}
.hero::before {
  background: radial-gradient(circle, var(--flame-soft) 0%, transparent 65%);
  top: -10%; right: -15%;
  animation: drift1 16s ease-in-out infinite alternate;
}
.hero::after {
  background: radial-gradient(circle, rgba(52, 97, 224, 0.18) 0%, transparent 65%);
  bottom: -25%; left: -20%;
  animation: drift2 22s ease-in-out infinite alternate;
}
[data-theme="parchment"] .hero::after { background: radial-gradient(circle, rgba(31, 51, 88, 0.12) 0%, transparent 65%); }
@keyframes drift1 {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(-6%, 8%) scale(1.12); }
}
@keyframes drift2 {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(8%, -10%) scale(1.18); }
}

/* Hero entrance — stagger */
.hero .hero-eyebrow { animation: trackIn 0.9s cubic-bezier(.2,.7,.2,1) both; }
.hero h1.display { animation: rise 1s cubic-bezier(.2,.7,.2,1) 0.15s both; }
.hero h1.display em.line-flame {
  display: inline-block;
  animation: emFlare 1.2s cubic-bezier(.2,.7,.2,1) 0.55s both;
}
.hero .hero-sub { animation: rise 1s cubic-bezier(.2,.7,.2,1) 0.45s both; }
.hero .hero-ctas { animation: rise 1s cubic-bezier(.2,.7,.2,1) 0.6s both; }
.hero .hero-ctas .btn:nth-child(1) { animation: rise 0.9s cubic-bezier(.2,.7,.2,1) 0.7s both; }
.hero .hero-ctas .btn:nth-child(2) { animation: rise 0.9s cubic-bezier(.2,.7,.2,1) 0.82s both; }
.hero .hero-fine { animation: rise 1s cubic-bezier(.2,.7,.2,1) 0.95s both; }

@keyframes rise {
  from { opacity: 0; transform: translateY(36px); }
  to { opacity: 1; transform: none; }
}
@keyframes trackIn {
  from { opacity: 0; letter-spacing: 0.4em; }
  to { opacity: 1; letter-spacing: 0.18em; }
}
@keyframes emFlare {
  0% { color: var(--fg); text-shadow: 0 0 0 transparent; transform: translateY(8px); opacity: 0; }
  50% { color: var(--flame); text-shadow: 0 0 32px var(--flame-soft); }
  100% { color: var(--flame); text-shadow: 0 0 0 transparent; transform: none; opacity: 1; }
}

/* Knight + rings (only animates when body.is-ready) */
body.is-ready .hero-mark {
  animation: floatIn 1.2s cubic-bezier(.2,.7,.2,1) 0.3s both;
}
body.is-ready .hero-mark img {
  animation: bob 6s ease-in-out 1.5s infinite;
}
body.is-ready .hero-mark::before {
  animation: halo 4s ease-in-out infinite;
}
body.is-ready .hero-mark .ring {
  animation: spinSlow 80s linear infinite;
}
body.is-ready .hero-mark .ring--inner {
  animation: spinFast 50s linear infinite reverse;
}
@keyframes floatIn {
  from { opacity: 0; transform: translateY(40px) scale(0.96); }
  to { opacity: 1; transform: none; }
}
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@keyframes halo {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.06); }
}
@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes spinFast {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Tick marks around the inner ring */
.hero-mark .ticks {
  position: absolute;
  inset: 10%;
  border-radius: 50%;
  pointer-events: none;
  animation: spinSlow 120s linear infinite reverse;
}
.hero-mark .ticks i {
  position: absolute;
  top: 0; left: 50%;
  width: 1px; height: 10px;
  background: var(--flame);
  transform-origin: 50% calc(50vw); /* overridden inline */
  opacity: 0.5;
}

/* Sparkle dots floating around knight */
.hero-mark .spark {
  position: absolute;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--flame);
  box-shadow: 0 0 12px var(--flame);
  pointer-events: none;
  opacity: 0;
}
.hero-mark .spark:nth-child(odd) { animation: sparkleA 5s ease-in-out infinite; }
.hero-mark .spark:nth-child(even) { animation: sparkleB 6.5s ease-in-out infinite; }
@keyframes sparkleA {
  0%, 100% { opacity: 0; transform: translate(0, 0) scale(0.6); }
  50% { opacity: 1; transform: translate(8px, -12px) scale(1.2); }
}
@keyframes sparkleB {
  0%, 100% { opacity: 0; transform: translate(0, 0) scale(0.5); }
  60% { opacity: 0.9; transform: translate(-10px, 14px) scale(1.4); }
}

/* Big-number reveal on stat band */
.bignum {
  display: inline-block;
  background: linear-gradient(180deg, var(--fg) 0%, color-mix(in oklab, var(--fg) 65%, var(--flame)) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.bignum sup { -webkit-text-fill-color: var(--flame); color: var(--flame); }

/* Underline-stroke under emphasis words */
@keyframes drawIn {
  from { stroke-dashoffset: 1000; }
  to { stroke-dashoffset: 0; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
}

/* Sticky nav micro-shrink on scroll */
.site-head.is-scrolled {
  padding-top: 8px; padding-bottom: 8px;
  box-shadow: 0 1px 0 var(--rule);
}
.site-head { transition: padding 0.3s ease, box-shadow 0.3s ease; }

/* Section heading underline shimmer on reveal */
.eyebrow.is-in::before { animation: lineDraw 0.7s ease-out both; }
@keyframes lineDraw {
  from { width: 0; }
  to { width: 28px; }
}

/* Hover lifts */
.vert-card { transition: background 0.3s, transform 0.4s cubic-bezier(.2,.7,.2,1); }
.vert-card:hover { transform: translateY(-3px); }
.vert-card .num { transition: color 0.3s, transform 0.4s; display: inline-block; }
.vert-card:hover .num { transform: translateX(6px); }

/* Button shine */
.btn-primary {
  position: relative;
  overflow: hidden;
}
.btn-primary::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,0.35) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.7s cubic-bezier(.2,.7,.2,1);
}
.btn-primary:hover::after { transform: translateX(120%); }

/* Marquee hover-pause */
.hero-marquee:hover .hero-marquee-track { animation-play-state: paused; }


/* ===================================== */
/* BRAND HOVER (Blue → blue + entire logo+text scales) */
/* ===================================== */
.brand {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  transform-origin: left center;
  transition: transform 0.5s cubic-bezier(.2,.7,.2,1);
  text-decoration: none;
  color: inherit;
}
.brand-mark, .brand-name {
  transition: filter 0.5s ease;
}
.brand-name {
  white-space: nowrap;
  flex-shrink: 0;
}
.brand { flex-shrink: 0; }
.b-blue {
  color: var(--fg);
  transition: color 0.4s cubic-bezier(.2,.7,.2,1), text-shadow 0.4s ease;
  display: inline-block;
}
.brand:hover {
  transform: scale(1.14);
}
.brand:hover .brand-mark {
  filter: drop-shadow(0 6px 14px rgba(74, 144, 226, 0.35));
}
.brand:hover .b-blue {
  color: #4A90E2;
  text-shadow: 0 0 22px rgba(74, 144, 226, 0.4);
}

/* ===================================== */
/* HERO RESULTS DASHBOARD                */
/* ===================================== */
.hero-dash {
  position: relative;
  width: 100%;
  max-width: 540px;
  margin-left: auto;
  padding: 22px;
  background: linear-gradient(160deg, var(--card-2) 0%, var(--card) 100%);
  border: 1px solid var(--rule);
  border-radius: 18px;
  box-shadow:
    0 30px 80px -30px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(244, 238, 223, 0.05) inset;
  display: flex;
  flex-direction: column;
  gap: 18px;
  isolation: isolate;
  overflow: hidden;
}
.hero-dash::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 18px;
  padding: 1px;
  background: linear-gradient(160deg, var(--flame-soft), transparent 35%, transparent 75%, rgba(74, 144, 226, 0.25));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 1;
}

.dash-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.dash-status { display: inline-flex; align-items: center; gap: 8px; }
.dash-pulse {
  width: 8px; height: 8px; border-radius: 50%;
  background: #2BAE66;
  box-shadow: 0 0 0 0 rgba(43, 174, 102, 0.5);
  animation: pulseDot 2s ease-in-out infinite;
}
@keyframes pulseDot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(43, 174, 102, 0.6); }
  50% { box-shadow: 0 0 0 8px rgba(43, 174, 102, 0); }
}
.dash-day strong { color: var(--fg); font-weight: 600; }

/* Mini 3-pack */
.dash-pack {
  background: rgba(244, 238, 223, 0.03);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.dash-pack__row {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 8px;
  transition: background 0.3s;
}
.dash-pack__row.is-top {
  background: var(--flame-soft);
  box-shadow: inset 0 0 0 1px rgba(243, 156, 18, 0.35);
}
.dash-pin {
  width: 26px; height: 26px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 400;
  background: rgba(244, 238, 223, 0.06);
  color: var(--muted);
}
.dash-pack__row.is-top .dash-pin {
  background: var(--flame);
  color: #fff;
  box-shadow: 0 0 0 4px var(--flame-soft);
}
.dash-biz {
  margin: 0;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--fg);
}
.dash-pack__row.is-top .dash-biz { color: var(--fg); }
.dash-meta {
  margin: 2px 0 0;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.dash-rise {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--flame);
  letter-spacing: 0.06em;
  background: rgba(243, 156, 18, 0.12);
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.dash-pack__fold {
  text-align: center;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(244, 238, 223, 0.35);
  padding: 6px 0 2px;
  border-top: 1px dashed var(--rule);
  margin-top: 4px;
}

/* Chart */
.dash-chart {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dash-chart__head {
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted);
}
.dash-chart__delta { color: var(--flame); }
.dash-chart__svg {
  width: 100%;
  height: 90px;
}
.dash-line {
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
}
body.is-ready .dash-line { animation: drawLine 2.4s cubic-bezier(.4,0,.2,1) 0.8s forwards; }
.dash-area { opacity: 0; }
body.is-ready .dash-area { animation: fillFade 1.6s ease 2.4s forwards; }
.dash-end, .dash-end-ring { opacity: 0; }
body.is-ready .dash-end { animation: popIn 0.4s ease 3s forwards; }
body.is-ready .dash-end-ring { animation: ringPulse 2.4s ease-in-out 3.1s infinite; }
@keyframes drawLine { to { stroke-dashoffset: 0; } }
@keyframes fillFade { to { opacity: 1; } }
@keyframes popIn { 0% { opacity: 0; transform-origin: 280px 76px; transform: scale(0.3); } 60% { transform: scale(1.4); } 100% { opacity: 1; transform: scale(1); } }
@keyframes ringPulse {
  0% { r: 4; opacity: 0.8; }
  100% { r: 14; opacity: 0; }
}
.dash-chart__axis {
  display: flex; justify-content: space-between;
  font-family: var(--mono); font-size: 10px;
  color: rgba(244, 238, 223, 0.35);
  letter-spacing: 0.08em;
}

/* Stats row */
.dash-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  background: var(--rule);
  border-radius: 10px;
  overflow: hidden;
}
.dash-stats > div {
  background: rgba(244, 238, 223, 0.03);
  padding: 12px 10px;
  display: flex; flex-direction: column; gap: 4px;
  align-items: flex-start;
}
.dash-stats__v {
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1;
  color: var(--fg);
}
.dash-stats__v small { font-size: 14px; color: var(--flame); margin-left: 1px; }
.dash-stats__k {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Floating YoY badge */
.dash-badge {
  position: absolute;
  top: -14px; right: 20px;
  z-index: 3;
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--flame);
  color: #fff;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  padding: 6px 12px;
  border-radius: 999px;
  box-shadow: 0 8px 22px -6px var(--flame), 0 0 0 4px var(--bg);
  transform: rotate(2deg);
}
body.is-ready .dash-badge { animation: badgeIn 0.6s cubic-bezier(.2,.7,.2,1) 1.2s both; }
@keyframes badgeIn {
  from { transform: rotate(2deg) translate(20px, -10px) scale(0.6); opacity: 0; }
  to { transform: rotate(2deg); opacity: 1; }
}

/* Dashboard entrance */
body.is-ready .hero-dash { animation: dashIn 1s cubic-bezier(.2,.7,.2,1) 0.3s both; }
@keyframes dashIn {
  from { opacity: 0; transform: translateY(36px) scale(0.97); }
  to { opacity: 1; transform: none; }
}

/* Subtle float on the panel */
.hero-dash {
  animation: panelFloat 7s ease-in-out infinite;
}
@keyframes panelFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@media (max-width: 900px) {
  .hero-dash { margin: 32px auto 0; }
}

/* ===================================== */
/* MAP PACK GRAPHIC (under 60% stat)     */
/* ===================================== */
.stat-grid--triple {
  grid-template-columns: 0.7fr 1fr 0.9fr;
  gap: clamp(24px, 4vw, 56px);
}
.bignum-wrap { display: flex; flex-direction: column; gap: 18px; align-self: center; }
.bignum--inline {
  font-family: var(--serif);
  font-size: clamp(72px, 9.5vw, 148px);
  line-height: 0.86;
  letter-spacing: -0.04em;
  color: var(--fg);
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 0.22em;
  flex-wrap: wrap;
  /* Override the gradient text-fill from the base .bignum rule */
  background: none;
  -webkit-text-fill-color: currentColor;
}
.bignum--inline .bignum-num {
  display: inline-flex;
  align-items: baseline;
  background: linear-gradient(180deg, var(--fg) 0%, color-mix(in oklab, var(--fg) 65%, var(--flame)) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.bignum--inline .bignum-num sup {
  font-family: var(--serif);
  font-size: 0.32em;
  vertical-align: top;
  margin-left: 0.06em;
  -webkit-text-fill-color: var(--flame);
  color: var(--flame);
  font-style: italic;
}
.bignum-tag {
  display: inline-block;
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.58em;
  letter-spacing: -0.01em;
  color: var(--fg);
  opacity: 0.85;
  -webkit-text-fill-color: currentColor;
  background: none;
  white-space: nowrap;
}
.bignum-cap {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(22px, 2.6vw, 42px);
  line-height: 1.22;
  letter-spacing: -0.01em;
  text-transform: none;
  color: var(--fg);
  opacity: 0.82;
  margin: 0;
  max-width: 22ch;
  text-wrap: pretty;
}
.bignum-cap strong {
  font-weight: 400;
  font-style: italic;
  color: var(--flame);
}

/* Map-pack screenshot (replaces the old mini-serp markup) */
.map-pack-shot {
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--rule);
  box-shadow:
    0 24px 60px -28px rgba(0, 0, 0, 0.5),
    0 0 0 1px var(--rule) inset;
  align-self: center;
  width: 100%;
  max-width: 620px;
  justify-self: end;
}
.map-pack-shot img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 954 / 796;
  object-fit: cover;
}
@media (max-width: 900px) {
  .map-pack-shot { justify-self: start; }
}

.mappack {
  margin: 0;
  background: linear-gradient(160deg, var(--card-2) 0%, var(--card) 100%);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 20px 50px -28px rgba(0,0,0,0.5);
}
.mappack__search {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  background: rgba(244, 238, 223, 0.04);
  border: 1px solid var(--rule);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}
.mappack__icon {
  font-size: 14px;
  color: var(--flame);
}
.mappack__query { color: var(--fg); font-weight: 500; }

.mappack__row {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: background 0.3s;
}
.mappack__row.is-winner {
  background: var(--flame-soft);
  border-color: rgba(243, 156, 18, 0.35);
}
.mappack__rank {
  width: 24px; height: 24px;
  border-radius: 6px;
  background: rgba(244, 238, 223, 0.06);
  display: grid; place-items: center;
  font-family: var(--serif);
  font-size: 14px;
  color: var(--muted);
}
.mappack__row.is-winner .mappack__rank {
  background: var(--flame);
  color: #fff;
}
.mappack__name {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--fg);
}
.mappack__sub {
  margin: 2px 0 0;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.mappack__tag {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--flame);
  background: rgba(243, 156, 18, 0.12);
  padding: 4px 8px;
  border-radius: 4px;
}

.mappack__fold {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 4px 2px;
  margin-top: 4px;
}
.mappack__line { flex: 1; height: 1px; border-top: 1px dashed var(--rule-strong); }
.mappack__fold-label {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.mappack__ghost {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  opacity: 0.4;
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  color: var(--muted);
}
.mappack__ghost .mappack__rank {
  background: transparent;
  border: 1px dashed var(--rule-strong);
}
.mappack__ghost p { margin: 0; }

@media (max-width: 980px) {
  .stat-grid--triple { grid-template-columns: 1fr; }
  .mappack { max-width: 500px; }
}

/* ===================================== */
/* PROCESS STAGE ICONS                   */
/* ===================================== */
.stage-icon {
  width: 56px;
  height: 56px;
  color: var(--paper);
  opacity: 0.85;
  margin-bottom: 4px;
}
.stage-mini .stage-icon {
  transition: transform 0.4s cubic-bezier(.2,.7,.2,1), opacity 0.3s;
}
.stage-mini:hover .stage-icon {
  transform: translateY(-4px);
  opacity: 1;
}


/* ===== Restructured 60% section ===== */
.stat-stack {
  max-width: var(--max);
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: clamp(40px, 6vw, 72px);
}
.stat-top {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(360px, 1.6fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: end;
}
.stat-top--map {
  align-items: center;
  gap: clamp(32px, 5vw, 80px);
}
.stat-top .bignum-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
}
.stat-top .bignum {
  font-size: clamp(140px, 18vw, 260px);
  line-height: 0.82;
  letter-spacing: -0.05em;
}
.stat-top .bignum--inline {
  /* Smaller than the standalone .bignum size since "of Traffic" sits beside */
  font-size: clamp(72px, 9.5vw, 148px);
  line-height: 0.86;
  letter-spacing: -0.04em;
}
.stat-top .mini-serp {
  width: 100%;
  max-width: 560px;
  justify-self: end;
}
.stat-bottom {
  display: flex;
  justify-content: center;
  padding: clamp(28px, 4vw, 56px) 0 0;
  border-top: 1px solid var(--rule);
}
.stat-bottom h2 { margin: 0; }
.stat-bottom .body-p { max-width: 50ch; }

@media (max-width: 900px) {
  .stat-top { grid-template-columns: 1fr; }
  .stat-top .mini-serp { justify-self: start; }
}

/* ============ GEOMAP BAND ============ */
.geomap-band {
  padding: clamp(60px, 9vw, 120px) var(--pad-x);
  background: var(--bg-2);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.geomap-wrap {
  max-width: var(--max);
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(360px, 1.15fr);
  gap: clamp(36px, 5vw, 80px);
  align-items: center;
}
.geomap-copy { display: flex; flex-direction: column; gap: 20px; }
.geomap-copy .h-lg { font-size: clamp(36px, 4.6vw, 64px); }
.geomap-copy .h-lg em { color: var(--flame); font-style: italic; }
.geomap-actions { margin-top: 6px; display: flex; justify-content: center; }

.geomap-shot {
  margin: 0;
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--rule);
  box-shadow:
    0 24px 60px -28px rgba(0, 0, 0, 0.5),
    0 0 0 1px var(--rule) inset;
}
.geomap-shot::before {
  /* subtle flame frame to echo brand */
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(160deg, var(--flame-soft), transparent 35%, transparent 75%, rgba(74, 144, 226, 0.18));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  z-index: 2;
}
.geomap-shot img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1400 / 1256;
  object-fit: cover;
}

@media (max-width: 900px) {
  .geomap-wrap { grid-template-columns: 1fr; }
}

/* ============ PARCHMENT MODE ELEVATION & BLOCKING ============ */

/* Card shadows — surfaces need to lift off their bg-2 backing */
[data-theme="parchment"] .hiw-card,
[data-theme="parchment"] .vert-card,
[data-theme="parchment"] .case,
[data-theme="parchment"] .client,
[data-theme="parchment"] .ptier,
[data-theme="parchment"] .cal-card,
[data-theme="parchment"] .guarantee-shield {
  box-shadow: 0 2px 8px -2px rgba(11, 20, 38, 0.07), 0 8px 28px -8px rgba(11, 20, 38, 0.10);
}

/* Primary button — stronger shadow so it reads as the action */
[data-theme="parchment"] .btn-primary {
  box-shadow: 0 4px 18px -4px rgba(52, 97, 224, 0.50);
  font-weight: 700;
}

/* Dark tent-pole sections on the parchment theme */
[data-theme="parchment"] .cta-final,
[data-theme="parchment"] .cta-marquee {
  background: #060F1F;
}
[data-theme="parchment"] .cta-final .cta-final-h,
[data-theme="parchment"] .cta-final .cta-final-copy,
[data-theme="parchment"] .cta-final .cta-final-rule,
[data-theme="parchment"] .cta-final .cta-final-link,
[data-theme="parchment"] .cta-final .cta-final-fine,
[data-theme="parchment"] .cta-marquee .cta-marquee__h,
[data-theme="parchment"] .cta-marquee .cta-marquee__track span {
  color: #F4EEDF;
}
[data-theme="parchment"] .cta-marquee .cta-marquee__strip::before {
  background: linear-gradient(90deg, #060F1F 0%, color-mix(in oklab, #060F1F 50%, transparent) 50%, transparent 100%);
}
[data-theme="parchment"] .cta-marquee .cta-marquee__strip::after {
  background: linear-gradient(270deg, #060F1F 0%, color-mix(in oklab, #060F1F 50%, transparent) 50%, transparent 100%);
}

/* Pause looping animations when the tab is hidden (driven by JS --animation-state) */
.hero::before,
.hero::after,
body.is-ready .hero-mark img,
body.is-ready .hero-mark::before,
body.is-ready .hero-mark .ring,
body.is-ready .hero-mark .ring--inner,
body.is-ready .hero-mark .ticks,
.hero-mark .spark,
.dash-pulse,
body.is-ready .dash-end-ring,
.hero-dash {
  animation-play-state: var(--animation-state, running);
}
