/* ---------- Backgrounds ---------- */
.bg-brand {
  background-color: var(--color-fondo);
}

.bg-footer {
  background-color: var(--color-fondo-footer);
}

.bg-dorado {
  background-color: var(--color-dorado-oscuro);
}

.bg-crema {
  background-color: var(--color-crema);
}

/* ---------- Typography ---------- */
.title-display {
  font-family: var(--font-display);
  font-weight: 400;
  font-style: normal;
  color: var(--color-dorado);
  text-align: center;
  letter-spacing: var(--tracking-display);
  line-height: var(--lh-display);
  text-transform: lowercase;
}

.title-display {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* --fit is set per line by js/fit-text.js so each line matches the Figma text box width */
.title-display__line {
  display: block;
  white-space: nowrap;
  transform: scaleX(var(--fit, 1));
  transform-origin: center top;
}

.title-display__line--sm {
  font-size: var(--fs-display-md);
}

.title-display__line--lg {
  font-size: var(--fs-display-lg);
  letter-spacing: 0.5px;
}

.title-display__line--xs {
  font-size: var(--fs-display-sm);
  letter-spacing: 0.8px;
}

/* Left-aligned variant: lines shrink towards the left edge */
.title-display--start {
  align-items: flex-start;
  text-align: left;
}

.title-display--start .title-display__line {
  transform-origin: left top;
}

.title-display__slash {
  letter-spacing: -2.5px;
}

.title-display--red {
  color: var(--color-fondo);
}

.text-body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: 400;
  color: var(--color-blanco);
  text-align: center;
}

.text-body--cream {
  color: var(--color-dorado-blanco);
  font-size: var(--fs-body-lg);
}

.text-body--dark {
  color: #000;
}

.text-body--lg {
  font-size: var(--fs-body-xl);
}

.text-accent {
  color: var(--color-granate);
  font-weight: 700;
}

.text-legal {
  font-family: var(--font-body);
  font-size: var(--fs-caption);
  font-weight: 700;
  color: var(--color-negro);
  letter-spacing: var(--tracking-legal);
  text-transform: uppercase;
  text-align: center;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 57px;
  width: 100%;
  max-width: var(--content-width);
  padding: 0 var(--space-md);
  border-radius: var(--radius-btn);
  font-family: var(--font-body);
  font-size: var(--fs-btn);
  font-weight: 700;
  line-height: var(--lh-btn);
  letter-spacing: var(--tracking-btn);
  text-transform: uppercase;
  text-align: center;
  transition:
    transform var(--duration-fast) var(--ease-out),
    filter var(--duration-fast) var(--ease-out),
    box-shadow var(--duration-fast) var(--ease-out);
}

.btn:focus-visible {
  outline: 2px solid var(--color-dorado);
  outline-offset: 3px;
}

.btn:active {
  transform: scale(0.98);
}

.btn--primary {
  background-color: var(--color-dorado-oscuro);
  color: var(--color-negro);
}

.btn--primary:hover {
  filter: brightness(1.06);
  box-shadow: 0 8px 24px rgba(50, 8, 12, 0.25);
}

.btn--ghost {
  background: transparent;
  color: var(--color-blanco);
  border: 2px solid var(--color-dorado);
}

/* ---------- Icons ---------- */
.icon {
  display: inline-block;
  flex-shrink: 0;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

.icon--sm {
  width: 18px;
  height: 18px;
}

.icon--md {
  width: 23px;
  height: 23px;
}

.icon--lg {
  width: 36px;
  height: 36px;
}

.icon--social {
  width: 35px;
  height: 35px;
}

.icon--instagram {
  background-image: url('../assets/icon-instagram.svg');
  width: 35px;
  height: 35px;
}

.icon--facebook {
  background-image: url('../assets/icon-facebook.svg');
  width: 20px;
  height: 36px;
}

.icon--youtube {
  background-image: url('../assets/icon-youtube.svg');
  width: 42px;
  height: 29px;
}

.icon--holly-sm {
  background-image: url('../assets/holly-1.svg');
}

.icon--holly-md {
  background-image: url('../assets/holly-2.svg');
}

.icon--holly-leaf {
  background-image: url('../assets/holly-3.svg');
}

.icon--sparkle {
  background-image: url('../assets/sparkle-dot.svg');
}

.icon--sparkle-alt {
  background-image: url('../assets/sparkle-alt.svg');
}

.icon--sparkle-gold {
  background-image: url('../assets/sparkle-gold.svg');
  width: 5px;
  height: 5px;
}

.icon--sparkle-gold-sm {
  background-image: url('../assets/sparkle-gold-sm.svg');
  width: 5px;
  height: 5px;
}

.icon--star {
  background-image: url('../assets/star-burst.svg');
}

.icon--corner {
  background-image: url('../assets/corner-sparkle.svg');
}

.icon--burst-lg {
  background-image: url('../assets/burst-lg.svg');
  width: 48px;
  height: 48px;
}

.icon--burst-md {
  background-image: url('../assets/burst-md.svg');
  width: 31px;
  height: 31px;
}

.icon--sparkle-4 {
  background-image: url('../assets/sparkle-4.svg');
  width: 23px;
  height: 23px;
}

.icon--star-sm {
  background-image: url('../assets/star-sm.svg');
  width: 29px;
  height: 29px;
}

.icon--sparkle-large {
  background-image: url('../assets/sparkle-large.svg');
  width: 35px;
  height: 35px;
}

.icon--quiz-burst {
  background-image: url('../assets/quiz-burst.svg');
  width: 60px;
  height: 60px;
}

.icon--quiz-sparkle {
  background-image: url('../assets/quiz-sparkle.svg');
  width: 28.74px;
  height: 28.74px;
}

.icon--holly-alt {
  background-image: url('../assets/holly-4.svg');
  width: 22.98px;
  height: 22.98px;
}

.icon--star-39 {
  background-image: url('../assets/star-39.svg');
  width: 39px;
  height: 39px;
}

.icon--star-19 {
  background-image: url('../assets/star-19.svg');
  width: 19px;
  height: 19px;
}

.icon--sparkle-24 {
  background-image: url('../assets/sparkle-24.svg');
  width: 24px;
  height: 24px;
}

.icon--sparkle-20 {
  background-image: url('../assets/sparkle-20.svg');
  width: 20px;
  height: 20px;
}

.icon--sparkle-16 {
  background-image: url('../assets/sparkle-16.svg');
  width: 16px;
  height: 16px;
}

.icon--dot-sm {
  background-image: url('../assets/dot-sm.svg');
  width: 4.8px;
  height: 4.8px;
}

.icon--dot-xs {
  background-image: url('../assets/dot-xs.svg');
  width: 2.66px;
  height: 2.66px;
}

.icon--tilt {
  rotate: -80.78deg;
}

.icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition:
    transform var(--duration-fast) var(--ease-out),
    opacity var(--duration-fast) var(--ease-out);
}

.icon-link:hover {
  transform: translateY(-2px);
  opacity: 0.85;
}

.icon-link:focus-visible {
  outline: 2px solid var(--color-dorado);
  outline-offset: 4px;
  border-radius: 4px;
}

/* ---------- Cards / boxes ---------- */
.card {
  position: relative;
  width: 100%;
  max-width: var(--content-width);
}

.card--prize {
  border: var(--border-card) solid var(--color-dorado);
  border-radius: var(--radius-card);
  padding: 12px 14px;
  min-height: 123px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card--prize .text-body--cream {
  max-width: 307px;
}

/* ---------- Waves / decorative backgrounds ---------- */
.wave {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 591px;
  pointer-events: none;
  z-index: 2;
}

.wave__half {
  position: absolute;
  top: 0;
  height: 100%;
  width: calc(50% + 1px);
  background-repeat: no-repeat;
  background-size: 100% 100%;
}

.wave__half--left {
  left: 0;
}

.wave__half--right {
  right: 0;
}

/* --y lets the same hero waves frame a photo placed anywhere on the page */
.wave--hero-top {
  top: var(--y, 14px);
  height: 81.331px;
}

.wave--hero-top .wave__half--left,
.wave--hero-bottom .wave__half--left {
  background-image: url('../assets/wave-top-left.svg');
}

.wave--hero-top .wave__half--right,
.wave--hero-bottom .wave__half--right {
  background-image: url('../assets/wave-top-right.svg');
}

/*
  Bottom wave = same seamless top halves, flipped.
  Top wave scallops sit on photo top (y≈58). Mirror that on photo bottom (y≈291):
  photoBottom - scallopBand ≈ 291 - 37 = 254.
*/
.wave--hero-bottom {
  top: var(--y, 254px);
  height: 81.331px;
  transform: translateX(-50%) scaleY(-1);
  z-index: 3;
}

/*
  Ribbon-only copy of the bottom wave: just the pink scalloped ribbon, without the
  brand-red band that extends below the photo (invisible against the page background).
  Stacked above hanging strings so they disappear behind the photo edge, while the
  full wave below keeps them visible across the red band.
*/
.wave--hero-ribbon .wave__half--left {
  background-image: url('../assets/wave-ribbon-left.svg');
}

.wave--hero-ribbon .wave__half--right {
  background-image: url('../assets/wave-ribbon-right.svg');
}

.wave--footer {
  top: 0;
  height: 100px;
  width: 402px;
  transform: translateX(-50%) rotate(180deg);
  background: url('../assets/footer-wave-top.svg') center / 100% 100% no-repeat;
}

/* ---------- Ornaments ----------
  Hanging bauble driven by custom properties:
  --x, --y, --w, --h        bauble box in frame px
  --shape, --mask           url() of the bauble SVG and its texture mask
  --string-x, --string-h    thread offset inside the box and its length
*/
.ornament {
  position: absolute;
  left: var(--x);
  /* Box includes the string so sway pivots from the real hang point (avoids floating baubles). */
  top: calc(var(--y) - var(--string-h, 0px));
  width: var(--w);
  height: calc(var(--h) + var(--string-h, 0px));
  z-index: 3;
  pointer-events: none;
}

.ornament__shape {
  position: absolute;
  left: 0;
  top: var(--string-h, 0px);
  display: block;
  width: 100%;
  height: var(--h);
  background-image: var(--shape);
  background-repeat: no-repeat;
  background-size: 100% 100%;
}

.ornament__fill {
  position: absolute;
  left: 0;
  top: var(--string-h, 0px);
  width: 100%;
  height: var(--h);
  background-image: url('../assets/ornament-texture.jpg');
  background-size: cover;
  background-position: center;
  mix-blend-mode: multiply;
  -webkit-mask-image: var(--mask);
  mask-image: var(--mask);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  pointer-events: none;
}

.ornament__string {
  position: absolute;
  left: var(--string-x, 50%);
  top: 0;
  width: 1px;
  height: var(--string-h, 0px);
  background: var(--string-color, var(--color-dorado-oscuro));
}

/*
  Split rendering for baubles that hang from the header photo: one element carries
  only the string and a second one (--front) carries the bauble, so a ribbon layer
  can sit between them. Both share the same vars, pivot and animation.
*/
.ornament--front {
  z-index: 4;
}

/* Result page baubles (position and string length set inline) */
.ornament--result-a {
  --w: 37.73px;
  --h: 52.36px;
  --shape: url('../assets/ornament-result-a.svg');
  --mask: url('../assets/mask-ornament-result-a.svg');
  --string-x: 18px;
  --string-color: var(--color-ornament-line);
}

.ornament--result-b {
  --w: 23.59px;
  --h: 52.94px;
  --shape: url('../assets/ornament-result-b.svg');
  --mask: url('../assets/mask-ornament-result-b.svg');
  --string-x: 11px;
}

.ornament--result-c {
  --w: 23.99px;
  --h: 50.23px;
  --shape: url('../assets/ornament-result-c.svg');
  --mask: url('../assets/mask-ornament-result-c.svg');
  --string-x: 12px;
}

.ornament--result-d {
  --w: 21.34px;
  --h: 48px;
  --shape: url('../assets/ornament-result-d.svg');
  --mask: url('../assets/mask-ornament-1.svg');
  --string-x: 10px;
}

.ornament--1 {
  --x: 8px;
  --y: 528px;
  --w: 21px;
  --h: 48px;
  --shape: url('../assets/ornament-1.svg');
  --mask: url('../assets/mask-ornament-1.svg');
  --string-x: 10px;
  /* Welcome baubles: each string ends in the middle of the hero's pink ribbon at its x */
  --string-h: 246px;
}

.ornament--2 {
  --x: 22px;
  --y: 338px;
  --w: 38px;
  --h: 52px;
  --shape: url('../assets/ornament-2.svg');
  --mask: url('../assets/mask-ornament-2.svg');
  --string-x: 18px;
  --string-h: 73px;
  --string-color: var(--color-ornament-line);
}

.ornament--3 {
  --x: 372px;
  --y: 568px;
  --w: 24px;
  --h: 50px;
  --shape: url('../assets/ornament-3.svg');
  --mask: url('../assets/mask-ornament-3.svg');
  --string-x: 12px;
  --string-h: 286px;
}

.ornament--4 {
  --x: 353px;
  --y: 342px;
  --w: 38px;
  --h: 51px;
  --shape: url('../assets/ornament-4.svg');
  --mask: url('../assets/mask-ornament-4.svg');
  --string-x: 19px;
  --string-h: 77px;
}

/* Bauble variants shared across screens (position via --x/--y on the instance) */
.ornament--red {
  --w: 44px;
  --h: 60px;
  --shape: url('../assets/ornament-red.svg');
  --mask: url('../assets/mask-ornament-red.svg');
  --string-x: 21px;
}

.ornament--green {
  --w: 39px;
  --h: 53px;
  --shape: url('../assets/ornament-green.svg');
  --mask: url('../assets/mask-ornament-green.svg');
  --string-x: 19px;
}

.ornament--green-sm {
  --w: 23.4px;
  --h: 52.5px;
  --shape: url('../assets/ornament-green-sm.svg');
  --mask: url('../assets/mask-ornament-green-sm.svg');
  --string-x: 11px;
}

.ornament--gold {
  --w: 23.6px;
  --h: 53px;
  --shape: url('../assets/ornament-gold.svg');
  --mask: url('../assets/mask-ornament-gold.svg');
  --string-x: 11px;
}

.ornament--cta {
  --w: 54px;
  --h: 62.35px;
  --shape: url('../assets/float-badge.svg');
  --mask: url('../assets/mask-float-badge.svg');
  --string-x: 26px;
  --string-h: 52px;
}

/* ---------- Deco sparkles ---------- */
.deco {
  position: absolute;
  left: var(--x, auto);
  top: var(--y, auto);
  pointer-events: none;
  z-index: 1;
}

/* ---------- Snowflake (4 stacked strokes, scales with --size) ---------- */
.snowflake {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--size, 52px);
  height: var(--size, 52px);
  pointer-events: none;
  z-index: 1;
}

.snowflake__part {
  position: absolute;
  display: block;
  max-width: none;
}

.snowflake__part--h {
  left: 0;
  top: 42.3%;
  width: 100%;
  height: 14%;
}

.snowflake__part--v {
  left: 42.9%;
  top: 0;
  width: 15.2%;
  height: 100%;
}

.snowflake__part--d {
  left: 13.8%;
  top: 12.7%;
  width: 72.9%;
  height: 73%;
}

/* ---------- Header ----------
   Layering (welcome ornaments), bottom to top:
   header (photo, waves) < hanging strings < pink ribbon copy < front baubles.
   The strings run over the red band under the photo (same colour as the page) and
   end beneath the ribbon copy, so they look like they hang from behind the photo.
*/
.site-header {
  position: relative;
  width: 100%;
  height: 281px;
  overflow: visible;
  z-index: 1;
}

.site-header__media {
  position: absolute;
  left: 50%;
  top: 29px;
  transform: translateX(-50%);
  width: 424px;
  height: 318px;
}

.site-header__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}

.site-header__clip {
  position: absolute;
  left: 50%;
  top: 58px;
  transform: translateX(-50%);
  width: 409px;
  height: 233px;
  overflow: hidden;
  z-index: 2;
}

.site-header__clip .site-header__media {
  left: 50%;
  top: -29px;
}

.page--bienvenida .wave--hero-top {
  z-index: 3;
}

.page--bienvenida .wave--hero-bottom {
  z-index: 5;
}

/* String-only copies: above the header, under the ribbon copy (z 5, placed after them) */
.page--bienvenida .ornament:not(.ornament--front) {
  z-index: 4;
}

.page--bienvenida .ornament--front {
  z-index: 6;
}

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  width: 100%;
  min-height: 615px;
  margin-top: auto;
  padding: 100px 31px 64px;
  overflow: hidden;
}

.site-footer__bg {
  position: absolute;
  inset: 76px 0 0 0;
  background: url('../assets/footer-bg.svg') center top / 100% auto no-repeat;
  pointer-events: none;
}

.site-footer__inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: baseline;
  gap: 36px;
  padding-top: 0;
}

.site-footer__logo {
  width: 142px;
  height: auto;
}

.site-footer__social {
  display: flex;
  align-items: center;
  gap: 36px;
  margin-top: 8px;
}

.site-footer__divider {
  width: 100%;
  max-width: 340px;
  height: 1px;
  background: url('../assets/divider-line.svg') center / 100% 100% no-repeat;
  margin-top: 48px;
}

.site-footer__legal {
  margin-top: 8px;
}

.site-footer__legal a:hover {
  opacity: 0.75;
}

.site-footer__decor {
  position: absolute;
  z-index: 3;
  pointer-events: none;
}
