/* ============================================================
   BRANDÍSIMAS — hoja de estilos
   Tokens tomados del Figma "BRANDISIMAS" (node 8:335)
   ============================================================ */

:root {
  --pink:        #fe83c4;
  --pink-soft:   #ffe9f4;
  --amber:       #fdba45;
  --cream:       #f7f0e6;
  --cream-soft:  #fff4e1;
  --text:        #893555;
  --white:       #ffffff;

  --radius-card: 56px;
  --radius-pill: 37px;
  --radius-chip: 34px;
  --radius-img:  16px;
  --radius-band: 12px;

  --font: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --maxw: 1500px;
  --gutter: clamp(20px, 4vw, 50px);

  --nav-h: 96px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a { color: inherit; text-decoration: none; cursor: pointer; }

ul, ol { margin: 0; padding: 0; list-style: none; }

h1, h2, h3, p { margin: 0; }

button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
  position: relative;
}

.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- Loader -------------------------------------------------
   Se oculta solo por animación CSS aunque el JS falle.             */
.loader {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: grid;
  place-items: center;
  background: var(--pink-soft);
  animation: loader-out 0.5s ease 1.1s forwards;
}
.loader-logo {
  width: min(320px, 62vw);
  height: auto;
  animation: loader-pulse 1.1s ease-in-out infinite;
}
.loader.is-done { animation: loader-out 0.45s ease forwards; }

@keyframes loader-out {
  to { opacity: 0; visibility: hidden; pointer-events: none; }
}
@keyframes loader-pulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.06); }
}

/* ---------- Botones ------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-radius: var(--radius-pill);
  font-size: clamp(15px, 1.15vw, 20px);
  font-weight: 400;
  line-height: 1.2;
  padding: 13px 28px;
  min-height: 47px;
  transition: transform 0.25s ease, background-color 0.25s ease,
              color 0.25s ease, box-shadow 0.25s ease;
  cursor: pointer;
}
.btn:hover  { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(137, 53, 85, 0.18); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 3px solid var(--text); outline-offset: 3px; }

.btn-pink  { background: var(--pink);  color: var(--white); }
.btn-pink:hover { background: #fd6db8; }

.btn-amber { background: var(--amber); color: var(--white); }
.btn-amber:hover { background: #f5ac2c; }

.btn-ghost {
  background: transparent;
  border: 1px solid var(--amber);
  color: var(--pink);
}
.btn-ghost:hover { background: var(--amber); color: var(--white); }

/* ---------- Flor decorativa ---------------------------------------- */
.flor {
  position: absolute;
  width: 100px;
  aspect-ratio: 158 / 155;
  pointer-events: none;
  z-index: 2;
}
.flor-amber { color: var(--amber); }
.flor-pink  { color: var(--pink); }
.flor use, .flor path { fill: currentColor; }

/* ---------- Franja de título --------------------------------------- */
.banner {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin-inline: auto;
  background: var(--pink);
  color: var(--white);
  border-radius: var(--radius-band);
  font-size: clamp(24px, 3.1vw, 48px);
  font-weight: 700;
  line-height: 1.15;
  padding: clamp(14px, 1.6vw, 22px) clamp(24px, 4vw, 70px);
  text-align: center;
}

/* ============================================================
   1. NAVBAR
   ============================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 1200;
  background: var(--cream);
  transition: box-shadow 0.3s ease, background-color 0.3s ease;
}
.nav.scrolled {
  background: rgba(247, 240, 230, 0.96);
  backdrop-filter: blur(8px);
  box-shadow: 0 6px 24px rgba(137, 53, 85, 0.1);
}

.nav-inner {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 14px var(--gutter);
  min-height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.5vw, 40px);
}

.nav-logo { flex: 0 0 auto; }
.nav-logo .logo-img { width: clamp(150px, 15vw, 230px); height: auto; }

.nav-links {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.4vw, 42px);
}
.nav-links a {
  font-size: clamp(15px, 1.15vw, 20px);
  color: var(--text);
  position: relative;
  padding-block: 4px;
  transition: color 0.2s ease;
}
.nav-links > a:not(.btn)::after {
  content: '';
  position: absolute;
  left: 0; right: 100%;
  bottom: 0;
  height: 2px;
  background: var(--pink);
  transition: right 0.28s ease;
}
.nav-links > a:not(.btn):hover { color: var(--pink); }
.nav-links > a:not(.btn):hover::after { right: 0; }

.nav-cta { flex: 0 0 auto; min-width: clamp(190px, 22vw, 300px); }
.nav-cta-mobile { display: none; }

.nav-toggle {
  display: none;
  width: 46px; height: 46px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  border-radius: 12px;
  margin-left: auto;
}
.nav-toggle span {
  display: block;
  width: 24px; height: 2.5px;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.28s ease, width 0.28s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { width: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ============================================================
   2. HERO
   ============================================================ */
.hero {
  position: relative;
  background: var(--pink-soft);
  padding-block: clamp(36px, 4.5vw, 70px) clamp(50px, 6vw, 96px);
  overflow: hidden;
}

.hero-flor { width: clamp(70px, 9vw, 144px); top: 4%; right: 4%; }

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  align-items: center;
  gap: clamp(26px, 4vw, 70px);
}

.hero-media img {
  width: 100%;
  height: auto;
  transform: rotate(-5.82deg);
  transform-origin: center;
}

.hero-copy h1 {
  font-size: clamp(34px, 4.45vw, 70px);
  font-weight: 700;
  line-height: 1.09;
  color: var(--pink);
  margin-bottom: clamp(18px, 1.8vw, 30px);
  text-wrap: balance;
}

.hero-lead {
  font-size: clamp(15px, 1.25vw, 20px);
  line-height: 1.55;
  max-width: 44ch;
  margin-bottom: clamp(22px, 2.4vw, 38px);
}

.hero-actions { display: flex; flex-wrap: wrap; gap: clamp(12px, 1.4vw, 22px); }
.hero-actions .btn { min-width: 210px; }

/* ============================================================
   3. CÓMO FUNCIONA
   ============================================================ */
.steps {
  background: var(--cream);
  padding-block: clamp(48px, 6vw, 96px) clamp(56px, 7vw, 110px);
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(34px, 5vw, 80px);
  margin-top: clamp(40px, 5vw, 80px);
}

.step-media { position: relative; margin-bottom: clamp(16px, 2vw, 30px); }
.step-media > img:first-child {
  width: 100%;
  aspect-ratio: 401 / 323;
  object-fit: cover;
  border-radius: var(--radius-img);
}
.step-num {
  position: absolute;
  top: -12px;
  left: clamp(-22px, -2vw, -12px);
  width: clamp(78px, 8.6vw, 138px);
  height: auto;
  animation: step-pop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.step:nth-child(2) .step-num { animation-delay: 0.12s; }
.step:nth-child(3) .step-num { animation-delay: 0.24s; }

@keyframes step-pop {
  from { transform: scale(0.72) rotate(-10deg); }
  to   { transform: scale(1) rotate(0deg); }
}

.step h3 {
  font-size: clamp(24px, 2.5vw, 40px);
  font-weight: 700;
  color: var(--pink);
  line-height: 1.2;
  margin-bottom: clamp(8px, 1vw, 16px);
}
.step p {
  font-size: clamp(15px, 1.5vw, 24px);
  line-height: 1.4;
  max-width: 28ch;
}

/* ============================================================
   4. SERVICIOS
   ============================================================ */
.services {
  background: var(--white);
  padding-block: clamp(48px, 6vw, 96px) clamp(50px, 6vw, 100px);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(36px, 4.5vw, 64px);
  margin-top: clamp(40px, 5vw, 80px);
}

.service {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}

.service-photo { position: relative; }
.service-photo img {
  width: 100%;
  aspect-ratio: 356 / 481;
  object-fit: cover;
  border-radius: var(--radius-card);
}
/* Encuadre del Figma: la toma se desplaza al 71% del ancho original */
.service:first-child .service-photo img { object-position: 71% 50%; }
.service-flor-a { width: clamp(64px, 6.4vw, 102px); bottom: -34px; left: -30px; }
.service-flor-b { width: clamp(64px, 6.4vw, 102px); top: -38px; left: -34px; }

.service-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.service-body h3 {
  font-size: clamp(24px, 2.6vw, 41px);
  font-weight: 700;
  color: var(--pink);
  text-align: center;
  line-height: 1.2;
  margin-bottom: clamp(10px, 1.2vw, 18px);
}

.service-card {
  flex: 1 1 auto;
  border-radius: var(--radius-card);
  padding: clamp(18px, 1.6vw, 26px);
  display: grid;
  gap: clamp(14px, 1.5vw, 22px);
  align-content: center;
  justify-items: center;
  /* Animación de entrada en CSS puro, sin JS */
  animation: sc-fadein 0.6s ease both;
}
.service-card--pink  { background: var(--pink-soft); }
.service-card--cream { background: var(--cream-soft); }

@keyframes sc-fadein {
  from { transform: translateY(20px); }
  to   { transform: none; }
}

.pill-list {
  width: 100%;
  background: var(--pink);
  border-radius: var(--radius-chip);
  color: var(--white);
  font-size: clamp(14px, 1.2vw, 20px);
  font-weight: 500;
  line-height: 1.45;
  padding: clamp(16px, 1.6vw, 24px) clamp(20px, 2vw, 30px);
  display: grid;
  gap: 2px;
  justify-content: center;
}
.pill-list li { position: relative; padding-left: 20px; }
.pill-list li::before {
  content: '';
  position: absolute;
  left: 2px; top: 0.62em;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.service-card > p {
  font-size: clamp(14px, 1.2vw, 20px);
  font-weight: 500;
  line-height: 1.45;
  text-align: center;
  max-width: 32ch;
}

.service-card .btn { width: 100%; max-width: 291px; }

/* ============================================================
   5. LA BARRA CREATIVA
   ============================================================ */
.barra {
  background: var(--white);
  padding-block: clamp(20px, 3vw, 46px) clamp(50px, 6vw, 100px);
}

.barra-box {
  position: relative;
  background: var(--cream);
  border-radius: var(--radius-card);
  padding: clamp(30px, 3.6vw, 56px) clamp(26px, 3.4vw, 70px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr) minmax(0, 0.78fr);
  align-items: center;
  gap: clamp(26px, 3.4vw, 60px);
}

.barra-flor { width: clamp(64px, 6.4vw, 101px); top: -34px; right: -20px; }

.barra-copy h2 {
  font-size: clamp(26px, 3.1vw, 48px);
  font-weight: 700;
  color: var(--pink);
  line-height: 1.2;
  margin-bottom: clamp(12px, 1.4vw, 20px);
}
.barra-logo { width: clamp(220px, 28vw, 452px); height: auto; margin-bottom: clamp(16px, 1.8vw, 26px); }
.barra-copy p {
  font-size: clamp(15px, 1.5vw, 24px);
  line-height: 1.42;
  max-width: 24ch;
  margin-bottom: clamp(18px, 2vw, 30px);
}
.barra-copy .btn { min-width: 250px; }

.barra-photo img {
  width: 100%;
  aspect-ratio: 388 / 434;
  object-fit: cover;
  object-position: 71% 50%;
  border-radius: var(--radius-card);
}

.barra-pills { display: grid; gap: clamp(12px, 1.6vw, 33px); }
.barra-pills li {
  background: var(--pink);
  color: var(--white);
  border-radius: var(--radius-chip);
  font-size: clamp(13px, 1.2vw, 20px);
  font-weight: 700;
  line-height: 1;
  padding: clamp(10px, 0.9vw, 12px) clamp(18px, 1.6vw, 26px);
  display: flex;
  align-items: center;
  gap: 12px;
  transition: transform 0.25s ease;
}
.barra-pills li::before {
  content: '';
  flex: 0 0 auto;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.barra-pills li:hover { transform: translateX(6px); }

/* ============================================================
   6. PRODUCTOS
   ============================================================ */
.products {
  background: var(--white);
  padding-block: clamp(40px, 5vw, 80px) clamp(60px, 8vw, 130px);
  overflow: hidden;
}
.products .container { position: relative; }

.products-flor-a { width: clamp(64px, 6.4vw, 102px); top: -4px; right: clamp(6px, 4vw, 70px); }
.products-flor-b { width: clamp(64px, 6.4vw, 102px); bottom: -46px; left: clamp(6px, 8vw, 150px); }

.carousel {
  position: relative;
  margin-top: clamp(36px, 4.6vw, 76px);
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.4vw, 24px);
}

.carousel-btn {
  flex: 0 0 auto;
  width: clamp(30px, 3vw, 44px);
  height: clamp(30px, 3vw, 44px);
  display: grid;
  place-items: center;
  color: var(--pink);
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.carousel-btn svg { width: 100%; height: 100%; }
.carousel-next svg { transform: rotate(180deg); }
.carousel-btn:hover { transform: scale(1.15); }
.carousel-btn:focus-visible { outline: 3px solid var(--pink); outline-offset: 4px; border-radius: 8px; }
.carousel-btn[disabled] { opacity: 0.3; pointer-events: none; }

.carousel-track {
  flex: 1 1 auto;
  min-width: 0;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 2 * clamp(14px, 1.5vw, 23px)) / 3);
  gap: clamp(14px, 1.5vw, 23px);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding-block: 4px;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-track:focus-visible { outline: 3px solid var(--pink); outline-offset: 6px; border-radius: 12px; }

.product {
  position: relative;
  scroll-snap-align: start;
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--white);
  aspect-ratio: 452 / 481;
  display: grid;
  place-items: center;
}
.product img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.product h3 {
  position: absolute;
  top: clamp(14px, 1.6vw, 26px);
  left: clamp(14px, 1.8vw, 30px);
  z-index: 2;
  font-size: clamp(26px, 3vw, 48px);
  font-weight: 700;
  line-height: 0.92;
  color: var(--pink);
}

/* ============================================================
   7. CTA FINAL
   ============================================================ */
.cta-final {
  position: relative;
  background: var(--pink);
  margin-top: clamp(60px, 8vw, 110px);
  padding-block: clamp(50px, 6vw, 96px) clamp(50px, 6vw, 96px);
}

.wave {
  position: absolute;
  left: 0; right: 0;
  top: calc(-1 * clamp(60px, 8vw, 110px));
  height: clamp(60px, 8vw, 110px);
  line-height: 0;
}
.wave svg { width: 100%; height: 100%; display: block; }

.cta-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: clamp(26px, 3vw, 50px);
}

.cta-flor-top {
  width: clamp(64px, 8vw, 158px);
  top: calc(-1 * clamp(40px, 5.5vw, 78px));
  right: clamp(20px, 9vw, 150px);
  z-index: 3;
}

.cta-flor {
  position: static;
  flex: 0 0 auto;
  width: clamp(72px, 9vw, 158px);
}

.cta-copy { flex: 1 1 340px; min-width: 0; }

.slogan {
  font-size: clamp(30px, 3.1vw, 48px);
  font-weight: 700;
  line-height: 1.05;
  color: var(--white);
  margin-bottom: clamp(14px, 1.6vw, 22px);
}
.cta-lead {
  font-size: clamp(14px, 1.15vw, 19px);
  line-height: 1.5;
  color: var(--white);
  max-width: 46ch;
}

.cta-btn { flex: 0 0 auto; min-width: 236px; }
.cta-btn:hover { box-shadow: 0 12px 26px rgba(0, 0, 0, 0.16); }

/* ============================================================
   8. FOOTER
   ============================================================ */
.footer {
  background: var(--cream);
  padding-block: clamp(26px, 3vw, 44px);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: clamp(16px, 2vw, 32px);
}
.footer-logo { width: clamp(140px, 14vw, 200px); height: auto; }
.footer-links { display: flex; flex-wrap: wrap; gap: clamp(14px, 1.8vw, 30px); }
.footer-links a { font-size: 15px; transition: color 0.2s ease; }
.footer-links a:hover { color: var(--pink); }
.footer-copy { font-size: 14px; opacity: 0.8; }

/* ============================================================
   9. WHATSAPP FLOTANTE
   ============================================================ */
.wa-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  width: 60px; height: 60px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #25d366;
  color: var(--white);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.2);
  transition: transform 0.25s ease;
}
.wa-float:hover { transform: scale(1.08); }
.wa-float svg { width: 32px; height: 32px; position: relative; z-index: 1; }

.wa-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #25d366;
  animation: ring-pulse 2s ease-in-out infinite;
}
@keyframes ring-pulse {
  0%, 100% { transform: scale(1);   opacity: 0.4; }
  50%      { transform: scale(1.4); opacity: 0; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* --- Tablet grande --- */
@media (max-width: 1200px) {
  .barra-box {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }
  .barra-pills { grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* --- Tablet --- */
@media (max-width: 1024px) {
  :root { --radius-card: 40px; --nav-h: 84px; }

  .nav-links {
    position: fixed;
    inset: var(--nav-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--cream);
    padding: 12px var(--gutter) 26px;
    box-shadow: 0 16px 30px rgba(137, 53, 85, 0.14);
    transform: translateY(-120%);
    transition: transform 0.35s ease;
    margin-left: 0;
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { padding: 14px 0; font-size: 18px; border-bottom: 1px solid rgba(137, 53, 85, 0.12); }
  .nav-links > a:not(.btn)::after { display: none; }
  .nav-cta-mobile { display: inline-flex; margin-top: 18px; border-bottom: 0; }
  .nav-cta { display: none; }
  .nav-toggle { display: flex; }

  .hero-inner { grid-template-columns: 1fr; }
  .hero-media { max-width: 460px; margin-inline: auto; order: 2; }
  .hero-copy { order: 1; text-align: center; }
  .hero-lead { margin-inline: auto; }
  .hero-actions { justify-content: center; }

  .services-grid { grid-template-columns: 1fr; }
  .service { gap: 16px; }

  .carousel-track { grid-auto-columns: calc((100% - clamp(14px, 1.5vw, 23px)) / 2); }
}

/* --- Móvil --- */
@media (max-width: 720px) {
  :root { --radius-card: 32px; --radius-band: 10px; }

  .steps-grid { grid-template-columns: 1fr; gap: 44px; }
  .step p { max-width: none; }
  .step-num { left: -6px; }

  .service { grid-template-columns: 1fr; gap: 20px; }
  .service-photo img { aspect-ratio: 16 / 11; }
  .service-flor-a, .service-flor-b { display: none; }

  .barra-box { grid-template-columns: 1fr; text-align: left; }
  .barra-copy p { max-width: none; }
  .barra-copy .btn, .service-card .btn { width: 100%; max-width: none; }
  .barra-pills { grid-template-columns: 1fr; }
  .barra-photo img { aspect-ratio: 4 / 3; }

  .carousel-track { grid-auto-columns: 100%; }
  .carousel-btn { width: 26px; height: 26px; }

  .cta-inner { flex-direction: column; align-items: flex-start; text-align: left; }
  .cta-btn { width: 100%; }

  .footer-inner { justify-content: center; text-align: center; flex-direction: column; }

  .wa-float { width: 54px; height: 54px; bottom: 16px; right: 16px; }
  .wa-float svg { width: 28px; height: 28px; }

  /* La flor no debe competir con el titular en pantallas chicas */
  .hero-flor { width: 66px; top: 1.5%; right: -16px; z-index: 0; }
  .hero-copy { position: relative; z-index: 1; }

  .products-flor-a, .products-flor-b { display: none; }
}

/* --- Preferencia de movimiento reducido --- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .loader { animation: loader-out 0.01ms ease 0.3s forwards; }
  .carousel-track { scroll-behavior: auto; }
}
