/* ============================================================
   Claudify Hero — Framer "Prosperous Essentials" recreation
   Full-viewport hero: dark bg + image + bottom-anchored content
   ============================================================ */

/* The hero owns a render-blocking alias for its two display faces. The same
   files are preloaded in wp_head on hero routes, so first paint uses the
   intended typeface instead of briefly exposing a system-serif fallback. */
@font-face {
  font-display: block;
  font-family: "Bera Hero";
  font-style: normal;
  font-weight: 500;
  src: url("../fonts/CormorantGaramond-Medium.woff2?ver=0.4.95") format("woff2");
  unicode-range: U+0000-024F, U+02B0-02FF, U+0300-036F, U+1E00-1EFF, U+2000-206F, U+20A0-20CF, U+2100-214F, U+2190-21FF, U+2212, U+2215, U+25A0-25FF, U+FEFF, U+FFFD;
}

@font-face {
  font-display: block;
  font-family: "Bera Hero";
  font-style: italic;
  font-weight: 500;
  src: url("../fonts/CormorantGaramond-MediumItalic.woff2?ver=0.4.95") format("woff2");
  unicode-range: U+0000-024F, U+02B0-02FF, U+0300-036F, U+1E00-1EFF, U+2000-206F, U+20A0-20CF, U+2100-214F, U+2190-21FF, U+2212, U+2215, U+25A0-25FF, U+FEFF, U+FFFD;
}

/* ---- Shell ---- */
/* Negative margin pulls the hero up behind the transparent floating header,
   so the hero's dark background shows through the header's padding area —
   matching Framer's layout where the header overlays the hero. */
.claudify-hero-section {
  --cl-hero-header-offset: var(--header-height, 92px);
  /* No transition on margin-top: an animated value could get stuck mid-flight on
     cold loads (iOS Safari), leaving the hero un-pulled-up behind the notch and
     exposing a solid band. Snap to the computed value instead. */
  margin-top: calc(-1 * var(--cl-hero-header-offset));
}

.claudify-hero {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100svh; /* safe-area aware on mobile */
  min-height: 800px; /* ensures text never crowds the header on short viewports */
  background-color: #2b2a27; /* neutral dark fallback — only shown if NO hero image is set.
     When an image IS set, the section's inline <style> overrides this with that image's own
     dominant colour + a blurred LQIP, so there's no flat green block during load. */
  overflow: hidden;
}

/* ---- Background image ---- */
.claudify-hero__image {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.claudify-hero__image img {
  width: 101%;
  height: 101%;
  object-fit: cover;
  object-position: center;
  position: absolute;
  top: -0.5%;
  left: -0.5%;
}

/* ---- Content — fills full hero, top padding clears the floating header ---- */
.claudify-hero__content {
  position: absolute;
  inset: 0;
  z-index: 2;
  padding: calc(var(--cl-hero-header-offset) + 24px) 100px 96px 96px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

/* ---- Left column: heading + text + button ---- */
.claudify-hero__left {
  display: flex;
  flex-direction: column;
  gap: 32px; /* tightened: text cluster reads as one group, button no longer floats */
  max-width: min(92vw, 940px); /* wide enough that "Rooted in Tradition" (897px @128) stays on one line */
  flex: 1;
  min-width: 0;
}

.claudify-hero__text-group {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Eyebrow — small spaced-out label above the headline */
.claudify-hero__eyebrow {
  margin: 0;
  font-family: 'Jost', sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}

/* Heading: two lines stacked, no margin */
.claudify-hero__heading {
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* Line 1: Cormorant Garamond Bold */
.claudify-hero__heading-line {
  display: block;
  font-family: var(--sp-heading-font, 'Bera Hero', 'Cormorant Garamond', Georgia, 'Times New Roman', serif);
  font-size: clamp(48px, 9.5vw, var(--sp-heading-max, 128px));
  font-weight: var(--sp-heading-weight, 500);
  font-style: normal;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap; /* keep each configured line intact (desktop/tablet); mobile re-enables wrap */
  color: rgb(255, 255, 255);
}

/* Line 2: Cormorant Garamond Bold Italic */
.claudify-hero__heading-line--italic {
  font-weight: 500;
  font-style: italic;
}

/* Body text: Jost Regular 22px */
.claudify-hero__subtext {
  font-family: var(--sp-subtext-font, 'Jost', sans-serif);
  font-size: var(--sp-subtext-size, clamp(16px, 1.6vw, 22px));
  font-weight: var(--sp-subtext-weight, 400);
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.82);
  max-width: 540px;
  margin: 0;
}

/* ---- CTA Button — Framer "Button Text" style ---- */
.claudify-hero__btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 30px; /* ~45px tap height */
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 50px;
  background: transparent;
  font-family: var(--sp-btn-font, 'Jost', sans-serif);
  font-size: var(--sp-btn-size, 15px);
  font-weight: var(--sp-btn-weight, 600);
  text-transform: none;
  letter-spacing: 0.02em;
  line-height: 1;
  color: rgb(255, 255, 255);
  text-decoration: none;
  width: fit-content;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

/* Ghost pill fills white with dark-green text on hover/focus */
.claudify-hero__btn:hover,
.claudify-hero__btn:focus-visible {
  background: #ffffff;
  color: #0b2615;
  border-color: #ffffff;
  outline: none;
}

.claudify-hero__btn-label {
  transition: none;
}

.claudify-hero__btn svg {
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.claudify-hero__btn:hover svg {
  transform: translateX(3px);
}

/* The shared reveal rule (.cl-anim .cl-reveal) out-specifies this button's own
   transition, which made the hover background/color change snap instead of
   easing. Merge both: the reveal props keep the house duration + stagger delay,
   the hover props ease at the button's designed 0.2s with no delay. */
.cl-anim .claudify-hero__btn.cl-reveal {
  transition: opacity var(--cl-reveal-duration) var(--cl-reveal-ease),
              transform var(--cl-reveal-duration) var(--cl-reveal-ease),
              background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  transition-delay: calc(var(--cl-i, 0) * var(--cl-reveal-stagger)),
                    calc(var(--cl-i, 0) * var(--cl-reveal-stagger)),
                    0s, 0s, 0s;
}

/* ---- Scroll indicator — right side ---- */
.claudify-hero__scroll {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
  padding-bottom: 4px;
}

.claudify-hero__scroll-text {
  font-family: 'Jost', sans-serif;
  font-size: 11px;
  letter-spacing: 0;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  user-select: none;
}

.claudify-hero__scroll-line {
  width: 1px;
  height: 56px;
  background: rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
  border-radius: 1px;
}

.claudify-hero__scroll-line::after {
  content: '';
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.7);
  animation: claudify-scroll-tick 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@media (prefers-reduced-motion: reduce) {
  .claudify-hero__scroll-line::after {
    animation: none;
  }
}

@keyframes claudify-scroll-tick {
  0%   { top: -100%; opacity: 0; }
  20%  { opacity: 1; }
  80%  { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

/* ============================================================
   Responsive — Tablet (750px – 989px)
   Framer: 810px canvas, padding 64px
   ============================================================ */
@media screen and (min-width: 750px) and (max-width: 989px) {
  .claudify-hero-section {
    --cl-hero-header-offset: 116px;
  }

  .claudify-hero {
    height: auto;
    min-height: 85vh; /* fallback for very old browsers */
    min-height: 85svh; /* fallback before the frozen viewport unit is available */
    min-height: calc(var(--cl-hero-vh, 1svh) * 85);
  }

  .claudify-hero__content {
    padding: calc(var(--cl-hero-header-offset) + 16px) 64px 64px 64px;
  }

  .claudify-hero__left {
    gap: 28px;
    max-width: min(90vw, 720px); /* room for "Rooted in Tradition" on one line */
  }

  .claudify-hero__subtext {
    max-width: 440px;
  }
}

/* ============================================================
   Responsive — Mobile (< 750px)
   Framer: 390px canvas, full-width, no scroll indicator
   ============================================================ */
@media screen and (max-width: 749px) {
  .claudify-hero-section {
    --cl-hero-header-offset: 100px;
  }

  .claudify-hero {
    height: auto;
    min-height: 85vh; /* fallback for very old browsers */
    min-height: 85svh; /* fallback before the frozen viewport unit is available */
    min-height: calc(var(--cl-hero-vh, 1svh) * 85);
  }

  .claudify-hero__content {
    padding: calc(var(--cl-hero-header-offset) + 12px) 24px 48px 24px;
    align-items: flex-end;
  }

  .claudify-hero__left {
    --cl-reveal-rise: 0px;
    gap: 24px;
    max-width: 100%;
  }

  .claudify-hero__text-group {
    gap: 14px;
  }

  .claudify-hero__eyebrow {
    font-size: 12px;
    letter-spacing: 0.16em;
  }

  .claudify-hero__heading-line {
    letter-spacing: 0;
    white-space: normal; /* allow natural wrap on narrow phones */
  }

  .claudify-hero__subtext {
    max-width: 100%;
    color: rgba(255, 255, 255, 0.78);
  }

  .claudify-hero__btn {
    padding: 15px 28px;
  }

  .claudify-hero__scroll {
    display: none;
  }
}

/* Landscape phones — cap hero so it doesn't overflow a short screen */
@media screen and (max-width: 749px) and (orientation: landscape) {
  .claudify-hero {
    min-height: 100vh;
    min-height: 100svh; /* fallback before the frozen viewport unit is available */
    min-height: calc(var(--cl-hero-vh, 1svh) * 100);
  }
}

/* Hero text entrance is handled by the shared motion preset
   (assets/claudify-motion.css + snippets/claudify-reveal.liquid):
   the .cl-reveal elements fade + rise in reading order. Being above
   the fold, the hero reveals on load. */
