/* ─────────────────────────────────────────────────────────────
   Beauty Trust Experience · Edición Madres 2026 · v2
   Bold marketing aesthetic — red/orange/yellow + cream + bold sans
   ───────────────────────────────────────────────────────────── */

:root {
  /* surfaces */
  --cream: #F8F4EC;
  --cream-2: #F2EDE2;
  --paper: #FFFFFF;
  --ink: #1A1A1A;
  --ink-soft: #3A3530;
  --mute: #6E6660;

  /* brand */
  --red: #D8232A;
  --red-2: #B91D24;
  --orange: #F47A20;
  --orange-2: #E0691A;
  --yellow: #F9C744;
  --gray-icon: #BDB7AE;

  /* utility */
  --rule: #E0DACE;
  --rule-strong: #6B6660;   /* meets 3:1 on cream for inputs/borders */
  --focus: var(--red);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--cream); color: var(--ink); }
body {
  font-family: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 400;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
::selection { background: var(--red); color: #fff; }

img, svg { display: block; max-width: 100%; }
ul { list-style: none; padding: 0; margin: 0; }
a { color: var(--ink); }

/* ─── typography utilities ─────────────────────────────────── */
.display, .hero-title, .section-h, .access-h, .final-h, .big-quote-text, .manifesto-h {
  font-family: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 0.95;
  margin: 0;
}
.micro {
  font-family: "Inter", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 11px;
  font-weight: 600;
  color: var(--mute);
}
.text-red    { color: var(--red); }
.text-orange { color: var(--orange); }
.text-yellow { color: var(--yellow); }
.text-bold   { font-weight: 700; }

/* ─── skip link ────────────────────────────────────────────── */
.skip-link {
  position: absolute; left: -9999px; top: 12px;
  background: var(--ink); color: var(--cream);
  padding: 10px 14px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.2em;
  z-index: 1000;
  text-decoration: none;
}
.skip-link:focus { left: 12px; }

/* ─── layout wrap ──────────────────────────────────────────── */
.wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 56px;
}
@media (max-width: 760px) { .wrap { padding: 0 28px; } }

/* ─── focus styles ─────────────────────────────────────────── */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 2px;
}
.btn-primary:focus-visible { outline-color: var(--ink); }

/* ─── buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border: none;
  border-radius: 999px;
  font-family: "Inter", sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  text-decoration: none;
  transition: transform 200ms ease, background 240ms ease, color 240ms ease, box-shadow 240ms ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--red);
  color: #fff;
  box-shadow: 0 6px 18px -8px rgba(216,35,42,0.6);
}
.btn-primary:hover {
  background: var(--red-2);
  transform: translateY(-1px);
  box-shadow: 0 10px 22px -10px rgba(216,35,42,0.7);
}
.btn-primary:active { transform: translateY(0); }
.btn-xl {
  padding: 18px 30px;
  font-size: 16px;
}
@media (max-width: 760px) {
  .btn-xl { padding: 16px 24px; font-size: 15px; width: 100%; max-width: 380px; }
}

/* ─── nav ──────────────────────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 200;
  background: color-mix(in oklab, var(--cream) 90%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: background 280ms ease, border-color 280ms ease, box-shadow 280ms ease;
}
.nav.scrolled {
  border-bottom-color: var(--rule);
  box-shadow: 0 2px 16px -8px rgba(0,0,0,0.08);
}
.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.nav-brand {
  display: flex; align-items: center; gap: 14px;
  text-decoration: none; color: var(--ink);
}
/* Marcos Pumarol logo lockup, white source. brightness(0) flips it to
   pure black so it reads cleanly on the cream nav. */
.brand-logo {
  width: 90px;
  height: auto;
  flex-shrink: 0;
  /* Slight negative offset to optically balance the lockup's whitespace
     with the text on the right. */
  margin-left: -4px;
  filter: brightness(0);
  transition: opacity 200ms ease, transform 240ms ease;
}
.nav-brand:hover .brand-logo {
  opacity: 0.78;
  transform: scale(0.98);
}
.brand-divider {
  width: 1px;
  height: 44px;
  background: var(--rule);
  flex-shrink: 0;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text-top {
  font-family: "Archivo", sans-serif;
  font-weight: 800;
  font-size: 36px;
  letter-spacing: -0.02em;
}
.brand-text-sub {
  font-size: 11px;
  color: var(--mute);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin-top: 8px;
  font-weight: 600;
}
.nav-links { display: flex; gap: 28px; }
.nav-links a {
  text-decoration: none; color: var(--ink);
  font-size: 13px; font-weight: 500;
  position: relative;
}
.nav-links a::after {
  content: ""; position: absolute;
  left: 0; right: 100%; bottom: -6px; height: 2px;
  background: var(--red);
  transition: right 320ms ease;
}
.nav-links a:hover::after { right: 0; }
.nav-cta { padding: 10px 18px; font-size: 13px; }
@media (max-width: 900px) { .nav-links { display: none; } }
@media (max-width: 760px) {
  .brand-logo { width: 80px; margin-left: -2px; }
  .brand-divider { height: 38px; }
  .brand-text-top { font-size: 22px; }
  .brand-text-sub { font-size: 10px; letter-spacing: 0.18em; margin-top: 4px; }
  .nav-brand { gap: 10px; }
}
@media (max-width: 540px) {
  .brand-text-sub { display: none; }
  .brand-divider { display: none; }
  .brand-text { display: none; }
  .brand-logo { width: 72px; margin-left: 0; }
}

/* ─── decorative sunburst (the V2 corner waves) ────────────── */
.sunburst {
  position: absolute;
  width: 380px; height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle at center,
    var(--yellow) 0%, var(--yellow) 18%,
    var(--orange) 22%, var(--orange) 36%,
    var(--red) 40%, var(--red) 56%,
    transparent 60%);
  filter: blur(2px);
  opacity: 0.55;
  pointer-events: none;
  z-index: 0;
}
.sunburst-tl { top: -260px; left: -180px; }
.sunburst-br { bottom: -240px; right: -200px; }
@media (max-width: 760px) {
  .sunburst { width: 260px; height: 260px; }
  .sunburst-tl { top: -180px; left: -140px; }
  .sunburst-br { bottom: -160px; right: -140px; }
}

/* ─── reveal animations ───────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 800ms cubic-bezier(.2,.7,.2,1), transform 800ms cubic-bezier(.2,.7,.2,1);
  transition-delay: var(--rd, 0ms);
}
.reveal.in { opacity: 1; transform: translateY(0); }

.reveal-stagger > * {
  opacity: 0; transform: translateY(16px);
  transition: opacity 700ms ease, transform 700ms ease;
}
.reveal-stagger.in > * { opacity: 1; transform: translateY(0); }
.reveal-stagger.in > *:nth-child(1) { transition-delay: 0ms; }
.reveal-stagger.in > *:nth-child(2) { transition-delay: 60ms; }
.reveal-stagger.in > *:nth-child(3) { transition-delay: 120ms; }
.reveal-stagger.in > *:nth-child(4) { transition-delay: 180ms; }
.reveal-stagger.in > *:nth-child(5) { transition-delay: 240ms; }
.reveal-stagger.in > *:nth-child(6) { transition-delay: 300ms; }
.reveal-stagger.in > *:nth-child(7) { transition-delay: 360ms; }
.reveal-stagger.in > *:nth-child(8) { transition-delay: 420ms; }
.reveal-stagger.in > *:nth-child(9) { transition-delay: 480ms; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-stagger > * { opacity: 1; transform: none; transition: none; }
  .marquee { animation: none; }
}

/* ─── HERO ─────────────────────────────────────────────────── */
.hero {
  position: relative;
  padding: 140px 0 80px;
  overflow: hidden;
}
@media (max-width: 760px) {
  .hero { padding: 120px 0 60px; }
}
.hero-wrap { position: relative; z-index: 1; }

.hero-title {
  font-size: clamp(56px, 11vw, 156px);
  margin: 0 0 28px;
}
.hero-title .line { display: block; }
.hero-title .line-black { color: var(--ink); }
.hero-title .line-red   { color: var(--red); }
.hero-title .line-edition {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 0.2em;
  margin-top: 8px;
}
.edition-eyebrow {
  font-size: 0.32em;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink);
  border-left: 4px solid var(--yellow);
  padding-left: 12px;
}
.edition-word {
  font-size: 0.42em;
  font-weight: 800;
  color: var(--red);
  letter-spacing: -0.01em;
}
.edition-heart {
  font-size: 0.4em;
}

.hero-lede {
  max-width: 620px;
  font-size: clamp(16px, 1.5vw, 18px);
  color: var(--ink-soft);
  margin: 0 0 36px;
  line-height: 1.55;
}

/* promo card under hero */
.promo-card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 18px;
  padding: 28px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
  box-shadow: 0 12px 40px -22px rgba(0,0,0,0.12);
  margin-bottom: 48px;
}
.promo-eyebrow {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--red);
}
.promo-headline {
  margin: 0;
  font-size: clamp(16px, 1.6vw, 19px);
  font-weight: 500;
  color: var(--ink);
  line-height: 1.4;
}
.promo-price {
  font-family: "Archivo", sans-serif;
  font-weight: 900;
  font-size: 1.4em;
  color: var(--red);
  letter-spacing: -0.02em;
}
.promo-highlight {
  background: var(--orange);
  color: #fff;
  padding: 2px 8px;
  font-weight: 700;
  border-radius: 4px;
  white-space: nowrap;
}
@media (max-width: 760px) {
  .promo-card {
    grid-template-columns: 1fr;
    padding: 24px;
    border-radius: 14px;
  }
  .promo-card .btn { width: 100%; }
}

/* hero meta strip */
.hero-meta-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding: 20px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.hero-meta-strip li {
  display: flex; flex-direction: column; gap: 4px;
}
.hero-meta-strip .meta-v {
  font-family: "Archivo", sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: var(--ink);
}
@media (max-width: 760px) {
  .hero-meta-strip { grid-template-columns: 1fr; gap: 14px; padding: 18px 0; }
}

/* ─── section heads ────────────────────────────────────────── */
section { padding: 96px 0; position: relative; }
.section-head { margin-bottom: 56px; max-width: 760px; }
.section-eyebrow {
  display: block;
  margin-bottom: 16px;
  color: var(--red);
}
.section-h {
  font-size: clamp(36px, 5.5vw, 64px);
}

/* ─── MANIFESTO ────────────────────────────────────────────── */
.manifesto { background: var(--cream); padding: 72px 0; }
.manifesto-wrap { max-width: 920px; text-align: center; margin: 0 auto; }
.manifesto-h {
  font-size: clamp(28px, 4.4vw, 48px);
  line-height: 1.15;
  margin-bottom: 24px;
}
.manifesto-body {
  font-size: clamp(16px, 1.4vw, 18px);
  color: var(--ink-soft);
  max-width: 680px; margin: 0 auto;
}

/* ─── EXPERIENCES GRID ─────────────────────────────────────── */
.experiences { background: var(--cream-2); }
.exp-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.exp-item {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 16px;
  padding: 28px;
  display: flex;
  align-items: flex-start;
  gap: 18px;
  transition: transform 240ms ease, box-shadow 240ms ease, border-color 240ms ease;
}
.exp-item:hover {
  transform: translateY(-3px);
  border-color: var(--red);
  box-shadow: 0 18px 36px -22px rgba(0,0,0,0.18);
}
.exp-icon {
  flex: 0 0 56px;
  width: 56px; height: 56px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  color: #fff;
}
/* rotating colors per index, applied inline via style */
.exp-icon.tone-red    { background: var(--red); }
.exp-icon.tone-orange { background: var(--orange); }
.exp-icon.tone-yellow { background: var(--yellow); color: var(--ink); }
.exp-icon.tone-gray   { background: var(--gray-icon); color: var(--ink); }
.exp-text strong {
  display: block;
  font-family: "Archivo", sans-serif;
  font-weight: 800;
  font-size: 17px;
  margin-bottom: 4px;
  color: var(--ink);
}
.exp-text span {
  font-size: 14px;
  color: var(--mute);
  line-height: 1.5;
}
@media (max-width: 900px) {
  .exp-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .exp-item { padding: 22px; gap: 14px; }
  .exp-icon { flex: 0 0 48px; width: 48px; height: 48px; font-size: 20px; }
}
@media (max-width: 540px) {
  .exp-grid { grid-template-columns: 1fr; }
}
.exp-foot {
  margin-top: 40px;
  text-align: center;
  color: var(--mute);
}
.exp-foot span[aria-hidden] { color: var(--red); margin: 0 8px; }

/* ─── GIFTS callout ────────────────────────────────────────── */
.gifts { background: var(--cream); }
.gifts-wrap {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 64px;
  align-items: center;
}
.gifts-art {
  position: relative;
  aspect-ratio: 1;
  background: linear-gradient(135deg, var(--orange) 0%, var(--red) 100%);
  border-radius: 28px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.gifts-art .gift-emoji {
  font-size: clamp(80px, 14vw, 140px);
  filter: drop-shadow(0 8px 16px rgba(0,0,0,0.2));
}
.gift-bubble {
  position: absolute;
  padding: 8px 14px;
  border-radius: 999px;
  font-family: "Archivo", sans-serif;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.02em;
  white-space: nowrap;
  box-shadow: 0 6px 16px -8px rgba(0,0,0,0.3);
}
.bubble-red    { background: var(--red); color: #fff; top: 14%; left: -8%; transform: rotate(-6deg); }
.bubble-yellow { background: var(--yellow); color: var(--ink); bottom: 18%; left: -6%; transform: rotate(-4deg); }
.bubble-orange { background: var(--paper); color: var(--orange); top: 22%; right: -10%; transform: rotate(5deg); border: 1.5px solid var(--orange); }
.gifts-copy p { font-size: clamp(16px, 1.4vw, 18px); color: var(--ink-soft); line-height: 1.55; margin: 16px 0; }
@media (max-width: 900px) {
  .gifts-wrap { grid-template-columns: 1fr; gap: 36px; }
  .gifts-art { max-width: 360px; margin: 0 auto; }
}

/* ─── BIG QUOTE ────────────────────────────────────────────── */
.big-quote { background: var(--cream-2); text-align: center; }
.big-quote-text {
  font-size: clamp(36px, 6vw, 76px);
  font-family: "Archivo", sans-serif;
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 auto 24px;
  max-width: 16ch;
}
.big-quote-sub {
  max-width: 640px; margin: 0 auto;
  color: var(--ink-soft);
  font-size: clamp(15px, 1.4vw, 17px);
  line-height: 1.6;
}

/* ─── ACCESS / OFFER ──────────────────────────────────────── */
.access { background: var(--cream); padding: 80px 0; }
.access-wrap { display: flex; justify-content: center; }
.access-card {
  position: relative;
  width: 100%;
  max-width: 720px;
  background: var(--paper);
  border-radius: 24px;
  padding: 56px 48px;
  text-align: center;
  border: 1px solid var(--rule);
  box-shadow: 0 24px 48px -28px rgba(0,0,0,0.18);
  overflow: hidden;
}
.access-card::before, .access-card::after {
  content: "";
  position: absolute;
  width: 220px; height: 220px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--red) 0%, var(--orange) 100%);
  opacity: 0.08;
  z-index: 0;
}
.access-card::before { top: -120px; left: -120px; }
.access-card::after  { bottom: -120px; right: -120px; }
.access-card > * { position: relative; z-index: 1; }
.access-tag {
  display: inline-block;
  padding: 6px 14px;
  background: var(--red);
  color: #fff;
  border-radius: 999px;
  letter-spacing: 0.16em;
  margin-bottom: 20px;
}
.access-h {
  font-size: clamp(40px, 6vw, 72px);
  margin: 0 0 24px;
}
.access-offer {
  font-size: clamp(16px, 1.5vw, 19px);
  color: var(--ink-soft);
  margin: 0 0 32px;
  line-height: 1.55;
}
.access-price {
  font-family: "Archivo", sans-serif;
  font-weight: 900;
  font-size: 1.3em;
  color: var(--red);
}
.access-trio {
  display: flex; justify-content: center; gap: 24px; flex-wrap: wrap;
  margin: 0 0 36px;
}
.access-trio li {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600;
  color: var(--ink);
  font-size: 15px;
}
.access-trio-emoji { font-size: 18px; }
.access-fineprint { display: block; margin-top: 18px; color: var(--mute); }
@media (max-width: 760px) {
  .access-card { padding: 40px 24px; }
  .access-trio { flex-direction: column; gap: 10px; align-items: center; }
}

/* ─── MARQUEE ──────────────────────────────────────────────── */
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.marquee-strip {
  background: var(--red);
  color: #fff;
  padding: 18px 0;
  overflow: hidden;
  position: relative;
}
.marquee {
  display: flex;
  white-space: nowrap;
  width: max-content;
  animation: marquee 35s linear infinite;
  font-family: "Archivo", sans-serif;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: 0.01em;
}
.marquee > span { padding: 0 32px; }
.marquee > span.dot { color: var(--yellow); }
@media (max-width: 760px) {
  .marquee { font-size: 18px; }
  .marquee > span { padding: 0 22px; }
}

/* ─── FINAL CTA ───────────────────────────────────────────── */
.final-cta { padding: 110px 0 130px; text-align: center; background: var(--cream-2); }
.final-h {
  font-size: clamp(36px, 5.5vw, 68px);
  max-width: 18ch;
  margin: 0 auto 24px;
}
.final-sub {
  max-width: 580px; margin: 0 auto 40px;
  color: var(--ink-soft);
  font-size: clamp(16px, 1.5vw, 18px);
}

/* ─── FOOTER / DATOS ───────────────────────────────────────── */
footer {
  background: var(--ink);
  color: var(--cream);
  padding: 72px 0 36px;
}
.footer-wrap { display: grid; gap: 56px; }
.footer-brand { display: flex; align-items: center; gap: 18px; }
.footer-brand .brand-mark { background: var(--cream); color: var(--ink); }
.footer-logo {
  display: block;
  width: clamp(220px, 28vw, 320px);
  height: auto;
}
.footer-data {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 28px;
}
.footer-data li {
  display: flex; flex-direction: column; gap: 6px;
  font-size: 14px;
  line-height: 1.4;
}
.footer-data .micro { color: rgba(248,244,236,0.55); }
.footer-data a { color: var(--cream); text-decoration: none; }
.footer-data a:hover { color: #fff; text-decoration: underline; }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: end;
  padding-top: 24px;
  border-top: 1px solid rgba(248,244,236,0.15);
  color: rgba(248,244,236,0.55);
  font-size: 12px;
  flex-wrap: wrap; gap: 12px;
}
@media (max-width: 900px) {
  .footer-data { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 540px) {
  .footer-data { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* ─── BUY MODAL ───────────────────────────────────────────────
   Desktop: centered lightbox.
   Mobile (≤760): iOS-style bottom sheet that slides up, with a drag
   handle and tap-to-dismiss-on-handle/swipe-down support. */
.buy-modal {
  position: fixed; inset: 0;
  z-index: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 280ms ease;
}
.buy-modal.open { opacity: 1; pointer-events: auto; }

.buy-backdrop {
  position: absolute; inset: 0;
  background: rgba(20, 20, 20, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.buy-sheet {
  position: relative;
  background: var(--paper);
  width: min(840px, calc(100vw - 32px));
  height: min(86vh, 920px);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,0.45);
  transform: translateY(20px) scale(0.97);
  transition: transform 320ms cubic-bezier(.2,.7,.2,1);
}
.buy-modal.open .buy-sheet { transform: translateY(0) scale(1); }

.buy-handle { display: none; }

.buy-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px;
  background: var(--cream);
  border-bottom: 1px solid var(--rule);
  flex-shrink: 0;
}
.buy-title {
  margin: 0;
  font-family: "Archivo", sans-serif;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.buy-actions { display: flex; gap: 8px; }
.buy-icon-btn {
  width: 38px; height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--cream-2);
  border: none;
  border-radius: 10px;
  color: var(--ink);
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 200ms ease, color 200ms ease;
}
.buy-icon-btn:hover { background: var(--rule); }
.buy-close:hover   { background: var(--red); color: #fff; }

.buy-iframe-wrap {
  flex: 1;
  position: relative;
  background: var(--cream-2);
  overflow: hidden;
}
.buy-iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0;
  background: #fff;
}

.buy-loading {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 16px;
  color: var(--mute);
  font-size: 13px;
  background: var(--cream);
  z-index: 1;
  transition: opacity 280ms ease;
}
.buy-loading.hidden { opacity: 0; pointer-events: none; }
.buy-spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--rule);
  border-top-color: var(--red);
  border-radius: 50%;
  animation: buy-spin 720ms linear infinite;
}
@keyframes buy-spin { to { transform: rotate(360deg); } }

/* ─── Mobile bottom-sheet variant ─────────────────────────── */
@media (max-width: 760px) {
  .buy-modal { align-items: flex-end; }
  .buy-sheet {
    width: 100%;
    height: 92dvh;       /* dvh = dynamic viewport height (iOS safe) */
    max-height: 92dvh;
    border-radius: 22px 22px 0 0;
    transform: translateY(100%);
    transition: transform 380ms cubic-bezier(.2,.7,.2,1);
  }
  /* Fallback for browsers without dvh */
  @supports not (height: 100dvh) {
    .buy-sheet { height: 92vh; max-height: 92vh; }
  }
  .buy-modal.open .buy-sheet { transform: translateY(0); }

  .buy-handle {
    display: block;
    width: 40px; height: 5px;
    background: var(--rule-strong);
    opacity: 0.35;
    border-radius: 999px;
    margin: 8px auto 6px;
    cursor: grab;
    flex-shrink: 0;
  }
  .buy-handle.dragging { cursor: grabbing; opacity: 0.6; }

  .buy-header { padding: 8px 14px 12px; }
  .buy-title { font-size: 15px; }
  .buy-icon-btn { width: 36px; height: 36px; }

  /* While the sheet is being dragged, freeze its transition so it
     follows the finger 1:1 — JS sets inline transform. */
  .buy-sheet.dragging { transition: none; }
}

@media (prefers-reduced-motion: reduce) {
  .buy-modal, .buy-sheet { transition: none !important; }
  .buy-spinner { animation: none; }
}
