/* ===== Tokens ===== */
:root {
  --maroon: #851811;
  --maroon-dark: #6a130d;
  --maroon-bright: #c9463a;
  --gray: #767a84;
  --gray-text: #585c64;
  --ink: #1c1b1a;
  --paper: #ffffff;
  --paper-soft: #f7f5f3;
  --line: #e7e3df;
  --dark-bg: #17110f;
  --dark-bg-soft: #241a17;
  --dark-line: rgba(255,255,255,0.14);
  --radius: 4px;
  --radius-lg: 8px;
  --max: 1240px;
  --font-display: "Source Serif 4", Georgia, serif;
  --font-body: "Work Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}

img { max-width: 100%; display: block; }

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  background: var(--maroon);
  color: #fff;
  padding: 12px 18px;
  z-index: 999;
  border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; top: 0; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 16px;
  color: var(--ink);
}

h2 { font-size: clamp(1.8rem, 3.2vw, 2.5rem); }
h3 { font-size: 1.25rem; font-weight: 600; }

p { margin: 0 0 16px; color: var(--gray-text); max-width: 62ch; }

a { color: inherit; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease), border-color 0.25s var(--ease), color 0.25s var(--ease);
}
.btn:active { transform: scale(0.98); }
.btn-primary {
  background: var(--maroon);
  color: #fff;
}
.btn-primary:hover { background: var(--maroon-dark); }
.btn-outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.55);
}
.btn-outline:hover { background: rgba(255,255,255,0.1); border-color: #fff; }
.btn-block { width: 100%; }

/* ===== Header ===== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: 80px;
  display: flex;
  align-items: center;
  transition: background 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled,
.site-header.is-open {
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(8px);
  border-bottom-color: var(--line);
}
.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  width: 100%;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand { display: flex; align-items: center; text-decoration: none; }
.brand-logo { height: 56px; width: auto; }
.brand-logo--white { display: none; }
.site-header:not(.is-scrolled):not(.is-open) .brand-logo--color { display: none; }
.site-header:not(.is-scrolled):not(.is-open) .brand-logo--white { display: block; }

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 32px;
  margin: 0;
  padding: 0;
}
.main-nav a {
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.01em;
  position: relative;
  padding: 6px 0;
}
.site-header:not(.is-scrolled):not(.is-open) .main-nav a { color: #fff; }
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: 0;
  height: 2px;
  background: var(--maroon);
  transition: right 0.25s var(--ease);
}
.site-header:not(.is-scrolled):not(.is-open) .main-nav a::after { background: #fff; }
.main-nav a:hover::after { right: 0; }

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

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}
.lang-btn {
  background: none;
  border: none;
  padding: 4px 2px;
  color: var(--gray-text);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  opacity: 0.6;
  transition: opacity 0.2s var(--ease), color 0.2s var(--ease);
}
.lang-btn.is-active { color: var(--maroon); opacity: 1; }
.lang-sep { color: var(--gray); opacity: 0.5; font-size: 0.8rem; }
.site-header:not(.is-scrolled):not(.is-open) .lang-btn { color: rgba(255,255,255,0.75); }
.site-header:not(.is-scrolled):not(.is-open) .lang-btn.is-active { color: #fff; }
.site-header:not(.is-scrolled):not(.is-open) .lang-sep { color: rgba(255,255,255,0.5); }
.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  color: var(--ink);
  font-size: 1.05rem;
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}
.site-header:not(.is-scrolled):not(.is-open) .social-link { color: #fff; }
.social-link:hover { background: rgba(133,24,17,0.1); color: var(--maroon); }
.site-header:not(.is-scrolled):not(.is-open) .social-link:hover { background: rgba(255,255,255,0.15); color: #fff; }

.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  border: none;
  background: transparent;
  font-size: 1.4rem;
  color: var(--ink);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.site-header:not(.is-scrolled):not(.is-open) .nav-toggle { color: #fff; }

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}
.hero-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, rgba(15,10,9,0.86) 0%, rgba(15,10,9,0.55) 42%, rgba(15,10,9,0.25) 68%, rgba(15,10,9,0.35) 100%);
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  margin: 0 auto;
  width: 100%;
  padding: 0 24px 88px;
  color: #fff;
}
.hero-content h1 {
  color: #fff;
  font-size: clamp(2rem, 3.6vw, 3.1rem);
  max-width: 34ch;
  margin-bottom: 20px;
}
.hero-sub {
  color: rgba(255,255,255,0.88);
  max-width: 46ch;
  font-size: 1.08rem;
  margin-bottom: 28px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

/* ===== Generic section ===== */
.section { padding: 96px 0; }
.section-heading { max-width: 640px; margin: 0 auto 48px; text-align: center; }
.section-heading p { font-size: 1.05rem; margin-left: auto; margin-right: auto; }

/* ===== Split intro (diferenciador) ===== */
.split-intro { background: var(--paper); }
.split-intro-grid {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 64px;
  align-items: start;
}
.split-intro-lead h2 { max-width: 12ch; }
.split-intro-lead p { font-size: 1.05rem; }
.split-intro-cards { display: flex; flex-direction: column; gap: 28px; }
.mini-card {
  padding: 28px 0 0;
  border-top: 1px solid var(--line);
}
.mini-card i { font-size: 1.8rem; color: var(--maroon); margin-bottom: 12px; display: block; }
.mini-card h3 { margin-bottom: 8px; }
.mini-card p { margin: 0; font-size: 0.98rem; }

/* ===== Stat banner (trayectoria) ===== */
.stat-banner {
  position: relative;
  background: var(--dark-bg);
  color: #fff;
  overflow: hidden;
}
.stat-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("../img/trayectoria-bg.jpg");
  background-size: cover;
  background-position: center 30%;
  opacity: 0.16;
  filter: grayscale(70%) contrast(1.05);
  z-index: 0;
}
.stat-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--dark-bg) 0%, rgba(23,17,15,0.55) 45%, var(--dark-bg) 100%);
  z-index: 0;
}
.stat-banner-inner {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}
.stat-banner h2 { color: #fff; max-width: 22ch; margin-left: auto; margin-right: auto; }
.stat-banner > .container > p { color: rgba(255,255,255,0.72); font-size: 1.05rem; max-width: 56ch; margin-left: auto; margin-right: auto; }
.stat-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0;
  margin: 48px 0 0;
  padding-top: 32px;
  border-top: 1px solid var(--dark-line);
}
.stat-item {
  flex: 1 1 220px;
  max-width: 260px;
  padding: 0 28px;
  margin-right: 0;
  border-right: 1px solid var(--dark-line);
  text-align: center;
}
.stat-item:last-child { border-right: none; }
.stat-item dt {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 600;
  color: var(--maroon-bright);
  margin: 0 0 8px;
}
.stat-item dd {
  margin: 0 auto;
  color: rgba(255,255,255,0.68);
  font-size: 0.92rem;
  max-width: 26ch;
}

/* ===== Team grid (Nuestro equipo) ===== */
.team { background: var(--paper); }
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}
.team-card { position: relative; text-align: center; }
.team-photo {
  width: 132px;
  height: 132px;
  margin: 0 auto 22px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--paper-soft);
  box-shadow: 0 10px 24px rgba(28,27,26,0.16);
}
.team-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 18%; aspect-ratio: 1/1; }
.team-card h3 { font-size: 1.15rem; margin-bottom: 4px; }
.team-role {
  color: var(--maroon);
  font-weight: 600;
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 12px;
}
.team-card p:not(.team-role) { font-size: 0.94rem; margin: 0 auto; max-width: 34ch; }
.team-card p.team-bio-extra { margin-top: 0.8em; }

/* Equipo en filas (escritorio y tablet): foto a la izquierda, texto a la derecha */
@media (min-width: 769px) {
  .team-grid { grid-template-columns: 1fr; gap: 0; max-width: 880px; margin: 0 auto; }
  .team-card {
    display: grid;
    grid-template-columns: 150px 1fr;
    column-gap: 52px;
    align-items: start;
    text-align: left;
    padding: 40px 0;
    border-top: 1px solid var(--line);
  }
  .team-card:first-child { border-top: 0; padding-top: 8px; }
  .team-card:last-child { padding-bottom: 0; }
  .team-photo { grid-column: 1; grid-row: 1 / span 8; width: 150px; height: 150px; margin: 0; }
  .team-card h3, .team-card p { grid-column: 2; }
  .team-card h3 { font-size: 1.3rem; }
  .team-card p:not(.team-role) { margin: 0; max-width: 64ch; font-size: 0.98rem; line-height: 1.7; }
  .team-card p.team-bio-extra { margin-top: 0.9em; }
}

/* ===== Process ===== */
.process { background: var(--paper); }
.process-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.process-step {
  padding: 28px 24px;
  background: var(--paper-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  position: relative;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), transform 0.25s var(--ease);
}
.process-step:hover {
  border-color: rgba(133,24,17,0.28);
  box-shadow: 0 12px 24px rgba(28,27,26,0.08);
  transform: translateY(-2px);
}
.process-num {
  display: block;
  font-family: var(--font-display);
  font-size: 0.9rem;
  color: var(--gray);
  margin-bottom: 18px;
  font-weight: 600;
}
.process-step i { font-size: 1.6rem; color: var(--maroon); margin-bottom: 14px; display: block; }
.process-step h3 { font-size: 1.05rem; margin-bottom: 8px; }
.process-step p { font-size: 0.92rem; margin: 0; }

/* ===== Clients marquee ===== */
.clients { background: var(--paper-soft); padding-bottom: 88px; }
.marquee {
  overflow: hidden;
  margin-top: 8px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  display: flex;
  width: max-content;
  gap: 56px;
  animation: marquee 38s linear infinite;
}
.marquee-track span {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--gray);
  white-space: nowrap;
  opacity: 0.8;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; overflow-x: auto; }
}

/* ===== Apply form ===== */
.apply { background: var(--paper); }
.apply-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 64px;
  align-items: start;
}
.apply-lead h2 { max-width: 14ch; }
.apply-points {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.apply-points li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.95rem;
  color: var(--gray-text);
}
.apply-points i { color: var(--maroon); font-size: 1.15rem; margin-top: 1px; flex-shrink: 0; }

.apply-form {
  background: var(--paper-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 40px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.field { margin-bottom: 20px; }
.field label {
  display: block;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 7px;
}
.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="url"],
.field select,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.2s var(--ease);
}
.field select { appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23767a84' stroke-width='2'><path d='M6 9l6 6 6-6'/></svg>"); background-repeat: no-repeat; background-position: right 14px center; background-size: 16px; padding-right: 40px; }
.field textarea { resize: vertical; min-height: 90px; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--maroon);
  box-shadow: 0 0 0 3px rgba(133,24,17,0.12);
}
.field-error {
  display: none;
  color: var(--maroon);
  font-size: 0.82rem;
  margin-top: 6px;
}
.field.has-error input,
.field.has-error select {
  border-color: var(--maroon);
}
.field.has-error .field-error { display: block; }

.file-input { position: relative; }
.file-input input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}
.file-input-label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border: 1.5px dashed var(--gray);
  border-radius: var(--radius);
  background: #fff;
  color: var(--gray-text);
  font-size: 0.92rem;
  cursor: pointer;
}
.file-input-label i { font-size: 1.3rem; color: var(--maroon); }

.checkbox-field {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 24px;
  cursor: pointer;
}
.checkbox-field input { margin-top: 4px; flex-shrink: 0; width: 16px; height: 16px; accent-color: var(--maroon); }
.checkbox-field span { font-size: 0.85rem; color: var(--gray-text); }

.form-note {
  margin: 14px 0 0;
  font-size: 0.88rem;
  text-align: center;
}
.form-note.success { color: #1c6e3f; }
.form-note.error { color: var(--maroon); }

/* ===== Contact banner ===== */
.contact-banner {
  background: var(--dark-bg-soft);
  color: #fff;
  text-align: center;
}
.contact-banner-inner { max-width: 640px; margin: 0 auto; }
.contact-banner h2 { color: #fff; }
.contact-banner > .container > p { color: rgba(255,255,255,0.75); margin: 0 auto 32px; font-size: 1.05rem; }
.contact-details {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  justify-content: center;
}
.contact-details a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: rgba(255,255,255,0.85);
  font-size: 0.95rem;
}
.contact-details a:hover { color: #fff; }

/* ===== Footer ===== */
.site-footer { background: var(--dark-bg); color: rgba(255,255,255,0.7); padding-top: 72px; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 56px;
}
.footer-logo { height: 59px; margin-bottom: 18px; }
.footer-brand p { color: rgba(255,255,255,0.6); font-size: 0.92rem; max-width: 34ch; }
.footer-social {
  width: auto;
  border-radius: 999px;
  padding: 8px 16px;
  gap: 8px;
  border: 1px solid var(--dark-line);
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
}
.footer-social:hover { background: rgba(255,255,255,0.08); color: #fff; }
.footer-col h4 {
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 18px;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.footer-col a { text-decoration: none; font-size: 0.92rem; color: rgba(255,255,255,0.7); }
.footer-col a:hover { color: #fff; }
.footer-contact li { display: flex; gap: 10px; align-items: flex-start; font-size: 0.92rem; color: rgba(255,255,255,0.7); }
.footer-contact i { color: var(--maroon); margin-top: 3px; flex-shrink: 0; }
.footer-bottom { border-top: 1px solid var(--dark-line); padding: 22px 0; }
.footer-bottom p { margin: 0; font-size: 0.82rem; color: rgba(255,255,255,0.45); }

/* ===== Scroll reveal ===== */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .split-intro-grid,
  .apply-grid { grid-template-columns: 1fr; gap: 40px; }
  .team-grid { gap: 28px; }
  .process-steps { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
  .site-header.is-open { backdrop-filter: none; -webkit-backdrop-filter: none; }
  .main-nav { position: fixed; top: 80px; left: 0; right: 0; bottom: 0; background: #fff; padding: 32px 24px; transform: translateX(100%); transition: transform 0.3s var(--ease); overflow-y: auto; }
  .site-header.is-open .main-nav { transform: translateX(0); }
  .main-nav ul { flex-direction: column; gap: 8px; }
  .main-nav a { display: block; padding: 14px 0; font-size: 1.15rem; border-bottom: 1px solid var(--line); color: var(--ink) !important; }
  .main-nav a::after { display: none; }
  .nav-toggle { display: flex; }

  .section { padding: 64px 0; }
  .hero-content { padding-bottom: 56px; }
  .stat-row { flex-direction: column; gap: 24px; }
  .stat-item { border-right: none; margin-right: 0; padding-right: 0; }
  .team-grid { grid-template-columns: 1fr; }
  .process-steps { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .apply-form { padding: 26px; }
  .footer-grid { grid-template-columns: 1fr; gap: 36px; }
}

/* Banner principal en celular y tablet vertical: foto completa (los tres) y texto debajo */
@media (max-width: 900px) {
  .hero {
    min-height: auto;
    flex-direction: column;
    align-items: stretch;
    background: var(--dark-bg);
    padding-top: 80px;
  }
  .hero-media {
    position: relative;
    inset: auto;
    width: 100%;
    aspect-ratio: 1701 / 1011;
  }
  .hero-media img { object-position: center; }
  .hero-scrim {
    background: linear-gradient(0deg, var(--dark-bg) 0%, rgba(23,17,15,0.55) 18%, rgba(23,17,15,0) 45%);
  }
  .hero-content { padding: 12px 24px 56px; }
}
