/* =========================================================
   INTERAUTO — sitio estático
   Réplica del diseño original (WordPress / PopularFX + Pagelayer)
   Tipografías: Cabin, Mulish (antes "Muli"), Noto Sans, Poppins
   ========================================================= */
:root {
  --black: #000000;
  --dark: #101010;
  --dark-box: #101111;
  --white: #ffffff;
  --ink: #111111;
  --red: #e50808;        /* título del encabezado */
  --purple: #6200ea;     /* menú activo, títulos del pie, botón */
  --blue: #0986c0;       /* botón "Click aquí para escribirnos" */
  --orange: #ff8a47;     /* icono WhatsApp */
  --green: #58ff50;      /* icono servicio al cliente */
  --container: 1170px;
  --font-body: "Cabin", system-ui, sans-serif;
  --font-title: "Mulish", "Muli", system-ui, sans-serif;
  --font-menu: "Noto Sans", system-ui, sans-serif;
  --font-band: "Poppins", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.6 var(--font-body); color: var(--ink); background: var(--white); }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 3px solid var(--purple); outline-offset: 3px; }
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 10px; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--purple); color: #fff; padding: 10px 14px; text-decoration: none; }
.skip-link:focus { top: 12px; }

/* ---------- Encabezado / menú ---------- */
.site-header { position: relative; z-index: 20; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: flex; align-items: center; gap: 20px; text-decoration: none; color: var(--white); }
.brand img { width: 77px; height: auto; }
.brand-name { font: 400 37px/1 var(--font-body); color: var(--white); }

.main-nav ul { display: flex; flex-wrap: wrap; justify-content: flex-end; list-style: none; margin: 0; padding: 0; }
.main-nav a {
  display: block; padding: 10px 23px; text-decoration: none;
  font: 600 14px/14px var(--font-menu); text-transform: uppercase; color: var(--white);
  transition: color .2s;
}
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--purple); }

.nav-toggle {
  display: none; width: 44px; height: 44px; border: 1px solid rgba(255,255,255,.35); background: transparent;
  cursor: pointer; align-items: center; justify-content: center;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  display: block; width: 22px; height: 2px; background: #fff; position: relative; transition: transform .25s, background .25s;
}
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; }
.nav-toggle span::before { top: -7px; }
.nav-toggle span::after { top: 7px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-7px) rotate(-45deg); }

/* Barra negra de páginas interiores */
.header-bar { background: var(--black); }
.header-bar .header-inner { min-height: 74px; }
.header-bar .brand-name { font-size: 30px; }

/* ---------- Portada (hero) ---------- */
.hero {
  position: relative; isolation: isolate; min-height: 595px;
  background: var(--black) center / cover no-repeat;
  display: flex; flex-direction: column;
}
.hero::before { content: ""; position: absolute; inset: 0; background: #000; opacity: .8; z-index: -1; }
.hero .site-header { padding: 20px 0 10px; }
.hero-body { flex: 1; display: flex; align-items: center; padding: 40px 0 60px; }
.hero h1 {
  font: 600 50px/1 var(--font-title); color: var(--red); margin-bottom: 15px;
  animation: fadeInDown 1s both;
}
.hero-text { color: var(--white); font: 500 14px/28px var(--font-menu); max-width: 768px; animation: fadeInUp 1s both .2s; }

/* ---------- Quiénes somos ---------- */
.about { padding: 94px 0; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; max-width: 1081px; margin: 0 auto; padding: 0 10px; }
.about-media img { width: 100%; height: 100%; max-height: 379px; object-fit: cover; }
.about-box {
  background: var(--dark-box); color: var(--white); text-align: center;
  padding: 0 40px 20px; display: flex; flex-direction: column; align-items: center;
}
.about-box h2 { font: 400 35px/49px var(--font-body); color: #fbfbfb; margin-bottom: 24px; }
.about-box p { font-size: 15px; line-height: 1.55; max-width: 430px; }
.about-sign { display: flex; align-items: center; gap: 22px; margin-top: auto; padding-top: 20px; }
.about-sign img { width: 100px; height: 100px; border-radius: 50%; object-fit: cover; }
.about-sign span { font-size: 18px; }

/* ---------- Banda de contacto ---------- */
.contact-band {
  position: relative; isolation: isolate; padding: 40px 0; overflow: hidden;
  background: #222 center / cover no-repeat;
}
.contact-band-inner { background: rgba(0, 0, 0, .35); padding: 0; }
.iconbox { display: flex; align-items: flex-start; gap: 40px; padding: 30px 20px; animation: fadeInRight 1s both; }
.iconbox + .iconbox { animation-duration: 1.6s; }
.iconbox-icon { flex: none; width: 40px; height: 40px; margin-top: 20px; }
.iconbox-icon svg { width: 40px; height: 40px; }
.iconbox.is-wa .iconbox-icon { background: var(--orange); color: #fff; border-radius: 6px; display: grid; place-items: center; }
.iconbox.is-wa .iconbox-icon svg { width: 26px; height: 26px; }
.iconbox.is-cs .iconbox-icon { color: var(--green); }
.iconbox h3 { font: 400 40px/80px var(--font-band); color: #fafafa; text-transform: capitalize; }
.iconbox.is-cs h3 { font-weight: 700; color: var(--white); }
.iconbox h3 a { text-decoration: none; }
.btn-blue {
  display: inline-block; margin-top: 6px; padding: 12px 22px; background: var(--blue); color: #fff;
  text-decoration: none; font-size: 16px; line-height: 1; transition: background .2s;
}
.btn-blue:hover { background: #076a98; }

/* ---------- Marcas ---------- */
.brands { position: relative; isolation: isolate; padding: 10px 0 10px; background: #000 center / cover no-repeat; }
.brands-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 25px; padding: 10px 0; }
.brands-grid a { display: block; background: #fff; aspect-ratio: 1; overflow: hidden; transition: transform .25s, box-shadow .25s; }
.brands-grid a.is-wide { aspect-ratio: 210 / 113; }
.brands-grid a:hover { transform: scale(1.04); box-shadow: 0 8px 24px rgba(0,0,0,.5); }
.brands-grid img { width: 100%; height: 100%; object-fit: contain; padding: 14px; }

/* ---------- Contacto ---------- */
.contact-section { padding: 60px 0 70px; }
.contact-wrap { max-width: 780px; margin: 0 auto; }
.contact-section h1 { font: 400 40px/1.2 var(--font-title); color: var(--ink); text-align: center; text-transform: capitalize; }
.title-bar { width: 64px; height: 3px; background: var(--purple); margin: 22px auto 40px; }
.contact-form { max-width: 684px; margin: 0 auto; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field { margin-bottom: 20px; }
.field label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.field input, .field textarea {
  width: 100%; font: inherit; font-size: 15px; color: #000; background: #fff;
  border: 1px solid #767676; border-radius: 0; padding: 10px 12px; min-height: 42px;
}
.field textarea { min-height: 132px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--purple); box-shadow: 0 0 0 2px rgba(98, 0, 234, .15); }
.field.has-error input, .field.has-error textarea { border-color: var(--red); }
.field .error { display: block; color: var(--red); font-size: 13px; margin-top: 4px; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.btn-outline {
  background: transparent; color: var(--purple); border: 1px solid var(--purple); border-radius: 0;
  padding: 9px 22px; font: 400 15px/1.2 var(--font-body); cursor: pointer; transition: background .2s, color .2s;
}
.btn-outline:hover { background: var(--purple); color: #fff; }
.form-alt { font-size: 14px; color: #555; }
.form-alt a { color: var(--purple); }

/* ---------- Pie ---------- */
.site-footer { background: var(--dark); color: var(--white); }
.footer-grid { display: grid; grid-template-columns: 6fr 2fr 4fr; padding: 30px 0 30px; }
.footer-grid > div { padding: 10px; }
.footer-brand { font: 600 26px/1.3 var(--font-title); color: var(--purple); margin-bottom: 12px; }
.footer-text { font: 500 14px/28px var(--font-menu); }
.footer-title { font: 500 20px/20px var(--font-title); color: var(--purple); margin-bottom: 18px; }
.footer-contact { list-style: none; margin: 0; padding: 0; font: 500 14px/24px var(--font-menu); }
.footer-contact li + li { margin-top: 12px; }
.footer-contact a { text-decoration: none; }
.footer-contact a:hover { color: var(--purple); }
.footer-copy { background: var(--dark); color: #888; font-size: 13px; text-align: center; padding: 0 0 14px; }

/* Botón volver arriba (como en el original) y WhatsApp flotante */
.to-top {
  position: fixed; right: 20px; bottom: 20px; z-index: 50; width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: var(--red); color: #fff; cursor: pointer; display: grid; place-items: center;
  opacity: 0; pointer-events: none; transition: opacity .3s;
}
.to-top.is-visible { opacity: 1; pointer-events: auto; }
.to-top svg { width: 20px; height: 20px; }

/* Animaciones de entrada (igual que el original: fadeInDown / fadeInUp / fadeInRight) */
@keyframes fadeInDown { from { opacity: 0; transform: translateY(-30px); } to { opacity: 1; transform: none; } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }
@keyframes fadeInRight { from { opacity: 0; transform: translateX(60px); } to { opacity: 1; transform: none; } }
.reveal { animation-play-state: paused; }
.reveal.is-visible { animation-play-state: running; }
.no-js .reveal { animation: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .hero h1 { font-size: 42px; }
  .iconbox h3 { font-size: 32px; line-height: 56px; }
  .brands-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .main-nav {
    position: absolute; left: 0; right: 0; top: 100%; background: #000; display: none; padding: 6px 0 12px;
  }
  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; }
  .main-nav a { padding: 14px 20px; }
  .site-header .container { position: relative; }
  .header-inner { position: relative; }
  .hero .main-nav { top: calc(100% + 10px); }
  .about-grid { grid-template-columns: 1fr; }
  .about-box { padding: 30px 24px; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-grid > div:empty { display: none; }
  .brands-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
}
@media (max-width: 600px) {
  .brand { gap: 12px; }
  .brand img { width: 54px; }
  .brand-name { font-size: 28px; }
  .hero { min-height: 520px; }
  .hero h1 { font-size: 32px; line-height: 1.1; }
  .about { padding: 50px 0; }
  .iconbox { gap: 18px; padding: 20px 14px; }
  .iconbox-icon, .iconbox.is-cs .iconbox-icon svg { width: 32px; height: 32px; }
  .iconbox.is-wa .iconbox-icon svg { width: 20px; height: 20px; }
  .iconbox-icon { margin-top: 8px; }
  .iconbox h3 { font-size: 22px; line-height: 1.4; margin-bottom: 6px; }
  .brands-grid { grid-template-columns: repeat(2, 1fr); }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .contact-section h1 { font-size: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
