/* ==========================================================================
   Vitalhealth — Catálogo de Productos
   ========================================================================== */

:root {
  --green: #005128;
  --green-soft: rgba(0, 81, 40, 0.12);
  --bg-edge: #cfcfcf;
  --bg-mid: #f4f4f4;
  --bg-center: #fafafa;
  --white: #ffffff;
  --text-muted: rgba(0, 81, 40, 0.55);
  --shadow-title: 0 4px 18px rgba(0, 81, 40, 0.22);
  --font: "Unbounded", system-ui, sans-serif;
  --header-h: 3.25rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  color: var(--green);
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background:
    linear-gradient(
      180deg,
      var(--bg-edge) 0%,
      var(--bg-mid) 14%,
      var(--bg-center) 32%,
      var(--white) 50%,
      var(--bg-center) 68%,
      var(--bg-mid) 86%,
      var(--bg-edge) 100%
    );
  background-attachment: fixed;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

button {
  font: inherit;
  border: 0;
  background: none;
  cursor: pointer;
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   Page shell
   -------------------------------------------------------------------------- */

.page {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.25rem 1.25rem 2rem;
  background: transparent;
  overflow-x: hidden;
}

.header,
.hero,
.footer {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 78rem;
}

/* --------------------------------------------------------------------------
   Header + language switcher
   -------------------------------------------------------------------------- */

.header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: var(--header-h);
  margin-bottom: 0.5rem;
  position: relative;
}

.header__brand {
  grid-column: 2;
  display: flex;
  justify-content: center;
  animation: fadeDown 0.8s var(--ease) both;
}

.logo-vital {
  width: clamp(4.25rem, 9vw, 5.75rem);
  height: auto;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.12))
    drop-shadow(0 4px 14px rgba(0, 81, 40, 0.15));
}

.lang-switcher {
  position: absolute;
  top: 0.15rem;
  right: 0;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 81, 40, 0.1);
  box-shadow: 0 4px 18px rgba(0, 81, 40, 0.08);
  animation: fadeDown 0.8s var(--ease) 0.1s both;
}

.lang-switcher__btn {
  font-size: clamp(0.65rem, 1.4vw, 0.78rem);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0.2rem 0.15rem;
  transition: color 0.25s ease;
  white-space: nowrap;
}

.lang-switcher__btn:hover {
  color: var(--green);
}

.lang-switcher__btn.is-active {
  color: var(--green);
  font-weight: 700;
}

.lang-switcher__sep {
  color: rgba(0, 81, 40, 0.28);
  font-weight: 400;
  user-select: none;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  gap: clamp(0.75rem, 2vw, 1.25rem);
  padding: 0.5rem 0 1.5rem;
}

.hero__title {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.05;
  color: var(--green);
  text-shadow: var(--shadow-title);
  animation: fadeUp 0.85s var(--ease) 0.15s both;
}

.hero__title-line {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.hero__title-line--light {
  font-weight: 500;
  font-size: clamp(1.05rem, 3.2vw, 1.85rem);
  letter-spacing: 0.12em;
  margin-bottom: 0.15em;
}

.hero__title-line--bold {
  font-weight: 700;
  font-size: clamp(2rem, 7.5vw, 4.25rem);
  letter-spacing: 0.04em;
}

.hero__visual {
  width: min(100%, 34rem);
  margin-inline: auto;
  animation: fadeUp 1s var(--ease) 0.25s both;
  -webkit-mask-image:
    linear-gradient(to right, transparent 0%, #000 5%, #000 95%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, #000 4%, #000 96%, transparent 100%);
  mask-image:
    linear-gradient(to right, transparent 0%, #000 5%, #000 95%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, #000 4%, #000 96%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
}

.hero__vglobal {
  width: 100%;
  height: auto;
  margin-inline: auto;
  filter: drop-shadow(0 18px 40px rgba(0, 81, 40, 0.12));
  animation: none !important;
  transform: none !important;
}

/* --------------------------------------------------------------------------
   Catalog cards
   -------------------------------------------------------------------------- */

.catalogs {
  width: min(100%, 72rem);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(0.85rem, 2vw, 1.35rem);
  margin-top: clamp(0.75rem, 2.5vw, 1.5rem);
  animation: fadeUp 0.95s var(--ease) 0.5s both;
}

.catalog-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 1.1rem;
  padding: clamp(1.15rem, 2.5vw, 1.6rem) clamp(1.1rem, 2.2vw, 1.6rem);
  border-radius: 1.15rem;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(0, 81, 40, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 10px 28px rgba(0, 81, 40, 0.08);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s ease;
}

.catalog-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 81, 40, 0.22);
  box-shadow: 0 16px 36px rgba(0, 81, 40, 0.14);
}

.catalog-card__title {
  font-size: clamp(0.72rem, 1.35vw, 0.88rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--green);
  line-height: 1.25;
  white-space: nowrap;
}

.catalog-card__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 12.5rem;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  background: var(--green);
  color: var(--white);
  font-size: clamp(0.68rem, 1.5vw, 0.78rem);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: 0 6px 18px rgba(0, 81, 40, 0.22);
  transition: background 0.25s ease, transform 0.25s var(--ease), box-shadow 0.25s ease;
}

.catalog-card__btn:hover {
  background: #006835;
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(0, 81, 40, 0.3);
}

.catalog-card__btn:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.footer {
  display: flex;
  justify-content: center;
  padding-top: 0.75rem;
  animation: fadeUp 0.9s var(--ease) 0.55s both;
}

.logo-abia {
  width: clamp(7.5rem, 18vw, 11rem);
  height: auto;
}

/* --------------------------------------------------------------------------
   Motion
   -------------------------------------------------------------------------- */

@keyframes fadeDown {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 640px) {
  .page {
    padding: 1rem 1rem 1.75rem;
  }

  .header {
    grid-template-columns: 1fr;
    justify-items: center;
    min-height: auto;
    padding-top: 0.25rem;
    margin-bottom: 0.75rem;
  }

  .header__brand {
    grid-column: 1;
  }

  .lang-switcher {
    top: 0;
    right: 0;
    padding: 0.35rem 0.55rem;
    gap: 0.25rem;
  }

  .lang-switcher__btn {
    font-size: 0.62rem;
  }

  .logo-vital {
    width: clamp(3.75rem, 18vw, 4.75rem);
  }

  .hero {
    gap: 0.85rem;
  }

  .hero__visual {
    width: min(100%, 18.5rem);
  }

  .catalogs {
    grid-template-columns: 1fr;
    width: min(100%, 20rem);
    gap: 0.75rem;
  }

  .catalog-card {
    flex-direction: row;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.95rem 1rem;
  }

  .catalog-card__title {
    text-align: left;
    flex: 1;
  }

  .catalog-card__btn {
    width: auto;
    max-width: none;
    padding: 0.55rem 0.9rem;
    white-space: nowrap;
  }
}

@media (min-width: 641px) and (max-width: 1023px) {
  .hero__visual {
    width: min(100%, 28rem);
  }

  .catalogs {
    width: min(100%, 48rem);
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .page {
    padding: 1.5rem 2rem 2.25rem;
  }

  .hero {
    gap: 1rem;
  }

  .hero__visual {
    width: min(100%, 32rem);
  }
}

@media (min-width: 1024px) and (min-height: 900px) {
  .hero__visual {
    width: min(100%, 30rem);
  }
}
