/* =========================================================
   Lucas Kiryk Digital — Identidad Celeste
   Concepto: campaña fotográfica. Secciones azul noche y blancas
   alternadas, celeste como acento de marca, títulos condensados
   en mayúsculas y datos técnicos de rodaje en mono.
   ========================================================= */

:root {
  --noche: #092744;        /* fondos principales y texto sobre blanco */
  --noche-2: #0d3157;      /* superficies sobre azul noche */
  --azul: #0075c9;         /* enlaces y botón sobre blanco */
  --celeste: #91cff0;      /* identidad: botones, resaltados, franjas */
  --celeste-claro: #e9f6fd;
  --blanco: #ffffff;
  --dorado: #c5a363;       /* solo detalles pequeños */
  --gris: #3a5470;         /* texto secundario sobre blanco */
  --borde: #d6e8f3;        /* bordes sobre blanco */
  --linea-noche: rgba(145, 207, 240, 0.28);
  --texto-noche: rgba(255, 255, 255, 0.8);
  --error: #c0392b;

  --f-sans: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --f-mono: "Chivo Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --wrap: 1360px;
  --gutter: clamp(16px, 4vw, 56px);
  --radius: 6px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 76px;

  color-scheme: light;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 8px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--blanco);
  color: var(--noche);
  font-family: var(--f-sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--azul); }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
figure { margin: 0; }

:focus-visible { outline: 3px solid var(--azul); outline-offset: 3px; }
.section-noche :focus-visible, .hero :focus-visible, .site-header :focus-visible, .valley :focus-visible, .site-footer :focus-visible { outline-color: var(--celeste); }
::selection { background: var(--celeste); color: var(--noche); }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  background: var(--celeste);
  color: var(--noche);
  padding: 10px 16px;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 700;
}
.skip-link:focus { top: 12px; }

/* ---------- Tipografía ---------- */
.eyebrow, .label {
  font-family: var(--f-mono);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--azul);
}
.eyebrow-celeste { color: var(--celeste); }

.title {
  font-weight: 800;
  font-stretch: 75%;
  text-transform: uppercase;
  font-size: clamp(2.6rem, 6.2vw, 5.8rem);
  line-height: 0.9;
  letter-spacing: -0.005em;
}
.title::after {
  /* trazo celeste bajo los títulos */
  content: "";
  display: block;
  width: 72px;
  height: 6px;
  margin-top: 0.32em;
  border-radius: 3px;
  background: var(--azul);
  transform: rotate(-2deg);
  transform-origin: left;
}
.section-noche .title::after, .valley .title::after { background: var(--celeste); }
.title mark { background: var(--celeste); color: var(--noche); padding: 0 0.08em; }
.title-xl { font-size: clamp(3rem, 7.6vw, 7rem); }
.title-xl span { color: var(--azul); }

.lead { font-size: clamp(1.1rem, 1.5vw, 1.3rem); line-height: 1.55; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 0 30px;
  border-radius: 999px;
  font-family: var(--f-sans);
  font-weight: 700;
  font-size: 1.02rem;
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn-celeste { background: var(--celeste); color: var(--noche); }
.btn-celeste:hover { background: var(--blanco); }
.btn-outline { border-color: rgba(255, 255, 255, 0.6); color: var(--blanco); }
.btn-outline:hover { border-color: var(--celeste); color: var(--celeste); }
.btn-white { background: var(--blanco); color: var(--noche); }
.btn-white:hover { background: var(--celeste); }
.btn-azul { background: var(--azul); color: var(--blanco); }
.btn-azul:hover { background: var(--noche); }
.btn-small { min-height: 44px; padding: 0 22px; font-size: 0.95rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.6; cursor: wait; transform: none; }

.text-link {
  color: var(--celeste);
  text-decoration: none;
  font-weight: 700;
  border-bottom: 2px solid currentColor;
  padding-bottom: 3px;
}
.text-link:hover { color: var(--blanco); }

/* ---------- Encabezado ---------- */
.site-header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 50;
  background: var(--noche);
  color: var(--blanco);
  transition: box-shadow 0.3s var(--ease);
}
.site-header.is-scrolled { box-shadow: 0 10px 30px -12px rgba(9, 39, 68, 0.55); }

.stripe { display: flex; height: 4px; }
.stripe i { flex: 1; background: var(--celeste); }
.stripe i:nth-child(2) { background: var(--blanco); }

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 9px;
  color: var(--blanco);
  text-decoration: none;
  flex-shrink: 0;
}
.brand-name {
  font-weight: 800;
  font-stretch: 125%;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
  line-height: 1;
  white-space: nowrap;
}
.brand-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--dorado);
  display: inline-block;
  flex: none;
}
.brand-sub {
  font-family: var(--f-mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--celeste);
}

.main-nav { display: flex; gap: 30px; }
.main-nav a {
  color: var(--blanco);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  padding-block: 6px;
}
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--celeste);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}
.main-nav a:hover::after, .main-nav a.is-current::after { transform: scaleX(1); }

.header-actions { display: flex; align-items: center; gap: 14px; }

.lang-switch {
  display: inline-flex;
  border: 1px solid rgba(145, 207, 240, 0.45);
  border-radius: 999px;
  padding: 3px;
}
.lang-btn {
  font-family: var(--f-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  background: transparent;
  color: var(--blanco);
  border: 0;
  border-radius: 999px;
  padding: 7px 12px;
  min-height: 34px;
  cursor: pointer;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease);
}
.lang-btn.is-active { background: var(--celeste); color: var(--noche); }

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(145, 207, 240, 0.45);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  position: relative;
}
.menu-toggle span {
  position: absolute;
  left: 13px; right: 13px;
  height: 1.6px;
  background: var(--blanco);
  transition: transform 0.3s var(--ease), top 0.3s var(--ease);
}
.menu-toggle span:first-child { top: 17px; }
.menu-toggle span:last-child { top: 25px; }
.menu-toggle[aria-expanded="true"] span:first-child { top: 21px; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:last-child { top: 21px; transform: rotate(-45deg); }

/* ---------- Fotografías ----------
   Cada .photo muestra un fondo de marca mientras carga la foto.
   Si el archivo todavía no existe, queda el fondo con una etiqueta. */
.photo {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 76% 28%, rgba(145, 207, 240, 0.5), rgba(145, 207, 240, 0) 42%),
    linear-gradient(135deg, #0b3460 0%, var(--azul) 64%, var(--celeste) 100%);
}
.photo picture, .photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.photo img { object-fit: cover; object-position: var(--focus, 50% 50%); }
.js .photo img { opacity: 0; transition: opacity 0.9s var(--ease); }
.js .photo.is-loaded img { opacity: 1; }
.photo.is-missing img { display: none; }
.photo.is-missing::after {
  content: attr(data-label);
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 1;
  font-family: var(--f-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blanco);
  background: rgba(9, 39, 68, 0.55);
  padding: 6px 10px;
  border-radius: 3px;
}

/* Encuadre de cada foto: punto que se mantiene visible al recortar */
.photo[data-photo="nosotros"] { --focus: 45% 55%; }
.photo[data-photo="presencia"] { --focus: 50% 38%; }
.photo[data-photo="contenido"] { --focus: 38% 45%; }
.photo[data-photo="estrategia"] { --focus: 48% 50%; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: clamp(600px, 86vh, 860px);
  display: flex;
  align-items: center;
  background: var(--noche);
  color: var(--blanco);
  overflow: hidden;
  isolation: isolate;
}
.hero-photo { position: absolute; inset: 0; z-index: -2; --focus: 72% 50%; }
.hero-photo.is-missing::after { top: auto; bottom: 22px; left: auto; right: var(--gutter); }
.hero-shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(9, 39, 68, 0.96) 0%, rgba(9, 39, 68, 0.82) 34%, rgba(9, 39, 68, 0.25) 66%, rgba(9, 39, 68, 0.05) 100%),
    linear-gradient(0deg, rgba(9, 39, 68, 0.6) 0%, rgba(9, 39, 68, 0) 30%);
}
.hero-content { padding-block: clamp(64px, 9vw, 120px); }
.hero-content > * { max-width: 760px; }
.hero-title {
  margin-top: 22px;
  font-weight: 800;
  font-stretch: 75%;
  text-transform: uppercase;
  font-size: clamp(3.6rem, 8.6vw, 8.4rem);
  line-height: 0.88;
  letter-spacing: -0.005em;
}
.hero-title span { color: var(--celeste); }
.hero-sub { margin-top: 26px; max-width: 34em; font-size: clamp(1.08rem, 1.5vw, 1.28rem); color: var(--texto-noche); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: 36px;
  font-family: var(--f-mono);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--texto-noche);
}
.hero-tags li { display: inline-flex; align-items: center; gap: 8px; }
.hero-tags li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--celeste); }
.hero-rec {
  position: absolute;
  top: 24px;
  right: var(--gutter);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--f-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--blanco);
  background: rgba(9, 39, 68, 0.5);
  padding: 6px 10px;
  border-radius: 3px;
  font-variant-numeric: tabular-nums;
}
.hero-rec i { width: 8px; height: 8px; border-radius: 50%; background: #ff5a4f; animation: blink 1.4s steps(2, start) infinite; }
@keyframes blink { to { visibility: hidden; } }

.hero-content > * { animation: rise 1s var(--ease) both; }
.hero-content > *:nth-child(2) { animation-delay: 0.08s; }
.hero-content > *:nth-child(3) { animation-delay: 0.16s; }
.hero-content > *:nth-child(4) { animation-delay: 0.24s; }
.hero-content > *:nth-child(5) { animation-delay: 0.32s; }
@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }

/* ---------- Ciudades ---------- */
.cities { background: var(--celeste); color: var(--noche); overflow: hidden; padding-block: 16px; }
.cities-track { display: flex; width: max-content; animation: marquee 40s linear infinite; }
.cities-track span {
  display: inline-flex;
  align-items: center;
  font-weight: 800;
  font-stretch: 75%;
  text-transform: uppercase;
  font-size: clamp(1.5rem, 2.6vw, 2.2rem);
  line-height: 1.1;
  white-space: nowrap;
  padding-inline: 22px;
}
.cities-track span::after { content: "/"; color: var(--azul); margin-left: 44px; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Secciones ---------- */
.section { padding-block: clamp(80px, 10vw, 140px); }
.section-white { background: var(--blanco); color: var(--noche); }
.section-noche { background: var(--noche); color: var(--blanco); }
.section-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px 48px;
  margin-bottom: clamp(44px, 5vw, 72px);
}
.section-head > div { display: flex; flex-direction: column; gap: 20px; }
.section-intro { max-width: 44ch; font-size: 1.05rem; color: var(--gris); }
.section-noche .section-intro { color: var(--texto-noche); }

/* Nosotros */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: stretch;
}
.about-photo { aspect-ratio: 4 / 5; border-radius: var(--radius); max-width: 100%; --focus: 50% 50%; }
.about-copy { display: flex; flex-direction: column; gap: 30px; min-width: 0; align-self: center; }
.pillars {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  border-top: 2px solid var(--noche);
  padding-top: 28px;
}
.pillar { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.pillar-mark { width: 14px; height: 14px; display: block; }
.mark-azul { background: var(--azul); }
.mark-celeste { background: var(--celeste); }
.mark-noche { background: var(--noche); }
.pillar h3 { font-size: 1.2rem; font-weight: 700; }
.pillar p { font-size: 0.98rem; color: var(--gris); }
.audience { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; }
.audience .label { color: var(--gris); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips li {
  border: 1.5px solid var(--noche);
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 0.95rem;
  font-weight: 500;
  transition: background-color 0.25s var(--ease);
}
.chips li:hover { background: var(--celeste); }

/* Servicios */
.svc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(18px, 2vw, 28px); }
.svc { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.svc-photo { aspect-ratio: 4 / 5; border-radius: var(--radius); max-width: 100%; }
.svc-photo img { transition: opacity 0.9s var(--ease), transform 1.2s var(--ease); }
.svc:hover .svc-photo img { transform: scale(1.04); }
.svc-photo::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(0deg, rgba(9, 39, 68, 0.96) 0%, rgba(9, 39, 68, 0.7) 34%, rgba(9, 39, 68, 0) 64%);
}
.svc-overlay {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: clamp(22px, 2.4vw, 32px);
}
.svc-overlay h3 {
  font-weight: 800;
  font-stretch: 75%;
  text-transform: uppercase;
  font-size: clamp(2rem, 2.8vw, 2.6rem);
  line-height: 0.92;
}
.svc-overlay h3::after {
  content: "";
  display: block;
  width: 52px;
  height: 5px;
  margin-top: 12px;
  border-radius: 3px;
  background: var(--celeste);
  transform: rotate(-2deg);
}
.svc-overlay p { color: var(--texto-noche); font-size: 1rem; max-width: 30ch; }
.svc-list { display: flex; flex-direction: column; border-top: 1px solid var(--linea-noche); }
.svc-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-block: 13px;
  border-bottom: 1px solid var(--linea-noche);
  font-weight: 600;
}
.svc-list li::after { content: "↗"; color: var(--celeste); }

/* Central Valley */
.valley {
  position: relative;
  min-height: clamp(520px, 56vw, 720px);
  display: flex;
  align-items: center;
  color: var(--blanco);
  background: var(--noche);
  overflow: hidden;
  isolation: isolate;
}
.valley-photo { position: absolute; inset: 0; z-index: -2; --focus: 50% 55%; }
.valley-photo.is-missing::after { top: auto; bottom: 22px; left: auto; right: var(--gutter); }
.valley-shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(9, 39, 68, 0.94) 0%, rgba(9, 39, 68, 0.75) 38%, rgba(9, 39, 68, 0.1) 72%);
}
.valley-content { display: flex; flex-direction: column; gap: 22px; padding-block: 80px; }
.valley-content > * { max-width: 620px; }
.valley-content .lead { color: var(--texto-noche); }
.valley-cities {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, max-content));
  gap: 6px 48px;
  margin-top: 8px;
}
.valley-cities li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-stretch: 75%;
  text-transform: uppercase;
  font-size: clamp(1.5rem, 2.4vw, 2.1rem);
  line-height: 1.2;
}
.valley-cities li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--celeste); flex: none; }
.valley-cities .more {
  grid-column: 1 / -1;
  font-weight: 500;
  font-stretch: 100%;
  text-transform: none;
  font-size: 1rem;
  color: var(--texto-noche);
}
.valley-cities .more::before { display: none; }

/* Portafolio */
.work-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 2.4vw, 32px); }
.work-card { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.work-card figure {
  overflow: hidden;
  aspect-ratio: 4 / 3;
  max-width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--borde);
  background: var(--celeste-claro);
}
.work-card figure img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--ease); }
.work-card:hover figure img { transform: scale(1.04); }
.work-meta { display: flex; flex-direction: column; gap: 8px; }
.work-meta h3 { font-size: 1.2rem; font-weight: 700; }
.work-meta p { color: var(--gris); font-size: 0.96rem; }
.demo-badge {
  align-self: flex-start;
  font-family: var(--f-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blanco);
  background: var(--noche);
  padding: 5px 10px;
  border-radius: 3px;
}
.work-card-open { background: var(--noche); color: var(--blanco); border-radius: var(--radius); }
.open-inner { display: flex; flex-direction: column; justify-content: flex-end; gap: 14px; padding: 36px 32px; height: 100%; min-height: 320px; }
.open-plus { font-weight: 800; font-size: 4rem; line-height: 0.8; color: var(--celeste); }
.open-inner h3 { font-weight: 800; font-stretch: 75%; text-transform: uppercase; font-size: 2.2rem; line-height: 0.95; }
.open-inner p { color: var(--texto-noche); }
.open-inner .text-link { align-self: flex-start; margin-top: 4px; }

/* Proceso */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.step {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px 28px 8px 0;
  border-top: 1px solid var(--linea-noche);
}
.step::before {
  /* filete dorado: detalle pequeño */
  content: "";
  position: absolute;
  top: -1px; left: 0;
  width: 44px;
  height: 2px;
  background: var(--dorado);
}
.step-num { font-family: var(--f-mono); font-size: 0.85rem; color: var(--celeste); }
.step h3 { font-weight: 800; font-stretch: 75%; text-transform: uppercase; font-size: clamp(1.9rem, 2.6vw, 2.4rem); line-height: 0.95; }
.step p { color: var(--texto-noche); }

/* Contacto */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}
.contact-copy { display: flex; flex-direction: column; gap: 26px; min-width: 0; }
.contact-copy .lead { color: var(--gris); max-width: 36ch; }
.contact-facts { display: flex; flex-direction: column; gap: 20px; margin: 6px 0 0; padding-top: 26px; border-top: 2px solid var(--noche); }
.contact-facts dt { font-family: var(--f-mono); font-size: 0.74rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--azul); margin-bottom: 4px; }
.contact-facts dd { margin: 0; max-width: 40ch; }

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: clamp(24px, 3.4vw, 44px);
  border-radius: var(--radius);
  background: var(--celeste-claro);
  min-width: 0;
}
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field label { font-size: 0.9rem; font-weight: 600; }
.field input, .field select, .field textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  color: var(--noche);
  background: var(--blanco);
  border: 1.5px solid #b8d9ec;
  border-radius: 4px;
  padding: 14px 16px;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.field textarea { resize: vertical; min-height: 140px; }
.field input::placeholder, .field textarea::placeholder { color: #6b8299; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--azul); box-shadow: 0 0 0 3px rgba(0, 117, 201, 0.2); }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--error); }
.field-error { font-size: 0.85rem; color: var(--error); font-weight: 500; }
.field-error:empty { display: none; }
.select-wrap { position: relative; }
.select-wrap::after {
  content: "";
  position: absolute;
  right: 18px; top: 50%;
  width: 8px; height: 8px;
  border-right: 2px solid var(--azul);
  border-bottom: 2px solid var(--azul);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}
.field select { appearance: none; -webkit-appearance: none; padding-right: 44px; cursor: pointer; }
.form-note { font-size: 0.85rem; color: var(--gris); }
.req { color: var(--azul); font-weight: 700; }
.optional { font-weight: 400; color: var(--gris); }

/* Grupos de opciones (idioma preferido, medio de contacto) */
fieldset.field { border: 0; margin: 0; padding: 0; min-width: 0; }
fieldset.field legend { padding: 0; margin-bottom: 8px; font-size: 0.9rem; font-weight: 600; }
.pills { display: grid; gap: 8px; }
.pills-2, .pills-2x2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pill { position: relative; display: block; cursor: pointer; }
.pill input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.pill span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 8px 12px;
  text-align: center;
  line-height: 1.25;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--noche);
  background: var(--blanco);
  border: 1.5px solid #b8d9ec;
  border-radius: 4px;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.pill:hover span { border-color: var(--azul); }
.pill input:checked + span { background: var(--azul); border-color: var(--azul); color: var(--blanco); font-weight: 600; }
.pill input:focus-visible + span { outline: 3px solid var(--azul); outline-offset: 2px; }
.choice.has-error .pill span { border-color: var(--error); }

.form-privacy { font-size: 0.85rem; color: var(--gris); text-align: center; }
.form-status { padding: 16px 18px; border-radius: 4px; font-weight: 600; }
.form-status.is-success { background: var(--blanco); border: 1.5px solid var(--azul); color: var(--noche); }
.form-status.is-error { background: var(--blanco); border: 1.5px solid var(--error); color: var(--error); }
.form-status.is-info { background: var(--blanco); border: 1.5px dashed var(--gris); color: var(--noche); font-weight: 500; }
.form-status:focus { outline: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Pie */
.site-footer { background: var(--noche); color: var(--blanco); padding-top: 64px; }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 32px; padding-bottom: 44px; }
.footer-brand { display: flex; flex-direction: column; gap: 14px; }
.footer-logo {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-weight: 800;
  font-stretch: 125%;
  font-size: clamp(2.2rem, 5vw, 4.4rem);
  letter-spacing: -0.035em;
  line-height: 1;
}
.footer-logo .brand-dot { width: 10px; height: 10px; }
.footer-tag { color: var(--texto-noche); max-width: 40ch; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 12px 28px; }
.footer-nav a { color: var(--blanco); text-decoration: none; font-size: 0.95rem; }
.footer-nav a:hover { color: var(--celeste); }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding-block: 22px calc(22px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--linea-noche);
  font-family: var(--f-mono);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  color: var(--texto-noche);
}

/* Enlaces a la política de privacidad */
.form-privacy a { color: var(--azul); font-weight: 600; white-space: nowrap; }
.form-privacy a:hover { color: var(--noche); }
.footer-legal a { color: var(--blanco); text-decoration: underline; text-underline-offset: 3px; }
.footer-legal a:hover { color: var(--celeste); }

/* ---------- Página legal (/privacy/) ---------- */
.legal-hero { background: var(--noche); color: var(--blanco); padding-block: clamp(56px, 8vw, 104px) clamp(48px, 6vw, 80px); }
.legal-hero .wrap { display: flex; flex-direction: column; gap: 18px; }
.legal-hero .title { font-size: clamp(2.8rem, 7vw, 6rem); }
.legal-hero .title::after { background: var(--celeste); }
.legal-updated { font-family: var(--f-mono); font-size: 0.8rem; letter-spacing: 0.08em; color: var(--texto-noche); }
.legal { background: var(--blanco); padding-block: clamp(48px, 7vw, 96px); }
.legal-grid {
  display: grid;
  grid-template-columns: minmax(0, 280px) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: start;
}
.legal-toc {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px;
  border-radius: var(--radius);
  background: var(--celeste-claro);
}
.legal-toc .label { color: var(--azul); }
.legal-toc ol { list-style: decimal; padding-left: 1.2em; display: flex; flex-direction: column; gap: 8px; font-size: 0.92rem; line-height: 1.35; }
.legal-toc a { color: var(--noche); text-decoration: none; }
.legal-toc a:hover { color: var(--azul); text-decoration: underline; }
.legal-body { max-width: 72ch; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.legal-body h2 {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--borde);
  font-weight: 800;
  font-stretch: 75%;
  text-transform: uppercase;
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
  line-height: 1;
  scroll-margin-top: calc(var(--header-h) + 24px);
}
.legal-body h3 { margin-top: 8px; font-size: 1.1rem; font-weight: 700; }
.legal-body p, .legal-body li { color: var(--noche); }
.legal-body ul { list-style: disc; padding-left: 1.3em; display: flex; flex-direction: column; gap: 6px; }
.legal-body a { color: var(--azul); font-weight: 600; overflow-wrap: anywhere; }
.legal-body a.btn { color: var(--blanco); }
.legal-lead { font-size: clamp(1.1rem, 1.5vw, 1.25rem); line-height: 1.55; }
.legal-callout { padding: 16px 20px; background: var(--celeste-claro); border-radius: var(--radius); }
.legal-back { margin-top: 24px; }
.pending-email {
  font-family: var(--f-mono);
  font-size: 0.85em;
  background: #fff3cd;
  color: #6b4e00;
  padding: 1px 6px;
  border-radius: 3px;
}
@media (max-width: 860px) {
  .legal-grid { grid-template-columns: minmax(0, 1fr); }
  .legal-toc { position: static; }
}

/* ---------- Aparición al hacer scroll ---------- */
.js-reveal .reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.js-reveal .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .main-nav { gap: 22px; }
  .header-cta { display: none; }
}

@media (max-width: 1020px) {
  .svc-grid, .work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .svc:last-child { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: end; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 28px; }
  .pillars { grid-template-columns: minmax(0, 1fr); gap: 20px; }
}

@media (max-width: 860px) {
  .menu-toggle { display: inline-block; }
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    padding: 8px var(--gutter) 28px;
    background: var(--noche);
    border-top: 1px solid var(--linea-noche);
    box-shadow: 0 30px 60px -20px rgba(9, 39, 68, 0.7);
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0.3s;
  }
  .main-nav.is-open { opacity: 1; visibility: visible; transform: none; }
  .main-nav a {
    font-weight: 800;
    font-stretch: 75%;
    text-transform: uppercase;
    font-size: 2rem;
    padding-block: 12px;
    border-bottom: 1px solid var(--linea-noche);
  }
  .main-nav a::after { display: none; }

  /* En celular la foto va arriba, entera y visible, y el texto debajo */
  .hero { display: block; min-height: 0; }
  .hero-photo { position: relative; inset: auto; z-index: 0; aspect-ratio: 4 / 3; max-width: 100%; --focus: 78% 50%; }
  .hero-shade {
    inset: 0 0 auto 0;
    z-index: 1;
    aspect-ratio: 4 / 3;
    background: linear-gradient(0deg, var(--noche) 0%, rgba(9, 39, 68, 0.55) 28%, rgba(9, 39, 68, 0) 55%);
  }
  .hero-photo.is-missing::after { top: 18px; bottom: auto; left: 18px; right: auto; }
  .hero-content { position: relative; z-index: 2; margin-top: -56px; padding-block: 0 56px; }
  .hero-rec { z-index: 2; top: 16px; }
  .about-grid, .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .about-photo { aspect-ratio: 4 / 3; }
  .valley { display: block; min-height: 0; }
  .valley-photo { position: relative; inset: auto; z-index: 0; aspect-ratio: 4 / 3; max-width: 100%; --focus: 50% 60%; }
  .valley-shade {
    inset: 0 0 auto 0;
    z-index: 1;
    aspect-ratio: 4 / 3;
    background: linear-gradient(0deg, var(--noche) 0%, rgba(9, 39, 68, 0.5) 26%, rgba(9, 39, 68, 0) 52%);
  }
  .valley-content { position: relative; z-index: 2; margin-top: -40px; padding-block: 0 64px; }
  .valley-photo.is-missing::after { top: 18px; bottom: auto; left: 18px; right: auto; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .brand-name { font-size: 1.1rem; }
  .brand-sub { display: none; }
  .header-actions { gap: 8px; }
  .lang-btn { padding: 6px 9px; }
  .hero-rec { display: none; }
  .hero-actions .btn { width: 100%; }
  .svc-grid, .work-grid, .steps { grid-template-columns: minmax(0, 1fr); }
  .svc:last-child { grid-column: auto; display: flex; flex-direction: column; }
  .step { padding-right: 0; }
  .field-row { grid-template-columns: minmax(0, 1fr); }
  .valley-cities { gap: 4px 28px; }
}

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