/* =========================================================
   Lerna Soft · agency site v6 — multipage, deep blue palette
   - Body is light/warm-white.
   - Hero and Footer wear .is-dark (navy) as statement frames.
   - Deep azure as the punctual accent, premium feel.
   - Editorial typography, generous whitespace, calm rhythm.
   - Each page has its own 100dvh hero; sections flow fluidly.
   ========================================================= */

:root {
  /* ========== LIGHT (default) ========== */
  --bg:           #FAF7F0;   /* warm white, body */
  --bg-2:         #F2EDE0;   /* cream zebra */
  --surface:      #FFFFFF;   /* cards */
  --surface-2:    #F6F2E5;   /* alt cards / subtle blocks */

  --text:         #0A0E27;
  --text-soft:    #2A3050;
  --muted:        #5A607C;
  --muted-2:      #8A90A6;

  --line:         rgba(10, 14, 39, 0.10);
  --line-strong:  rgba(10, 14, 39, 0.22);

  /* ========== DARK frames (hero + footer) ========== */
  --bg-d:         #0A0E27;
  --bg-d-2:       #07091F;
  --surface-d:    #11163A;
  --surface-d-2: #161C44;

  --text-d:       #FFFFFF;
  --muted-d:      #9AA1C7;
  --muted-d-2:    #6F769B;

  --line-d:       rgba(255, 255, 255, 0.10);
  --line-d-strong:rgba(255, 255, 255, 0.22);

  /* ========== ACCENT — deep azure ========== */
  --accent:       #2563EB;   /* vivid blue, primary accent */
  --accent-2:     #3B82F6;   /* lighter blue for hovers */
  --accent-3:     #1E3A8A;   /* deep navy-blue, reads well on light bg */
  --accent-soft:  #DBEAFE;   /* tinted blue for highlight bg on light */
  --ink-on-accent:#FFFFFF;   /* white text on blue */

  /* ========== layout ========== */
  --maxw: 1320px;
  --pad: clamp(20px, 4vw, 64px);
  --radius: 14px;
  --radius-lg: 22px;
  --font:      "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
/* Enforce the boolean [hidden] attribute against any display:flex/grid/etc.
   declared elsewhere. The UA default is too low-specificity to win. */
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: transparent; color: inherit; }
ul, ol { list-style: none; padding: 0; margin: 0; }

/* ---------- dark-frame primitives (hero, footer) ---------- */
.is-dark {
  background: var(--bg-d);
  color: var(--text-d);
}
.is-dark .muted { color: var(--muted-d); }
.is-dark .eyebrow { color: var(--accent); }
.is-dark .eyebrow::before { background: var(--accent); }

/* ---------- primitives ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: var(--pad);
}

.display {
  font-weight: 800;
  font-size: clamp(32px, 4.8vw, 76px);   /* v6: fits comfortably in 100dvh, even on 768px-tall laptops */
  line-height: 1.04;
  letter-spacing: -0.026em;
  margin: 0;
}
.h-display {
  font-weight: 800;
  font-size: clamp(32px, 4.8vw, 68px);
  line-height: 1.02;
  letter-spacing: -0.028em;
  margin: 0;
  color: var(--text);
}
.is-dark .h-display, .is-dark .display { color: var(--text-d); }
.accent { color: var(--accent); }
.is-dark .accent { color: var(--accent); }

.muted { color: var(--muted); margin: 0; }

/* eyebrow */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--accent-3);  /* deeper olive reads better on light */
  text-transform: none;
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
  opacity: 0.7;
}

/* section head */
.section-head { margin: 0 0 40px; max-width: 920px; }
.section-head .h-display { margin: 0 0 18px; }
.section-lead {
  font-size: 17px;
  line-height: 1.6;
  max-width: 64ch;
  color: var(--muted);
}

/* section number */
.section-num {
  position: absolute;
  top: 32px;
  right: var(--pad);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--muted-2);
  z-index: 2;
  pointer-events: none;
}
.section-num span { color: var(--accent-3); }
.is-dark .section-num { color: var(--muted-d-2); }
.is-dark .section-num span { color: var(--accent); }

section { position: relative; }

/* When scrolling to a section via anchor, reserve space for the sticky
   topbar (80px) + a little visual breathing room so the section title
   isn't tucked under the bar. */
html { scroll-padding-top: 81px; }   /* 80 topbar + 1 border-bottom */

/* buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 28px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0;
  transition: transform .15s ease, background .18s ease, color .18s ease, box-shadow .18s ease;
  position: relative;
  white-space: nowrap;
}
.btn-primary {
  background: var(--text);            /* on light: dark button */
  color: #fff;
  box-shadow: 0 10px 24px -12px rgba(10, 14, 39, 0.45);
}
.btn-primary:hover {
  background: var(--accent);
  color: var(--ink-on-accent);
  transform: translateY(-2px);
  box-shadow: 0 14px 32px -10px rgba(37, 99, 235, 0.55);
}
.is-dark .btn-primary {                /* on dark: azure button */
  background: var(--accent);
  color: var(--ink-on-accent);
  box-shadow: 0 8px 24px -10px rgba(37, 99, 235, 0.5);
}
.is-dark .btn-primary:hover {
  background: var(--accent-2);
  box-shadow: 0 14px 32px -10px rgba(37, 99, 235, 0.7);
}
.btn-ghost {
  color: var(--text);
  padding: 16px 18px;
  border-radius: 0;
  position: relative;
}
.btn-ghost::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 12px;
  height: 1px;
  background: currentColor;
  opacity: 0.35;
  transition: opacity .15s, background .15s;
}
.btn-ghost:hover { color: var(--accent-3); }
.btn-ghost:hover::after { background: var(--accent-3); opacity: 1; }
.is-dark .btn-ghost { color: var(--text-d); }
.is-dark .btn-ghost:hover { color: var(--accent); }
.is-dark .btn-ghost:hover::after { background: var(--accent); }

/* reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .6s ease, transform .6s ease;
  will-change: opacity, transform;
}
.reveal.is-in-view { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- topbar (light, sticky) ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 247, 240, 0.85);
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 80px;
}
.brand {
  font-family: 'Anton', 'Inter', system-ui, sans-serif;
  font-weight: 400;            /* Anton has a single weight */
  letter-spacing: 0.01em;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text);
  line-height: 1;
}
.brand-icon {
  display: block;
  height: 52px;
  width: auto;
}
.is-dark .brand-icon,
.footer-brand .brand-icon { filter: invert(1); }
.brand-mark {
  display: inline-block;
  font-size: 18px;
  transform: skewX(-8deg);     /* italic via skew (Anton has no italic) */
  color: currentColor;
}
.is-dark .brand { color: var(--text-d); }

.nav {
  display: flex;
  gap: 30px;
  margin-inline: auto;
}
.nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  opacity: 0.78;
  transition: color .15s, opacity .15s;
}
.nav a:hover { color: var(--accent-3); opacity: 1; }

.topbar-actions { display: flex; align-items: center; gap: 14px; }
.lang {
  display: inline-flex;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 3px;
}
.lang-btn {
  padding: 6px 13px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.1em;
  transition: background .15s, color .15s;
}
.lang-btn.is-active {
  background: var(--text);
  color: #fff;
}
.topbar-cta { padding: 11px 20px; font-size: 13px; }
.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 9px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
}
.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  margin: 4px 0;
  border-radius: 2px;
}

/* ---------- hero (DARK statement) — block layout, no flex tricks ----
   Why block instead of flex:
   - flex 'justify-content: safe center' distributes leftover space ABOVE
     the content (looks like excess top margin even when padding is small).
   - 'safe' keyword has spotty support in older browsers.
   - Plain block layout + margin auto is universal and predictable: the
     content starts right after padding-top and flows downward.
   ------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: calc(100dvh - 80px);   /* 80 = topbar height; fills exactly the visible viewport */
  padding-block: clamp(48px, 4vw, 72px) clamp(104px, 8vw, 132px);
  /* top: tight breathing room (topbar already covers 80px on its own)
     bottom: reserves space so the scroll arrow doesn't overlap the stats */
  overflow: hidden;
  isolation: isolate;
  text-align: center;
}
.hero > .container { width: 100%; }
.hero .hero-copy {
  max-width: 1080px;
  margin: 0 auto;
}
.hero .hero-copy > * {
  margin-left: auto;
  margin-right: auto;
}
.hero .hero-copy .eyebrow      { margin-top: 0; margin-bottom: 24px; }
.hero .hero-copy .display      { margin-top: 0; margin-bottom: 28px; }
.hero .hero-copy .lead         { margin-top: 0; margin-bottom: 36px; max-width: 62ch; }
.hero .hero-copy .hero-cta     { margin-top: 0; margin-bottom: 48px; }
.hero .hero-copy .hero-stats   { margin-top: 0; margin-bottom: 0; }

/* hero eyebrow: symmetric decorative dashes on both sides for centered layout */
.hero .hero-copy .eyebrow::after {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
  opacity: 0.7;
}
.hero.is-dark::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 900px 460px at 8% 110%, rgba(37, 99, 235, 0.16), transparent 70%),
    radial-gradient(ellipse 700px 420px at 100% -10%, rgba(124, 90, 255, 0.10), transparent 70%);
  z-index: -1;
}
.waves {
  position: absolute;
  width: 720px;
  height: 720px;
  pointer-events: none;
  background: url("assets/waves.svg") no-repeat;
  background-size: contain;
  z-index: -1;
}
.waves-bl { left: -180px; bottom: -260px; opacity: 0.55; }

.hero-bg-text {
  position: absolute;
  left: 50%;
  bottom: -8px;
  transform: translateX(-50%);
  font-weight: 900;
  font-size: clamp(140px, 22vw, 360px);
  line-height: 0.85;
  letter-spacing: -0.06em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255,255,255,0.05);
  pointer-events: none;
  z-index: -1;
  white-space: nowrap;
  opacity: 0.7;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}
.hero-copy .lead {
  font-size: clamp(15px, 1.05vw, 17px);
  color: var(--muted-d);
  max-width: 62ch;                 /* wider line for breathing */
  line-height: 1.55;
}
.hero-cta { display: flex; gap: 12px; align-items: center; justify-content: center; flex-wrap: wrap; }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  padding-top: 24px;
  border-top: 1px solid var(--line-d);
  max-width: 720px;                /* wider so the four stats breathe horizontally */
  width: 100%;
}
.hero-stats li {
  display: flex;
  flex-direction: column;
  align-items: center;             /* center num + label inside each column */
  gap: 6px;
  padding-inline: 8px;
  text-align: center;
}
.hero-stats li + li {
  border-left: 1px solid var(--line-d);
}
.hs-num {
  font-size: clamp(20px, 1.8vw, 26px);
  font-weight: 800;
  color: var(--text-d);
  line-height: 1;
  letter-spacing: -0.025em;
}
.hs-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted-d);
  line-height: 1.35;
  letter-spacing: 0.02em;
}

/* hero collage — cleaner, less rotation, tighter */
.hero-collage {
  position: relative;
  min-height: 320px;
  max-width: 460px;
  margin-left: auto;
}
.hero-collage img {
  position: absolute;
  border-radius: 10px;
  box-shadow: 0 40px 70px -28px rgba(0, 0, 0, 0.65);
  transition: transform .35s ease;
}
.hero-collage .m1 { width: 88%; top: 0;   left: 0;   z-index: 1; transform: rotate(-1deg); }
.hero-collage .m2 { width: 52%; top: 44%; right: 0;  z-index: 2; transform: rotate(1.5deg); }
.hero-collage .m3 { width: 48%; top: 64%; left: 4%;  z-index: 3; transform: rotate(-0.8deg); }
.hero-collage:hover .m1 { transform: rotate(-0.5deg) translateY(-3px); }
.hero-collage:hover .m2 { transform: rotate(1deg) translateY(-3px); }
.hero-collage:hover .m3 { transform: rotate(-0.3deg) translateY(-3px); }

/* ---------- hero scroll arrow ----------
   Static in the flow (not absolute) so it is always visible regardless
   of viewport height. Sits below stats with breathing margin. */
.hero-scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--muted-d);
  text-decoration: none;
  transition: color .2s ease;
}
.hero-scroll:hover { color: var(--accent); }
.hero-scroll-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.24em;
  opacity: 0.85;
}
.hero-scroll-arrow {
  width: 44px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line-d-strong);
  display: grid;
  place-items: center;
  color: var(--accent);
  background: rgba(37, 99, 235, 0.06);
  animation: scrollBounce 2.2s ease-in-out infinite;
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}
.hero-scroll:hover .hero-scroll-arrow {
  border-color: var(--accent);
  background: rgba(37, 99, 235, 0.16);
  animation-play-state: paused;
  transform: translateY(2px);
}
@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(6px); }
}

/* ---------- logos strip (light) ---------- */
.logos {
  padding-block: 56px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.logos-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2.4fr);
  align-items: center;
  gap: 40px;
}
.logos-title {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.5;
  color: var(--muted);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.logos-marquee {
  position: relative;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.logos-track {
  display: flex;
  gap: 56px;
  align-items: center;
  width: max-content;
  animation: marquee 36s linear infinite;
}
.logos-track img {
  height: 26px;
  width: auto;
  opacity: 0.7;
  filter: grayscale(1) invert(0.7) brightness(0.6);
  transition: opacity .2s;
  flex-shrink: 0;
}
.logos-track:hover { animation-play-state: paused; }
.logos-track img:hover { opacity: 1; }
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ---------- services (light, big list) ---------- */
.services { padding-block: clamp(110px, 13vw, 180px); }
.services .section-head { margin-bottom: 18px; max-width: 720px; }
.services .section-head .h-display { font-size: clamp(26px, 3vw, 40px); margin-bottom: 8px; }
.services .section-head .section-lead { font-size: 14px; }
.services-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.services-list li {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px 22px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  position: relative;
  cursor: default;
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.services-list li:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 20px 40px -20px rgba(37, 99, 235, 0.25);
}
.services-list .svc-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.1em;
}
.services-list .svc-title { font-size: 16px; font-weight: 700; line-height: 1.25; color: var(--text); margin: 0; }
.services-list .svc-desc {
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
  margin: 0;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height .3s ease, opacity .2s ease, margin-top .2s ease;
}
.services-list li:hover .svc-desc { max-height: 140px; opacity: 1; }
.services-list .svc-arrow { display: none; }
.services-list li:hover {
  padding-left: 32px;
  background: linear-gradient(90deg, var(--accent-soft), transparent 60%);
}
.svc-num {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted-2);
  letter-spacing: 0.1em;
}
.svc-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--bg-2);
  color: var(--text);
  display: grid; place-items: center;
  transition: background .25s, color .25s;
}
.services-list li:hover .svc-icon {
  background: var(--accent);
  color: var(--ink-on-accent);
}
.svc-title {
  font-size: clamp(22px, 2.2vw, 32px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--text);
  transition: color .2s;
}
.svc-desc {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
}
.svc-arrow {
  width: 44px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  display: grid; place-items: center;
  color: var(--text);
  transition: background .25s, color .25s, border-color .25s, transform .25s;
}
.services-list li:hover .svc-arrow {
  background: var(--text);
  border-color: var(--text);
  color: #fff;
  transform: rotate(-45deg);
}

/* ---------- industries (cream cards on light) ---------- */
.industries {
  padding-block: clamp(110px, 13vw, 180px);
  background: var(--bg-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.ind-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}
.ind-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 40px 28px 36px;
  overflow: hidden;
  transition: transform .25s ease, border-color .25s ease, background .25s ease, box-shadow .25s ease;
}
.ind-card::before {
  content: attr(data-num);
  position: absolute;
  top: 18px;
  right: 24px;
  font-family: var(--font-mono);
  font-size: 84px;
  font-weight: 300;
  color: var(--line);
  line-height: 1;
  transition: color .25s;
}
.ind-card:hover {
  transform: translateY(-6px);
  border-color: var(--text);
  box-shadow: 0 30px 50px -25px rgba(10, 14, 39, 0.18);
}
.ind-card:hover::before { color: var(--accent); }
.ind-icon {
  width: 52px; height: 52px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-3);
  display: grid; place-items: center;
  margin-bottom: 32px;
  position: relative;
  z-index: 1;
}
.ind-card h3 {
  margin: 0 0 12px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.018em;
  color: var(--text);
  position: relative;
  z-index: 1;
}
.ind-card p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
  position: relative;
  z-index: 1;
}

/* ---------- why (manifesto, light) ---------- */
.why { padding-block: clamp(110px, 13vw, 180px); }
.why-list { display: flex; flex-direction: column; }
.why-item {
  display: grid;
  grid-template-columns: minmax(120px, 0.4fr) minmax(0, 1fr) minmax(0, 2.2fr);
  gap: 30px;
  align-items: baseline;
  padding: 44px 6px;
  border-top: 1px solid var(--line);
  transition: padding-left .25s ease, background .25s ease;
}
.why-item:last-child { border-bottom: 1px solid var(--line); }
.why-item:hover { padding-left: 24px; background: linear-gradient(90deg, var(--accent-soft), transparent 50%); }
.why-num {
  font-family: var(--font-mono);
  font-size: clamp(40px, 5vw, 72px);
  font-weight: 300;
  color: var(--accent-3);
  line-height: 1;
  letter-spacing: -0.02em;
}
.why-item h3 {
  margin: 0;
  font-size: clamp(20px, 2.2vw, 30px);
  font-weight: 700;
  letter-spacing: -0.022em;
  color: var(--text);
}
.why-item p {
  margin: 0;
  font-size: 15px;
  color: var(--muted);
  line-height: 1.6;
  max-width: 52ch;
}

/* ---------- process (cream zebra, big numbers) ---------- */
.process {
  padding-block: clamp(110px, 13vw, 180px);
  background: var(--bg-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.process-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  position: relative;
}
.process-steps::before {
  content: "";
  position: absolute;
  top: 64px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-strong) 12%, var(--line-strong) 88%, transparent);
}
.process-steps li {
  position: relative;
  padding: 28px 20px 0;
}
.ps-num {
  font-family: var(--font-mono);
  font-size: clamp(56px, 6.4vw, 100px);
  font-weight: 300;
  color: var(--accent-3);
  line-height: 1;
  letter-spacing: -0.04em;
  display: block;
  margin-bottom: 28px;
  position: relative;
}
.ps-num::after {
  content: "";
  position: absolute;
  bottom: -18px;
  left: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg-2);
  border: 2px solid var(--accent);
  z-index: 1;
}
.process-steps h3 {
  margin: 16px 0 10px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text);
}
.process-steps p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.55;
}

/* ---------- works (full-width alternating, light) ---------- */
.works-cases { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 20px; }
.case-row {
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  transition: border-color .2s, transform .2s;
}
.case-row:hover { border-color: var(--accent); transform: translateY(-3px); }
.case-row--reverse .case-img { order: 0; }   /* neutralize old reverse */
.case-img {
  background: var(--bg-2);
  border: 1px solid var(--line);
  padding: 12px;
  border-radius: var(--radius);
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.case-img img { width: 100%; height: 100%; object-fit: contain; border-radius: 6px; }
.case-content { padding: 0; }
.case-content .eyebrow { margin-bottom: 8px; font-size: 11px; }
.case-content h3 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--text);
}
.case-content > p {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
  max-width: 100%;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.case-metrics {
  display: flex;
  gap: 0;
  border-top: 1px solid var(--line);
  padding-top: 12px;
  max-width: 100%;
}
.case-metrics > div {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-right: 10px;
}
.case-metrics > div + div { padding-left: 10px; border-left: 1px solid var(--line); }
.case-metrics strong {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
  letter-spacing: -0.02em;
}
.case-metrics strong::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: 50%;
  margin-right: 10px;
  vertical-align: middle;
  transform: translateY(-4px);
}
.case-metrics span {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--muted);
  line-height: 1.2;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ---------- org chart (light) ---------- */
.org { padding-block: clamp(110px, 13vw, 180px); }
.org-chart { max-width: 1140px; margin: 0 auto; }
.org-root {
  display: flex;
  justify-content: center;
  margin-bottom: 56px;
  position: relative;
}
.org-root::after {
  content: "";
  position: absolute;
  bottom: -56px;
  left: 50%;
  width: 1px;
  height: 56px;
  background: var(--line-strong);
}
.org-units {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  position: relative;
}
.org-units::before {
  content: "";
  position: absolute;
  top: 0;
  left: calc(100% / 6);
  right: calc(100% / 6);
  height: 1px;
  background: var(--line-strong);
}
.org-unit {
  position: relative;
  padding-top: 36px;
  display: flex;
  flex-direction: column;
}
.org-unit::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 1px;
  height: 36px;
  background: var(--line-strong);
}
.org-node {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  position: relative;
  transition: transform .25s, border-color .25s, box-shadow .25s;
}
.org-node:hover { transform: translateY(-3px); border-color: var(--text); box-shadow: 0 20px 40px -25px rgba(10,14,39,0.18); }
.org-node--group {
  background: var(--text);
  color: var(--text-d);
  border-color: var(--text);
  padding: 36px 56px;
  min-width: 300px;
  box-shadow: 0 30px 60px -25px rgba(10, 14, 39, 0.3);
}
.org-node--accent {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 20px 40px -25px rgba(37, 99, 235, 0.5);
}
.org-node--accent .org-node-label { color: var(--ink-on-accent); }
.org-node--accent .org-node-sub { color: rgba(10,14,39,0.7); }
.org-node--archived {
  opacity: 0.55;
  border-style: dashed;
  background: transparent;
}
.org-node-label {
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.015em;
}
.org-node--group .org-node-label {
  font-size: 24px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.org-node-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.org-node--group .org-node-sub { color: var(--muted-d); }
.org-badge {
  position: absolute;
  top: -12px;
  right: 14px;
  background: var(--text);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 999px;
}
.org-leaves {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}
.org-leaves li {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.org-node--accent + .org-leaves li {
  background: var(--surface);
}
.org-leaves li.muted-li { opacity: 0.55; text-decoration: line-through; }

/* ---------- team (cream + white cards) ---------- */
.team {
  padding-block: clamp(110px, 13vw, 180px);
  background: var(--bg-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.team-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}
.team-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  text-align: left;
  transition: border-color .25s, transform .25s, box-shadow .25s;
}
.team-card:hover {
  border-color: var(--text);
  transform: translateY(-4px);
  box-shadow: 0 30px 50px -25px rgba(10,14,39,0.18);
}
.team-card img {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  margin: 0 0 24px;
  display: block;
  background: var(--bg-2);
  border: 1px solid var(--line);
}
.team-card h3 {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text);
}
.team-card p {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

/* ---------- testimonials (light, white cards) ---------- */
.testimonials { padding-block: clamp(110px, 13vw, 180px); }
.testi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}
.testi-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin: 0;
  position: relative;
  transition: border-color .25s, transform .25s, box-shadow .25s;
}
.testi-card:hover {
  border-color: var(--text);
  transform: translateY(-4px);
  box-shadow: 0 30px 50px -25px rgba(10,14,39,0.18);
}
.testi-card::before {
  content: "“";
  position: absolute;
  top: 14px;
  left: 36px;
  font-family: Georgia, serif;
  font-size: 160px;
  line-height: 1;
  color: var(--accent);
  opacity: 0.7;
}
.testi-card blockquote {
  margin: 0 0 32px;
  padding-top: 60px;
  font-size: clamp(18px, 1.5vw, 24px);
  line-height: 1.5;
  color: var(--text);
  font-weight: 500;
  letter-spacing: -0.008em;
}
.testi-card figcaption {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}
.testi-card figcaption strong {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.005em;
  color: var(--text);
}
.testi-card figcaption .muted {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
}

/* ---------- contact (cream, white form) ---------- */
.contact {
  padding-block: clamp(110px, 13vw, 180px);
  background: var(--bg-2);
  border-top: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 110px);
  align-items: start;
  position: relative;
}
.contact-copy h2 { margin-bottom: 14px; font-size: clamp(26px, 3.4vw, 44px); }
.contact-copy .muted { margin-top: 12px; max-width: 50ch; font-size: 14px; }
.contact-points {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 20px 0 0;
}
.contact-points li {
  position: relative;
  padding-left: 32px;
  font-size: 13px;
  color: var(--text);
}
.contact-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 20px;
  height: 1px;
  background: var(--accent-3);
}
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 30px 60px -30px rgba(10,14,39,0.15);
}
.contact-form label { gap: 6px; font-size: 11px; }
.contact-form input,
.contact-form select,
.contact-form textarea { padding: 10px 12px; font-size: 14px; }
.contact-form textarea { min-height: 50px; }
.contact-form .btn { margin-top: 4px; }
.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.contact-form input,
.contact-form select,
.contact-form textarea {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  color: var(--text);
  padding: 12px 0;
  border-radius: 0;
  font: inherit;
  font-family: var(--font);
  font-size: 16px;
  outline: none;
  transition: border-color .2s;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: var(--muted-2); }
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  border-bottom-color: var(--text);
}
.contact-form textarea { resize: vertical; min-height: 110px; }
.contact-form button[type="submit"] { align-self: flex-start; margin-top: 16px; }
.form-note {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent-3);
  letter-spacing: 0.04em;
}

/* ---------- footer (DARK statement) ---------- */
.footer {
  padding-top: 60px;
  padding-bottom: 32px;
  position: relative;
  min-height: calc(100dvh - 80px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.footer > .container { width: 100%; }
.footer-hero {
  font-weight: 800;
  font-size: clamp(44px, 7vw, 108px);
  line-height: 1.02;
  letter-spacing: -0.038em;
  margin: 0 0 64px;
  max-width: 14ch;
  color: var(--text-d);
}
.footer-hero .accent { color: var(--accent); }
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: 48px;
  padding-block: 56px;
  border-top: 1px solid var(--line-d);
  border-bottom: 1px solid var(--line-d);
}
.footer-brand .brand { margin-bottom: 18px; align-items: center; gap: 8px; }
.footer-brand { text-align: center; }
.footer-brand .brand-icon { height: 96px; }
.footer-brand .brand-mark { font-size: 36px; }
.footer-brand .muted { max-width: 38ch; font-size: 14px; line-height: 1.55; color: var(--muted-d); }
.footer-col h4 {
  margin: 0 0 18px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted-d);
}
.footer-col a {
  display: block;
  font-size: 15px;
  color: var(--text-d);
  opacity: 0.85;
  padding: 5px 0;
  transition: color .15s, opacity .15s, transform .15s;
}
.footer-col a:hover { color: var(--accent); opacity: 1; transform: translateX(3px); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 28px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted-d);
  letter-spacing: 0.06em;
}

/* ============================================================
   RESPONSIVE
   Strategy: desktop-first. Width breakpoints first, then height.
   - Width: ≤1100 (laptop) · ≤900 (tablet/mobile-landscape) · ≤640 (mobile)
   - Height: ≤820 (laptop chrome eats vertical) · ≤680 (short) · ≤520 (very short)
   The hero + page-hero are the most viewport-sensitive blocks: every
   breakpoint touches their padding / type / min-height accordingly.
   ============================================================ */

/* ----- ≤1100px (laptop / tablet landscape) ----------------- */
@media (max-width: 1100px) {
  .ind-grid       { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .process-steps  { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
  .process-steps::before { display: none; }
  .team-grid      { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .services-list li {
    grid-template-columns: 60px 48px minmax(0, 1.2fr) 40px;
    gap: 18px;
  }
  .svc-desc  { grid-column: 3 / 5; padding-top: 6px; font-size: 14px; }
  .svc-arrow { grid-column: 4 / 5; grid-row: 1; }
}

/* ----- ≤900px (tablet portrait / mobile landscape) --------- */
@media (max-width: 900px) {
  /* nav becomes a drawer */
  .nav, .topbar-cta { display: none; }
  .menu-toggle      { display: grid; place-items: center; }
  .topbar.is-open .nav {
    display: flex; flex-direction: column;
    position: absolute; top: 80px; left: 0; right: 0;
    background: var(--bg);
    padding: 22px var(--pad);
    border-bottom: 1px solid var(--line);
    gap: 14px;
  }
  .topbar.is-open .topbar-cta { display: inline-flex; margin-top: 12px; }

  /* hero (home) — single column already, just tighten padding */
  .hero            { padding-block: 96px 56px; }
  .hero .hero-copy { max-width: 100%; }
  .display         { font-size: clamp(30px, 5.6vw, 56px); line-height: 1.06; }
  .hero .hero-copy .eyebrow    { margin-bottom: 16px; }
  .hero .hero-copy .display    { margin-bottom: 20px; }
  .hero .hero-copy .lead       { margin-bottom: 24px; font-size: 15px; }
  .hero .hero-copy .hero-cta   { margin-bottom: 28px; }
  .hero-cta .btn   { padding: 14px 22px; font-size: 13px; }
  .hero-stats      { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 0; margin-top: 24px; padding-top: 16px; }
  .hero-stats li:nth-child(2n+1) { padding-left: 0; border-left: 0; }
  .hero-stats li:nth-child(2)    { border-left: 0; padding-left: 0; }

  /* page-hero (subpages) */
  .page-hero            { padding-block: 80px 56px; }
  .page-hero-title      { font-size: clamp(28px, 5.4vw, 48px); max-width: 100%; line-height: 1.08; }
  .page-hero-lead       { font-size: 15px; margin-bottom: 22px; }
  .page-hero-scroll     { display: none; }

  /* layout collapses */
  .logos-inner   { grid-template-columns: 1fr; gap: 24px; }
  .why-item {
    grid-template-columns: 80px 1fr;
    grid-template-rows: auto auto;
    gap: 16px 22px;
  }
  .why-num             { grid-row: 1 / 3; }
  .why-item p          { grid-column: 2 / 3; }
  .case-row            { grid-template-columns: 1fr; }
  .case-row--reverse .case-img { order: 0; }
  .org-units           { grid-template-columns: 1fr; gap: 28px; }
  .org-units::before   { display: none; }
  .org-unit::before    { display: none; }
  .org-root            { margin-bottom: 24px; }
  .org-root::after     { display: none; }
  .testi-grid          { grid-template-columns: 1fr; }
  .contact-grid        { grid-template-columns: 1fr; }
  .home-cta .container { grid-template-columns: 1fr; gap: 32px; }
  .footer-grid         { grid-template-columns: 1fr 1fr; }
  .footer-brand        { grid-column: 1 / -1; }
  .section-num         { display: none; }
}

/* ----- ≤640px (mobile portrait) ---------------------------- */
@media (max-width: 640px) {
  /* hero: aggressively compressed */
  .hero            { padding-block: 88px 40px; }
  .display         { font-size: clamp(26px, 7vw, 36px); line-height: 1.12; letter-spacing: -0.02em; }
  .hero .hero-copy .eyebrow    { margin-bottom: 14px; }
  .hero .hero-copy .display    { margin-bottom: 16px; }
  .hero .hero-copy .lead       { margin-bottom: 20px; font-size: 14px; line-height: 1.5; }
  .hero .hero-copy .hero-cta   { margin-bottom: 24px; }
  .hero-cta        { gap: 8px; }
  .hero-cta .btn   { padding: 12px 18px; font-size: 12px; }
  .hero-stats      { grid-template-columns: 1fr 1fr; gap: 10px 0; padding-top: 14px; max-width: 100%; }
  .hs-num          { font-size: 22px; }
  .hs-label        { font-size: 10px; }

  /* page-hero compressed */
  .page-hero          { padding-block: 64px 40px; }
  .page-hero-eyebrow  { font-size: 11px; margin-bottom: 14px; }
  .page-hero-title    { font-size: clamp(24px, 6.4vw, 32px); line-height: 1.12; margin-bottom: 16px; }
  .page-hero-lead     { font-size: 14px; margin-bottom: 20px; }
  .page-hero-actions  { gap: 10px; }
  .page-hero-actions .btn { padding: 12px 18px; font-size: 12px; }

  /* layout */
  .ind-grid       { grid-template-columns: 1fr; }
  .process-steps  { grid-template-columns: 1fr; }
  .team-grid      { grid-template-columns: 1fr 1fr; }
  .footer-grid    { grid-template-columns: 1fr; }
  .footer-bottom  { flex-direction: column; align-items: flex-start; gap: 8px; }
  .testi-card     { padding: 36px; }
  .contact-form   { padding: 28px; }
  .home-cta-aside { padding: 24px; }
  .services-list li {
    grid-template-columns: 50px 1fr 40px;
    grid-template-rows: auto auto;
    gap: 12px 14px;
    padding: 28px 6px;
  }
  .svc-num   { grid-column: 1 / 2; }
  .svc-icon  { display: none; }
  .svc-title { grid-column: 2 / 3; font-size: 19px; }
  .svc-desc  { grid-column: 1 / 4; padding-top: 0; font-size: 14px; }
  .svc-arrow { grid-column: 3 / 4; grid-row: 1; width: 40px; height: 40px; }
}

/* ============================================================
   HEIGHT BREAKPOINTS — when vertical room is the constraint.
   Most laptops have only ~600-680px visible after browser chrome
   on a 768-tall screen, so 820 / 680 / 520 cover the realistic cases.
   ============================================================ */

/* ----- ≤900px tall (covers most laptops with browser chrome) -
   1366×768 ⇒ viewport visible ~668. 1920×1080 with bookmarks ⇒ ~880.
   This breakpoint catches both. */
@media (max-height: 900px) {
  .hero       { padding-block: 40px 112px; }  /* less top, big bottom to clear the scroll arrow */
  .page-hero  { padding-block: 40px 112px; }
  .display    { font-size: clamp(24px, 3.4vw, 46px); line-height: 1.06; }
  .page-hero-title { font-size: clamp(26px, 4vw, 52px); }
  .hero .hero-copy .eyebrow    { margin-bottom: 14px; }
  .hero .hero-copy .display    { margin-bottom: 16px; }
  .hero .hero-copy .lead       { margin-bottom: 20px; }
  .hero .hero-copy .hero-cta   { margin-bottom: 24px; }
  .hero-stats { padding-top: 12px; }
  .page-hero-eyebrow  { margin-bottom: 14px; }
  .page-hero-lead     { margin-bottom: 22px; }
}

/* ----- ≤680px tall (very short — landscape phones, ultra-thin) */
@media (max-height: 680px) {
  /* drop 100dvh — let content determine height */
  .hero, .page-hero       { min-height: auto; }
  .hero       { padding-block: 88px 32px; }   /* keep topbar offset */
  .page-hero  { padding-block: 80px 28px; }
  .hero-scroll, .page-hero-scroll { display: none; }
  .display    { font-size: clamp(24px, 3.6vw, 44px); }
  .page-hero-title { font-size: clamp(24px, 3.8vw, 44px); }
  .hero .hero-copy .lead     { margin-bottom: 18px; }
  .hero .hero-copy .hero-cta { margin-bottom: 20px; }
}

/* ----- ≤520px tall (landscape phone) ----------------------- */
@media (max-height: 520px) {
  .hero       { padding-block: 80px 24px; }
  .page-hero  { padding-block: 72px 20px; }
  .display    { font-size: clamp(22px, 3.2vw, 36px); }
  .page-hero-title { font-size: clamp(22px, 3.4vw, 36px); }
  .hero-stats { display: none; }
  .hero .hero-copy .lead, .page-hero-lead { margin-bottom: 14px; }
}

/* =========================================================
   V6 MULTIPAGE additions — subpage hero, nav active states,
   home CTA block, page-specific tweaks.
   ========================================================= */

/* Nav active state per page (body[data-page] + a[data-page-link]) */
.nav a[data-page-link] {
  position: relative;
  padding-block: 6px;
}
body[data-page="home"]       .nav a[data-page-link="home"],
body[data-page="services"]   .nav a[data-page-link="services"],
body[data-page="industries"] .nav a[data-page-link="industries"],
body[data-page="work"]       .nav a[data-page-link="work"],
body[data-page="about"]      .nav a[data-page-link="about"],
body[data-page="contact"]    .nav a[data-page-link="contact"] {
  color: var(--accent);
  opacity: 1;
  font-weight: 700;
}
body[data-page="home"]       .nav a[data-page-link="home"]::after,
body[data-page="services"]   .nav a[data-page-link="services"]::after,
body[data-page="industries"] .nav a[data-page-link="industries"]::after,
body[data-page="work"]       .nav a[data-page-link="work"]::after,
body[data-page="about"]      .nav a[data-page-link="about"]::after,
body[data-page="contact"]    .nav a[data-page-link="contact"]::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}

/* ---------- page-hero (subpages, DARK statement) ----------
   Same block layout as .hero, no flex tricks. */
.page-hero {
  position: relative;
  min-height: calc(100dvh - 80px);   /* 80 = topbar height */
  padding-block: clamp(48px, 4vw, 72px) clamp(104px, 8vw, 132px);
  /* mirrors .hero: tight top, generous bottom to leave room for the absolute scroll arrow */
  overflow: hidden;
  isolation: isolate;
  text-align: center;
}
.page-hero > .container { width: 100%; max-width: 1100px; margin: 0 auto; }
.page-hero.is-dark::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 900px 460px at 8% 110%, rgba(37, 99, 235, 0.18), transparent 70%),
    radial-gradient(ellipse 700px 420px at 100% -10%, rgba(124, 90, 255, 0.10), transparent 70%);
  z-index: -1;
}
.page-hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin: 0 0 16px;
  display: inline-flex; align-items: center; gap: 10px;
}
.page-hero-eyebrow::before,
.page-hero-eyebrow::after {
  content: ""; width: 28px; height: 1px;
  background: currentColor; opacity: 0.8;
}
.page-hero-title {
  font-weight: 800;
  font-size: clamp(34px, 5vw, 76px);
  line-height: 1.04;
  letter-spacing: -0.028em;
  margin: 0 auto 20px;
  color: var(--text-d);
  max-width: 22ch;
}
.page-hero-title .accent { color: var(--accent); }
.page-hero-lead {
  font-size: clamp(16px, 1.3vw, 19px);
  line-height: 1.55;
  color: var(--muted-d);
  max-width: 60ch;
  margin: 0 auto 28px;
}
.page-hero-actions { display: inline-flex; flex-wrap: wrap; gap: 16px; justify-content: center; }
.page-hero-scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--muted-d);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-decoration: none;
}
.page-hero-scroll .arrow-circle {
  width: 44px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line-d-strong);
  display: grid; place-items: center;
  color: var(--accent);
  animation: scrollBounce 2.2s ease-in-out infinite;
}
@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(6px); }
}
.page-hero-scroll:hover .arrow-circle {
  border-color: var(--accent);
  background: rgba(37, 99, 235, 0.10);
  animation-play-state: paused;
}

/* ---------- section-scroll (reusable inter-section chevron) ---------- */
.section-scroll-wrap {
  position: absolute;
  left: 50%;
  bottom: 56px;
  transform: translateX(-50%);
  display: flex;
  justify-content: center;
}
.section-scroll {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color .2s ease;
}
.section-scroll:hover { color: var(--accent); }
.section-scroll .arrow-circle {
  width: 44px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: grid; place-items: center;
  color: var(--accent);
  animation: scrollBounce 2.2s ease-in-out infinite;
  transition: border-color .2s ease, background .2s ease;
}
.section-scroll:hover .arrow-circle {
  border-color: var(--accent);
  background: rgba(37, 99, 235, 0.08);
  animation-play-state: paused;
}
.is-dark .section-scroll { color: var(--muted-d); }
.is-dark .section-scroll .arrow-circle { border-color: var(--line-d-strong); }
@media (max-height: 680px) {
  .section-scroll-wrap { margin-top: 28px; }
  .section-scroll { display: none; }
}

/* ---------- home CTA strip ---------- */
.home-cta {
  padding-block: clamp(28px, 3vw, 48px) clamp(96px, 8vw, 128px);
  min-height: calc(100dvh - 80px);
  position: relative;
  background: var(--surface-2);
  border-block: 1px solid var(--line);
}
.home-cta .container {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 60px;
  align-items: center;
}
.home-cta h2 {
  font-weight: 800;
  font-size: clamp(28px, 3.6vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 0 0 18px;
  color: var(--text);
}
.home-cta p { color: var(--muted); margin: 0 0 28px; max-width: 50ch; }
.home-cta-actions { display: inline-flex; flex-wrap: wrap; gap: 14px; }
.home-cta-aside {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: grid;
  gap: 22px;
}
.home-cta-aside li {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 14px;
  align-items: start;
}
.home-cta-aside .cta-num {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.06em;
  padding-top: 3px;
}
.home-cta-aside strong { display: block; font-weight: 700; margin-bottom: 2px; color: var(--text); }
.home-cta-aside span.muted { font-size: 14px; line-height: 1.5; display: block; }

/* tighter section padding on subpages so first section after page-hero breathes */
.subpage main > section:not(.page-hero) {
  padding-block: clamp(28px, 3vw, 48px) clamp(96px, 8vw, 128px);  /* extra bottom for the absolute scroll arrow */
  min-height: calc(100dvh - 80px);
  position: relative;
}

/* about page wider org-chart */
body[data-page="about"] .org-chart { margin-top: 0; }

/* ============================================================
   TRUST + DISTINCT (home, second viewport)
   Combines logos marquee + "Lo que nos hace distintos" in one
   100dvh block. Trust title centered above marquee. Distinct
   shows the 6 differentiators in a compact 3×2 grid that fits.
   ============================================================ */
.trust-distinct {
  position: relative;
  min-height: calc(100dvh - 80px);
  padding-block: 24px clamp(96px, 8vw, 128px);
  background: var(--bg);
  border-block: 1px solid var(--line);
}
.trust-distinct > .container {
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 2.5vh, 32px);
}

/* --- Trust block (logos) --- */
.td-trust { text-align: center; }
.td-trust-title {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 22px;
}
.td-trust .logos-marquee {
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent);
}
.td-trust .logos-track {
  display: flex;
  gap: 56px;
  align-items: center;
  animation: marqueeScroll 40s linear infinite;
  width: max-content;
}
.td-trust .logos-track img { height: 24px; opacity: 0.75; }
@keyframes marqueeScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* --- Distinct block --- */
.td-distinct { display: flex; flex-direction: column; gap: 32px; }
.td-distinct-head { text-align: center; }
.td-distinct-head .eyebrow {
  margin: 0 auto 14px;
  display: inline-flex;
}
.td-distinct-head .eyebrow::before { display: none; }     /* no left-dash in centered head */
.td-distinct-title {
  font-weight: 800;
  font-size: clamp(28px, 3.6vw, 48px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 0;
  color: var(--text);
}

.td-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.td-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color .2s ease, transform .2s ease;
}
.td-card:hover { border-color: var(--accent); transform: translateY(-2px); }

/* Accordion scaffolding (HTML-only on desktop, fully active on ≤700px).
   In desktop the <button> wrapper and the panel <div> use display:contents
   so they vanish from layout — their children (num, h3, p) flow as direct
   children of .td-card and the visual stays identical to the pre-accordion
   version. The +/− icon is hidden. The mobile override later in this file
   reactivates everything as a real collapsible. */
.td-card-toggle {
  display: contents;
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: default;
}
.td-card-panel { display: contents; }
.td-card-icon  { display: none; }

.td-num {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--accent);
}
.td-card h3 {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--text);
}
.td-card p {
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
  margin: 0;
}

/* ----- trust-distinct responsive ----- */
@media (max-width: 1100px) {
  .td-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .td-card { padding: 20px 18px 18px; }
}
@media (max-width: 900px) {
  .trust-distinct { min-height: auto; padding-block: 0 56px; }
  .trust-distinct > .container { gap: 36px; }
  .trust-distinct .td-trust { padding-top: 24px; }
  .td-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .td-distinct-title { font-size: clamp(26px, 4vw, 36px); }
}
@media (max-width: 640px) {
  .trust-distinct { padding-block: 0 40px; }
  .trust-distinct .td-trust { padding-top: 20px; }
  .td-grid { grid-template-columns: 1fr; gap: 12px; }
  .td-card { padding: 18px; }
}
@media (max-height: 900px) {
  .trust-distinct { padding-block: 0 48px; }
  .trust-distinct .td-trust { padding-top: 16px; }
  .trust-distinct > .container { gap: 28px; }
  .td-card { padding: 18px 18px 16px; }
  .td-card h3 { font-size: 16px; }
  .td-card p { font-size: 13px; }
}

/* =========================================================
   BLOG · listing + reader + editor
   ========================================================= */

/* ----- listing (blog.html) ----- */
.blog-list {
  padding-block: clamp(48px, 6vw, 96px);
  background: var(--bg);
}
.blog-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  margin-bottom: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--accent-soft);
}
.blog-actions-user {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text);
}
.blog-actions-user strong {
  font-weight: 700;
  color: var(--accent-3);
}
.blog-actions-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18);
}
.blog-actions-buttons {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}
.blog-actions .btn {
  padding: 8px 16px;
  font-size: 13px;
}

/* ----- toast (session-closed feedback, future generic) ----- */
.blog-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  padding: 12px 20px;
  background: var(--text);
  color: var(--bg);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.22);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .18s ease, transform .18s ease;
  pointer-events: none;
}
.blog-toast.is-visible { opacity: 1; transform: translateY(0); }
.post-actions {
  margin-bottom: 28px;
}
.post-actions .post-delete-btn {
  color: #B91C1C;
  border-color: rgba(185, 28, 28, 0.4);
}
.post-actions .post-delete-btn:hover {
  background: #FEE2E2;
  border-color: #B91C1C;
}
.blog-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: clamp(24px, 3vw, 48px);
}
.blog-toolbar-editor {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  padding: 6px 0;
  transition: color .15s ease;
  margin-left: auto;
}
.blog-toolbar-editor:hover { color: var(--accent); }
.blog-toolbar-title {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}
.blog-tags-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.blog-tag-chip {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: var(--surface);
  cursor: pointer;
  transition: all .15s ease;
}
.blog-tag-chip:hover { border-color: var(--accent); color: var(--accent); }
.blog-tag-chip.is-active {
  background: var(--accent);
  color: var(--ink-on-accent);
  border-color: var(--accent);
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.blog-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.blog-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(10, 14, 39, 0.08);
}
.blog-card-cover {
  aspect-ratio: 16 / 9;
  background: var(--surface-2);
  overflow: hidden;
  position: relative;
}
.blog-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}
.blog-card:hover .blog-card-cover img { transform: scale(1.03); }
.blog-card-cover.is-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent-soft), var(--surface-2));
  color: var(--accent-3);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.blog-card-body {
  padding: 22px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}
.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.blog-card-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--muted-2); }
.blog-card-title {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.012em;
  color: var(--text);
  margin: 0;
}
.blog-card:hover .blog-card-title { color: var(--accent); }
.blog-card-excerpt {
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
  margin: 0;
}
.blog-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 8px;
}
.blog-card-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-3);
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
}

.blog-empty {
  padding: 64px 24px;
  text-align: center;
  color: var(--muted);
  font-size: 16px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
}

/* ----- post reader (blog/post.html) ----- */
.post-shell {
  padding-block: clamp(48px, 6vw, 96px);
  background: var(--bg);
}
.post-shell .container { max-width: 820px; }
.post-head { margin-bottom: clamp(32px, 4vw, 56px); }
.post-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 28px;
  transition: color .15s ease;
}
.post-back:hover { color: var(--accent); }
.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}
.post-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--muted-2); }
.post-title {
  font-size: clamp(32px, 4.4vw, 56px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.022em;
  color: var(--text);
  margin: 0 0 20px;
}
.post-excerpt {
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.55;
  color: var(--muted);
  margin: 0 0 28px;
}
.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 32px;
}
.post-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-3);
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
}
.post-cover {
  aspect-ratio: 16 / 8;
  background: var(--surface-2);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: clamp(32px, 4vw, 56px);
}
.post-cover img { width: 100%; height: 100%; object-fit: cover; }

.post-body {
  font-size: 17px;
  line-height: 1.75;
  color: var(--text-soft);
}
.post-body > * + * { margin-top: 1.2em; }
.post-body h1, .post-body h2, .post-body h3, .post-body h4 {
  color: var(--text);
  font-weight: 700;
  letter-spacing: -0.012em;
  line-height: 1.25;
  margin-top: 1.8em;
}
.post-body h1 { font-size: clamp(28px, 3.4vw, 40px); }
.post-body h2 { font-size: clamp(24px, 2.8vw, 32px); }
.post-body h3 { font-size: clamp(20px, 2.2vw, 24px); }
.post-body h4 { font-size: 18px; }
.post-body p { margin: 0; }
.post-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.post-body a:hover { color: var(--accent-3); }
.post-body blockquote {
  border-left: 3px solid var(--accent);
  padding: 4px 0 4px 20px;
  margin-inline: 0;
  font-style: italic;
  color: var(--text);
}
.post-body code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--surface-2);
  padding: 2px 6px;
  border-radius: 4px;
}
.post-body pre {
  font-family: var(--font-mono);
  font-size: 14px;
  background: var(--bg-d);
  color: var(--text-d);
  padding: 20px 24px;
  border-radius: var(--radius);
  overflow-x: auto;
  line-height: 1.55;
}
.post-body pre code { background: transparent; padding: 0; color: inherit; }
.post-body ul, .post-body ol { padding-left: 1.6em; }
.post-body ul li, .post-body ol li { margin-bottom: 0.4em; }
.post-body ul { list-style: disc; }
.post-body ol { list-style: decimal; }
.post-body img {
  max-width: 100%;
  border-radius: var(--radius);
  margin-block: 1.2em;
}
.post-body table { width: 100%; border-collapse: collapse; }
.post-body th, .post-body td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.post-body th { font-weight: 700; color: var(--text); }

.post-not-found {
  text-align: center;
  padding: 80px 24px;
  color: var(--muted);
}

/* ----- editor (blog/nuevo.html) ----- */
.editor-shell {
  padding-block: clamp(40px, 5vw, 72px);
  background: var(--bg);
}
.editor-shell .container { max-width: 980px; }
.editor-head { margin-bottom: 32px; }
.editor-head h1 {
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 800;
  letter-spacing: -0.018em;
  margin: 0 0 8px;
  color: var(--text);
}
.editor-head p { color: var(--muted); margin: 0; }
.editor-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.editor-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.editor-field { display: flex; flex-direction: column; gap: 6px; }
.editor-field label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.editor-field input,
.editor-field textarea,
.editor-field select {
  font: inherit;
  font-size: 15px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 11px 14px;
  outline: none;
  transition: border-color .15s ease;
}
.editor-field input:focus,
.editor-field textarea:focus,
.editor-field select:focus { border-color: var(--accent); }
.editor-field textarea { resize: vertical; min-height: 72px; }
.editor-field .hint {
  font-size: 12px;
  color: var(--muted-2);
  margin: 0;
}
.editor-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 8px;
}
.editor-status {
  flex: 1;
  font-size: 14px;
  color: var(--muted);
}
.editor-status.is-success { color: #15803D; }
.editor-status.is-error { color: #B91C1C; }
.token-prompt {
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 24px;
  font-size: 14px;
  color: var(--text);
}
.token-prompt strong { color: var(--accent-3); }
.token-prompt code {
  font-family: var(--font-mono);
  font-size: 13px;
  background: rgba(255, 255, 255, 0.6);
  padding: 1px 6px;
  border-radius: 3px;
}

/* ----- cover dropzone (editor) ----- */
.cover-dropzone {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 160px;
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
  overflow: hidden;
}
/* Force-hide children that use the boolean [hidden] attribute, because our
   display:flex declarations below would otherwise win over the UA default. */
.cover-dropzone [hidden] { display: none !important; }
.cover-dropzone:hover,
.cover-dropzone:focus-visible {
  border-color: var(--accent);
  background: var(--accent-soft);
  outline: none;
}
.cover-dropzone.is-dragover {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.cover-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  padding: 20px;
  text-align: center;
  pointer-events: none;
}
.cover-empty svg { color: var(--muted); }
.cover-empty-title {
  margin: 0;
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
}
.cover-empty-hint {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.cover-preview {
  position: relative;
  width: 100%;
  cursor: default;
}
.cover-preview img {
  display: block;
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  background: var(--surface-2);
}
.cover-preview-actions {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  gap: 6px;
}
.cover-btn {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: all .15s ease;
}
.cover-btn:hover { border-color: var(--accent); color: var(--accent); }
.cover-btn-danger:hover { border-color: #B91C1C; color: #B91C1C; }
.cover-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.cover-spinner {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.25);
  border-top-color: #fff;
  animation: coverSpin .8s linear infinite;
}
@keyframes coverSpin {
  to { transform: rotate(360deg); }
}
.cover-status {
  margin: 6px 0 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
  min-height: 16px;
}
.cover-status.is-success { color: #047857; }
.cover-status.is-error { color: #B91C1C; }
.cover-url-fallback {
  margin-top: 10px;
  font-size: 13px;
}
.cover-url-fallback summary {
  cursor: pointer;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  user-select: none;
}
.cover-url-fallback summary:hover { color: var(--accent); }
.cover-url-fallback input { margin-top: 8px; }

/* ----- blog responsive ----- */
@media (max-width: 1100px) {
  .blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
}
@media (max-width: 700px) {
  .blog-grid { grid-template-columns: 1fr; gap: 18px; }
  .blog-card-body { padding: 18px 18px 20px; }
  .blog-card-title { font-size: 18px; }
  .editor-row { grid-template-columns: 1fr; gap: 16px; }
  .editor-actions { flex-direction: column; align-items: stretch; }
  .editor-actions .btn { width: 100%; }

  /* blog-actions + post-actions: stack vertical, full-width buttons */
  .blog-actions,
  .post-actions {
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    gap: 12px;
  }
  .blog-actions-user {
    justify-content: flex-start;
    font-size: 12px;
    word-break: break-all;
  }
  .blog-actions-buttons {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-left: 0;
    gap: 8px;
  }
  .blog-actions .btn,
  .post-actions .btn {
    width: 100%;
    text-align: center;
    padding: 10px 16px;
    font-size: 14px;
    justify-content: center;
  }

  /* blog-toolbar: centered title + chips so it does not look misaligned */
  .blog-toolbar {
    justify-content: flex-start;
    gap: 12px;
  }
  .blog-toolbar-title {
    width: 100%;
  }
  .blog-tags-filter {
    width: 100%;
  }

  /* blog-toast: centered, capped to viewport */
  .blog-toast {
    left: 50%;
    right: auto;
    bottom: 18px;
    max-width: calc(100vw - 32px);
    text-align: center;
    transform: translateX(-50%) translateY(8px);
  }
  .blog-toast.is-visible {
    transform: translateX(-50%) translateY(0);
  }

  /* cover preview action buttons: tighter on small screens */
  .cover-preview-actions { top: 8px; right: 8px; gap: 4px; }
  .cover-btn { padding: 5px 10px; font-size: 10px; }
}

/* =========================================================
   MOBILE PORTRAIT OVERRIDES (≤700px wide)
   Placed at the very end so they outweight any later non-MQ rules
   from the V6 block (e.g. .page-hero-scroll display:inline-flex,
   .brand layout). Each rule scoped to one component, never global. */
@media (max-width: 700px) {
  /* Topbar brand: lay out icon + wordmark in a row, smaller icon, so the
     mark does not visually drop out the bottom of the 80px topbar. */
  .topbar .brand {
    flex-direction: row;
    align-items: center;
    gap: 8px;
  }
  .topbar .brand-icon { height: 36px; }
  .topbar .brand-mark { font-size: 16px; }

  /* Home hero: stops forcing 100dvh, tightens copy spacing, scroll arrow
     joins the document flow so it stays visible without scrolling.
     Top padding is just enough to clear the 80px sticky topbar + a small
     visual gap; anything larger pushes the scroll arrow below the fold. */
  .hero {
    min-height: auto;
    padding-block: 24px 40px;
  }
  .hero .hero-copy .eyebrow    { margin-bottom: 10px; }
  .hero .hero-copy .display    { margin-bottom: 12px; }
  .hero .hero-copy .lead       { margin-bottom: 16px; }
  .hero .hero-copy .hero-cta   { margin-bottom: 20px; }
  .hero .hero-scroll {
    position: static;
    transform: none;
    margin: 20px auto 0;
  }

  /* Subpage hero (.page-hero) — fills exactly the currently-visible
     viewport (100dvh accounts for whatever chrome the browser is showing
     right now, unlike svh which uses the small/stable value and can
     overshoot). Flex column with the content centered and the scroll
     arrow pushed to the bottom edge via margin-top: auto.

     padding-block stays minimal so the dark block isn't taller than the
     viewport. */
  /* Fill the visible viewport (so the next section doesn't peek through
     without scrolling), with content anchored at the top and the scroll
     arrow anchored at the bottom — flex column + space-between handles
     this deterministically. No centering, no empty padding above/below
     the content. */
  .page-hero {
    min-height: calc(68dvh - 80px);
    padding-block: 24px 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }
  .page-hero-scroll {
    display: flex;
    position: static;
    transform: none;
    width: fit-content;
    margin: 0 auto;
    bottom: auto;
    left: auto;
  }

  /* Inter-section scroll arrow (reused in trust-distinct, services, about,
     work, industries, contact): drop the absolute positioning on mobile so
     it cannot float over the content of a tall section. Mirrors the same
     change applied to .hero-scroll above. */
  .section-scroll-wrap {
    position: static;
    transform: none;
    margin: 24px auto 0;
    bottom: auto;
    left: auto;
  }

  /* "Lo que nos hace distintos" — turn the 6 cards into a vertical
     accordion. Cards lose their box/border/padding; the .td-card-toggle
     becomes a real flex row header with the number, title, and a +/×
     indicator. .td-card-panel collapses via max-height and expands when
     the parent .td-card has data-open="true". JS handler in app.js. */
  .td-grid {
    grid-template-columns: 1fr;
    gap: 0;
    border-top: 1px solid var(--line);
  }
  .td-card {
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    padding: 0;
    display: block;
    transition: none;
  }
  .td-card:hover { border-color: var(--line); transform: none; }

  /* Compact toggle: 12px padding + 24px icon keeps the closed accordion
     under ~300px total for 6 items so the section + scroll arrow fit a
     real Chrome mobile viewport (≈600px usable on iPhone-class screens
     after URL bar). Tap target is still ~46px so it stays comfortable. */
  .td-card-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 4px;
    cursor: pointer;
  }
  .td-card-toggle .td-num {
    flex: 0 0 auto;
    min-width: 24px;
    font-size: 12px;
    margin: 0;
  }
  .td-card-toggle h3 {
    flex: 1 1 auto;
    margin: 0;
    font-size: 15px;
    line-height: 1.25;
  }
  .td-card-icon {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid var(--line);
    color: var(--accent);
    position: relative;
    transition: transform .22s ease, border-color .22s ease;
  }
  /* + glyph drawn with two pseudo-elements so it rotates cleanly to × */
  .td-card-icon::before,
  .td-card-icon::after {
    content: "";
    position: absolute;
    background: currentColor;
    border-radius: 1px;
  }
  .td-card-icon::before { width: 10px; height: 2px; }
  .td-card-icon::after  { width: 2px; height: 10px; }
  .td-card[data-open="true"] .td-card-icon {
    transform: rotate(45deg);
    border-color: var(--accent);
  }

  .td-card-panel {
    display: block;
    max-height: 0;
    overflow: hidden;
    transition: max-height .25s ease;
  }
  .td-card[data-open="true"] .td-card-panel {
    max-height: 360px;
  }
  .td-card-panel p {
    margin: 0;
    padding: 0 4px 14px 40px;
    font-size: 14px;
    line-height: 1.5;
  }

  /* Tighten the surrounding chrome of the trust-distinct block too —
     smaller distinct title, less air between the logos marquee and the
     accordion, smaller top padding on the marquee. Together this saves
     another ~50-60px so the "Cómo empezar" arrow lands inside the fold. */
  .td-distinct-title { font-size: 22px; line-height: 1.15; }
  .td-distinct-head .eyebrow { margin-bottom: 10px; }
  .td-distinct { gap: 16px; }
  .trust-distinct > .container { gap: 20px; }
  .trust-distinct .td-trust { padding-top: 12px; }
  .td-trust-title { margin-bottom: 14px; font-size: 11px; }

  /* Home CTA strip — drop the forced full-viewport height (it left a lot
     of empty space below the card), compress paddings, stack the action
     buttons full-width, and densify the 3-point aside card so the whole
     block + the "Más información" scroll arrow fit inside the fold on
     real mobile Chrome viewports (~600-670px usable). */
  .home-cta {
    min-height: auto;
    padding-block: 24px 24px;
  }
  .home-cta .container {
    grid-template-columns: 1fr;
    gap: 18px;
    align-items: stretch;
  }
  .home-cta h2 {
    font-size: 23px;
    line-height: 1.15;
    margin: 0 0 8px;
    text-align: center;
  }
  .home-cta p {
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 14px;
    max-width: 100%;
    text-align: center;
  }
  .home-cta-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
  }
  .home-cta-actions .btn {
    width: 100%;
    justify-content: center;
    text-align: center;
    padding: 12px 18px;
    font-size: 14px;
  }
  .home-cta-aside {
    padding: 14px;
    gap: 10px;
    border-radius: 12px;
  }
  .home-cta-aside li {
    grid-template-columns: 24px 1fr;
    gap: 10px;
  }
  .home-cta-aside .cta-num { font-size: 11px; padding-top: 2px; }
  .home-cta-aside strong { font-size: 14px; margin-bottom: 1px; line-height: 1.25; }
  .home-cta-aside span.muted { font-size: 13px; line-height: 1.4; }

  /* Tighter top margin on the inter-section arrow inside .home-cta so the
     "Más información" link gets pulled closer to the card and lands in the
     fold. (Other sections keep the default 24px.) */
  .home-cta .section-scroll-wrap { margin-top: 14px; }

  /* ----- subpage shared chrome ---------------------------------------
     The cream blocks in subpages (values, team, testimonials, services
     list, industries grid, etc.) all use .section-head + .h-display +
     .section-lead and most live inside `.subpage main > section`. Apply
     a single compressed treatment so every subpage breathes correctly
     on mobile instead of inheriting desktop sizing. */
  .subpage main > section:not(.page-hero) {
    padding-block: 32px 32px;
    min-height: auto;
  }
  .section-head { margin-bottom: 18px; max-width: 100%; }
  .section-head .h-display { margin-bottom: 10px; }
  .h-display { font-size: 24px; line-height: 1.12; }
  .section-lead { font-size: 14px; line-height: 1.5; max-width: 100%; }

  /* ----- about / team grid ------------------------------------------- */
  .team-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .team-card { padding: 16px 14px; border-radius: 12px; }
  .team-card img { width: 56px; height: 56px; margin-bottom: 12px; }
  .team-card h3 { font-size: 14px; }
  .team-card p { font-size: 11px; }

  /* ----- blog post reader ------------------------------------------- */
  .post-shell { padding-block: 24px; }
  .post-back { margin-bottom: 18px; font-size: 11px; }
  .post-meta { font-size: 10px; gap: 8px; margin-bottom: 10px; }
  .post-title { font-size: 26px; line-height: 1.15; margin-bottom: 12px; }
  .post-excerpt { font-size: 15px; line-height: 1.5; margin-bottom: 18px; }
  .post-tags { margin-bottom: 20px; gap: 5px; }
  .post-tag { font-size: 10px; padding: 4px 10px; }
  .post-cover { aspect-ratio: 16 / 10; margin-bottom: 20px; border-radius: 12px; }
  .post-body { font-size: 15px; line-height: 1.6; }
  .post-body h1 { font-size: 22px; }
  .post-body h2 { font-size: 20px; }
  .post-body h3 { font-size: 18px; }
  .post-body h4 { font-size: 16px; }
  .post-body pre { padding: 14px; font-size: 12px; border-radius: 8px; }
  .post-body code { font-size: 13px; }
  .post-body blockquote { padding-left: 14px; }

  /* ----- contact form ----------------------------------------------- */
  .contact { padding-block: 24px; }
  .contact-grid { grid-template-columns: 1fr; gap: 16px; }
  .contact-copy h2 { font-size: 20px; margin-bottom: 8px; line-height: 1.2; }
  .contact-copy .muted { font-size: 13px; }
  .contact-points { margin-top: 12px; gap: 4px; }
  .contact-points li { font-size: 12px; padding-left: 22px; }
  .contact-points li::before { width: 12px; top: 7px; }
  .contact-form { padding: 14px; gap: 12px; border-radius: 12px; }
  .contact-form label { font-size: 10px; gap: 4px; }
  .contact-form input,
  .contact-form select,
  .contact-form textarea { font-size: 16px; padding: 8px 0; }
  .contact-form textarea { min-height: 60px; }
  .contact-form .btn { width: 100%; justify-content: center; padding: 11px 16px; font-size: 14px; }

  /* ----- works / cases — horizontal compact rows -------------------- */
  /* Image stays visible (it carries product identity) but as an 80px
     thumbnail on the left; content + metrics flow on the right in a
     single column. 3 case-rows × ~110px = 330px → whole works section
     plus head + scroll arrow fits inside the fold without an accordion. */
  .works-cases { grid-template-columns: 1fr; gap: 10px; }
  .case-row {
    flex-direction: row;
    align-items: stretch;
    padding: 10px;
    gap: 12px;
    border-radius: 12px;
  }
  .case-row--reverse { flex-direction: row; }
  .case-img {
    width: 88px;
    height: 88px;
    aspect-ratio: 1;
    padding: 6px;
    flex-shrink: 0;
    border-radius: 8px;
  }
  .case-content {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
  }
  .case-content .eyebrow { margin-bottom: 0; font-size: 9px; gap: 6px; }
  .case-content .eyebrow::before { width: 14px; }
  .case-content h3 { font-size: 14px; margin-bottom: 2px; line-height: 1.2; }
  .case-content > p {
    font-size: 11px;
    line-height: 1.4;
    -webkit-line-clamp: 2;
    margin-bottom: 4px;
  }
  .case-metrics { padding-top: 6px; gap: 0; }
  .case-metrics > div { padding-right: 6px; gap: 0; }
  .case-metrics > div + div { padding-left: 6px; }
  .case-metrics strong { font-size: 12px; }
  .case-metrics strong::before { width: 5px; height: 5px; margin-right: 4px; transform: translateY(-2px); }
  .case-metrics span { font-size: 8px; line-height: 1.1; letter-spacing: 0.02em; }

  /* ----- industries grid → accordion -------------------------------- */
  .ind-grid {
    grid-template-columns: 1fr;
    gap: 0;
    border-top: 1px solid var(--line);
  }
  .ind-card {
    padding: 0;
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    overflow: visible;
  }
  .ind-card:hover { transform: none; border-color: var(--line); box-shadow: none; }
  .ind-card::before { display: none; }
  .ind-card .td-card-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 4px;
    cursor: pointer;
  }
  .ind-card .ind-icon {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    margin: 0;
  }
  .ind-card .td-card-toggle h3 {
    flex: 1 1 auto;
    margin: 0;
    font-size: 15px;
    line-height: 1.25;
    font-weight: 700;
  }
  .ind-card[data-open="true"] .td-card-icon {
    transform: rotate(45deg);
    border-color: var(--accent);
  }
  .ind-card .td-card-panel {
    display: block;
    max-height: 0;
    overflow: hidden;
    transition: max-height .25s ease;
  }
  .ind-card[data-open="true"] .td-card-panel { max-height: 260px; }
  .ind-card .td-card-panel p {
    margin: 0;
    padding: 0 4px 14px 44px;
    font-size: 13px;
    line-height: 1.5;
  }

  /* ----- services section head — the "Capacidades / Lo que hacemos"
     header just repeats info the page-hero already gave. Hide the eyebrow
     on mobile to recover ~30px and keep the section above the fold. */
  .services .section-head .eyebrow { display: none; }
  .services .section-head { margin-bottom: 14px; }
  .services .section-head .h-display { margin-bottom: 6px; font-size: 22px; }
  .services .section-head .section-lead { font-size: 13px; line-height: 1.45; }

  /* ----- services list — accordion (same UX pattern as home distinct /
     about values). Each <li> becomes a collapsible row: number · icon ·
     title · +/× indicator, with the description in a panel that
     max-height-collapses. Tap target stays ~46px. */
  .services-list { grid-template-columns: 1fr; gap: 0; border-top: 1px solid var(--line); }
  .services-list li {
    padding: 0;
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    display: block;
    box-shadow: none;
  }
  .services-list li:hover {
    transform: none;
    padding-left: 0;
    background: transparent;
    border-color: var(--line);
  }
  .services-list .td-card-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 4px;
    cursor: pointer;
  }
  .services-list .td-card-toggle .svc-num {
    flex: 0 0 auto;
    min-width: 22px;
    font-size: 12px;
    color: var(--accent);
  }
  .services-list .td-card-toggle .svc-icon {
    display: none;            /* drop the colored square icon on mobile — title carries enough */
  }
  .services-list li:hover .svc-icon {
    background: transparent;
    color: inherit;
  }
  .services-list .td-card-toggle .svc-title {
    flex: 1 1 auto;
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.25;
  }
  .services-list .svc-arrow { display: none; }
  .services-list .td-card-panel {
    display: block;
    max-height: 0;
    overflow: hidden;
    transition: max-height .25s ease;
  }
  .services-list li[data-open="true"] .td-card-panel {
    max-height: 280px;
  }
  .services-list li[data-open="true"] .td-card-icon {
    transform: rotate(45deg);
    border-color: var(--accent);
  }
  .services-list .td-card-panel .svc-desc {
    max-height: none;
    opacity: 1;
    overflow: visible;
    margin: 0;
    padding: 0 4px 14px 32px;
    font-size: 13px;
    line-height: 1.5;
  }

  /* ----- process steps — accordion on mobile (same pattern as
     services-list and home distinct). 5 cards with full descriptions
     would push the section past the viewport, so collapse them by
     default and let the user tap to expand. The decorative ps-num is
     kept but shrunk; the ::after dot (timeline marker) is hidden in
     accordion mode since there's no horizontal flow line on mobile. */
  .process { padding-block: 24px; }
  .process-steps {
    grid-template-columns: 1fr;
    gap: 0;
    border-top: 1px solid var(--line-strong);
  }
  .process-steps::before { display: none; }
  .process-steps li {
    padding: 0;
    border-bottom: 1px solid var(--line-strong);
    display: block;
  }
  .process-steps .td-card-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 14px 4px;
    cursor: pointer;
  }
  .process-steps .ps-num {
    font-size: 24px;
    margin: 0;
    min-width: 38px;
    flex: 0 0 auto;
    line-height: 1;
  }
  .process-steps .ps-num::after { display: none; }
  .process-steps .td-card-toggle h3 {
    flex: 1 1 auto;
    margin: 0;
    font-size: 15px;
    line-height: 1.25;
    color: var(--text);
  }
  .process-steps li[data-open="true"] .td-card-icon {
    transform: rotate(45deg);
    border-color: var(--accent);
  }
  .process-steps .td-card-panel {
    display: block;
    max-height: 0;
    overflow: hidden;
    transition: max-height .25s ease;
  }
  .process-steps li[data-open="true"] .td-card-panel { max-height: 280px; }
  .process-steps .td-card-panel p {
    margin: 0;
    padding: 0 4px 14px 50px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--muted);
  }

  /* ----- about / testimonials --------------------------------------- */
  .testimonials { padding-block: 24px; }
  .testi-grid { grid-template-columns: 1fr; gap: 10px; }
  .testi-card { padding: 14px; border-radius: 12px; }
  .testi-card::before { font-size: 56px; top: 0; left: 14px; }
  .testi-card blockquote {
    font-size: 14px;
    line-height: 1.45;
    padding-top: 26px;
    margin-bottom: 10px;
  }
  .testi-card figcaption { padding-top: 10px; gap: 1px; }
  .testi-card figcaption strong { font-size: 13px; }
  .testi-card figcaption .muted { font-size: 10px; }

  /* Footer — drop forced full-viewport height, shrink the oversized brand
     mark/icon (designed for desktop hero impact, way too big on a phone),
     compress paddings, and let the bottom row stack with breathing room. */
  .footer {
    min-height: auto;
    padding-top: 40px;
    padding-bottom: 24px;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-block: 32px;
  }
  .footer-brand .brand-icon { height: 64px; }
  .footer-brand .brand-mark { font-size: 24px; }
  .footer-brand .muted { max-width: 100%; font-size: 13px; line-height: 1.5; }
  .footer-col h4 { margin-bottom: 12px; font-size: 10px; }
  .footer-col a { font-size: 14px; padding: 4px 0; }
  .footer-bottom {
    padding-top: 20px;
    font-size: 10px;
    gap: 6px;
  }

  /* Anchor jumps land flush under the sticky topbar. */
  html { scroll-padding-top: 80px; }
  main > section[id] { scroll-margin-top: 80px; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .hero-collage img { transform: none !important; }
}
