@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root{
  --bg:#07070A;
  --bg2:#050507;
  --ink:#F3F4F6;
  --muted:#A1A1AA;

  --line:rgba(255,255,255,.10);
  --panel: rgba(12,12,18,.90);

  --red:#EF4444;
  --red2:#B91C1C;

  --r16:16px;
  --r24:24px;
  --max:1120px;

  --shadow: 0 3px 8px rgba(0,0,0,.30);
  --shadowHover: 0 6px 14px rgba(0,0,0,.38);

  --t: 220ms cubic-bezier(.2,.8,.2,1);
}

*{box-sizing:border-box}
html,body{height:100%}

/* FONDO “como estaba antes” (sin extras) */
html{
  background:
    radial-gradient(1400px 980px at 12% 12%, rgba(185,28,28,.22), transparent 72%),
    radial-gradient(1200px 900px at 88% 18%, rgba(239,68,68,.14), transparent 74%),
    radial-gradient(1700px 1200px at 50% 72%, rgba(185,28,28,.10), transparent 76%),
    linear-gradient(180deg, #07070A 0%, #060609 60%, #050507 100%);
  background-repeat: no-repeat;
  background-size: 100% 100%;
  background-attachment: fixed;
}

body{
  margin:0;
  font-family:Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  color:var(--ink);
  background: transparent;
}

a{color:inherit;text-decoration:none}
.container{max-width:var(--max);margin:0 auto;padding:24px}
.row{display:flex;gap:12px;flex-wrap:wrap;align-items:center}
.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.grid-3{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}
@media(max-width:980px){
  .grid-2,.grid-3{grid-template-columns:1fr}
}

/* NAV */
.nav{
  position:sticky;top:0;z-index:50;
  background: rgba(7,7,10,.76);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav .container{
  display:flex;align-items:center;justify-content:space-between;gap:16px;
  padding:14px 24px;
}

/* BRAND */
.brand-mark{display:flex;align-items:center;gap:12px}
.brand-text b{font-weight:800;letter-spacing:-.25px}
.brand-text small{display:block;color:var(--muted);font-weight:650;margin-top:2px}

/* LOGO */
.logo-img{
  width:56px;height:56px;
  border-radius:16px;
  object-fit:contain;
  background: rgba(12,12,18,.95);
  border: 1px solid rgba(239,68,68,.22);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06);
  filter:none;
  transition: transform var(--t), border-color var(--t);
}
.logo-img:hover{
  transform: translateY(-1px);
  border-color: rgba(239,68,68,.38);
}

/* MENU */
.menu{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap: nowrap;
  white-space: nowrap;
}
.menu a{
  padding:8px 10px;
  border-radius:999px;
  font-size:13.5px;
  font-weight:650;
  border:1px solid transparent;
  color: rgba(243,244,246,.92);
  transition: var(--t);
}
.menu a:hover{
  background: rgba(239,68,68,.08);
  border-color: rgba(239,68,68,.22);
}
.menu a.active{
  background: rgba(239,68,68,.12);
  border-color: rgba(239,68,68,.28);
  color:#fff;
}

/* BOTONES */
.btn{
  position:relative;
  isolation:isolate;
  overflow:hidden;

  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  white-space:nowrap;

  padding:11px 18px;
  border-radius:999px;
  background: rgba(12,12,18,.85);
  border:1px solid rgba(255,255,255,.14);

  font-weight:750;
  line-height:1;
  color: rgba(243,244,246,.96);
  cursor:pointer;

  transition: transform var(--t), border-color var(--t);
  will-change: transform;
}

.btn::after{
  content:"";
  position:absolute;
  inset:-35%;
  background: radial-gradient(circle at 30% 35%, rgba(239,68,68,.18), transparent 62%);
  opacity:0;
  transform: scale(.92);
  transition: opacity var(--t), transform var(--t);
  pointer-events:none;
  z-index:0;
}

.btn::before{
  content:"";
  position:absolute;
  inset:-60% -40%;
  background:
    linear-gradient(90deg,
      transparent 0%,
      rgba(255,255,255,.00) 40%,
      rgba(255,255,255,.16) 50%,
      rgba(255,255,255,.00) 60%,
      transparent 100%);
  transform: translateX(-55%);
  opacity:0;
  pointer-events:none;
  z-index:0;
}

.btn > *{
  display:inline-flex;
  align-items:center;
  line-height:1;
  position:relative;
  z-index:1;
}

.btn:hover{
  transform: translateY(-1px);
  border-color: rgba(239,68,68,.32);
}
.btn:hover::after{opacity:1;transform:scale(1)}
.btn:hover::before{
  opacity:1;
  animation: btnShine 680ms cubic-bezier(.2,.8,.2,1) 1;
}
@keyframes btnShine{
  0%{ transform: translateX(-55%); }
  100%{ transform: translateX(55%); }
}
.btn:active{ transform: translateY(0); }

.btn.primary{
  background: linear-gradient(135deg, var(--red), var(--red2));
  border-color: rgba(239,68,68,.50);
  color:#fff;
}
.btn.primary:hover{ border-color: rgba(239,68,68,.65); }

.btn.ghost{
  background: transparent;
  border-color: rgba(255,255,255,.16);
}

.btn:focus{
  outline: 3px solid rgba(239,68,68,.22);
  outline-offset: 2px;
}

/* SECCIONES */
section{padding:58px 0}
.hero-center{text-align:center}
.hero-center .row{justify-content:center}
.hero-center .lead{margin-left:auto;margin-right:auto}

.h1{
  font-size: clamp(34px, 4.6vw, 58px);
  line-height: 1.05;
  letter-spacing: -1.1px;
  margin: 10px 0 12px;
}
.lead{
  color: var(--muted);
  font-size: 16.5px;
  line-height: 1.75;
  max-width: 76ch;
  margin: 0 0 18px;
}

/* DIVIDER */
.divider{
  height:1px;
  margin:16px 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255,255,255,.08) 18%,
    rgba(239,68,68,.10) 50%,
    rgba(255,255,255,.08) 82%,
    transparent 100%
  );
  opacity:.75;
  filter: blur(.15px);
}

.section-head{
  display:flex;align-items:flex-end;justify-content:space-between;gap:16px;
  margin-bottom:14px;
}
.section-head h2{margin:0;font-size:26px;letter-spacing:-.45px}
.section-head p{margin:0;color:var(--muted);font-size:14px;max-width:76ch;text-align:right}
@media(max-width:980px){
  .section-head{align-items:flex-start}
  .section-head p{text-align:left}
}

.kicker{font-weight:800;letter-spacing:-.3px;margin:0 0 8px}
.muted{color:var(--muted);line-height:1.7}

.badge{
  display:inline-flex;align-items:center;gap:8px;
  padding:10px 12px;
  border-radius:16px;
  border:1px solid rgba(239,68,68,.24);
  background: rgba(239,68,68,.10);
  font-weight:750;
  color: rgba(243,244,246,.95);
}

/* CARDS / SURFACES */
.surface, .card, details{
  position:relative;
  background: var(--panel);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: var(--r24);
  box-shadow: var(--shadow);
  overflow:hidden;
}
.surface::before, .card::before, details::before{
  content:"";
  position:absolute;
  inset:0;
  border-radius:inherit;
  pointer-events:none;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.05);
}
.surface .inner, .card .inner{padding:18px}

.card{
  transition: transform var(--t), border-color var(--t), box-shadow var(--t);
}
.card:hover{
  transform: translateY(-2px);
  border-color: rgba(239,68,68,.22);
  box-shadow: var(--shadowHover);
}

.card h3{margin:0 0 8px;letter-spacing:-.25px}
.card p{margin:0;color:var(--muted);line-height:1.65}

.list{margin:10px 0 0;padding-left:16px;color:var(--muted);line-height:1.65}
.list li{margin:6px 0}

/* Reveal */
.reveal{opacity:0; transform: translateY(12px); transition: 650ms cubic-bezier(.2,.8,.2,1)}
.reveal.show{opacity:1; transform: translateY(0)}

/* FAQ */
.faq{display:grid;gap:10px}
summary{
  list-style:none;
  cursor:pointer;
  padding:14px 16px;
  font-weight:750;
  letter-spacing:-.2px;
}
summary::-webkit-details-marker{display:none}
details .ans{
  padding:0 16px 14px;
  color: var(--muted);
  line-height: 1.7;
}
details[open]{border-color: rgba(239,68,68,.22)}

/* FORMS + SELECT */
label{display:block;font-weight:650;font-size:13px;color:rgba(243,244,246,.92);margin-bottom:6px}
input, select, textarea{
  width:100%;
  padding:12px 12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(12,12,18,.95);
  color: rgba(243,244,246,.96);
  font: inherit;
  transition: var(--t);
}
select{color-scheme: dark}
select option{background:#0B0B10;color:#F3F4F6}
input:focus, select:focus, textarea:focus{
  outline: 3px solid rgba(239,68,68,.16);
  border-color: rgba(239,68,68,.40);
}
textarea{min-height:140px;resize:vertical}
.helper{font-size:12.5px;color:var(--muted);line-height:1.6}

/* FIX INFERIOR */
.sobre-fix,
.servicios-fix{
  padding-bottom: 140px;
}

/* FOOTER */
footer{
  padding:30px 0 40px;
  border-top:1px solid var(--line);
  background: rgba(7,7,10,.88);
}
.small-links{display:flex;gap:10px;flex-wrap:wrap}
.small-links a{
  padding:8px 10px;
  border-radius:999px;
  border:1px solid transparent;
  color: rgba(243,244,246,.92);
}
.small-links a:hover{
  background: rgba(239,68,68,.08);
  border-color: rgba(239,68,68,.18);
}

/* TRANSITION (LOADER CON LOGO) */
#pageTransition{
  position:fixed; inset:0;
  background: rgba(7,7,10,.78);
  backdrop-filter: blur(12px);
  display:flex; align-items:center; justify-content:center;
  opacity:0; pointer-events:none;
  transition: var(--t);
  z-index: 9999;
}
#pageTransition.show{opacity:1; pointer-events:auto}

/* ✅ Logo SIN sombra + GIRANDO (blindado) */
.spinner{
  width:70px;
  height:70px;
  border-radius:18px;
  background: rgba(12,12,18,.92);
  border: 1px solid rgba(239,68,68,.30);
  box-shadow: none !important;
  filter: none !important;
  position: relative;
  overflow: hidden;
}

/* el logo gira seguro aunque otra regla “pise” el contenedor */
.spinner::before{
  content:"";
  position:absolute;
  inset:0;
  background-image: url("../img/dp.png");
  background-repeat:no-repeat;
  background-position:center;
  background-size:78% 78%;
  transform-origin: 50% 50%;
  animation: logoSpinForce 900ms linear infinite !important;
}

@keyframes logoSpinForce{
  to{ transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce){
  .reveal{transition:none}
  .btn, .card{transition:none}
  .btn:hover::before{animation:none;opacity:0}
  .spinner::before{animation:none !important}
}

/* ===== MOBILE / RESPONSIVE FIX ===== */
html, body { width:100%; overflow-x:hidden; }
img, svg, video, canvas { max-width:100%; height:auto; display:block; }

@media (max-width: 980px){
  .container{ padding:16px !important; }
  section{ padding:42px 0 !important; }

  /* Evita que el layout “se quede en PC” */
  .grid-2, .grid-3{ grid-template-columns: 1fr !important; }
  .row{ flex-direction: column; align-items: stretch; }

  /* Menú */
  .menu{
    flex-wrap: wrap !important;
    white-space: normal !important;
    justify-content: center;
  }

  /* Tipos */
  .h1{ font-size: 34px !important; line-height: 1.1 !important; }
  .lead{ font-size: 15px !important; }

  /* Botones */
  .btn{ width:100%; justify-content:center; }
}

@media (max-width: 420px){
  .menu a{ font-size:13px; padding:8px 9px; }
  .logo-img{ width:48px; height:48px; border-radius:14px; }
}
/* ===== MOBILE HEADER CLEAN ===== */
@media (max-width: 768px){

  /* Ocultar menú largo en móvil */
  nav ul,
  .menu,
  .nav-links{
    display: none !important;
  }

  /* Ocultar botón del header */
  .header .btn,
  .nav .btn{
    display: none !important;
  }

  /* Logo más compacto */
  .logo{
    gap: 10px;
  }

  .logo img{
    width: 42px;
    height: 42px;
  }

  .logo-text{
    font-size: 14px;
    line-height: 1.2;
  }

  /* Hero más limpio */
  .hero{
    padding-top: 40px;
    text-align: center;
  }

  .hero h1{
    font-size: 32px;
    line-height: 1.15;
  }

  .hero p{
    font-size: 15px;
    opacity: 0.85;
  }

  /* Botón principal grande y claro */
  .hero .btn{
    width: 100%;
    max-width: 320px;
    margin: 20px auto 0;
    font-size: 16px;
  }
}
