/* ==========================================================================
   hero.css  -  everything that sits on top of a hero image
   = header.css (hero positioning, .site-title/.site-subtitle)
   + typed.css (typed-text component, bugs fixed)
   + frontpage.css (.teaser__content centring)
   NOT merged: hero-fade.css stays its own on-demand library (.hero-text).
   ========================================================================== */

/* ---- Frontpage teaser content (from frontpage.css) ---- */
.path-frontpage .container.teaser__content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 80%;
    text-align: center;
    overflow-y: hidden;
/*    animation-name: xv-appear-2;
    animation-duration: 5s;
    animation-timing-function: ease-in-out;*/
	font-size: 1.2rem;
    z-index: 3;
}

/* ---- Hero positioning + titles (from header.css) ---- */
/* ===============================
   HERO CONTENT POSITIONING
   Usage: <div class="hero-content hero-x-center hero-y-middle"> ... </div>
================================= */

/* The hero itself must be a positioning context */
.hero {
  position: relative;
}

/* Overlay layer that fills the hero */
.hero-content {
  position: absolute;
  inset: 0;
  z-index: 10;

  display: flex;
  flex-direction: column;   /* vertical axis = main axis */
  padding: var(--hero-padding, 2rem);
  box-sizing: border-box;
  pointer-events: none;     /* let clicks pass through empty space */

  /* defaults */
  align-items: center;      /* horizontal */
  justify-content: center;  /* vertical */
  text-align: center;
}

.hero-content > * {
  pointer-events: auto;     /* but keep children interactive */
  max-width: 100%;
}

/* ---------- Horizontal ---------- */
.hero-x-left   { align-items: flex-start; text-align: left; }
.hero-x-center { align-items: center;     text-align: center; }
.hero-x-right  { align-items: flex-end;   text-align: right; }

/* ---------- Vertical ---------- */
.hero-y-top    { justify-content: flex-start; }
.hero-y-middle { justify-content: center; }
.hero-y-bottom { justify-content: flex-end; }

/* ---------- Left/right variants: 40% width on desktop ---------- */
@media (min-width: 769px) {
  .hero-x-left > *:not(img):not(svg),
  .hero-x-right > *:not(img):not(svg) {
    width: 40%;
    max-width: 40%;
    box-sizing: border-box;
  }

  /* Left: box hugs the left edge, text starts from the left */
  .hero-x-left > *:not(img):not(svg) {
    align-self: flex-start;
    text-align: left;
    padding-right: 2rem;
  }

  /* Right: box hugs the right edge, text starts from the right */
  .hero-x-right > *:not(img):not(svg) {
    align-self: flex-end;
    text-align: right;
    padding-left: 2rem;
  }
}

/* ---------- Contained width (replaces .hero-inner) ---------- */
.hero-content--contained {
  max-width: 1200px /*var(--container-max)*/;
  margin: 0 auto;
  width: 100%;
  left: 0;
  right: 0;
}

/* ---------- SVG / image logos ---------- */
.hero-content img,
.hero-content svg {
  max-width: var(--hero-logo-width, 300px);
  width: 100%;
  height: auto;
  transition: transform 500ms;
  border-radius: var(--radius-lg);
}

.hero-content img:hover,
.hero-content svg:hover {
  transform: scale(1.05);
}

/* Smaller logo variant for inner pages */
.hero-content--inner img,
.hero-content--inner svg {
  --hero-logo-width: 200px;
}

/* ---------- Text blocks (animated or not) ---------- */
.hero-content .hero-title,
.hero-content .title-block {
  margin: 0;
  /* keep your existing animation classes/keyframes on this element */
}

/* ---------- Mobile: optional override ---------- */
@media (max-width: 768px) {
  .hero-content { padding: 1rem; }

  .hero-content img,
  .hero-content svg {
    max-width: min(var(--hero-logo-width, 300px), 70vw);
  }

  /* Force centring on small screens if you want it */
  .hero-mobile-center {
    align-items: center;
    text-align: center;
  }
}

.site-title {
  display: block;
  font-size: 3.5rem;
  font-weight: 700;
  text-transform: uppercase;
  font-family: var(--font-heading);
  color: var(--color-text-inverse) !important;
  text-shadow: var(--shadow-text);
}

.site-subtitle {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 500;
  text-transform: uppercase;
  font-family: var(--font-heading);
  color: var(--color-text-inverse);
  text-shadow: var(--shadow-text);
}

/* ---- Typed text component (from typed.css) ---- */
.typed-component { position: relative; }
.typed-strings   { display: none; }
.js-typed        { display: inline; color: var(--color-text-inverse); } /* was invalid "font-color" */
.js-typed sup    { font-size: 40%; }

.typed-cursor {
  display: inline;
  margin-left: .05em;
  opacity: 1;
  animation: typed-cursor-blink .7s infinite;
}
@keyframes typed-cursor-blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }

h1.typed {
  font-family: var(--font-body);
  font-size: 2.5rem;
  font-weight: var(--fw-medium);
  color: var(--color-text-inverse) !important;
  text-align: center;
  margin: 0 10px;
  text-transform: capitalize;
}
/* was "h1 .typed .left" (descendant .typed, never matched h1.typed) */
h1.typed .left {
  font-family: var(--font-body);
  font-weight: var(--fw-medium);
  color: var(--color-text-inverse);
  text-align: center;
  margin: 0 10px;
  text-transform: uppercase;
}

@media (prefers-reduced-motion: reduce) { .typed-cursor { animation: none; } }
