/* ============================================================
   Extin Gasex A&J SAS — Base tokens & shared components
   Sistema rojo / negro / blanco · Inter · escala tipo Linear
   Variantes redefinen tokens vía clases en <html data-variant>.
   ============================================================ */


:root {
  /* Brand */
  --red: #D60000;
  --red-600: #B80000;
  --red-700: #9A0000;
  --accent: #FF3B30;
  --ink: #111111;

  /* Cool neutral scale */
  --gray-50:  #FAFAFA;
  --gray-100: #F4F4F5;
  --gray-150: #ECECEE;
  --gray-200: #E4E4E7;
  --gray-300: #D4D4D8;
  --gray-400: #A1A1AA;
  --gray-500: #71717A;
  --gray-600: #52525B;
  --gray-700: #3F3F46;
  --gray-800: #27272A;
  --gray-900: #18181B;

  /* Semantic — overridden per variant */
  --bg: #FFFFFF;
  --bg-soft: var(--gray-50);
  --bg-inset: var(--gray-100);
  --surface: #FFFFFF;
  --text: var(--ink);
  --text-soft: var(--gray-600);
  --text-mute: var(--gray-500);
  --border: var(--gray-200);
  --border-strong: var(--gray-300);
  --primary: var(--red);
  --primary-hover: var(--red-600);
  --on-primary: #FFFFFF;

  /* Type scale (Linear-like) */
  --fs-eyebrow: 13px;
  --fs-body: 16px;
  --fs-lg: 18px;
  --fs-h4: 20px;
  --fs-h3: 26px;
  --fs-h2: clamp(30px, 3.4vw, 44px);
  --fs-h1: clamp(38px, 5.2vw, 66px);
  --lh-tight: 1.05;
  --lh-snug: 1.18;
  --lh-body: 1.6;

  /* Spacing */
  --space-section: clamp(64px, 8vw, 120px);
  --container: 1280px;

  /* Radius */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 22px;
  --r-pill: 999px;

  /* Shadow */
  --shadow-sm: 0 1px 2px rgba(17,17,17,.05), 0 1px 1px rgba(17,17,17,.04);
  --shadow-md: 0 4px 16px rgba(17,17,17,.06), 0 1px 3px rgba(17,17,17,.05);
  --shadow-lg: 0 18px 50px rgba(17,17,17,.10), 0 6px 16px rgba(17,17,17,.06);
  --shadow-red: 0 10px 30px rgba(214,0,0,.22);

  --ring: 0 0 0 2px #ffffff, 0 0 0 4px #D60000;
  --ease: cubic-bezier(.22,.61,.36,1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }
h1, h2, h3, h4, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--r-sm); }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 clamp(20px, 4vw, 48px); }
.section { padding: var(--space-section) 0; }
.section--soft { background: var(--bg-soft); }
.section--inset { background: var(--bg-inset); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: var(--fs-eyebrow); font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--primary);
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--primary); border-radius: 2px; }

.section-head { max-width: 720px; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head--center { margin-left: auto; margin-right: auto; margin-inline: auto; text-align: center; }
.section-head--center .eyebrow::before { display: none; }
.section-title { font-size: var(--fs-h2); font-weight: 800; line-height: var(--lh-snug); letter-spacing: -.02em; margin-top: 14px; overflow-wrap: break-word; text-wrap: balance; }
.section-sub { font-size: var(--fs-lg); color: var(--text-soft); margin-top: 16px; overflow-wrap: break-word; text-wrap: pretty; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 52px; padding: 0 26px; border-radius: var(--r-pill);
  font-weight: 600; font-size: 16px; letter-spacing: -.01em; white-space: nowrap;
  transition: transform .18s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
}
.btn svg { width: 19px; height: 19px; }
.btn--primary { background: var(--primary); color: var(--on-primary); box-shadow: var(--shadow-red); }
.btn--primary:hover { background: var(--primary-hover); transform: translateY(-2px); box-shadow: 0 16px 38px rgba(214,0,0,.30); }
.btn--wa { background: #25D366; color: #06351b; box-shadow: 0 10px 30px rgba(37,211,102,.30); }
.btn--wa:hover { background: #20bd5b; transform: translateY(-2px); }
.btn--ghost { background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); }
.btn--ghost:hover { border-color: var(--text); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn--lg { height: 58px; padding: 0 32px; font-size: 17px; }
.btn--block { width: 100%; }

/* ---------- Generic cards ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 28px; transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--border-strong); }

.icon-badge {
  width: 48px; height: 48px; border-radius: var(--r-md);
  display: grid; place-items: center; color: var(--primary);
  background: rgba(214, 0, 0, 0.09);
  background: color-mix(in srgb, var(--primary) 9%, transparent);
}
.icon-badge svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Image placeholders ---------- */
.ph {
  position: relative; border-radius: var(--r-lg); overflow: hidden;
  background:
    repeating-linear-gradient(135deg, var(--gray-100) 0 14px, var(--gray-150) 14px 28px);
  border: 1px solid var(--border);
  display: grid; place-items: center; color: var(--gray-500);
}
.ph::after {
  content: attr(data-label);
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 12px; letter-spacing: .04em; color: var(--gray-500);
  text-align: center; padding: 10px 16px; max-width: 80%;
  background: rgba(255, 255, 255, 0.78); background: color-mix(in srgb, var(--bg) 78%, transparent); border-radius: var(--r-pill);
}

/* ---------- Grids ---------- */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ---------- Service card ---------- */
.svc { display: flex; flex-direction: column; gap: 14px; }
.svc h3 { font-size: var(--fs-h4); font-weight: 700; letter-spacing: -.01em; }
.svc p { color: var(--text-soft); font-size: 15px; }

/* ---------- Catalog card ---------- */
.cat { display: flex; flex-direction: column; }
.cat__media { aspect-ratio: 4/3; margin: -28px -28px 20px; border-radius: var(--r-lg) var(--r-lg) 0 0; }
.cat__tag {
  align-self: flex-start; font-size: 12px; font-weight: 600; letter-spacing: .04em;
  color: var(--primary); background: rgba(214, 0, 0, 0.09); background: color-mix(in srgb, var(--primary) 9%, transparent);
  padding: 5px 12px; border-radius: var(--r-pill); margin-bottom: 12px;
}
.cat__family { font-size: var(--fs-h4); font-weight: 700; }
.cat__desc { color: var(--text-soft); font-size: 14.5px; margin-top: 8px; }
.cat__sizes { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.chip {
  font-size: 13px; font-weight: 600; color: var(--text-soft);
  border: 1px solid var(--border-strong); border-radius: var(--r-pill); padding: 6px 13px;
  transition: border-color .15s, color .15s, background .15s;
}
.cat:hover .chip { border-color: var(--border-strong); }
.chip:hover { color: var(--primary); border-color: var(--primary); }
.cat__cta {
  margin-top: 22px; display: inline-flex; align-items: center; gap: 7px;
  font-weight: 600; color: var(--primary); font-size: 15px;
}
.cat__cta svg { width: 17px; height: 17px; transition: transform .18s var(--ease); }
.cat:hover .cat__cta svg { transform: translateX(4px); }

/* ---------- Product card ---------- */
.prod { display: flex; flex-direction: column; gap: 0; padding: 0; overflow: hidden; }
.prod__media { aspect-ratio: 1/1; }
.prod__body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 6px; }
.prod__tag { font-size: 12px; font-weight: 600; letter-spacing: .04em; color: var(--text-mute); text-transform: uppercase; }
.prod__label { font-size: 16.5px; font-weight: 700; }
.prod__cta { margin-top: 10px; font-weight: 600; color: var(--primary); font-size: 14.5px; display: inline-flex; align-items: center; gap: 6px; }
.prod__cta svg { width: 16px; height: 16px; flex: 0 0 auto; transition: transform .18s var(--ease); }
.prod:hover .prod__cta svg { transform: translateX(4px); }

/* ---------- Stats / credibility bar ---------- */
.stat__value { font-size: clamp(30px, 4vw, 44px); font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.stat__value span { color: var(--primary); }
.stat__label { color: var(--text-soft); font-size: 14.5px; margin-top: 8px; }

/* ---------- Steps ---------- */
.step__n { font-size: 15px; font-weight: 700; color: var(--primary); letter-spacing: .1em; }
.step__title { font-size: var(--fs-h4); font-weight: 700; margin-top: 12px; }
.step__desc { color: var(--text-soft); font-size: 15px; margin-top: 8px; }

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--border); }
.faq__item { border-bottom: 1px solid var(--border); }
.faq__q {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 20px;
  text-align: left; padding: 22px 4px; font-size: var(--fs-lg); font-weight: 600; color: var(--text);
}
.faq__q:hover { color: var(--primary); }
.faq__icon { flex: 0 0 auto; width: 22px; height: 22px; position: relative; }
.faq__icon::before, .faq__icon::after { content: ""; position: absolute; background: var(--primary); border-radius: 2px; transition: transform .25s var(--ease); }
.faq__icon::before { top: 10px; left: 0; width: 22px; height: 2px; }
.faq__icon::after { top: 0; left: 10px; width: 2px; height: 22px; }
.faq__item.open .faq__icon::after { transform: scaleY(0); }
.faq__a { max-height: 0; overflow: hidden; transition: max-height .3s var(--ease); }
.faq__a p { padding: 0 4px 24px; color: var(--text-soft); font-size: 15.5px; max-width: 760px; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-size: 14px; font-weight: 600; color: var(--text); }
.field label .req { color: var(--primary); }
.input, .select, .textarea {
  width: 100%; background: var(--surface); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: var(--r-md);
  padding: 13px 15px; font: inherit; font-size: 15px;
  transition: border-color .15s, box-shadow .15s;
}
.input::placeholder, .textarea::placeholder { color: var(--gray-400); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--primary); box-shadow: var(--ring); }
.textarea { resize: vertical; min-height: 110px; }
.field--error .input, .field--error .select, .field--error .textarea { border-color: var(--accent); }
.field__err { font-size: 13px; color: var(--accent); font-weight: 500; visibility: hidden; height: 0; overflow: hidden; }
.field--error .field__err { visibility: visible; height: auto; overflow: visible; }

/* ---------- Logo (imagen real de marca) ---------- */
.eg-logo { display: inline-flex; align-items: center; line-height: 0; }
.eg-logo__img { height: 46px; width: auto; display: block; }
.eg-logo--sm .eg-logo__img { height: 38px; }
.eg-logo--lg .eg-logo__img { height: 66px; }
/* Placa blanca para superficies oscuras */
.eg-logo--plate { background: #fff; padding: 9px 13px; border-radius: var(--r-md); box-shadow: var(--shadow-sm); }
.eg-logo--plate .eg-logo__img { height: 40px; }

/* ---------- WhatsApp float ---------- */
.wa-float {
  position: fixed; right: 22px; bottom: 22px; z-index: 60;
  display: inline-flex; align-items: center; gap: 12px;
  background: #25D366; color: #06351b; font-weight: 700; font-size: 15px;
  padding: 14px 20px 14px 16px; border-radius: var(--r-pill);
  box-shadow: 0 14px 36px rgba(37,211,102,.4);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.wa-float:hover { transform: translateY(-3px) scale(1.02); }
.wa-float svg { width: 26px; height: 26px; }
.wa-float .wa-pulse { position: absolute; top: 0; right: 0; bottom: 0; left: 0; inset: 0; border-radius: var(--r-pill); box-shadow: 0 0 0 0 rgba(37,211,102,.55); animation: waPulse 2.4s infinite; }
@keyframes waPulse { 0% { box-shadow: 0 0 0 0 rgba(37,211,102,.5);} 70%{ box-shadow: 0 0 0 16px rgba(37,211,102,0);} 100%{ box-shadow:0 0 0 0 rgba(37,211,102,0);} }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .card, .wa-float { transition: none; }
  .btn:hover, .card:hover, .wa-float:hover { transform: none; }
}

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: #E7E7EA; }
.footer a { color: #C9C9CF; }
.footer a:hover { color: #fff; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .btn { width: 100%; }
}
