/* =========================================================
   HOME: Text block + left orange line aligned to page stop X
   X is the same as pager JS: left:"15%"
   ========================================================= */

:root {
  --home-stop-x: 15%;
  --home-bottom: clamp(28px, 7vh, 96px);
  --home-maxw: min(760px, 68%);
  --home-gutter: clamp(14px, 1.2vw, 20px);
  --home-h1-gap: clamp(6px, 0.9vh, 12px);

  --home-accent: #af473c;
}

/* 1) Ensure home pageheader is a positioning context */
.home .pageheader {
  position: relative;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  background-image: url(../img/intro.gif);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center center;
  overflow: hidden;
  margin: 0;
  padding: 0;
}

/* 2) The anchor container aligns to the same stop edge as your sliding pages */
.home .pageheader .home-anchor {
  position: absolute;
  z-index: 5;
  left: var(--home-stop-x);
  bottom: var(--home-bottom);
  max-width: var(--home-maxw);
  padding-left: var(--home-gutter);

  /* Set base colour once; children inherit */
  color: #fff;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.55);
}

/* 3) Orange line: exactly matches the height of the anchor content */
.home .pageheader .home-anchor::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  bottom: 2px; /* keeps it optically tight to the text block */
  width: 3px;
  border-radius: 2px;

  background: linear-gradient(
    to bottom,
    rgba(255, 76, 0, 0.18),
    rgba(255, 76, 0, 0.95),
    rgba(255, 76, 0, 0.18)
  );
  box-shadow: 0 0 16px rgba(255, 76, 0, 0.18);
}

/* 4) Text animation: ONLY the copy moves (line stays fixed) */
.home .pageheader .home-anchor .home-copy {
  opacity: 0;
  transform: translateY(22px);
  animation: homeDockUp 650ms cubic-bezier(0.2, 0.9, 0.2, 1) forwards;
  animation-delay: 120ms;
  will-change: transform, opacity;
}

@keyframes homeDockUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 5) Typography */
.home .pageheader .home-anchor h1 {
  margin: 0 0 var(--home-h1-gap) 0;
  font-weight: 650;
  letter-spacing: 0.8px;
  line-height: 1.03;
  font-size: clamp(24px, 3vw, 46px);
  text-transform: none; /* keep sentence-case for title */

  text-shadow:
    0 2px 18px rgba(0, 0, 0, 0.55),
    0 0 18px rgba(255, 76, 0, 0.18);
}

.home .pageheader .home-anchor h1 em {
  font-style: oblique 10deg;
}

/* scoped accent */
.home .pageheader .home-anchor .accent {
  color: var(--home-accent);
}

/* supporting text */
.home .pageheader .home-anchor p {
  margin: 0;
  max-width: 60ch;
  font-size: clamp(14px, 1.35vw, 18px);
  line-height: 1.42;
  color: rgba(255, 255, 255, 0.9);
}
/* Height tuning */
@media (max-height: 720px) {
  :root {
    --home-bottom: clamp(18px, 5vh, 60px);
  }
}

@media (min-height: 1000px) {
  :root {
    --home-bottom: clamp(40px, 8vh, 120px);
  }
}

/* Mobile: pages go full-width, sidebar hidden */
@media (max-width: 991px) {
  :root {
    --home-stop-x: 12px;
    --home-maxw: none;
    --home-bottom: 18px;
  }
  .home .pageheader .home-anchor {
    right: 12px;
  }
  .home .pageheader .home-anchor p {
    max-width: none;
  }
}

/* Accessibility: respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .home .pageheader .home-anchor .home-copy {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}