/* =================================================================
   OPEX — Design System
   Editorial / Swiss-influenced restraint, warmed.
   Ink-blue accent on warm bone. Thin-line "flow" motif.
   ================================================================= */

/* ---- Tokens ---------------------------------------------------- */
:root {
  /* Surfaces & ink */
  --paper:        #F5F1E8; /* warm bone — primary surface */
  --surface:      #FBF9F4; /* occasional lighter panel */
  --surface-pure: #FFFFFF;
  --ink:          #1C1B19; /* warm near-black */
  --muted:        #57534E; /* warm gray — secondary copy */
  --muted-soft:   #7A746C;
  --accent:       #1F3A5F; /* ink-blue — links, marks, emphasis */
  --accent-deep:  #152C47; /* footer / dark panels */
  --accent-tint:  #2C4F7C; /* lighter ink-blue for motif lines on dark */
  --hairline:     #E4DECE; /* 1px rules, structure */
  --hairline-strong: #D8D0BC;

  /* Type */
  --font-display: "Newsreader", Georgia, "Times New Roman", serif;
  --font-body:    "Hanken Grotesk", system-ui, -apple-system, sans-serif;
  --font-mono:    "IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace;

  /* Fluid type scale */
  --fs-display: clamp(2.6rem, 1.6rem + 4.6vw, 4.6rem);
  --fs-h1:      clamp(2.1rem, 1.4rem + 3.2vw, 3.4rem);
  --fs-h2:      clamp(1.7rem, 1.25rem + 2.1vw, 2.5rem);
  --fs-h3:      clamp(1.25rem, 1.05rem + 0.9vw, 1.6rem);
  --fs-h4:      clamp(1.08rem, 1rem + 0.4vw, 1.25rem);
  --fs-body:    clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --fs-lead:    clamp(1.2rem, 1.05rem + 0.7vw, 1.5rem);
  --fs-small:   0.9375rem;
  --fs-label:   0.74rem;

  /* Spacing */
  --gutter:    clamp(1.25rem, 0.6rem + 3vw, 3rem);
  --section-y: clamp(4rem, 2.5rem + 7vw, 8.5rem);
  --maxw:      78rem;     /* ~1248px */
  --maxw-text: 40rem;     /* comfortable measure */

  /* Misc */
  --radius:   2px;
  --line:     1px solid var(--hairline);
  --ease:     cubic-bezier(.22,.61,.27,1);
  --ease-out: cubic-bezier(.16,1,.3,1);
}

/* ---- Reset ----------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.62;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv01";
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 1px;
}

/* Language visibility (Spanish primary) ------------------------- */
[data-lang="es"] .lang-en,
[data-lang="en"] .lang-es { display: none; }

/* ---- Typography ------------------------------------------------ */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 440;
  line-height: 1.07;
  letter-spacing: -0.012em;
  color: var(--ink);
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); letter-spacing: -0.006em; }
h4 { font-size: var(--fs-h4); font-weight: 500; letter-spacing: 0; }
p { text-wrap: pretty; }
strong { font-weight: 600; }
em { font-style: italic; }

.display {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-size: var(--fs-display);
  font-weight: 420;
  line-height: 1.02;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.lead {
  font-size: var(--fs-lead);
  line-height: 1.45;
  color: var(--ink);
  font-weight: 400;
  max-width: 34ch;
}
.muted { color: var(--muted); }
.measure { max-width: var(--maxw-text); }

/* Mono eyebrow / label */
.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
}
.eyebrow::before {
  content: "";
  width: 1.6rem;
  height: 1px;
  background: var(--accent);
  display: inline-block;
  opacity: 0.7;
}
.label-mono {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.index-num {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  color: var(--accent);
  font-weight: 500;
}

/* ---- Layout ---------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-block: var(--section-y); }
.section--tight { padding-block: clamp(3rem, 2rem + 4vw, 5rem); }
.grid { display: grid; gap: var(--gutter); }
.rule {
  border: 0;
  border-top: var(--line);
  width: 100%;
}

/* a hairline rule with a single node — the motif as divider */
.rule-node {
  position: relative;
  border: 0;
  border-top: var(--line);
  overflow: visible;
}
.rule-node::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--paper);
  border: 1.25px solid var(--accent);
  transform: translateY(-50%);
}

/* ---- Links ----------------------------------------------------- */
.link {
  color: var(--accent);
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size .45s var(--ease);
  padding-bottom: 1px;
}
.link:hover, .link:focus-visible { background-size: 100% 1px; }
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  color: var(--accent);
  font-weight: 500;
}
.link-arrow .arrow {
  transition: transform .4s var(--ease);
  display: inline-block;
}
.link-arrow:hover .arrow, .link-arrow:focus-visible .arrow { transform: translateX(4px); }
.link-arrow .uln {
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size .45s var(--ease);
  padding-bottom: 2px;
}
.link-arrow:hover .uln, .link-arrow:focus-visible .uln { background-size: 100% 1px; }

/* ---- Buttons --------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: 0.005em;
  line-height: 1;
  padding: 0.95em 1.6em;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--paper);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background .35s var(--ease), border-color .35s var(--ease), transform .35s var(--ease), color .35s var(--ease);
}
.btn .arrow { transition: transform .4s var(--ease); }
.btn:hover { background: var(--accent-deep); border-color: var(--accent-deep); }
.btn:hover .arrow { transform: translateX(4px); }
.btn:active { transform: translateY(1px); }
.btn--light {
  background: var(--paper);
  color: var(--accent-deep);
  border-color: var(--paper);
}
.btn--light:hover { background: transparent; color: var(--paper); border-color: var(--paper); }
.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(1rem, 2vw, 1.75rem);
}

/* ---- Header ---------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.1) blur(8px);
  -webkit-backdrop-filter: saturate(1.1) blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color .4s var(--ease), background .4s var(--ease);
}
.site-header.is-scrolled {
  border-bottom-color: var(--hairline);
  background: color-mix(in srgb, var(--paper) 94%, transparent);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 4.6rem;
  padding-block: 0.6rem;
}

/* Wordmark — the typographic brand mark (swappable) */
.wordmark {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 500;
  font-size: 1.32rem;
  letter-spacing: 0.16em;
  color: var(--ink);
  display: inline-flex;
  align-items: baseline;
  line-height: 1;
  padding-block: 0.4rem;
}
.wordmark .dot {
  color: var(--accent);
  margin-left: 0.06em;
  font-weight: 600;
}
.wordmark:hover .dot { color: var(--ink); }

/* Primary nav */
.nav {
  display: flex;
  align-items: center;
  gap: clamp(1.1rem, 2.2vw, 2.2rem);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(1.1rem, 2.2vw, 2.1rem);
}
.nav-link {
  position: relative;
  font-size: 0.95rem;
  color: var(--ink);
  padding-block: 0.4rem;
  transition: color .3s var(--ease);
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0.05rem;
  height: 1px; width: 0;
  background: var(--accent);
  transition: width .4s var(--ease);
}
.nav-link:hover { color: var(--accent); }
.nav-link:hover::after { width: 100%; }
.nav-link.is-active { color: var(--accent); }
.nav-link.is-active::after { width: 100%; }

.lang-toggle {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  border: 1px solid var(--hairline-strong);
  background: transparent;
  color: var(--muted);
  padding: 0.5em 0.75em;
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color .3s var(--ease), color .3s var(--ease);
  line-height: 1;
}
.lang-toggle:hover { border-color: var(--accent); color: var(--accent); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.6rem; height: 2.6rem;
  background: transparent;
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius);
  cursor: pointer;
  padding: 0;
}
.nav-toggle span {
  display: block;
  width: 1.1rem; height: 1.4px;
  margin-inline: auto;
  background: var(--ink);
  transition: transform .35s var(--ease), opacity .25s var(--ease);
}

/* Mobile menu is hidden on desktop; becomes a panel at <=820px */
.mobile-menu { display: none; }

/* ---- Footer ---------------------------------------------------- */
.site-footer {
  background: var(--accent-deep);
  color: #D7DEE8;
  padding-block: clamp(3.5rem, 2.5rem + 4vw, 6rem) 2.2rem;
  margin-top: var(--section-y);
}
.site-footer a { color: #C5CFDD; }
.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: clamp(1.75rem, 4vw, 3.5rem);
  align-items: start;
}
.footer-brand .wordmark {
  color: var(--paper);
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  letter-spacing: 0.08em;
  margin-bottom: 1.1rem;
}
.footer-brand .wordmark .dot { color: var(--accent-tint); }
.footer-tagline {
  font-family: var(--font-display);
  font-size: 1.15rem;
  line-height: 1.4;
  color: #E7EBF1;
  max-width: 22ch;
  font-weight: 380;
}
.footer-col h5 {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #8FA0B6;
  margin-bottom: 1.1rem;
  font-weight: 500;
}
.footer-col ul { display: grid; gap: 0.7rem; }
.footer-col a, .footer-col p { font-size: 0.95rem; line-height: 1.5; }
.footer-col a { transition: color .3s var(--ease); }
.footer-col a:hover { color: #fff; }
.footer-rule {
  border: 0;
  border-top: 1px solid rgba(255,255,255,0.12);
  margin-block: clamp(2.2rem, 4vw, 3.2rem) 1.6rem;
}
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  font-size: 0.82rem;
  color: #8FA0B6;
}
.footer-bottom .label-mono { color: #8FA0B6; }
.footer-bottom__legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.4rem;
}
.lang-toggle--footer {
  border-color: rgba(255,255,255,0.2);
  color: #C5CFDD;
}
.lang-toggle--footer:hover { border-color: #fff; color: #fff; }

/* ---- Flow / system motif -------------------------------------- */
.flow { display: block; overflow: visible; }
.flow .stroke {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.flow .stroke-soft { stroke: var(--hairline-strong); }
.flow .node {
  fill: var(--paper);
  stroke: var(--accent);
  stroke-width: 1.25;
}
.flow .node-fill { fill: var(--accent); stroke: none; }
.flow .label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  fill: var(--muted);
  text-transform: uppercase;
}
/* on dark panels */
.panel-dark .flow .stroke { stroke: var(--accent-tint); }
.panel-dark .flow .node { fill: var(--accent-deep); stroke: var(--accent-tint); }
.panel-dark .flow .label { fill: #8FA0B6; }

/* draw-in animation (uses pathLength="1") */
.flow [data-draw] {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}
.is-revealed .flow [data-draw] {
  transition: stroke-dashoffset 1.5s var(--ease-out);
  stroke-dashoffset: 0;
}
.flow [data-fade] { opacity: 0; transition: opacity .8s var(--ease) .5s; }
.is-revealed .flow [data-fade] { opacity: 1; }

/* ---- Image slot (art-directed duotone placeholder) ------------ */
.imageslot {
  position: relative;
  background:
    radial-gradient(125% 130% at 72% 8%, #294a72 0%, #1b3454 42%, #122844 100%);
  border-radius: var(--radius);
  overflow: hidden;
  isolation: isolate;
  min-height: 240px;
}
.imageslot::before {
  /* faint engineered grid, in ink-blue duotone */
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.055) 1px, transparent 1px);
  background-size: 34px 34px;
  background-position: center;
  mask-image: radial-gradient(120% 120% at 70% 18%, #000 30%, transparent 86%);
  -webkit-mask-image: radial-gradient(120% 120% at 70% 18%, #000 30%, transparent 86%);
}
.imageslot::after {
  /* registration crop marks — quiet editorial detail */
  content: "";
  position: absolute;
  inset: 14px;
  background:
    linear-gradient(var(--accent-tint), var(--accent-tint)) left  top    / 14px 1px no-repeat,
    linear-gradient(var(--accent-tint), var(--accent-tint)) left  top    / 1px 14px no-repeat,
    linear-gradient(var(--accent-tint), var(--accent-tint)) right top    / 14px 1px no-repeat,
    linear-gradient(var(--accent-tint), var(--accent-tint)) right top    / 1px 14px no-repeat,
    linear-gradient(var(--accent-tint), var(--accent-tint)) left  bottom / 14px 1px no-repeat,
    linear-gradient(var(--accent-tint), var(--accent-tint)) left  bottom / 1px 14px no-repeat,
    linear-gradient(var(--accent-tint), var(--accent-tint)) right bottom / 14px 1px no-repeat,
    linear-gradient(var(--accent-tint), var(--accent-tint)) right bottom / 1px 14px no-repeat;
  opacity: 0.5;
  pointer-events: none;
}
.imageslot__art {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  opacity: 0.5;
}
.imageslot__art .flow { width: 64%; }
.imageslot__art .flow .stroke { stroke: rgba(157,184,220,0.55); }
.imageslot__art .flow .stroke-soft { stroke: rgba(157,184,220,0.3); }
.imageslot__art .flow .node { fill: #16263B; stroke: rgba(157,184,220,0.55); }
.imageslot__art .flow .node-fill { fill: rgba(157,184,220,0.7); }
.imageslot__caption {
  position: absolute;
  z-index: 2;
  left: 1.1rem; bottom: 1.05rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(231,235,241,0.78);
  display: flex;
  align-items: center;
  gap: 0.55em;
  max-width: calc(100% - 2.2rem);
}
.imageslot__caption::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  border: 1px solid var(--accent-tint);
  flex: none;
}
.imageslot--tall { aspect-ratio: 4 / 5; }
.imageslot--wide { aspect-ratio: 16 / 10; }

/* labelled-infographic variant: a full-strength diagram (names + numbers) rather than a faint motif */
.imageslot--diagram .imageslot__art { opacity: 1; }
.imageslot--diagram .imageslot__art .flow { width: 90%; }
.imageslot--diagram .imageslot__art .flow .label { fill: rgba(157,184,220,0.9); }

/* ---- Reusable section pieces ---------------------------------- */
.section-head { max-width: 52rem; }
.section-head .eyebrow { margin-bottom: 1.25rem; }
.section-head p { margin-top: 1.1rem; color: var(--muted); font-size: var(--fs-lead); line-height: 1.5; max-width: 40ch; }

.kicker-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(1.5rem, 5vw, 5rem);
  align-items: start;
}

/* editorial service list (NOT a uniform icon-card grid) */
.service-list { display: grid; }
.service-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: clamp(1rem, 3vw, 2.5rem);
  align-items: baseline;
  padding-block: clamp(1.6rem, 3vw, 2.4rem);
  border-top: var(--line);
}
.service-row:last-child { border-bottom: var(--line); }
.service-row__num { padding-top: 0.4rem; }
.service-row__body h3 { margin-bottom: 0.5rem; }
.service-row__body p { color: var(--muted); max-width: 46ch; }
.service-row__motif { width: 78px; opacity: 0.9; align-self: center; }

/* full service blocks (Servicios page) — alternating, asymmetric */
.service-block {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(1.75rem, 5vw, 5rem);
  align-items: center;
  padding-block: var(--section-y);
  border-top: var(--line);
}
.service-block:first-of-type { border-top: 0; padding-top: clamp(2rem,4vw,3.5rem); }
.service-block--flip .service-block__visual { order: -1; }
.service-block__body h2 { margin-bottom: 1.1rem; }
.service-block__body > p { color: var(--muted); max-width: 46ch; margin-bottom: 1.6rem; }
.feature-list { display: grid; gap: 0.95rem; max-width: 42ch; }
.feature-list li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.85rem;
  align-items: start;
  font-size: 1.02rem;
  color: var(--ink);
}
.feature-list li::before {
  content: "";
  width: 7px; height: 7px;
  margin-top: 0.62em;
  border-radius: 50%;
  border: 1.25px solid var(--accent);
  flex: none;
}
.service-block__visual {
  background: var(--surface);
  border: var(--line);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 4vw, 2.75rem);
  aspect-ratio: 5 / 4;
  display: grid;
  place-items: center;
}
.service-block__visual .flow { width: 100%; height: auto; }

/* method phases (vertical, connected) */
.phases { display: grid; gap: 0; position: relative; }
.phase {
  display: grid;
  grid-template-columns: clamp(2.4rem,5vw,3.4rem) 1fr;
  gap: clamp(1.25rem, 3vw, 2.5rem);
  padding-block: clamp(1.8rem, 3vw, 2.6rem);
  border-top: var(--line);
  position: relative;
}
.phase:last-child { border-bottom: var(--line); }
.phase__marker {
  position: relative;
  display: flex;
  justify-content: center;
}
.phase__dot {
  width: 13px; height: 13px;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
  background: var(--paper);
  margin-top: 0.55rem;
  position: relative;
  z-index: 1;
}
.phase:not(:last-child) .phase__marker::after {
  content: "";
  position: absolute;
  top: 1.4rem; bottom: -1px;
  left: 50%;
  width: 1px;
  background: var(--hairline-strong);
  transform: translateX(-50%);
}
.phase__index {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 0.5rem;
  display: block;
}
.phase__body h3 { margin-bottom: 0.6rem; }
.phase__body p { color: var(--muted); max-width: 54ch; }
.phase__technique {
  margin-top: 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  padding: 0.4em 0;
}
.phase__technique::before {
  content: "↳";
  color: var(--muted-soft);
}

/* case study — quadrant narrative */
.case-areas { display: grid; gap: 0; }
.case-area {
  padding-block: clamp(1.6rem, 3vw, 2.4rem);
  border-top: var(--line);
}
.case-area:last-child { border-bottom: var(--line); }
.case-area__head {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 1.4rem;
  flex-wrap: wrap;
}
.case-area__head h3 { font-size: var(--fs-h3); }
.case-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1rem, 2.5vw, 2rem);
}
.case-cell h4 {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.7rem;
  font-weight: 500;
  padding-bottom: 0.7rem;
  border-bottom: var(--line);
}
.case-cell p { font-size: 0.97rem; color: var(--muted); line-height: 1.5; }

/* process steps (warm, simple) */
.journey {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1.25rem, 3vw, 2.5rem);
}
.journey__step { position: relative; }
.journey__step .index-num { display: block; margin-bottom: 1rem; }
.journey__step h3 { font-size: var(--fs-h4); font-family: var(--font-display); font-weight: 500; margin-bottom: 0.6rem; }
.journey__step p { color: var(--muted); font-size: 0.97rem; }

.principles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; }
.principle {
  padding: clamp(1.5rem, 3vw, 2.2rem) 0;
  border-top: var(--line);
  padding-right: clamp(1rem, 4vw, 3rem);
}
.principle:nth-child(odd) { padding-left: 0; }
.principle:nth-child(even) { padding-left: clamp(1.5rem, 4vw, 3rem); border-left: var(--line); }
.principle h3 { font-size: var(--fs-h4); font-family: var(--font-display); font-weight: 500; margin-bottom: 0.55rem; display: flex; align-items: center; gap: 0.6rem; }
.principle h3 .tick { color: var(--accent); font-size: 0.9em; }
.principle p { color: var(--muted); font-size: 0.99rem; }

/* statement / pull quote band */
.statement {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-size: clamp(1.6rem, 1.1rem + 2.4vw, 2.7rem);
  font-weight: 380;
  line-height: 1.2;
  letter-spacing: -0.015em;
  max-width: 24ch;
  text-wrap: balance;
}
.statement .accent { color: var(--accent); }

/* dark CTA band */
.cta-band {
  background: var(--accent-deep);
  color: #E7EBF1;
  border-radius: var(--radius);
  padding: clamp(2.2rem, 5vw, 4rem);
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: #C5CFDD; margin-top: 0.9rem; max-width: 36ch; }
.cta-band .cta-row { justify-content: flex-end; }

/* values list */
.values { display: grid; grid-template-columns: repeat(2,1fr); gap: 0; }
.value {
  padding: clamp(1.4rem,3vw,2rem) 0;
  border-top: var(--line);
}
.value:nth-child(even){ padding-left: clamp(1.5rem,4vw,3rem); border-left: var(--line); }
.value .index-num { display:block; margin-bottom: 0.8rem; }
.value h3 { font-size: var(--fs-h4); font-family: var(--font-display); font-weight: 500; margin-bottom: 0.5rem; }
.value p { color: var(--muted); font-size: 0.97rem; max-width: 40ch; }

/* ---- Contact form ---------------------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 0.85fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}
.form { display: grid; gap: 1.5rem; }
.field { display: grid; gap: 0.5rem; }
.field label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.field input, .field textarea {
  background: var(--surface-pure);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius);
  padding: 0.85em 0.95em;
  font-size: 1.02rem;
  color: var(--ink);
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
  width: 100%;
  font-family: var(--font-body);
}
.field textarea { resize: vertical; min-height: 8rem; }
.field input::placeholder, .field textarea::placeholder { color: var(--muted-soft); }
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 12%, transparent);
}
.form__note { font-size: 0.85rem; color: var(--muted-soft); margin-top: 0.2rem; }
.form-success {
  display: none;
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 7%, transparent);
  border-radius: var(--radius);
  color: var(--accent-deep);
  font-size: 0.98rem;
}
.form-success.is-visible { display: block; }
.form-error {
  display: none;
  padding: 1.1rem 1.25rem;
  border: 1px solid #b4452f;
  background: color-mix(in srgb, #b4452f 7%, transparent);
  border-radius: var(--radius);
  color: #8f3320;
  font-size: 0.98rem;
  margin-bottom: 1.5rem;
}
.form-error.is-visible { display: block; }
/* honeypot — visually removed, kept for bots */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px;
  opacity: 0; pointer-events: none;
}
.contact-aside { display: grid; gap: 1.75rem; }
.contact-aside .channel {
  border-top: var(--line);
  padding-top: 1.2rem;
}
.contact-aside .channel h4 {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.55rem;
  font-weight: 500;
}
.contact-aside .channel p, .contact-aside .channel a { font-size: 1.05rem; }

/* ---- Page hero (interior pages) ------------------------------- */
.page-hero { padding-top: clamp(3rem, 4vw, 5rem); padding-bottom: clamp(2rem,3vw,3rem); }
.page-hero .display { max-width: 18ch; margin-top: 1.4rem; }
.page-hero .lead { margin-top: 1.6rem; max-width: 46ch; color: var(--muted); }

/* legal pages */
.prose { max-width: 44rem; }
.prose h2 { font-size: var(--fs-h3); margin-top: 2.4rem; margin-bottom: 0.9rem; }
.prose h2:first-child { margin-top: 0; }
.prose p { color: var(--ink); margin-bottom: 1rem; }
.prose ul { display: grid; gap: 0.6rem; margin-bottom: 1.2rem; }
.prose ul li { display: grid; grid-template-columns: auto 1fr; gap: 0.7rem; color: var(--ink); }
.prose ul li::before { content:""; width:6px; height:6px; border-radius:50%; border:1.25px solid var(--accent); margin-top:0.6em; }
.legal-note {
  border: 1px dashed color-mix(in srgb, var(--accent) 45%, transparent);
  background: color-mix(in srgb, var(--accent) 6%, transparent);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  font-size: 0.92rem;
  color: var(--accent-deep);
  margin-bottom: 2.5rem;
}

/* ---- Reveal (restrained) -------------------------------------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .8s var(--ease-out), transform .8s var(--ease-out);
}
[data-reveal].is-revealed { opacity: 1; transform: none; }
[data-reveal][data-delay="1"] { transition-delay: .08s; }
[data-reveal][data-delay="2"] { transition-delay: .16s; }
[data-reveal][data-delay="3"] { transition-delay: .24s; }
[data-reveal][data-delay="4"] { transition-delay: .32s; }

/* hero load reveal (no JS) */
.hero-anim > * { opacity: 0; transform: translateY(16px); animation: rise .9s var(--ease-out) forwards; }
.hero-anim > *:nth-child(1) { animation-delay: .05s; }
.hero-anim > *:nth-child(2) { animation-delay: .15s; }
.hero-anim > *:nth-child(3) { animation-delay: .25s; }
.hero-anim > *:nth-child(4) { animation-delay: .35s; }
.hero-anim > *:nth-child(5) { animation-delay: .45s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ---- Hero (home) ---------------------------------------------- */
.hero {
  padding-top: clamp(2.5rem, 4vw, 4.5rem);
  padding-bottom: clamp(2rem, 3vw, 3rem);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(1.75rem, 5vw, 4.5rem);
  align-items: center;
}
.hero-copy .eyebrow { margin-bottom: 1.6rem; }
.hero-copy .display { margin-bottom: 1.7rem; }
.hero-copy .lead { margin-bottom: 2.1rem; max-width: 40ch; color: var(--muted); }
.hero-visual { position: relative; }

/* misc helpers */
.mt-1 { margin-top: 1rem; } .mt-2 { margin-top: 2rem; } .mt-3 { margin-top: 3rem; }
.skip-link {
  position: fixed;
  left: 1rem; top: 1rem;
  background: var(--accent); color: var(--paper);
  padding: 0.6em 1em; border-radius: var(--radius);
  z-index: 200;
  transform: translateY(-150%);
  transition: transform .3s var(--ease);
}
.skip-link:focus { transform: translateY(0); }

/* ================================================================
   Responsive
   ================================================================ */
@media (max-width: 1000px) {
  .footer-top { grid-template-columns: 1fr 1fr; row-gap: 2.5rem; }
  .footer-brand { grid-column: 1 / -1; }
  .case-grid { grid-template-columns: repeat(2, 1fr); row-gap: 1.6rem; }
  .journey { grid-template-columns: repeat(2, 1fr); row-gap: 2rem; }
}

@media (max-width: 820px) {
  .nav-links, .nav .lang-toggle--header { display: none; }
  .nav-toggle { display: flex; }

  /* mobile menu panel */
  .mobile-menu {
    display: grid;
    position: fixed;
    inset: 4.6rem 0 auto 0;
    background: var(--paper);
    border-bottom: 1px solid var(--hairline);
    padding: 1.5rem var(--gutter) 2rem;
    gap: 0.25rem;
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .35s var(--ease), transform .35s var(--ease);
    z-index: 99;
    max-height: calc(100vh - 4.6rem);
    overflow-y: auto;
  }
  .mobile-menu.is-open { opacity: 1; transform: none; pointer-events: auto; }
  .mobile-menu a {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 440;
    padding: 0.7rem 0;
    border-bottom: var(--line);
    color: var(--ink);
  }
  .mobile-menu a.is-active { color: var(--accent); }
  .mobile-menu .lang-toggle { justify-self: start; margin-top: 1.4rem; }
  body.menu-open { overflow: hidden; }
  .nav-toggle.is-open span:nth-child(1) { transform: translateY(6.4px) rotate(45deg); }
  .nav-toggle.is-open span:nth-child(2) { opacity: 0; }
  .nav-toggle.is-open span:nth-child(3) { transform: translateY(-6.4px) rotate(-45deg); }

  .hero-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero-visual { order: -1; }
  .kicker-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .service-block { grid-template-columns: 1fr; gap: 2rem; padding-block: clamp(2.5rem,6vw,3.5rem); }
  .service-block--flip .service-block__visual { order: 0; }
  .cta-band { grid-template-columns: 1fr; }
  .cta-band .cta-row { justify-content: flex-start; }
  .contact-grid { grid-template-columns: 1fr; }
  .case-grid { grid-template-columns: 1fr; }
  .service-row { grid-template-columns: auto 1fr; }
  .service-row__motif { display: none; }
}

@media (max-width: 560px) {
  .principles, .values, .journey { grid-template-columns: 1fr; }
  .principle:nth-child(even), .value:nth-child(even) { padding-left: 0; border-left: 0; }
  .principle, .value { padding-right: 0; }
  .footer-top { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .cta-row .btn { width: 100%; justify-content: center; }
}

/* Hairline-mobile hardening for very small text */
@media (max-width: 380px) {
  :root { --gutter: 1.1rem; }
}

/* ================================================================
   Motion preference
   ================================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  [data-reveal], .hero-anim > * { opacity: 1 !important; transform: none !important; }
  .flow [data-draw] { stroke-dashoffset: 0 !important; }
  .flow [data-fade] { opacity: 1 !important; }
}

/* ================================================================
   Optional dark mode (deep desaturated navy, same restraint)
   Activated by [data-theme="dark"] on <html> — light is default.
   ================================================================ */
[data-theme="dark"] {
  --paper:        #0F1A2B;
  --surface:      #142336;
  --surface-pure: #16263B;
  --ink:          #E9E5DA;
  --muted:        #A9B4C4;
  --muted-soft:   #8492A6;
  --accent:       #9DB8DC;
  --accent-deep:  #0A1322;
  --accent-tint:  #6E8FBE;
  --hairline:     #243650;
  --hairline-strong: #2E4361;
}
[data-theme="dark"] .imageslot::before { background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px); }
[data-theme="dark"] .legal-note {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 35%, transparent);
}
[data-theme="dark"] .form-success {
  color: var(--accent);
}
[data-theme="dark"] .form-error {
  border-color: #e06050;
  background: color-mix(in srgb, #e06050 12%, transparent);
  color: #f0a090;
}
/* The footer is always dark; its wordmark uses --paper, which flips to a dark
   value in dark mode. Keep it light (like the header wordmark). */
[data-theme="dark"] .footer-brand .wordmark { color: var(--ink); }

/* Buttons in dark mode --------------------------------------------
   In dark mode --accent is a light blue and --accent-deep is near-black,
   so the light-theme hover (background → accent-deep, text → paper) made
   the label vanish, and the "light" button on the dark CTA band turned
   near-invisible. Re-map both so they stay legible. */
[data-theme="dark"] .btn:hover {
  background: var(--accent-tint);
  border-color: var(--accent-tint);
  color: var(--accent-deep);
}
[data-theme="dark"] .btn--light {
  background: var(--ink);
  color: var(--accent-deep);
  border-color: var(--ink);
}
[data-theme="dark"] .btn--light:hover {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}

/* ---- Theme toggle ---------------------------------------------- */
/* groups the theme + language buttons in the header */
.nav-utils { display: inline-flex; align-items: center; gap: 0.55rem; }

.theme-toggle {
  background: transparent;
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius);
  cursor: pointer;
  padding: 0.45em;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color .3s var(--ease), color .3s var(--ease);
  line-height: 1;
}
/* size only — visibility is controlled by the __sun / __moon rules below
   (don't set `display` here or it would override their show/hide) */
.theme-toggle svg { width: 16px; height: 16px; }
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
.theme-toggle__sun { display: none; }
.theme-toggle__moon { display: block; }
[data-theme="dark"] .theme-toggle__sun { display: block; }
[data-theme="dark"] .theme-toggle__moon { display: none; }
.theme-toggle--footer { border-color: rgba(255,255,255,0.2); color: #C5CFDD; }
.theme-toggle--footer:hover { border-color: #fff; color: #fff; }


/* ================================================================
   Utilities extracted from former inline style="" attributes
   (metodo.html) so the CSP can stay strict: style-src 'self'.
   Kept at end of file so they win the cascade like inline styles.
   ================================================================ */
.lead-size { font-size: var(--fs-lead); line-height: 1.5; }
.quote-topline { border-top: var(--line); padding-top: 2rem; }
.quote-narrow { max-width: 32ch; color: var(--muted); }

/* photo variant of the imageslot: a real photograph instead of the duotone placeholder */
.imageslot--photo .imageslot__art { opacity: 1; }
.imageslot--photo .imageslot__art img { width: 100%; height: 100%; object-fit: cover; display: block; }