:root {
  /* Marca */
  --turquesa: #2bb8b8;
  --morado: #9573ba;
  --amarillo: #f4e604;
  --blanco: #ffffff;
  /* Fondos tomados de las fotos de producto */
  --petroleo: #032d3b;
  --petroleo-hondo: #02222d;
  --morado-hondo: #221b47;
  --negro-foto: #050506;
  --whatsapp: #1faa59;

  --font-display: "Red Hat Display", "Segoe UI", sans-serif;
  --font-text: "Red Hat Text", "Segoe UI", sans-serif;

  --gutter: clamp(1.25rem, 5vw, 4.5rem);
  --header-h: 76px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

body {
  margin: 0;
  background: var(--petroleo);
  color: var(--blanco);
  font-family: var(--font-text);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img,
video {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h2 {
  font-size: clamp(2.25rem, 4.6vw, 3.75rem);
}

p {
  margin: 0;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--amarillo);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 30;
  padding: 0.6rem 1rem;
  background: var(--amarillo);
  color: var(--petroleo-hondo);
  font-weight: 700;
}

.skip:focus {
  top: 1rem;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding: 0.75rem 1.75rem;
  border: 0;
  border-radius: 999px;
  font: 700 1rem/1.2 var(--font-text);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.btn:active {
  transform: scale(0.97);
}

.btn--accent {
  background: var(--amarillo);
  color: var(--petroleo-hondo);
}

.btn--accent:hover {
  background: #fff66a;
}

.btn--accent.is-done {
  background: var(--turquesa);
}

.btn--dark {
  background: var(--petroleo);
  color: var(--blanco);
}

.btn--dark:hover {
  background: var(--petroleo-hondo);
}

.btn--whatsapp {
  background: var(--whatsapp);
  color: var(--blanco);
}

.btn--whatsapp:hover {
  background: #178a47;
}

.btn--block {
  width: 100%;
}

.link-btn {
  padding: 0.35rem 0;
  border: 0;
  background: none;
  color: inherit;
  font: 500 0.9375rem var(--font-text);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  padding: 0 var(--gutter);
  transition: background-color 0.25s ease;
}

.site-header.is-solid {
  background: var(--petroleo-hondo);
}

.site-header__logo img {
  width: auto;
  height: 52px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.25rem);
  font-weight: 500;
}

.site-nav a {
  padding: 0.5rem 0;
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--turquesa);
}

.cart-link__count {
  display: inline-block;
  min-width: 1.5rem;
  margin-left: 0.25rem;
  padding: 0 0.4rem;
  border-radius: 999px;
  background: var(--amarillo);
  color: var(--petroleo-hondo);
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.5rem;
  text-align: center;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  height: min(100svh, 56.25vw);
  min-height: 34rem;
  overflow: hidden;
  background: #01313c url("../assets/hero-escritorio-1920.webp") right bottom / cover no-repeat;
}

.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right bottom;
}

.hero__video:not([src]) {
  display: none;
}

.hero__content {
  position: relative;
  width: min(46%, 38rem);
  margin-left: var(--gutter);
  padding-top: var(--header-h);
  transition: opacity 0.9s ease, transform 0.9s ease;
}

.hero.is-intro .hero__content {
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
}

[hidden] {
  display: none !important;
}

.hero h1 {
  font-size: clamp(3rem, 6.6vw, 6.25rem);
  line-height: 0.94;
  letter-spacing: -0.035em;
}

.hero p {
  max-width: 30rem;
  margin: 1.5rem 0 2rem;
  font-size: clamp(1.0625rem, 1.4vw, 1.3125rem);
  color: #d5eef0;
}

/* ---------- Historia ---------- */
.story {
  background: var(--blanco);
  color: var(--petroleo);
  padding: clamp(4rem, 10vw, 8rem) var(--gutter);
}

.story__inner {
  max-width: 72rem;
  margin: 0 auto;
}

.draft-note {
  display: inline-block;
  margin-bottom: 1.5rem;
  padding: 0.3rem 0.8rem;
  border: 1px dashed var(--morado);
  border-radius: 6px;
  color: #6a4c92;
  font-size: 0.9375rem;
}

.story h2 {
  max-width: 16ch;
}

.story__steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  margin: clamp(2.5rem, 6vw, 4.5rem) 0 0;
  padding: 0;
  list-style: none;
}

.story__steps li {
  padding-top: 1.25rem;
  border-top: 4px solid var(--turquesa);
}

.story__steps li:nth-child(2) {
  border-color: var(--morado);
}

.story__steps li:nth-child(3) {
  border-color: var(--petroleo);
}

.story__steps h3 {
  margin-bottom: 0.6rem;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* ---------- Secciones foto + texto ---------- */
.split {
  --panel: var(--petroleo);
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--panel);
}

.split--dmso {
  --panel: #033040;
}

.split--tierra {
  --panel: #043142;
}

.split--kit {
  --panel: var(--morado-hondo);
}

.split--asesoria {
  --panel: var(--negro-foto);
}

.split__media {
  max-height: 100svh;
  overflow: hidden;
}

.split__media img {
  width: 100%;
  height: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  /* funde los bordes de la foto con el panel */
  -webkit-mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent);
}

.split--asesoria .split__media img {
  object-fit: cover;
  object-position: center 18%;
  -webkit-mask-image: none;
  mask-image: none;
}

.split__body {
  display: flex;
  align-items: center;
  padding: clamp(2.5rem, 6vw, 5rem) var(--gutter);
}

.split__inner {
  max-width: 30rem;
}

.split--flip .split__media {
  order: 2;
}

.split--flip .split__body {
  justify-content: flex-end;
}

.split__meta {
  margin: 0.75rem 0 1.5rem;
  color: var(--turquesa);
  font-weight: 500;
}

.split--kit .split__meta {
  color: #c4acec;
}

.split__inner p + p {
  margin-top: 0.75rem;
}

.split__inner .price {
  margin-top: 2rem;
  font: 900 clamp(2.25rem, 4vw, 3rem) / 1 var(--font-display);
  letter-spacing: -0.02em;
}

.buy {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

/* ---------- Cantidad ---------- */
.qty {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid currentColor;
  border-radius: 999px;
}

.qty__btn {
  width: 2.75rem;
  height: 3rem;
  border: 0;
  background: none;
  color: inherit;
  font: 500 1.375rem/1 var(--font-text);
  cursor: pointer;
}

.qty__valor {
  min-width: 1.75rem;
  font-weight: 700;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* ---------- Carrito ---------- */
.cart {
  background: var(--blanco);
  color: var(--petroleo);
  padding: clamp(4rem, 9vw, 7rem) var(--gutter);
}

.cart__inner {
  max-width: 72rem;
  margin: 0 auto;
}

.cart__empty {
  margin-top: 1.5rem;
}

.cart__empty p {
  margin-bottom: 1.5rem;
  font-size: 1.1875rem;
}

.cart__grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
  margin-top: 2.5rem;
}

.cart__grid[hidden],
.cart__empty[hidden] {
  display: none;
}

.lines {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid #c9d8dc;
}

.line {
  display: grid;
  grid-template-columns: 88px 1fr auto auto;
  gap: 1rem 1.25rem;
  align-items: center;
  padding: 1.25rem 0;
  border-bottom: 1px solid #c9d8dc;
}

.line__img {
  width: 88px;
  height: 88px;
  border-radius: 12px;
  object-fit: cover;
}

.line__name {
  font: 700 1.25rem/1.2 var(--font-display);
}

.line__meta {
  color: #4a6b76;
  font-size: 0.9375rem;
}

.line__total {
  min-width: 5.5rem;
  font-weight: 700;
  font-size: 1.125rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.cart__total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 1.5rem 0 0.5rem;
  font-size: 1.1875rem;
}

.cart__total strong {
  font: 900 2.25rem/1 var(--font-display);
  letter-spacing: -0.02em;
}

.checkout {
  padding: clamp(1.5rem, 3vw, 2.25rem);
  border-radius: 20px;
  background: #eef6f7;
}

.checkout h3 {
  margin-bottom: 1.25rem;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.field {
  display: block;
  margin-bottom: 1rem;
}

.field span,
.pay legend {
  display: block;
  margin-bottom: 0.35rem;
  padding: 0;
  font-weight: 500;
  font-size: 0.9375rem;
}

.field input,
.field textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1.5px solid #9db7be;
  border-radius: 10px;
  background: var(--blanco);
  color: var(--petroleo);
  font: 400 1rem/1.4 var(--font-text);
  resize: vertical;
}

.pay {
  margin: 1.25rem 0;
  padding: 0;
  border: 0;
}

.pay__options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pay-option {
  position: relative;
  cursor: pointer;
}

.pay-option input {
  position: absolute;
  opacity: 0;
}

.pay-option span {
  display: block;
  padding: 0.55rem 1.1rem;
  border: 1.5px solid #9db7be;
  border-radius: 999px;
  background: var(--blanco);
  font-weight: 500;
}

.pay-option input:checked + span {
  border-color: var(--petroleo);
  background: var(--petroleo);
  color: var(--blanco);
}

.pay-option input:focus-visible + span {
  outline: 3px solid var(--morado);
  outline-offset: 2px;
}

.pay-data {
  margin-top: 1rem;
  padding: 1rem 1.1rem;
  border-left: 4px solid var(--turquesa);
  background: var(--blanco);
}

.pay-data__title {
  font-weight: 700;
}

.pay-data ul {
  margin: 0.4rem 0 0;
  padding: 0;
  list-style: none;
}

.error {
  margin-bottom: 1rem;
  color: #b3261e;
  font-weight: 500;
}

.checkout__hint {
  margin-top: 0.9rem;
  color: #4a6b76;
  font-size: 0.9375rem;
}

.cart :focus-visible,
.story :focus-visible {
  outline-color: var(--morado);
}

/* ---------- Footer ---------- */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 2rem;
  padding: 2.5rem var(--gutter);
  background: var(--petroleo-hondo);
}

.site-footer img {
  width: auto;
  height: 60px;
}

.site-footer a {
  margin-left: auto;
  font-weight: 500;
}

/* ---------- Móvil ---------- */
@media (max-width: 899px) {
  .story__steps {
    grid-template-columns: 1fr;
  }

  .split {
    grid-template-columns: 1fr;
  }

  .split--flip .split__media {
    order: 0;
  }

  .split__media img {
    -webkit-mask-image: linear-gradient(to top, transparent, #000 10%);
    mask-image: linear-gradient(to top, transparent, #000 10%);
  }

  .split--asesoria .split__media {
    max-height: 130vw;
  }

  .split__body,
  .split--flip .split__body {
    justify-content: flex-start;
    padding-top: 1.5rem;
  }

  .cart__grid {
    grid-template-columns: 1fr;
  }

  .site-footer a {
    margin-left: 0;
  }
}

@media (max-width: 768px) {
  :root {
    --header-h: 64px;
  }

  .site-header__logo img {
    height: 44px;
  }

  .site-nav {
    font-size: 0.9375rem;
  }

  .hero {
    align-items: flex-start;
    height: min(100svh, 177.78vw);
    background-image: url("../assets/hero-movil-1080.webp");
    background-position: center bottom;
  }

  .hero__video {
    object-position: center bottom;
  }

  .hero__content {
    width: auto;
    margin: 0 var(--gutter);
    padding-top: calc(var(--header-h) + 1.5rem);
  }

  .hero p {
    margin: 1rem 0 1.5rem;
  }
}

@media (max-width: 520px) {
  .line {
    grid-template-columns: 64px 1fr auto;
  }

  .line__img {
    width: 64px;
    height: 64px;
  }

  .line__total {
    grid-column: 2 / -1;
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .btn,
  .site-header {
    transition: none;
  }
}
