/* ═══════════════════════════════════════════════════════════
   CRISTALPRO — styles.css (unificado)
   ═══════════════════════════════════════════════════════════ */

/* ─── Variables & Reset ───────────────────────────────────── */
:root {
  --black: #0b0b0d;
  --black-2: #121216;
  --black-3: #17171c;
  --gold: #e3a834;
  --gold-soft: #f0c46a;
  --gold-dim: rgba(227, 168, 52, 0.14);
  --white: #f6f5f2;
  --muted: #a7a7ad;
  --line: rgba(255, 255, 255, 0.09);
  --radius: 18px;
  --maxw: 1180px;
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", system-ui, sans-serif;
  background: var(--black);
  color: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

/* ─── Idioma ──────────────────────────────────────────────── */
[data-lang-es] {
  display: none;
}

html[lang="es"] [data-lang-ca] {
  display: none;
}

html[lang="es"] [data-lang-es] {
  display: revert;
}

/* ─── Tipografía base ─────────────────────────────────────── */
h1,
h2,
h3,
.brand {
  font-family: "Sora", sans-serif;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.02em;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ─── Utilidades ──────────────────────────────────────────── */
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

.gold {
  color: var(--gold);
}

section {
  position: relative;
}

/* ─── Selector de idioma ──────────────────────────────────── */
.lang {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}

.lang button {
  background: none;
  border: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 12px;
  cursor: pointer;
  font-family: "Inter";
  transition: 0.25s;
}

.lang button.active {
  background: var(--gold);
  color: #1a1305;
}

/* ─── Botones ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 12px 22px;
  border-radius: 999px;
  cursor: pointer;
  border: 0;
  transition: transform 0.25s, box-shadow 0.25s, background 0.25s;
  font-family: "Inter";
}

.btn-gold {
  background: var(--gold);
  color: #1a1305;
  box-shadow: 0 8px 26px -10px var(--gold);
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px -10px var(--gold);
}

.btn-ghost {
  background: transparent;
  color: var(--white);
  border: 1px solid var(--line);
}

.btn-ghost:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* ─── Header ─────────────────────────────────────────────── */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  transition: background 0.4s ease, padding 0.4s ease, box-shadow 0.4s ease;
}

header.scrolled {
  background: rgba(11, 11, 13, 0.82);
  backdrop-filter: blur(14px);
  padding: 10px 24px;
  box-shadow: 0 1px 0 var(--line);
}

header .logo img {
  height: 60px;
  width: auto;
  transition: height 0.4s ease;
}

header.scrolled .logo img {
  height: 60px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* ─── Nav principal ───────────────────────────────────────── */
nav.main {
  display: flex;
  align-items: center;
  gap: 30px;
}

nav.main a.navlink {
  font-size: 0.92rem;
  color: var(--muted);
  font-weight: 500;
  transition: color 0.25s;
  position: relative;
}

nav.main a.navlink:hover {
  color: var(--white);
}

nav.main a.navlink::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  height: 2px;
  width: 0;
  background: var(--gold);
  transition: width 0.3s;
}

nav.main a.navlink:hover::after {
  width: 100%;
}

/* ─── Burger ──────────────────────────────────────────────── */
.burger {
  display: none;
  background: none;
  border: 0;
  color: #fff;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
}

.burger span {
  width: 24px;
  height: 2px;
  background: #fff;
  transition: 0.3s;
  border-radius: 2px;
}

/* ─── Reveal ──────────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.reveal.in {
  opacity: 1;
  transform: none;
}

.reveal.d1 {
  transition-delay: 0.1s;
}

.reveal.d2 {
  transition-delay: 0.2s;
}

.reveal.d3 {
  transition-delay: 0.3s;
}

.reveal.d4 {
  transition-delay: 0.4s;
}

@keyframes fadein {
  to {
    opacity: 1;
  }
}

/* ─── Hero ────────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero .wrap {
  margin: 0 0 0 10%;
  padding: 40px 24px 0;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.08);
  animation: slowzoom 18s ease-in-out infinite alternate;
}

@keyframes slowzoom {
  to {
    transform: scale(1);
  }
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
      rgba(11, 11, 13, 0.94) 0%,
      rgba(11, 11, 13, 0.8) 45%,
      rgba(11, 11, 13, 0.45) 100%);
}

.hero-content {
  max-width: 680px;
  padding-top: 80px;
}

.tagline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  background: var(--gold-dim);
  border: 1px solid rgba(227, 168, 52, 0.3);
  padding: 7px 16px;
  border-radius: 999px;
  margin-bottom: 26px;
}

.tagline .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(227, 168, 52, 0.6);
  }

  70% {
    box-shadow: 0 0 0 10px rgba(227, 168, 52, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(227, 168, 52, 0);
  }
}

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.4rem);
}

.hero h1 .ln {
  display: block;
  overflow: hidden;
}

.hero h1 .ln .anim {
  display: block;
  transform: translateY(110%);
  animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}

.hero h1 .ln:nth-child(2) .anim {
  animation-delay: 0.12s;
}

.hero h1 .ln:nth-child(3) .anim {
  animation-delay: 0.24s;
}

@keyframes rise {
  to {
    transform: translateY(0);
  }
}

.hero p.lead {
  font-size: 1.15rem;
  color: var(--muted);
  margin: 26px 0 34px;
  max-width: 540px;
  opacity: 0;
  animation: fadein 1s ease 0.5s forwards;
}

.hero-cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadein 1s ease 0.7s forwards;
}

.hero-stats {
  display: flex;
  gap: 40px;
  margin-top: 54px;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadein 1s ease 0.9s forwards;
}

.hero-stats .stat .num {
  font-family: "Sora";
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
}

.hero-stats .stat .lbl {
  font-size: 0.82rem;
  color: var(--muted);
}

/* ─── Secciones ───────────────────────────────────────────── */
.sec {
  padding: 110px 0;
}

.sec-head {
  max-width: 640px;
  margin-bottom: 56px;
}

.eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
  display: block;
}

.sec-head h2 {
  font-size: clamp(2rem, 4vw, 3rem);
}

.sec-head p {
  color: var(--muted);
  margin-top: 16px;
  font-size: 1.06rem;
}

/* ─── Cards ───────────────────────────────────────────────── */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.card {
  background: var(--black-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px 30px;
  transition: transform 0.35s, border-color 0.35s, background 0.35s;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(400px circle at top right, var(--gold-dim), transparent 60%);
  opacity: 0;
  transition: opacity 0.4s;
}

.card:hover {
  transform: translateY(-6px);
  border-color: rgba(227, 168, 52, 0.4);
}

.card:hover::before {
  opacity: 1;
}

.card .ico {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background: var(--gold-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
  color: var(--gold);
}

.card h3 {
  font-size: 1.25rem;
  margin-bottom: 12px;
}

.card p {
  color: var(--muted);
  font-size: 0.96rem;
}

/* ─── Split ───────────────────────────────────────────────── */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.split .media {
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  aspect-ratio: 4/3;
}

.split .media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s ease;
}

.split .media:hover img {
  transform: scale(1.06);
}

.feat-list {
  list-style: none;
  margin-top: 26px;
  display: grid;
  gap: 16px;
}

.feat-list li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.feat-list .chk {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--gold-dim);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  margin-top: 2px;
}

.feat-list strong {
  display: block;
  font-weight: 600;
}

.feat-list .t {
  display: block;
  color: var(--muted);
  font-size: 0.92rem;
}

/* ─── Band ADAS ───────────────────────────────────────────── */
.band {
  background: linear-gradient(160deg, var(--black-2), var(--black));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.adas-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 48px;
}

.adas-item {
  text-align: center;
  padding: 30px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.015);
  transition: 0.35s;
}

.adas-item:hover {
  border-color: rgba(227, 168, 52, 0.4);
  background: var(--gold-dim);
}

.adas-item .ai {
  width: 50px;
  height: 50px;
  margin: 0 auto 14px;
  border-radius: 13px;
  background: var(--gold-dim);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.35s;
}

.adas-item:hover .ai {
  background: rgba(227, 168, 52, 0.22);
}

.adas-item h4 {
  font-family: "Sora";
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 6px;
}

.adas-item p {
  color: var(--muted);
  font-size: 0.86rem;
}

/* ─── Galería ─────────────────────────────────────────────── */
.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 200px;
  gap: 14px;
}

.gallery a {
  overflow: hidden;
  border-radius: 14px;
  position: relative;
}

.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}

.gallery a:hover img {
  transform: scale(1.08);
}

.gallery .big {
  grid-column: span 2;
  grid-row: span 2;
}

/* ─── Contacto & Horario ──────────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
}

.info-block {
  display: grid;
  gap: 20px;
  margin-top: 10px;
}

.info-row {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.info-row .ico {
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--gold-dim);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
}

.info-row .lbl {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.info-row .val {
  font-weight: 600;
}

.info-row a.val:hover {
  color: var(--gold);
}

.hours {
  background: var(--black-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-top: 6px;
}

.hours .row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.94rem;
}

.hours .row:last-child {
  border: 0;
}

.hours .note {
  font-size: 0.85rem;
  color: var(--gold);
  margin-top: 12px;
}

/* ─── Formulario ──────────────────────────────────────────── */
form {
  background: var(--black-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px;
}

.field {
  margin-bottom: 18px;
}

.field label {
  display: block;
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 7px;
  font-weight: 500;
}

.field input,
.field textarea {
  width: 100%;
  background: var(--black-3);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 13px 15px;
  color: #fff;
  font-family: "Inter";
  font-size: 0.95rem;
  transition: border-color 0.25s, box-shadow 0.25s;
}

.field input:focus,
.field textarea:focus {
  outline: 0;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-dim);
}

.field textarea {
  resize: vertical;
  min-height: 110px;
}

form .btn-gold {
  width: 100%;
  justify-content: center;
  margin-top: 6px;
}

.form-ok {
  display: none;
  color: var(--gold);
  text-align: center;
  margin-top: 14px;
  font-weight: 600;
}

.form-err {
  display: none;
  color: #ff7a6b;
  text-align: center;
  margin: 4px 0 10px;
  font-weight: 600;
  font-size: 0.9rem;
}

.captcha label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.captcha #capQ {
  background: var(--black-3);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 3px 10px;
  color: var(--gold);
  font-weight: 700;
  font-family: "Sora";
}

/* ─── Consent ─────────────────────────────────────────────── */
.consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.84rem;
  color: var(--muted);
  margin-bottom: 18px;
  cursor: pointer;
}

.consent input {
  margin-top: 3px;
  accent-color: var(--gold);
  width: 16px;
  height: 16px;
  flex: none;
}

.consent a {
  color: var(--gold);
  text-decoration: underline;
}

/* ─── Cookie banner ───────────────────────────────────────── */
.cookie {
  position: fixed;
  left: 20px;
  right: 20px;
  bottom: 20px;
  z-index: 200;
  max-width: 560px;
  background: var(--black-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px 24px;
  box-shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.85);
  display: none;
}

.cookie.show {
  display: block;
  animation: fadein 0.4s ease;
}

.cookie h4 {
  font-family: "Sora";
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.cookie>p {
  font-size: 0.88rem;
  color: var(--muted);
  margin-bottom: 16px;
}

.cookie a {
  color: var(--gold);
  text-decoration: underline;
}

.cookie-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.cookie .btn {
  padding: 10px 18px;
  font-size: 0.85rem;
}

.cookie-cfg {
  margin: 4px 0 16px;
  display: none;
}

.cookie-cfg.show {
  display: block;
}

.cookie-cfg .opt {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.cookie-cfg .opt strong {
  font-size: 0.9rem;
}

.cookie-cfg .opt .d {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  margin-top: 2px;
}

.cookie-cfg .opt input {
  accent-color: var(--gold);
  width: 18px;
  height: 18px;
  flex: none;
}

/* ─── Floating buttons ────────────────────────────────────── */
.float {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.float a {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px -8px rgba(0, 0, 0, 0.6);
  transition: transform 0.25s;
}

.float a:hover {
  transform: scale(1.08);
}

.float .wa {
  background: #25d366;
}

.float .call {
  background: var(--gold);
}

/* ─── Footer ─────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--line);
  padding: 50px 0 30px;
}

.foot-top {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}

.foot-top img {
  height: 46px;
  margin-bottom: 14px;
}

.foot-top p {
  color: var(--muted);
  font-size: 0.92rem;
  max-width: 300px;
}

.foot-links {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
}

.foot-col h5 {
  font-family: "Sora";
  font-size: 0.92rem;
  margin-bottom: 14px;
}

.foot-col a,
.foot-col .addr {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 9px;
  transition: color 0.25s;
}

.foot-col a:hover {
  color: var(--gold);
}

.foot-bottom {
  border-top: 1px solid var(--line);
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 0.84rem;
}

/* ─── Tipografía & layout páginas legales ─────────────────── */
body.legal main {
  max-width: 860px;
  margin: 0 auto;
  padding: 150px 24px 80px;
}

body.legal h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin-bottom: 10px;
}

body.legal .upd {
  color: var(--muted);
  font-size: 0.86rem;
  margin-bottom: 36px;
}

body.legal h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 34px 0 12px;
  color: var(--gold);
}

body.legal h3 {
  font-size: 1.02rem;
  font-weight: 600;
  margin: 22px 0 8px;
}

body.legal p,
body.legal li {
  color: #d8d8dc;
  font-size: 0.96rem;
  margin-bottom: 12px;
}

/* ─── Box & Tabla ─────────────────────────────────────────── */
.box {
  background: var(--black-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px 24px;
  margin: 16px 0;
}

.box p {
  margin-bottom: 6px;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0;
  font-size: 0.88rem;
}

th,
td {
  border: 1px solid var(--line);
  padding: 9px 12px;
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--black-2);
  color: var(--gold);
  font-family: "Sora";
  font-weight: 600;
}

/* ─── Responsive ──────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero .wrap {
    margin: 0;
    padding: 0 24px;
  }

  .cards {
    grid-template-columns: 1fr;
  }

  .split {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .adas-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  nav.main {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 78%;
    max-width: 320px;
    background: var(--black-2);
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 40px;
    gap: 26px;
    transform: translateX(100%);
    transition: transform 0.4s ease;
    border-left: 1px solid var(--line);
  }

  nav.main.open {
    transform: translateX(0);
  }

  nav.main a.navlink {
    font-size: 18px;
  }

  .burger {
    display: flex;
    z-index: 101;
  }

  .header-actions .btn-gold {
    display: none;
  }
}

@media (max-width: 520px) {
  .hero-stats {
    gap: 26px;
  }

  .gallery .big {
    grid-column: span 2;
  }

  .sec {
    padding: 80px 0;
  }

  .cookie {
    left: 12px;
    right: 12px;
    bottom: 12px;
    padding: 18px;
  }
}
