/* ==========================================================================
   BLOCK HP-1 — Hero Section
   Files: block-hp-1-hero.php | block-hp-1-hero.css
   ========================================================================== */

/* ── Shell ──────────────────────────────────────────────────────────────── */
.taula-hero {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* ── Background image ───────────────────────────────────────────────────── */
.taula-hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  will-change: transform; /* hint for smooth parallax if added later */
}

/* ── Dark overlay — ensures text readability over any photo ─────────────── */
.taula-hero__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.30);
  pointer-events: none;
}

/* ── Content wrapper ────────────────────────────────────────────────────── */
.taula-hero__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 32px;
  max-width: 960px;
  width: 100%;
}

/* ── Headline ───────────────────────────────────────────────────────────── */
.taula-hero__headline {
  font-family: var(--font-heading); /* Staatliches */
  font-size: 150px;
  font-weight: 400; /* Staatliches is naturally heavy */
  line-height: 0.92;
  letter-spacing: -0.01em;
  color: #ffffff;
  margin: 0;
  text-transform: uppercase;
}

/* ── CSS-driven language switching ─────────────────────────────────────── */
/*
   All three language spans are in the DOM. Only the active one is shown.
   html[data-taula-lang] is set server-side in front-page.php and updated
   client-side by window.setTaulaLang() in taula-lang.js.
*/

/* Hide all by default */
.taula-hero__lang {
  display: none;
}

/* Show only the active language */
html[data-taula-lang="CA"] .taula-hero__lang[data-lang="CA"],
html[data-taula-lang="ES"] .taula-hero__lang[data-lang="ES"],
html[data-taula-lang="EN"] .taula-hero__lang[data-lang="EN"] {
  display: inline; /* inline so it flows inside <h1> and <a> */
}

/* Fallback: if no lang is set on html, show EN */
html:not([data-taula-lang]) .taula-hero__lang[data-lang="EN"],
html[data-taula-lang=""] .taula-hero__lang[data-lang="EN"] {
  display: inline;
}

/* ── Responsive ─────────────────────────────────────────────────────────── */

/* Desktop — offset nav height so content doesn't bleed behind the fixed bar;
   widen content block so headline wraps to 3 lines instead of 4 */
@media (min-width: 901px) {
  .taula-hero {
    padding-top: 80px;
  }

  .taula-hero__content {
    max-width: 1440px;
  }

  .taula-hero__headline {
    font-size: 175px;
  }
}

/* Tablet */
@media (max-width: 900px) {
  .taula-hero__headline {
    font-size: 90px;
    line-height: 0.9;
  }
}

/* Mobile — everything visible before scroll */
@media (max-width: 600px) {
  .taula-hero__headline {
    font-size: 60px;
    line-height: 0.92;
  }

  .taula-hero__content {
    padding: 0 20px;
  }
}

/* Very small screens */
@media (max-width: 380px) {
  .taula-hero__headline {
    font-size: 50px;
  }
}
