/* ===========================================================
   FENIX ISOLIERTECHNIK GmbH — styles.css
   Static, no framework. Light/Dark via CSS variables + data-theme.
   Paleta basada en el logo: rojo (fuego) + azul (frío).
   =========================================================== */

:root {
  --rot: #e2231a;
  --rot-dark: #b71a13;
  --blau: #1e6fb8;
  --max: 1160px;
  --radius: 12px;
  --font: 'Montserrat', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-head: 'Montserrat', system-ui, sans-serif;

  /* LIGHT (default) */
  --ink: #1a1d21;
  --grau: #5b6571;
  --line: #e4e7eb;
  --bg: #ffffff;
  --bg-alt: #f5f7f9;
  --surface: #ffffff;
  --header-bg: rgba(255, 255, 255, .96);
  --hero-text: #ffffff;
  --shadow: 0 10px 30px rgba(20, 25, 35, .08);
  --pending-bg: #fffdf6;
  --pending-border: #d8c277;
  --pending-text: #9a7b1a;
  --logo-filter: none;
}

:root[data-theme="dark"] {
  --ink: #e7ebf0;
  --grau: #9aa4b1;
  --line: #2a313b;
  --bg: #12151a;
  --bg-alt: #181c22;
  --surface: #1b2027;
  --header-bg: rgba(18, 21, 26, .94);
  --hero-text: #ffffff;
  --shadow: 0 10px 30px rgba(0, 0, 0, .45);
  --pending-bg: #2a2410;
  --pending-border: #6b5a1e;
  --pending-text: #e0c25a;
  --logo-filter: none;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg);
  line-height: 1.6; -webkit-font-smoothing: antialiased;
  transition: background .25s ease, color .25s ease;
}
img { max-width: 100%; display: block; }
a { color: var(--blau); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }

h1, h2, h3 { font-family: var(--font-head); line-height: 1.18; margin: 0 0 .5em; font-weight: 800; letter-spacing: -.02em; }
h1 { font-size: clamp(1.9rem, 4.5vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
h3 { font-size: 1.2rem; font-weight: 700; }

/* ---------- Buttons ---------- */
.btn { display: inline-block; padding: 13px 26px; border-radius: 999px; font-weight: 700; font-size: .98rem; cursor: pointer; border: 2px solid transparent; transition: transform .15s ease, background .2s ease, color .2s ease; }
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary { background: var(--rot); color: #fff; }
.btn-primary:hover { background: var(--rot-dark); }
.btn-primary:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.7); }
.btn-ghost:hover { background: rgba(255,255,255,.12); }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 60; background: var(--header-bg); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 76px; gap: 18px; }
.brand img { height: 54px; width: auto; filter: var(--logo-filter); position: relative; z-index: 2; }
.header-actions { display: flex; align-items: center; gap: 10px; position: relative; z-index: 2; }

/* Navegación = overlay a pantalla completa (todos los tamaños) */
.nav { position: fixed; inset: 0; z-index: 55; margin: 0; padding: 96px 24px 48px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; background-color: #0c1016; background-image: linear-gradient(rgba(12,16,22,.9), rgba(12,16,22,.94)), url("/assets/images/technische-isolation-industrieanlage.png"); background-size: cover; background-position: center; background-repeat: no-repeat; opacity: 0; visibility: hidden; transition: opacity .5s ease, visibility .5s; }
.nav.open { opacity: 1; visibility: visible; }
.nav-mega { width: 100%; max-width: 1080px; padding: 0 8px; display: grid; grid-template-columns: 1.2fr 1fr 1.3fr; gap: 34px 48px; opacity: 0; transition: opacity .4s ease .04s; }
.nav.open .nav-mega { opacity: 1; }
.nav-col-title { font-family: var(--font-head); font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; color: rgba(255,255,255,.6); border-bottom: 1px solid rgba(255,255,255,.18); padding-bottom: 12px; margin: 0 0 14px; font-weight: 700; transition: opacity .4s ease, transform .7s cubic-bezier(.16,1,.3,1); }
.nav-col > a { display: block; font-family: var(--font-head); font-size: clamp(1.3rem, 2.3vw, 1.95rem); font-weight: 700; color: #fff; padding: 7px 0; letter-spacing: -.01em; transition: color .25s ease, opacity .4s ease, transform .7s cubic-bezier(.16,1,.3,1); }
/* Enlaces grandes: subrayado rojo que crece de izquierda a derecha al pasar el raton */
.nav-col > a:not(.nav-mini) { background-image: linear-gradient(var(--rot), var(--rot)); background-repeat: no-repeat; background-position: 0 100%; background-size: 0% 2px; transition: color .25s ease, opacity .4s ease, transform .7s cubic-bezier(.16,1,.3,1), background-size .32s cubic-bezier(.2,.8,.2,1); }
.nav-col > a:not(.nav-mini):hover { color: var(--rot); background-size: 100% 2px; text-decoration: none; }
/* Enfoque: al pasar por una columna, los enlaces no apuntados se atenuan */
.nav.open .nav-col:hover > a:not(:hover) { opacity: .42; }
.nav-col-contact .nav-mini { display: flex; align-items: center; justify-content: space-between; gap: 14px; font-family: var(--font-head); font-size: .9rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #fff; padding: 13px 0; border-bottom: 1px solid rgba(255,255,255,.16); }
.nav-col-contact .nav-mini:hover { color: var(--rot); text-decoration: none; }
.nav-col-contact .nav-mini span { color: var(--rot); font-size: 1.1rem; transition: transform .25s ease; }
.nav-col-contact .nav-mini:hover span { transform: translateX(5px); }
/* Entrada escalonada de los enlaces al abrir (delays asignados por JS); solo con JS */
.js .nav-col-title, .js .nav-col > a { opacity: 0; transform: translateY(28px); }
.js .nav.open .nav-col-title, .js .nav.open .nav-col > a { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .nav-col-title, .js .nav-col > a { opacity: 1; transform: none; transition: none; }
}
@media (max-width: 820px) { .nav-mega { grid-template-columns: 1fr; gap: 26px; max-width: 440px; max-height: calc(100vh - 140px); overflow-y: auto; } .nav-col > a { font-size: 1.45rem; } }

/* Hamburguesa (siempre visible) + animación a X */
.nav-toggle { display: flex; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; position: relative; z-index: 2; }
.nav-toggle span { width: 26px; height: 3px; background: var(--ink); border-radius: 2px; transition: transform .25s ease, opacity .2s ease; }
.nav-toggle.is-open span:nth-child(1){ transform: translateY(8px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2){ opacity: 0; }
.nav-toggle.is-open span:nth-child(3){ transform: translateY(-8px) rotate(-45deg); }

/* Con el menú abierto: cabecera transparente y controles en claro (look inmersivo) */
.menu-open .site-header { background: transparent; border-bottom-color: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.menu-open .brand img { filter: brightness(0) invert(1); }
.menu-open .nav-toggle span { background: #fff; }
.menu-open .theme-toggle { color: #fff; border-color: rgba(255,255,255,.4); }
.menu-open .lang-switch { border-color: rgba(255,255,255,.4); }
.menu-open .lang-switch a { color: rgba(255,255,255,.78); }
.menu-open .lang-switch a:hover { color: #fff; }
.menu-open .lang-switch a.active { background: var(--rot); color: #fff; }

/* Cabecera transparente sobre el hero (como sensified): sin barra arriba; la barra
   aparece al hacer scroll para que se lea sobre el contenido. Solo en paginas con hero. */
.has-hero .site-header { position: fixed; left: 0; right: 0; background: transparent; border-bottom-color: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.has-hero:not(.menu-open) .site-header.scrolled { background: var(--header-bg); border-bottom-color: var(--line); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: 0 6px 22px rgba(10,12,16,.12); }
/* Capa 1: el header FLOTA (position:fixed) sobre el hero a 100dvh, asi que arriba el
   fondo tras la cabecera transparente es la IMAGEN OSCURA del hero (con scrim superior)
   en AMBOS temas -> controles BLANCOS en claro y oscuro. Al hacer scroll: barra solida
   + color normal. El menu abierto usa sus propias reglas .menu-open. */
.has-hero .site-header:not(.scrolled) .brand img { filter: brightness(0) invert(1); }
.has-hero .site-header:not(.scrolled) .nav-toggle span { background: #fff; }
.has-hero .site-header:not(.scrolled) .theme-toggle { color: #fff; border-color: rgba(255,255,255,.4); }
.has-hero .site-header:not(.scrolled) .lang-switch { border-color: rgba(255,255,255,.4); }
.has-hero .site-header:not(.scrolled) .lang-switch a { color: rgba(255,255,255,.82); }
.has-hero .site-header:not(.scrolled) .lang-switch a:hover { color: #fff; }
.has-hero .site-header:not(.scrolled) .lang-switch a.active { background: var(--rot); color: #fff; }

/* Language switch */
.lang-switch { display: inline-flex; align-items: center; gap: 2px; border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.lang-switch a { font-size: .8rem; font-weight: 700; color: var(--grau); padding: 4px 9px; border-radius: 999px; }
.lang-switch a:hover { color: var(--ink); text-decoration: none; }
.lang-switch a.active { background: var(--rot); color: #fff; }

/* Theme toggle */
.theme-toggle { background: none; border: 1px solid var(--line); border-radius: 999px; width: 38px; height: 38px; cursor: pointer; color: var(--ink); font-size: 1.1rem; line-height: 1; display: inline-flex; align-items: center; justify-content: center; }
.theme-toggle:hover { border-color: var(--rot); color: var(--rot); }
.theme-toggle .t-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .t-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .t-moon { display: inline; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; color: var(--hero-text); overflow: hidden; }
.hero-media, .hero-overlay { position: absolute; inset: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
/* Scrim superior (top->transparent) para que los controles blancos del header floten legibles
   sobre cualquier zona de la imagen + degradado diagonal original del hero. */
.hero-overlay { background: linear-gradient(to bottom, rgba(8,11,16,.55) 0, rgba(8,11,16,0) 150px), linear-gradient(105deg, rgba(15,20,30,.85) 0%, rgba(15,20,30,.6) 45%, rgba(15,20,30,.3) 100%); }
/* Hero alineado a la misma línea que el resto del contenido (borde del container)
   y con padding lateral 24px en todos los breakpoints. El ancho del texto se
   limita en los hijos para una longitud de línea legible. */
.hero-content { position: relative; padding: 60px 24px; }
.hero-content > * { max-width: 720px; }
.hero-content h1 { color: #fff; }
.hero-sub { font-size: clamp(1.05rem, 2vw, 1.3rem); color: rgba(255,255,255,.93); margin-bottom: 1.8em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- Sections ---------- */
.section { padding: 84px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 730px; margin: 0 auto 48px; text-align: center; }
.eyebrow { display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--rot); margin-bottom: 10px; }
.lead { font-size: 1.1rem; color: var(--grau); }
.narrow { max-width: 760px; }

/* ---------- Cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px; }
.cards-2 { max-width: 760px; margin: 0 auto; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.card h3 { color: var(--ink); }
.card p { color: var(--grau); margin: 0; }

/* Servicios secundarios (chips) */
.also-services { text-align: center; margin: 28px 0 0; color: var(--grau); font-weight: 600; }
.chip { display: inline-block; margin: 4px 4px 0; padding: 5px 14px; border: 1px solid var(--line); border-radius: 999px; font-size: .9rem; color: var(--ink); background: var(--surface); }

/* ---------- Domains (iconos) ---------- */
.domains { margin-top: 52px; text-align: center; }
.domains-title { color: var(--grau); font-weight: 700; margin-bottom: 24px; }
.domain-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 40px; }
.domain-list li { display: flex; flex-direction: column; align-items: center; gap: 10px; font-weight: 600; }
.domain-list img { width: 56px; height: 56px; object-fit: contain; }

/* ---------- Split ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.split-media img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; height: 100%; object-fit: cover; max-height: 460px; }
.split-text h3 { margin-top: 1.4em; }
.split-text p { color: var(--grau); }

/* ---------- Materialien (Blech / PVC / Armaflex) ---------- */
.material-block { margin-top: 56px; }
.material-block:first-of-type { margin-top: 8px; }
.material-block h3 { font-size: clamp(1.5rem, 3vw, 2rem); color: var(--ink); margin-bottom: .35em; }
.material-block > p { color: var(--grau); max-width: 820px; margin: 0 0 16px; }
.material-block .pending-note { display: inline-block; margin: 0 0 18px; font-size: .9rem; }
.material-block .carousel { margin-top: 14px; }

/* Resumen de materiales en la home (tarjetas que enlazan a cada pagina) */
.material-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.material-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); color: var(--ink); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.material-card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(20,25,35,.12); border-color: var(--rot); text-decoration: none; }
.material-card-media { aspect-ratio: 16/10; overflow: hidden; }
.material-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.material-card:hover .material-card-media img { transform: scale(1.06); }
.material-card-body { display: flex; flex-direction: column; flex: 1; padding: 22px 22px 26px; }
.material-card-body h3 { font-family: var(--font-head); font-size: 1.4rem; color: var(--ink); margin: 0 0 .5em; }
.material-card-body p { color: var(--grau); margin: 0 0 18px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.material-card-link { margin-top: auto; font-family: var(--font-head); font-weight: 700; font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; color: var(--rot); display: inline-flex; align-items: center; gap: 8px; }
@media (max-width: 860px) { .material-cards { grid-template-columns: 1fr; max-width: 460px; margin: 0 auto; } }

/* Boton outline para secciones claras (cambio entre materiales) */
.btn-outline { background: transparent; color: var(--ink); border: 2px solid var(--line); }
.btn-outline:hover { border-color: var(--rot); color: var(--rot); }
.material-switch { margin-top: 48px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.material-switch-label { font-family: var(--font-head); font-weight: 700; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--grau); margin-right: 4px; }

/* CTA de contacto al pie de cada pagina de material */
.kontakt-cta { text-align: center; }
.contact-actions-center { justify-content: center; }

/* ---------- Carrusel (visor + miniaturas) ---------- */
.carousel { outline: none; }
.carousel-stage { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: #0c0e12; }
.carousel-track { display: flex; transition: transform .45s cubic-bezier(.4,0,.2,1); }
.carousel-slide { flex: 0 0 100%; margin: 0; }
.carousel-slide img { width: 100%; height: clamp(260px, 44vw, 540px); object-fit: cover; display: block; }
.carousel-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgba(10,12,16,.5); color: #fff; font-size: 1.9rem; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; z-index: 2; transition: background .2s; }
.carousel-arrow:hover { background: rgba(10,12,16,.8); }
.carousel-prev { left: 14px; }
.carousel-next { right: 14px; }
.carousel-counter { position: absolute; bottom: 14px; right: 16px; background: rgba(10,12,16,.6); color: #fff; font-size: .8rem; font-weight: 600; padding: 4px 11px; border-radius: 999px; z-index: 2; }
.carousel-thumbs { display: flex; gap: 10px; margin-top: 12px; overflow-x: auto; padding-bottom: 6px; }
.carousel-thumb { flex: 0 0 auto; width: 96px; height: 66px; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; cursor: pointer; background: none; opacity: .55; transition: opacity .2s, border-color .2s; }
.carousel-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.carousel-thumb:hover { opacity: 1; }
.carousel-thumb.active { opacity: 1; border-color: var(--rot); }
@media (max-width: 560px) {
  .carousel-arrow { width: 38px; height: 38px; font-size: 1.5rem; }
  .carousel-thumb { width: 74px; height: 52px; }
}

/* ---------- Contact ---------- */
.contact-info p { color: var(--grau); }
.contact-info a { font-weight: 600; }
.contact-form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.contact-form label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 14px; color: var(--ink); }
.contact-form input, .contact-form textarea { width: 100%; margin-top: 6px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: var(--bg); color: var(--ink); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-note { background: var(--pending-bg); border: 1px dashed var(--pending-border); color: var(--pending-text); padding: 10px 14px; border-radius: 8px; font-size: .88rem; }
/* Honeypot anti-spam: oculto para humanos */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
/* Mensaje de estado del formulario */
.form-status { margin: 12px 0 0; font-size: .92rem; font-weight: 600; min-height: 1.2em; }
.form-status.ok { color: #1da851; }
.form-status.err { color: var(--rot); }

/* Contact actions: WhatsApp + Google Maps */
.contact-actions { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 12px; }
.btn-whatsapp { display: inline-flex; align-items: center; gap: 9px; background: #25d366; color: #fff; }
.btn-whatsapp:hover { background: #1da851; color: #fff; }
.btn-whatsapp svg { flex: 0 0 auto; }
.contact-map { margin-top: 28px; }
.contact-map h3 { margin-bottom: 12px; }
.btn-map { display: inline-flex; align-items: center; gap: 8px; background: transparent; color: var(--ink); border: 2px solid var(--line); }
.btn-map:hover { border-color: var(--rot); color: var(--rot); }

/* ---------- Pending markers ---------- */
.pending-note, .pending-inline { color: var(--pending-text); }
.pending-note { background: var(--pending-bg); border: 1px dashed var(--pending-border); padding: 12px 16px; border-radius: 8px; font-size: .92rem; }

/* ---------- Footer ---------- */
.site-footer { background: #14171c; color: #c8ced6; padding: 50px 0; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: center; }
.site-footer img { height: 52px; width: auto; filter: brightness(0) invert(1); opacity: .9; }
.site-footer p { margin: 10px 0 0; font-size: .9rem; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-nav a { color: #c8ced6; font-size: .92rem; }
.footer-nav a:hover { color: #fff; }
.copyright { width: 100%; text-align: center; border-top: 1px solid rgba(255,255,255,.12); padding-top: 18px; margin-top: 8px; }

/* ---------- Lightbox (ampliar imágenes del carrusel) ---------- */
.lightbox { position: fixed; inset: 0; background: rgba(8,11,16,.94); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); display: flex; align-items: center; justify-content: center; padding: 30px; z-index: 100; opacity: 0; visibility: hidden; transition: opacity .28s ease, visibility .28s; }
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox-figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 14px; max-width: 92vw; }
.lightbox-figure img { max-width: 92vw; max-height: 80vh; width: auto; height: auto; border-radius: 8px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.lightbox-caption { color: #e7ebf0; font-size: .95rem; text-align: center; max-width: 70ch; line-height: 1.45; }
.lightbox-close { position: absolute; top: 18px; right: 24px; width: 46px; height: 46px; font-size: 2rem; color: #fff; background: rgba(255,255,255,.08); border: 0; border-radius: 50%; cursor: pointer; line-height: 1; display: flex; align-items: center; justify-content: center; }
.lightbox-close:hover { background: rgba(255,255,255,.18); }
.lightbox-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; border-radius: 50%; border: 0; background: rgba(255,255,255,.1); color: #fff; font-size: 2.1rem; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.lightbox-nav:hover { background: rgba(255,255,255,.22); }
.lightbox-prev { left: 18px; }
.lightbox-next { right: 18px; }
.lightbox-counter { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); color: rgba(255,255,255,.85); font-size: .85rem; font-weight: 600; background: rgba(0,0,0,.4); padding: 4px 12px; border-radius: 999px; }
@media (max-width: 560px) {
  .lightbox { padding: 12px; }
  .lightbox-nav { width: 42px; height: 42px; font-size: 1.7rem; }
  .lightbox-prev { left: 8px; } .lightbox-next { right: 8px; }
  .lightbox-close { top: 10px; right: 12px; }
}
@media (prefers-reduced-motion: reduce) { .lightbox { transition: none; } }

/* ---------- Mejora de diseño (badge, pills, cards, reveal) ---------- */
.site-header { transition: box-shadow .25s ease, background .25s ease; }
.site-header.scrolled { box-shadow: 0 6px 22px rgba(10,12,16,.12); }

/* Hero: badge + píldoras de servicios */
.hero-badge { display: inline-block; font-family: var(--font-head); font-size: .76rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #fff; background: var(--rot); padding: 6px 14px; border-radius: 999px; margin-bottom: 18px; }
.hero-pills { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; padding: 0; margin: 4px 0 30px; }
.hero-pills li { font-size: .88rem; font-weight: 600; color: #fff; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.3); padding: 7px 15px; border-radius: 999px; }

/* Tarjetas de servicio: hover */
.card { transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(20,25,35,.12); border-color: var(--rot); }

/* Anwendungsbereiche como tarjetas con icono */
.domain-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.domain-card { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 26px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); font-weight: 700; color: var(--ink); transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.domain-card:hover { transform: translateY(-4px); border-color: var(--rot); box-shadow: 0 16px 40px rgba(20,25,35,.12); }
.domain-card img { width: 56px; height: 56px; object-fit: contain; }
@media (max-width: 700px) { .domain-cards { grid-template-columns: repeat(2, 1fr); } }

/* Reveal al hacer scroll (solo si hay JS) */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s cubic-bezier(.16,1,.3,1); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } }

/* Hero cinematográfico (Ken Burns) */
.hero-media img { animation: kenburns 24s ease-out both; transform-origin: 50% 60%; }
@keyframes kenburns { from { transform: scale(1.14); } to { transform: scale(1); } }

/* Hero: aparición del titular carácter por carácter (palabra = bloque para no cortarla) + intro escalonada */
.hero-word { display: inline-block; }
.js .hero h1 .hero-char { display: inline-block; opacity: 0; transform: translateY(0.6em); transition: opacity .5s ease, transform .5s cubic-bezier(.2,.8,.2,1); }
.js .hero h1.in .hero-char { opacity: 1; transform: none; }

/* Indicador de scroll (decorativo, no interfiere) al pie del hero */
.hero-scroll { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); width: 26px; height: 42px; border: 2px solid rgba(255,255,255,.55); border-radius: 999px; pointer-events: none; z-index: 1; }
.hero-scroll::before { content: ""; position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; border-radius: 2px; background: #fff; transform: translate(-50%, 0); animation: heroScrollDot 1.8s ease-in-out infinite; }
@keyframes heroScrollDot { 0% { opacity: 0; transform: translate(-50%, 0); } 25% { opacity: 1; } 60% { opacity: 1; transform: translate(-50%, 13px); } 100% { opacity: 0; transform: translate(-50%, 13px); } }
.js .hero-badge { animation: heroFade .7s ease .05s both; }
.js .hero-sub { animation: heroFade .7s ease .5s both; }
.js .hero-pills { animation: heroFade .7s ease .62s both; }
.js .hero-actions { animation: heroFade .7s ease .74s both; }
@keyframes heroFade { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* Barra de progreso de scroll */
.scroll-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: var(--rot); z-index: 70; transition: width .08s linear; }

/* FAQ acordeón */
.faq { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 18px; background: none; border: 0; padding: 20px 4px; text-align: left; cursor: pointer; font-family: var(--font-head); font-size: 1.06rem; font-weight: 700; color: var(--ink); transition: color .2s ease; }
.faq-q:hover { color: var(--rot); }
.faq-icon { flex: 0 0 auto; width: 1.4em; text-align: center; font-size: 1.5rem; line-height: 1; color: var(--rot); transition: transform .3s ease; }
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .35s ease; }
.faq-a p { margin: 0 0 20px; color: var(--grau); }

/* Botón volver arriba */
.to-top { position: fixed; right: 22px; bottom: 22px; width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--rot); color: #fff; font-size: 1.4rem; line-height: 1; cursor: pointer; opacity: 0; visibility: hidden; transform: translateY(12px); transition: opacity .25s ease, transform .25s ease, background .2s ease; z-index: 60; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--rot-dark); }

@media (prefers-reduced-motion: reduce) {
  .hero-media img { animation: none; }
  .js .hero h1 .hero-char, .js .hero-badge, .js .hero-sub, .js .hero-pills, .js .hero-actions { animation: none; opacity: 1; transform: none; transition: none; }
  .hero-scroll::before { animation: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 940px) {
  /* la navegación es overlay en todos los tamaños; aquí solo ajustes menores */
  .lang-switch a { padding: 7px 11px; font-size: .85rem; }
  .split { grid-template-columns: 1fr; gap: 28px; }
  .section { padding: 60px 0; }
}
@media (max-width: 480px) {
  .form-row { grid-template-columns: 1fr; }
  .domain-list { gap: 26px; }
}
