/* =========================================================
   INGENIERÍA TRIPLE T — Hoja de estilos
   Paleta tomada del logo oficial: negro, blanco y rojo.
   ========================================================= */

:root {
  --ink:        #0B0B0C;
  --ink-soft:   #16181B;
  --red:        #E23B35;
  --red-dark:   #C22E29;

  --text:       #17191C;
  --text-muted: #5C636C;
  --text-dim:   #8B939C;

  --bg:         #FFFFFF;
  --bg-soft:    #F5F6F7;
  --line:       #E3E6E9;
  --line-dark:  rgba(255, 255, 255, .14);

  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  --font-display: 'Montserrat', 'Segoe UI', Arial, sans-serif;

  --wrap: 1160px;
  --radius: 4px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.015em;
  margin: 0;
}
p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--ink); color: #fff; padding: .75rem 1.25rem;
}
.skip-link:focus { left: 0; }

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

/* ---------- Marca ---------- */
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-mark { display: block; width: 26px; color: currentColor; flex: none; }
.brand-mark svg { width: 100%; height: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: .95rem;
  letter-spacing: .06em;
}
.brand-tag {
  font-size: .625rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 600;
  white-space: nowrap;
}
.accent { color: var(--red); }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .95rem 1.85rem;
  font-family: var(--font-display);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  white-space: nowrap;
  transition: background-color .2s var(--ease), color .2s var(--ease),
              border-color .2s var(--ease), transform .2s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); }
.btn-ghost { border-color: rgba(255, 255, 255, .3); color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, .1); border-color: #fff; }
.btn-sm { padding: .7rem 1.25rem; font-size: .7rem; }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(11, 11, 12, .92);
  backdrop-filter: blur(10px);
  color: #fff;
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background-color .3s var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--line-dark); }
.site-header .brand-tag { color: rgba(255, 255, 255, .55); }

.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem;
  min-height: 78px;
}
.nav { display: flex; align-items: center; gap: 2rem; }
.nav > a {
  font-size: .85rem;
  font-weight: 500;
  color: rgba(255, 255, 255, .8);
  transition: color .2s var(--ease);
}
.nav > a:hover { color: #fff; }
.nav > a.btn { color: #fff; }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  background: none; border: 0; cursor: pointer;
  padding: 12px 10px;
}
.nav-toggle span {
  display: block; height: 2px; background: #fff; border-radius: 2px;
  transition: transform .25s var(--ease), opacity .2s var(--ease);
}
.nav-toggle span + span { margin-top: 5px; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  background: var(--ink);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(255,255,255,.05), transparent 45%),
    radial-gradient(60% 70% at 78% 22%, rgba(226,59,53,.14), transparent 70%);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: 4.5rem;
  align-items: center;
  padding-block: clamp(4.5rem, 11vw, 8.5rem);
}
.eyebrow {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 1.25rem;
}
.hero h1 {
  font-size: clamp(1.95rem, 4.4vw, 3.45rem);
  font-weight: 800;
  letter-spacing: -.025em;
  margin-bottom: 1.5rem;
  max-width: 17ch;
  text-wrap: balance;
}
.hero h1::after {
  content: '';
  display: block;
  width: 64px; height: 4px;
  background: var(--red);
  margin-top: 1.75rem;
}
.lead {
  font-size: 1.075rem;
  color: rgba(255, 255, 255, .72);
  max-width: 54ch;
  margin-bottom: 2.25rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: .85rem; margin-bottom: 3rem; }
.hero-facts {
  display: flex; flex-wrap: wrap; gap: .6rem 1.75rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line-dark);
}
.hero-facts li {
  font-size: .78rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  font-weight: 600;
  color: rgba(255, 255, 255, .6);
  display: flex; align-items: center; gap: .6rem;
}
.hero-facts li::before {
  content: ''; width: 5px; height: 5px; background: var(--red); flex: none;
}

/* Placa del logo */
.hero-logo { display: flex; justify-content: center; }
.logo-plate {
  width: 100%;
  max-width: 360px;
  aspect-ratio: 1 / 1;
  background: #000;
  border: 1px solid var(--line-dark);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 2.5rem;
  text-align: center;
}
.logo-plate-mark { width: 108px; color: #fff; }
.logo-plate-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1rem, 2.2vw, 1.3rem);
  letter-spacing: .04em;
  margin: 2rem 0 .5rem;
}
.logo-plate-sub {
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .62);
  margin: 0;
}

/* ---------- Secciones ---------- */
.section { padding-block: clamp(4rem, 8vw, 7rem); }
.section-soft { background: var(--bg-soft); }
.section-dark { background: var(--ink); color: #fff; }
.section-dark .section-intro { color: rgba(255, 255, 255, .7); }

.section-head { max-width: 62ch; margin-bottom: 3.5rem; }
.section-kicker {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: .9rem;
}
.section h2 {
  font-size: clamp(1.7rem, 3.2vw, 2.35rem);
  margin-bottom: 1rem;
}
.section-intro { color: var(--text-muted); font-size: 1.03rem; }

/* ---------- Grillas y tarjetas ---------- */
.grid { display: grid; gap: 1.5rem; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2.25rem 1.9rem;
  position: relative;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease), transform .25s var(--ease);
}
.card::before {
  content: '';
  position: absolute; top: -1px; left: -1px;
  width: 0; height: 3px; background: var(--red);
  transition: width .3s var(--ease);
}
.card:hover {
  border-color: #D3D7DB;
  box-shadow: 0 14px 40px rgba(11, 11, 12, .07);
  transform: translateY(-3px);
}
.card:hover::before { width: 56px; }
.card-num {
  font-family: var(--font-display);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .16em;
  color: var(--text-dim);
}
.card h3 { font-size: 1.13rem; margin: .75rem 0 .85rem; }
.card p { color: var(--text-muted); font-size: .95rem; }
.card ul {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  display: grid;
  gap: .5rem;
}
.card ul li {
  font-size: .875rem;
  color: var(--text-muted);
  padding-left: 1.1rem;
  position: relative;
}
.card ul li::before {
  content: '';
  position: absolute; left: 0; top: .62em;
  width: 5px; height: 5px; background: var(--red);
}

/* ---------- Sectores ---------- */
.sector-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.sector-list li {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 1.9rem 1.75rem;
  background: #fff;
  transition: background-color .25s var(--ease);
}
.sector-list li:hover { background: var(--ink); color: #fff; }
.sector-list li:hover small { color: rgba(255, 255, 255, .65); }
.sector-list span {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.02rem;
  margin-bottom: .35rem;
}
.sector-list small { color: var(--text-muted); font-size: .88rem; line-height: 1.5; display: block; }

/* ---------- Nosotros ---------- */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: 4rem;
  align-items: start;
}
.about-grid h2 { margin-bottom: 1.5rem; }
.about-grid p { color: var(--text-muted); }
.about-grid strong { color: var(--text); font-weight: 600; }

.values { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.value { background: #fff; padding: 1.75rem 1.5rem; }
.value h3 { font-size: 1rem; margin-bottom: .5rem; }
.value h3::before {
  content: ''; display: block; width: 22px; height: 3px;
  background: var(--red); margin-bottom: .9rem;
}
.value p { font-size: .89rem; color: var(--text-muted); }

/* ---------- Metodología ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 0;
  border-top: 1px solid var(--line-dark);
}
.steps li {
  padding: 2.25rem 1.75rem 2.25rem 0;
  border-right: 1px solid var(--line-dark);
  position: relative;
}
.steps li:last-child { border-right: 0; }
.steps li:not(:first-child) { padding-left: 1.75rem; }
.steps li::before {
  content: '';
  position: absolute; top: -2px; left: 0;
  width: 40px; height: 3px; background: var(--red);
}
.steps li:not(:first-child)::before { left: 1.75rem; }
.step-num {
  font-family: var(--font-display);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .16em;
  color: var(--red);
}
.steps h3 { font-size: 1.08rem; margin: .7rem 0 .7rem; }
.steps p { color: rgba(255, 255, 255, .65); font-size: .92rem; }

/* ---------- Banda CTA ---------- */
.cta-band { background: var(--bg-soft); border-block: 1px solid var(--line); }
.cta-inner {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 2rem;
  padding-block: clamp(2.75rem, 5vw, 4rem);
}
.cta-inner h2 { font-size: clamp(1.4rem, 2.6vw, 1.85rem); margin-bottom: .5rem; }
.cta-inner p { color: var(--text-muted); margin: 0; }

/* ---------- Contacto ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 4rem;
  align-items: start;
}
.contact-list { margin-top: 2.5rem; display: grid; gap: 0; border-top: 1px solid var(--line); }
.contact-list li {
  display: flex; flex-wrap: wrap; gap: .35rem 1.5rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}
.contact-label {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-dim);
  min-width: 96px;
}
.contact-list a { border-bottom: 1px solid var(--line); transition: border-color .2s var(--ease); }
.contact-list a:hover { border-bottom-color: var(--red); color: var(--red); }

.contact-form {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2.25rem;
  display: grid;
  gap: 1.15rem;
}
.field { display: grid; gap: .45rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.15rem; }
.field label {
  font-size: .76rem;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.field .opt { text-transform: none; letter-spacing: 0; color: var(--text-dim); font-weight: 400; }
.field input, .field select, .field textarea {
  font: inherit;
  font-size: .95rem;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: .8rem .9rem;
  width: 100%;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(11, 11, 12, .07);
}
.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] { border-color: var(--red); }
.form-note { font-size: .85rem; color: var(--text-muted); margin: 0; min-height: 1.2em; }
.form-note.is-error { color: var(--red); }
.form-note.is-ok { color: #1a8a4a; }

/* Trampa anti-spam: oculta a personas, visible para bots */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* Estado "enviando": botón deshabilitado */
.contact-form button[disabled] { opacity: .6; cursor: progress; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #fff; padding-top: clamp(3.5rem, 6vw, 5rem); }
.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 3rem;
  padding-bottom: 3rem;
}
.footer-brand .brand-mark { width: 30px; margin-bottom: 1.25rem; }
.footer-brand .brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: .06em;
  margin: 0 0 1rem;
}
.footer-legal { font-size: .85rem; color: rgba(255, 255, 255, .55); line-height: 1.75; }

.footer-nav { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
.footer-nav h4 {
  font-size: .72rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .45);
  margin-bottom: 1rem;
}
.footer-nav a {
  display: block;
  font-size: .9rem;
  color: rgba(255, 255, 255, .78);
  padding: .3rem 0;
  transition: color .2s var(--ease);
}
.footer-nav a:hover { color: var(--red); }

.footer-bottom {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 1rem;
  padding-block: 1.5rem;
  border-top: 1px solid var(--line-dark);
  font-size: .82rem;
  color: rgba(255, 255, 255, .5);
}
.footer-bottom p { margin: 0; }
.to-top:hover { color: #fff; }

/* ---------- Animación de entrada ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .65s var(--ease), transform .65s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .nav { gap: 1.35rem; }
  .nav > a { font-size: .8rem; }
}

@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; gap: 3rem; }
  .hero h1 { max-width: 20ch; }
  .hero-logo { justify-content: flex-start; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 2.75rem; }
  .footer-inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .steps li { border-right: 0; border-bottom: 1px solid var(--line-dark); padding-inline: 0 !important; }
  .steps li::before { left: 0 !important; }
}

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav {
    position: fixed;
    inset: 78px 0 auto 0;
    background: var(--ink);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 1rem 24px 2rem;
    border-bottom: 1px solid var(--line-dark);
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s var(--ease), transform .25s var(--ease), visibility .25s;
  }
  .nav.is-open { opacity: 1; visibility: visible; transform: none; }
  .nav > a { padding: .9rem 0; border-bottom: 1px solid var(--line-dark); font-size: .95rem; }
  .nav > a.btn { margin-top: 1.25rem; border-bottom: 0; justify-content: center; }
  .values { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .contact-form { padding: 1.5rem; }
  .footer-nav { grid-template-columns: 1fr; }
  .hero-actions .btn { flex: 1 1 100%; }
}

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