/* ==========================================================================
   CodeQuality.es — Sistema de diseño
   Editorial Tech · Fraunces + Inter Tight + JetBrains Mono
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght,SOFT@0,9..144,300..900,0..100;1,9..144,300..900,0..100&family=Inter+Tight:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* --- Tokens --- */
:root {
  /* Colores — paleta alineada con el logo CodeQuality */
  --bone: #FFFFFF;           /* blanco nuclear — fondo principal */
  --bone-dark: #EDECEA;      /* hovers sutiles */
  --bone-line: #E3E1DE;      /* bordes y divisores */
  --ink: #0E0E0C;
  --ink-soft: #2A2A27;
  --ink-mute: #6B665E;
  --paper: #F7F6F4;          /* blanco crudo — secciones alternas */
  --accent: #204E77;         /* azul CodeQuality (del logo) */
  --accent-hot: #2E6FAB;     /* azul más brillante para hover */
  --accent-soft: rgba(32, 78, 119, 0.08);
  --accent-deep: #0E2942;    /* azul muy oscuro, para fondos */
  --forest: #1F4D3A;

  /* Tipografía */
  --font-display: 'Fraunces', 'Times New Roman', serif;
  --font-body: 'Inter Tight', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;

  /* Ritmo */
  --r-max: 1320px;
  --r-gutter: clamp(1.25rem, 4vw, 3rem);
  --r-section: clamp(4rem, 10vw, 8rem);

  /* Transiciones */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bone);
  background-image:
    radial-gradient(circle at 15% 10%, rgba(32, 78, 119, 0.04), transparent 40%),
    radial-gradient(circle at 85% 90%, rgba(31, 77, 58, 0.04), transparent 40%);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* --- Grano sutil en background --- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.12;
  z-index: 1;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.03 0 0 0 0 0.03 0 0 0 0 0.03 0 0 0 0.4 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

/* --- Contenedor --- */
.container {
  width: 100%;
  max-width: var(--r-max);
  margin: 0 auto;
  padding: 0 var(--r-gutter);
  position: relative;
  z-index: 2;
}

/* ==========================================================================
   Tipografía
   ========================================================================== */

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-mute);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.eyebrow::before {
  content: '';
  width: 18px;
  height: 1px;
  background: var(--accent);
}

.eyebrow.no-line::before { display: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  font-variation-settings: "opsz" 144, "SOFT" 30;
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: var(--ink);
}

h1 {
  font-size: clamp(3rem, 8.5vw, 7.5rem);
  font-weight: 300;
  line-height: 0.96;
  letter-spacing: -0.035em;
}

h2 {
  font-size: clamp(2.25rem, 5vw, 4rem);
  font-weight: 350;
  line-height: 1.02;
}

h3 {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 400;
  line-height: 1.15;
}

h4 {
  font-size: clamp(1.15rem, 1.5vw, 1.35rem);
  font-weight: 500;
  font-variation-settings: "opsz" 24, "SOFT" 20;
  line-height: 1.25;
}

.italic { font-style: italic; font-variation-settings: "opsz" 144, "SOFT" 100; }

p { color: var(--ink-soft); max-width: 65ch; }
.lede { font-size: clamp(1.15rem, 1.5vw, 1.3rem); color: var(--ink-soft); line-height: 1.55; max-width: 42ch; }

/* ==========================================================================
   Navegación
   ========================================================================== */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  background: rgba(255, 255, 255, 0.78);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}

.nav.scrolled {
  border-bottom-color: var(--bone-line);
  background: rgba(255, 255, 255, 0.92);
}

.nav__inner {
  max-width: var(--r-max);
  margin: 0 auto;
  padding: 1.1rem var(--r-gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0;
  color: var(--ink);
  line-height: 1;
}
.logo img {
  height: 32px;
  width: auto;
  display: block;
}
@media (max-width: 520px) {
  .logo img { height: 28px; }
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}

.nav__link {
  display: block;
  padding: 0.55rem 1rem;
  font-size: 14.5px;
  font-weight: 450;
  color: var(--ink-soft);
  border-radius: 999px;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
  position: relative;
}

.nav__link:hover { color: var(--ink); background: rgba(14, 14, 12, 0.05); }
.nav__link.active { color: var(--ink); }
.nav__link.active::before {
  content: '';
  position: absolute;
  left: 1rem;
  bottom: 0.25rem;
  width: calc(100% - 2rem);
  height: 1px;
  background: var(--accent);
}

.nav__cta {
  padding: 0.65rem 1.15rem;
  font-size: 14px;
  font-weight: 500;
  background: var(--ink);
  color: var(--paper);
  border-radius: 999px;
  transition: background 0.25s var(--ease), transform 0.25s var(--ease);
}
.nav__cta:hover { background: var(--accent); transform: translateY(-1px); }

/* Mobile toggle */
.nav__toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--bone-line);
  align-items: center;
  justify-content: center;
}
.nav__toggle span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--ink);
  position: relative;
  transition: transform 0.3s var(--ease);
}
.nav__toggle span::before,
.nav__toggle span::after {
  content: '';
  position: absolute;
  left: 0;
  width: 18px;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.3s var(--ease);
}
.nav__toggle span::before { top: -6px; }
.nav__toggle span::after { top: 6px; }

.nav.open .nav__toggle span { background: transparent; }
.nav.open .nav__toggle span::before { transform: translateY(6px) rotate(45deg); }
.nav.open .nav__toggle span::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 860px) {
  .nav__toggle { display: inline-flex; }
  .nav__links {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--paper);
    flex-direction: column;
    align-items: stretch;
    padding: 1rem var(--r-gutter) 2rem;
    gap: 0.25rem;
    border-bottom: 1px solid var(--bone-line);
    transform: translateY(-120%);
    transition: transform 0.4s var(--ease);
  }
  .nav.open .nav__links { transform: translateY(0); }
  .nav__link { padding: 0.85rem 1rem; font-size: 1rem; }
  .nav__cta { align-self: flex-start; margin-top: 0.5rem; }
}

/* ==========================================================================
   Hero (home)
   ========================================================================== */

.hero {
  position: relative;
  padding: clamp(3rem, 8vw, 6rem) 0 clamp(4rem, 10vw, 8rem);
  overflow: hidden;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: end;
}

@media (min-width: 960px) {
  .hero__grid { grid-template-columns: 1.4fr 1fr; gap: 4rem; }
}

.hero__eyebrow {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  color: var(--ink-mute);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero__eyebrow .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.5; }
}

.hero h1 { max-width: 14ch; }
.hero h1 em {
  font-style: italic;
  font-variation-settings: "opsz" 144, "SOFT" 100;
  color: var(--accent);
  font-weight: 350;
}

.hero__meta {
  padding-left: clamp(0rem, 2vw, 2rem);
  padding-bottom: 0.5rem;
  border-left: 1px solid var(--bone-line);
}

@media (max-width: 960px) {
  .hero__meta { border-left: none; padding-left: 0; border-top: 1px solid var(--bone-line); padding-top: 2rem; }
}

.hero__meta p { font-size: 1rem; line-height: 1.6; }

.hero__tags {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.8rem;
  border: 1px solid var(--bone-line);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: var(--paper);
}
.tag::before {
  content: '';
  width: 4px;
  height: 4px;
  background: var(--accent);
  border-radius: 50%;
}

/* ==========================================================================
   Botones
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.95rem 1.7rem;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.005em;
  border-radius: 999px;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease), color 0.25s var(--ease);
  cursor: pointer;
}

.btn--primary {
  background: var(--ink);
  color: var(--paper);
}
.btn--primary:hover { background: var(--accent); transform: translateY(-2px); }

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
}
.btn--ghost:hover { background: var(--ink); color: var(--paper); }

.btn--accent {
  background: var(--accent);
  color: var(--paper);
}
.btn--accent:hover { background: var(--ink); transform: translateY(-2px); }

.btn .arrow { transition: transform 0.3s var(--ease); }
.btn:hover .arrow { transform: translate(3px, -3px); }

.hero__ctas { margin-top: 2.5rem; display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* ==========================================================================
   Secciones
   ========================================================================== */

section { padding: var(--r-section) 0; position: relative; }

.section-head {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: clamp(2.5rem, 5vw, 4.5rem);
  align-items: end;
}
@media (min-width: 860px) {
  .section-head { grid-template-columns: 1.1fr 1fr; gap: 4rem; }
}

.section-head h2 { max-width: 16ch; }
.section-head__right { padding-bottom: 0.5rem; }

.divider {
  height: 1px;
  background: var(--bone-line);
  width: 100%;
  margin: 0;
}

/* ==========================================================================
   Principios (index)
   ========================================================================== */

.principles {
  background: var(--paper);
  border-top: 1px solid var(--bone-line);
  border-bottom: 1px solid var(--bone-line);
}

.principles__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}
@media (min-width: 720px) { .principles__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .principles__grid { grid-template-columns: repeat(4, 1fr); } }

.principle {
  padding: 2.25rem 1.75rem;
  border-top: 1px solid var(--bone-line);
  border-right: 1px solid var(--bone-line);
  transition: background 0.3s var(--ease);
  position: relative;
}
.principle:last-child { border-right: none; }
.principle:hover { background: var(--bone); }

@media (min-width: 1100px) {
  .principle:nth-child(-n+4) { border-top: none; }
}

.principle__num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-mute);
  letter-spacing: 0.1em;
  margin-bottom: 1.25rem;
  display: block;
}
.principle h3 { margin-bottom: 0.75rem; font-size: 1.35rem; }
.principle p { font-size: 0.95rem; line-height: 1.55; }

/* ==========================================================================
   Quotes
   ========================================================================== */

.quotes {
  padding: var(--r-section) 0;
}

.quote-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.quote {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  padding: 2.5rem 0;
  border-top: 1px solid var(--bone-line);
}
.quote:last-child { border-bottom: 1px solid var(--bone-line); }

@media (min-width: 860px) {
  .quote { grid-template-columns: 1fr 2fr; gap: 3rem; align-items: start; }
}

.quote__author {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-mute);
  padding-top: 0.35rem;
}

.quote__text {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2vw, 1.6rem);
  font-weight: 300;
  font-variation-settings: "opsz" 144, "SOFT" 80;
  line-height: 1.35;
  color: var(--ink);
  max-width: 42ch;
  font-style: italic;
}
.quote__text::before { content: '« '; color: var(--accent); }
.quote__text::after { content: ' »'; color: var(--accent); }

/* ==========================================================================
   Servicios
   ========================================================================== */

.services__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 720px) { .services__grid { grid-template-columns: repeat(2, 1fr); } }

.service-card {
  background: var(--paper);
  border: 1px solid var(--bone-line);
  border-radius: 6px;
  padding: clamp(1.75rem, 3vw, 2.5rem);
  position: relative;
  transition: transform 0.4s var(--ease), border-color 0.3s var(--ease);
  overflow: hidden;
}
.service-card:hover {
  transform: translateY(-4px);
  border-color: var(--ink);
}

.service-card__num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-mute);
  letter-spacing: 0.08em;
}

.service-card h3 {
  margin: 1.25rem 0 1rem;
  font-size: clamp(1.5rem, 2.2vw, 1.9rem);
}

.service-card p { font-size: 0.98rem; line-height: 1.6; }

.service-card__icon {
  position: absolute;
  top: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  color: var(--accent);
  opacity: 0.35;
  transition: opacity 0.3s var(--ease), transform 0.4s var(--ease);
}
.service-card:hover .service-card__icon { opacity: 1; transform: rotate(-8deg); }

.service-card__list {
  margin-top: 1.5rem;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.service-card__list li {
  font-size: 0.9rem;
  font-family: var(--font-mono);
  color: var(--ink-soft);
  padding-left: 1.25rem;
  position: relative;
}
.service-card__list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.65rem;
  width: 8px;
  height: 1px;
  background: var(--accent);
}

/* ==========================================================================
   Productos (NetBI)
   ========================================================================== */

.product-hero {
  padding: clamp(4rem, 10vw, 8rem) 0 clamp(3rem, 6vw, 5rem);
  position: relative;
  overflow: hidden;
}

.product-hero__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}
@media (min-width: 960px) {
  .product-hero__grid { grid-template-columns: 1.1fr 1fr; gap: 5rem; }
}

.product-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.45rem 0.9rem 0.45rem 0.5rem;
  background: var(--ink);
  color: var(--paper);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1.75rem;
}
.product-brand__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: var(--accent);
  color: var(--paper);
  border-radius: 50%;
  font-weight: 700;
  font-size: 11px;
}

.product-hero h1 {
  font-size: clamp(3.5rem, 9vw, 8rem);
  font-weight: 300;
  letter-spacing: -0.04em;
  line-height: 0.92;
}
.product-hero h1 .em {
  color: var(--accent);
  font-style: italic;
  font-variation-settings: "opsz" 144, "SOFT" 100;
}

.product-hero__sub {
  margin-top: 1.75rem;
  font-size: clamp(1.1rem, 1.4vw, 1.25rem);
  line-height: 1.55;
  max-width: 46ch;
}

/* Visual panel MCP */
.mcp-panel {
  position: relative;
  aspect-ratio: 1 / 1;
  max-width: 520px;
  margin: 0 auto;
  background: var(--ink);
  border-radius: 14px;
  overflow: hidden;
  padding: 2rem;
  color: var(--paper);
  box-shadow: 0 30px 80px -20px rgba(14, 14, 12, 0.35);
}

.mcp-panel__head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.6;
}
.mcp-panel__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}

.mcp-diagram {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

.mcp-hub {
  position: relative;
  width: 130px;
  height: 130px;
  background: var(--accent);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.45rem;
  color: var(--paper);
  box-shadow: 0 0 60px rgba(46, 111, 171, 0.4);
}
.mcp-hub::before, .mcp-hub::after {
  content: '';
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  border: 1px solid rgba(46, 111, 171, 0.4);
  animation: mcpPulse 3s ease-out infinite;
}
.mcp-hub::after { animation-delay: 1.5s; }

@keyframes mcpPulse {
  0% { transform: scale(0.95); opacity: 1; }
  100% { transform: scale(1.5); opacity: 0; }
}

.mcp-node {
  position: absolute;
  width: 56px;
  height: 56px;
  background: rgba(251, 248, 242, 0.06);
  border: 1px solid rgba(251, 248, 242, 0.15);
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--paper);
  letter-spacing: 0.05em;
  backdrop-filter: blur(10px);
}
.mcp-node--1 { top: 14%; left: 18%; }
.mcp-node--2 { top: 14%; right: 18%; }
.mcp-node--3 { bottom: 14%; left: 18%; }
.mcp-node--4 { bottom: 14%; right: 18%; }
.mcp-node--5 { top: 50%; left: 8%; transform: translateY(-50%); }
.mcp-node--6 { top: 50%; right: 8%; transform: translateY(-50%); }

.mcp-lines {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.mcp-lines line {
  stroke: rgba(46, 111, 171, 0.3);
  stroke-width: 1;
  stroke-dasharray: 3 4;
  animation: dashFlow 8s linear infinite;
}
@keyframes dashFlow {
  to { stroke-dashoffset: -56; }
}

/* Features NetBI */
.features {
  background: var(--paper);
  border-top: 1px solid var(--bone-line);
  border-bottom: 1px solid var(--bone-line);
}

.features__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}
@media (min-width: 720px) { .features__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1060px) { .features__grid { grid-template-columns: repeat(3, 1fr); } }

.feature {
  padding: 2.5rem 2rem;
  border-top: 1px solid var(--bone-line);
  border-right: 1px solid var(--bone-line);
  transition: background 0.3s var(--ease);
}
.feature:hover { background: var(--bone); }

@media (min-width: 1060px) {
  .feature:nth-child(-n+3) { border-top: none; }
  .feature:nth-child(3n) { border-right: none; }
}
@media (max-width: 1059px) and (min-width: 720px) {
  .feature:nth-child(-n+2) { border-top: none; }
  .feature:nth-child(2n) { border-right: none; }
}
@media (max-width: 719px) {
  .feature:first-child { border-top: none; }
  .feature { border-right: none; }
}

.feature__num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.12em;
  margin-bottom: 1.25rem;
}

.feature h3 { font-size: 1.25rem; margin-bottom: 0.75rem; }
.feature p { font-size: 0.95rem; line-height: 1.55; }

/* Use cases */
.use-cases__list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.use-case {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  padding: 2.5rem 0;
  border-top: 1px solid var(--bone-line);
  transition: padding 0.3s var(--ease);
}
.use-case:last-child { border-bottom: 1px solid var(--bone-line); }

@media (min-width: 860px) {
  .use-case { grid-template-columns: 100px 1fr 2fr; gap: 2.5rem; }
}

.use-case__num {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 300;
  color: var(--accent);
  font-variation-settings: "opsz" 144, "SOFT" 60;
  line-height: 1;
}
.use-case h3 { font-size: 1.35rem; margin-bottom: 0.5rem; }
.use-case p { font-size: 1rem; line-height: 1.6; }

/* ==========================================================================
   CTA Band
   ========================================================================== */

.cta-band {
  background: var(--ink);
  color: var(--paper);
  padding: clamp(4rem, 8vw, 6rem) 0;
  position: relative;
  overflow: hidden;
}
.cta-band::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 40%, rgba(46, 111, 171, 0.2), transparent 50%),
              radial-gradient(ellipse at 80% 80%, rgba(31, 77, 58, 0.2), transparent 50%);
  pointer-events: none;
}

.cta-band__inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: end;
}
@media (min-width: 860px) { .cta-band__inner { grid-template-columns: 2fr 1fr; } }

.cta-band h2 { color: var(--paper); max-width: 20ch; }
.cta-band .btn--accent { align-self: center; }

.cta-band__eyebrow { color: rgba(251, 248, 242, 0.55); margin-bottom: 1.5rem; }
.cta-band__eyebrow::before { background: var(--accent); }

/* ==========================================================================
   Contacto — Form
   ========================================================================== */

.contact {
  padding: clamp(3rem, 7vw, 6rem) 0 var(--r-section);
}

.contact__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}
@media (min-width: 960px) { .contact__grid { grid-template-columns: 1fr 1.3fr; gap: 5rem; } }

.contact__info h2 { max-width: 14ch; margin-bottom: 1.5rem; }
.contact__info p { margin-bottom: 2rem; }

.contact__detail {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--bone-line);
}
.contact__detail:last-child { border-bottom: 1px solid var(--bone-line); }
.contact__detail-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.contact__detail-value {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 400;
}
.contact__detail-value a:hover { color: var(--accent); }

/* Form */
.form {
  background: var(--paper);
  border: 1px solid var(--bone-line);
  border-radius: 8px;
  padding: clamp(1.5rem, 3vw, 2.5rem);
}

.form__row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}
@media (min-width: 640px) { .form__row--2 { grid-template-columns: 1fr 1fr; } }

.field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: relative;
}

.field label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.field label .req { color: var(--accent); }

.field input,
.field textarea,
.field select {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  background: var(--bone);
  border: 1px solid transparent;
  border-bottom: 1px solid var(--bone-line);
  border-radius: 4px;
  padding: 0.8rem 0.95rem;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
  width: 100%;
}
.field textarea { min-height: 150px; resize: vertical; line-height: 1.55; }

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  background: var(--paper);
  border-color: var(--ink);
}
.field input.error,
.field textarea.error { border-color: var(--accent); }

.field__error {
  display: none;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  margin-top: 0.2rem;
}
.field.has-error .field__error { display: block; }

.form__consent {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 0 1.5rem;
  font-size: 0.88rem;
  color: var(--ink-soft);
  line-height: 1.55;
}
.form__consent input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--accent);
  flex-shrink: 0;
}
.form__consent a { text-decoration: underline; text-underline-offset: 3px; }
.form__consent a:hover { color: var(--accent); }

.form__submit { width: 100%; justify-content: center; }
@media (min-width: 540px) { .form__submit { width: auto; } }

/* Honeypot */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
}

/* Form states */
.form__status {
  display: none;
  margin-top: 1.25rem;
  padding: 1rem 1.25rem;
  border-radius: 6px;
  font-size: 0.95rem;
  line-height: 1.5;
}
.form__status--show { display: block; }
.form__status--success {
  background: rgba(31, 77, 58, 0.08);
  color: var(--forest);
  border: 1px solid rgba(31, 77, 58, 0.2);
}
.form__status--error {
  background: rgba(32, 78, 119, 0.08);
  color: var(--accent);
  border: 1px solid rgba(32, 78, 119, 0.2);
}

.btn[disabled] { opacity: 0.6; cursor: not-allowed; }

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
  background: var(--ink);
  color: var(--paper);
  padding: clamp(3rem, 6vw, 5rem) 0 2rem;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(251, 248, 242, 0.1);
}
@media (min-width: 860px) { .footer__grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }

.footer h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(251, 248, 242, 0.5);
  font-weight: 500;
  margin-bottom: 1.25rem;
}

.footer__logo .logo img { height: 44px; }
.footer__logo p {
  color: rgba(251, 248, 242, 0.6);
  font-size: 0.95rem;
  margin-top: 1rem;
  max-width: 34ch;
}

.footer__links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.footer__links a {
  color: rgba(251, 248, 242, 0.75);
  font-size: 0.95rem;
  transition: color 0.2s var(--ease);
}
.footer__links a:hover { color: var(--accent); }

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding-top: 2rem;
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(251, 248, 242, 0.5);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.footer__bottom a:hover { color: var(--paper); }

/* ==========================================================================
   Anima on scroll
   ========================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}
.reveal.in { opacity: 1; transform: none; }

/* Fallback: si JS está desactivado, hacemos todo visible */
.no-js .reveal { opacity: 1 !important; transform: none !important; }

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ==========================================================================
   Utilidades
   ========================================================================== */

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

/* Legal page */
.legal { padding: clamp(2rem, 5vw, 4rem) 0 var(--r-section); }
.legal__content { max-width: 720px; }
.legal__content h2 { margin-top: 2.5rem; margin-bottom: 1rem; font-size: 1.5rem; }
.legal__content h2:first-of-type { margin-top: 0; }
.legal__content p { margin-bottom: 1rem; }
.legal__content ul { margin: 1rem 0 1rem 1.25rem; }
.legal__content li { margin-bottom: 0.5rem; color: var(--ink-soft); }
