/*
 * Weilo home hero. Tokens are best-guess from Figma renders;
 * to refine, sample frames 1:1954 (palette) and 1:2022 (buttons) when
 * the Figma rate limit clears, then update the values below.
 */
:root {
  --weilo-bg-dark:        #14130F;
  --weilo-yellow:         #EDFF5A;        /* CTA primary + price */
  --weilo-badge-bg:       #EDFF5A;        /* Figma node 3:2608 */
  --weilo-badge-text:     #1A1714;        /* Figma node 3:2608 */
  --weilo-text-light:     #FFFFFF;
  --weilo-text-muted:     rgba(255,255,255,0.74);
  --weilo-radius-hero:    40px;
  --weilo-radius-hero-sm: 24px;
  --weilo-radius-cta:     999px;
  --weilo-font-display:   "PP Nikkei Journal", "Hanken Grotesk", "Inter Tight", "Inter", system-ui, sans-serif;
  --weilo-font-body:      "Google Sans Flex", "Inter", system-ui, sans-serif;
}

/* ============================================================
   Display typeface — PP Nikkei Journal (Pangram Pangram, commercial).
   Drop the woff2/woff files into  astra-child/assets/fonts/pp-nikkei-journal/
   and the @font-face below activates automatically.
   ============================================================ */
@font-face {
  font-family: "PP Nikkei Journal";
  font-weight: 800;
  font-style:  normal;
  font-display: swap;
  src: url("../fonts/pp-nikkei-journal/PPNikkeiJournal-Ultrabold.woff2") format("woff2"),
       url("../fonts/pp-nikkei-journal/PPNikkeiJournal-Ultrabold.woff")  format("woff");
}

/* ============================================================
   Reset / scope
   ============================================================ */
.weilo-hero, .weilo-hero * { box-sizing: border-box; }
.weilo-hero {
  display: block;
  position: relative;
  width: 100%;
  background: var(--weilo-bg-dark);
  color: var(--weilo-text-light);
  font-family: var(--weilo-font-body);
}
.weilo-hero ul, .weilo-hero ol { list-style: none; padding: 0; margin: 0; }
.weilo-hero li { margin: 0; }
.weilo-hero h1, .weilo-hero h2, .weilo-hero h3 { color: inherit; margin: 0; padding: 0; }
.weilo-hero a { color: inherit; text-decoration: none; }
.weilo-hero p { margin: 0; }
/* Bullets — static checklist of 4 items, single column on the left */
.weilo-hero__bullets {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 15px;
  font-weight: 400;
  color: #FAF6EE;
  font-family: 'Absans', 'Inter', system-ui, sans-serif;
}
.weilo-hero__bullets li {
  display: flex;
  align-items: center;
  line-height: 1.3;
}

/* ============================================================
   Viewport (carousel container) — desktop ratio, capped at 980px tall
   on viewports >=1512px so a 2K/4K monitor doesn't blow the hero up.
   ============================================================ */
.weilo-hero__viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 1512 / 982;
  overflow: hidden;
  border-radius: 0 0 var(--weilo-radius-hero) var(--weilo-radius-hero);
  isolation: isolate;
}
@media (min-width: 1512px) {
  .weilo-hero__viewport {
    aspect-ratio: auto;     /* drop ratio: keep full width, fix the height */
    height: 980px;
  }
}

/* ============================================================
   Slide stacking + cross-fade
   ============================================================ */
.weilo-hero__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 600ms ease, visibility 0s linear 600ms;
  /* Per-slide background — overrideable via inline `--weilo-slide-bg`
     style emitted by the shortcode (ACF field `bg_color`). Falls back
     to the theme's dark default when the slide doesn't set one. */
  background: var(--weilo-slide-bg, var(--weilo-bg-dark));
}
.weilo-hero__slide.is-active {
  opacity: 1;
  visibility: visible;
  transition: opacity 600ms ease, visibility 0s;
}

/* ============================================================
   Background photo — desktop: right half only, hard edge at 50%
   The viewport's own background-color (var(--weilo-bg-dark)) handles
   the left half; no gradient overlay needed.
   ============================================================ */
.weilo-hero__bg {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 50%;
  z-index: 0;
}
.weilo-hero__bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.weilo-hero__overlay { display: none; }

/* ============================================================
   Content column — V1 desktop layout
   ============================================================ */
.weilo-hero__content {
  position: relative;
  z-index: 2;
  width: 50%;            /* exactly the left half — image takes the right half */
  height: 100%;
  /* top padding leaves room for Astra's transparent header overlay */
  padding: 110px 56px 48px 56px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 18px;
}
.weilo-hero__badge {
  display: inline-flex;
  align-items: center;
  align-self: start;
  height: 32px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--weilo-badge-bg);
  color: var(--weilo-badge-text);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.weilo-hero__headline {
  margin: 0;
  font-family: var(--weilo-font-display);
  font-weight: 800;
  font-size: 75px;
  line-height: 1;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--weilo-text-light);
}
.weilo-hero__subcopy { color: var(--weilo-text-muted); }
.weilo-hero__subcopy {
  margin: 0;
  max-width: 38ch;
  color: var(--weilo-text-muted);
  font-size: 16px;
  line-height: 1.5;
}
.weilo-hero__price {
  margin: 0;
  font-family: var(--weilo-font-body);
  font-weight: 500;
  font-size: 36px;
  color: var(--weilo-yellow);
}
.weilo-hero__ctas {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.weilo-hero__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 56px;
  padding: 0 28px;
  border-radius: var(--weilo-radius-cta);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.02em;
  text-decoration: none !important;     /* override Astra link underline */
  transition: transform 120ms ease, background 200ms ease, color 200ms ease;
}
.weilo-hero__cta:hover, .weilo-hero__cta:focus { text-decoration: none !important; }
/* Desktop: keep both CTAs visually balanced with a comfortable click target.
   Mobile rule below overrides to width: 100% — primary spans the full row,
   secondary is hidden. */
.weilo-hero__cta--primary,
.weilo-hero__cta--secondary { min-width: 260px; }
.weilo-hero__cta--primary {
  font-weight: 600;
  background: var(--weilo-yellow);
  color: #1a1a1a !important;
}
.weilo-hero__cta--primary:hover { transform: translateY(-1px); filter: brightness(1.05); }
.weilo-hero__cta--secondary {
  font-weight: 400;
  background: transparent;
  color: var(--weilo-text-light);
  border: 1px solid rgba(255,255,255,0.5);
}
.weilo-hero__cta--secondary:hover { background: rgba(255,255,255,0.08); }

/* ============================================================
   Social proof
   ============================================================ */
.weilo-hero__social {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}
.weilo-hero__avatars {
  list-style: none;
  display: inline-flex;
  margin: 0; padding: 0;
}
.weilo-hero__avatars li {
  width: 32px; height: 32px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--weilo-bg-dark);
  margin-left: -10px;
  background: #555;
}
.weilo-hero__avatars li:first-child { margin-left: 0; }
.weilo-hero__avatars img { width: 100%; height: 100%; object-fit: cover; display: block; }
.weilo-hero__rating { font-size: 13px; color: var(--weilo-text-muted); }

/* ============================================================
   Dots
   ============================================================ */
.weilo-hero__dots {
  position: absolute;
  bottom: 24px;
  right: 32px;
  z-index: 3;
  display: inline-flex;
  gap: 8px;
  list-style: none;
  margin: 0; padding: 0;
}
.weilo-hero__dot {
  appearance: none;
  width: 32px; height: 4px;
  background: rgba(255,255,255,0.35);
  border: 0; padding: 0; margin: 0;
  border-radius: 2px;
  cursor: pointer;
  font-size: 0;
  transition: background 200ms ease;
}
.weilo-hero__dot.is-active { background: var(--weilo-text-light); }
.weilo-hero__dot:focus-visible { outline: 2px solid var(--weilo-yellow); outline-offset: 4px; }

/* All three variants share the same headline spec (75px ultrabold uppercase). */

/* ============================================================
   Tablet — narrow but not mobile
   ============================================================ */
/* Tablet range extended to 1314 — at 1315+ the desktop nav fits the
   primary menu items in one row (see promo-bar.css §1) and the column
   becomes wide enough for the full 75px headline. */
@media (max-width: 1314px) and (min-width: 769px) {
  .weilo-hero__content {
    width: 50%;                    /* keep the 50/50 split with the photo */
    padding: 110px 24px 36px 32px;
    gap: 12px;
  }
  .weilo-hero__headline { font-size: clamp(34px, 4.6vw, 60px); }
  .weilo-hero__subcopy  { font-size: 14px; }
  .weilo-hero__price    { font-size: 28px; }
  .weilo-hero__cta      { height: 48px; padding: 0 20px; font-size: 14px; }
  .weilo-hero__bullets  { font-size: 14px; }
  .weilo-hero__badge    { font-size: 12px; padding: 0 14px; height: 28px; }
}

/* ============================================================
   Mobile — natural flex column: photo on top (fixed 360px),
   badge straddles the seam, content flows below.
   Cross-fade is replaced with a hard switch (display: none/flex) — the
   absolute-positioned stacking that powers the desktop fade can't drive
   the viewport's height when content is dynamic, so we trade animation
   smoothness for correct mobile layout.
   ============================================================ */
@media (max-width: 768px) {
  .weilo-hero__viewport {
    aspect-ratio: auto;
    border-radius: 0 0 var(--weilo-radius-hero-sm) var(--weilo-radius-hero-sm);
  }
  .weilo-hero__slide {
    position: relative;
    inset: auto;
    display: none;
    opacity: 1;
    visibility: visible;
    transition: none;
  }
  .weilo-hero__slide.is-active {
    display: flex;
    flex-direction: column;
  }
  .weilo-hero__bg {
    position: relative;
    flex: 0 0 360px;
    width: 100%;
    height: 360px;
    top: auto; left: auto; right: auto; bottom: auto;
  }
  .weilo-hero__overlay {
    background: linear-gradient(180deg, rgba(20,19,15,0) 0%, rgba(20,19,15,0.6) 28%, rgba(20,19,15,1) 38%);
  }
  .weilo-hero__content {
    position: relative;
    width: 100%;
    height: auto;
    flex: 1 1 auto;
    margin-top: 0;
    padding: 0 20px 28px 20px;
    gap: 14px;
    align-items: center;            /* center everything horizontally on mobile */
    text-align: center;
  }
  .weilo-hero__headline,
  .weilo-hero__subcopy { text-align: center; max-width: none; }
  /* Bullets hidden on mobile per design */
  .weilo-hero__bullets { display: none; }
  /* Social proof: avatars + rating centered as a row */
  .weilo-hero__social { justify-content: center; }
  /* Badge sits centered, riding the seam between photo and dark area */
  .weilo-hero__badge {
    align-self: center;
    margin-top: -16px;
    margin-bottom: 12px;
    position: relative;
    z-index: 3;
  }
  .weilo-hero__headline {
    font-size: clamp(34px, 9.4vw, 48px);
    line-height: 1;
  }
  .weilo-hero__subcopy { font-size: 16px; }

  /* Mobile header background is now handled site-wide by the unified
     glass effect in promo-bar.css (#14120F3D + blur 13.9px). */
  .weilo-hero__price { font-size: 28px; }
  .weilo-hero__ctas { flex-direction: column; align-items: stretch; gap: 10px; width: 100%; margin-bottom: 15px; }
  .weilo-hero__cta { width: 100%; height: 52px; padding: 0 20px; }
  /* Mobile: hide the secondary CTA and let the primary span full width. */
  .weilo-hero__cta--secondary { display: none; }
  .weilo-hero__cta--primary   { width: 100%; }
  .weilo-hero__dots { right: 16px; bottom: 16px; }
  .weilo-hero__ticker { max-height: 130px; }
  .weilo-hero__ticker li { font-size: 13px; padding: 2px 0; }
  .weilo-hero__avatars li { width: 28px; height: 28px; }
  .weilo-hero__social { margin: 8px 0 15px; }
}

/* Tiny phones (< 345px) — shrink the badge so the long
   "✦  Entregamos todos los jueves  ✦" copy doesn't push the layout. */
@media (max-width: 344px) {
  .weilo-hero__badge { font-size: 10px; }
}

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .weilo-hero__slide { transition: none; }
}
