/* ============================================================
   editorial.css — Editorial Civic design layer (homepage scope)
   Layered on top of main.css + components.css + responsive.css.
   Loaded by index.html only. Uses CSS vars from main.css :root.
   ============================================================ */

/* ----- Type utilities ----- */

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-cobalt);
  margin: 0 0 0.75rem;
  line-height: 1.4;
}

.display-serif {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.015em;
  font-variation-settings: "opsz" 48;
}

.lede {
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.55;
  color: rgba(15, 23, 42, 0.72);
  max-width: 56ch;
  margin: 0 auto 2rem;
}

.thin-rule {
  border: 0;
  border-top: 1px solid var(--color-rule);
  margin: 2rem 0;
}

.section-cream {
  background: var(--color-cream);
  color: var(--color-ink);
}

/* ----- HERO ----- */

/* Promote the H1 to a serif display moment */
.hero .hero-title {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.04;
  font-size: clamp(2.5rem, 5.2vw, 4.5rem);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.22);
  font-variation-settings: "opsz" 60;
}

/* Eyebrow above the H1 */
.hero .hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
  margin-bottom: 1.25rem;
  display: inline-block;
  border-top: 1px solid rgba(255, 255, 255, 0.32);
  padding-top: 0.85rem;
}

.hero .hero-subtitle {
  font-family: var(--font-body);
  font-weight: 400;
  color: rgba(226, 232, 240, 0.92);
}

/* Hero buttons: sharper, more editorial */
.hero .btn {
  border-radius: 2px;
  letter-spacing: 0.01em;
  padding: 14px 28px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease;
}

/* Editorial treatment for .page-hero (non-homepage hero variant) */
.page-hero h1 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.04;
  font-size: clamp(2.25rem, 4.6vw, 3.75rem);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.22);
  font-variation-settings: "opsz" 60;
}

/* 2-column layout for .page-hero (mirrors .hero-container on the homepage).
   z-index: 6 keeps the container above main.css's .page-hero::after dark
   overlay (z-index: 5) — without this the cream persona-selector reads as
   grey because the 18-22% dark overlay sits on top of it. */
.page-hero-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  position: relative;
  z-index: 6;
}

.page-hero .page-hero-content { text-align: left; }
.page-hero .page-hero-image { display: flex; justify-content: center; align-items: center; }

/* Single-column page-hero (no side proof_block — wrapper is .container, not
   .page-hero-container). Center the text within a comfortable reading width. */
.page-hero > .container > .page-hero-content {
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}
.page-hero > .container > .page-hero-content .hero-eyebrow {
  margin-left: auto;
  margin-right: auto;
}
.page-hero > .container > .page-hero-content p {
  max-width: 56ch;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 1023px) {
  .page-hero-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2.5rem;
  }
  .page-hero .page-hero-content { text-align: center; }
}

.page-hero .hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
  margin-bottom: 1.25rem;
  display: inline-block;
  border-top: 1px solid rgba(255, 255, 255, 0.32);
  padding-top: 0.85rem;
}

.page-hero p {
  font-family: var(--font-body);
  font-weight: 400;
  color: rgba(226, 232, 240, 0.92);
}

/* Page-hero buttons (mirror homepage .hero treatment) */
.page-hero .hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.page-hero .btn {
  border-radius: 2px;
  letter-spacing: 0.01em;
  padding: 14px 28px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease;
}

/* Outline button readable on the dark blue hero (matches homepage hero) */
.page-hero .btn-outline {
  background: rgba(255, 255, 255, 0.95);
  color: var(--color-primary-blue);
  border: 2px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}

.page-hero .btn-outline:hover {
  background: #ffffff;
  color: var(--color-primary-blue);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22);
}

@media (max-width: 1023px) {
  .page-hero .hero-buttons {
    justify-content: center;
  }
}

/* ----- PROOF BLOCK (editorial claims list) ----- */

.proof-block {
  width: 100%;
  max-width: 460px;
  background: var(--color-cream);
  border-top: 4px solid var(--color-cobalt);
  border-radius: 2px;
  padding: 2.25rem 2.25rem 2rem;
  box-shadow: 0 18px 52px rgba(3, 7, 18, 0.45);
  animation: fadeInRight 0.8s ease-out 0.2s both;
}

.proof-block .proof-block-label,
.proof-block-label {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-ink);
  margin: 0 0 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.12);
}

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

/* Nav-style proof-item (when it wraps an anchor link rather than a credibility claim) */
.proof-item:has(a) {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 -0.65rem;
  padding: 1rem 0.65rem;
  text-align: center;
  border-radius: 2px;
  transition: background 0.15s ease;
}

.proof-item:has(a) + .proof-item:has(a) {
  border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.proof-item:has(a):hover {
  background: rgba(37, 99, 235, 0.06);
}

.proof-item:has(a) .proof-dot {
  display: none;
}

.proof-item a {
  display: inline-flex;
  align-items: baseline;
  gap: 0.55rem;
  color: var(--color-ink);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.35rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
  transition: color 0.15s ease;
}

.proof-item a::after {
  content: '→';
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--color-cobalt);
  transition: transform 0.2s ease;
  display: inline-block;
}

.proof-item a:hover,
.proof-item a:focus-visible {
  color: var(--color-cobalt);
}

.proof-item a:hover::after,
.proof-item a:focus-visible::after {
  transform: translateX(3px);
}

.proof-item {
  display: grid;
  grid-template-columns: 8px 1fr;
  column-gap: 0.85rem;
  align-items: start;
  padding: 0.9rem 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  color: rgba(15, 23, 42, 0.78);
}

.proof-item:first-child {
  padding-top: 0.25rem;
}

.proof-item:last-child {
  padding-bottom: 0.25rem;
}

.proof-dot {
  width: 8px;
  height: 8px;
  background: var(--color-cobalt);
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 0.55em;   /* visually centers the dot on the first text line */
}

.proof-item strong {
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--color-ink);
}

/* With grid layout above, the text span fills column 2 automatically.
   Just ensure long words can break for narrow viewports. */
.proof-item > span:not(.proof-dot) {
  min-width: 0;
  overflow-wrap: break-word;
}

/* Clickable proof badge trigger (e.g. Akkreditált → popover) */
.proof-info-trigger {
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  display: inline;
  border-radius: 2px;
}

.proof-info-trigger strong {
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
  transition: border-color 0.2s ease;
}

.proof-info-trigger:hover strong,
.proof-info-trigger:focus-visible strong {
  border-bottom-color: rgba(15, 23, 42, 0.25);
}

.proof-info-trigger:focus-visible {
  outline: none;
}

/* ----- INFO POPOVER (native [popover]) ----- */

.info-popover {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(92vw, 460px);
  max-height: 80vh;
  padding: 2rem 2.25rem 1.75rem;
  background: var(--color-cream);
  border: 0;
  border-top: 4px solid var(--color-cobalt);
  border-radius: 2px;
  box-shadow: 0 24px 64px rgba(3, 7, 18, 0.45);
  color: var(--color-ink);
  font-family: var(--font-body);
  overflow: auto;
}

.info-popover::backdrop {
  background: rgba(3, 7, 18, 0.55);
  backdrop-filter: blur(2px);
}

.info-popover-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  line-height: 1.25;
  color: var(--color-ink);
  margin: 0 0 0.75rem;
  padding-right: 2.25rem;
}

.info-popover p {
  font-size: 0.95rem;
  line-height: 1.55;
  color: rgba(15, 23, 42, 0.78);
  margin: 0 0 0.85rem;
}

.info-popover p:last-child {
  margin-bottom: 0;
}

.info-popover-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 0;
  font-size: 1.6rem;
  line-height: 1;
  color: rgba(15, 23, 42, 0.55);
  cursor: pointer;
  border-radius: 4px;
  transition: color 0.15s ease, background 0.15s ease;
}

.info-popover-close:hover,
.info-popover-close:focus-visible {
  color: var(--color-ink);
  background: rgba(15, 23, 42, 0.06);
  outline: none;
}

/* ----- SECTION HEADERS (editorial) ----- */

.process-timeline .section-head,
.process-timeline .section-head h2,
.values .section-header,
.client-marquee .section-header,
.blog-preview .section-header,
.service-info-section .section-header,
.cta .cta-content {
  position: relative;
}

/* Convert existing section H2s to serif display */
.services .section-header h2,
.values .section-header h2,
.client-marquee .section-header h2,
.blog-preview .section-header h2,
.service-info-section .section-header h2,
.cta .cta-content h2,
.company-intro .intro-text h2,
.faq-section-title {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.015em;
  font-size: clamp(1.85rem, 3.5vw, 2.6rem);
  line-height: 1.1;
  color: var(--color-ink);
}

.cta .cta-content h2 {
  color: var(--color-cream);
}

.service-info-section .text-slide h3,
.company-intro .intro-text h3 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--color-ink);
  letter-spacing: -0.01em;
}

/* Section lede text */
.services .section-header p,
.values .section-header p,
.client-marquee .section-header p,
.blog-preview .section-header p {
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.55;
  color: rgba(15, 23, 42, 0.72);
  max-width: 56ch;
  margin-left: auto;
  margin-right: auto;
}

/* ----- SERVICES (numbered editorial cards) ----- */

.services {
  background: var(--color-cream) !important;
}

.services .service-card {
  background: #ffffff;
  border-radius: 2px;
  border: 1px solid var(--color-rule);
  border-top: 3px solid var(--color-cobalt);
  box-shadow: none;
  padding: 2rem 1.5rem 1.75rem;
  position: relative;
  transition: transform 0.25s ease, border-color 0.25s ease;
  text-decoration: none;
}

.services .service-card::before {
  counter-increment: service-counter;
  content: "0" counter(service-counter);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--color-cobalt);
  display: block;
  margin-bottom: 0.85rem;
  position: relative;
}

.services .services-grid {
  counter-reset: service-counter;
}

/* Override responsive.css 5-col rule for the homepage (only 4 cards now) */
@media (min-width: 1200px) {
  .services .services-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}

.services .service-card h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.35rem;
  line-height: 1.18;
  color: var(--color-ink);
  letter-spacing: -0.01em;
  margin-bottom: 0.75rem;
}

.services .service-card p {
  font-size: 0.95rem;
  line-height: 1.5;
  color: rgba(15, 23, 42, 0.7);
  margin: 0;
}

.services .service-card:hover {
  transform: translateY(-3px);
  border-top-color: var(--color-primary-blue);
}

/* ----- CLIENT MARQUEE — keep cityscape + dark cards, editorial polish only ----- */

/* Slightly stronger overlay than main.css's 0.45 so cards have more contrast,
   but transparent enough that the cityscape still reads through. */
.client-marquee.is-bg-ready::before,
.client-marquee::before {
  background: linear-gradient(rgba(11, 18, 32, 0.58), rgba(11, 18, 32, 0.72));
}

/* Section header — light text over the darkened cityscape */
.client-marquee .section-header h2 {
  color: var(--color-cream);
}

.client-marquee .section-header p {
  color: rgba(250, 248, 243, 0.78);
  max-width: 56ch;
  margin-left: auto;
  margin-right: auto;
}

/* Cards: keep the original dark/transparent treatment, add editorial accents.
   Do NOT override text color — main.css's white !important wins, which is exactly
   what we want against the cityscape. */
.client-marquee .client-card,
.client-marquee .marquee-track .client-card {
  background: rgba(3, 7, 18, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-top: 2px solid var(--color-cobalt);
  border-radius: 2px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.32);
  padding: 1.15rem 1.25rem;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.client-marquee .client-card:hover {
  transform: translateY(-2px);
  border-top-color: #ffffff;
}

/* Serif client name (color stays white from main.css's !important) */
.client-marquee .client-card .client-name,
.client-marquee .client-card h3,
.client-marquee .client-card strong {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.02rem;
  line-height: 1.25;
  letter-spacing: -0.005em;
  font-variation-settings: "opsz" 24;
}

/* Mono uppercase category eyebrow */
.client-marquee .client-card .client-category,
.client-marquee .client-card .client-meta,
.client-marquee .client-card small {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Hide the period label (first .client-label) — service-type label below remains */
.client-marquee .client-card .client-labels .client-label:first-child {
  display: none;
}

/* With one fewer label row, the marquee section can be shorter */
.client-marquee .marquee-container {
  min-height: 150px;
}
.client-marquee .client-card {
  min-height: 70px;
  padding: 1rem 1.5rem;
}
@media (max-width: 768px) {
  .client-marquee .marquee-container {
    min-height: 130px;
  }
  .client-marquee .client-card {
    min-height: 64px;
    padding: 0.85rem 1rem;
  }
}

/* ----- VALUES (numeric eyebrows above existing labels, drop icons) ----- */

.values {
  background: #ffffff !important;
}

.values .value-card {
  background: #ffffff;
  border: 1px solid var(--color-rule);
  border-top: 3px solid var(--color-cobalt);
  border-radius: 2px;
  box-shadow: none;
  padding: 2rem 1.5rem;
  text-align: left;
  position: relative;
  counter-increment: value-counter;
}

.values .values-grid {
  counter-reset: value-counter;
}

.values .value-icon {
  display: none;
}

.values .value-card::before {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-cobalt);
  display: block;
  margin-bottom: 0.5rem;
}

.values .value-card:nth-child(1)::before { content: "30+ év"; }
.values .value-card:nth-child(2)::before { content: "80+ ügyfél"; }
.values .value-card:nth-child(3)::before { content: "Akkreditált"; }
.values .value-card:nth-child(4)::before { content: "Felelősségbiztosítás"; }

.values .value-card h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.45rem;
  color: var(--color-ink);
  letter-spacing: -0.01em;
  margin: 0 0 0.6rem;
}

.values .value-card p {
  font-size: 0.95rem;
  line-height: 1.5;
  color: rgba(15, 23, 42, 0.68);
  margin: 0;
}

.values .value-card:hover {
  transform: translateY(-3px);
}

/* ----- TEXT GALLERY (numbered tabs, serif headings) ----- */

.service-info-section {
  background: #ffffff !important;
  padding: 88px 0 32px !important;
}

.text-gallery .header-nav-button {
  font-family: var(--font-mono) !important;
  font-size: 0.78rem !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  border-radius: 2px !important;
  border: 1px solid var(--color-rule) !important;
  background: transparent !important;
  color: rgba(15, 23, 42, 0.6) !important;
  padding: 0.6rem 1rem !important;
  transition: all 0.25s ease;
}

.text-gallery .header-nav-button.active {
  background: var(--color-ink) !important;
  color: var(--color-cream) !important;
  border-color: var(--color-ink) !important;
}

/* Desktop: drop the outer container chrome — keep each slide as its own card */
@media (min-width: 1024px) {
  .text-gallery .text-gallery-content {
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none;
    padding: 0 !important;
  }
}

/* Mobile/tablet: keep the tabbed-card UX, section bg stays white */
@media (max-width: 1023px) {
  .text-gallery .text-gallery-content {
    background: #faf8f3 !important;
    border: 1px solid var(--color-rule);
    border-top: 3px solid var(--color-cobalt);
    border-radius: 2px;
  }
}

@media (max-width: 768px) {
  .service-info-section {
    padding: 56px 0 !important;
  }
}

.text-gallery .text-slide h3 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--color-ink);
  font-size: clamp(1.25rem, 2.2vw, 1.65rem);
  letter-spacing: -0.01em;
}

.text-gallery .text-slide p {
  color: rgba(15, 23, 42, 0.72);
  line-height: 1.6;
}

.text-gallery .dot {
  background: rgba(15, 23, 42, 0.18) !important;
}

.text-gallery .dot.active {
  background: var(--color-cobalt) !important;
}

/* ----- FAQ (thin rules instead of card surfaces) ----- */

.faq-section {
  background: var(--color-cream);
  padding: 56px 0 88px !important;
  margin-top: 0 !important;
}

@media (max-width: 768px) {
  .faq-section {
    padding: 40px 0 56px !important;
  }
}

.faq-section-title {
  margin-bottom: 1.5rem;
}

.faq-container {
  border-top: 1px solid var(--color-rule);
}

.faq-item {
  background: transparent !important;
  border: 0 !important;
  border-bottom: 1px solid var(--color-rule) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.faq-item .faq-question {
  background: transparent !important;
  padding: 1.5rem 0 !important;
  border: 0 !important;
  width: 100%;
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: color 0.2s ease;
}

.faq-item .faq-question h3,
.faq-item .faq-question h4 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--color-ink) !important;
  margin: 0;
  letter-spacing: -0.005em;
  flex: 1;
  text-align: left;
}

.faq-item .faq-icon {
  color: var(--color-cobalt) !important;
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1;
  transition: transform 0.3s ease;
  flex-shrink: 0;
  margin-left: 1rem;
}

.faq-item .faq-question[aria-expanded="true"] .faq-icon {
  transform: rotate(45deg);
}

.faq-item .faq-answer {
  padding: 0 0 1.5rem !important;
  background: transparent !important;
}

.faq-item .faq-answer p {
  font-size: 0.98rem;
  line-height: 1.6;
  color: rgba(15, 23, 42, 0.72);
}

/* ----- CTA (mute the gradient — ink background instead of hero blue) ----- */

.cta {
  background: var(--color-ink) !important;
}

.cta::after {
  background: rgba(15, 23, 42, 0.18) !important;
}

.cta .cta-content h2 {
  color: var(--color-cream);
}

.cta .cta-content p {
  color: rgba(250, 248, 243, 0.78);
}

.cta .btn-primary {
  background: var(--color-cobalt);
  color: #ffffff;
  border-radius: 2px;
  box-shadow: none;
}

.cta .btn-primary:hover {
  background: var(--color-light-blue);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
}

.cta .btn-outline {
  background: transparent;
  color: var(--color-cream);
  border: 1px solid rgba(250, 248, 243, 0.4);
  border-radius: 2px;
  box-shadow: none;
}

.cta .btn-outline:hover {
  background: var(--color-cream);
  color: var(--color-ink);
  border-color: var(--color-cream);
}

/* ----- COMPANY INTRO / ADVISORY PRINCIPLES (editorial article) ----- */

.company-intro {
  background: var(--color-cream) !important;
}

.company-intro .intro-text {
  max-width: 72ch;
  margin: 0 auto;
}

.company-intro .intro-text > h2,
.company-intro .intro-text > h3 {
  font-family: var(--font-display);
  color: var(--color-ink);
  letter-spacing: -0.01em;
  margin-top: 2.5rem;
}

.company-intro .intro-text > h2:first-child,
.company-intro .intro-text > h3:first-child {
  margin-top: 0;
}

.company-intro .intro-text > h2 {
  font-size: clamp(1.7rem, 2.8vw, 2.1rem);
}

.company-intro .intro-text > h3 {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
}

.company-intro .intro-text p {
  font-size: 1.02rem;
  line-height: 1.7;
  color: rgba(15, 23, 42, 0.78);
  margin-bottom: 1.2rem;
}

.company-intro .intro-text p a {
  color: var(--color-cobalt);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.advisory-principles-title {
  border-top: 1px solid var(--color-rule);
  padding-top: 2rem;
}

/* ----- BLOG PREVIEW (editorial article cards) ----- */

.blog-preview {
  background: #ffffff !important;
}

.blog-preview .blog-card,
.blog-preview .blog-preview-grid .blog-card {
  background: #ffffff;
  border: 0;
  border-top: 1px solid var(--color-rule);
  border-radius: 0;
  box-shadow: none;
  padding: 1.5rem 0;
}

.blog-preview .blog-card h3,
.blog-preview .blog-card .blog-title {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--color-ink);
  font-size: 1.2rem;
  letter-spacing: -0.005em;
}

.blog-preview .blog-card .blog-date,
.blog-preview .blog-card time {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(15, 23, 42, 0.55);
}

.blog-preview .btn-outline {
  border-radius: 2px;
  border: 1px solid var(--color-ink);
  color: var(--color-ink);
  background: transparent;
}

.blog-preview .btn-outline:hover {
  background: var(--color-ink);
  color: var(--color-cream);
}

/* Hamburger restyle relocated to components.css for site-wide application. */

/* ----- Responsive proof block ----- */

@media (max-width: 1023px) {
  .proof-block {
    max-width: 480px;
    margin: 0 auto;
  }
}

@media (max-width: 480px) {
  .proof-block {
    padding: 1.25rem 1.25rem 1.25rem 1.25rem;
  }
  .proof-item {
    font-size: 0.9rem;
    gap: 0.85rem;
  }
}

/* ----- Hero eyebrow mobile ----- */

@media (max-width: 768px) {
  .hero .hero-eyebrow {
    font-size: 0.7rem;
    letter-spacing: 0.14em;
  }
}

/* ============================================================
   INNER-PAGE BLOCK POLISH (additive — does not affect homepage)
   ============================================================ */

/* 1. Section heading lift — extend coverage to inner-page block types */
.prose-section h2,
.link-list-section .section-header h2,
.highlight-stats .section-header h2,
.references-categories .section-header h2,
.office-location .section-header h2,
.office-location h2,
.cta:not(.has-square-patterns) h2 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.015em;
  font-size: clamp(1.85rem, 3.5vw, 2.6rem);
  line-height: 1.1;
  color: var(--color-ink);
  margin-bottom: 1.5rem;
}

/* 2. Inner-page h3 (group titles, data cards) */
.prose-section h3,
.link-list-group h3,
.prose-section .data-card h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.35rem;
  color: var(--color-ink);
  letter-spacing: -0.01em;
  margin: 0 0 0.85rem;
}

/* 3. Prose section rhythm */
.prose-section {
  padding: 72px 0 80px;
}

/* Compact pricing-philosophy aside — small centered eyebrow + italic quote */
.prose-section:has(.pricing-philosophy) {
  padding: 32px 0 24px;
}
.pricing-philosophy {
  text-align: center;
  max-width: 60ch;
  margin: 0 auto;
}
.pricing-philosophy-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-cobalt);
  margin: 0 0 0.5rem;
}
.pricing-philosophy-quote {
  font-size: 1rem;
  line-height: 1.55;
  color: rgba(15, 23, 42, 0.72);
  font-style: italic;
  margin: 0;
}
.prose-section .prose-content {
  max-width: 72ch;
  margin: 0 auto;
}
.prose-section.company-data .prose-content,
.prose-section.has-grid .prose-content {
  max-width: none;
}
.prose-section p {
  font-size: 1.02rem;
  line-height: 1.7;
  color: rgba(15, 23, 42, 0.78);
}
@media (max-width: 768px) {
  .prose-section { padding: 48px 0 56px; }
}

/* 4. About page — company-data section becomes a polished editorial grid */
.prose-section.company-data {
  background: var(--color-cream);
}
.prose-section.company-data .company-data-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}
.prose-section.company-data .data-card {
  background: #ffffff;
  border: 1px solid var(--color-rule);
  border-top: 3px solid var(--color-cobalt);
  border-radius: 2px;
  box-shadow: none;
  padding: 2rem 1.75rem;
}
.prose-section.company-data .data-card .data-item {
  font-size: 0.95rem;
  line-height: 1.6;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}
.prose-section.company-data .data-card .data-item:last-child {
  border-bottom: 0;
}
.prose-section.company-data .data-card .data-item strong {
  color: var(--color-text-medium);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  display: block;
  margin-bottom: 0.15rem;
  text-transform: none;
}

/* 5. Stats block (references page) — editorial cards */
.highlight-stats {
  background: var(--color-cream);
  padding: 72px 0 64px;
}
.highlight-stats .stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}
.highlight-stats .stat-item {
  background: #ffffff;
  border: 1px solid var(--color-rule);
  border-top: 3px solid var(--color-cobalt);
  border-radius: 2px;
  box-shadow: none;
  padding: 2rem 1.5rem 1.75rem;
  text-align: left;
  transition: transform 0.25s ease;
}
.highlight-stats .stat-item:hover {
  transform: translateY(-3px);
}
.highlight-stats .stat-number {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.2rem, 4vw, 3rem);
  color: var(--color-ink);
  line-height: 1;
  letter-spacing: -0.02em;
}
.highlight-stats .stat-label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-cobalt);
  margin-top: 0.85rem;
}
.highlight-stats .stat-desc {
  font-size: 0.92rem;
  line-height: 1.5;
  color: rgba(15, 23, 42, 0.7);
  margin-top: 0.5rem;
}

/* 6. Link list (links + sitemap) — grouped, scannable, editorial */
.link-list-section {
  padding: 72px 0 80px;
}
.link-list-groups {
  display: grid;
  gap: 2.5rem;
}
.link-list-group h3 {
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--color-rule);
  margin-bottom: 1rem;
}
.link-list-group .link-list-intro {
  font-size: 0.95rem;
  line-height: 1.55;
  color: rgba(15, 23, 42, 0.7);
  margin-bottom: 1rem;
}
.link-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.4rem 1.5rem;
}
.link-list li {
  padding: 0.45rem 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.05);
  font-size: 0.96rem;
}
.link-list a {
  color: var(--color-text-dark);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s ease;
}
.link-list a:hover {
  color: var(--color-cobalt);
  text-decoration: underline;
}

/* 7. References categories — keep functional styling, lift the chrome */
.references-categories {
  padding: 56px 0 80px;
}
.references-categories .references-controls {
  margin-bottom: 1.5rem;
}

/* 8. Office location (contact page) — editorial article style */
.office-location {
  background: var(--color-cream);
  padding: 72px 0 80px;
}
.office-location .location-content > h2,
.office-location .section-header h2 {
  text-align: center;
  margin-bottom: 2.5rem;
}
.office-location .location-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}
.office-location .location-text h3,
.office-location .location-text h4 {
  font-family: var(--font-display);
  color: var(--color-ink);
  font-weight: 600;
  letter-spacing: -0.005em;
}
.office-location .location-text h3 { font-size: 1.35rem; margin: 0 0 0.85rem; }
.office-location .location-text h4 { font-size: 1.1rem; margin: 1.5rem 0 0.5rem; }
.office-location .location-text p {
  font-size: 1.0rem;
  line-height: 1.7;
  color: rgba(15, 23, 42, 0.78);
}
.office-location .parking-info {
  background: #ffffff;
  border-left: 3px solid var(--color-cobalt);
  border-radius: 0;
  padding: 1.25rem 1.5rem;
  margin-top: 1.5rem;
}
@media (max-width: 768px) {
  .office-location .location-info { grid-template-columns: 1fr; gap: 2rem; }
}

/* 9. CTA body paragraph contrast (when not has-square-patterns variant) */
.cta:not(.has-square-patterns) .cta-content p {
  font-size: 1.05rem;
  line-height: 1.6;
  max-width: 64ch;
  margin-left: auto;
  margin-right: auto;
}

/* 10. Pricing page — editorial lift on section heads inside pricing_section */
.pricing-section h2,
.pricing-section .pricing-section-heading {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--color-ink);
  letter-spacing: -0.01em;
}

/* ============================================================
   VALUE-THRESHOLDS BESPOKE PAGE POLISH
   ============================================================ */

/* Threshold checker section header + cream bg */
.threshold-checker-section {
  background: var(--color-cream);
  padding: 72px 0 80px;
}
.threshold-checker-section .section-header {
  text-align: center;
  margin-bottom: 2rem;
}
.threshold-checker-section .section-header h2 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.015em;
  font-size: clamp(1.85rem, 3.5vw, 2.6rem);
  line-height: 1.1;
  color: var(--color-ink);
  margin-bottom: 1rem;
}
.threshold-checker-section .section-header p {
  font-size: 1.02rem;
  line-height: 1.6;
  color: rgba(15, 23, 42, 0.72);
  max-width: 60ch;
  margin: 0 auto;
}

/* Calculator form as an editorial card */
.threshold-checker-section .threshold-card {
  background: #ffffff;
  border: 1px solid var(--color-rule);
  border-top: 3px solid var(--color-cobalt);
  border-radius: 2px;
  box-shadow: none;
  padding: 2.25rem 2.25rem 2rem;
  max-width: 760px;
  margin: 0 auto;
}
.threshold-form {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  align-items: stretch;
}
.threshold-form .form-group {
  margin: 0;
  display: flex;
  flex-direction: column;
}
.threshold-form .form-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-ink);
  margin: 0 0 0.55rem;
  line-height: 1.35;
}
.threshold-form .form-select {
  width: 100%;
  margin-top: auto;
  border: 1px solid var(--color-rule);
  border-radius: 2px;
  background: #ffffff;
  font-family: var(--font-body);
  font-size: 0.98rem;
  color: var(--color-ink);
  padding: 0.75rem 0.9rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.threshold-form .form-select:focus {
  outline: none;
  border-color: var(--color-cobalt);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}
@media (max-width: 768px) {
  .threshold-form { grid-template-columns: 1fr; gap: 1rem; }
  .threshold-checker-section .threshold-card { padding: 1.5rem 1.25rem; }
}

/* Result verdict — distinct card, large value */
.threshold-result {
  margin-top: 1.75rem;
  padding: 1.5rem 1.5rem 1.25rem;
  background: var(--color-cream);
  border-left: 4px solid var(--color-cobalt);
  border-radius: 2px;
}
.threshold-result #thresholdResultMain {
  margin: 0 0 0.35rem;
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(15, 23, 42, 0.6);
}
.threshold-result #thresholdResultMain strong {
  font-weight: 600;
}
.threshold-result #thresholdValue {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  letter-spacing: -0.01em;
  color: var(--color-ink);
  margin-top: 0.35rem;
}
.threshold-result .muted {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.5;
  color: rgba(15, 23, 42, 0.68);
}

/* Reference tables — editorial header treatment */
/* Collapsible SEO intro under the tables section header — centered chevron only */
.service-info-section details.thresholds-intro {
  margin: 0.5rem auto 0;
  max-width: 56ch;
  text-align: center;
}
.service-info-section details.thresholds-intro > summary {
  display: block;
  list-style: none;
  cursor: pointer;
  padding: 0.6rem 0.75rem;
  line-height: 1;
  color: var(--color-cobalt);
  user-select: none;
  transition: color 0.15s ease;
}
.service-info-section details.thresholds-intro > summary::-webkit-details-marker {
  display: none;
}
.service-info-section details.thresholds-intro > summary::after {
  content: '';
  display: inline-block;
  width: 0.6rem;
  height: 0.6rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-3px) rotate(45deg);
  transform-origin: center;
  transition: transform 0.2s ease;
}
.service-info-section details.thresholds-intro[open] > summary::after {
  transform: translateY(1px) rotate(-135deg);
}
.service-info-section details.thresholds-intro > p {
  text-align: center;
}
.service-info-section details.thresholds-intro > summary:hover,
.service-info-section details.thresholds-intro > summary:focus-visible {
  color: var(--color-primary-blue);
  outline: none;
}
.service-info-section details.thresholds-intro > p {
  margin: 0.75rem auto 0;
  max-width: 52ch;
  font-size: 0.96rem;
  line-height: 1.65;
  color: rgba(15, 23, 42, 0.72);
  text-wrap: pretty;
}

.service-info-section .thresholds-grid {
  display: grid;
  gap: 2.5rem;
  margin-top: 1.5rem;
}
.service-info-section .thresholds-grid .threshold-card {
  background: #ffffff;
  border: 1px solid var(--color-rule);
  border-top: 3px solid var(--color-cobalt);
  border-radius: 2px;
  box-shadow: none;
  padding: 1.75rem 0 0;   /* no horizontal padding — table fills the card edge-to-edge */
  min-width: 0;
  overflow: hidden;
}
/* Heading + intro keep their breathing room (table fills full width below) */
.service-info-section .thresholds-grid .threshold-card > h3,
.service-info-section .thresholds-grid .threshold-card > p {
  padding-left: 1.75rem;
  padding-right: 1.75rem;
}

/* Mobile: drop the card chrome, let table run edge-to-edge */
@media (max-width: 768px) {
  .service-info-section .thresholds-grid .threshold-card {
    border: 0;
    border-radius: 0;
    background: transparent;
    padding: 0.5rem 0 1.25rem;
    overflow: visible;
  }
  .service-info-section .thresholds-grid .threshold-card > h3,
  .service-info-section .thresholds-grid .threshold-card > p {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  /* Table extends past the container's 1rem horizontal padding to viewport edges.
     Transparent border (not padding) creates the breathing room — overflow
     clips at the padding edge, so scrolled cells stop INSIDE the border. */
  .service-info-section .thresholds-grid .threshold-card > .table-drag-wrap,
  .service-info-section .thresholds-grid .threshold-card > .reference-table-container {
    margin-left: -1rem;
    margin-right: -1rem;
  }
  .service-info-section .thresholds-grid .reference-table-container {
    padding-left: 0;
    padding-right: 0;
    border-left: 0.5rem solid transparent;
    border-right: 0.5rem solid transparent;
  }
}
.service-info-section .thresholds-grid .threshold-card h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.35rem;
  letter-spacing: -0.01em;
  color: var(--color-ink);
  margin: 0 0 0.5rem;
}
/* Reference table — native horizontal scroll + invisible drag-overlay */
.service-info-section .reference-table-container {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  /* Override the site-wide html { scroll-behavior: smooth } so programmatic
     scrollLeft writes during drag are instant and track the pointer 1:1. */
  scroll-behavior: auto;
}

/* Sticky first column — row label stays pinned during horizontal scroll */
.service-info-section .reference-table thead th:first-child {
  position: sticky;
  left: 0;
  z-index: 4;
  background: var(--color-ink);
}
.service-info-section .reference-table .threshold-rowlabel {
  position: sticky;
  left: 0;
  z-index: 2;
  background: #ffffff;
  box-shadow: 1px 0 0 var(--color-rule);
}

/* JS-injected drag overlay: transparent div with pointer-event drag handlers */
.table-drag-wrap {
  position: relative;
}
.table-drag-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  background: transparent;
  cursor: grab;
  /* `none` keeps the browser from claiming any portion of the gesture as a native
     swipe / pan / back-navigation — leaving the JS handler in full control. */
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.table-drag-overlay.is-dragging {
  cursor: grabbing;
}

.service-info-section .thresholds-grid .threshold-note {
  font-size: 0.92rem;
  color: rgba(15, 23, 42, 0.6);
  margin-bottom: 1.25rem;
}
.service-info-section .reference-table thead th {
  background: var(--color-ink);
  color: var(--color-cream);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.service-info-section .reference-table .threshold-rowlabel {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--color-ink);
}
.service-info-section .reference-table .th-main {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--color-ink);
}
.service-info-section .reference-table .th-sub {
  font-size: 0.85rem;
  color: rgba(15, 23, 42, 0.6);
}

/* ============================================================
   CONTACT PAGE — quick-access cards + form + director bio
   ============================================================ */

/* Quick-access cards section (below the hero, above the form) */
.contact-quick-access {
  background: #ffffff;
  padding: 56px 0 24px;
}
.contact-quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}
.contact-quick-card {
  background: #ffffff;
  border: 1px solid var(--color-rule);
  border-top: 3px solid var(--color-cobalt);
  border-radius: 2px;
  padding: 1.75rem 1.5rem;
  text-align: center;
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.contact-quick-card:hover {
  transform: translateY(-3px);
}
.contact-quick-icon {
  color: var(--color-cobalt);
  margin-bottom: 1rem;
}
.contact-quick-icon svg { display: inline-block; }
.contact-quick-card h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: -0.005em;
  color: var(--color-ink);
  margin: 0 0 0.6rem;
}
.contact-quick-card p {
  font-size: 0.96rem;
  line-height: 1.55;
  color: rgba(15, 23, 42, 0.78);
  margin: 0;
}
.contact-quick-card a {
  color: var(--color-cobalt);
  text-decoration: none;
  font-weight: 500;
}
.contact-quick-card a:hover { text-decoration: underline; }

/* Contact form section — cream bg cohesion with office_location */
.contact-form-director {
  background: var(--color-cream) !important;
  padding: 72px 0 80px;
}

/* Form container as an editorial card */
.contact-form-container {
  background: #ffffff;
  border: 1px solid var(--color-rule);
  border-top: 3px solid var(--color-cobalt);
  border-radius: 2px;
  padding: 2rem 2rem 2.25rem;
  box-shadow: none;
}
.contact-form-container h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.5rem, 2.6vw, 1.85rem);
  letter-spacing: -0.01em;
  color: var(--color-ink);
  margin: 0 0 1.5rem;
  text-align: left;
}

/* Mono uppercase form labels */
.contact-form-container .form-label,
.contact-form-container label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-ink);
  margin-bottom: 0.5rem;
  display: block;
}

/* Sharp-corner inputs with cobalt focus ring */
.contact-form-container .form-input,
.contact-form-container .form-select,
.contact-form-container .form-textarea {
  border-radius: 2px;
  border: 1px solid var(--color-rule);
  padding: 0.75rem 0.9rem;
  font-family: var(--font-body);
  font-size: 0.98rem;
  color: var(--color-ink);
  background: #ffffff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.contact-form-container .form-input:focus,
.contact-form-container .form-select:focus,
.contact-form-container .form-textarea:focus {
  outline: none;
  border-color: var(--color-cobalt);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

/* Sharp-corner submit button */
.contact-form-container .btn-primary {
  border-radius: 2px;
  letter-spacing: 0.01em;
  padding: 0.85rem 1.5rem;
  background: var(--color-cobalt);
  box-shadow: none;
}
.contact-form-container .btn-primary:hover {
  background: var(--color-primary-blue);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.3);
}

/* Director bio — editorial article style, no glass card. The lift hover
   from hover-animations.css doesn't suit the new flat layout, kill it. */
.director-intro-compact {
  background: transparent !important;
  border: 0;
  box-shadow: none;
  padding: 1rem 0 0;
  transition: none !important;
  transform: none !important;
}
.director-intro-compact:hover {
  background: transparent !important;
  transform: none !important;
  box-shadow: none !important;
}
.director-intro-compact .director-photo {
  text-align: left;
  margin-bottom: 1.25rem;
}
.director-intro-compact .director-img {
  border: 0;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}
.director-intro-compact .director-info h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.35rem, 2.2vw, 1.65rem);
  letter-spacing: -0.005em;
  color: var(--color-ink);
  text-align: left;
  margin: 0;
}
.director-intro-compact .director-title {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-cobalt);
  text-align: left;
  margin: 0.4rem 0 1rem;
}
.director-intro-compact .director-description {
  font-size: 1rem;
  line-height: 1.7;
  color: rgba(15, 23, 42, 0.78);
  text-align: left;
}
.director-intro-compact .director-expertise {
  justify-content: flex-start;
}
.director-intro-compact .expertise-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(37, 99, 235, 0.08);
  color: var(--color-cobalt);
  border-radius: 2px;
  padding: 0.4rem 0.75rem;
}

/* ===== Stat card — numeric variant of .proof-block =====
   Used in the right column of .page-hero (e.g. referenciak.html).
   Editorial sidebar: oversized Source Serif numerals, mono captions,
   hairline rules between rows. Cobalt "+" lifts to superscript. */
.proof-block.stat-card {
  padding: 1.75rem 2.25rem 1.5rem;
}

.proof-block.stat-card .proof-block-label {
  margin-bottom: 0.25rem;
}

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

.stat-row {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  column-gap: 1.5rem;
  padding: 1rem 0 0.9rem;
  border-bottom: 1px solid var(--color-rule);
}

.stat-row:last-child {
  border-bottom: 0;
  padding-bottom: 0.25rem;
}

.stat-figure {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.18rem;
  color: var(--color-ink);
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 0.92;
  letter-spacing: -0.025em;
  font-variation-settings: "opsz" 60;
  font-variant-numeric: lining-nums tabular-nums;
}

.stat-num {
  font-size: clamp(3rem, 5vw, 4.25rem);
}

.stat-plus {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--color-cobalt);
  padding-top: 0.6em;
  letter-spacing: 0;
}

.stat-caption {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(15, 23, 42, 0.62);
  justify-self: end;
  text-align: right;
  line-height: 1.35;
  max-width: 11ch;
}

@media (max-width: 480px) {
  .proof-block.stat-card {
    padding: 1.5rem 1.5rem 1.25rem;
  }
  .stat-row {
    column-gap: 1rem;
    padding: 0.85rem 0 0.75rem;
  }
  .stat-num {
    font-size: clamp(2.5rem, 12vw, 3.25rem);
  }
  .stat-caption {
    font-size: 0.66rem;
  }
}

/* ============================================================
   BACK-TO-TOP BUTTON
   Small cobalt circle, bottom-right. Hidden until scrolled,
   gentle wobble every 8s to nudge attention.
   ============================================================ */
.back-to-top {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--color-cobalt);
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.22);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease, background 0.15s ease, box-shadow 0.2s ease;
  z-index: 100;
}
.back-to-top svg {
  width: 20px;
  height: 20px;
  display: block;
}
.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  animation: btt-wobble 7s cubic-bezier(0.28, 0.84, 0.42, 1) infinite;
  transform-origin: 50% 100%;
}
.back-to-top:hover {
  background: var(--color-primary-blue);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.28);
  animation-play-state: paused;
}
.back-to-top:focus-visible {
  outline: 2px solid var(--color-cobalt);
  outline-offset: 3px;
  animation-play-state: paused;
}
.back-to-top:active {
  transform: translateY(1px);
}

@keyframes btt-wobble {
  /* Idle most of the cycle */
  0%, 82%, 100% { transform: translateY(0)     rotate(0);     }
  /* The "hit": sharp upward kick + tilt */
  85%           { transform: translateY(-14px) rotate(-12deg); }
  /* Bounce 1: ground contact, squash slightly */
  88%           { transform: translateY(2px)   rotate(8deg) scaleY(0.92); }
  /* Bounce 2: smaller jump */
  91%           { transform: translateY(-8px)  rotate(-5deg); }
  /* Bounce 3 */
  94%           { transform: translateY(1px)   rotate(3deg) scaleY(0.96); }
  /* Bounce 4 */
  96%           { transform: translateY(-3px)  rotate(-2deg); }
  /* Settle */
  98%           { transform: translateY(0)     rotate(1deg);  }
}

@media (max-width: 768px) {
  .back-to-top {
    bottom: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .back-to-top.is-visible { animation: none; }
}
