/* =========================================================
   Grupo Garca - Landing page
   ========================================================= */

:root {
  --blue: #0687ff;
  --blue-dark: #0773e2;
  --royal: #0a2f8a;
  --navy: #001c3c;
  --gray: #dadada;
  --text: #001d3a;
  --white: #ffffff;

  --font: "Montserrat", "Segoe UI", system-ui, -apple-system, sans-serif;
  --container: 1200px;
  --header-h: 96px;
  --radius: 14px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 72px; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, p { margin: 0; }
strong { color: var(--blue); font-weight: 700; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

.dot { color: var(--blue); }

.divider {
  display: block;
  height: 5px;
  width: 100%;
  max-width: 500px;
  margin: 1.4rem 0 1.6rem;
  background: var(--blue);
  border-radius: 3px;
  transform-origin: left;
}

.section { padding-block: clamp(4rem, 9vw, 7.5rem); }

.section__title {
  font-size: clamp(2.3rem, 5vw, 3.6rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.02em;
  margin-bottom: 1.4rem;
}
.section__title--blue { color: var(--blue); }
.section__title--navy { color: var(--navy); }

/* ================= Header ================= */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  transition: height .35s var(--ease);
}
/* El fondo con blur va en un pseudo-elemento: backdrop-filter en .header
   crearía un bloque contenedor y recortaría el menú móvil (position: fixed). */
.header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(3, 30, 90, .92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, .25);
  opacity: 0;
  transition: opacity .35s var(--ease);
}
.header.is-scrolled { --header-h: 72px; }
.header.is-scrolled::before { opacity: 1; }
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.header__logo img {
  width: 180px;
  transition: width .35s var(--ease);
}
.header.is-scrolled .header__logo img { width: 150px; }

.nav__list { display: flex; gap: clamp(1rem, 2.6vw, 2.6rem); }
.nav__link {
  position: relative;
  color: var(--white);
  font-size: .95rem;
  font-weight: 500;
  padding-block: .35rem;
  white-space: nowrap;
  transition: color .25s;
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--blue);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .3s var(--ease);
}
.nav__link:hover::after,
.nav__link.is-active::after { transform: scaleX(1); }
.nav__link:hover { color: #cfe6ff; }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  padding: 10px;
  background: transparent;
  border: 0;
  cursor: pointer;
  position: relative;
  z-index: 110;
}
.nav-toggle span {
  display: block;
  height: 3px;
  margin: 5px 0;
  background: var(--white);
  border-radius: 2px;
  transition: transform .3s var(--ease), opacity .2s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ================= Hero ================= */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: calc(var(--header-h) + 2rem) 0 4rem;
  color: var(--white);
  background: var(--royal) url("../img/bg-hero.jpg") center / cover no-repeat;
  border-bottom: 8px solid var(--blue);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(4, 28, 92, .55) 0%, rgba(4, 28, 92, .1) 60%);
  pointer-events: none;
}
.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: center;
  gap: 3rem;
}
.hero__title {
  font-size: clamp(3rem, 7.4vw, 6.2rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.03em;
}
.hero__text {
  max-width: 34ch;
  font-size: clamp(1.05rem, 1.6vw, 1.35rem);
  font-weight: 500;
  line-height: 1.7;
}

.hero__media {
  position: relative;
  justify-self: end;
  width: min(100%, 520px);
}
.hexagon {
  aspect-ratio: 1.15 / 1;
  clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
  overflow: hidden;
  animation: float 6s ease-in-out infinite;
}
.hexagon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1) scale(1.02);
  transition: transform 1.2s var(--ease);
}
.hero__media:hover .hexagon img { transform: scaleX(-1) scale(1.1); }
.hero__shadow {
  display: block;
  width: 60%;
  height: 26px;
  margin: 1.6rem auto 0;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(0, 10, 40, .55), transparent 70%);
  animation: shadow 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-14px); }
}
@keyframes shadow {
  0%, 100% { transform: scaleX(1); opacity: 1; }
  50%      { transform: scaleX(.85); opacity: .7; }
}

/* ================= ¿Quiénes somos? ================= */
.about__inner {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  align-items: center;
  gap: clamp(2rem, 5vw, 4.5rem);
}
.about__media img {
  width: 100%;
  border-radius: 6px;
  box-shadow: 0 20px 45px rgba(0, 29, 58, .18);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.about__media img:hover {
  transform: translateY(-6px);
  box-shadow: 0 28px 55px rgba(0, 29, 58, .25);
}
.about__content p { font-size: 1.02rem; }
.about__logo { width: min(320px, 80%); margin-top: 2rem; }

/* ================= Misión / Visión ================= */
.split {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: center;
  gap: clamp(2rem, 6vw, 6rem);
}
.split--reverse { grid-template-columns: 1fr 1.2fr; }
.split__content p { font-size: 1.05rem; line-height: 1.95; max-width: 46ch; }
.split__media { display: flex; justify-content: center; }
.split__media img {
  width: min(100%, 420px);
  border-radius: 50%;
  transition: transform .6s var(--ease);
}
.split__media img:hover { transform: scale(1.04) rotate(-2deg); }

.mission { background: var(--gray); }

.vision { background: var(--navy); color: var(--white); }
.vision .section__title { color: var(--white); }

/* ================= Marcas ================= */
.brands__title { text-align: center; margin-bottom: 2.2rem; }
/* Flex con wrap para que la última fila incompleta quede centrada */
.brands__grid {
  --cols: 4;
  --gap: 14px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--gap);
  max-width: 900px;
  margin-inline: auto;
}
.brand {
  flex: 0 0 calc((100% - (var(--cols) - 1) * var(--gap)) / var(--cols));
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--gray);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.brand img { width: 100%; transition: filter .3s; }
.brand:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 28px rgba(0, 29, 58, .18);
}

/* ================= Contacto ================= */
.contact {
  position: relative;
  color: var(--white);
  background: var(--royal) url("../img/bg-contact.jpg") center / cover no-repeat;
}
.contact__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 6vw, 6rem);
  align-items: start;
}
.contact__title {
  font-size: clamp(2.6rem, 6vw, 5rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -.03em;
}
.contact__lead {
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  text-transform: uppercase;
  line-height: 1.6;
  margin-bottom: 1.4rem;
}
.contact__lead em { font-weight: 800; }

.contact__card {
  display: flex;
  flex-direction: column;
  gap: .9rem;
  max-width: 430px;
  padding: 1.2rem 1.4rem;
  background: var(--blue);
  border-radius: var(--radius);
  font-style: normal;
  font-size: .92rem;
  line-height: 1.45;
  box-shadow: 0 16px 36px rgba(0, 0, 0, .25);
}
.contact__item {
  display: flex;
  align-items: flex-start;
  gap: .7rem;
  transition: transform .25s var(--ease);
}
.contact__item:hover { transform: translateX(4px); }
.contact__item svg {
  flex: none;
  width: 20px; height: 20px;
  fill: none;
  stroke: var(--navy);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Formulario */
.form { display: flex; flex-direction: column; gap: 1.1rem; }
.form__group { display: flex; flex-direction: column; gap: .45rem; }
.form label { font-weight: 800; font-size: 1.05rem; }
.form input,
.form textarea {
  width: 100%;
  padding: .9rem 1rem;
  font: inherit;
  font-size: 1rem;
  color: var(--white);
  background: rgba(0, 20, 70, .45);
  border: 1.5px solid rgba(6, 135, 255, .7);
  border-radius: 10px;
  outline: none;
  resize: vertical;
  transition: border-color .25s, background-color .25s, box-shadow .25s;
}
.form input { height: 52px; }
.form textarea { min-height: 200px; }
.form input:focus,
.form textarea:focus {
  border-color: var(--blue);
  background: rgba(0, 20, 70, .65);
  box-shadow: 0 0 0 4px rgba(6, 135, 255, .25);
}
.form__group.has-error input,
.form__group.has-error textarea { border-color: #ff6b6b; }
.form__error { min-height: 1em; font-size: .8rem; color: #ffb3b3; line-height: 1; }
.form__status { min-height: 1.5em; font-weight: 500; }

.btn {
  align-self: flex-start;
  min-width: 180px;
  padding: .7rem 2rem;
  font: inherit;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--white);
  background: var(--blue-dark);
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform .2s var(--ease), background-color .25s, box-shadow .25s;
}
.btn::before {
  content: "";
  position: absolute;
  top: 0; left: -120%;
  width: 60%; height: 100%;
  background: linear-gradient(110deg, transparent, rgba(255, 255, 255, .35), transparent);
  transition: left .6s var(--ease);
}
.btn:hover { background: var(--blue); box-shadow: 0 10px 24px rgba(6, 135, 255, .4); transform: translateY(-2px); }
.btn:hover::before { left: 130%; }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .7; cursor: wait; }

/* ================= Footer ================= */
.footer {
  background: var(--navy);
  color: rgba(255, 255, 255, .7);
  font-size: .85rem;
  text-align: center;
  padding-block: 1.3rem;
}

.to-top {
  position: fixed;
  right: 20px; bottom: 20px;
  z-index: 90;
  display: grid;
  place-items: center;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: opacity .3s, transform .3s var(--ease), visibility .3s;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top svg { width: 24px; height: 24px; fill: none; stroke: #fff; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }

/* ================= Animaciones de aparición ================= */
.js .reveal {
  opacity: 0;
  transition: opacity .9s var(--ease), transform .9s var(--ease);
  transition-delay: var(--d, 0s);
}
.js .reveal[data-anim="up"]    { transform: translateY(40px); }
.js .reveal[data-anim="left"]  { transform: translateX(-60px); }
.js .reveal[data-anim="right"] { transform: translateX(60px); }
.js .reveal[data-anim="zoom"]  { transform: scale(.85); }
.js .reveal[data-anim="pop"]   { transform: translateY(24px) scale(.92); }
.js .reveal[data-anim="grow"]  { transform: scaleX(0); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ================= Responsivo ================= */
@media (max-width: 1024px) {
  .nav__link { font-size: .88rem; }
}

@media (max-width: 900px) {
  :root { --header-h: 76px; }
  .header__logo img { width: 150px; }

  .nav-toggle { display: block; }
  .nav {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 20, 60, .97);
    opacity: 0;
    visibility: hidden;
    transition: opacity .35s var(--ease), visibility .35s;
  }
  .nav.is-open { opacity: 1; visibility: visible; }
  .nav__list { flex-direction: column; align-items: center; gap: 1.6rem; }
  .nav__link { font-size: 1.35rem; }
  .nav__list li {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity .4s var(--ease), transform .4s var(--ease);
  }
  .nav.is-open li { opacity: 1; transform: none; }
  .nav.is-open li:nth-child(2) { transition-delay: .05s; }
  .nav.is-open li:nth-child(3) { transition-delay: .1s; }
  .nav.is-open li:nth-child(4) { transition-delay: .15s; }
  .nav.is-open li:nth-child(5) { transition-delay: .2s; }
  .nav.is-open li:nth-child(6) { transition-delay: .25s; }

  .hero__inner,
  .about__inner,
  .split,
  .split--reverse,
  .contact__inner { grid-template-columns: 1fr; }

  .hero { text-align: left; }
  .hero__media { justify-self: center; width: min(100%, 420px); }

  .split__media { order: -1; }
  .split__media img { width: min(80%, 340px); }

  .brands__grid { --cols: 3; }
}

@media (max-width: 560px) {
  .container { padding-inline: 18px; }
  .brands__grid { --cols: 2; --gap: 10px; }
  .btn { align-self: stretch; }
  .about__media img { max-width: 420px; margin-inline: auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition-duration: .01ms !important;
    transition-delay: 0s !important;
  }
}
