/* ==========================================================================
   Brand Variables
   ========================================================================== */

:root {
  --csx-navy: #12335F;
  --csx-orange: #E19D46;
  --csx-cream: #fae9d4;
}


/* ==========================================================================
   Base Styles
   ========================================================================== */

html {
  scroll-behavior: smooth;
  scroll-padding-top: 1rem;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--csx-navy);
  background: var(--csx-cream);
}

.container {
  max-width: 1170px;
  padding-inline: 24px;
}


/* ==========================================================================
   Skip Link
   ========================================================================== */

.skip-link {
  position: absolute;
  z-index: 1100;
  background: #fff;
  padding: 14px;
  color: var(--csx-navy);
}


/* ==========================================================================
   Header and Navigation
   ========================================================================== */

.site-header {
  background: var(--csx-navy);
  border-bottom: 9px solid #fff;
}

.navbar {
  min-height: 56px;
  gap: 28px;
}

.navbar-collapse {
  flex-grow: 1;
}

.navbar .nav-link {
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  border: 0;
  background: none;
}

.navbar .nav-link:hover,
.navbar .nav-link:focus-visible {
  color: #ffb541;
  text-decoration: underline;
  text-underline-offset: 6px;
}

.navbar-brand {
  margin: 0 8px 0 0;
}

.header-logo {
  width:100%
  max-width: 100%;
  height: auto;
}

/* ==========================================================================
   Anniversary Mark
   ========================================================================== */

.anniversary-mark {
  position: relative;
  display: block;
  width: 102px;
  font-size: 64px;
  line-height: 1;
  font-weight: 1000;
  letter-spacing: -10px;
  font-style: italic;
  color: #fff;
}

.anniversary-mark img {
  position: absolute;
  width: 49px;
  height: auto;
  top: 23px;
  left: 29px;
  background: var(--csx-navy);
  padding: 1px;
}


/* ==========================================================================
   Buttons
   ========================================================================== */

.btn-csx {
  background: #ff9f08;
  color: #fff;
  font-weight: 700;
  border-radius: 3px;
  padding: 10px 31px;
  border: 2px solid transparent;
}

.btn-csx:hover,
.btn-csx:focus-visible {
  background: #ffb541;
  color: #002e55;
  border-color: #fff;
}


/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  overflow: hidden;
  background: #08617d;
}


/* ==========================================================================
   About Section
   ========================================================================== */

.about-section {
  padding: 0 0 74px;
}

.about-layout {
  position: relative;
  margin-top: -52px;
}


/* ==========================================================================
   Story Panel
   ========================================================================== */

.story-panel {
  position: relative;
  z-index: 1;
  background: var(--csx-navy);
  color: white;
  padding: 54px 64px 64px;
  border-radius: 22px;
  box-shadow: 0 3px 5px #0003;

}

.story-panel h1 {
  font-size: clamp(30px, 6vw, 72px);
  line-height: 1.1;
  letter-spacing: -1px;
  font-weight: 400;
  margin: 0 0 46px;
  white-space: nowrap;
}

.story-panel h1 strong {
  display: block;
  color: var(--csx-orange);
  margin-top: 7px;
  letter-spacing: -0.8px;
}

.story-copy {
  font-size: 20px;
  line-height: 1.5;
}

.story-copy p {
  margin-bottom: 22px;
}

.closing-line {
  border-top: 1px solid var(--csx-orange);
  margin: 43px 0 0;
  padding-top: 43px;
  color: var(--csx-orange);
  font-size: 42px;
  font-weight: 700;
  font-style: italic;
  white-space: nowrap;
}


/* ==========================================================================
   Anniversary Poster
   ========================================================================== */

.poster-column {
  position: relative;
  z-index: 2;
  padding-top: 340px;
  margin-left: -40px;
  width: calc(41.666667% + 40px);
}

.anniversary-poster {
  margin: 0;
  box-shadow: 0 3px 8px #0004;
  background: var(--csx-cream);
}

.anniversary-poster img {
  display: block;
  width: 100%;
  height: auto;
}


/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: var(--csx-navy);
  padding: 67px 0 65px;
  color: #fff;
}

a {
  color:#fff;
}

.footer-logo {
  width: 200px;
  max-width: 100%;
  height: auto;
}

.social-links {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 30px;
  margin-bottom: 28px;
}

.social-links a {
  color: #fff;
  display: inline-flex;
  padding: 3px;
}

.social-links svg {
  width: 29px;
  height: 29px;
  /*fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linejoin: round;*/
}

.social-links a:hover {
  /*color: var(--csx-navy);*/
  opacity: .9;
}

.footer-legal {
  font-size: 16px;
  margin: 0;
}

.footer-legal button {
  border: 0;
  background: none;
  padding: 0;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}


/* ==========================================================================
   Keyboard Focus
   ========================================================================== */

a:focus-visible,
button:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 5px;
}


/* ==========================================================================
   Modal Overrides
   ========================================================================== */

.modal-content {
  border: 0;
  border-radius: 10px;
}

.modal-header {
  background: var(--csx-cream);
}

.modal-body {
  padding: 28px;
  line-height: 1.6;
}

.modal .btn-csx {
  color: var(--csx-navy);
}


/* ==========================================================================
   Large Desktop — 1500px and Above
   ========================================================================== */

@media (min-width: 1500px) {
  .container {
    max-width: 1360px;
  }


}


/* ==========================================================================
   Small Desktop — 1199px and Below
   ========================================================================== */

@media (max-width: 1199px) {
  .story-panel {
    padding: 48px 42px 58px;
    min-height: 0;
  }

  .story-panel h1 {
    font-size: 34px;
  }

  .story-copy {
    font-size: 18px;
  }

  .closing-line {
    font-size: 24px;
  }

  .poster-column {
    padding-top: 280px;
    margin-left: -24px;
    width: calc(41.666667% + 24px);
  }
}


/* ==========================================================================
   Tablet — 991px and Below
   ========================================================================== */

@media (max-width: 991px) {
  .container {
    max-width: 860px;
  }

  .navbar {
    min-height: 82px;
    gap: 18px;
  }

  /* Override Bootstrap gap utilities. */
  .navbar-nav {
    gap: 22px !important;
  }

  .story-panel {
    padding: 48px;
  }

  .story-panel h1 {
    font-size: 38px;
    white-space: normal;
  }

  .poster-column {
    width: 66%;
    margin: 36px auto 0;
    padding-top: 0;
  }

  .about-layout {
    margin-top: -18px;
  }

  .closing-line {
    white-space: normal;
  }

  .about-section {
    padding-bottom: 50px;
  }

  .site-footer {
    padding-block: 44px;
  }

  .social-links {
    gap: 20px;
  }

  .footer-logo {
    width: 210px;
  }
}


/* ==========================================================================
   Mobile — 767px and Below
   ========================================================================== */

@media (max-width: 767px) {
  .navbar {
    padding-block: 14px;
    min-height: 76px;
    justify-content: space-between;
  }

  .anniversary-mark {
    font-size: 52px;
    width: 86px;
  }

  .anniversary-mark img {
    width: 42px;
    left: 24px;
    top: 19px;
  }

  .navbar-collapse {
    padding: 12px 0;
  }

  .navbar .nav-link {
    padding: 12px 0;
  }

  .about-layout {
    margin-top: -24px;
  }

  .story-panel {
    padding: 34px 28px 38px;
    border-radius: 16px;
  }

  .story-panel h1 {
    font-size: 30px;
    letter-spacing: -0.7px;
    margin-bottom: 28px;
  }

  .story-copy {
    font-size: 17px;
    line-height: 1.55;
  }

  .closing-line {
    margin-top: 28px;
    padding-top: 28px;
    font-size: 23px;
  }

  .poster-column {
    width: 90%;
    margin-top: 28px;
  }

  .site-footer {
    text-align: center;
  }

  .footer-logo {
    width: 190px;
  }

  .social-links {
    justify-content: center;
    margin: 12px 0 24px;
    gap: 25px;
  }

  .footer-legal {
    font-size: 14px;
  }
}


/* ==========================================================================
   Reduced Motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .collapsing,
  .modal.fade .modal-dialog {
    transition: none;
  }
}

/* ==========================================================================
   Layered Image Hero
   ========================================================================== */

.csx-animated-hero {
  /* Adjust these values to position and size your artwork. */
  --hero-aspect-ratio: 9 / 5;
  --hero-train-width: 24%;
  --hero-train-bottom: 10%;
  --hero-logo-width: 32%;
  --hero-logo-top: 8%;

  position: relative;
  isolation: isolate;
  overflow: hidden;
  aspect-ratio: var(--hero-aspect-ratio);
  background: #17647e;
}

/* Shared layer positioning */
.csx-animated-hero .hero-layer {
  position: absolute;
  margin: 0;
  pointer-events: none;
}

.csx-animated-hero .hero-layer img {
  display: block;
  width: 100%;
  height: auto;
}


/* ==========================================================================
   Clouds — Behind the Scene
   ========================================================================== */

.csx-animated-hero .hero-clouds {
  z-index: 1;
  inset: 0;

  inset: 0 -10%;
  width: auto;
}

.csx-animated-hero .hero-clouds img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.csx-animated-hero.playing .hero-clouds {
  animation: csx-cloud-drift 60s linear both;
  animation-delay:0s;
}






/* ==========================================================================
   Stationary Scene
   ========================================================================== */

.csx-animated-hero .hero-background {
  z-index: 2;
  inset: 0;
}

.csx-animated-hero .hero-background img {
  height: 100%;
  object-fit: cover;
}


/* ==========================================================================
   Center Locomotive
   ========================================================================== */

.csx-animated-hero .hero-train {
  z-index: 3;


  /* Position the wrapper; animate its image separately. */

}

.csx-animated-hero .hero-train img {

}

.csx-animated-hero.playing .hero-train img {
  animation:
    csx-train-approach 3s cubic-bezier(0.25, 0.55, 0.45, 1) both;
}


/* ==========================================================================
   Logo
   ========================================================================== */

.csx-animated-hero .hero-title {
  z-index: 4;

}

.csx-animated-hero.playing .hero-title {
  animation: csx-title-reveal 1.2s ease-out 3.15s both;
}

.csx-animated-hero {
  /* Starting position — adjust these to match the background train */
  --train-start-x: 0%;
  --train-start-y: 5%;
  --train-start-scale: .775;
}

.csx-animated-hero.playing .hero-train img {
  /*animation-play-state: paused;*/
  animation-delay: 1.5s;
}


/* ==========================================================================
   Animation Keyframes
   ========================================================================== */

@keyframes csx-cloud-drift {
  from {
    transform: translateX(-5%);
  }

  to {
    transform: translateX(5%);
  }
}

@keyframes csx-train-approach {
  from {
    transform:
      translate(
        var(--train-start-x),
        var(--train-start-y)
      )
      scale(var(--train-start-scale));
  }

  to {
    transform: translate(0, 0) scale(1);
  }
}

@keyframes csx-title-reveal {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}


/* ==========================================================================
   Reduced Motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  .csx-animated-hero.playing .hero-clouds,
  .csx-animated-hero.playing .hero-train img,
  .csx-animated-hero.playing .hero-title {
    animation: none;
  }
}


/* ==========================================
   Poster scroll reveal
   JavaScript adds .is-visible when the
   closing line enters the viewport.
   ========================================== */

.anniversary-poster, .story-panel, .story-copy, .closing-line {
  /* Animation settings */
  --poster-reveal-duration: 800ms;
  --poster-reveal-distance: 30px;
  --poster-reveal-easing: ease;

  /* Hidden state — preserves layout space */
  opacity: 0;
  transform: translateY(var(--poster-reveal-distance));

  transition:
    opacity var(--poster-reveal-duration) var(--poster-reveal-easing),
    transform var(--poster-reveal-duration) var(--poster-reveal-easing);
}

/* Visible state */
.anniversary-poster.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.story-panel.is-visible, .story-copy.is-visible, .closing-line.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
  .anniversary-poster, .story-panel, .story-copy, .closing-line {
    transform: none;
    transition: none;
  }
}
