:root {
  /* Brand palette */
  --orange: #ff5833;
  --orange-bright: #ff6900;
  --blue: #0693e3;
  --green: #9dff20;
  --whatsapp: #25d366;
  --dark: #1a1a2e;
  --cream: #fcf3ec;
  --white: #ffffff;

  --muted: #5a5a6e;
  --border: rgba(26, 26, 46, 0.12);
  --shadow: 0 10px 30px rgba(26, 26, 46, 0.1);
  --shadow-lg: 0 20px 50px rgba(26, 26, 46, 0.18);
  --radius: 16px;
  --max-width: 72rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: var(--dark);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  line-height: 1.15;
  letter-spacing: -0.01em;
}

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

/* ===== Layout helpers ===== */
.hero,
.pricing,
.why,
.closing,
.contact,
.site-footer {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

.section-head {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-head h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin: 0 0 0.5rem;
  color: var(--dark);
}

.section-head p {
  color: var(--muted);
  margin: 0;
}

.pricing .section-head h2 {
  font-size: clamp(2rem, 5vw, 3rem);
}

/* ===== Header / Nav ===== */
.site-header {
  /* Full-width bar so the bottom line stretches across the viewport */
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(252, 243, 236, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  /* Contents stay centered within the page max-width */
  max-width: var(--max-width);
  margin-inline: auto;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: flex-end; /* drop the word down to the logo's baseline */
  gap: 0.1rem;
  text-decoration: none;
  color: var(--dark);
  font-weight: 800;
}

.brand__logo {
  height: 40px;
  width: auto;
}

.brand__name {
  font-size: 1.3rem;
  line-height: 1;
  letter-spacing: -0.01em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav a {
  color: var(--dark);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}

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

.lang-toggle {
  border: 1.5px solid var(--blue);
  color: var(--blue);
  background: transparent;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  cursor: pointer;
  font-size: 0.85rem;
}

.lang-toggle:hover {
  background: var(--blue);
  color: var(--white);
}

/* On small screens, stack the header so the nav doesn't overlap the brand */
@media (max-width: 700px) {
  .site-header__inner {
    flex-direction: column;
    gap: 0.6rem;
  }
  .nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem 1rem;
  }
}

/* Floating WhatsApp bubble (fixed, follows on scroll) */
.wa-float {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--whatsapp);
  box-shadow: 0 10px 25px rgba(37, 211, 102, 0.45);
  transition: filter 0.15s var(--ease), transform 0.15s var(--ease);
}

.wa-float:hover {
  filter: brightness(1.05);
  transform: translateY(-3px);
}

.wa-float svg {
  width: 30px;
  height: 30px;
}

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.15s var(--ease), filter 0.15s var(--ease), background 0.15s var(--ease), color 0.15s var(--ease);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn--primary {
  background: var(--orange);
  color: var(--white);
  box-shadow: 0 8px 20px rgba(255, 88, 51, 0.35);
}

.btn--primary:hover {
  filter: brightness(1.05);
}

.btn--ghost {
  background: transparent;
  color: var(--dark);
  border-color: var(--border);
}

.btn--ghost:hover {
  border-color: var(--dark);
}

.btn--outline {
  background: transparent;
  color: var(--orange);
  border-color: var(--orange);
}

.btn--outline:hover {
  background: var(--orange);
  color: var(--white);
}

.btn--whatsapp {
  background: var(--whatsapp);
  color: var(--white);
  box-shadow: 0 8px 20px rgba(37, 211, 102, 0.35);
}

.btn--whatsapp:hover {
  filter: brightness(1.05);
}

/* ===== Hero ===== */
.hero {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding-block: 4.5rem 2rem; /* tighter bottom so the AI banner sits flush below */
}

/* Transparent logo watermark behind the hero */
.hero::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(620px, 95%);
  aspect-ratio: 478 / 426;
  background: url("assets/logo.png") no-repeat center / contain;
  opacity: 0.18;
  z-index: 0;
  pointer-events: none;
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero__eyebrow {
  color: var(--blue);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.9rem;
  margin: 0 0 0.9rem;
}

/* Show the eyebrow phrase for the active language (word order differs, so
   we swap whole phrases rather than per-word to keep the rainbow spans). */
.hero__eyebrow .lang-en {
  display: none;
}

html[lang="en"] .hero__eyebrow .lang-es {
  display: none;
}

html[lang="en"] .hero__eyebrow .lang-en {
  display: inline;
}

/* Glowing animated rainbow text */
.rainbow-text {
  background: linear-gradient(90deg, #ff5833, #ff6900, #9dff20, #0693e3, #8a2be2, #ff5833);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: rainbow 4s linear infinite;
  filter: drop-shadow(0 0 6px rgba(138, 43, 226, 0.45));
}

.hero__title {
  font-size: clamp(2rem, 5.2vw, 3rem);
  margin: 0 auto 2rem;
}

@media (min-width: 860px) {
  .hero__title {
    white-space: nowrap;
  }
}

.hero__actions {
  display: flex;
  gap: 0.85rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== AI consulting banner ===== */
/* Full-bleed band (spans the viewport) directly under the hero. */
.ai-banner {
  background: linear-gradient(135deg, var(--blue), var(--dark));
  color: var(--white);
}

.ai-banner__card {
  max-width: var(--max-width);
  margin-inline: auto;
  padding: 2.75rem 1.25rem;
  text-align: center;
}

.ai-banner__label {
  color: var(--green);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.85rem;
  margin: 0 0 0.5rem;
}

.ai-banner__title {
  font-size: clamp(1.4rem, 3.5vw, 2rem);
  margin: 0 auto 0.75rem;
  max-width: 26ch;
}

.ai-banner__lede {
  color: rgba(255, 255, 255, 0.85);
  margin: 0 auto 1.5rem;
  max-width: 50ch;
}

.ai-banner__benefits {
  list-style: none;
  padding: 0;
  margin: 0 auto 1.75rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem 2rem;
}

.ai-banner__benefits li {
  position: relative;
  padding-left: 1.6rem;
  font-weight: 600;
}

.ai-banner__benefits li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.7rem;
  height: 0.4rem;
  border-left: 2.5px solid var(--green);
  border-bottom: 2.5px solid var(--green);
  transform: rotate(-45deg);
}

/* ===== Pricing ===== */
.pricing {
  padding-block: 3.5rem;
}

.tiers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  align-items: stretch; /* equal-height cards */
}

.tier {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: box-shadow 0.2s var(--ease);
}

.tier--featured {
  border: 2px solid var(--orange);
  box-shadow: var(--shadow-lg);
}

@media (min-width: 880px) {
  .tier--featured {
    transform: scale(1.06);
  }
}

.tier__body {
  position: relative;
  z-index: 0; /* own stacking context so the curtain can fully cover it */
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 2rem 1.75rem;
}

.tier__badge {
  align-self: flex-start;
  background: var(--orange);
  color: var(--white);
  font-weight: 800;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  margin-bottom: 0.75rem;
}

.tier__name {
  font-size: 1.5rem;
  margin: 0 0 0.25rem;
  color: var(--blue);
}

.tier--featured .tier__name {
  color: var(--orange);
}

.tier__price {
  margin: 0 0 1.25rem;
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
}

.tier__amount {
  font-size: 2rem;
  font-weight: 800;
  color: var(--dark);
}

.tier__per {
  color: var(--muted);
  font-weight: 600;
}

.tier__features {
  list-style: none;
  padding: 0;
  margin: 0 0 1.75rem;
}

.tier__features li {
  position: relative;
  padding-left: 1.6rem;
  margin-bottom: 0.6rem;
  font-size: 0.95rem;
}

.tier__features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.7rem;
  height: 0.4rem;
  border-left: 2.5px solid var(--green);
  border-bottom: 2.5px solid var(--green);
  transform: rotate(-45deg);
}

.tier__cta {
  width: 100%;
  margin-top: auto; /* pin CTA to the bottom so cards align */
  border-radius: 10px; /* rectangular so the hover effects read correctly */
}

.tier__cta:hover {
  transform: none; /* each button's own effect drives the hover */
}

.tier__url {
  color: var(--dark);
  font-weight: 800;
  white-space: nowrap; /* keep example URLs on one line */
}

/* Secondary link under each card CTA (Ver Ejemplo / Pedir Demo) */
.tier__example {
  display: block;
  margin-top: 0.75rem;
  text-align: center;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  /* Animated rainbow text to make these stand out */
  background: linear-gradient(90deg, #ff5833, #ff6900, #9dff20, #0693e3, #8a2be2, #ff5833);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: rainbow 4s linear infinite;
}

@keyframes rainbow {
  to {
    background-position: 200% center;
  }
}

.tier__example:hover {
  text-decoration: underline;
  text-decoration-color: var(--orange);
}

/* Featured button's frame extends below it, so give its link more room */
.tier--featured .tier__example {
  margin-top: 1.5rem;
}

/* Curtain overlay — when JS is active each box starts fully covered by an
   opaque orange curtain (no text shown); as it scrolls into view the curtain
   slides up and away, revealing the content and buttons. */
.tier__curtain {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, var(--orange) 0%, var(--orange-bright) 100%);
  transform: translateY(-101%); /* default / no-JS: parked off, content visible */
  z-index: 2;
  pointer-events: none;
}

/* JS active: curtain covers the box until it's revealed */
.js .tier__curtain {
  transform: translateY(0);
}

/* Scrolled into view: curtain slides up and away to reveal the content */
.js .tier.is-revealed .tier__curtain {
  transform: translateY(-101%);
  transition: transform 0.7s var(--ease);
}

/* ===== Why us ===== */
.why {
  padding-block: 3.5rem;
}

.why__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.why__card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  text-align: center;
}

.why__card h3 {
  margin: 0 0 0.5rem;
  color: var(--blue);
  font-size: 1.25rem;
  text-align: center;
  text-transform: capitalize; /* "Mantenido Por Nosotros" */
}

.why__card p {
  margin: 0;
  color: var(--muted);
}

/* ===== Closing statement ===== */
.closing {
  text-align: center;
  padding-block: 2rem 0.5rem;
}

.closing__text {
  color: var(--muted);
  font-size: 1.25rem;
  max-width: 52ch;
  margin: 0 auto;
}

/* ===== Contact ===== */
.contact {
  text-align: center;
  padding-block: 3rem 4rem;
}

.contact h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin: 0 0 0.5rem;
}

.contact p {
  color: var(--muted);
  margin: 0 auto 1.75rem;
  max-width: 40ch;
}

.contact__actions {
  display: flex;
  gap: 0.85rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== Footer ===== */
.site-footer {
  text-align: center;
  padding-block: 2rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
}

/* ===== Pricing button hover effects ===== */

/* Estándar — combined effect: an orange frame that sits OUTSIDE the button
   and retracts on hover (fancy-btn) + a navy fill that grows from the cursor.
   The fill lives in an inner .aware-fill layer (overflow:hidden) so the button
   itself keeps overflow:visible and never clips the outside frame. */
.btn.fancy-btn {
  position: relative;
  overflow: visible;
  display: flex;
  justify-content: center;
  background: var(--orange);
  color: var(--white);
  border-color: transparent;
}

.fancy-btn .btn__label {
  position: relative;
  z-index: 1;
}

/* Cursor-aware navy fill, clipped to the button face */
.aware-fill {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 10px;
  z-index: 0;
}

.aware-fill::before {
  content: "";
  position: absolute;
  left: var(--x);
  top: var(--y);
  transform: translate(-50%, -50%);
  width: 0;
  height: 0;
  border-radius: 50%;
  background: #0c1a40;
  transition: width 0.8s, height 0.8s;
}

.fancy-btn:hover .aware-fill::before {
  width: 1000px;
  height: 1000px;
}

/* Retracting frame — sits outside the button edges */
.fancy-btn .button__horizontal,
.fancy-btn .button__vertical {
  position: absolute;
  z-index: 2;
  transition: transform 0.8s ease;
  will-change: transform;
}

.fancy-btn .button__horizontal::before,
.fancy-btn .button__vertical::before {
  content: "";
  position: absolute;
  border: inherit;
}

.fancy-btn .button__horizontal {
  top: 0;
  right: -10px;
  bottom: 0;
  left: -10px;
  border-top: 2px solid var(--orange);
  border-bottom: 2px solid var(--orange);
}

.fancy-btn .button__horizontal::before {
  top: -12px;
  bottom: -12px;
  left: 10px;
  right: 10px;
}

.fancy-btn:hover .button__horizontal {
  transform: scaleX(0);
}

.fancy-btn .button__vertical {
  top: -10px;
  right: 0;
  bottom: -10px;
  left: 0;
  border-left: 2px solid var(--orange);
  border-right: 2px solid var(--orange);
}

.fancy-btn .button__vertical::before {
  top: 10px;
  bottom: 10px;
  left: -12px;
  right: -12px;
}

.fancy-btn:hover .button__vertical {
  transform: scaleY(0);
}

/* Básico & Premium — orange panel sweeps in on a skew (grow-skew) */
.btn.grow-skew {
  position: relative;
  z-index: 0;
  overflow: hidden;
  background: transparent;
  color: var(--orange);
  border-color: var(--orange);
  transition: color 0.3s ease;
}

.grow-skew span {
  position: relative;
  z-index: 1;
}

.grow-skew::after {
  content: "";
  background: var(--orange);
  position: absolute;
  z-index: 0;
  left: -20%;
  right: -20%;
  top: 0;
  bottom: 0;
  transform: skewX(-45deg) scale(0, 1);
  transition: transform 0.3s ease;
}

.grow-skew:hover {
  color: var(--white);
}

.grow-skew:hover::after {
  transform: skewX(-45deg) scale(1, 1);
}

/* ===== Reduced motion: never hide content ===== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .tier {
    opacity: 1;
    transform: none;
  }
  .tier__curtain,
  .js .tier__curtain {
    display: none;
  }
  .btn:hover {
    transform: none;
  }
  .fancy-btn .button__horizontal,
  .fancy-btn .button__vertical,
  .aware-fill::before,
  .grow-skew,
  .grow-skew::after {
    transition: none;
  }
  .tier__example,
  .rainbow-text {
    animation: none;
  }
}
