/* ========================================
   Vidrio y Aluminio Kabaye — Estilos
   ======================================== */

:root {
  --teal: #00b8b8;
  --teal-deep: #009494;
  --teal-soft: #e6fafa;
  --purple: #7a2d8e;
  --purple-deep: #5c1f6c;
  --purple-mid: #9339a8;
  --gray: #b3b3b3;
  --gray-dark: #4a4a4a;
  --ink: #1a1a1a;
  --white: #ffffff;
  --surface: #f3f6f7;
  --surface-alt: #e8eef0;
  --toolbar-bg: #5c1f6c;
  --header-h: 112px;
  --toolbar-h: 40px;
  --gadget-size: 56px;
  --gadget-right: 24px;
  --gadget-bottom: 24px;
  --font-display: "Saira Condensed", sans-serif;
  --font-body: "Sora", sans-serif;
  --shadow-soft: 0 12px 40px rgba(26, 26, 26, 0.12);
  --radius: 4px;
  --transition: 0.28s ease;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--surface);
  line-height: 1.6;
  min-height: 100vh;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition), opacity var(--transition);
}

ul {
  list-style: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

/* ---- Toolbar (90%) ---- */
.toolbar {
  background: var(--toolbar-bg);
  color: var(--white);
  font-size: 0.82rem;
  min-height: var(--toolbar-h);
  display: flex;
  align-items: center;
}

.toolbar__inner {
  width: 90%;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.45rem 0;
}

.toolbar__location,
.toolbar__contact {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.toolbar__location i,
.toolbar__contact i {
  color: var(--teal);
}

.toolbar__contact a:hover {
  color: var(--teal);
}

/* ---- Header blanco (90%) ---- */
.header {
  background: var(--white);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 5px solid var(--purple);
  box-shadow: 0 2px 16px rgba(90, 31, 108, 0.06);
}

.header__inner {
  width: 90%;
  margin-inline: auto;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.header__logo {
  height: 98px;
  width: auto;
  object-fit: contain;
}

.nav__list {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav__list a {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--teal-deep);
  position: relative;
}

.nav__list a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 3px;
  background: var(--purple);
  transition: width var(--transition);
}

.nav__list a:hover {
  color: var(--purple);
}

.nav__list a:hover::after {
  width: 100%;
}

.header__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0.35rem;
}

.header__toggle span {
  display: block;
  width: 26px;
  height: 3px;
  background: var(--purple);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.header.is-open .header__toggle span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.header.is-open .header__toggle span:nth-child(2) {
  opacity: 0;
}

.header.is-open .header__toggle span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* ---- Hero animado (full-bleed) ---- */
.hero {
  position: relative;
  min-height: calc(100vh - var(--toolbar-h) - var(--header-h));
  min-height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: var(--white);
  isolation: isolate;
  border-bottom: 15px solid var(--teal);
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(135deg, rgba(92, 31, 108, 0.72) 0%, rgba(0, 100, 110, 0.55) 48%, rgba(0, 148, 148, 0.65) 100%),
    url("../assets/foto-hero.jpg") center / cover no-repeat;
}

.hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), transparent 90%);
  animation: gridDrift 28s linear infinite;
}

.hero__panels {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: clamp(0.5rem, 2vw, 1.25rem);
  padding: 8vh 6vw 0;
  pointer-events: none;
}

.hero__panel {
  flex: 1;
  max-width: 140px;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.45) 0%,
    rgba(0, 184, 184, 0.35) 35%,
    rgba(122, 45, 142, 0.25) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: inset 0 0 40px rgba(255, 255, 255, 0.2);
  transform-origin: bottom center;
  animation: panelRise 4.5s ease-in-out infinite;
  opacity: 0.55;
}

.hero__panel--1 { height: 55%; animation-delay: 0s; }
.hero__panel--2 { height: 78%; animation-delay: 0.35s; }
.hero__panel--3 { height: 92%; animation-delay: 0.7s; }
.hero__panel--4 { height: 70%; animation-delay: 1.05s; }
.hero__panel--5 { height: 48%; animation-delay: 1.4s; }

.hero__shine {
  position: absolute;
  top: -40%;
  left: -30%;
  width: 60%;
  height: 180%;
  background: linear-gradient(
    105deg,
    transparent 35%,
    rgba(255, 255, 255, 0.18) 48%,
    transparent 62%
  );
  animation: shineSweep 6.5s ease-in-out infinite;
  pointer-events: none;
}

.hero__content {
  width: min(90%, 820px);
  text-align: center;
  padding: 3rem 1rem 4rem;
  animation: heroFade 1s ease both;
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.85rem, 4.2vw, 3rem);
  letter-spacing: 0.03em;
  line-height: 1.1;
  text-transform: uppercase;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35);
  margin-bottom: 0.85rem;
}

.hero__lead {
  font-size: clamp(0.98rem, 2vw, 1.15rem);
  max-width: 34rem;
  margin: 0 auto 1.75rem;
  color: rgba(255, 255, 255, 0.92);
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  justify-content: center;
}

@keyframes panelRise {
  0%, 100% { transform: translateY(12%) scaleY(0.96); opacity: 0.4; }
  50% { transform: translateY(0) scaleY(1); opacity: 0.75; }
}

@keyframes shineSweep {
  0%, 100% { transform: translateX(-20%) skewX(-12deg); opacity: 0.2; }
  50% { transform: translateX(140%) skewX(-12deg); opacity: 0.85; }
}

@keyframes gridDrift {
  from { background-position: 0 0; }
  to { background-position: 48px 48px; }
}

@keyframes heroFade {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---- Botones ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 2px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn--primary {
  background: var(--teal);
  color: var(--white);
}

.btn--primary:hover {
  background: var(--purple);
}

.btn--outline {
  background: transparent;
  border-color: var(--white);
  color: var(--white);
}

.btn--outline:hover {
  background: var(--white);
  color: var(--purple);
}

.btn--block {
  width: 100%;
}

/* ---- Cuerpo 80% ---- */
.page-body {
  width: 80%;
  margin-inline: auto;
  padding: 3.5rem 0 4.5rem;
}

.page-body--legal {
  padding-top: 2.5rem;
}

.section + .section {
  margin-top: 4rem;
  padding-top: 4rem;
  border-top: 1px solid rgba(179, 179, 179, 0.45);
}

.section__head {
  max-width: 40rem;
  margin-bottom: 2.25rem;
}

.section__head h1,
.section__head h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.85rem, 3.2vw, 2.6rem);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--purple);
  line-height: 1.1;
  margin-bottom: 0.6rem;
}

.section__head p {
  color: var(--gray-dark);
  font-size: 1.02rem;
}

/* ---- Nosotros ---- */
.about {
  display: grid;
  grid-template-columns: 1.4fr 0.9fr;
  gap: 2.5rem;
  align-items: start;
}

.about__copy p {
  margin-bottom: 1rem;
  color: var(--gray-dark);
}

.about__points {
  margin-top: 1.25rem;
  display: grid;
  gap: 0.65rem;
}

.about__points li {
  position: relative;
  padding-left: 1.35rem;
  color: var(--ink);
  font-weight: 500;
}

.about__points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.55rem;
  height: 0.55rem;
  background: var(--teal);
  border-radius: 1px;
  transform: rotate(45deg);
}

.about__aside {
  background: linear-gradient(160deg, var(--purple) 0%, var(--purple-deep) 100%);
  color: var(--white);
  padding: 1.75rem 1.5rem;
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}

.about__aside::after {
  content: "";
  position: absolute;
  right: -20%;
  bottom: -30%;
  width: 180px;
  height: 180px;
  border: 18px solid rgba(0, 184, 184, 0.25);
  border-radius: 50%;
}

.about__aside h3 {
  font-family: var(--font-display);
  font-size: 1.45rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.65rem;
  color: var(--teal);
}

/* ---- Productos ---- */
.products {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem 1.5rem;
}

.product {
  padding: 0.25rem 0.5rem 0.5rem 0;
  border-bottom: 2px solid transparent;
  transition: border-color var(--transition);
}

.product:hover {
  border-bottom-color: var(--teal);
}

.product__icon {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  color: var(--teal);
  font-size: 2rem;
  margin-bottom: 1rem;
  background: var(--teal-soft);
  clip-path: polygon(25% 6%, 75% 6%, 100% 50%, 75% 94%, 25% 94%, 0 50%);
}

.product h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--purple);
  margin-bottom: 0.4rem;
}

.product p {
  color: var(--gray-dark);
  font-size: 0.95rem;
}

/* ---- Contacto ---- */
.contact-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.9fr;
  gap: 2.5rem;
  align-items: start;
}

.contact-form {
  background: var(--white);
  padding: 1.75rem;
  border: 1px solid rgba(179, 179, 179, 0.55);
  border-top: 4px solid var(--teal);
}

.form-row {
  margin-bottom: 1.1rem;
}

.form-row--2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-row label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--purple);
  margin-bottom: 0.35rem;
  letter-spacing: 0.02em;
}

.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--gray);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(0, 184, 184, 0.18);
}

.form-row textarea {
  resize: vertical;
  min-height: 120px;
}

.form-note {
  margin-top: 0.85rem;
  font-size: 0.9rem;
  color: var(--teal-deep);
  min-height: 1.25em;
}

.form-note.is-error {
  color: #b42318;
}

.contact-info {
  padding: 0.5rem 0;
}

.contact-info h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--purple);
  margin-bottom: 1.25rem;
}

.contact-info__list {
  display: grid;
  gap: 1rem;
}

.contact-info__list li {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  color: var(--gray-dark);
}

.contact-info__list i {
  color: var(--teal);
  width: 1.15rem;
  text-align: center;
  margin-top: 0.2rem;
  flex-shrink: 0;
}

.contact-info__list a:hover {
  color: var(--purple);
}

/* ---- Legal ---- */
.legal__content {
  background: var(--white);
  padding: 2rem 1.75rem;
  border: 1px solid rgba(179, 179, 179, 0.5);
}

.legal__content h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--teal-deep);
  margin: 1.75rem 0 0.65rem;
}

.legal__content p,
.legal__content li {
  color: var(--gray-dark);
  margin-bottom: 0.75rem;
}

.legal__content ul {
  margin: 0.5rem 0 1rem 1.25rem;
  list-style: disc;
}

.legal__content a {
  color: var(--purple);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal__date {
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: var(--gray-dark);
}

/* ---- Footer 4 columnas (80%) ---- */
.footer {
  background: var(--purple-deep);
  color: rgba(255, 255, 255, 0.9);
  padding: 3rem 0 0;
  margin-top: auto;
}

.footer__inner {
  width: 80%;
  margin-inline: auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem 1.5rem;
  padding-bottom: 2.5rem;
}

.footer__logo {
  max-width: 220px;
  margin-bottom: 0.85rem;
  background: var(--white);
  padding: 0.5rem 0.65rem;
  border-radius: var(--radius);
}

.footer__col p {
  font-size: 0.92rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.8);
}

.footer__col h4 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 1rem;
}

.footer__menu {
  display: grid;
  gap: 0.55rem;
}

.footer__menu li {
  position: relative;
  padding-left: 1rem;
}

.footer__menu li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.4rem;
  height: 0.4rem;
  background: var(--teal);
  border-radius: 50%;
}

.footer__menu a:hover,
.footer__contact a:hover {
  color: var(--teal);
}

.footer__contact {
  display: grid;
  gap: 0.85rem;
}

.footer__contact li {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  font-size: 0.92rem;
}

.footer__contact i {
  color: var(--teal);
  width: 1.1rem;
  text-align: center;
  margin-top: 0.15rem;
  flex-shrink: 0;
}

.footer__copy {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding: 1rem 0;
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
}

.footer__copy a {
  color: var(--teal);
}

.footer__copy a:hover {
  color: var(--white);
}

/* ---- Gadgets flotantes ----
   WhatsApp: inferior derecho
   Scroll-up: 50px arriba del WA, centrado respecto a él
*/
.wa-gadget,
.scroll-up {
  position: fixed;
  z-index: 200;
  width: var(--gadget-size);
  height: var(--gadget-size);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--white);
  font-size: 1.55rem;
  box-shadow: var(--shadow-soft);
  transition: transform var(--transition), background var(--transition), opacity var(--transition), visibility var(--transition);
  right: var(--gadget-right);
}

.wa-gadget {
  bottom: var(--gadget-bottom);
  background: var(--teal);
}

.wa-gadget:hover {
  background: var(--purple);
  transform: scale(1.06);
}

.scroll-up {
  /* 50px de separación entre el borde inferior del scroll-up
     y el borde superior del WhatsApp + centrado horizontal */
  bottom: calc(var(--gadget-bottom) + var(--gadget-size) + 50px);
  background: var(--purple);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.scroll-up.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.scroll-up:hover {
  background: var(--teal);
  transform: scale(1.06);
}

/* ---- Responsive ---- */
@media (max-width: 980px) {
  .about,
  .contact-grid,
  .products,
  .footer__inner {
    grid-template-columns: 1fr 1fr;
  }

  .about__aside {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .toolbar__inner {
    justify-content: center;
    text-align: center;
  }

  .toolbar__location,
  .toolbar__contact {
    justify-content: center;
    width: 100%;
  }

  .header__toggle {
    display: flex;
  }

  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid rgba(179, 179, 179, 0.5);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
  }

  .header.is-open .nav {
    max-height: 280px;
  }

  .nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem 5%;
  }

  .nav__list a {
    display: block;
    padding: 0.85rem 0.25rem;
    border-bottom: 1px solid rgba(179, 179, 179, 0.35);
  }

  .page-body,
  .footer__inner {
    width: 90%;
  }

  .about,
  .contact-grid,
  .products,
  .footer__inner,
  .form-row--2 {
    grid-template-columns: 1fr;
  }

  .hero__panels {
    opacity: 0.7;
  }

  .hero__panel--4,
  .hero__panel--5 {
    display: none;
  }

  :root {
    --gadget-right: 16px;
    --gadget-bottom: 16px;
    --gadget-size: 52px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero__panel,
  .hero__shine,
  .hero__grid,
  .hero__content {
    animation: none !important;
  }
}
