/**
 * Coldwell hero — copied from coldwell project for Aviso Funer.
 * Fonts path from assets/css/ → ../../fonts/
 */

/* ========== FONTS (hero only) — loaded globally via styles.css ========== */

/* ========== HERO DESIGN TOKENS ========== */
.hero {
  --color-cb-blue: #012169;
  --color-bright-blue: #1F69FF;
  --color-celestial: #418FDE;
  --color-tide: #B8CFEA;
  --color-icy-blue: #F0F5FB;
  --color-midnight: #0A1730;
  --color-slate: #1B3C55;
  --color-smoky-gray: #58718D;
  --color-mist: #BECAD7;
  --color-glacier: #DAE1E8;
  --color-glacier-white: #FFFFFF;
  --color-brand: #012169;
  --color-text: #0A1730;
  --color-text-muted: #58718D;
  --color-border: #DAE1E8;
  --font-main: "Sohne", system-ui, sans-serif;
  --font-display: var(--font-main);
  --font-body: var(--font-main);
  --font-stats: var(--font-main);
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --line-relaxed: 1.65;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --container-max: 1200px;
  --shadow-sm: 0 1px 3px #BECAD7;
  --shadow-lg: 0 12px 32px #BECAD7;
  --weight-regular: 400;
}

/* Header/nav use same tokens so mobile dropdown has format */
.site-header {
  --color-brand: #012169;
  --color-text: #0A1730;
  --font-display: Bauziet, system-ui, sans-serif;
  --space-2: 0.5rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --text-lg: 1.125rem;
}

/* ========== CONTAINER (hero layout) ========== */
.hero .container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

@media (min-width: 768px) {
  .hero .container {
    padding-inline: var(--space-8);
  }
}

/* ========== NAVBAR ========== */
.site-header {
  height: 72px;
  background: #FFFFFF;
  border-bottom: 1px solid rgba(10, 23, 48, 0.06);
}

.site-header.is-scrolled {
  box-shadow: 0 1px 0 rgba(10, 23, 48, 0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  max-width: 1600px;
  margin-inline: auto;
  padding-inline: var(--space-8);
  height: 72px;
}

#ceremony,
#cream-section,
#preview,
#api-section,
#tagline,
#formulario-section,
#pricing,
#circle,
#logo-carousel {
  scroll-margin-top: 4.5rem; /* 72px — match navbar so section starts just below it */
}

.nav-main {
  display: none;
  align-items: center;
}

@media (min-width: 768px) {
  .nav-main {
    display: flex;
    gap: 2rem;
    margin-left: auto;
    padding-left: var(--space-4);
  }

  .nav-main a {
    color: var(--color-text);
    font-family: var(--font-display);
    font-size: var(--text-base);
    font-weight: 600;
    line-height: 1.25;
    padding: var(--space-2) var(--space-2);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: color 0.18s ease, border-color 0.18s ease;
    white-space: nowrap;
  }

  .nav-main a:hover {
    color: var(--color-brand);
    border-bottom-color: rgba(1, 33, 105, 0.25);
  }

  .nav-main a:focus-visible {
    outline: 2px solid var(--color-brand);
    outline-offset: 4px;
  }

  .nav-main a.active {
    color: var(--color-midnight);
    border-bottom-color: var(--color-brand);
  }
}

.nav-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--color-text);
  cursor: pointer;
  border-radius: 8px;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.nav-toggle:hover {
  background: rgba(10, 23, 48, 0.06);
}

.nav-toggle:focus-visible {
  outline: 2px solid var(--color-brand);
  outline-offset: 2px;
}

.nav-toggle-icon {
  position: relative;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle-icon::before,
.nav-toggle-icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: transform 0.2s ease;
}

.nav-toggle-icon::before {
  top: -7px;
}

.nav-toggle-icon::after {
  top: 7px;
}

.site-header.is-menu-open .nav-toggle-icon {
  background: transparent;
}

.site-header.is-menu-open .nav-toggle-icon::before {
  top: 0;
  transform: rotate(45deg);
}

.site-header.is-menu-open .nav-toggle-icon::after {
  top: 0;
  transform: rotate(-45deg);
}

@media (min-width: 768px) {
  .nav-toggle {
    display: none;
  }
}

@media (max-width: 767px) {
  .nav-main {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    bottom: auto;
    z-index: 99;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 1.5rem;
    background: #fff;
    box-shadow: 0 8px 24px rgba(10, 23, 48, 0.12);
    border-radius: 0 0 12px 12px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: max-height 0.25s ease, opacity 0.25s ease, visibility 0.25s ease;
  }

  .site-header.is-menu-open .nav-main {
    max-height: 80vh;
    opacity: 1;
    visibility: visible;
    overflow-y: auto;
  }

  .nav-main a {
    display: block;
    padding: 1rem 1.25rem;
    font-family: var(--font-display), system-ui, sans-serif;
    font-size: 1.125rem;
    font-weight: 600;
    color: #0A1730;
    text-decoration: none;
    border-bottom: 1px solid rgba(10, 23, 48, 0.08);
    transition: background-color 0.15s ease, color 0.15s ease;
    -webkit-tap-highlight-color: transparent;
  }

  .nav-main a:last-child {
    border-bottom: none;
  }

  .nav-main a:hover,
  .nav-main a:focus {
    background: rgba(10, 23, 48, 0.06);
    color: #012169;
  }

  .nav-main a:focus-visible {
    outline: 2px solid #012169;
    outline-offset: -2px;
  }
}

/* Logo in navbar */
.site-header .logo-component {
  display: flex;
  align-items: center;
}

.site-header .logo-img {
  width: auto;
  height: 1rem;
  object-fit: contain;
}

@media (min-width: 768px) {
  .site-header .logo-img {
    height: 1.25rem;
  }
}

/* ========== HERO (product-led two-column) ========== */
.hero {
  background: var(--color-glacier-white);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: calc(72px + var(--space-4)) var(--space-6) var(--space-8);
  overflow: visible;
  scroll-snap-align: start;
}

@media (min-width: 901px) {
  .hero {
    padding-top: calc(72px + var(--space-20));
  }
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-16);
  align-items: center;
  max-width: 1440px;
  margin: 0 auto;
  width: 100%;
  overflow: visible;
}

.hero-text {
  max-width: 64rem;
  grid-column: 1;
  grid-row: 1;
  margin-top: -2.5rem;
  text-align: left;
}

.hero-title {
  font-family: var(--font-main), system-ui, sans-serif;
  font-weight: 600;
  font-size: clamp(2rem, 4.5vw, 3.75rem);
  line-height: 1.1;
  color: #012169;
  margin: 0 0 var(--space-8);
  letter-spacing: -0.02em;
  text-transform: none;
}

.hero-sub {
  font-family: var(--font-main), system-ui, sans-serif;
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  line-height: var(--line-relaxed);
  color: #58718D;
  margin: 0 0 var(--space-10);
  max-width: 48ch;
  font-weight: 400;
}

.hero-visual {
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  overflow: visible;
  grid-column: 2;
  grid-row: 1 / -1;
}

.hero-scroll-invite {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: var(--color-glacier-white);
  color: var(--color-text);
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  margin-top: var(--space-10);
  flex-shrink: 0;
  align-self: center;
  transition: background 0.2s ease, color 0.2s ease;
}

.hero-scroll-invite:hover {
  background: var(--color-icy-blue);
  color: var(--color-brand);
}

.hero-scroll-invite-arrow {
  font-size: 1.25rem;
  line-height: 1;
  display: block;
  animation: hero-scroll-bounce 4s ease-in-out infinite;
}

@keyframes hero-scroll-bounce {
  0%, 6%, 100% { transform: translateY(0); }
  3% { transform: translateY(4px); }
}

@media (min-width: 901px) {
  .hero-scroll-invite {
    display: flex;
  }
}

@media (max-width: 900px) {
  .hero-scroll-invite {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-scroll-invite-arrow {
    animation: none;
  }
}

.hero-image-area {
  position: relative;
  width: 100%;
  max-width: min(95vw, 680px);
  flex-shrink: 0;
  margin-right: -16%;
  margin-top: -14%;
  align-self: flex-end;
}

.hero-image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 540px 540px 0 0;
  overflow: hidden;
  border: 3px solid var(--color-primary);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.4) inset,
    0 8px 24px rgba(1, 33, 105, 0.18),
    0 2px 8px rgba(0, 0, 0, 0.08);
}

.hero-video,
.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: absolute;
  inset: 0;
}

.hero-popups {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: visible;
}

.hero-offer-popup {
  position: absolute;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-4) var(--space-2) var(--space-2);
  background: rgba(10, 23, 48, 0.92);
  color: #FFFFFF;
  border-radius: 999px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  font-family: var(--font-body);
  max-width: 92%;
  opacity: 0;
  transform: translate(-50%, -50%) translateY(10px) scale(0.98);
  transform-origin: center;
  transition: opacity 0.35s ease-out, transform 0.35s ease-out;
}

.hero-offer-popup.is-visible {
  opacity: 1;
  transform: translate(-50%, -50%) translateY(0) scale(1);
}

.hero-offer-popup.is-exiting {
  opacity: 0;
  transform: translate(-50%, -50%) translateY(-10px);
}

.hero-offer-popup-avatar-wrap {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-glacier);
}

.hero-offer-popup-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-offer-popup-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  background: linear-gradient(145deg, var(--color-smoky-gray), var(--color-mist));
}

.hero-offer-popup-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hero-offer-popup-label {
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.2;
}

.hero-offer-popup-amount {
  font-size: var(--text-lg);
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.2;
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  .hero-offer-popup {
    transform: translate(-50%, -50%);
    transition: opacity 0.25s ease-out;
  }
  .hero-offer-popup.is-visible {
    transform: translate(-50%, -50%);
  }
  .hero-offer-popup.is-exiting {
    transform: translate(-50%, -50%);
  }
}

@media (max-width: 900px) {
  .hero {
    overflow-x: hidden;
    padding-top: calc(72px + var(--space-6));
    padding-bottom: var(--space-6);
    min-height: 100vh;
    min-height: 100dvh;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(260px, auto);
    gap: var(--space-2);
    text-align: center;
    justify-items: center;
  }

  .hero-text {
    max-width: none;
    grid-column: 1;
    grid-row: 1;
    margin-top: 0;
    padding-top: 0;
  }

  .hero-text {
    text-align: center;
  }

  .hero-title {
    font-size: clamp(1.75rem, 6vw, 2.75rem);
    margin-top: 0;
    margin-bottom: var(--space-4);
  }

  .hero-sub {
    margin-inline: auto;
    margin-bottom: var(--space-4);
  }

  .hero-visual {
    justify-content: center;
    grid-column: 1;
    grid-row: 2;
    width: 100%;
    min-height: 0;
  }

  .hero-image-area {
    width: min(100%, 400px);
    min-width: 280px;
    max-width: min(100%, 400px);
    margin-right: 0;
    margin-left: 0;
    margin-top: 0;
    margin-inline: auto;
    align-self: center;
  }

  .hero-image-wrap {
    height: auto;
    aspect-ratio: 4 / 5;
    min-height: 260px;
    border-radius: 540px 540px 0 0;
  }
}

