/* ============================================================
   MATHEV — styles.css
   Hoja de estilos compartida: index.html · productos.html · sobre.html
   Tokens de marca, tipografía, componentes y layout.
============================================================ */

/* ---------- Fuentes ---------- */
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@600;700&family=Open+Sans:wght@400;500;600;700&display=swap");

/* ---------- Tokens ---------- */
:root{
  /* Marca — solo interactivos y acentos */
  --brand:#a0243f;
  --brand-hover:#7e1c32;
  --accent:#df3156;
  --accent-hover:#c5294a;
  --soft:#f0e5e7;
  --soft-tint:#faf2f4;

  /* Neutros — 90% de la UI */
  --ink:#1f1f24;
  --gray:#5f6368;
  --border:#e6e1e3;
  --bg:#f7f7f8;
  --surface:#ffffff;

  /* Sistema — solo feedback */
  --success:#2e7d57;
  --warning:#b8791f;
  --error:#b3261e;
  --info:#2f6f97;

  --focus-ring:0 0 0 3px rgba(160,36,63,.12);

  /* Tipografía */
  --font-display:'Poppins',system-ui,sans-serif;
  --font-body:'Open Sans',system-ui,sans-serif;

  --t-eyebrow:13px;
  --t-display:clamp(38px,5.4vw,60px);
  --t-h2:clamp(27px,3.4vw,36px);
  --t-h3:21px;
  --t-lead:clamp(18px,1.9vw,21px);
  --t-body:16px;
  --t-small:14px;

  /* Espaciado — base 8px */
  --space-xs:4px;
  --space-sm:8px;
  --space-md:16px;
  --space-lg:24px;
  --space-xl:32px;
  --space-2xl:48px;

  /* Radios */
  --radius-sm:8px;
  --radius-md:12px;
  --radius-lg:16px;
  --radius-xl:24px;
  --radius-pill:9999px;

  /* Easing de marca */
  --ease-brand: cubic-bezier(.2,.8,.2,1);
}

/* ---------- Reset base ---------- */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}
body{
  background:var(--bg);
  color:var(--gray);
  font-family:var(--font-body);
  font-size:var(--t-body);
  line-height:1.65;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}
img,svg{display:block;max-width:100%}

/* ---------- Tipografía ---------- */
h1,h2,h3{font-family:var(--font-display);font-weight:600;color:var(--ink);margin:0}
h1{font-size:var(--t-display);line-height:1.08;letter-spacing:-.022em}
h2{font-size:var(--t-h2);line-height:1.14;letter-spacing:-.018em}
h3{font-size:var(--t-h3);line-height:1.25;letter-spacing:-.01em}
p{margin:0}
.lead{font-size:var(--t-lead);line-height:1.6;color:var(--gray)}
.wordmark{font-family:var(--font-display);font-weight:600;color:var(--ink);letter-spacing:-.01em}

a{color:var(--accent);text-decoration:none;border-bottom:1px solid transparent;
  transition:color 120ms ease,border-color 120ms ease}
a:hover{color:var(--accent-hover);border-bottom-color:currentColor}

/* Titulares en dos tonos: primera frase tinta, segunda vino */
.two-tone .line-1{display:block;color:var(--ink)}
.two-tone .line-2{display:block;color:var(--brand)}

/* ---------- Botones ---------- */
.btn{
  font-family:var(--font-display);font-size:15px;font-weight:600;line-height:1;
  border-radius:var(--radius-sm);padding:14px 28px;border:.5px solid var(--border);
  background:var(--surface);color:var(--ink);cursor:pointer;
  display:inline-flex;align-items:center;justify-content:center;gap:var(--space-sm);
  white-space:nowrap;text-decoration:none;
  transition:background 120ms ease,color 120ms ease,border-color 120ms ease;
}
.btn:focus-visible{outline:none;box-shadow:var(--focus-ring)}
.btn--primary{background:var(--brand);color:var(--surface);border-color:var(--brand)}
.btn--primary:hover{background:var(--brand-hover);border-color:var(--brand-hover);color:var(--surface)}
.btn--secondary{background:var(--surface);color:var(--brand);border-color:var(--brand)}
.btn--secondary:hover{background:var(--soft)}
.btn--link{
  background:none;border:none;padding:14px 2px;color:var(--brand);font-weight:600;
  border-radius:0;border-bottom:1px solid transparent;
}
.btn--link:hover{color:var(--brand-hover);border-bottom-color:currentColor;background:none}
.btn--sm{font-size:14px;padding:10px 20px}

/* ---------- Scroll reveal (skill mathev-animaciones-web) ---------- */
.reveal{
  opacity:0;
  transform:translateY(18px);
  transition:opacity 0.6s var(--ease-brand),
              transform 0.6s var(--ease-brand);
}
.reveal.in{opacity:1;transform:none}
@media (prefers-reduced-motion: reduce){
  .reveal{opacity:1;transform:none;transition:none}
}

/* ---------- Icono compartido (tarjetas) ---------- */
.icon{
  width:44px;height:44px;border-radius:var(--radius-sm);
  background:var(--soft);display:flex;align-items:center;justify-content:center;
  margin-bottom:var(--space-md);flex-shrink:0;
}
.icon svg{width:22px;height:22px;stroke:var(--brand);fill:none;stroke-width:1.5;
  stroke-linecap:round;stroke-linejoin:round}

/* ============================================================
   NAV
============================================================ */
.nav{
  position:sticky;top:0;z-index:100;
  background:rgba(247,247,248,.92);
  backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);
  border-bottom:.5px solid var(--border);
}
.nav-inner{
  max-width:1120px;margin:0 auto;padding:0 48px;
  display:flex;align-items:center;justify-content:space-between;height:72px;
  position:relative;
}
.nav-logo{display:flex;align-items:center;gap:10px;text-decoration:none;border-bottom:none}
.nav-logo svg{width:28px;height:28px}
.nav-wordmark{font-family:var(--font-display);font-weight:600;font-size:18px;color:var(--brand);letter-spacing:-.01em}

.nav-menu{display:flex;align-items:center;gap:var(--space-xl)}
.nav-links{display:flex;align-items:center;gap:var(--space-xl)}
.nav-links a{font-size:14px;font-weight:600;color:var(--gray);text-decoration:none;border-bottom:none;transition:color 120ms ease}
.nav-links a:hover,.nav-links a.active{color:var(--brand)}

.nav-toggle{
  display:none;flex-direction:column;justify-content:center;align-items:center;gap:5px;
  width:40px;height:40px;border:.5px solid var(--border);border-radius:var(--radius-sm);
  background:var(--surface);cursor:pointer;flex-shrink:0;
}
.nav-toggle span{display:block;width:18px;height:2px;background:var(--ink);
  transition:transform 120ms ease,opacity 120ms ease}
.nav.open .nav-toggle span:nth-child(1){transform:translateY(7px) rotate(45deg)}
.nav.open .nav-toggle span:nth-child(2){opacity:0}
.nav.open .nav-toggle span:nth-child(3){transform:translateY(-7px) rotate(-45deg)}

/* ============================================================
   HERO
============================================================ */
.hero{
  max-width:1120px;margin:0 auto;padding:72px 48px 88px;
  display:grid;grid-template-columns:1.1fr .9fr;gap:var(--space-2xl);align-items:center;
}
.hero-title{margin-bottom:var(--space-lg)}
.hero-sub{font-size:var(--t-lead);color:var(--gray);line-height:1.6;max-width:480px;margin-bottom:var(--space-xl)}
.hero-actions{display:flex;align-items:center;gap:var(--space-md);flex-wrap:wrap}

.hero-visual{display:flex;align-items:center;justify-content:center}
.lis-wrap{width:320px;height:320px;position:relative;display:flex;align-items:center;justify-content:center}
.lis-wrap svg{width:100%;height:100%}

/* Hero centrado (productos / sobre) — titulares estilo Stripe: izquierda, tamaño contenido */
.hero--center{max-width:1120px;margin:0 auto;padding:96px 48px 80px;text-align:left;display:block;position:relative}
.hero--center .hero-title{
  font-size:clamp(2rem,4vw,3.2rem);
  line-height:1.1;
  letter-spacing:-0.02em;
  max-width:760px;
}
.hero--center .two-tone .line-1,
.hero--center .two-tone .line-2{display:inline}

/* Lissajous — acento en hero centrado, variación del hero de inicio */
.lis-accent{position:absolute;pointer-events:none}
.lis-accent path{fill:none;stroke:var(--brand);stroke-width:1.5;stroke-linecap:round}
.lis-accent--products{top:24px;right:48px;width:96px;height:96px}
.lis-accent--about{bottom:16px;right:64px;width:150px;height:150px}

/* ============================================================
   SECCIONES (base)
============================================================ */
.section{padding:80px 0}
.section--tint{background:var(--soft-tint)}
.section--surface{background:var(--surface);border-top:.5px solid var(--border);border-bottom:.5px solid var(--border)}

.s-inner{max-width:1120px;margin:0 auto;padding:0 48px}
.s-head{max-width:680px;margin:0 auto var(--space-2xl);text-align:center}
.s-title{margin-bottom:var(--space-md)}
.s-desc{font-size:var(--t-body);color:var(--gray);line-height:1.7}

/* ============================================================
   INTRO — "Qué es Mathev"
============================================================ */
.intro-inner{max-width:760px;margin:0 auto;text-align:center}
.intro-inner .s-title{margin-bottom:var(--space-xl)}
.intro-body{display:flex;flex-direction:column;gap:var(--space-md)}
.intro-body p{font-size:var(--t-lead);color:var(--gray);line-height:1.7}
.intro-body .intro-strong{font-family:var(--font-display);font-weight:600;color:var(--ink)}
.intro-body .intro-tagline{font-weight:600;color:var(--brand)}

/* ============================================================
   GRID DE TARJETAS (beneficios / frentes técnicos)
============================================================ */
.cards-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:var(--space-lg)}
.icon-card{background:var(--surface);border:.5px solid var(--border);border-radius:var(--radius-lg);padding:var(--space-lg)}
.icon-card h3{margin-bottom:var(--space-sm)}
.icon-card p{font-size:var(--t-small);color:var(--gray);line-height:1.7}

/* ============================================================
   GRID DE PROBLEMA (3 columnas, icono + título + línea)
============================================================ */
.problem-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:var(--space-xl)}
.problem-item h3{margin-bottom:var(--space-sm)}
.problem-item p{font-size:var(--t-small);color:var(--gray);line-height:1.7}

/* ============================================================
   PROCESO (3 pasos numerados)
============================================================ */
.process-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:var(--space-xl);position:relative}
.process-grid::before{
  content:'';position:absolute;top:27px;
  left:calc(16.66% + 16px);right:calc(16.66% + 16px);
  height:.5px;background:var(--border);
}
.process-step{text-align:center;padding:0 var(--space-md);position:relative;z-index:1}
.process-num{
  width:54px;height:54px;border-radius:var(--radius-pill);
  background:var(--surface);border:.5px solid var(--border);
  font-family:var(--font-display);font-weight:700;font-size:17px;color:var(--brand);
  display:flex;align-items:center;justify-content:center;margin:0 auto var(--space-md);
}
.process-step h3{margin-bottom:var(--space-sm)}
.process-step p{font-size:var(--t-small);color:var(--gray);line-height:1.7}

/* ============================================================
   CTA
============================================================ */
.cta-section{text-align:center}
.cta-actions{display:flex;gap:var(--space-md);justify-content:center;flex-wrap:wrap;margin-top:var(--space-xl)}

/* ============================================================
   PRODUCTOS — tarjetas CLARA / NEXO / PULSO
============================================================ */
.products-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:var(--space-lg)}
.product-card{
  background:var(--surface);border:.5px solid var(--border);border-radius:var(--radius-lg);
  padding:var(--space-xl);display:flex;flex-direction:column;
}
.product-name{
  display:inline-flex;align-items:center;align-self:flex-start;
  font-family:var(--font-display);font-weight:700;font-size:13px;letter-spacing:.08em;
  text-transform:uppercase;color:var(--brand);background:var(--soft);
  border-radius:var(--radius-pill);padding:4px 14px;margin-bottom:var(--space-md);
}
.product-title{margin-bottom:var(--space-sm)}
.product-role{font-family:var(--font-display);font-weight:600;font-size:var(--t-small);color:var(--ink);margin-bottom:var(--space-md)}
.product-desc{font-size:var(--t-small);color:var(--gray);line-height:1.7;margin-bottom:var(--space-xl);flex-grow:1}
.product-card .btn{align-self:flex-start}

/* Otros sectores */
.sector-cta{max-width:680px;margin:0 auto;text-align:center}
.sector-cta p{font-size:var(--t-lead);color:var(--gray);line-height:1.7;margin-bottom:var(--space-xl)}

/* ============================================================
   SOBRE — cuerpo
============================================================ */
.about-body{max-width:680px;margin:0 auto;display:flex;flex-direction:column;gap:var(--space-lg)}
.about-body p{font-size:var(--t-lead);color:var(--gray);line-height:1.8}

/* ============================================================
   FOOTER
============================================================ */
.footer{background:var(--surface);border-top:.5px solid var(--border);padding:var(--space-2xl) 0 var(--space-xl)}
.footer-inner{max-width:1120px;margin:0 auto;padding:0 48px}
.footer-top{
  display:flex;justify-content:space-between;align-items:flex-start;flex-wrap:wrap;gap:var(--space-xl);
  padding-bottom:var(--space-xl);margin-bottom:var(--space-lg);border-bottom:.5px solid var(--border);
}
.footer-logo{display:flex;align-items:center;gap:10px;margin-bottom:var(--space-sm)}
.footer-logo svg{width:26px;height:26px}
.footer-wordmark{font-family:var(--font-display);font-weight:600;font-size:17px;color:var(--ink)}
.footer-tagline{font-size:var(--t-small);color:var(--gray);max-width:320px;line-height:1.6}
.footer-meta{font-size:var(--t-small);color:var(--gray);line-height:1.9}
.footer-links{display:flex;gap:var(--space-xl);flex-wrap:wrap}
.footer-links a{font-size:14px;color:var(--gray);border-bottom:none}
.footer-links a:hover{color:var(--brand)}
.footer-bottom{display:flex;justify-content:space-between;flex-wrap:wrap;gap:var(--space-sm)}
.footer-copy{font-size:12px;color:var(--gray)}

/* ============================================================
   WHATSAPP — botón flotante
============================================================ */
.wa-float{
  position:fixed;bottom:24px;right:24px;z-index:200;
  width:56px;height:56px;border-radius:50%;
  background:var(--brand);color:var(--surface);
  display:flex;align-items:center;justify-content:center;
  border:none;text-decoration:none;
  transition:background 120ms ease;
}
.wa-float:hover{background:var(--brand-hover)}
.wa-float svg{width:26px;height:26px;stroke:var(--surface);fill:none;stroke-width:1.8;
  stroke-linecap:round;stroke-linejoin:round}

/* ============================================================
   RESPONSIVE
============================================================ */
@media (min-width:1025px){
  /* Hero de inicio: cabe completo en pantalla (100vh menos el header) */
  .hero:not(.hero--center){
    min-height:calc(100vh - 72px);
    padding:56px 48px;
  }
  .hero:not(.hero--center) .hero-title{
    font-size:clamp(26px,2.6vw,32px);
    line-height:1.1;
  }
}

@media (max-width:1024px){
  .cards-grid{grid-template-columns:repeat(2,1fr)}
  .products-grid{grid-template-columns:1fr}
  .hero{grid-template-columns:1fr;gap:var(--space-xl);padding:56px 24px 64px;text-align:left}
  .lis-wrap{width:160px;height:160px;margin:var(--space-md) auto 0}
  .hero--center{padding:56px 24px 48px}
  .lis-accent{opacity:.15}
  .lis-accent--products{width:80px;height:80px;top:16px;right:16px}
  .lis-accent--about{width:110px;height:110px;bottom:8px;right:16px}
  .s-inner,.nav-inner,.footer-inner{padding-left:24px;padding-right:24px}
}

@media (max-width:860px){
  .nav-toggle{display:flex}
  .nav-menu{
    position:absolute;top:72px;left:0;right:0;
    background:var(--surface);border-bottom:.5px solid var(--border);
    flex-direction:column;align-items:stretch;gap:0;
    padding:var(--space-sm) 24px var(--space-lg);
    display:none;
  }
  .nav.open .nav-menu{display:flex}
  .nav-links{flex-direction:column;align-items:flex-start;gap:0;width:100%}
  .nav-links a{width:100%;padding:14px 0;border-bottom:.5px solid var(--border);font-size:15px}
  .nav-menu>.btn{margin-top:var(--space-md);width:100%}

  .hero-actions{flex-direction:column;align-items:stretch}
  .hero-actions .btn{width:100%}
  .hero-actions .btn--link{text-align:center}

  .problem-grid{grid-template-columns:1fr;gap:var(--space-xl)}
  .process-grid{grid-template-columns:1fr;gap:var(--space-xl)}
  .process-grid::before{display:none}

  .cta-actions{flex-direction:column;align-items:stretch}
  .cta-actions .btn{width:100%}

  .footer-top{flex-direction:column}
}

@media (max-width:600px){
  .cards-grid{grid-template-columns:1fr}
  .section{padding:56px 0}
  .hero{padding:48px 24px 48px}
  .lis-wrap{width:120px;height:120px;margin:var(--space-sm) auto 0}
  .hero--center{padding:48px 24px 40px}
  .lis-accent{opacity:.10}
  .lis-accent--products{width:64px;height:64px}
  .lis-accent--about{width:90px;height:90px}
  .footer-bottom{flex-direction:column;gap:var(--space-xs)}
  .wa-float{width:52px;height:52px;bottom:16px;right:16px}
}
