/* Edworks hero. Expects these tokens on :root; adjust to the site's palette file. */
:root {
  --ew-cream: #F6EFDC;
  --ew-green: #1F4A2B;
  --ew-deep: #11261A;
  --ew-gold: #E9A825;
  --ew-font-display: 'Fraunces', Georgia, serif;
  --ew-font-body: 'Source Sans 3', system-ui, sans-serif;
}

/* Tall wrapper gives the pinned hero room to play out. 190vh = reveal runs over ~0.9 screens of scroll. */
.hero-stage {
  position: relative;
  height: 190vh;
  background: var(--ew-deep); /* safety: never show page background behind the pinned hero */
}

.hero {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100lvh; /* large viewport: matches the vh-based stage so no gap opens when the address bar hides */
  overflow: hidden;
  background: var(--ew-deep);
  color: var(--ew-cream);
}

.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Darkens the video as text comes in. Opacity driven by hero.js. */
.hero__shade {
  position: absolute;
  inset: 0;
  background: var(--ew-deep);
  opacity: 0;
  pointer-events: none;
}

/* Bottom gradient that blends into the next section. Opacity driven by hero.js. */
.hero__fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 35%;
  background: linear-gradient(to bottom, rgba(31, 74, 43, 0), var(--ew-green));
  opacity: 0;
  pointer-events: none;
}

.hero__copy {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 20px;
  gap: 20px;
}

.hero__title {
  margin: 0;
  font-family: var(--ew-font-display);
  font-weight: 700;
  font-size: clamp(64px, 18vw, 140px);
  line-height: 0.92;
  letter-spacing: -0.01em;
  text-shadow: 0 4px 28px rgba(0, 0, 0, 0.35);
}

.hero__line {
  display: block;
}

.hero__tagline {
  margin: 0;
  font-family: var(--ew-font-body);
  font-size: clamp(12px, 3.4vw, 20px);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ew-gold);
  line-height: 1.6;
}

.hero__ctas {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 320px;
}

@media (min-width: 720px) {
  .hero__ctas {
    flex-direction: row;
    width: auto;
    max-width: none;
  }
}

/* Initial hidden state for anything the script reveals. */
[data-hero-reveal] {
  opacity: 0;
  transform: translateY(44px);
  will-change: transform, opacity;
}

.hero__cue {
  position: absolute;
  left: 50%;
  bottom: calc(22px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: #B9C9AE;
  font-family: var(--ew-font-body);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  pointer-events: none;
}

.hero__cue svg {
  animation: hero-bob 1.6s ease-in-out infinite;
}

@keyframes hero-bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(5px); }
}

/* Buttons. Move to the global stylesheet if the site already has a button system. */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  padding: 0 28px;
  border-radius: 4px;
  font-family: var(--ew-font-body);
  font-weight: 600;
  font-size: 17px;
  text-decoration: none;
}

.btn--gold {
  background: var(--ew-gold);
  color: var(--ew-deep);
}

.btn--ghost {
  color: var(--ew-cream);
  border: 2px solid var(--ew-cream);
}

/* Reduced motion: show everything immediately, no pinned scroll, no animation. */
@media (prefers-reduced-motion: reduce) {
  .hero-stage { height: auto; }
  .hero { position: relative; }
  [data-hero-reveal] { opacity: 1; transform: none; }
  .hero__shade { opacity: 0.45; }
  .hero__fade { opacity: 1; }
  .hero__cue svg { animation: none; }
}

/* Static mode: headline shown immediately (Settings → Homepage). */
.hero-stage--static { height: auto; }
.hero-stage--static .hero { position: relative; }
.hero-stage--static [data-hero-reveal] { opacity: 1; transform: none; }
.hero-stage--static .hero__shade { opacity: 0.45; }
.hero-stage--static .hero__cue { display: none; }
