/* Origina: estilos del landing. Colores, tipos, espaciado y esquinas vienen de brand/tokens.css. */

:root {
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --outer: var(--space-4);        /* margen entre la pantalla y las tarjetas grandes */
  --card-pad: var(--space-6);     /* aire interno de las tarjetas grandes; el contenido se alinea con él */
  --inset: calc(var(--outer) + var(--card-pad));
  --section-y: var(--space-12);
  --header-h: 72px;
  --radius-xl: 24px;
}

@media (min-width: 720px) {
  :root { --outer: var(--space-6); --card-pad: var(--space-12); --section-y: var(--space-16); }
}
@media (min-width: 1100px) {
  :root { --section-y: 96px; }
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + var(--space-4));
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--surface-100);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 24px;
  -webkit-font-smoothing: antialiased;
}

[hidden] { display: none !important; }

h1, h2, h3, p, ol, ul, figure, blockquote { margin: 0; }
ol, ul { padding: 0; list-style: none; }
svg, img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, legend { text-wrap: balance; }
p { text-wrap: pretty; }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
.on-deep :focus-visible,
.on-brand :focus-visible { outline-color: currentColor; }
.js .site-header:not(.is-solid) :focus-visible,
.case--brand :focus-visible,
.on-deep .btn--light:focus-visible { outline-color: var(--on-deep); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Contenedores: .wrap deja el margen de las tarjetas grandes; .wrap--inner alinea el texto con el interior de esas tarjetas */
.wrap {
  width: 100%;
  max-width: 1440px;
  margin-inline: auto;
  padding-inline: calc(var(--outer) + env(safe-area-inset-left, 0px)) calc(var(--outer) + env(safe-area-inset-right, 0px));
}
.wrap--inner {
  padding-inline: calc(var(--inset) + env(safe-area-inset-left, 0px)) calc(var(--inset) + env(safe-area-inset-right, 0px));
}

.skip {
  position: absolute;
  left: var(--space-4);
  top: -100px;
  z-index: 40;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  background: var(--brand);
  color: var(--on-brand);
  font-weight: 600;
  text-decoration: none;
}
.skip:focus { top: var(--space-4); }

/* Tipografía responsiva: los tokens fijan el tamaño de escritorio */
@media (max-width: 719px) {
  .display-xl { font-size: 40px; line-height: 44px; }
  .display-lg { font-size: 32px; line-height: 38px; }
}

.sect-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(24px, 2.1vw, 28px);
  line-height: 1.2;
  letter-spacing: -0.015em;
}

/* ---------- Botones (en forma de píldora, como la referencia) ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 var(--space-6);
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font: 600 16px/24px var(--font-sans);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease, transform 100ms var(--ease-out);
}
.btn:active { transform: scale(0.97); }
.btn[disabled] { opacity: 0.6; cursor: not-allowed; }
.btn--sm { min-height: 44px; padding: 0 var(--space-4); }

.btn--primary { background: var(--brand); color: var(--on-brand); }
.btn--secondary { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn--soft { background: var(--surface-200); color: var(--ink); border-color: var(--line); }

/* Sobre fotos y fondos oscuros */
.btn--light { background: var(--on-deep); color: var(--brand-deep); }
/* Sobre tarjetas de color: cápsula de relleno sólido, un tono distinto al de la tarjeta (cada tarjeta define --pill) */
.btn--tint {
  background: var(--pill);
  border-color: transparent;
  color: inherit;
}

@media (hover: hover) and (pointer: fine) {
  .btn--primary:hover:not([disabled]) { background: color-mix(in srgb, var(--brand) 86%, var(--ink)); }
  .btn--secondary:hover:not([disabled]) { background: var(--surface-200); }
  .btn--soft:hover:not([disabled]) { background: var(--line); }
  .btn--light:hover:not([disabled]) { background: color-mix(in srgb, var(--on-deep) 88%, var(--brand-deep)); }
  .btn--tint:hover:not([disabled]) { background: var(--pill-hover); }
}

/* ---------- Encabezado ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  padding-top: env(safe-area-inset-top, 0px);
  background: var(--surface-100);
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  transition: background-color 200ms ease, border-color 200ms ease, color 200ms ease;
}

.site-header__bar {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  min-height: var(--header-h);
}

/* Con JavaScript, el encabezado flota sobre la foto de la portada y se vuelve sólido al pasarla */
.js .site-header { position: fixed; left: 0; right: 0; }
.js .site-header:not(.is-solid) {
  position: absolute;
  padding-top: calc(var(--outer) + 12px + env(safe-area-inset-top, 0px));
  background: transparent;
  border-bottom-color: transparent;
  color: var(--on-deep);
}
.js .site-header:not(.is-solid) .btn--secondary { color: var(--on-deep); border-color: color-mix(in srgb, var(--on-deep) 55%, transparent); }
@media (hover: hover) and (pointer: fine) {
  .js .site-header:not(.is-solid) .btn--secondary:hover:not([disabled]) { background: color-mix(in srgb, var(--on-deep) 16%, transparent); }
}
@media (prefers-reduced-motion: no-preference) {
  .js .site-header.is-solid { animation: header-in 220ms var(--ease-out); }
  @keyframes header-in { from { transform: translateY(-100%); } to { transform: none; } }
}

.brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  gap: var(--space-3);
  text-decoration: none;
}
.brand picture { flex: none; display: block; }
.brand__logo { flex: none; display: block; height: 24px; width: auto; }

/* Logotipo del encabezado: claro sobre la foto, petróleo sobre fondo claro */
.brand__logo--dark { display: none; }
.site-header.is-solid .brand__logo--light { display: none; }
.site-header.is-solid .brand__logo--dark { display: block; }
.site-header:not(.is-solid) .brand__logo--light { display: block; }
.site-header:not(.is-solid) .brand__logo--dark { display: none; }
/* Sin JavaScript el encabezado es sólido desde el inicio */
html:not(.js) .site-header .brand__logo--light { display: none; }
html:not(.js) .site-header .brand__logo--dark { display: block; }
@media (prefers-color-scheme: dark) {
  html:not(.js) .site-header .brand__logo--light,
  .site-header.is-solid .brand__logo--light { display: block; }
  html:not(.js) .site-header .brand__logo--dark,
  .site-header.is-solid .brand__logo--dark { display: none; }
}

.site-nav__list { display: flex; gap: 26px; }
.site-nav__list a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  color: var(--ink-muted);
  transition: color 150ms ease;
}
.js .site-header:not(.is-solid) .site-nav__list a { color: var(--on-deep); }
@media (hover: hover) and (pointer: fine) {
  .site-nav__list a:hover { color: var(--ink); }
  .js .site-header:not(.is-solid) .site-nav__list a:hover { color: var(--on-deep); }
}

/* Un solo enlace: va siempre a la vista, a la derecha de la barra */
.site-nav { margin-left: auto; }

/* ---------- Portada ---------- */

.hero { padding-top: var(--outer); }

.hero-card {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: clamp(560px, 90svh, 800px);
  padding: calc(var(--header-h) + var(--space-12)) var(--card-pad) var(--card-pad);
  border-radius: clamp(20px, 2.6vw, 32px);
  overflow: hidden;
  background: var(--brand-deep);
  color: var(--on-deep);
}

.hero-card__photo {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Blanco y negro contrastado, de negros profundos como la referencia; medido sobre los píxeles bajo el texto: mínimo 5,6:1 */
  filter: grayscale(1) brightness(0.6) contrast(1.3);
}
/* Capa plana del color de la marca; el texto de la portada va sobre ella */
.hero-card__scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: color-mix(in srgb, var(--brand-deep) 50%, transparent);
}

@media (prefers-reduced-motion: no-preference) {
  .hero-card__photo { animation: settle 1600ms var(--ease-out) backwards; }
  @keyframes settle { from { transform: scale(1.06); } to { transform: scale(1); } }
}

.hero-card__copy { max-width: 820px; }
.hero-card__title { font-weight: 600; font-size: clamp(36px, 4.8vw, 60px); line-height: 1.08; }
.hero-card__lead {
  margin-top: var(--space-6);
  max-width: 30em;
  font-size: 18px;
  line-height: 28px;
  color: color-mix(in srgb, var(--on-deep) 92%, transparent);
}
.hero-card .btn { margin-top: var(--space-8); min-height: 52px; }
@media (max-width: 479px) {
  .hero-card .btn { width: 100%; }
}
/* Escritorio: bloque de texto más contenido, como la referencia (titular en tres líneas, bajada y botón pequeños) */
@media (min-width: 1100px) {
  .hero-card { padding-bottom: 64px; }
  .hero-card__title { font-size: clamp(34px, 3.7vw, 52px); line-height: 1; max-width: 11em; }
  .hero-card__lead { font-size: clamp(15px, 1.15vw, 17px); line-height: 1.65; max-width: 28em; }
  .hero-card .btn { min-height: 46px; font-size: 14px; }
}

/* ---------- Secciones ---------- */

.value, .services, .stages, .process, .contact-section { padding-top: var(--section-y); }

/* Fotos: un solo tratamiento para todas, algo desaturadas para que no choquen con la paleta */
.photo { background: var(--surface-200); overflow: hidden; }
.photo img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.8); }

.more {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  align-self: flex-start;
  padding-block: var(--space-3);
  font-weight: 600;
  text-decoration: none;
  touch-action: manipulation;
}
.more__arrow { transition: transform 200ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .more:hover .more__arrow { transform: translateX(4px); }
}

/* ---------- Valor: cuatro columnas ---------- */

.value__grid { display: grid; gap: var(--space-8) var(--space-6); margin-top: var(--space-8); padding-bottom: var(--space-8); border-bottom: 1px solid var(--line); }
@media (min-width: 600px) {
  .value__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1100px) {
  .value__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); padding-bottom: 0; border-bottom: 0; }
  /* La línea va de borde a borde de la tarjeta, con el mismo aire arriba y abajo */
  .value__grid::after { content: ""; grid-column: 1 / -1; height: 1px; margin: var(--space-4) calc(var(--card-pad) * -1) 0; background: var(--line); }
  .value, .services { padding-top: 48px; }
}

.vitem { display: grid; grid-template-columns: 14px minmax(0, 1fr); column-gap: 14px; row-gap: var(--space-2); align-items: start; align-content: start; }
.vitem__mark {
  width: 14px;
  height: 14px;
  margin-top: 4px;
  background: var(--brand);
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}
.vitem__title { font: 600 15px/20px var(--font-display); }
.vitem__text { grid-column: 2; font-size: 14.5px; line-height: 21px; color: var(--ink-muted); }

/* Iconos de línea simples, uno por columna; toman el color de la marca */
.vitem:nth-child(1) .vitem__mark { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E"); }
.vitem:nth-child(2) .vitem__mark { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20V8l8-4 8 4v12M9 20v-5h6v5M3 20h18'/%3E%3C/svg%3E"); }
.vitem:nth-child(3) .vitem__mark { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 4v16h16M8 15l4-4 3 3 5-6'/%3E%3C/svg%3E"); }
.vitem:nth-child(4) .vitem__mark { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7a2 2 0 0 1 2-2h4l2 2h6a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2z'/%3E%3C/svg%3E"); }

/* ---------- Servicios: título a la izquierda, tarjetas suaves 2×2 ---------- */

.services__grid { display: grid; gap: var(--space-8); }
@media (min-width: 1100px) {
  .services__grid { grid-template-columns: minmax(0, 2fr) minmax(0, 5fr); gap: var(--space-12); }
}

.soft-grid { display: grid; grid-auto-rows: 1fr; gap: var(--space-2); }
@media (min-width: 640px) {
  .soft-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.soft-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  min-height: 190px;
  padding: 20px;
  border-radius: var(--radius-lg);
  background: var(--surface-200);
}
.soft-card__title { font: 700 15px/20px var(--font-display); letter-spacing: 0; }
.soft-card__text { margin-top: 6px; max-width: 26em; font-size: 14.5px; line-height: 21px; color: var(--ink-muted); }
.soft-card .more { font-size: 14px; font-weight: 500; }

/* ---------- Prueba social (plantilla comentada en index.html) ---------- */

.logos__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-4); margin-top: var(--space-8); }
@media (min-width: 720px) {
  .logos__grid { grid-template-columns: repeat(4, 1fr); }
}
.logos__grid li {
  display: grid;
  place-items: center;
  min-height: 96px;
  padding: var(--space-4);
  border-bottom: 1px solid var(--line);
}
.logos__grid img { max-height: 32px; width: auto; max-width: 100%; }

/* ---------- Según tu etapa: carrusel de tarjetas de color ---------- */

.stages__grid { display: grid; gap: var(--space-6); grid-template-columns: minmax(0, 1fr); }
.stages__main { display: contents; }
.stages__controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}
@media (min-width: 720px) {
  .stages__grid { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
  .stages__controls { gap: var(--space-6); }
  .track { grid-column: 1 / -1; }
}

/* Selector y flechas ligeros, como la referencia; el área táctil sigue siendo de 44 px (::after) */
.seg { display: inline-flex; gap: var(--space-1); }
.seg__btn {
  position: relative;
  min-height: 28px;
  padding: 0 var(--space-3);
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--ink-muted);
  font: 500 13px/20px var(--font-sans);
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color 150ms ease, color 150ms ease;
}
.seg__btn::after, .arrow::after { content: ""; position: absolute; inset: -8px; }
.seg__btn.is-active { background: var(--surface-200); color: var(--ink); }
@media (hover: hover) and (pointer: fine) {
  .seg__btn:not(.is-active):hover { color: var(--ink); }
}

.arrows { display: none; gap: var(--space-2); }
@media (min-width: 720px) {
  .arrows { display: flex; }
}
.arrow {
  position: relative;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  font: 500 16px/1 var(--font-sans);
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color 150ms ease, opacity 150ms ease, transform 100ms var(--ease-out);
}
.arrow:active:not(:disabled) { transform: scale(0.94); }
.arrow:disabled { opacity: 0.4; cursor: default; }
@media (hover: hover) and (pointer: fine) {
  .arrow:hover:not(:disabled) { background: var(--surface-200); }
}

/* La pista llega hasta el borde de la pantalla; la primera tarjeta arranca alineada con el título */
.track {
  display: flex;
  gap: var(--space-4);
  margin-inline: calc(var(--inset) * -1);
  padding-inline: var(--inset);
  scroll-padding-inline: var(--inset);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.track::-webkit-scrollbar { display: none; }
.track:focus-visible { outline-offset: -2px; border-radius: var(--radius-lg); }

@media (min-width: 1100px) {
  .stages__grid { grid-template-columns: minmax(0, 2fr) minmax(0, 5fr); align-items: start; column-gap: var(--space-12); }
  .stages__main { display: block; min-width: 0; }
  .stages__controls { justify-content: flex-end; margin-bottom: var(--space-6); }
  .track { grid-column: auto; margin-inline: 0 calc(var(--inset) * -1); padding-inline: 0 var(--inset); scroll-padding-inline: 0; }
  /* Dos tarjetas por vista, con el mismo ancho y separación que las tarjetas de Servicios */
  .track { gap: var(--space-2); }
  .track .case { flex: 0 0 calc((100% - var(--space-2)) / 2); min-height: 560px; }
}

.case {
  flex: 0 0 min(72vw, 440px);
  min-width: 0;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
  min-height: 500px;
  padding: var(--space-6);
  border-radius: var(--radius-lg);
}
@media (min-width: 720px) {
  .case { min-height: 540px; padding: var(--space-8); }
}
/* Fondos planos y sólidos; la cápsula (--pill) y su borde son también colores opacos, mezclados con el fondo de la tarjeta */
.case--brand {
  background: var(--brand-deep);
  color: var(--on-deep);
  --dim: 64%;
  --pill: color-mix(in srgb, var(--on-deep) 16%, var(--brand-deep));
  --pill-hover: color-mix(in srgb, var(--on-deep) 26%, var(--brand-deep));
}
/* En el tema oscuro "ink" es claro: sobre salvia y latón el texto debe ser oscuro, y on-accent lo es en ambos temas.
   Ahí el texto atenuado no alcanza el contraste mínimo (se atenúa menos o nada) y la cápsula se aclara. */
.case--sage {
  background: var(--sage);
  color: var(--on-accent);
  --dim: 90%;
  --pill: color-mix(in srgb, var(--on-deep) 30%, var(--sage));
  --pill-hover: color-mix(in srgb, var(--on-deep) 44%, var(--sage));
}
/* Único relleno de latón de la página */
.case--accent {
  background: var(--accent);
  color: var(--on-accent);
  --dim: 100%;
  --pill: color-mix(in srgb, var(--on-deep) 30%, var(--accent));
  --pill-hover: color-mix(in srgb, var(--on-deep) 44%, var(--accent));
}
.case--sage .case__sub, .case--accent .case__sub { opacity: 1; }

.case__head { text-align: center; padding-bottom: 20px; border-bottom: 1px solid color-mix(in srgb, currentColor 14%, transparent); }
.case__name { font: 700 15px/20px var(--font-display); letter-spacing: 0.1em; text-transform: uppercase; }
.case__sub { margin-top: var(--space-1); font: 600 12px/16px var(--font-sans); letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.8; }

.case__block { display: grid; gap: var(--space-2); }
.case__label { font: 600 15px/20px var(--font-sans); }
.case__text { font-size: 15px; line-height: 22px; color: color-mix(in srgb, currentColor var(--dim, 55%), transparent); }
.case__text b { font-weight: 500; }
.case--brand .case__text b { color: var(--on-deep); }
.case--sage .case__text b, .case--accent .case__text b { color: var(--on-accent); }
.case__cta { display: block; margin-top: auto; align-self: stretch; padding: 12px var(--space-4); font-size: 14px; line-height: 24px; white-space: normal; text-align: center; }
@media (max-width: 479px) {
  .case__cta { padding-inline: var(--space-3); font-size: 13px; }
}

/* ---------- Cómo trabajamos: frase destacada y tarjetas con foto ---------- */

.statement {
  max-width: 24em;
  font: 600 clamp(22px, 2.3vw, 30px) / 1.15 var(--font-display);
  letter-spacing: -0.015em;
}

.steps { display: grid; gap: var(--space-8) var(--space-4); margin-top: var(--space-12); }
@media (min-width: 640px) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1100px) {
  .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.step__photo { aspect-ratio: 3 / 2; border-radius: 12px; }
@media (min-width: 640px) {
  .step__photo { aspect-ratio: 4 / 3; }
}
@media (min-width: 1100px) {
  .step__photo { aspect-ratio: 2.35 / 1; }
}
.step__photo img { transition: transform 500ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .step:hover .step__photo img { transform: scale(1.03); }
}
.step__title { display: flex; align-items: baseline; gap: var(--space-3); margin-top: var(--space-4); font: 600 15px/20px var(--font-display); }
.step__n { flex: none; color: var(--brand); }
.step__text { margin-top: var(--space-2); font-size: 14.5px; line-height: 21px; color: var(--ink-muted); }

.process__cta { display: flex; width: fit-content; margin: var(--space-8) 0 0; border-color: transparent; }

/* ---------- Quiénes somos: título a la izquierda, biografía a la derecha (misma rejilla que Servicios) ---------- */

.about { padding-top: var(--section-y); }
.about__grid { display: grid; gap: var(--space-8); }
@media (min-width: 1100px) {
  .about__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-12); align-items: start; }
  /* El texto arranca a la altura de la foto: baja lo que ocupan el título (una línea) y el espacio bajo él */
  .about__body { margin-top: calc(clamp(24px, 2.1vw, 28px) * 1.2 + var(--space-8)); }
}
.about__side { display: grid; gap: var(--space-8); align-content: start; }
.about__photo { width: 100%; max-width: 360px; aspect-ratio: 4 / 5; border-radius: 12px; }
.about__photo img { object-position: 50% 20%; }
.about__lead { max-width: 30em; font-size: clamp(19px, 1.6vw, 22px); line-height: 1.4; font-weight: 500; letter-spacing: -0.01em; }
.about__text { display: grid; gap: var(--space-4); max-width: 36em; margin-top: var(--space-8); font-size: 16px; line-height: 26px; color: var(--ink-muted); }
/* Texto justificado; con guiones automáticos (lang="es") para evitar huecos grandes entre palabras */
.about__lead, .about__text { text-align: justify; hyphens: auto; -webkit-hyphens: auto; }
.about__person {
  display: grid;
  gap: 2px;
  width: 100%;
  max-width: 360px;
  margin-top: calc(var(--space-2) - var(--space-8)); /* queda pegada a la foto */
  padding: 20px;
  border-radius: var(--radius-lg);
  background: var(--surface-200);
}
.about__name { font: 700 15px/20px var(--font-display); }
.about__role { font-size: 14.5px; line-height: 21px; color: var(--ink-muted); }

/* ---------- Página legal (privacidad) ---------- */

.legal { padding-block: calc(var(--header-h) + var(--space-8)) var(--space-8); }
.legal__wrap { max-width: 860px; margin-inline: auto; }
.legal h1 { margin-bottom: var(--space-6); }
.legal h2 { margin: var(--space-12) 0 var(--space-3); font: 600 20px/1.3 var(--font-display); letter-spacing: -0.01em; }
.legal p, .legal li { max-width: 68ch; color: var(--ink-muted); }
.legal p { margin-top: var(--space-3); }
.legal ul, .legal ol { display: grid; gap: var(--space-2); margin: var(--space-3) 0 0; padding-left: 1.25em; list-style: revert; }
.legal a { color: var(--ink); text-underline-offset: 3px; }
.legal mark { padding: 1px 4px; border-radius: 4px; background: #f3e3a6; color: #14262b; }
.legal__draft { padding: var(--space-4); border-radius: var(--radius-lg); background: var(--surface-200); color: var(--ink); }
.legal__table { margin-top: var(--space-4); overflow-x: auto; }
.legal__table:focus-visible { outline-offset: 2px; }
.legal table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 14.5px; line-height: 21px; }
.legal th, .legal td { padding: var(--space-3) var(--space-4) var(--space-3) 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; color: var(--ink-muted); }
.legal thead th { color: var(--ink); font-weight: 600; }
.legal tbody th { color: var(--ink); font-weight: 600; }
.legal__back { margin-top: var(--space-12); }
.legal__back .more { color: var(--ink); }

/* ---------- Contacto y preguntas frecuentes ---------- */

.contact-section { padding-bottom: var(--outer); }

.contact-card {
  padding: var(--card-pad);
  border-radius: clamp(20px, 2.6vw, 32px);
  background: var(--brand-deep);
  color: var(--on-deep);
}

.contact { display: grid; gap: var(--space-12); }
@media (min-width: 960px) {
  .contact { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-12); align-items: stretch; }
  .faq-card { height: 100%; }
}
.contact__lead { margin-top: var(--space-4); margin-bottom: var(--space-4); color: color-mix(in srgb, var(--on-deep) 86%, transparent); max-width: 26em; }
.contact__direct { margin-bottom: var(--space-8); max-width: 26em; color: color-mix(in srgb, var(--on-deep) 86%, transparent); }
.contact__direct a { color: var(--on-deep); font-weight: 600; text-underline-offset: 3px; }

.contact__panel {
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  background: var(--surface-100);
  color: var(--ink);
}
.contact__panel :focus-visible { outline-color: var(--focus); }
@media (min-width: 720px) {
  .contact__panel { padding: var(--space-8); }
}

.form__progress { margin-bottom: var(--space-6); }
.form__progress p { color: var(--ink-muted); font-weight: 600; }
.form__bars { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: var(--space-2); margin-top: var(--space-2); }
.form__bars span { height: 4px; border-radius: 2px; background: var(--line); transition: background-color 200ms ease; }
.form__bars span.is-done { background: var(--brand); }

.step-fields { margin: 0; padding: 0; border: 0; min-width: 0; }
.step-fields legend { padding: 0; margin-bottom: var(--space-6); }
.step-fields:not([hidden]) { animation: step-in 220ms var(--ease-out) backwards; }
@keyframes step-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  @keyframes step-in { from { opacity: 0; } to { opacity: 1; } }
}

.field { margin-bottom: var(--space-6); }
.field > label, .field > .label { display: block; margin-bottom: var(--space-2); font-size: 14px; line-height: 20px; font-weight: 600; }
.field__optional { font-weight: 400; color: var(--ink-muted); }

/* Campos de a dos desde 720 px, para que el paso no quede largo */
@media (min-width: 720px) {
  .field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--space-4); }
}

input[type="text"], input[type="email"], input[type="tel"], textarea {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--ink);
  font: 400 16px/24px var(--font-sans);
}
textarea { resize: vertical; min-height: 112px; }
input[aria-invalid="true"] { border-color: var(--negative); box-shadow: inset 0 0 0 1px var(--negative); }

.field__error { margin-top: var(--space-2); color: var(--negative); font-size: 14px; line-height: 20px; font-weight: 600; }

.choices { display: grid; gap: var(--space-2); }
.choices--row { grid-template-columns: 1fr 1fr; }
.choice {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 48px;
  margin: 0;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  font-size: 16px;
  line-height: 24px;
  font-weight: 400;
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color 150ms ease;
}
.choice input { flex: none; width: 18px; height: 18px; margin: 0; accent-color: var(--brand); }
.choice:has(input:checked) { background: var(--surface-200); box-shadow: inset 0 0 0 1px var(--brand); border-color: var(--brand); }
.choice:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) {
  .choice:hover { background: var(--surface-200); }
}

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form__status { min-height: 20px; margin-bottom: var(--space-4); color: var(--negative); font-size: 14px; line-height: 20px; font-weight: 600; }
.form__actions { display: flex; gap: var(--space-3); }
.form__actions .btn { flex: 1; }
@media (min-width: 720px) {
  .form__actions .btn { flex: none; }
  .form__actions { justify-content: flex-start; }
}

.thanks { padding-block: var(--space-8); }
.thanks:focus { outline: none; }
.thanks p { margin-top: var(--space-2); color: var(--ink-muted); }

/* Preguntas frecuentes: tarjeta con borde dentro de la tarjeta oscura */
.faq-card {
  padding: var(--space-6);
  border: 1px solid color-mix(in srgb, var(--on-deep) 28%, transparent);
  border-radius: var(--radius-lg);
}
@media (min-width: 720px) {
  .faq-card { padding: var(--space-8); }
}
.faq-card > h2 { margin-bottom: var(--space-6); }

.acc__item { border-top: 1px solid color-mix(in srgb, var(--on-deep) 24%, transparent); }
.acc__item:last-child { border-bottom: 1px solid color-mix(in srgb, var(--on-deep) 24%, transparent); }

.acc__item summary {
  text-wrap: balance;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: 64px;
  padding-block: var(--space-4);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 19px;
  line-height: 26px;
  cursor: pointer;
  list-style: none;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}
.acc__item summary::-webkit-details-marker { display: none; }

.acc__item summary::after {
  content: "";
  flex: none;
  width: 14px;
  height: 14px;
  background:
    linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat,
    linear-gradient(currentColor, currentColor) center / 2px 100% no-repeat;
  transition: transform 200ms var(--ease-out), background-size 200ms var(--ease-out);
}
.acc__item[open] summary::after { transform: rotate(180deg); background-size: 100% 2px, 2px 0; }

.acc__body { padding-bottom: var(--space-6); max-width: 36em; color: color-mix(in srgb, var(--on-deep) 86%, transparent); }

/* ---------- Pie ---------- */

.site-footer {
  margin-top: var(--section-y);
  padding-block: 0 calc(var(--space-8) + env(safe-area-inset-bottom, 0px));
}
.footer { display: grid; gap: var(--space-8); }
@media (min-width: 900px) {
  .footer { grid-template-columns: 5fr 3fr 3fr; gap: var(--space-8) var(--space-6); }
}
.footer__brand { display: flex; flex-direction: column; gap: var(--space-3); align-items: flex-start; }
.footer__tagline { color: var(--brand); }
.footer__legal-name { color: var(--ink-muted); }
.footer__contact a { display: inline-block; padding: 10px 0; font-size: 14px; text-underline-offset: 4px; }
.footer__col h2 { margin-bottom: var(--space-3); color: var(--ink-muted); }
.footer__col a { display: inline-block; padding: 10px 0; text-underline-offset: 4px; }
.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-6);
  padding-top: var(--space-6);
  border-top: 1px solid var(--line);
  color: var(--ink-muted);
}
.footer__bottom a { text-underline-offset: 3px; }
.footer__top { display: inline-block; margin-left: auto; padding: 10px 0; }
@media (min-width: 900px) {
  .footer__bottom { grid-column: 1 / -1; }
}

/* Pantallas de 320 a 359 px: más aire horizontal en el encabezado y márgenes más angostos */
@media (max-width: 359.98px) {
  :root { --outer: var(--space-3); --card-pad: var(--space-4); }
  .site-header__bar, .brand { gap: var(--space-2); }
  .brand__logo { height: 22px; }
  .btn--sm { padding: 0 var(--space-3); }
  .seg__btn { padding: 0 var(--space-3); }
}

/* ---------- Variante "Prism" (?estilo=prism) ----------
   Paleta y tipografía tomadas de la referencia: blanco y negro neutros, verdes y oliva, sans neutra de peso regular.
   La marca de Origina sigue siendo la predeterminada; esto solo reemplaza los tokens y unos pocos pesos. */

html:root[data-estilo="prism"] {
  color-scheme: light;
  --surface-100: #ffffff;
  --surface-200: #f1f3f2;
  --line: #e3e6e5;
  --line-strong: #8a908e;
  --ink: #0a0a0a;
  --ink-muted: #5d6361;
  --brand: #0a0a0a;
  --on-brand: #ffffff;
  --brand-deep: #0f3627;
  --on-deep: #ffffff;
  --accent: #746a50;
  --on-accent: #ffffff;
  --sage: #475b54;
  --focus: #0a0a0a;
  --font-display: "Inter", system-ui, sans-serif;
  --font-sans: "Inter", system-ui, sans-serif;
  --radius-lg: 12px;
  --radius-xl: 16px;
}

html[data-estilo="prism"] .sect-title,
html[data-estilo="prism"] .hero-card__title,
html[data-estilo="prism"] .statement,
html[data-estilo="prism"] .display-lg,
html[data-estilo="prism"] .h1,
html[data-estilo="prism"] .h2 { font-weight: 400; letter-spacing: -0.025em; }
html[data-estilo="prism"] .soft-card__title,
html[data-estilo="prism"] .vitem__title,
html[data-estilo="prism"] .step__title,
html[data-estilo="prism"] .case__name,
html[data-estilo="prism"] .acc__item summary,
html[data-estilo="prism"] .btn { font-weight: 500; }
/* Portada: blanco y negro neutro, sin tinte verde */
html[data-estilo="prism"] .hero-card { background: #111; }
html[data-estilo="prism"] .hero-card__photo { filter: grayscale(1) brightness(0.62) contrast(1.25); }
html[data-estilo="prism"] .hero-card__scrim { background: rgb(0 0 0 / 0.36); }
html[data-estilo="prism"] .btn--light { color: #0a0a0a; }

/* Tarjetas de color: verde oscuro, verde grisáceo y oliva, con texto claro; cápsulas sólidas */
html[data-estilo="prism"] .case--sage {
  color: var(--on-deep);
  --dim: 72%;
  --pill: color-mix(in srgb, #fff 16%, var(--sage));
  --pill-hover: color-mix(in srgb, #fff 26%, var(--sage));
}
/* Sobre el oliva una cápsula clara baja el contraste del texto blanco: aquí se oscurece */
html[data-estilo="prism"] .case--accent {
  --pill: color-mix(in srgb, #000 22%, var(--accent));
  --pill-hover: color-mix(in srgb, #000 32%, var(--accent));
}

/* El tema es siempre claro: el logotipo no cambia con la preferencia del sistema */
html[data-estilo="prism"] .site-header.is-solid .brand__logo--light { display: none; }
html[data-estilo="prism"] .site-header.is-solid .brand__logo--dark { display: block; }
