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

.fo-hero {
  display: flex;
  align-items: center;
  padding-top: 62px;
  padding-bottom: var(--fo-section-pad);
  background-color: transparent;
  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;
  padding-bottom: 0;
}

.fo-hero__media {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  z-index: 0;
  width: min(100%, var(--fo-hero-max-width, 1500px));
  max-width: var(--fo-hero-max-width, 1500px);
  transform: translateX(-50%);
  overflow: hidden;
  background-color: var(--fo-bg-obsidian);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center center;
  box-shadow: var(--fo-section-bg-shadow, 0 4px 28px 14px rgba(33, 27, 19, 0.22), 0 10px 48px 22px rgba(33, 27, 19, 0.14));
}

.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-bottom: 0;
}

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

.fo-hero__stage {
  position: relative;
  width: 100%;
  margin: 0;
  overflow: hidden;
  border: none;
  border-radius: 0;
  box-shadow: var(--fo-section-bg-shadow, 0 4px 28px 14px rgba(33, 27, 19, 0.22), 0 10px 48px 22px rgba(33, 27, 19, 0.14));
  background-color: var(--fo-bg-obsidian);
  aspect-ratio: var(--fo-hero-aspect-w, 1500) / var(--fo-hero-aspect-h, 738);
}

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

.fo-hero__stage .fo-hero__media {
  position: absolute;
  inset: 0;
  left: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  min-height: 100%;
  transform: none;
  box-shadow: none;
}

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

.fo-hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  padding: clamp(1.25rem, 3vw, 2rem);
  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, 92px) + 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: min(100%, var(--fo-section-bg-max-width, 1500px));
  max-width: var(--fo-section-bg-max-width, 1500px);
  margin-inline: auto;
}

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

.fo-hero--banner:not(.fo-hero--content-width) {
  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__title-gold {
  background: var(--fo-gold-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.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-bottom: 0;
  }

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

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

  .fo-hero__overlay {
    align-items: flex-end;
    padding: 0 0 0;
  }

  .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, 92px);
    padding-bottom: clamp(1.25rem, 4vh, 2rem);
  }

  .fo-hero--banner:not(.fo-hero--content-width) .fo-hero__media {
    position: relative;
    top: auto;
    bottom: auto;
    left: auto;
    transform: none;
    width: min(100%, var(--fo-section-bg-max-width, 1500px));
    max-width: var(--fo-section-bg-max-width, 1500px);
    margin-inline: auto;
    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;
}

/* ── Vom Honigdorf: Gold dust + Hex frames + Trust ── */
.fo-hero--honigdorf {
  isolation: isolate;
  overflow: visible;
}

.fo-hero--honigdorf.fo-hero--content-width:not(.fo-hero--banner) {
  padding-bottom: 0;
}

.fo-hero__dust {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  z-index: 0;
  width: min(100%, var(--fo-section-bg-max-width, 1500px));
  max-width: var(--fo-section-bg-max-width, 1500px);
  transform: translateX(-50%);
  pointer-events: none;
  background:
    radial-gradient(ellipse 40% 30% at 75% 35%, rgba(var(--fo-gold-rgb), 0.14), transparent 70%),
    radial-gradient(ellipse 25% 20% at 20% 60%, rgba(var(--fo-gold-rgb), 0.08), transparent 65%);
  opacity: 0.9;
}

.fo-hero--honigdorf .fo-hero__shell {
  width: min(100%, var(--fo-section-bg-max-width, 1500px));
  max-width: var(--fo-section-bg-max-width, 1500px);
  margin-inline: auto;
}

.fo-hero--honigdorf .fo-hero__shell,
.fo-hero--honigdorf .fo-hero__grid {
  position: relative;
  z-index: 1;
}

.fo-hero__visual--hex {
  display: flex;
  align-items: center;
  justify-content: center;
}

.fo-hex-stack {
  position: relative;
  width: min(100%, 420px);
  aspect-ratio: 1 / 0.95;
}

.fo-hex-frame {
  position: absolute;
  overflow: hidden;
  clip-path: var(--fo-hex-clip);
  background: var(--fo-bg-charcoal);
  border: 1px solid var(--fo-glass-border);
}

.fo-hex-frame--primary {
  inset: 8% 12% 18% 0;
  z-index: 2;
}

.fo-hex-frame--secondary {
  inset: 38% 0 0 42%;
  z-index: 3;
  width: 52%;
  height: 58%;
}

.fo-hex-frame__img,
.fo-hex-frame__placeholder {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fo-hex-frame__placeholder {
  background: linear-gradient(145deg, var(--fo-bg-charcoal), var(--fo-bg-obsidian));
}

.fo-hero__trust {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  margin: 1.75rem 0 0;
  padding: 0;
  list-style: none;
}

.fo-hero__trust-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--fo-font-sans);
  font-size: 0.8125rem;
  font-weight: var(--fo-font-sans-weight);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fo-gold-champagne);
}

.fo-hero__trust-icon {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--fo-gold-gradient);
  box-shadow: 0 0 8px rgba(var(--fo-gold-rgb), 0.45);
}

@media (prefers-reduced-motion: reduce) {
  .fo-hero__dust {
    opacity: 0.5;
  }
}

/* Native page shell: one outer shadow, no per-hero card shadow */
.fo-main--native .fo-page-shell .fo-hero--content-width.fo-hero--banner {
  overflow: hidden;
}

.fo-main--native .fo-page-shell .fo-hero--content-width .fo-hero__shell {
  width: min(100%, var(--fo-hero-max-width, 1500px));
  max-width: var(--fo-hero-max-width, 1500px);
  margin-inline: auto;
}

.fo-main--native .fo-page-shell .fo-hero__media,
.fo-main--native .fo-page-shell .fo-hero__stage {
  left: 0;
  width: 100%;
  max-width: none;
  transform: none;
  box-shadow: none;
}
