/* ============================================
   Birdais — Landing
   ============================================ */

:root {
  /* Palette — dark elegant default */
  --bg: #0a0a0d;
  --bg-2: #101015;
  --surface: #14141a;
  --surface-2: #1c1c24;
  --line: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.14);
  --fg: #f5f3ee;
  --fg-dim: #b8b3a8;
  --fg-mute: #6f6a60;

  --primary: #fcd01d;
  --primary-deep: #e6b800;
  --primary-ink: #1a1500;

  --accent: #6ee7ff;        /* cool tech cyan */
  --accent-warm: #ff8a3d;   /* warm flame from bird */
  --accent-pink: #ff3d8e;

  --radius: 18px;
  --radius-sm: 10px;
  --radius-lg: 28px;

  --shadow-1: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 12px 40px -16px rgba(0, 0, 0, 0.6);
  --shadow-2: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 28px 70px -24px rgba(252, 208, 29, 0.18);

  --font-display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Geist", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --font-serif: "Instrument Serif", ui-serif, Georgia, serif;
}

[data-theme="light"] {
  --bg: #f6f4ee;
  --bg-2: #efece4;
  --surface: #ffffff;
  --surface-2: #f1eee5;
  --line: rgba(20, 20, 26, 0.08);
  --line-strong: rgba(20, 20, 26, 0.16);
  --fg: #14141a;
  --fg-dim: #4a4a52;
  --fg-mute: #8a857a;
  --primary-ink: #1a1500;
  --shadow-1: 0 1px 0 rgba(255, 255, 255, 0.6) inset, 0 14px 40px -16px rgba(0, 0, 0, 0.12);
  --shadow-2: 0 1px 0 rgba(255, 255, 255, 0.6) inset, 0 28px 70px -24px rgba(252, 208, 29, 0.45);
}

/* ============================================
   Reset / Base
   ============================================ */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
html {
  scroll-behavior: smooth;
  /* Stronger than overflow-x:hidden — prevents the page from being
     horizontally scrollable on iOS Safari even if a child overflows. */
  overflow-x: clip;
}
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--fg);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

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

::selection { background: var(--primary); color: var(--primary-ink); }

/* ============================================
   Layout helpers
   ============================================ */
.wrap {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
}
@media (max-width: 720px) {
  .wrap { padding: 0 20px; }
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-mute);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  /* allow wrapping on narrow viewports — without these, the long mono
     uppercase string (e.g. "Automatización · Inteligencia artificial · A medida")
     can blow past the viewport width and trigger horizontal scroll. */
  flex-wrap: wrap;
  max-width: 100%;
}
.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 5.2vw, 64px);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.section-title em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--primary);
}

.section-lede {
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.45;
  color: var(--fg-dim);
  max-width: 56ch;
  text-wrap: pretty;
}

/* ============================================
   Nav
   ============================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.nav.is-scrolled {
  border-bottom-color: var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 96px;
  gap: 24px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  font-size: 19px;
}
.nav-logo img {
  height: 72px;
  width: auto;
  max-width: none;
  object-fit: contain;
}
.nav-links {
  display: flex;
  gap: 4px;
  align-items: center;
}
.nav-links a {
  font-size: 14px;
  color: var(--fg-dim);
  padding: 10px 14px;
  border-radius: 999px;
  transition: color 0.15s ease, background 0.15s ease;
}
.nav-links a:hover {
  color: var(--fg);
  background: var(--line);
}
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--fg-mute);
  padding: 4px 4px;
}
.lang-switch button {
  font: inherit;
  letter-spacing: inherit;
  text-transform: uppercase;
  color: var(--fg-mute);
  padding: 4px 6px;
  border-radius: 6px;
  transition: color 0.15s ease, background 0.15s ease;
}
.lang-switch button:hover {
  color: var(--fg);
}
.lang-switch button.is-active {
  color: var(--fg);
  background: var(--line);
}
@media (max-width: 880px) {
  .nav-links { display: none; }
}
@media (max-width: 720px) {
  /* Tighter nav on tablets / large phones — make room for the CTA button. */
  .nav-inner { height: 72px; gap: 12px; }
  .nav-logo img { height: 52px; }
}
@media (max-width: 480px) {
  .nav-actions { gap: 8px; }
  /* On small phones, shrink the logo further and make the CTA compact:
     visually hide the text label but keep it accessible to screen readers,
     leaving just the arrow icon. */
  .nav-inner { height: 64px; }
  .nav-logo img { height: 44px; }
  .nav-cta { padding: 8px 12px; }
  .nav-cta .btn-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
  }
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: -0.005em;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: var(--primary);
  color: var(--primary-ink);
}
.btn-primary:hover {
  background: #ffd930;
}
.btn-ghost {
  border-color: var(--line-strong);
  color: var(--fg);
}
.btn-ghost:hover {
  background: var(--surface);
  border-color: var(--fg-mute);
}
.btn-sm { padding: 9px 16px; font-size: 13px; }
.btn .arrow {
  width: 16px; height: 16px;
  transition: transform 0.2s ease;
}
.btn:hover .arrow { transform: translateX(3px); }

/* ============================================
   Hero
   ============================================ */
.hero {
  position: relative;
  padding: 96px 0 80px;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 80px;
  align-items: end;
}
@media (max-width: 1000px) {
  .hero-grid { grid-template-columns: 1fr; gap: 56px; }
}
.hero-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(54px, 9vw, 124px);
  line-height: 0.92;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.hero-title .swoop {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
  background: linear-gradient(100deg, #ffe45c 0%, #fcd01d 35%, #ff8a3d 65%, #ff3d8e 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-right: 0.05em;
}
.hero-tag {
  margin-top: 36px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px 8px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 13px;
  color: var(--fg-dim);
  max-width: 100%;
}
.hero-tag .dot {
  width: 22px; height: 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: var(--primary-ink);
  font-weight: 700;
  font-size: 11px;
  font-family: var(--font-mono);
  flex-shrink: 0;
}
/* Let the text span shrink so its content wraps INTERNALLY instead of
   bumping itself to a new flex row beside the dot. */
.hero-tag > span:not(.dot) {
  min-width: 0;
  line-height: 1.45;
}
@media (max-width: 560px) {
  /* On small phones the text wraps to multiple lines — switch to top-align
     so the dot sits next to the first line, and use a softer corner instead
     of a fully-pill shape (which looks awkward when multi-line). */
  .hero-tag {
    align-items: flex-start;
    border-radius: 18px;
    padding: 10px 14px 10px 10px;
  }
}

.hero-aside {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding-bottom: 8px;
}
.hero-lede {
  font-size: clamp(17px, 1.5vw, 19px);
  line-height: 1.5;
  color: var(--fg-dim);
  text-wrap: pretty;
}
.hero-lede strong {
  color: var(--fg);
  font-weight: 500;
}
.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Hero meta strip */
.hero-meta {
  margin-top: 64px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
@media (max-width: 760px) {
  .hero-meta { grid-template-columns: repeat(2, 1fr); }
}
.hero-meta-item {
  padding: 20px 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-right: 1px solid var(--line);
  padding-right: 16px;
}
.hero-meta-item:last-child { border-right: 0; }
@media (max-width: 760px) {
  .hero-meta-item:nth-child(2) { border-right: 0; }
  .hero-meta-item:nth-child(1),
  .hero-meta-item:nth-child(2) { border-bottom: 1px solid var(--line); padding-bottom: 16px; }
  .hero-meta-item:nth-child(3),
  .hero-meta-item:nth-child(4) { padding-top: 16px; }
}
.hero-meta-num {
  font-family: var(--font-display);
  font-size: clamp(28px, 3vw, 36px);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--fg);
}
.hero-meta-num em {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--primary);
}
.hero-meta-label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--fg-mute);
}

/* Hero background flourish */
.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}
.hero-bg::before {
  content: "";
  position: absolute;
  top: -10%;
  right: -10%;
  width: 60%;
  aspect-ratio: 1;
  background: radial-gradient(closest-side, rgba(252, 208, 29, 0.18), transparent 70%);
  filter: blur(10px);
}
.hero-bg::after {
  content: "";
  position: absolute;
  bottom: -20%;
  left: -10%;
  width: 50%;
  aspect-ratio: 1;
  background: radial-gradient(closest-side, rgba(110, 231, 255, 0.12), transparent 70%);
  filter: blur(10px);
}
.hero-grid-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse at 70% 30%, black 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 70% 30%, black 0%, transparent 70%);
  opacity: 0.5;
}

/* ============================================
   Sections shared
   ============================================ */
section.block {
  padding: 120px 0;
  position: relative;
}
@media (max-width: 720px) {
  section.block { padding: 80px 0; }
}
.block-head {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 64px;
  align-items: end;
  margin-bottom: 64px;
}
@media (max-width: 880px) {
  .block-head { grid-template-columns: 1fr; gap: 24px; margin-bottom: 48px; }
}
.block-head-left {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ============================================
   Manifesto / Filosofía
   ============================================ */
.manifesto {
  background: var(--bg-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.manifesto-quote {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(34px, 5.2vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  text-wrap: balance;
  max-width: 22ch;
}
.manifesto-quote em {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--primary);
  font-weight: 400;
}
.manifesto-grid {
  margin-top: 80px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
@media (max-width: 880px) {
  .manifesto-grid { grid-template-columns: repeat(2, 1fr); }
}
.value {
  background: var(--bg-2);
  padding: 28px 24px 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 220px;
}
.value-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-mute);
  letter-spacing: 0.1em;
}
.value-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.01em;
}
.value-title em {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--primary);
  font-weight: 400;
}
.value-text {
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--fg-dim);
  margin-top: auto;
}

/* ============================================
   Servicios
   ============================================ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}
@media (max-width: 880px) {
  .services-grid { grid-template-columns: 1fr; }
}
.service {
  grid-column: span 6;
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 28px 28px;
  min-height: 360px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
  overflow: hidden;
}
@media (max-width: 880px) {
  .service { grid-column: 1 / -1; min-height: 0; }
}
.service:hover {
  border-color: var(--line-strong);
  background: var(--surface-2);
}
.service-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-mute);
}
.service-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(24px, 2.4vw, 30px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  max-width: 18ch;
}
.service-title em {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--primary);
  font-weight: 400;
}
.service-desc {
  color: var(--fg-dim);
  font-size: 15px;
  line-height: 1.55;
  max-width: 38ch;
}
.service-features {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.service-features li {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: var(--fg-dim);
}
.service-features li::before {
  content: "";
  width: 4px; height: 4px;
  border-radius: 999px;
  background: var(--primary);
  flex-shrink: 0;
}
.service-visual {
  position: absolute;
  top: -10px;
  right: -10px;
  opacity: 0.9;
  pointer-events: none;
}
@media (max-width: 880px) {
  /* mini-diagram is decorative — hide on narrow viewports to avoid
     overlapping the title/desc once the card goes full-width. */
  .service-visual { display: none; }
}

/* ============================================
   Proceso
   ============================================ */
.process {
  background: var(--bg-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.process-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg);
}
@media (max-width: 880px) {
  .process-list { grid-template-columns: 1fr; }
}
.step {
  padding: 28px 24px 32px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 260px;
  position: relative;
}
.step:last-child { border-right: 0; }
@media (max-width: 880px) {
  .step {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    min-height: 0;
  }
  .step:last-child { border-bottom: 0; }
}
.step-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--fg-mute);
}
.step-num {
  font-family: var(--font-display);
  font-size: 56px;
  line-height: 0.9;
  font-weight: 400;
  letter-spacing: -0.04em;
  color: var(--fg);
}
.step-num em {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--primary);
}
.step-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 20px;
  letter-spacing: -0.01em;
}
.step-desc {
  font-size: 14px;
  line-height: 1.5;
  color: var(--fg-dim);
}

/* ============================================
   Stack
   ============================================ */
.stack {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
@media (max-width: 880px) {
  .stack { grid-template-columns: 1fr; gap: 32px; }
}
.stack-tools {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.tool {
  background: var(--surface);
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 110px;
  transition: background 0.2s ease;
}
.tool:hover { background: var(--surface-2); }
.tool-name {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 15px;
}
.tool-kind {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-mute);
}

/* ============================================
   Trayectoria / clients
   ============================================ */
.clients {
  background: var(--bg-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.clients-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 36px;
}
.client-chip {
  font-family: var(--font-display);
  font-size: clamp(20px, 2.6vw, 32px);
  font-weight: 500;
  letter-spacing: -0.02em;
  padding: 8px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--fg);
  background: var(--surface);
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.client-chip:hover {
  color: var(--primary);
  border-color: var(--primary);
}
.client-chip em {
  font-family: var(--font-serif);
  font-style: italic;
}

/* Casos de uso grid */
.cases-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
@media (max-width: 880px) {
  .cases-grid { grid-template-columns: 1fr; }
}
.case {
  background: var(--bg-2);
  padding: 28px 24px 32px;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: background 0.2s ease;
}
.case:hover { background: var(--surface); }
.case-num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--fg-mute);
}
.case-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 21px;
  letter-spacing: -0.01em;
  color: var(--fg);
}
.case-desc {
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--fg-dim);
  margin-top: auto;
}

/* ============================================
   CTA final
   ============================================ */
.cta {
  padding: 140px 0;
  position: relative;
  overflow: hidden;
}
.cta-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(40px, 6vw, 80px);
  background:
    radial-gradient(ellipse at 80% 0%, rgba(252, 208, 29, 0.14), transparent 60%),
    radial-gradient(ellipse at 0% 100%, rgba(255, 138, 61, 0.10), transparent 60%),
    var(--surface);
  overflow: hidden;
}
.cta-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(40px, 6vw, 84px);
  line-height: 0.96;
  letter-spacing: -0.03em;
  text-wrap: balance;
  max-width: 14ch;
}
.cta-title em {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--primary);
  font-weight: 400;
}
.cta-text {
  margin-top: 24px;
  max-width: 50ch;
  font-size: 17px;
  line-height: 1.55;
  color: var(--fg-dim);
}
.cta-actions {
  margin-top: 36px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.cta-contact {
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
  font-size: 14px;
}
.cta-contact-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cta-contact-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-mute);
}

/* CTA form */
.cta-form {
  margin-top: 36px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 640px;
}
.cta-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 640px) {
  .cta-form-row { grid-template-columns: 1fr; }
}
.cta-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cta-field-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-mute);
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
}
.cta-field-opt {
  text-transform: none;
  letter-spacing: 0;
  color: var(--fg-mute);
  opacity: 0.7;
  font-size: 10.5px;
}
.cta-form input[type="text"],
.cta-form input[type="email"],
.cta-form textarea {
  width: 100%;
  font: inherit;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--fg);
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 13px 16px;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  outline: none;
}
.cta-form textarea {
  resize: vertical;
  min-height: 110px;
  line-height: 1.5;
}
.cta-form input::placeholder,
.cta-form textarea::placeholder {
  color: var(--fg-mute);
  opacity: 0.7;
}
.cta-form input:hover,
.cta-form textarea:hover {
  border-color: var(--fg-mute);
}
.cta-form input:focus,
.cta-form textarea:focus {
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: 0 0 0 4px rgba(252, 208, 29, 0.16);
}
.cta-form input:invalid:not(:placeholder-shown),
.cta-form textarea:invalid:not(:placeholder-shown) {
  border-color: var(--accent-pink);
}
.cta-form-actions {
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.cta-form-note {
  font-size: 13px;
  color: var(--fg-mute);
}
.cta-form-status {
  margin-top: 4px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--fg-dim);
  min-height: 1.2em;
}
.cta-form-status.is-success {
  color: var(--primary);
}
.cta-form-status.is-error {
  color: var(--accent-pink);
}
.cta-form button[disabled] {
  opacity: 0.7;
  cursor: progress;
  transform: none;
}

/* ============================================
   Footer
   ============================================ */
.footer {
  border-top: 1px solid var(--line);
  padding: 48px 0 36px;
  background: var(--bg);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  align-items: start;
}
@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
}
.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 38ch;
}
.footer-brand img {
  height: auto;
  width: 220px;
  max-width: 100%;
  object-fit: contain;
}
.footer-brand p {
  font-size: 14px;
  color: var(--fg-dim);
  line-height: 1.5;
}
.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-mute);
  font-weight: 500;
  margin-bottom: 14px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-col a { color: var(--fg-dim); font-size: 14px; transition: color 0.15s ease; }
.footer-col a:hover { color: var(--fg); }
.footer-bottom {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--fg-mute);
  text-transform: uppercase;
}

/* ============================================
   Automation diagram (hero / services visual)
   ============================================ */
.flow-card {
  position: relative;
  width: 100%;
  max-width: 380px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-dim);
  box-shadow: var(--shadow-1);
}
.flow-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  color: var(--fg-mute);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.flow-card-head .live {
  display: inline-flex; align-items: center; gap: 6px; color: var(--primary);
}
.flow-card-head .live::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 999px;
  background: var(--primary);
  box-shadow: 0 0 0 4px rgba(252, 208, 29, 0.18);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.flow-nodes {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.flow-node {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--fg);
}
.flow-node-ico {
  width: 22px; height: 22px;
  border-radius: 6px;
  display: grid; place-items: center;
  font-weight: 600;
  font-size: 11px;
}
.flow-node-ico.a { background: rgba(110, 231, 255, 0.16); color: var(--accent); }
.flow-node-ico.b { background: rgba(252, 208, 29, 0.20); color: var(--primary); }
.flow-node-ico.c { background: rgba(255, 138, 61, 0.18); color: var(--accent-warm); }
.flow-node-ico.d { background: rgba(255, 61, 142, 0.18); color: var(--accent-pink); }
.flow-node-label {
  font-size: 12.5px;
  color: var(--fg);
  font-family: var(--font-body);
}
.flow-node-meta {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--fg-mute);
}
.flow-connector {
  width: 22px;
  margin-left: 11px;
  border-left: 1px dashed var(--line-strong);
  height: 14px;
  position: relative;
  left: 12px;
  top: 0;
  transform: translateX(-50%);
}
.flow-foot {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.flow-foot-time {
  color: var(--primary);
  font-weight: 500;
}

/* tiny diagrams in service cards */
.mini-diagram {
  width: 140px;
  height: 140px;
  opacity: 0.9;
}

/* ============================================
   Reveal animation
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   Marquee
   ============================================ */
.marquee {
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  padding: 18px 0;
  mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
}
.marquee-track {
  display: flex;
  gap: 56px;
  animation: scroll 38s linear infinite;
  width: max-content;
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: -0.01em;
  color: var(--fg-dim);
  align-items: center;
}
.marquee-track span {
  display: inline-flex; align-items: center; gap: 56px;
}
.marquee-dot {
  width: 8px; height: 8px;
  border-radius: 999px;
  background: var(--primary);
  flex-shrink: 0;
}
@keyframes scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ============================================
   Legal pages (aviso legal, privacidad, cookies)
   ============================================ */
.legal-page {
  padding: 80px 0 120px;
  position: relative;
}
@media (max-width: 720px) {
  .legal-page { padding: 56px 0 80px; }
}
.legal-wrap {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 32px;
}
@media (max-width: 720px) {
  .legal-wrap { padding: 0 20px; }
}
.legal-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-mute);
  margin-bottom: 36px;
  transition: color 0.15s ease;
}
.legal-back:hover { color: var(--fg); }
.legal-eyebrow {
  display: inline-flex;
  margin-bottom: 14px;
}
.legal-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(38px, 5vw, 56px);
  line-height: 1.04;
  letter-spacing: -0.025em;
  margin-bottom: 8px;
}
.legal-title em {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--primary);
  font-weight: 400;
}
.legal-updated {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-mute);
  margin-bottom: 56px;
}
.legal-content {
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--fg-dim);
}
.legal-content h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(20px, 2.2vw, 24px);
  letter-spacing: -0.01em;
  color: var(--fg);
  margin-top: 48px;
  margin-bottom: 16px;
  scroll-margin-top: 120px;
}
.legal-content h2:first-child { margin-top: 0; }
.legal-content h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 17px;
  color: var(--fg);
  margin-top: 28px;
  margin-bottom: 10px;
}
.legal-content p {
  margin-bottom: 16px;
}
.legal-content p:last-child { margin-bottom: 0; }
.legal-content strong {
  color: var(--fg);
  font-weight: 500;
}
.legal-content a {
  color: var(--fg);
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.15s ease;
}
.legal-content a:hover {
  text-decoration-color: var(--primary);
}
.legal-content ul,
.legal-content ol {
  margin: 16px 0 20px;
  padding-left: 22px;
}
.legal-content li {
  margin-bottom: 8px;
}
.legal-content .legal-data {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin: 24px 0;
  background: var(--surface);
  display: grid;
  grid-template-columns: minmax(140px, 200px) 1fr;
  gap: 10px 24px;
  font-size: 14.5px;
}
@media (max-width: 560px) {
  .legal-content .legal-data { grid-template-columns: 1fr; gap: 4px 0; }
  .legal-content .legal-data dt { margin-top: 12px; }
  .legal-content .legal-data dt:first-child { margin-top: 0; }
}
.legal-content .legal-data dt {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-mute);
  align-self: center;
}
.legal-content .legal-data dd {
  color: var(--fg);
}
.legal-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 14px;
}
.legal-content th,
.legal-content td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.legal-content th {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-mute);
  font-weight: 500;
}

/* Footer legal links + form consent checkbox */
.footer-legal-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 4px;
}
.footer-legal-row a {
  color: var(--fg-dim);
  font-size: 12.5px;
  transition: color 0.15s ease;
}
.footer-legal-row a:hover { color: var(--fg); }

.cta-form .cta-consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13px;
  line-height: 1.5;
  color: var(--fg-dim);
  padding: 6px 2px 0;
  cursor: pointer;
}
.cta-form .cta-consent input[type="checkbox"] {
  margin-top: 3px;
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
  flex-shrink: 0;
}
.cta-form .cta-consent a {
  color: var(--fg);
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 2px;
}
.cta-form .cta-consent a:hover {
  text-decoration-color: var(--primary);
}
