/* Turnstile ECU — professional responsive redesign */

:root {
  --bg: #f3f6fb;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-strong: #ffffff;
  --surface-dark: linear-gradient(135deg, #1f2d66 0%, #2d3d8a 100%);
  --line: rgba(30, 41, 59, 0.10);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #111827;
  --muted: #59657a;
  --brand: #2d3d8a;
  --brand-2: #4a5a9f;
  --brand-soft: rgba(45, 61, 138, 0.10);
  --success: #0f766e;
  --shadow: 0 20px 60px rgba(16, 24, 40, 0.10);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --max: 1380px;
  --header-h: 82px;
  --font-body: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(74, 90, 159, 0.16), transparent 28%),
    radial-gradient(circle at top right, rgba(45, 61, 138, 0.14), transparent 22%),
    var(--bg);
}

img {
  display: block;
  width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(16px);
  /* blue header per request */
  background: linear-gradient(90deg, var(--brand) 0%, var(--brand-2) 100%);
  color: #fff;
  border-bottom: 0;
}

.header-shell {
  max-width: var(--max);
  margin: 0 auto;
  min-height: var(--header-h);
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  font-size: 0.95rem;
}

.brand__logo {
  width: 34px;
  height: auto;
  display: inline-block;
}

.brand-mark {
  width: 13px;
  height: 13px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand-2), var(--brand));
  box-shadow: 0 0 0 6px var(--brand-soft);
}

.header-links {
  display: flex;
  align-items: center;
  gap: 22px;
}

.header-links a {
  color: var(--muted);
  font-size: 0.96rem;
  font-weight: 600;
}

.header-links a:hover {
  color: var(--brand);
}

.nav-toggle,
.mobile-close {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.nav-toggle {
  display: none;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow);
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  margin: 4px auto;
  border-radius: 999px;
}

.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(15, 23, 42, 0.36);
  backdrop-filter: blur(8px);
}

.mobile-nav-panel {
  margin-left: auto;
  width: min(88vw, 360px);
  min-height: 100%;
  background: rgba(255, 255, 255, 0.98);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: -30px 0 60px rgba(15, 23, 42, 0.16);
}

.mobile-close {
  align-self: flex-end;
  font-size: 2rem;
  line-height: 1;
  color: var(--muted);
}

.mobile-nav-panel a {
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--bg);
  font-weight: 700;
}

.page-shell {
  max-width: var(--max);
  margin: 0 auto;
  padding: 32px 28px 64px;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 32px;
}

.side-rail {
  position: static;
  top: auto;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.back-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  font-weight: 700;
  box-shadow: 0 12px 28px rgba(45, 61, 138, 0.25);
}

.back-icon {
  font-size: 1.1rem;
}

.section-nav {
  display: grid;
  gap: 10px;
  padding: 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.74);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(17, 24, 39, 0.06);
  box-shadow: var(--shadow);
}

.section-link {
  position: relative;
  display: block;
  padding: 11px 14px 11px 18px;
  border-radius: 14px;
  color: var(--muted);
  font-weight: 700;
  transition: 0.25s ease;
}

.section-link::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 4px;
  border-radius: 999px;
  background: transparent;
}

.section-link:hover,
.section-link.is-active {
  color: var(--brand);
  background: var(--brand-soft);
}

.section-link.is-active::before {
  background: var(--brand);
}

.content-shell {
  min-width: 0;
  display: grid;
  gap: 26px;
}

.hero-card,
.content-card,
.feature-band {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.hero-card,
.content-card {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.70);
  backdrop-filter: blur(20px);
}

.hero-card {
  padding: 28px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.9fr);
  gap: 28px;
  align-items: stretch;
}

.eyebrow {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--brand);
}

.eyebrow.light {
  color: rgba(255, 255, 255, 0.78);
}

.hero-copy h1,
.card-heading h2,
.feature-band h2 {
  margin: 0;
  font-family: var(--font-display);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.hero-copy h1 {
  font-size: clamp(2.5rem, 4vw, 4.5rem);
  max-width: 14ch;
}

.hero-subtitle {
  margin: 18px 0 12px;
  font-size: 1.18rem;
  font-weight: 700;
  color: var(--brand);
}

.hero-summary,
.rich-text,
.rich-text p,
.feature-band p {
  font-size: 1.05rem;
  line-height: 1.72;
  color: var(--muted);
}

.metric-row {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.metric-card,
.stats-panel {
  padding: 18px;
  border-radius: 20px;
  background: var(--surface-strong);
  border: 1px solid var(--line);
}

.metric-card strong,
.stats-panel strong {
  display: block;
  font-size: 1.8rem;
  font-family: var(--font-display);
  margin-bottom: 6px;
}

.metric-card span,
.stats-panel span {
  color: var(--muted);
  line-height: 1.45;
}

.quote-callout {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 24px;
  padding: 16px 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.64);
  border: 1px solid var(--line);
}

.quote-callout p {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

.quote-callout.inverse {
  background: rgba(255, 255, 255, 0.10);
  border-color: var(--line-strong);
}

.quote-callout.inverse p {
  color: #fff;
}

.quote-callout.large p {
  font-size: 1.6rem;
  font-family: var(--font-display);
}

.quote-bar {
  width: 4px;
  min-width: 4px;
  align-self: stretch;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--brand-2), var(--brand));
}

.hero-media {
  position: relative;
  min-height: 560px;
  border-radius: 26px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(45, 61, 138, 0.10), rgba(74, 90, 159, 0.14));
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-badge {
  position: absolute;
  right: 18px;
  bottom: 18px;
  max-width: 220px;
  padding: 18px 18px 16px;
  border-radius: 22px;
  color: #fff;
  background: rgba(15, 23, 42, 0.76);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.hero-badge span {
  display: block;
  font-size: 1.9rem;
  font-family: var(--font-display);
}

.hero-badge p {
  margin: 6px 0 0;
  line-height: 1.45;
}

.section-chips {
  display: none;
  gap: 10px;
  overflow: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.section-chips::-webkit-scrollbar {
  display: none;
}

.section-chips a {
  white-space: nowrap;
  padding: 12px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.80);
  border: 1px solid var(--line);
  color: var(--muted);
  font-weight: 700;
  box-shadow: var(--shadow);
}

.content-card {
  padding: 28px;
}

.card-heading {
  margin-bottom: 18px;
}

.card-heading h2,
.feature-band h2 {
  font-size: clamp(1.75rem, 2.3vw, 2.6rem);
  max-width: 16ch;
}

.card-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.95fr) minmax(0, 1fr);
  gap: 24px;
  align-items: center;
}

.card-grid.single {
  grid-template-columns: 1fr;
}

.media-panel {
  border-radius: 24px;
  overflow: hidden;
  min-height: 100%;
  background: #e5e7eb;
}

.media-panel img {
  height: 100%;
  min-height: 360px;
  object-fit: cover;
}

.rich-text p {
  margin: 0 0 14px;
}

.rich-text p:last-child {
  margin-bottom: 0;
}

.feature-list {
  margin: 16px 0;
  padding-left: 18px;
  color: var(--muted);
}

.feature-list li {
  margin-bottom: 12px;
  line-height: 1.65;
}

.feature-band {
  padding: 28px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 24px;
  align-items: center;
  color: #fff;
  background: var(--surface-dark);
}

.feature-band p {
  color: rgba(255, 255, 255, 0.88);
}

.feature-band-media {
  border-radius: 24px;
  overflow: hidden;
  min-height: 100%;
  box-shadow: 0 18px 42px rgba(11, 17, 35, 0.24);
}

.feature-band-media img {
  height: 100%;
  min-height: 420px;
  object-fit: cover;
}

.gallery-row {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
}

.gallery-card {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.70);
  border: 1px solid rgba(255, 255, 255, 0.70);
  box-shadow: var(--shadow);
}

.gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-card.wide {
  min-height: 360px;
}

.gallery-card.tall {
  min-height: 360px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.outcome-card .card-heading h2,
.reflection-card .card-heading h2 {
  max-width: 18ch;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.cta-button {
  min-height: 54px;
  padding: 0 22px;
  border-radius: 16px;
  border: 1px solid transparent;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.cta-button:hover {
  transform: translateY(-1px);
}

.cta-button.primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  box-shadow: 0 16px 32px rgba(45, 61, 138, 0.20);
}

.cta-button.secondary {
  background: #fff;
  border-color: var(--line);
  color: var(--text);
}

.site-footer {
  border-top: 1px solid rgba(17, 24, 39, 0.06);
  background: rgba(17, 24, 39, 0.94);
  color: #fff;
}

.footer-shell {
  max-width: var(--max);
  margin: 0 auto;
  padding: 28px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.footer-brand {
  margin: 0 0 8px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.footer-note,
.footer-meta p,
.footer-meta a {
  margin: 0;
  color: rgba(255, 255, 255, 0.74);
  line-height: 1.7;
}

.footer-meta {
  text-align: right;
}

.section {
  scroll-margin-top: calc(var(--header-h) + 18px);
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1180px) {
  .page-shell {
    grid-template-columns: 1fr;
  }

  /* Let the side rail scroll on smaller screens along with the page */
  .side-rail {
    display: grid;
    position: static;
    top: auto;
    align-self: stretch;
    gap: 12px;
  }

  /* hide the full section nav to save space but keep the back button */
  .side-rail .section-nav {
    display: none;
  }

  /* hide the mobile nav toggle (highlighted) on narrow screens per request */
  .nav-toggle {
    display: none;
  }

  .section-chips {
    display: flex;
  }

  .hero-card {
    grid-template-columns: 1fr;
  }

  .hero-media {
    min-height: 480px;
  }
}

@media (max-width: 900px) {
  .header-links {
    display: none;
  }

  /* hide mobile nav toggle (we'll rely on section chips and side rail back button) */
  .nav-toggle {
    display: none;
  }

  .metric-row,
  .stats-grid,
  .card-grid,
  .feature-band,
  .gallery-row {
    grid-template-columns: 1fr;
  }

  .feature-band-media img,
  .media-panel img,
  .gallery-card.wide,
  .gallery-card.tall {
    min-height: 300px;
  }

  .footer-shell {
    flex-direction: column;
  }

  .footer-meta {
    text-align: left;
  }
}

@media (max-width: 640px) {
  .header-shell,
  .page-shell,
  .footer-shell {
    padding-left: 18px;
    padding-right: 18px;
  }

  .page-shell {
    padding-top: 18px;
    padding-bottom: 40px;
  }

  .hero-card,
  .content-card,
  .feature-band {
    padding: 20px;
    border-radius: 24px;
  }

  .hero-copy h1 {
    max-width: none;
  }

  .hero-summary,
  .rich-text,
  .rich-text p,
  .feature-band p {
    font-size: 1rem;
  }

  .metric-row {
    grid-template-columns: 1fr;
  }

  .hero-media {
    min-height: 360px;
  }

  .hero-badge {
    left: 14px;
    right: 14px;
    max-width: none;
  }

  .cta-button {
    width: 100%;
  }

  /* Pin the Go Back button so it's always visible on small screens */
  .back-button {
    position: fixed;
    left: 14px;
    top: calc(var(--header-h) + 8px);
    z-index: 80;
    min-height: 48px;
    padding: 10px 14px;
  }
}
