/* Anka — página institucional. Tokens en :root. El tema sigue la preferencia del sistema; el botón del header
   fija uno a mano con data-theme="light|dark" en <html> (se guarda en localStorage). */

/* Geist y Geist Mono (SIL OFL), autoalojadas: variables, subconjunto latino. Licencia en assets/fonts/LICENSE.txt */
@font-face {
  font-family: 'Geist';
  src: url('assets/fonts/Geist-Variable.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Geist Mono';
  src: url('assets/fonts/GeistMono-Variable.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #F3F3F1;
  --ink: #101B2D;          /* azul del logo */
  --muted: #4B5568;
  --rule: #C6C9CF;
  --field: #7C8494;
  --gold: #A88A4E;         /* dorado del logo */
  --gold-text: #7F6532;    /* dorado oscuro para texto chico (contraste ≥ 4.5:1) */

  --band: #101B2D;
  --band-ink: #EEECE6;
  --band-muted: #A9B0BD;
  --band-rule: #2A3548;
  --band-gold: #B89A5C;

  --on-gold: #101B2D;

  /* Qué variante de logo / icono se muestra (ver .on-light y .on-dark) */
  --show-on-light: block;
  --show-on-dark: none;

  --font-sans: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --container: 1240px;
  --gutter: clamp(24px, 6vw, 96px);
}

/* Oscuro: sin elección manual, lo decide el sistema. Mantener los dos bloques iguales. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #101B2D;
    --ink: #EEECE6;
    --muted: #A9B0BD;
    --rule: #2A3548;
    --field: #6E7A8F;
    --gold: #B89A5C;
    --gold-text: #C9AD72;
    --band: #18253D;
    --band-rule: #2E3B55;
    --band-gold: #C9AD72;
    --show-on-light: none;
    --show-on-dark: block;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #101B2D;
  --ink: #EEECE6;
  --muted: #A9B0BD;
  --rule: #2A3548;
  --field: #6E7A8F;
  --gold: #B89A5C;
  --gold-text: #C9AD72;
  --band: #18253D;
  --band-rule: #2E3B55;
  --band-gold: #C9AD72;
  --show-on-light: none;
  --show-on-dark: block;
}
:root[data-theme="light"] { color-scheme: light; }

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; transition: color .3s ease, border-color .3s ease; }
a:hover { color: var(--gold-text); }
:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
img { display: block; }
.on-light { display: var(--show-on-light); }
.on-dark { display: var(--show-on-dark); }

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

/* Header */
.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 28px;
}
.brand { display: flex; align-items: center; gap: 16px; min-height: 44px; }
.brand img { height: 40px; width: auto; }
.brand-word {
  margin-top: 10px;            /* alinea ANKA con la barra dorada del águila */
  margin-right: -0.32em;       /* compensa el tracking de la última letra */
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.32em;
  line-height: 1;
}
.brand-sm { gap: 12px; }
.brand-sm img { height: 28px; }
.brand-sm .brand-word { margin-top: 7px; font-size: 11px; }

.site-nav {
  display: flex;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-left: auto;
}
.site-nav a { display: flex; align-items: center; min-height: 44px; padding: 0 12px; }
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: none;
  border: 0;
  color: inherit;
  cursor: pointer;
  transition: color .3s ease;
}
.theme-toggle:hover { color: var(--gold-text); }
.lang-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
}

/* Hero */
.hero {
  min-height: 640px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: 96px;
}
.hero-title {
  margin: 0 0 56px;
  font-weight: 300;
  font-size: clamp(3.5rem, 9vw, 9rem);
  line-height: 0.92;
  letter-spacing: -0.045em;
}
.hero-title > span { display: block; }
.dot { color: var(--gold); }

.horizon { position: relative; height: 1px; background: var(--rule); }
.horizon-bar {
  position: absolute;
  right: 16%;
  top: -4px;
  width: 104px;
  height: 9px;
  background: var(--gold);
  animation: breathe-bar 6s ease-in-out infinite;
}

.hero-foot {
  margin-top: 40px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
}
.hero-lead {
  flex: 1 1 360px;
  max-width: 460px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 28px;
}
.hero-lead p { margin: 0; font-size: 19px; line-height: 1.55; color: var(--muted); text-wrap: pretty; }
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  font-size: 16px;
  font-weight: 500;
  border-bottom: 1px solid var(--gold);
}
.hero-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Secciones con etiqueta a la izquierda */
.section { padding-block: 120px; }
.split { display: flex; flex-wrap: wrap; gap: 40px 64px; }
.split-body { flex: 999 1 640px; min-width: 0; }
.section-label {
  flex: 1 1 200px;
  align-self: flex-start;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.section-label::before { content: ""; width: 20px; height: 3px; background: var(--gold); }

/* Nosotros */
.about { display: flex; flex-direction: column; gap: 80px; }
.about-text { display: flex; flex-direction: column; gap: 28px; max-width: 760px; }
.about-lead {
  margin: 0;
  font-size: clamp(1.6rem, 2.6vw, 2.25rem);
  font-weight: 300;
  line-height: 1.35;
  letter-spacing: -0.015em;
  text-wrap: pretty;
}
.about-body { margin: 0; max-width: 620px; font-size: 18px; line-height: 1.7; color: var(--muted); text-wrap: pretty; }

/* Qué hacemos */
#que-hacemos { padding-top: 0; }   /* el aire de arriba ya lo pone el padding de Nosotros */
.offer { display: flex; flex-direction: column; gap: 72px; }
.offer .about-lead { max-width: 760px; }
.offer-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px 64px; }
.offer-item { display: flex; flex-direction: column; gap: 14px; padding-top: 28px; border-top: 1px solid var(--rule); }
.offer-item h3 { margin: 0; font-size: clamp(1.5rem, 2.4vw, 2rem); font-weight: 300; line-height: 1.15; letter-spacing: -0.03em; }
.offer-item p { margin: 0; font-size: 16px; line-height: 1.65; color: var(--muted); text-wrap: pretty; }
.text-link { color: var(--ink); border-bottom: 1px solid var(--gold); }

/* Línea de tiempo de principios */
.flow {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 48px 0;
}
.flow-step { display: flex; flex-direction: column; gap: 14px; padding-right: 40px; }
.flow-rail { display: flex; align-items: center; height: 14px; margin-bottom: 10px; }
.flow-dot {
  flex: none;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--gold);
  animation: flow-dot 6s ease-out infinite;
}
.flow-step:nth-child(2) .flow-dot { animation-delay: 2s; }
.flow-step:nth-child(3) .flow-dot { animation-delay: 4s; }
.flow-line { flex: 1 1 auto; height: 1px; margin-right: -40px; background: var(--rule); }
.flow-num { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.1em; color: var(--gold-text); }
.flow-step h3 { margin: 0; font-size: 18px; font-weight: 500; }
.flow-step p { margin: 0; font-size: 15px; line-height: 1.65; color: var(--muted); }

/* Proyectos (franja azul) */
.band { background: var(--band); color: var(--band-ink); }
.band .section { padding-block: 112px; }
.band .section-label { color: var(--band-muted); }
.band .section-label::before { background: var(--band-gold); }
.band a:hover { color: var(--band-gold); }

.projects { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--band-rule); }
.project {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 6fr) minmax(0, 3fr);
  align-items: baseline;
  gap: 12px 40px;
  padding-block: 40px;
  border-top: 1px solid var(--band-rule);
}
.project h3 {
  margin: 0;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.03em;
}
.project p { margin: 0; font-size: 16px; line-height: 1.65; color: var(--band-muted); text-wrap: pretty; }
.project-body { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.project-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  max-width: 100%;
  border-bottom: 1px solid var(--band-gold);
}
.project-link span { min-width: 0; overflow-wrap: anywhere; }
.project-tag {
  justify-self: end;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--band-gold);
}

/* Contacto */
#contacto { padding-bottom: 140px; }
.contact { display: flex; flex-direction: column; gap: 48px; }
.contact-head { display: flex; flex-direction: column; gap: 20px; }
.contact-title {
  margin: 0;
  font-size: clamp(2.25rem, 4.6vw, 4rem);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.035em;
  text-wrap: pretty;
}
.contact-sub { margin: 0; max-width: 520px; font-size: 18px; line-height: 1.6; color: var(--muted); }

.form { display: flex; flex-direction: column; gap: 36px; max-width: 720px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 36px 40px; }
.field { display: flex; flex-direction: column; gap: 10px; }
.field-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.field input,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 10px 0 12px;
  border: 0;
  border-bottom: 1px solid var(--field);
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 18px;
}
.field textarea { line-height: 1.6; resize: vertical; }
.field input::placeholder,
.field textarea::placeholder { color: inherit; opacity: 0.45; }
.field input:focus,
.field textarea:focus { outline: none; border-bottom-color: var(--gold-text); }
.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] { border-bottom-color: var(--ink); border-bottom-width: 2px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.form-error { margin: 0; font-size: 15px; line-height: 1.5; }
.form-error a { border-bottom: 1px solid var(--gold); }

.form-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  height: 52px;
  padding: 0 28px;
  border-radius: 999px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--bg);
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color .3s ease, border-color .3s ease, color .3s ease;
}
.btn:hover { background: var(--gold); border-color: var(--gold); color: var(--on-gold); }
.btn[disabled] { opacity: 0.6; cursor: progress; }

.direct { margin: 0; font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.02em; color: var(--muted); }
.direct a { color: var(--ink); border-bottom: 1px solid var(--gold); }

.sent { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; padding-block: 32px; max-width: 560px; }
.sent[hidden], .form[hidden], .form-error[hidden] { display: none; }
.sent-bar { width: 48px; height: 6px; background: var(--gold); animation: breathe-bar 6s ease-in-out infinite; }
.sent p { margin: 0; font-size: 26px; font-weight: 300; line-height: 1.4; }
.btn-ghost {
  min-height: 44px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--field);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 15px;
  cursor: pointer;
  transition: color .3s ease, border-color .3s ease;
}
.btn-ghost:hover { color: var(--gold-text); border-bottom-color: var(--gold-text); }

/* Footer */
.site-footer { padding-bottom: 40px; }
.ask-ai { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding-bottom: 32px; }
.ask-ai-label {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.ask-ai-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 12px; }
.ask-ai-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--rule);
  border-radius: 50%;
  transition: color .3s ease, border-color .3s ease;
}
.ai-icon { display: block; flex: none; }
.ask-ai-links a:hover { color: var(--gold-text); border-color: var(--gold-text); }
.ask-ai-note { flex: 1 0 100%; margin: 0; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.04em; line-height: 1.6; color: var(--gold-text); }
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-top: 28px;
  border-top: 1px solid var(--rule);
}
.legal {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Movimiento */
.rise { animation: rise 1.4s cubic-bezier(.2, .7, .2, 1) both; }
.rise-delay { animation-delay: .3s; }

@keyframes breathe-bar { 0%, 100% { transform: scaleX(1); } 50% { transform: scaleX(1.22); } }
@keyframes flow-dot {
  0% { box-shadow: 0 0 0 0 rgba(168, 138, 78, .55); }
  22%, 100% { box-shadow: 0 0 0 12px rgba(168, 138, 78, 0); }
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .horizon-bar, .flow-dot, .sent-bar, .rise { animation: none; }
}

/* Tablet: los proyectos pasan a una columna antes de que la categoría se apriete */
@media (max-width: 820px) {
  .project { grid-template-columns: minmax(0, 1fr); }
  .project-tag { justify-self: start; }
}

/* Celular */
@media (max-width: 760px) {
  /* El botón sube junto al logo; el menú queda en su propia fila */
  .lang-switch { order: 1; margin-left: auto; }
  .theme-toggle { order: 1; }
  .site-nav { order: 2; flex-basis: 100%; flex-wrap: wrap; justify-content: center; margin-left: 0; }
  .hero { min-height: 0; padding-top: 96px; padding-bottom: 64px; }
  .ask-ai { justify-content: center; text-align: center; }
  .ask-ai-label, .ask-ai-note { flex-basis: 100%; }
  .ask-ai-links { justify-content: center; }
  .section, .band .section { padding-block: 72px; }
  #contacto { padding-bottom: 96px; }
  .about { gap: 56px; }
}

/* Línea de tiempo vertical: el punto y la línea van a la izquierda, el texto a la derecha */
@media (max-width: 700px) {
  .offer { gap: 48px; }
  .offer-list { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .flow { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .flow-step { display: grid; grid-template-columns: 13px minmax(0, 1fr); gap: 14px 24px; padding-right: 0; }
  .flow-rail {
    grid-column: 1;
    grid-row: 1 / span 3;
    flex-direction: column;
    align-items: center;
    height: auto;
    margin-bottom: 0;
    padding-top: 3px;            /* alinea el punto con el número */
  }
  .flow-line { flex: 1 1 auto; width: 1px; height: auto; margin: 10px 0; }
  .flow-step:last-child .flow-line { display: none; }
  .flow-num, .flow-step h3, .flow-step p { grid-column: 2; }
  .flow-step:not(:last-child) p { margin-bottom: 40px; }   /* el espacio entre pasos lo ocupa la línea */
}

/* Pantallas angostas: el slogan baja de 56 px para no pasarse del ancho (continuo con 9vw a 640 px) */
@media (max-width: 640px) {
  .hero-title { font-size: clamp(2.75rem, 14vw, 3.5rem); margin-bottom: 40px; }
  :lang(en) .hero-title { font-size: clamp(2.25rem, 12vw, 3.5rem); }   /* "with judgment." es más largo que "con criterio." */
}

@media (max-width: 520px) {
  .form-actions { flex-direction: column; align-items: stretch; gap: 20px; }
  .btn { justify-content: center; }
  .direct { text-align: center; }
  .sent p { font-size: 22px; }
}

/* 320–420 px: los tres links del menú tienen que entrar en una fila */
@media (max-width: 420px) {
  .site-nav { gap: 0; }
  .ask-ai-links { gap: 10px; }
  .site-nav a { padding: 0 8px; }
}
