/* ============================================================
   Petrox Energía — Landing
   Paleta y tipografía según manual de marca (Etapa 1)
   ============================================================ */

:root {
  --rojo: #A6192E;        /* Rojo Petrox */
  --rojo-osc: #7E1222;    /* Rojo oscuro */
  --negro: #1A1A1A;       /* Negro */
  --hueso: #ECEAE6;       /* Hueso */
  --hueso-2: #EEEBE7;
  --gris-calido: #C9C4BD; /* Gris cálido */
  --borde: #DAD6D0;
  --texto: #1A1A1A;
  --texto-2: #4A453F;
  --texto-3: #6B6560;
  --texto-4: #8A847D;
  --blanco: #FFFFFF;

  --font-marca: 'Chakra Petch', system-ui, sans-serif;
  --font-cuerpo: 'Rajdhani', system-ui, sans-serif;

  --maxw: 1140px;
  --pad: clamp(20px, 5vw, 48px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  font-family: var(--font-cuerpo);
  color: var(--texto);
  background: var(--hueso);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  scroll-padding-top: 80px;
}

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

a { color: var(--rojo); text-decoration: none; }
a:hover { color: var(--rojo-osc); }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--negro);
  color: #fff;
  padding: 10px 16px;
  z-index: 200;
}
.skip-link:focus { left: 8px; top: 8px; color: #fff; }

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

/* ===== Marca / logo ===== */
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-emblem { width: 40px; height: 40px; flex-shrink: 0; }
.brand-emblem svg { width: 100%; height: 100%; }
.brand-word { display: flex; flex-direction: column; line-height: 1; gap: 2px; }
.brand-name {
  font-family: var(--font-marca);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 3px;
  color: var(--rojo);
}
.brand-sub {
  font-family: var(--font-marca);
  font-weight: 600;
  font-size: 9px;
  letter-spacing: 6px;
  color: var(--negro);
}
.brand-name--light { color: #fff; }
.brand-sub--light { color: var(--gris-calido); }

/* ===== Botones ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-marca);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 1px;
  padding: 14px 26px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
  text-transform: uppercase;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--rojo); color: #fff; }
.btn-primary:hover { background: var(--rojo-osc); color: #fff; }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }
.btn-ghost:hover { background: #fff; color: var(--negro); border-color: #fff; }
.btn-block { width: 100%; }

/* ===== Etiquetas de sección ===== */
.label {
  font-family: var(--font-marca);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--rojo);
  margin-bottom: 14px;
}
.label-light { color: var(--rojo); }

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(236,234,230,.86);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--borde);
}
.site-header::before {
  content: "";
  display: block;
  height: 4px;
  background: var(--rojo);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
}
.site-nav { display: flex; align-items: center; gap: 30px; }
.site-nav a {
  font-family: var(--font-marca);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--negro);
  position: relative;
  padding: 4px 0;
}
.site-nav a:not(.nav-cta)::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 2px;
  background: var(--rojo);
  transition: width .2s ease;
}
.site-nav a:not(.nav-cta):hover { color: var(--rojo); }
.site-nav a:not(.nav-cta):hover::after { width: 100%; }
.nav-cta {
  background: var(--negro);
  color: #fff !important;
  padding: 10px 20px;
}
.nav-cta:hover { background: var(--rojo); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 26px; height: 2px;
  background: var(--negro);
  transition: transform .2s ease, opacity .2s ease;
}
.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); }

.mobile-nav {
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid var(--borde);
  background: var(--hueso);
}
/* El atributo hidden debe ganarle al display:flex de arriba */
.mobile-nav[hidden] { display: none; }
/* En desktop el menú móvil nunca se muestra */
@media (min-width: 761px) {
  .mobile-nav { display: none; }
}
.mobile-nav a {
  font-family: var(--font-marca);
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--negro);
  padding: 16px var(--pad);
  border-top: 1px solid var(--borde);
}
.mobile-nav a:hover { color: var(--rojo); background: var(--hueso-2); }

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  background: var(--negro);
  color: #fff;
  overflow: hidden;
  padding: clamp(72px, 12vw, 140px) 0 clamp(64px, 10vw, 120px);
}
.hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at 30% 20%, #000 0%, transparent 72%);
}
.hero-emblem {
  position: absolute;
  right: clamp(-120px, -6vw, -40px);
  top: 50%;
  transform: translateY(-50%);
  width: clamp(340px, 46vw, 620px);
  opacity: .10;
  pointer-events: none;
}
.hero-inner { position: relative; max-width: 760px; }
.eyebrow {
  font-family: var(--font-marca);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--gris-calido);
  margin-bottom: 22px;
  padding-left: 16px;
  border-left: 3px solid var(--rojo);
}
.hero h1 {
  font-family: var(--font-marca);
  font-weight: 700;
  font-size: clamp(40px, 8vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.5px;
  margin-bottom: 26px;
}
.hero h1 span { color: var(--rojo); }
.hero-lead {
  font-size: clamp(17px, 2.4vw, 21px);
  font-weight: 400;
  color: #D7D3CD;
  max-width: 600px;
  margin-bottom: 36px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* ============================================================
   Franja de capacidades
   ============================================================ */
.strip { background: var(--rojo); color: #fff; }
.strip-inner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
}
.strip-item {
  padding: 26px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
}
.strip-item + .strip-item::before {
  content: "";
  position: absolute;
  left: -1px; top: 22px; bottom: 22px;
  width: 1px;
  background: rgba(255,255,255,.22);
}
.strip-k {
  font-family: var(--font-marca);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: .5px;
}
.strip-v { font-size: 15px; color: rgba(255,255,255,.85); }

/* ============================================================
   Secciones genéricas
   ============================================================ */
.section { padding: clamp(64px, 10vw, 112px) 0; }
.section-head { max-width: 640px; margin-bottom: 52px; }
.section-head h2,
.section h2 {
  font-family: var(--font-marca);
  font-weight: 700;
  font-size: clamp(28px, 4.5vw, 46px);
  line-height: 1.08;
  letter-spacing: -0.4px;
}
.section-intro {
  margin-top: 18px;
  font-size: 18px;
  color: var(--texto-3);
}

/* ===== Cards de servicios ===== */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1px;
  background: var(--borde);
  border: 1px solid var(--borde);
}
.card {
  background: var(--blanco);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform .2s ease, box-shadow .2s ease;
  position: relative;
}
.card::before {
  content: "";
  position: absolute;
  left: 0; top: 0;
  width: 100%; height: 3px;
  background: var(--rojo);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(26,26,26,.10); z-index: 2; }
.card:hover::before { transform: scaleX(1); }
.card-ico {
  width: 44px; height: 44px;
  color: var(--rojo);
}
.card-ico svg {
  width: 100%; height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.card h3 {
  font-family: var(--font-marca);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: .3px;
  color: var(--negro);
}
.card p { font-size: 15.5px; color: var(--texto-3); }

.card-tag {
  align-self: flex-start;
  font-family: var(--font-marca);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--texto-4);
  border: 1px solid var(--borde);
  padding: 3px 8px;
}

/* ===== Nosotros (oscuro) ===== */
.section-dark { background: var(--negro); color: #fff; }
.section-dark h2 { color: #fff; }
.nosotros-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: start;
}
.nosotros-lead {
  font-size: 18px;
  color: #CFC9C2;
  margin-top: 20px;
  max-width: 46ch;
}
.values { list-style: none; display: flex; flex-direction: column; }
.values li {
  padding: 22px 0;
  border-top: 1px solid rgba(255,255,255,.14);
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.values li:last-child { border-bottom: 1px solid rgba(255,255,255,.14); }
.value-k {
  font-family: var(--font-marca);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: .5px;
  color: #fff;
  position: relative;
  padding-left: 20px;
}
.value-k::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 9px; height: 9px;
  background: var(--rojo);
}
.value-v { font-size: 15.5px; color: #B4AEA6; padding-left: 20px; }

.nosotros-claim {
  margin-top: 24px;
  padding: 16px 20px;
  border-left: 3px solid var(--rojo);
  background: rgba(255,255,255,.05);
  font-family: var(--font-marca);
  font-weight: 500;
  font-size: 17px;
  line-height: 1.45;
  color: #fff;
  max-width: 48ch;
}

/* ===== Trayectoria ===== */
.section-trayectoria { background: var(--blanco); }
.tray-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: start;
}
.tray-lead {
  font-size: 18px;
  color: var(--texto-3);
  margin-top: 20px;
  max-width: 52ch;
}
.tray-lead strong { color: var(--negro); }
.tray-photo {
  margin: 0 0 30px;
  border: 1px solid var(--borde);
  background: var(--blanco);
  padding: 10px;
  max-width: 340px; /* foto retrato: acotar para que no domine la columna */
}
.tray-photo img { display: block; width: 100%; }
.tray-photo figcaption {
  padding: 10px 2px 2px;
  font-size: 13px;
  color: var(--texto-4);
  line-height: 1.5;
}
.timeline {
  list-style: none;
  border-left: 2px solid var(--borde);
  padding-left: 26px;
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 30px;
}
.timeline li { position: relative; display: flex; flex-direction: column; gap: 5px; }
.timeline li::before {
  content: "";
  position: absolute;
  left: -33px;
  top: 7px;
  width: 12px;
  height: 12px;
  background: var(--rojo);
}
.tl-k {
  font-family: var(--font-marca);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: .5px;
  color: var(--negro);
}
.tl-v { font-size: 15.5px; color: var(--texto-3); }
.tray-highlights {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 3vw, 36px);
  margin-top: clamp(40px, 6vw, 64px);
}
.hl {
  border-top: 2px solid var(--negro);
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.hl-k {
  font-family: var(--font-marca);
  font-weight: 700;
  font-size: clamp(22px, 3vw, 28px);
  color: var(--rojo);
  line-height: 1.1;
}
.hl-v { font-size: 15.5px; color: var(--texto-3); }

/* ===== Sectores ===== */
.sectors {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1px;
  background: var(--borde);
  border: 1px solid var(--borde);
}
.sector {
  background: var(--blanco);
  padding: 26px 28px;
  display: flex;
  align-items: center;
  gap: 18px;
  transition: background .18s ease;
}
.sector:hover { background: var(--hueso-2); }
.sector-n {
  font-family: var(--font-marca);
  font-weight: 700;
  font-size: 22px;
  color: var(--rojo);
  min-width: 34px;
}
.sector-t {
  font-family: var(--font-marca);
  font-weight: 600;
  font-size: 17px;
  color: var(--negro);
  letter-spacing: .3px;
}

/* ===== Contacto ===== */
.section-contact { background: var(--hueso-2); }
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(36px, 6vw, 72px);
  align-items: start;
}
.contact-intro { font-size: 18px; color: var(--texto-3); margin-bottom: 30px; max-width: 42ch; }
.contact-direct {
  border-top: 2px solid var(--negro);
  padding-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.contact-direct a {
  font-family: var(--font-marca);
  font-weight: 600;
  font-size: 20px;
  color: var(--negro);
}
.contact-direct a:hover { color: var(--rojo); }

.contact-form {
  background: var(--blanco);
  border: 1px solid var(--borde);
  padding: clamp(24px, 4vw, 38px);
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.field { display: flex; flex-direction: column; gap: 7px; }
.field label {
  font-family: var(--font-marca);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--texto-2);
}
.field .opt { color: var(--texto-4); font-weight: 500; text-transform: none; letter-spacing: 0; }
.field input,
.field textarea,
.field select {
  font-family: var(--font-cuerpo);
  font-size: 16px;
  color: var(--negro);
  background: var(--hueso);
  border: 1px solid var(--borde);
  padding: 13px 14px;
  transition: border-color .15s ease, background .15s ease;
}
.field select { cursor: pointer; }
.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--rojo);
  background: #fff;
}
.field textarea { resize: vertical; min-height: 96px; }
.field input:invalid:not(:placeholder-shown),
.field textarea:invalid:not(:placeholder-shown) { border-color: var(--rojo); }

.form-status {
  font-family: var(--font-marca);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: .3px;
  min-height: 1.2em;
}
.form-status.ok { color: var(--rojo); }
.form-status.err { color: var(--rojo-osc); }

/* Badge de reCAPTCHA oculto — la atribución obligatoria se muestra
   como texto junto al formulario (.recaptcha-note) */
.grecaptcha-badge { visibility: hidden; }
.recaptcha-note {
  font-size: 13px;
  color: var(--texto-4);
  line-height: 1.5;
}
.recaptcha-note a { color: var(--texto-3); text-decoration: underline; }
.recaptcha-note a:hover { color: var(--rojo); }

/* ============================================================
   Footer
   ============================================================ */
.site-footer { background: var(--negro); color: #fff; }
.footer-inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 40px;
  padding-top: clamp(48px, 7vw, 72px);
  padding-bottom: 40px;
}
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-legal p { font-size: 15px; color: #B4AEA6; margin-bottom: 6px; }
.footer-legal a { color: #fff; }
.footer-legal a:hover { color: var(--gris-calido); }
.footer-nav { display: flex; flex-direction: column; gap: 12px; }
.footer-nav a {
  font-family: var(--font-marca);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #CFC9C2;
}
.footer-nav a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.12);
  padding: 20px 0;
}
.footer-bottom span { font-size: 14px; color: var(--texto-4); }

/* ============================================================
   Botón flotante de WhatsApp (listo para activar — ver TODO en index.html)
   ============================================================ */
.wa-float {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 150;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #25D366;
  border-radius: 50%;
  box-shadow: 0 6px 20px rgba(26,26,26,.25);
  transition: transform .18s ease, box-shadow .18s ease;
}
.wa-float:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(26,26,26,.3); }
.wa-float svg { width: 30px; height: 30px; fill: #fff; }

/* ============================================================
   Animaciones de aparición
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
  .nosotros-grid { grid-template-columns: 1fr; }
  .tray-grid { grid-template-columns: 1fr; }
  .tray-highlights { grid-template-columns: 1fr; gap: 20px; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .site-nav { display: none; }
  .nav-toggle { display: flex; }
  .strip-inner { grid-template-columns: 1fr; gap: 0; }
  .strip-item { padding: 20px var(--pad); border-top: 1px solid rgba(255,255,255,.18); }
  .strip-item + .strip-item::before { display: none; }
  .strip-item:first-child { border-top: none; }
  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
}
