/* ==========================================================================
   Hero
   Dark graphite ground, gold spark accent. The rail graphic at the base
   of the hero is the same conductor that runs through the pillars section —
   visually it "hands off" as the user scrolls.
   ========================================================================== */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--color-graphite);
  color: var(--color-text-inverse);
  overflow: hidden;
  padding-block-start: var(--header-height);
}

/* Faint drafting-grid backdrop — evokes a drawing office, not decoration */
/* ---- Background photo: barely-visible Ken Burns layer ----
   Sits behind the drafting grid and the gradient overlay so text
   stays legible; the photo just adds texture, not contrast. */
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.hero__bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.14;
  transform: scale(1.05);
  animation: hero-ken-burns 22s ease-in-out infinite alternate;
}

.hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    rgba(26, 29, 33, 0.96) 0%,
    rgba(26, 29, 33, 0.82) 45%,
    rgba(26, 29, 33, 0.55) 100%
  );
}

@keyframes hero-ken-burns {
  from { transform: scale(1.0) translate(0, 0); }
  to   { transform: scale(1.12) translate(-1.5%, -1%); }
}

@media (prefers-reduced-motion: reduce) {
  .hero__bg-img { animation: none; transform: scale(1.05); }
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image:
    linear-gradient(rgba(246, 244, 240, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(246, 244, 240, 0.045) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 60% 30%, black 0%, transparent 70%);
  pointer-events: none;
}

.hero__inner {
  position: relative;
  z-index: 1;
  max-width: 780px;
}

.hero__eyebrow {
  color: var(--color-gold);
}

.hero__title {
  margin-block-start: var(--space-2);
  font-size: var(--text-2xl);
  font-weight: 600;
  color: var(--color-white);
}

.hero__title em {
  font-style: normal;
  color: var(--color-gold);
}

.hero__lead {
  margin-block-start: var(--space-3);
  max-width: 52ch;
  font-size: var(--text-md);
  color: rgba(246, 244, 240, 0.75);
  line-height: var(--leading-normal);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-block-start: var(--space-4);
}

/* ---- Signature rail graphic ---- */
.hero__rail {
  position: relative;
  z-index: 1;
  margin-block-start: var(--space-7);
  width: 100%;
}

.hero__rail svg { width: 100%; height: auto; display: block; }

.rail-line {
  fill: none;
  stroke: rgba(246, 244, 240, 0.18);
  stroke-width: 2;
}

.rail-pulse {
  fill: none;
  stroke: var(--color-gold);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 120 900;
  stroke-dashoffset: 0;
  animation: rail-travel 4.5s linear infinite;
  filter: drop-shadow(0 0 4px rgba(242, 169, 0, 0.65));
}

.rail-node {
  fill: var(--color-graphite);
  stroke: rgba(246, 244, 240, 0.35);
  stroke-width: 2;
}

@keyframes rail-travel {
  from { stroke-dashoffset: 0; }
  to   { stroke-dashoffset: -1020; }
}

@media (prefers-reduced-motion: reduce) {
  .rail-pulse { animation: none; stroke-dashoffset: 0; }
}

@media (max-width: 640px) {
  .hero__title { max-width: 22ch; }
}
