/* ==========================================================================
   CONTTRARIA — 1:1 Desktop PDF Design & Responsive Stylesheet
   ========================================================================== */

:root {
  /* Color Palette (Exact from PDF) */
  --color-vino: #740132;
  --color-azul: #B5BEDD;
  --color-amarillo: #FDCF56;
  --color-beige: #FFEED6;
  --color-blanco: #FBFBFB;
  --color-negro: #121212;

  /* Typography */
  --font-serif: 'Averia Serif Libre', Georgia, serif;
  --font-script: 'Beth Ellen', cursive;
  --font-sans: 'Bricolage Grotesque', system-ui, -apple-system, sans-serif;

  /* Proportional 1920px Artboard Unit for 1:1 Desktop Fidelity */
  --u: calc(100vw / 1920);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--color-azul);
  color: var(--color-vino);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

img,
svg {
  display: block;
}

/* ==========================================================================
   TOP CENEFA (Not Sticky, Horizontally Repeated SVG)
   ========================================================================== */

.top-cenefa {
  position: relative;
  z-index: 101;
  width: 100%;
  height: calc(45.715 * var(--u));
  background-color: var(--color-azul);
  overflow: hidden;
  line-height: 0;
}

.top-cenefa-svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* ==========================================================================
   HEADER (Sticky Menu & Logo, height 141.6u, bottom border 2px #740132)
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  height: calc(141.6 * var(--u));
  background-color: var(--color-azul);
  border-bottom: 2px solid var(--color-vino);
  transition: height 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease;
}

.header-container {
  position: relative;
  width: 100%;
  height: 100%;
  transition: height 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Center Logo (Centered horizontally and vertically in desktop header) */
.header-logo {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: calc(321.6 * var(--u));
  height: calc(97.3 * var(--u));
  display: flex;
  align-items: center;
  justify-content: center;
  transition: width 0.3s cubic-bezier(0.22, 1, 0.36, 1),
              height 0.3s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.25s ease;
}

.header-logo:hover {
  transform: translate(-50%, -50%) scale(1.02);
}

.logo-svg {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Navigation Groups */
.header-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  transition: top 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.header-nav--left {
  left: calc(308.9 * var(--u));
  gap: calc(68 * var(--u));
}

.header-nav--right {
  right: calc(280.1 * var(--u));
  gap: calc(28 * var(--u));
}

/* Scrolled Desktop Header (logo 55px height + adjusted container) */
@media (min-width: 993px) {
  .site-header.is-scrolled {
    height: 85px;
    box-shadow: 0 4px 20px rgba(116, 1, 50, 0.08);
  }

  .site-header.is-scrolled .header-logo {
    height: 55px;
    width: calc(55px * 3.305);
  }
}

/* Interactive Hover Word Swap Links */
.nav-link {
  position: relative;
  display: inline-grid;
  align-items: center;
  justify-items: center;
  font-family: var(--font-serif);
  font-size: calc(18 * var(--u));
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--color-vino);
  text-transform: uppercase;
  padding: calc(6 * var(--u)) 0;
  cursor: pointer;
  white-space: nowrap;
}

.nav-link--nosotras {
  min-width: calc(135 * var(--u));
}

.nav-link--tortas {
  min-width: calc(182 * var(--u));
}

.nav-link--faq {
  min-width: calc(225 * var(--u));
}

.nav-text {
  grid-area: 1 / 1;
  transition: opacity 0.24s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

.nav-text--default {
  opacity: 1;
  transform: translateY(0);
}

.nav-text--hover {
  opacity: 0;
  transform: translateY(calc(5 * var(--u)));
  pointer-events: none;
}

.nav-link:hover .nav-text--default,
.nav-link:focus-visible .nav-text--default {
  opacity: 0;
  transform: translateY(calc(-5 * var(--u)));
}

.nav-link:hover .nav-text--hover,
.nav-link:focus-visible .nav-text--hover {
  opacity: 1;
  transform: translateY(0);
}

/* Wavy Stamp CTA Button in Header (Exact 184.9 x 57.7 from PDF) */
.nav-cta {
  width: calc(184.9 * var(--u));
  height: calc(57.7 * var(--u));
  padding: 0;
}

.nav-cta-stamp {
  grid-area: 1 / 1;
  width: 100%;
  height: 100%;
  z-index: 0;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.nav-cta .nav-text {
  position: relative;
  z-index: 1;
}

.nav-cta:hover .nav-cta-stamp {
  transform: scale(1.03);
}

/* Mobile Menu Button (Hidden on Desktop) */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  background: var(--color-beige);
  border: 1.5px solid var(--color-vino);
  border-radius: 8px;
  padding: 10px;
  cursor: pointer;
}

.hamburger-line {
  width: 100%;
  height: 2.5px;
  background-color: var(--color-vino);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

/* ==========================================================================
   MOBILE OFF-CANVAS DRAWER
   ========================================================================== */

.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(18, 18, 18, 0.45);
  backdrop-filter: blur(2px);
  z-index: 190;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.drawer-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(340px, 86vw);
  height: 100dvh;
  background-color: var(--color-beige);
  border-left: 3px solid var(--color-vino);
  z-index: 200;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.mobile-drawer.is-open {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 18px;
  border-bottom: 2px dashed var(--color-vino);
  margin-bottom: 24px;
}

.drawer-brand {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--color-vino);
  letter-spacing: 0.06em;
}

.drawer-close {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid var(--color-vino);
  background: var(--color-amarillo);
  color: var(--color-vino);
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
}

.drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.drawer-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1.5px solid var(--color-vino);
  background-color: var(--color-blanco);
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.drawer-link:hover {
  background-color: var(--color-azul);
  transform: translateX(-4px);
}

.drawer-link--cta {
  background-color: var(--color-amarillo);
}

.drawer-link-primary {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1rem;
  color: var(--color-vino);
}

.drawer-link-sub {
  font-family: var(--font-script);
  font-size: 0.85rem;
  color: var(--color-vino);
  text-transform: lowercase;
}

.drawer-link--payment {
  background-color: #FFF9F0;
  border: 1.5px dashed var(--color-vino);
  margin-top: 8px;
}

.drawer-link--payment .drawer-link-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  letter-spacing: 0.02em;
}

.drawer-wompi-icon {
  width: 18px;
  height: 18px;
  color: var(--color-vino);
  flex-shrink: 0;
}

/* ==========================================================================
   FLOATING SOCIAL SIDEBAR (Fixed on right, turns white over wine background)
   ========================================================================== */

.floating-social {
  position: fixed;
  right: calc(56 * var(--u));
  top: 56%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(19 * var(--u));
  z-index: 150;
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-vino);
  transition: color 0.25s ease, transform 0.2s ease, opacity 0.2s ease;
}

.social-icon.is-on-dark {
  color: var(--color-blanco);
}

.social-icon svg {
  width: calc(22 * var(--u));
  height: calc(22 * var(--u));
}

.social-icon:hover {
  transform: scale(1.15);
  opacity: 0.85;
}

/* ==========================================================================
   SECTION 1: HERO (1:1 PDF: topY 187.32..1048.82 -> height 861.5u)
   ========================================================================== */

.hero {
  position: relative;
  width: 100%;
  height: calc(861.5 * var(--u));
  background-color: var(--color-azul);
  overflow: hidden;
}

.hero-canvas {
  position: relative;
  width: 100%;
  height: 100%;
}

/* Left Artwork Cluster (X=200..960, Y=187.32..1048.82 in PDF) */
.hero-visual {
  position: absolute;
  left: calc(200 * var(--u));
  top: 0;
  width: calc(760 * var(--u));
  height: calc(861.5 * var(--u));
  pointer-events: none;
}

.hero-artwork-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* Right Copy & CTA Column (X=982.16 in PDF) */
.hero-content {
  position: absolute;
  left: calc(982.16 * var(--u));
  top: calc(210 * var(--u));
  width: calc(720 * var(--u));
}

.hero-heading {
  display: flex;
  flex-direction: column;
  color: var(--color-vino);
}

.hero-heading-serif {
  font-family: var(--font-serif);
  font-size: calc(55 * var(--u));
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.005em;
  text-transform: uppercase;
}

.hero-heading-script {
  font-family: var(--font-script);
  font-size: calc(80.7 * var(--u));
  font-weight: 400;
  line-height: 1.05;
  color: var(--color-vino);
  margin: calc(6 * var(--u)) 0 calc(8 * var(--u));
}

.hero-description {
  font-family: var(--font-sans);
  font-size: calc(24 * var(--u));
  font-weight: 400;
  line-height: 1.2;
  color: var(--color-blanco);
  margin-top: calc(27 * var(--u));
}

.hero-cta-group {
  position: relative;
  display: inline-block;
  margin-top: calc(35 * var(--u));
}

/* True Ellipse CTA Button (368.4 x 87.44 in PDF) */
.btn-oval {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: calc(368.4 * var(--u));
  height: calc(87.44 * var(--u));
  background-color: var(--color-beige);
  color: var(--color-vino);
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: calc(21 * var(--u));
  letter-spacing: 0.01em;
  text-transform: uppercase;
  border: 1px solid var(--color-vino);
  border-radius: 50%;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.btn-oval:hover {
  background-color: var(--color-amarillo);
  transform: scale(1.02);
}

/* Hand-Drawn Arrow overlapping bottom edge of oval button */
.hero-arrow {
  position: absolute;
  left: calc(135.8 * var(--u));
  top: calc(64.4 * var(--u));
  width: calc(65 * var(--u));
  height: calc(60 * var(--u));
  pointer-events: none;
}

/* ==========================================================================
   MARQUEE LOOP BANNER (1:1 PDF: height 51.87u, #FDCF56, no borders)
   ========================================================================== */

.marquee-banner {
  width: 100%;
  height: calc(51.87 * var(--u));
  background-color: var(--color-amarillo);
  overflow: hidden;
  display: flex;
  align-items: center;
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee-scroll 28s linear infinite;
}

.marquee-group {
  display: flex;
  align-items: center;
  gap: calc(38 * var(--u));
  padding-right: calc(38 * var(--u));
}

.marquee-item {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: calc(18 * var(--u));
  letter-spacing: 0.01em;
  color: var(--color-vino);
  white-space: nowrap;
  text-transform: uppercase;
}

.marquee-item strong {
  font-weight: 700;
}

.marquee-sep {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-vino);
  width: calc(25.77 * var(--u));
  height: calc(25.77 * var(--u));
  flex-shrink: 0;
}

.marquee-sep svg {
  width: 100%;
  height: 100%;
}

@keyframes marquee-scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* ==========================================================================
   SECTION 2: REASONS GRID (1:1 PDF: height 898u, 2x2 cards 628.75 x 247.55u)
   ========================================================================== */

.reasons-section {
  position: relative;
  width: 100%;
  height: calc(898 * var(--u));
  background-color: var(--color-vino);
}

.reasons-container {
  position: relative;
  width: 100%;
  height: 100%;
}

.reasons-grid {
  position: absolute;
  left: calc(308.3 * var(--u));
  top: calc(149.7 * var(--u));
  display: grid;
  grid-template-columns: repeat(2, calc(628.75 * var(--u)));
  grid-template-rows: repeat(2, calc(247.55 * var(--u)));
  column-gap: calc(43.5 * var(--u));
  row-gap: calc(80.0 * var(--u));
}

.reason-card {
  position: relative;
  width: calc(628.75 * var(--u));
  height: calc(247.55 * var(--u));
  border: 1px dashed var(--color-beige);
  border-radius: calc(60.45 * var(--u));
  padding-top: calc(84 * var(--u));
  padding-left: calc(103.7 * var(--u));
  padding-right: calc(36 * var(--u));
}

/* Floating Number Badge (91 x 91u circle, #B5BEDD fill, no border) */
.reason-badge {
  position: absolute;
  top: calc(-45.5 * var(--u));
  left: calc(108 * var(--u));
  width: calc(91 * var(--u));
  height: calc(91 * var(--u));
  border-radius: 50%;
  background-color: var(--color-azul);
  color: var(--color-vino);
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: calc(48 * var(--u));
  display: flex;
  align-items: center;
  justify-content: center;
}

.reason-title {
  font-family: var(--font-script);
  font-weight: 400;
  font-size: calc(24 * var(--u));
  line-height: 1.2;
  color: var(--color-beige);
  margin-bottom: calc(16 * var(--u));
}

.reason-text {
  font-family: var(--font-sans);
  font-size: calc(18 * var(--u));
  font-weight: 400;
  line-height: 1.2;
  color: var(--color-azul);
}

/* Bottom Checkered Border (36 squares across 1920u, height 30.25u) */
.checkerboard-border {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: calc(30.25 * var(--u));
  line-height: 0;
}

.checkerboard-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.placeholder-section {
  height: 1px;
}

/* ==========================================================================
   RESPONSIVE DESIGN (TABLET & MOBILE <= 992px)
   ========================================================================== */

@media (max-width: 992px) {
  .top-cenefa {
    height: 24px;
  }

  .site-header {
    height: auto;
  }

  .header-container {
    height: auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .header-nav {
    display: none;
  }

  .header-logo {
    position: static;
    transform: none;
    width: 170px;
    height: 52px;
  }

  .header-logo:hover {
    transform: scale(1.02);
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .floating-social {
    right: 14px;
    gap: 14px;
  }

  .social-icon svg {
    width: 18px;
    height: 18px;
  }

  .hero {
    height: auto;
    padding: 20px 20px 72px;
  }

  .hero-canvas {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
  }

  .hero-visual {
    position: relative;
    left: auto;
    top: auto;
    width: min(100%, 460px);
    height: auto;
    aspect-ratio: 760 / 861.5;
  }

  .hero-content {
    position: relative;
    left: auto;
    top: auto;
    width: 100%;
    max-width: 540px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .hero-heading-serif {
    font-size: clamp(1.85rem, 6vw, 2.6rem);
  }

  .hero-heading-script {
    font-size: clamp(2.5rem, 8vw, 3.6rem);
  }

  .hero-description {
    font-size: 1.05rem;
    margin-top: 18px;
  }

  .hero-description br {
    display: none;
  }

  .hero-cta-group {
    margin-top: 28px;
  }

  .btn-oval {
    width: 290px;
    height: 70px;
    font-size: 1rem;
  }

  .hero-arrow {
    left: 105px;
    top: 52px;
    width: 52px;
    height: 48px;
  }

  .marquee-banner {
    height: 44px;
  }

  .marquee-group {
    gap: 24px;
    padding-right: 24px;
  }

  .marquee-item {
    font-size: 0.95rem;
  }

  .marquee-sep {
    width: 20px;
    height: 20px;
  }

  .reasons-section {
    height: auto;
    padding: 84px 20px 80px;
  }

  .reasons-grid {
    position: static;
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    gap: 64px;
    max-width: 540px;
    margin: 0 auto;
  }

  .reason-card {
    width: 100%;
    height: auto;
    border-radius: 36px;
    padding: 58px 28px 34px 32px;
  }

  .reason-badge {
    top: -36px;
    left: 32px;
    width: 72px;
    height: 72px;
    font-size: 2.1rem;
  }

  .reason-title {
    font-size: 1.3rem;
    margin-bottom: 12px;
  }

  .reason-text {
    font-size: 1rem;
  }

  .checkerboard-border {
    height: 20px;
  }
}

/* ==========================================================================
   SITE FOOTER & PAYMENT ACTION
   ========================================================================== */

.site-footer {
  background-color: var(--color-crema);
  color: var(--color-vino);
  padding: 44px 24px 24px;
  position: relative;
  z-index: 10;
  border-top: 1px solid rgba(116, 1, 50, 0.15);
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(116, 1, 50, 0.12);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-logo {
  height: 38px !important;
  max-height: 38px !important;
  width: auto !important;
  max-width: 160px !important;
  display: block !important;
  filter: none !important;
}

.footer-location {
  font-family: var(--font-sans);
  font-size: 0.88rem;
  letter-spacing: 0.05em;
  color: var(--color-vino);
  opacity: 0.85;
  margin: 0;
}

.footer-actions {
  display: flex;
  align-items: center;
}

.wompi-pay-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background-color: var(--color-vino);
  color: var(--color-crema);
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 11px 22px;
  border-radius: 999px;
  border: 1px solid var(--color-vino);
  box-shadow: 0 4px 12px rgba(116, 1, 50, 0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  text-decoration: none;
}

.wompi-pay-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(116, 1, 50, 0.28);
  background-color: #550024;
}

.wompi-pay-icon {
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  max-width: 18px !important;
  flex-shrink: 0 !important;
  display: inline-block !important;
  vertical-align: middle !important;
  color: var(--color-amarillo) !important;
}

.footer-social-links {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-sans);
  font-size: 0.9rem;
}

.footer-social-links a {
  color: var(--color-vino);
  text-decoration: underline;
  text-underline-offset: 4px;
  transition: opacity 0.2s ease;
}

.footer-social-links a:hover {
  opacity: 0.7;
}

.footer-dot {
  opacity: 0.4;
  color: var(--color-vino);
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 20px;
  text-align: center;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  opacity: 0.75;
  color: var(--color-vino);
}

.drawer-wompi-icon {
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  max-width: 18px !important;
  color: var(--color-vino) !important;
  flex-shrink: 0 !important;
  display: inline-block !important;
  vertical-align: middle !important;
}

@media (max-width: 768px) {
  .footer-container {
    flex-direction: column;
    text-align: center;
    gap: 24px;
  }

  .footer-brand {
    align-items: center;
  }

  .footer-social-links {
    flex-wrap: wrap;
    justify-content: center;
  }
}
