﻿/* ============================================
   V-HERO - Freysta Signature Hero
   ============================================ */
.v-hero {
  position: relative;
  height: 100vh;
  height: 100dvh;
  min-height: 500px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--color-dark-panel);
}

/* No full-cover overlay — hero image shown at full clarity.
   The placard (.v-hero-signature) has its own local backdrop. */

.v-hero-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--v-hero-object-position, center);
}

@media (hover: hover) and (min-width: 769px) {
  .v-hero-media {
    animation: kenBurns 25s ease-in-out infinite alternate;
  }
}

.v-hero-logo-link {
  position: absolute;
  top: clamp(90px, 8vw, 110px);
  left: var(--space-4xl);
  z-index: 3;
  transition: opacity 0.3s var(--ease-out-quart);
}

.v-hero-logo-link:hover {
  opacity: 0.85;
}

.v-hero-logo {
  width: clamp(64px, 8vw, 120px);
  height: auto;
  filter: drop-shadow(0 6px 16px rgba(10, 22, 40, 0.5));
  object-fit: contain;
  object-position: center;
}

@media (max-width: 1024px) {
  .v-hero-logo-link {
    top: 90px;
  }

  .v-hero-logo {
    width: clamp(72px, 10vw, 110px);
  }
}

@media (max-width: 720px) {
  .v-hero-logo-link {
    top: 86px;
    left: var(--space-lg);
  }

  .v-hero-logo {
    width: clamp(64px, 18vw, 100px);
  }
}

@keyframes kenBurns {
  from { transform: scale(1) translateY(var(--parallax-y, 0)); }
  to   { transform: scale(1.12) translateY(var(--parallax-y, 0)); }
}

/* Editorial placard - magazine panel, not UI card. */
.v-hero-signature {
  position: relative;
  z-index: 2;
  max-width: 85%;
  margin: 0 0 var(--space-4xl) var(--space-4xl);
  padding: 56px 48px 36px;
  background: linear-gradient(
    to top,
    rgba(36, 61, 79, 0.72) 0%,
    rgba(36, 61, 79, 0.50) 40%,
    rgba(36, 61, 79, 0.20) 80%,
    transparent 100%
  );
  backdrop-filter: blur(2px);
  border-left: 2px solid rgba(250, 248, 245, 0.35);
  box-shadow: -4px 0 12px rgba(10, 22, 40, 0.28),
              -1px 0  4px rgba(10, 22, 40, 0.45);
  border-radius: var(--radius-lg);
}

@keyframes signatureReveal {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .v-hero-badges,
  .v-hero-meta,
  .v-hero-title,
  .v-hero-word,
  .v-hero-media {
    animation: none;
    opacity: 1;
    transform: none;
    filter: none;
  }
}

/* Region metadata */
.v-hero-meta {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(250, 248, 245, 0.22);
  opacity: 0;
  animation: signatureReveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.35s both;
}

.v-hero-region {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(250, 248, 245, 0.65);
}

/* Village name — shrinks to fit container, line-break only as last resort */
.v-hero-title {
  font-family: 'Glacial Indifference', var(--font-display), sans-serif;
  font-size: clamp(3.5rem, 11vw, 13rem);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 0.88;
  color: var(--color-warm-white);
  margin-bottom: 20px;
  text-shadow: 0 2px 24px rgba(10, 22, 40, 0.35);
  opacity: 0;
  animation: signatureReveal 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.5s both;
  overflow-wrap: break-word;
  max-width: 100%;
}

.v-hero-title__first {
  display: inline-block;
  white-space: nowrap;
}

.v-hero-title.is-long {
  font-size: clamp(3.2rem, 9.8vw, 10.8rem);
  letter-spacing: 0.045em;
  max-width: min(100%, 18ch);
  line-height: 0.96;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.v-hero-title.is-very-long {
  font-size: clamp(2.9rem, 8.8vw, 9.4rem);
  letter-spacing: 0.04em;
  max-width: min(100%, 16ch);
  line-height: 0.98;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.v-hero-title.is-mega-long {
  font-size: clamp(2.5rem, 8vw, 8rem);
  letter-spacing: 0.035em;
  max-width: min(100%, 14ch);
  line-height: 1.02;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

/* Tagline */
.v-hero-tagline {
  font-family: 'Glacial Indifference', var(--font-display), sans-serif;
  font-size: 1.6rem;
  font-weight: 400;
  font-style: italic;
  line-height: 1.4;
  color: rgba(250, 248, 245, 0.7);
  letter-spacing: -0.01em;
}

.v-hero-word {
  display: inline-block;
  opacity: 0;
  filter: blur(4px);
  animation: wordReveal 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: calc(0.7s + var(--word-i) * 0.12s);
  margin-right: 0.35rem;
}

.v-hero-word:last-child {
  margin-right: 0;
}

.v-hero[data-village-slug="tomrefjord"] .v-hero-word {
  opacity: 1;
  filter: none;
  transform: none;
  animation: none;
}

@keyframes wordReveal {
  from {
    opacity: 0;
    filter: blur(4px);
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
  }
}

/* Badges */
.v-hero-badges {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
  opacity: 0;
  animation: signatureReveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

.v-hero-badges.is-hidden {
  display: none;
}

.v-hero-badges img {
  width: 62px;
  height: 62px;
  object-fit: contain;
  filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.4));
  opacity: 0.95;
}

.v-badge-municipality {
  filter: brightness(1.2) drop-shadow(0 1px 3px rgba(0, 0, 0, 0.3));
}

@media (max-width: 768px) {
  .v-hero {
    min-height: 480px;
  }

  .v-hero-signature {
    max-width: none;
    padding: 40px 20px 20px;
    margin: 0 14px 18px;
    background: linear-gradient(
      to top,
      rgba(36, 61, 79, 0.78) 0%,
      rgba(36, 61, 79, 0.50) 60%,
      rgba(36, 61, 79, 0.15) 100%
    );
    backdrop-filter: blur(2px);
  }

  .v-hero-title {
    font-size: clamp(3rem, 11vw, 7rem);
  }

  .v-hero-title.is-long {
    font-size: clamp(2.8rem, 10.4vw, 6.4rem);
    max-width: min(100%, 18ch);
    line-height: 1.02;
  }

  .v-hero-title.is-very-long {
    font-size: clamp(2.5rem, 9.6vw, 5.8rem);
    max-width: min(100%, 16ch);
    line-height: 1.05;
  }

  .v-hero-title.is-mega-long {
    font-size: clamp(2.3rem, 8.8vw, 5.2rem);
    max-width: min(100%, 14ch);
    line-height: 1.08;
  }

  .v-hero-tagline {
    font-size: 1.3rem;
  }

  .v-hero-badges img {
    width: 44px;
    height: 44px;
  }

  .v-hero-word {
    filter: none;
    animation: signatureReveal 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: calc(0.5s + var(--word-i) * 0.08s);
  }
}

@media (max-height: 820px) and (min-width: 769px) {
  .v-hero-signature {
    max-width: 85%;
    padding: 30px 30px 22px;
    margin: 0 0 var(--space-2xl) var(--space-3xl);
  }

  .v-hero-title {
    font-size: clamp(3.5rem, 11vw, 8.5rem);
    margin-bottom: 12px;
  }

  .v-hero-title.is-long {
    font-size: clamp(3.1rem, 10.2vw, 7.6rem);
    max-width: min(100%, 18ch);
    line-height: 0.98;
  }

  .v-hero-title.is-very-long {
    font-size: clamp(2.8rem, 9.4vw, 6.8rem);
    max-width: min(100%, 16ch);
    line-height: 1.02;
  }

  .v-hero-title.is-mega-long {
    font-size: clamp(2.5rem, 8.8vw, 6.2rem);
    max-width: min(100%, 14ch);
    line-height: 1.06;
  }

  .v-hero-badges img {
    width: 46px;
    height: 46px;
  }

  .v-hero-tagline {
    font-size: 1.2rem;
  }

  .v-hero-badges {
    gap: 10px;
    margin-bottom: 18px;
  }

  .v-hero-meta {
    margin-bottom: 18px;
    padding-bottom: 14px;
  }

  .v-hero-region {
    font-size: 0.78rem;
    letter-spacing: 0.16em;
  }
}

@media (max-width: 480px) {
  .v-hero {
    min-height: 420px;
  }

  .v-hero-signature {
    margin: 0 var(--space-md) var(--space-lg) var(--space-md);
    padding: var(--space-lg) var(--space-md) var(--space-md);
  }

  .v-hero-title {
    font-size: clamp(2.4rem, 11vw, 5rem);
  }

  .v-hero-title.is-long {
    font-size: clamp(2.2rem, 10.4vw, 4.6rem);
    max-width: min(100%, 18ch);
    line-height: 1.06;
  }

  .v-hero-title.is-very-long {
    font-size: clamp(2rem, 9.8vw, 4.2rem);
    max-width: min(100%, 16ch);
    line-height: 1.1;
  }

  .v-hero-title.is-mega-long {
    font-size: clamp(1.9rem, 9.2vw, 3.9rem);
    max-width: min(100%, 14ch);
    line-height: 1.12;
  }

  .v-hero-tagline {
    font-size: 1.15rem;
  }

  .v-hero-badges img {
    width: 38px;
    height: 38px;
  }
}
