/* ===================================================
   CiteBarn — Sage & Paper, vintage press edition
   =================================================== */

:root {
  /* aged paper */
  --paper:        #F3EFE3;
  --paper-2:      #EBE5D4;
  --paper-3:      #E2DAC5;

  /* ink */
  --ink:          #221E18;
  --ink-soft:     #4C463B;
  --ink-faint:    #78705F;

  /* sage */
  --sage:         #5C6B4F;
  --sage-deep:    #44513A;
  --sage-dim:     #8B9480;

  /* rules & borders */
  --rule:         #D3C9B0;
  --rule-strong:  #BCAF91;

  /* vintage warm accent — used only for tiny marks */
  --sienna:       #97613F;

  --serif: "Playfair Display", "Times New Roman", Georgia, serif;
  --sans:  "Work Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono:  "Courier Prime", "Courier New", monospace;

  --max: 1140px;
  --r: 3px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- vintage texture stack ---------- */

/* paper grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 900;
  pointer-events: none;
  opacity: 0.2;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* laid-paper fibre lines — barely there, but you feel it */
body {
  background-image:
    repeating-linear-gradient(
      0deg,
      rgba(120, 100, 66, 0.035) 0px,
      rgba(120, 100, 66, 0.035) 1px,
      transparent 1px,
      transparent 4px
    );
}

/* edge vignette — aged print falloff */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 901;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 45%, rgba(102, 86, 58, 0) 52%, rgba(102, 86, 58, 0.10) 82%, rgba(88, 72, 46, 0.20) 100%);
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

.container-narrow {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- type ---------- */

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.1;
  margin: 0;
  text-wrap: balance;
  letter-spacing: -0.005em;
}

p { margin: 0; color: var(--ink-soft); }

.kicker {
  display: block;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 20px;
}

.italic {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  color: var(--sage);
}

.italic-ink {
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink);
}

/* vintage double rule */
.rule-double {
  border: none;
  height: 4px;
  margin: 0;
  background:
    linear-gradient(var(--rule), var(--rule)) top/100% 1px no-repeat,
    linear-gradient(var(--rule), var(--rule)) bottom/100% 1px no-repeat;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 15px 30px;
  border-radius: var(--r);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .15s ease, box-shadow .2s ease;
}

.btn-primary {
  background: var(--sage);
  color: var(--paper);
  box-shadow: 0 1px 0 var(--sage-deep), 2px 2px 0 rgba(68, 81, 58, 0.18);
}

.btn-primary:hover {
  background: var(--sage-deep);
  transform: translate(-1px, -1px);
  box-shadow: 0 1px 0 var(--sage-deep), 4px 4px 0 rgba(68, 81, 58, 0.2);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--rule-strong);
}

.btn-ghost:hover { border-color: var(--sage); color: var(--sage); }

.btn-sm { padding: 11px 20px; font-size: 12.5px; }

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--sage);
  outline-offset: 3px;
}

/* ---------- boxes ---------- */

.box {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--r);
  padding: 30px 28px;
}

/* letterpress crop-mark corners */
.box-ticks::before,
.box-ticks::after {
  content: "";
  position: absolute;
  width: 9px;
  height: 9px;
  border: 1px solid var(--rule-strong);
  pointer-events: none;
}
.box-ticks::before { top: -1px; left: -1px; border-width: 1px 0 0 1px; }
.box-ticks::after  { bottom: -1px; right: -1px; border-width: 0 1px 1px 0; }

/* ---------- scale-to-fit ----------
   Some broad, desktop-proportioned visuals (mock browser windows, the
   booking panel, the footer) should shrink to fit narrow screens rather
   than reflow into a stacked mobile layout. The element gets a fixed
   "reference" width (data-scale-fit, in px) and a CSS transform: scale()
   computed in script.js; this wrapper just clips the empty space the
   transform leaves behind and lets JS set an explicit height. */
.scale-outer { overflow: hidden; }
[data-scale-fit] { transform-origin: top left; }

/* ---------- reveal ---------- */

[data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .45s ease, transform .45s ease;
}
[data-reveal].is-visible { opacity: 1; transform: none; }

/* headings only fade, no slide: calmer, less samey */
.section-head[data-reveal] { transform: none; }

/* card grids: the grid stays put, its children come in one after another */
.services-grid[data-reveal],
.steps[data-reveal] { opacity: 1; transform: none; }

.services-grid[data-reveal] > *,
.steps[data-reveal] > * {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .45s ease, transform .45s ease, box-shadow .25s ease;
}

.services-grid[data-reveal].is-visible > *,
.steps[data-reveal].is-visible > * { opacity: 1; transform: none; }

.services-grid[data-reveal] > *:nth-child(2), .steps[data-reveal] > *:nth-child(2) { transition-delay: 70ms; }
.services-grid[data-reveal] > *:nth-child(3), .steps[data-reveal] > *:nth-child(3) { transition-delay: 140ms; }
.services-grid[data-reveal] > *:nth-child(4) { transition-delay: 210ms; }
.services-grid[data-reveal] > *:nth-child(5) { transition-delay: 280ms; }
.services-grid[data-reveal] > *:nth-child(6) { transition-delay: 350ms; }

/* hover must stay snappy even after the reveal delay */
.services-grid[data-reveal].is-visible > *,
.steps[data-reveal].is-visible > * { transition-delay: 0ms; }

/* ---------- scroll map (left edge) ---------- */

.scrollmap {
  position: fixed;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 90;
  display: none;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}

@media (min-width: 1080px) { .scrollmap { display: block; } }

.scrollmap.is-visible { opacity: 1; pointer-events: auto; }

.scrollmap ol { list-style: none; margin: 0; padding: 0; }

.scrollmap a {
  position: relative;
  display: flex;
  align-items: center;
  width: 52px;
  height: 22px;
}

.scrollmap a::before {
  content: "";
  flex-shrink: 0;
  width: 16px;
  height: 1px;
  background: var(--ink-faint);
  opacity: .55;
  transition: width .25s ease, opacity .25s ease, background .25s ease;
}

.scrollmap a:hover::before { opacity: 1; background: var(--ink-soft); }
.scrollmap a.is-active::before { width: 26px; opacity: 1; background: var(--ink); }

.scrollmap .pill {
  position: absolute;
  left: 40px;
  top: 50%;
  transform: translate(-6px, -50%);
  opacity: 0;
  pointer-events: none;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
  border-radius: 999px;
  padding: 4px 12px;
  /* fade out: slower, drifts back left */
  transition: opacity .6s ease, transform .6s ease;
}

.scrollmap a:hover .pill,
.scrollmap a:focus-visible .pill,
.scrollmap.show-pill a.is-active .pill {
  opacity: 1;
  transform: translate(0, -50%);
  /* fade in: quicker */
  transition: opacity .32s ease, transform .32s ease;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

/* ===================================================
   NAV
   =================================================== */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(243, 239, 227, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
  transition: box-shadow .25s ease;
}

.nav.scrolled { box-shadow: 0 10px 26px -22px rgba(34, 30, 24, .5); }

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 15px;
  padding-bottom: 15px;
}

.logo-lockup { display: flex; align-items: center; gap: 11px; }

/* CiteBarn mark slot — swap the inner .ph for an <img> */
.mark-slot {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mark-slot img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.mark-slot .ph {
  width: 100%;
  height: 100%;
  border: 1px dashed var(--rule-strong);
  border-radius: var(--r);
  opacity: .85;
}

.wordmark {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  white-space: nowrap;
}
.wordmark .cite { font-style: italic; color: var(--ink); }
.wordmark .barn { color: var(--sage); }

.nav-links { display: none; }

@media (min-width: 860px) {
  .nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
    margin-left: auto;
    margin-right: 30px;
  }
  .nav-links a {
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-soft);
    transition: color .2s ease;
  }
  .nav-links a:hover { color: var(--sage); }
}

/* ===================================================
   HERO
   =================================================== */

.hero {
  padding: 92px 0 76px;
  text-align: center;
}

.hero h1 {
  font-size: clamp(2.9rem, 8vw, 5.2rem);
  line-height: 1.02;
  margin-bottom: 26px;
}

.hero .sub {
  font-size: 17px;
  max-width: 46ch;
  margin: 0 auto;
  color: var(--ink-soft);
}

/* AI engine strip: no box, logos separated by faded hairlines, dots at the end */
.engine-strip {
  margin: 46px auto 0;
}

.engine-strip .strip-label {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 22px;
}

.engine-row {
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.vsep {
  flex-shrink: 0;
  width: 1px;
  height: 60px;
  margin-top: -6px;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    var(--rule-strong) 28%,
    var(--rule-strong) 72%,
    transparent 100%
  );
}

.hero .btn-primary.hero-cta { margin-top: 40px; }

/* ---------- logo placeholder slots ---------- */

.logo-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 0 30px;
}

.logo-tile {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-tile img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@media (max-width: 520px) {
  .logo-slot { padding: 0 14px; gap: 7px; }
  .logo-tile { width: 30px; height: 30px; }
  .logo-slot .logo-name { font-size: 9px; letter-spacing: .05em; }
  .vsep { height: 48px; }
}

/* placeholder glyph shown until a real logo is dropped in */
.logo-tile .ph {
  width: 22px;
  height: 22px;
  border: 1px dashed var(--rule-strong);
  border-radius: 2px;
  opacity: .8;
}

.logo-slot .logo-name {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  white-space: nowrap;
}

/* ---------- dot divider ---------- */

.dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 22px;
}

.dots i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--sage);
  opacity: .28;
  display: block;
}
.dots i:nth-child(2) { opacity: .5; }
.dots i:nth-child(3) { opacity: .75; }
.dots i:nth-child(4) { opacity: 1; background: var(--sienna); }

/* ===================================================
   SECTION SHELL
   =================================================== */

section { padding: 84px 0; }

.section-head { max-width: 640px; margin-bottom: 48px; }

.section-head.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.section-head h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); }

.section-head p {
  margin-top: 18px;
  font-size: 16.5px;
  max-width: 56ch;
}

.section-head.center p { margin-left: auto; margin-right: auto; }

/* ===================================================
   CONVERGENCE GRAPHIC  (source map)
   =================================================== */

.conv-wrap {
  border: 1px solid var(--rule);
  border-radius: var(--r);
  background: linear-gradient(180deg, var(--paper-2) 0%, var(--paper) 62%);
  padding: 20px 20px 26px;
}

.conv {
  position: relative;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  aspect-ratio: 1;
}

.conv-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.conv-ring-dash {
  fill: none;
  stroke: var(--rule-strong);
  stroke-width: 1;
  stroke-dasharray: 3 8;
  opacity: .55;
}

.conv-ring-soft {
  fill: none;
  stroke: var(--sage);
  stroke-width: 1;
  opacity: .09;
}

.conv-anchors circle { fill: var(--sage-deep); opacity: .8; }

.conv-line {
  fill: none;
  stroke: var(--sage-dim);
  stroke-width: 1.3;
  stroke-linecap: round;
  stroke-dasharray: 100 100;
  stroke-dashoffset: 100;
  opacity: .75;
}

/* masked copy — gives the spokes a taper: heavy at the source, thin at the hub */
.conv-line-thick { stroke-width: 5; }

.conv.ready .conv-line {
  animation: conv-draw .95s cubic-bezier(.4, 0, .25, 1) .1s both;
}

@keyframes conv-draw { to { stroke-dashoffset: 0; } }

.conv-pulse {
  fill: none;
  stroke: var(--sage-deep);
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-dasharray: 62 100;
  stroke-dashoffset: 62;
  opacity: 0;
  will-change: stroke-dashoffset;
}

.conv-pulse-thick { stroke-width: 3.4; }

.conv.ready .conv-pulse {
  animation: conv-travel var(--wave, 3.4s) cubic-bezier(.55, 0, .9, .4) var(--wave-in, 0s) infinite;
}

@keyframes conv-travel {
  0%   { stroke-dashoffset: 62;   opacity: 0; }
  10%  { opacity: .85; }
  80%  { opacity: .85; }
  100% { stroke-dashoffset: -100; opacity: 0; }
}

/* source tiles sit on the orbit, positioned to match the SVG coordinates */
.conv-tile {
  position: absolute;
  width: 15%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5%;
  background: var(--paper);
  border: 1px solid var(--rule-strong);
  border-radius: 50%;
  box-shadow: 0 3px 10px -4px rgba(34, 30, 24, 0.22);
}

.conv-tile img {
  width: 46%;
  height: 46%;
  object-fit: contain;
}

.conv-tile .ph {
  width: 32%;
  height: 32%;
  border: 1px dashed var(--rule-strong);
  border-radius: 2px;
  opacity: .8;
}

.conv-tile .t-name {
  font-family: var(--mono);
  font-size: clamp(7px, 1.35vw, 10px);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--ink-faint);
  line-height: 1;
}

.conv-hub {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 26%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  z-index: 2;
  border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px -8px rgba(34, 30, 24, 0.25);
}

.conv-hub .mark-slot { width: 58%; height: 58%; }
.conv-hub .mark-slot .ph { border-radius: 50%; }

.conv-caption {
  margin-top: 6px;
  text-align: center;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* the radial diagram no longer reflows into a grid on narrow screens —
   it's scaled to fit instead (see .scale-outer on .conv-wrap), so it always
   keeps the same circular desktop layout, just smaller. */
.conv-stack-line { display: none; }

/* ===================================================
   THE ANSWER — mock browser + SERP
   =================================================== */

.mac {
  max-width: 900px;
  margin: 0 auto;
  border: 1px solid var(--rule-strong);
  border-radius: 10px;
  background: var(--paper);
  box-shadow:
    0 1px 0 rgba(34, 30, 24, 0.04),
    0 34px 60px -38px rgba(34, 30, 24, 0.5);
  overflow: hidden;
}

.mac-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 14px;
  background: var(--paper-2);
  border-bottom: 1px solid var(--rule);
}

.mac-dots { display: flex; gap: 7px; flex-shrink: 0; }

.mac-dots i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: block;
}
.mac-dots i:nth-child(1) { background: #C8776A; }
.mac-dots i:nth-child(2) { background: #D8B46B; }
.mac-dots i:nth-child(3) { background: #8FAF7E; }

.mac-url {
  flex: 1;
  min-width: 0;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-faint);
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 6px 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mac-screen { padding: 26px 28px 30px; }

/* search bar */
.serp-search {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 640px;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  padding: 11px 16px 11px 20px;
  font-size: 14.5px;
  color: var(--ink);
  background: var(--paper);
  margin-bottom: 22px;
}

.serp-ico { width: 18px; height: 18px; color: var(--sage); flex-shrink: 0; }
.serp-ico svg { width: 100%; height: 100%; }

/* AI overview block — the GEO answer */
.ai-overview {
  max-width: 720px;
  border: 1px solid var(--sage-dim);
  border-radius: 8px;
  background: rgba(92, 107, 79, 0.065);
  padding: 18px 20px 16px;
}

.ai-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 13px;
  color: var(--ink);
  margin-bottom: 10px;
}

.ai-spark { color: var(--sage); font-size: 14px; }

.ai-tag {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sage);
  border: 1px solid var(--sage-dim);
  border-radius: 2px;
  padding: 3px 7px;
}

.ai-text {
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink-soft);
}

.ai-text + .ai-text { margin-top: 12px; }

.ai-text b { color: var(--ink); font-weight: 600; }

/* inline citation marker, like the little link chips after each claim */
.ai-ref {
  display: inline-block;
  width: 15px;
  height: 15px;
  margin-left: 5px;
  vertical-align: -2px;
  border-radius: 50%;
  border: 1px solid var(--rule-strong);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2378705F' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M10 13a4 4 0 0 0 5.7 0l2.6-2.6a4 4 0 0 0-5.7-5.7L11.4 6M14 11a4 4 0 0 0-5.7 0l-2.6 2.6a4 4 0 0 0 5.7 5.7L12.6 18'/%3E%3C/svg%3E")
    no-repeat center / 9px 9px var(--paper);
}

/* the brand mention — this is the whole point */
mark.cite {
  background: linear-gradient(transparent 38%, rgba(92, 107, 79, 0.34) 38%);
  color: var(--ink);
  font-weight: 600;
  padding: 0 3px;
  white-space: nowrap;
}

.cite-tag {
  display: inline-block;
  margin-left: 6px;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--paper);
  background: var(--sage);
  border-radius: 2px;
  padding: 2px 6px;
  vertical-align: 2px;
}

.ai-sources {
  margin-top: 12px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.ai-src-label {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-right: 4px;
}

.ai-src {
  font-size: 11.5px;
  color: var(--ink-soft);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 3px 10px;
  background: var(--paper);
}

/* organic results — real content, nothing faded */
.serp-results {
  max-width: 680px;
  margin-top: 26px;
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.serp-results-top { margin-top: 0; }

.serp-r { display: flex; flex-direction: column; gap: 5px; }

.serp-src {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 2px;
}

.serp-fav {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--rule);
  background: var(--paper-2);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--ink-soft);
}

.serp-fav-reddit { color: var(--paper); background: #B7563E; border-color: #B7563E; }
.serp-fav-reddit svg { width: 16px; height: 16px; }

.serp-src-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.serp-src-text b { font-size: 12.5px; font-weight: 600; color: var(--ink); }
.serp-src-text em {
  font-style: normal;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink-faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.serp-title {
  font-size: 17px;
  line-height: 1.3;
  color: var(--sage-deep);
  font-weight: 500;
}

.serp-snip {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink-soft);
}

.serp-date { color: var(--ink-faint); }

/* reddit "top answer" cards */
.reddit-answers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}

.r-ans {
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--paper-2);
  padding: 12px 14px 13px;
}

.r-ans-top { border-color: var(--sage-dim); background: rgba(92, 107, 79, 0.06); }

.r-ans-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--ink-soft);
  margin-bottom: 7px;
}

.r-badge {
  font-weight: 600;
  color: var(--ink);
}

.r-badge::before {
  content: "";
  display: inline-block;
  width: 11px;
  height: 11px;
  margin-right: 5px;
  vertical-align: -1px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%235C6B4F'%3E%3Cpath d='M7 3h10v2h3v4a5 5 0 0 1-4.2 4.9A5 5 0 0 1 13 17v2h3v2H8v-2h3v-2a5 5 0 0 1-2.8-3.1A5 5 0 0 1 4 9V5h3V3zm0 4H6v2a3 3 0 0 0 1.4 2.5A7 7 0 0 1 7 9V7zm10 0v2a7 7 0 0 1-.4 2.5A3 3 0 0 0 18 9V7h-1z'/%3E%3C/svg%3E") no-repeat center / contain;
}

.r-count { color: var(--ink-faint); }
.r-count::before { content: "·"; margin-right: 8px; }
.r-ans-head > .r-count:first-child::before { content: none; }

.r-votes { margin-left: auto; color: var(--ink-faint); font-family: var(--mono); font-size: 11.5px; }

.r-ans p {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-soft);
}

.niche-cta {
  margin-top: 34px;
  border: 1px solid var(--rule);
  border-radius: var(--r);
  background: var(--paper-2);
  padding: 30px 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: flex-start;
}

@media (min-width: 780px) {
  .niche-cta {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 36px;
  }
}

.niche-cta p {
  font-family: var(--serif);
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  line-height: 1.35;
  color: var(--ink);
  max-width: 46ch;
}

.niche-cta .btn { flex-shrink: 0; }

/* ===================================================
   THE GAP — line chart
   =================================================== */

.gap-grid {
  display: grid;
  gap: 40px;
  align-items: center;
}

@media (min-width: 1000px) {
  .gap-grid {
    grid-template-columns: 0.72fr 1.28fr;
    gap: 48px;
  }
}

.gap-copy h2 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); }

.gap-copy p {
  margin-top: 18px;
  font-size: 16px;
  max-width: 44ch;
}

.linechart {
  margin: 0;
  border: 1px solid var(--rule-strong);
  border-radius: var(--r);
  background: var(--paper);
  padding: 22px 24px 18px;
  box-shadow:
    0 1px 0 rgba(34, 30, 24, 0.04),
    0 14px 30px -18px rgba(34, 30, 24, 0.32),
    5px 5px 0 rgba(34, 30, 24, 0.05);
}

.lc-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 10px;
}

.lc-title { font-weight: 600; font-size: 15px; color: var(--ink); }
.lc-sub { font-size: 13px; color: var(--ink-faint); }

.lc-legend {
  display: flex;
  justify-content: flex-end;
  gap: 18px;
  font-size: 12.5px;
  color: var(--ink-soft);
  margin-bottom: 6px;
}

.lc-legend span { display: inline-flex; align-items: center; gap: 7px; }

.sw {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  border: 1px solid var(--ink-soft);
  display: inline-block;
}

.sw-cite { background: var(--sage-deep); border-color: var(--sage-deep); }
.sw-effort { background: var(--rule-strong); border-color: var(--rule-strong); }

.lc-svg { width: 100%; height: auto; display: block; }

.lc-grid line { stroke: var(--rule); stroke-width: 1; }
.lc-axis line { stroke: var(--ink-soft); stroke-width: 1.2; }

.lc-ylab text,
.lc-xlab text {
  font-family: var(--mono);
  font-size: 13px;
  fill: var(--ink-soft);
}

.lc-ylab text { text-anchor: end; }
.lc-xlab text { text-anchor: middle; }

.lc-ytitle,
.lc-xtitle {
  font-family: var(--sans);
  font-size: 14px;
  fill: var(--ink-soft);
  text-anchor: middle;
}

.lc-line {
  fill: none;
  stroke-width: 2.2;
  stroke-linejoin: round;
  stroke-linecap: round;
  stroke-dasharray: 100 100;
  stroke-dashoffset: 100;
}

.lc-line-cite { stroke: var(--sage-deep); }
.lc-line-effort { stroke: var(--rule-strong); }

[data-reveal].is-visible .lc-line {
  animation: lc-draw 1.3s cubic-bezier(.4, 0, .25, 1) .15s both;
}
[data-reveal].is-visible .lc-line-effort { animation-delay: .5s; }

@keyframes lc-draw { to { stroke-dashoffset: 0; } }

.lc-dots circle { stroke-width: 2; opacity: 0; transition: opacity .4s ease; }
.lc-dots-cite circle { fill: var(--paper); stroke: var(--sage-deep); }
.lc-dots-effort circle { fill: var(--paper); stroke: var(--rule-strong); }
.lc-dot-lead { fill: var(--sage) !important; }

[data-reveal].is-visible .lc-dots circle { opacity: 1; transition-delay: 1.1s; }
[data-reveal].is-visible .lc-dots-effort circle { transition-delay: 1.5s; }

.lc-vals text {
  font-family: var(--mono);
  font-size: 12.5px;
  fill: var(--ink-soft);
  text-anchor: middle;
  opacity: 0;
  transition: opacity .4s ease 1.3s;
}

.lc-val-lead { font-weight: 700; fill: var(--sage-deep) !important; font-size: 13.5px !important; }

[data-reveal].is-visible .lc-vals text { opacity: 1; }

.lc-foot {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 1.7;
  color: var(--ink-faint);
}

@media (max-width: 620px) {
  .linechart { padding: 16px 12px 14px; }
  .lc-legend { justify-content: flex-start; flex-wrap: wrap; gap: 10px 16px; font-size: 11.5px; }
  .lc-ylab text, .lc-xlab text { font-size: 17px; }
  .lc-vals text { font-size: 16px; }
  .lc-ytitle, .lc-xtitle { font-size: 17px; }
}

/* ===================================================
   HOW IT WORKS
   =================================================== */

.steps { display: grid; gap: 18px; }

@media (min-width: 820px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
}

.step {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--r);
  padding: 30px 26px 28px;
  overflow: hidden;
}

.step-num {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--sage);
  display: block;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}

.step-num-bg {
  position: absolute;
  top: -26px;
  right: -6px;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 118px;
  line-height: 1;
  color: var(--sage);
  opacity: .07;
  pointer-events: none;
  user-select: none;
}

.step h3 {
  font-family: "Young Serif", var(--serif);
  font-weight: 400;
  font-size: 21px;
  line-height: 1.2;
  margin-bottom: 11px;
  position: relative;
  z-index: 1;
}

.step p { font-size: 15px; position: relative; z-index: 1; }

/* ===================================================
   SERVICES
   =================================================== */

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

@media (min-width: 720px) {
  .services-grid { grid-template-columns: repeat(3, 1fr); gap: 22px; }
}

.service-card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--r);
  padding: 32px 28px 34px;
  box-shadow:
    0 1px 0 rgba(34, 30, 24, 0.04),
    0 14px 30px -18px rgba(34, 30, 24, 0.32),
    5px 5px 0 rgba(34, 30, 24, 0.05);
  transition: transform .25s ease, box-shadow .25s ease;
}

/* two-up on phones: tighten padding, icon and copy so cards don't feel cramped */
@media (max-width: 560px) {
  .service-card { padding: 18px 14px 20px; }
  .service-icon { width: 22px; height: 22px; margin-bottom: 12px; }
  .service-card h3 { font-size: 15.5px; margin-bottom: 8px; }
  .service-card p { font-size: 12.5px; line-height: 1.5; }
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow:
    0 1px 0 rgba(34, 30, 24, 0.04),
    0 22px 38px -18px rgba(34, 30, 24, 0.38),
    7px 7px 0 rgba(34, 30, 24, 0.06);
}

.service-icon { width: 28px; height: 28px; color: var(--sage); margin-bottom: 18px; }

.service-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.service-card h3 {
  font-family: "Young Serif", var(--serif);
  font-weight: 400;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: -0.005em;
  margin-bottom: 12px;
}

.service-card p { font-size: 14.5px; }

/* ===================================================
   WHY / COMPARISON
   =================================================== */

.diff-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.diff-col {
  border: 1px solid var(--rule);
  border-radius: var(--r);
  padding: 28px 30px 30px;
  background: var(--paper);
}

/* side-by-side on phones too: compress padding, type and icon size */
@media (max-width: 640px) {
  .diff-grid { gap: 10px; }
  .diff-col { padding: 14px 12px 16px; }
  .diff-label { font-size: 8.5px; letter-spacing: 0.1em; margin-bottom: 10px; }
  .diff-col li {
    font-size: 12px;
    line-height: 1.4;
    padding: 9px 0 9px 20px;
  }
  .diff-col li::before { width: 10px; height: 10px; top: 12px; }
  .diff-col li:first-child::before { top: 3px; }
}

.diff-col.old { background: var(--paper-2); }

.diff-col.new { border-color: var(--sage-dim); }

.diff-label {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 18px;
  display: block;
  color: var(--ink-faint);
}

.diff-col.new .diff-label { color: var(--sage); }

.diff-col ul { margin: 0; padding: 0; list-style: none; }

.diff-col li {
  position: relative;
  font-size: 15px;
  color: var(--ink-soft);
  padding: 12px 0 12px 28px;
  border-top: 1px solid var(--rule);
}

.diff-col li:first-child { border-top: none; }
.diff-col.new li { color: var(--ink); }

.diff-col li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 16px;
  width: 13px;
  height: 13px;
  background: no-repeat center / contain;
}

.diff-col li:first-child::before { top: 4px; }

.diff-col.old li::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2378705F' stroke-width='2.6' stroke-linecap='round'%3E%3Cpath d='M5 5L19 19M19 5L5 19'/%3E%3C/svg%3E");
}

.diff-col.new li::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235C6B4F' stroke-width='2.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12.5L9.5 18L20 6'/%3E%3C/svg%3E");
}

/* ===================================================
   MANIFESTO
   =================================================== */

.manifesto-panel {
  border: 1px solid var(--rule);
  border-radius: var(--r);
  background: var(--paper-2);
  padding: 56px 28px;
  text-align: center;
}

@media (min-width: 720px) { .manifesto-panel { padding: 68px 72px; } }

.manifesto-quote {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3.4vw, 2.35rem);
  line-height: 1.32;
  color: var(--ink);
  max-width: 22ch;
  margin: 0 auto;
  text-wrap: balance;
}

/* ===================================================
   BOOKING
   =================================================== */

.booking { padding-bottom: 96px; }

.booking-panel {
  border: 1px solid var(--rule);
  border-radius: var(--r);
  background: var(--paper-2);
  padding: 42px 24px;
}

@media (min-width: 720px) { .booking-panel { padding: 62px 54px; } }

/* Stacks on narrow screens (the Calendly widget needs real, tappable size —
   see the note on .booking-panel in index.html) and goes two-column once
   there's room. */
.booking-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
}

@media (min-width: 720px) {
  .booking-inner {
    grid-template-columns: 0.82fr 1.18fr;
    gap: 56px;
    align-items: stretch;
  }

  .booking-copy {
    display: flex;
    flex-direction: column;
  }

  .whatsapp-card { margin-top: auto; }
}

.booking-copy h2 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); }

.booking-copy p {
  margin-top: 18px;
  font-size: 16px;
  max-width: 40ch;
}

.booking-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.booking-steps span {
  position: relative;
  padding-left: 22px;
}

.booking-steps span::before {
  content: counter(step-counter);
  counter-increment: step-counter;
  position: absolute;
  left: 0;
  top: 1px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--sage);
}

.booking-steps { counter-reset: step-counter; }

.booking-meta {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--rule-strong);
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.booking-meta span {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}

.booking-embed-card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--r);
  padding: 5px;
}

.whatsapp-card {
  margin-top: 22px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px;
  background: var(--paper);
  border: 1px solid var(--rule-strong);
  border-radius: var(--r);
  text-decoration: none;
  color: inherit;
  transition: border-color .2s ease, transform .15s ease;
}

.whatsapp-card:hover {
  border-color: var(--sage);
  transform: translateY(-1px);
}

.whatsapp-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--sage);
  color: var(--paper);
}

.whatsapp-icon svg { width: 21px; height: 21px; }

.whatsapp-copy {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.whatsapp-copy strong {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}

.whatsapp-copy > span:not(.whatsapp-number) {
  font-size: 13.5px;
  color: var(--ink-soft);
  line-height: 1.5;
}

.whatsapp-number {
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--sage-deep);
}

.booking-embed {
  min-height: 470px;
  display: flex;
  align-items: stretch;
  justify-content: center;
  border-radius: 2px;
  overflow: hidden;
}

/* ===================================================
   FOOTER
   =================================================== */

footer {
  position: relative;
  overflow: hidden;
  padding: 64px 0 18px;
  border-top: 1px solid var(--rule);
}

/* giant outlined wordmark sitting behind the footer content, like a
   watermark stamped into the page */
.footer-watermark {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.16em;
  z-index: 0;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 600;
  font-size: 15vw;
  line-height: 1;
  white-space: nowrap;
  text-align: center;
  color: transparent;
  -webkit-text-stroke: 1px var(--rule-strong);
  opacity: .7;
  pointer-events: none;
  user-select: none;
}

footer .scale-outer { position: relative; z-index: 1; }

.footer-main {
  display: grid;
  gap: 44px;
  padding-bottom: 48px;
}

/* unconditional: footer is scaled to fit narrow screens (see .scale-outer),
   not reflowed, so its desktop three-column layout always applies. */
.footer-main {
  grid-template-columns: 1.4fr 0.8fr 1fr;
  gap: 32px;
}

.footer-left .mark-slot { width: 26px; height: 26px; }
.footer-left .wordmark { font-size: 20px; }
.footer-left .logo-lockup { margin-bottom: 22px; }

.footer-headline {
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  line-height: 1.08;
  margin-bottom: 18px;
}

.footer-headline .italic { color: var(--sage); }

.footer-desc {
  font-size: 14.5px;
  line-height: 1.6;
  max-width: 38ch;
  margin-bottom: 24px;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  gap: 10px;
}

.footer-nav a {
  font-size: 15px;
  color: var(--ink-soft);
  transition: color .2s ease;
}

.footer-nav a:hover { color: var(--sage); }

.footer-right {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.footer-label {
  display: block;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 4px;
}

.footer-right a { font-size: 15px; color: var(--ink-soft); transition: color .2s ease; }
.footer-right a:hover { color: var(--sage); }

.footer-contact { font-weight: 500; color: var(--ink); }

.footer-cta { margin-top: 10px; }

.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px 0 32px;
  border-top: 1px solid var(--rule);
}

.footer-bottom-row {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.footer-copy {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
}

.footer-legal {
  display: flex;
  gap: 20px;
}

.footer-legal a {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
  transition: color .2s ease;
}

.footer-legal a:hover { color: var(--sage); }

.footer-kicker {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
