/*
 * Frisian Orchard — Module 2: Hero Section
 */

.fo-hero {
  display: flex;
  align-items: center;
  padding-top: var(--fo-header-height);
  padding-bottom: var(--fo-section-pad);
  background-color: var(--fo-bg-obsidian);
  position: relative;
  overflow: hidden;
}

.fo-hero:not(.fo-hero--content-width) {
  min-height: var(--fo-hero-min-height-mobile, 90dvh);
}

@media (min-width: 768px) {
  .fo-hero:not(.fo-hero--content-width) {
    min-height: var(--fo-hero-min-height-desktop, 100dvh);
  }
}

.fo-hero--content-width {
  min-height: auto;
}

.fo-hero--content-width.fo-hero--banner {
  overflow: visible;
}

.fo-hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background-color: var(--fo-bg-obsidian);
  background-image: var(--fo-hero-bg-image, none);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center center;
}

.fo-hero__media::after {
  content: '';
  position: absolute;
  inset: 0;
  background-color: var(--fo-bg-obsidian);
  opacity: var(--fo-hero-overlay, 0);
  pointer-events: none;
}

.fo-hero__media-img,
.fo-hero__media picture {
  display: block;
  width: 100%;
  height: 100%;
}

.fo-hero__media-img {
  object-fit: cover;
  object-position: center center;
}

/* ── Content-width banner stage ── */
.fo-hero--content-width.fo-hero--banner {
  min-height: auto;
  align-items: flex-start;
  padding-top: 0;
  padding-bottom: clamp(1.5rem, 4vh, 2.5rem);
}

.fo-hero--content-width .fo-hero__shell {
  width: var(--fo-container);
  max-width: 100%;
  margin-inline: auto;
  padding-inline: 0;
}

.fo-hero__stage {
  position: relative;
  width: 100%;
  margin: 0;
  overflow: hidden;
  border: none;
  border-radius: 0;
  box-shadow: none;
  background-color: var(--fo-bg-obsidian);
  aspect-ratio: 16 / 9;
}

.fo-hero--content-width.fo-hero--banner .fo-hero__stage {
  min-height: var(--fo-hero-min-height-mobile, auto);
}

@media (min-width: 768px) {
  .fo-hero--content-width.fo-hero--banner .fo-hero__stage {
    min-height: var(--fo-hero-min-height-desktop, auto);
  }
}

.fo-hero__stage .fo-hero__media {
  position: absolute;
  inset: 0;
  height: 100%;
  min-height: 100%;
}

.fo-hero__stage .fo-hero__media-img {
  object-fit: cover;
  object-position: 65% center;
}

.fo-hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  padding-top: var(--fo-header-height);
  pointer-events: none;
}

.fo-hero__overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(11, 17, 13, 0.88) 0%,
    rgba(11, 17, 13, 0.45) 42%,
    transparent 72%
  );
  pointer-events: none;
}

.fo-hero__copy {
  position: relative;
  z-index: 1;
  max-width: min(52%, 28rem);
  padding: clamp(1.25rem, 3vw, 2rem);
  pointer-events: auto;
}

.fo-hero__title--stage {
  font-size: clamp(1.875rem, 4vw, 3rem);
  line-height: 1.08;
  margin: 0 0 0.625rem;
}

.fo-hero__text--stage {
  font-size: clamp(0.875rem, 1.5vw, 1rem);
  line-height: 1.65;
  margin: 0 0 1.25rem;
  max-width: 36ch;
  color: rgba(255, 255, 255, 0.88);
}

.fo-hero__copy .fo-hero__subtitle {
  margin: 0 0 0.625rem;
}

.fo-hero__copy .fo-btn-group {
  margin-top: 0;
  position: relative;
  z-index: 3;
  pointer-events: auto;
}

.fo-hero__copy .fo-btn-group--hero {
  align-items: flex-start;
}

.fo-hero__copy .fo-btn-group--hero .fo-shimmer-btn,
.fo-hero__copy .fo-btn-group--hero .fo-ghost-btn {
  width: auto;
  max-width: 100%;
}

/* ── Standard / full-bleed ── */
.fo-hero--content-width:not(.fo-hero--banner) {
  min-height: var(--fo-hero-min-height-mobile, auto);
  align-items: flex-start;
  padding-top: calc(var(--fo-header-height) + clamp(1rem, 3vh, 2rem));
  padding-bottom: clamp(2rem, 6vh, 4rem);
}

@media (min-width: 768px) {
  .fo-hero--content-width:not(.fo-hero--banner) {
    min-height: var(--fo-hero-min-height-desktop, auto);
  }
}

.fo-hero--content-width.fo-hero--banner {
  min-height: auto;
}

.fo-hero__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
  width: var(--fo-container);
  margin-inline: auto;
}

.fo-hero--content-width:not(.fo-hero--banner) .fo-hero__grid {
  width: 100%;
  margin-inline: 0;
}

.fo-hero--banner {
  align-items: flex-end;
  padding-bottom: clamp(2rem, 6vh, 4rem);
}

.fo-hero--banner:not(.fo-hero--content-width) .fo-hero__media-img {
  object-position: 50% 42%;
}

.fo-hero--banner .fo-hero__grid {
  grid-template-columns: 1fr;
  align-items: flex-end;
}

.fo-hero--banner .fo-hero__content {
  max-width: min(36rem, 92vw);
}

@media (min-width: 768px) {
  .fo-hero:not(.fo-hero--banner) .fo-hero__grid {
    grid-template-columns: 55fr 45fr;
    gap: 2rem;
  }

  .fo-hero__copy .fo-btn-group--hero {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.875rem;
  }
}

.fo-hero__title {
  font-family: var(--fo-font-serif);
  font-weight: 300;
  font-size: clamp(2.75rem, 7vw, 5rem);
  line-height: 1.05;
  color: var(--fo-text-white);
  margin: 0 0 0.75rem;
}

.fo-hero__subtitle {
  font-family: var(--fo-font-sans);
  font-size: clamp(0.7rem, 1.5vw, 0.85rem);
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fo-gold-champagne);
  margin: 0 0 1.5rem;
}

.fo-hero__text {
  font-family: var(--fo-font-sans);
  font-size: clamp(0.95rem, 1.5vw, 1.05rem);
  line-height: 1.75;
  color: var(--fo-text-platinum);
  max-width: 42ch;
  margin: 0;
}

.fo-hero__visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 320px;
}

.fo-hero__visual::after {
  content: '';
  position: absolute;
  inset: 10% 0;
  background: radial-gradient(ellipse at center, rgba(197, 160, 89, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.fo-hero-tree {
  width: 100%;
  max-width: 420px;
  will-change: transform;
}

.fo-hero-tree svg {
  width: 100%;
  height: auto;
  display: block;
}

@keyframes fo-tree-pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

.fo-hero-tree .fo-tree-node {
  animation: fo-tree-pulse 3s ease-in-out infinite;
}

.fo-hero-tree .fo-tree-node:nth-child(2) { animation-delay: 0.5s; }
.fo-hero-tree .fo-tree-node:nth-child(3) { animation-delay: 1s; }
.fo-hero-tree .fo-tree-node:nth-child(4) { animation-delay: 1.5s; }
.fo-hero-tree .fo-tree-node:nth-child(5) { animation-delay: 2s; }

@media (max-width: 767px) {
  .fo-hero__visual {
    order: -1;
    min-height: 240px;
    opacity: 0.7;
  }

  .fo-hero-tree {
    max-width: 70%;
  }

  .fo-hero--content-width.fo-hero--banner {
    padding-top: 0;
    padding-bottom: 1.25rem;
  }

  .fo-hero--content-width .fo-hero__shell {
    width: calc(100% - 1.5rem);
    max-width: var(--fo-hero-max-width);
  }

  .fo-hero__stage {
    aspect-ratio: 3 / 4;
  }

  .fo-hero__stage .fo-hero__media-img {
    object-position: 58% 32%;
  }

  .fo-hero__overlay {
    align-items: flex-end;
    padding-top: calc(var(--fo-header-height) + 0.5rem);
  }

  .fo-hero__overlay::before {
    background: linear-gradient(
      to top,
      rgba(11, 17, 13, 0.92) 0%,
      rgba(11, 17, 13, 0.4) 45%,
      transparent 70%
    );
  }

  .fo-hero__copy {
    max-width: none;
    width: 100%;
    padding: 1rem 1rem 1.125rem;
  }

  .fo-hero__title--stage {
    font-size: clamp(1.5rem, 6.5vw, 2rem);
  }

  .fo-hero__text--stage {
    display: none;
  }

  .fo-hero__copy .fo-btn-group--hero,
  .fo-hero__content .fo-btn-group--hero {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
  }

  .fo-hero__copy .fo-btn-group--hero .fo-shimmer-btn,
  .fo-hero__copy .fo-btn-group--hero .fo-ghost-btn,
  .fo-hero__content .fo-btn-group--hero .fo-shimmer-btn,
  .fo-hero__content .fo-btn-group--hero .fo-ghost-btn {
    width: auto;
    flex: 0 1 auto;
    max-width: 100%;
    padding: 0.5rem 0.875rem;
    font-size: 0.6875rem;
    letter-spacing: 0.08em;
    line-height: 1.25;
    white-space: normal;
    justify-content: center;
    text-align: center;
  }

  .fo-hero--banner:not(.fo-hero--content-width) {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-height: auto;
    padding-top: var(--fo-header-height);
    padding-bottom: clamp(1.25rem, 4vh, 2rem);
  }

  .fo-hero--banner:not(.fo-hero--content-width) .fo-hero__media {
    position: relative;
    inset: auto;
    width: 100%;
    aspect-ratio: 4 / 5;
    max-height: min(72svh, 640px);
    margin-bottom: 1.25rem;
  }

  .fo-hero--banner:not(.fo-hero--content-width) .fo-hero__media-img {
    object-fit: contain;
    object-position: center top;
    height: 100%;
  }

  .fo-hero--banner:not(.fo-hero--content-width) .fo-hero__grid {
    width: 100%;
    padding-inline: max(4vw, 1rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .fo-hero-tree .fo-tree-node {
    animation: none;
    opacity: 0.8;
  }
}

html.fo-a11y-reduce-motion .fo-hero-tree .fo-tree-node {
  animation: none !important;
  opacity: 0.8;
}
