/* ==========================================================================
   Transport Products Inc. - main stylesheet
   Cedar Grove, NJ  ·  Bus & rail replacement parts
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design tokens
   -------------------------------------------------------------------------- */
:root {
  /* Brand - blue sampled directly from the logo artwork */
  --brand:        #3b8dbd;
  --brand-700:    #256f9b;
  --brand-600:    #2f7daa;
  --brand-400:    #5fa9d2;
  --brand-300:    #8fc6e3;
  --brand-100:    #e4f1f8;

  /* Neutrals */
  --ink:          #0b1220;
  --ink-2:        #111c2f;
  --ink-3:        #1b2942;
  --slate:        #46566d;
  --muted:        #6b7a90;
  --line:         #dfe5ec;
  --paper:        #ffffff;
  --paper-2:      #f5f8fb;

  /* Effects */
  --radius:       14px;
  --radius-lg:    22px;
  --shadow-sm:    0 1px 2px rgba(11, 18, 32, .06), 0 2px 8px rgba(11, 18, 32, .05);
  --shadow:       0 10px 30px rgba(11, 18, 32, .10), 0 2px 8px rgba(11, 18, 32, .06);
  --shadow-lg:    0 30px 70px rgba(11, 18, 32, .18), 0 8px 24px rgba(11, 18, 32, .10);

  /* Type */
  --font-sans:    "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Archivo", "Inter", "Segoe UI", system-ui, sans-serif;

  /* Layout */
  --wrap:         1180px;
  --gutter:       clamp(1.1rem, 4vw, 2.5rem);
  --header-h:     84px;

  /* Motion */
  --ease:         cubic-bezier(.22, .61, .36, 1);
  --ease-back:    cubic-bezier(.34, 1.56, .64, 1);

  /* 3D */
  --perspective:  1200px;
  --cube-half:    clamp(95px, 12vw, 125px);
}

/* --------------------------------------------------------------------------
   2. Reset & base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: clamp(1rem, .96rem + .2vw, 1.075rem);
  line-height: 1.65;
  color: var(--slate);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; height: auto; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.12;
  letter-spacing: -.02em;
  margin: 0 0 .6em;
  font-weight: 800;
}

h1 { font-size: clamp(2.25rem, 1.4rem + 3.6vw, 4rem); }
h2 { font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.75rem); }
h3 { font-size: clamp(1.15rem, 1rem + .7vw, 1.45rem); }

p  { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--brand-700); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--brand-600); }

ul, ol { margin: 0 0 1.1em; padding-left: 1.2em; }
li + li { margin-top: .35em; }

hr { border: 0; border-top: 1px solid var(--line); margin: 3rem 0; }

::selection { background: var(--brand); color: #fff; }

:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 50%;
  top: -100px;
  transform: translateX(-50%);
  z-index: 999;
  background: var(--ink);
  color: #fff;
  padding: .75rem 1.25rem;
  border-radius: 0 0 var(--radius) var(--radius);
  font-weight: 600;
  text-decoration: none;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 0; color: #fff; }

/* --------------------------------------------------------------------------
   3. Layout helpers
   -------------------------------------------------------------------------- */
.wrap {
  width: min(100% - (var(--gutter) * 2), var(--wrap));
  margin-inline: auto;
}
.wrap--narrow { max-width: 860px; }

.section { padding: clamp(3.5rem, 7vw, 6.5rem) 0; position: relative; }
.section--tight { padding: clamp(2.5rem, 5vw, 4rem) 0; }
.section--paper { background: var(--paper-2); }
.section--dark {
  background:
    radial-gradient(900px 500px at 15% -10%, rgba(59, 141, 189, .28), transparent 60%),
    radial-gradient(700px 420px at 90% 0%, rgba(59, 141, 189, .14), transparent 55%),
    var(--ink);
  color: #c3cddd;
}
.section--dark h2, .section--dark h3 { color: #fff; }
.section--dark a { color: var(--brand-300); }

.section-head { max-width: 700px; margin-bottom: clamp(2rem, 4vw, 3.25rem); }
.section-head--center { margin-inline: auto; text-align: center; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-family: var(--font-display);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--brand-700);
  margin: 0 0 1rem;
}
.eyebrow::before {
  content: "";
  width: 28px; height: 2px;
  background: var(--brand);
  border-radius: 2px;
}
.section--dark .eyebrow { color: var(--brand-300); }

.lede { font-size: clamp(1.05rem, 1rem + .4vw, 1.3rem); color: var(--slate); }
.section--dark .lede { color: #b7c3d6; }

.grid { display: grid; gap: clamp(1rem, 2.4vw, 1.75rem); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(205px, 1fr)); }

/* Fixed three-up so the nine capability cards land as a clean 3 x 3 block. */
.grid--cards { grid-template-columns: 1fr; }
@media (min-width: 620px) { .grid--cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 940px) { .grid--cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* --------------------------------------------------------------------------
   4. Buttons
   -------------------------------------------------------------------------- */
.btn {
  --btn-bg: var(--brand);
  --btn-fg: #fff;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  padding: .92rem 1.6rem;
  border: 0;
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--font-display);
  font-size: .96rem;
  font-weight: 700;
  letter-spacing: .01em;
  text-decoration: none;
  cursor: pointer;
  transform-style: preserve-3d;
  transition:
    transform .32s var(--ease-back),
    box-shadow .32s var(--ease),
    background-color .25s var(--ease);
  box-shadow: 0 10px 24px rgba(59, 141, 189, .3);
}
.btn:hover,
.btn:focus-visible {
  color: #fff;
  background: var(--brand-600);
  transform: translateY(-3px) rotateX(-9deg) translateZ(6px);
  box-shadow: 0 18px 38px rgba(59, 141, 189, .42);
}
.btn:active { transform: translateY(-1px) rotateX(-3deg); }

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  border: 1.5px solid var(--line);
  box-shadow: none;
}
.btn--ghost:hover,
.btn--ghost:focus-visible {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
  box-shadow: 0 16px 34px rgba(11, 18, 32, .26);
}

.btn--light {
  --btn-bg: #fff;
  --btn-fg: var(--ink);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .3);
}
.btn--light:hover, .btn--light:focus-visible { background: #fff; color: var(--brand-700); }

.btn--outline-light {
  --btn-bg: transparent;
  --btn-fg: #fff;
  border: 1.5px solid rgba(255, 255, 255, .35);
  box-shadow: none;
}
.btn--outline-light:hover, .btn--outline-light:focus-visible {
  background: rgba(255, 255, 255, .1);
  border-color: #fff;
  color: #fff;
}

.btn-row { display: flex; flex-wrap: wrap; gap: .85rem; margin-top: 1.9rem; }

/* --------------------------------------------------------------------------
   5. Header / navigation
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .85);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.site-header.is-stuck {
  border-bottom-color: var(--line);
  box-shadow: 0 8px 28px rgba(11, 18, 32, .07);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  min-height: var(--header-h);
}

/* Logo lockup - the mark tilts in 3D on hover */
.brand {
  display: inline-block;
  flex-shrink: 0;
  perspective: 700px;
  text-decoration: none;
  line-height: 0;
}
.brand__img {
  width: clamp(168px, 20vw, 214px);
  transform-style: preserve-3d;
  transform: rotateY(0deg) translateZ(0);
  transition: transform .6s var(--ease-back), filter .4s var(--ease);
  filter: drop-shadow(0 3px 8px rgba(11, 18, 32, .16));
}
.brand:hover .brand__img,
.brand:focus-visible .brand__img {
  transform: rotateY(-14deg) rotateX(6deg) translateZ(18px) scale(1.03);
  filter: drop-shadow(0 14px 24px rgba(59, 141, 189, .4));
}

/* On dark surfaces the chrome mark sits on a light plate so the black
   "TRANSPORT" wordmark keeps its contrast. */
.brand--plate {
  padding: .85rem 1.1rem;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .3);
}

.nav__menu { display: contents; }

.nav__list {
  display: flex;
  align-items: center;
  gap: clamp(.35rem, 1.4vw, 1.1rem);
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav__list li { margin: 0; }

/* Menu links use a 3D flip, one face swapping for the other */
.nav__link {
  position: relative;
  display: block;
  padding: .55rem .78rem;
  font-family: var(--font-display);
  font-size: .94rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  border-radius: 9px;
  perspective: 400px;
  transition: color .25s var(--ease);
}
.nav__flip {
  display: block;
  position: relative;
  transform-style: preserve-3d;
  transition: transform .5s var(--ease-back);
}
.nav__flip span { display: block; backface-visibility: hidden; }
.nav__flip span:last-child {
  position: absolute;
  inset: 0;
  color: var(--brand-700);
  transform: rotateX(90deg) translateZ(.55em);
}
.nav__link:hover .nav__flip,
.nav__link:focus-visible .nav__flip { transform: rotateX(-90deg) translateZ(-.55em); }

.nav__link::after {
  content: "";
  position: absolute;
  left: .78rem; right: .78rem; bottom: .2rem;
  height: 2px;
  border-radius: 2px;
  background: var(--brand);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s var(--ease);
}
.nav__link[aria-current="page"]::after { transform: scaleX(1); }
.nav__link[aria-current="page"] { color: var(--brand-700); }

.nav__right { display: flex; align-items: center; gap: .9rem; }

.nav__phone {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .94rem;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.nav__phone:hover { color: var(--brand-700); }
.nav__phone svg { width: 17px; height: 17px; flex: none; }

/* Mobile toggle */
.nav__toggle {
  display: none;
  width: 46px; height: 46px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.nav__toggle span {
  display: block;
  position: relative;
  width: 20px; height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform .3s var(--ease), background-color .2s;
}
.nav__toggle span::before,
.nav__toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 20px; height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform .3s var(--ease);
}
.nav__toggle span::before { top: -6px; }
.nav__toggle span::after  { top:  6px; }
.nav__toggle[aria-expanded="true"] span { background: transparent; }
.nav__toggle[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span::after  { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 920px) {
  .nav__toggle { display: inline-flex; }

  .nav__menu {
    display: none;
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
    padding: 1rem var(--gutter) 1.6rem;
    transform-origin: top center;
    perspective: 1000px;
  }
  .nav__menu.is-open { display: block; animation: menuDrop .45s var(--ease-back) both; }

  .nav__list { flex-direction: column; align-items: stretch; gap: .1rem; }
  .nav__link { padding: .85rem .5rem; font-size: 1.05rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav__link::after { display: none; }
  .nav__right { flex-direction: column; align-items: stretch; gap: .8rem; margin-top: 1.2rem; }
  .nav__right .btn { width: 100%; }
  .nav__phone { justify-content: center; padding: .5rem; }
}

@keyframes menuDrop {
  from { opacity: 0; transform: rotateX(-24deg) translateY(-14px); }
  to   { opacity: 1; transform: rotateX(0)      translateY(0); }
}

/* --------------------------------------------------------------------------
   6. Hero - layered 3D parallax stage
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(3.5rem, 8vw, 7rem) 0 clamp(4rem, 9vw, 7.5rem);
  background-color: var(--ink);
  background-image:
    radial-gradient(1100px 600px at 12% -15%, rgba(59, 141, 189, .38), transparent 62%),
    radial-gradient(900px 520px at 88% 8%,   rgba(59, 141, 189, .18), transparent 58%),
    linear-gradient(170deg, #0d1626 0%, #0b1220 55%, #060c17 100%);
  color: #b9c5d8;
  perspective: var(--perspective);
  perspective-origin: 50% 40%;
}

/* Animated speed-line field, pushed back in Z */
.hero__rails {
  position: absolute;
  inset: -20% -10%;
  z-index: -2;
  transform-style: preserve-3d;
  transform: rotateX(62deg) translateZ(-260px) scale(1.7);
  background-image:
    repeating-linear-gradient(90deg,
      rgba(59, 141, 189, .20) 0 2px,
      transparent 2px 92px),
    repeating-linear-gradient(0deg,
      rgba(255, 255, 255, .06) 0 1px,
      transparent 1px 70px);
  -webkit-mask-image: radial-gradient(ellipse 70% 62% at 50% 45%, #000 15%, transparent 78%);
          mask-image: radial-gradient(ellipse 70% 62% at 50% 45%, #000 15%, transparent 78%);
  animation: railRun 5.5s linear infinite;
  opacity: .85;
}
@keyframes railRun {
  from { background-position: 0 0, 0 0; }
  to   { background-position: 0 70px, 0 70px; }
}

/* Soft drifting glow orbs */
.hero__orb {
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  filter: blur(60px);
  opacity: .5;
  pointer-events: none;
}
.hero__orb--a {
  width: 380px; height: 380px;
  top: -80px; left: -60px;
  background: radial-gradient(circle, rgba(59, 141, 189, .85), transparent 70%);
  animation: orbFloat 14s var(--ease) infinite alternate;
}
.hero__orb--b {
  width: 300px; height: 300px;
  right: -40px; bottom: -70px;
  background: radial-gradient(circle, rgba(143, 198, 227, .6), transparent 70%);
  animation: orbFloat 18s var(--ease) infinite alternate-reverse;
}
@keyframes orbFloat {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(40px, 30px, 60px) scale(1.16); }
}

.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  transform-style: preserve-3d;
}
@media (max-width: 950px) {
  .hero__inner { grid-template-columns: 1fr; }
}

.hero__copy { transform-style: preserve-3d; }

.hero h1 { color: #fff; margin-bottom: .45em; }

/* Layered 3D depth on the headline accent word */
.hero h1 .depth {
  display: inline-block;
  color: var(--brand-300);
  text-shadow:
     1px  1px 0 rgba(59, 141, 189, .85),
     2px  2px 0 rgba(59, 141, 189, .70),
     3px  3px 0 rgba(47, 125, 170, .55),
     4px  4px 0 rgba(37, 111, 155, .42),
     5px  5px 0 rgba(37, 111, 155, .30),
     6px  6px 14px rgba(0, 0, 0, .45);
  animation: depthShift 7s ease-in-out infinite;
}
@keyframes depthShift {
  0%, 100% { transform: translate3d(0, 0, 0) rotateX(0) rotateY(0); }
  50%      { transform: translate3d(-3px, -3px, 0) rotateX(6deg) rotateY(-5deg); }
}

.hero .lede { color: #c6d2e3; max-width: 56ch; }

.hero__badges {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  margin: 1.9rem 0 0;
  padding: 0;
  list-style: none;
}
.hero__badges li { margin: 0; }
.hero__badges span {
  display: inline-block;
  padding: .42rem .9rem;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px;
  background: rgba(255, 255, 255, .05);
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .02em;
  color: #d5e0ee;
  -webkit-backdrop-filter: blur(6px);
          backdrop-filter: blur(6px);
}

/* --- Hero stage: rotating 3D cube + orbit rings --------------------------- */
.hero__stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: clamp(330px, 42vw, 450px);
  perspective: 1000px;
  transform-style: preserve-3d;
}

.cube-scene {
  position: relative;
  width: calc(var(--cube-half) * 2);
  aspect-ratio: 1;
  transform-style: preserve-3d;
  z-index: 2;
}

.cube {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  animation: cubeSpin 22s linear infinite;
}
.hero__stage:hover .cube { animation-play-state: paused; }

@keyframes cubeSpin {
  from { transform: rotateX(-22deg) rotateY(0deg); }
  to   { transform: rotateX(-22deg) rotateY(360deg); }
}

.cube__face {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: .4rem;
  padding: 1rem;
  text-align: center;
  border: 1px solid rgba(143, 198, 227, .5);
  border-radius: 10px;
  background:
    linear-gradient(145deg, rgba(59, 141, 189, .38), rgba(9, 15, 27, .97)),
    linear-gradient(#0b1220, #0b1220);
  box-shadow: inset 0 0 40px rgba(59, 141, 189, .3);
}
.cube__face b {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(.9rem, .8rem + .35vw, 1.08rem);
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #fff;
}
.cube__face small {
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--brand-300);
}

.cube__face--front  { transform: translateZ(var(--cube-half)); }
.cube__face--back   { transform: rotateY(180deg) translateZ(var(--cube-half)); }
.cube__face--right  { transform: rotateY(90deg)  translateZ(var(--cube-half)); }
.cube__face--left   { transform: rotateY(-90deg) translateZ(var(--cube-half)); }
.cube__face--top    { transform: rotateX(90deg)  translateZ(var(--cube-half)); }
.cube__face--bottom { transform: rotateX(-90deg) translateZ(var(--cube-half)); }

/* Orbiting rings around the cube - atom-style 3D rotation */
.orbit {
  position: absolute;
  top: 50%; left: 50%;
  width: clamp(300px, 38vw, 400px);
  aspect-ratio: 1;
  margin: 0;
  border: 1.5px dashed rgba(143, 198, 227, .38);
  border-radius: 50%;
  transform-style: preserve-3d;
  pointer-events: none;
}
.orbit--1 { animation: orbit1 18s linear infinite; }
.orbit--2 {
  animation: orbit2 26s linear infinite reverse;
  border-style: solid;
  border-color: rgba(59, 141, 189, .28);
}
.orbit--3 {
  width: clamp(360px, 46vw, 480px);
  animation: orbit3 34s linear infinite;
  border-color: rgba(143, 198, 227, .18);
}

@keyframes orbit1 {
  from { transform: translate(-50%, -50%) rotateX(74deg) rotateZ(0deg); }
  to   { transform: translate(-50%, -50%) rotateX(74deg) rotateZ(360deg); }
}
@keyframes orbit2 {
  from { transform: translate(-50%, -50%) rotateX(66deg) rotateY(38deg) rotateZ(0deg); }
  to   { transform: translate(-50%, -50%) rotateX(66deg) rotateY(38deg) rotateZ(360deg); }
}
@keyframes orbit3 {
  from { transform: translate(-50%, -50%) rotateX(80deg) rotateY(-24deg) rotateZ(0deg); }
  to   { transform: translate(-50%, -50%) rotateX(80deg) rotateY(-24deg) rotateZ(360deg); }
}

/* A bead riding each ring */
.orbit::after {
  content: "";
  position: absolute;
  top: -6px; left: 50%;
  width: 11px; height: 11px;
  margin-left: -5.5px;
  border-radius: 50%;
  background: var(--brand-300);
  box-shadow: 0 0 16px 3px rgba(143, 198, 227, .8);
}

/* --------------------------------------------------------------------------
   7. Ticker strip (3D-tilted marquee)
   -------------------------------------------------------------------------- */
.ticker {
  position: relative;
  overflow: hidden;
  padding: 1.15rem 0;
  background: var(--ink-2);
  border-top: 1px solid rgba(255, 255, 255, .07);
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  perspective: 600px;
}
.ticker__track {
  display: flex;
  width: max-content;
  transform: rotateX(8deg);
  animation: tickerRun 36s linear infinite;
}
.ticker:hover .ticker__track { animation-play-state: paused; }
.ticker__track span {
  display: inline-flex;
  align-items: center;
  gap: 2.4rem;
  padding-right: 2.4rem;
  font-family: var(--font-display);
  font-size: .88rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #8ea1bb;
  white-space: nowrap;
}
.ticker__track span::after {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--brand);
  flex: none;
}
@keyframes tickerRun {
  from { transform: rotateX(8deg) translateX(0); }
  to   { transform: rotateX(8deg) translateX(-50%); }
}

/* --------------------------------------------------------------------------
   8. Flip cards - capability categories
   -------------------------------------------------------------------------- */
.flip {
  perspective: 1400px;
  min-height: 264px;
}
.flip__inner {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: inherit;
  transform-style: preserve-3d;
  transition: transform .75s var(--ease-back);
  border-radius: var(--radius-lg);
}
.flip:hover .flip__inner,
.flip:focus-within .flip__inner,
.flip.is-flipped .flip__inner { transform: rotateY(180deg); }

.flip__face {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: .55rem;
  padding: 1.6rem;
  border-radius: var(--radius-lg);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: hidden;
}

.flip__face--front {
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.flip__face--front::before {
  content: "";
  position: absolute;
  inset: auto -30% -55% -30%;
  height: 160px;
  background: radial-gradient(ellipse at center, rgba(59, 141, 189, .16), transparent 70%);
  pointer-events: none;
}
.flip__face--back {
  transform: rotateY(180deg);
  justify-content: center;
  background: linear-gradient(155deg, var(--brand-600), var(--ink-2) 92%);
  color: #dce7f3;
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: var(--shadow);
}
.flip__face--back h3 { color: #fff; margin-bottom: .35em; }
.flip__face--back p { font-size: .95rem; margin: 0; }

.flip__icon {
  width: 46px; height: 46px;
  display: grid;
  place-items: center;
  margin-bottom: auto;
  border-radius: 13px;
  background: var(--brand-100);
  color: var(--brand-700);
}
.flip__icon svg { width: 24px; height: 24px; }

.flip__face--front h3 { margin: 0; position: relative; }
.flip__face--front p  { margin: 0; font-size: .95rem; color: var(--muted); position: relative; }

.flip__hint {
  position: absolute;
  top: 1.15rem; right: 1.25rem;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--brand);
  opacity: .75;
}

/* --------------------------------------------------------------------------
   9. Tilt cards - pointer-driven 3D
   -------------------------------------------------------------------------- */
.tilt {
  position: relative;
  padding: clamp(1.5rem, 3vw, 2.1rem);
  border-radius: var(--radius-lg);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  transform-style: preserve-3d;
  transform:
    perspective(900px)
    rotateX(var(--ry, 0deg))
    rotateY(var(--rx, 0deg));
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
  will-change: transform;
}
.tilt:hover { box-shadow: var(--shadow-lg); }
.tilt > * { transform: translateZ(26px); }
.tilt::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    380px circle at var(--mx, 50%) var(--my, 50%),
    rgba(59, 141, 189, .16),
    transparent 62%);
  opacity: 0;
  transition: opacity .4s var(--ease);
  pointer-events: none;
}
.tilt:hover::after { opacity: 1; }

.tilt--dark {
  background: linear-gradient(160deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .02));
  border-color: rgba(255, 255, 255, .12);
  color: #bccbdf;
  box-shadow: none;
}
.tilt--dark h3 { color: #fff; }

.tilt__num {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 1.5rem + 2.4vw, 3.1rem);
  font-weight: 800;
  line-height: 1;
  color: var(--brand);
  margin-bottom: .35rem;
  letter-spacing: -.03em;
}
.tilt__label { font-size: .9rem; color: var(--muted); margin: 0; }
.tilt--dark .tilt__label { color: #9fb0c8; }

.step__n {
  display: inline-grid;
  place-items: center;
  width: 40px; height: 40px;
  margin-bottom: 1rem;
  border-radius: 12px;
  background: var(--brand);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 800;
}

/* --------------------------------------------------------------------------
   10. Bouncy 3D bars
   -------------------------------------------------------------------------- */
.bars {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: .55rem;
  height: 92px;
  perspective: 500px;
  margin: 0 0 1.5rem;
}
.bars i {
  display: block;
  width: 13px;
  height: 100%;
  border-radius: 5px;
  background: linear-gradient(180deg, var(--brand-300), var(--brand-700));
  transform-origin: bottom center;
  transform-style: preserve-3d;
  box-shadow: 0 6px 16px rgba(59, 141, 189, .35);
  animation: barBounce 1.5s var(--ease) infinite;
}
.bars i:nth-child(1) { animation-delay: 0s;   }
.bars i:nth-child(2) { animation-delay: .12s; }
.bars i:nth-child(3) { animation-delay: .24s; }
.bars i:nth-child(4) { animation-delay: .36s; }
.bars i:nth-child(5) { animation-delay: .48s; }
.bars i:nth-child(6) { animation-delay: .60s; }
.bars i:nth-child(7) { animation-delay: .72s; }
@keyframes barBounce {
  0%, 100% { transform: scaleY(.28) rotateX(0deg);   opacity: .55; }
  50%      { transform: scaleY(1)   rotateX(-18deg); opacity: 1;   }
}

/* --------------------------------------------------------------------------
   11. Rotating 3D tag ring
   -------------------------------------------------------------------------- */
.ring-wrap {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 340px;
  perspective: 1100px;
}
.ring {
  position: relative;
  width: 210px;
  height: 64px;
  margin: 0;
  padding: 0;
  transform-style: preserve-3d;
  animation: ringSpin 26s linear infinite;
}
.ring-wrap:hover .ring { animation-play-state: paused; }
@keyframes ringSpin {
  from { transform: rotateX(-12deg) rotateY(0deg); }
  to   { transform: rotateX(-12deg) rotateY(360deg); }
}
.ring li {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  padding: .6rem 1rem;
  margin: 0;
  list-style: none;
  text-align: center;
  font-family: var(--font-display);
  font-size: .86rem;
  font-weight: 700;
  letter-spacing: .04em;
  color: #fff;
  border: 1px solid rgba(143, 198, 227, .4);
  border-radius: 10px;
  background: linear-gradient(150deg, rgba(59, 141, 189, .42), rgba(11, 18, 32, .82));
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
}
.ring li:nth-child(1) { transform: rotateY(  0deg) translateZ(230px); }
.ring li:nth-child(2) { transform: rotateY( 40deg) translateZ(230px); }
.ring li:nth-child(3) { transform: rotateY( 80deg) translateZ(230px); }
.ring li:nth-child(4) { transform: rotateY(120deg) translateZ(230px); }
.ring li:nth-child(5) { transform: rotateY(160deg) translateZ(230px); }
.ring li:nth-child(6) { transform: rotateY(200deg) translateZ(230px); }
.ring li:nth-child(7) { transform: rotateY(240deg) translateZ(230px); }
.ring li:nth-child(8) { transform: rotateY(280deg) translateZ(230px); }
.ring li:nth-child(9) { transform: rotateY(320deg) translateZ(230px); }

@media (max-width: 640px) {
  .ring { width: 148px; }
  .ring li { font-size: .74rem; padding: .5rem .6rem; }
  .ring li:nth-child(1) { transform: rotateY(  0deg) translateZ(152px); }
  .ring li:nth-child(2) { transform: rotateY( 40deg) translateZ(152px); }
  .ring li:nth-child(3) { transform: rotateY( 80deg) translateZ(152px); }
  .ring li:nth-child(4) { transform: rotateY(120deg) translateZ(152px); }
  .ring li:nth-child(5) { transform: rotateY(160deg) translateZ(152px); }
  .ring li:nth-child(6) { transform: rotateY(200deg) translateZ(152px); }
  .ring li:nth-child(7) { transform: rotateY(240deg) translateZ(152px); }
  .ring li:nth-child(8) { transform: rotateY(280deg) translateZ(152px); }
  .ring li:nth-child(9) { transform: rotateY(320deg) translateZ(152px); }
}

/* --------------------------------------------------------------------------
   12. Page hero (interior pages)
   -------------------------------------------------------------------------- */
.page-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(3rem, 6vw, 5rem) 0 clamp(2.5rem, 5vw, 4rem);
  background-color: var(--ink);
  background-image: radial-gradient(800px 420px at 20% -20%, rgba(59, 141, 189, .32), transparent 60%);
  color: #b9c5d8;
  perspective: 900px;
}
.page-hero::before {
  content: "";
  position: absolute;
  inset: -30% -10% auto -10%;
  height: 130%;
  background-image: repeating-linear-gradient(
    90deg, rgba(255, 255, 255, .05) 0 1px, transparent 1px 78px);
  transform: rotateX(70deg) translateZ(-160px) scale(1.6);
  -webkit-mask-image: radial-gradient(ellipse 60% 55% at 50% 40%, #000 10%, transparent 76%);
          mask-image: radial-gradient(ellipse 60% 55% at 50% 40%, #000 10%, transparent 76%);
  pointer-events: none;
}
.page-hero > * { position: relative; }
.page-hero h1 { color: #fff; }
.page-hero .lede { color: #c6d2e3; max-width: 62ch; }

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  list-style: none;
  margin: 0 0 1.4rem;
  padding: 0;
  font-size: .85rem;
  color: #8a9ab3;
}
.crumbs li { margin: 0; }
.crumbs li + li::before { content: "/"; margin-right: .5rem; opacity: .55; }
.crumbs a { color: #b6c6dc; text-decoration: none; }
.crumbs a:hover { color: #fff; text-decoration: underline; }

/* --------------------------------------------------------------------------
   13. Content blocks
   -------------------------------------------------------------------------- */
.prose > * + * { margin-top: 1.15em; }
.prose h2 { margin-top: 2.2em; }
.prose h3 { margin-top: 1.8em; }
.prose ul { padding-left: 1.15em; }
.prose li::marker { color: var(--brand); }

.pullquote {
  position: relative;
  margin: clamp(2rem, 4vw, 3rem) 0;
  padding: clamp(1.5rem, 3vw, 2.25rem) clamp(1.5rem, 3vw, 2.5rem);
  border-radius: var(--radius-lg);
  background: linear-gradient(150deg, var(--brand-100), #fff);
  border: 1px solid var(--brand-300);
  border-left: 5px solid var(--brand);
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 1rem + .6vw, 1.42rem);
  font-weight: 600;
  line-height: 1.45;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  transform-style: preserve-3d;
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.pullquote:hover {
  transform: perspective(1000px) rotateX(3deg) rotateY(-2deg) translateZ(10px);
  box-shadow: var(--shadow);
}

.spec-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: .7rem;
}
.spec-list li {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  margin: 0;
  padding: .85rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  transform-style: preserve-3d;
  transition: transform .35s var(--ease), border-color .35s, box-shadow .35s var(--ease);
}
.spec-list li:hover {
  transform: perspective(800px) translateZ(14px) rotateY(-2.5deg);
  border-color: var(--brand-300);
  box-shadow: var(--shadow-sm);
}
.spec-list li::before {
  content: "";
  flex: none;
  width: 9px; height: 9px;
  margin-top: .55em;
  border-radius: 3px;
  background: var(--brand);
  transform: rotate(45deg);
}
.section--dark .spec-list li {
  background: rgba(255, 255, 255, .04);
  border-color: rgba(255, 255, 255, .12);
  color: #c3cddd;
}
.section--dark .spec-list li:hover { border-color: var(--brand-400); }

/* Figure with a 3D frame */
.figure-3d { perspective: 1000px; margin: 0; }
.figure-3d__inner {
  padding: clamp(1.4rem, 3vw, 2.4rem);
  border-radius: var(--radius-lg);
  background: linear-gradient(150deg, #fff, var(--paper-2));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transform: rotateY(-7deg) rotateX(3deg);
  transform-style: preserve-3d;
  transition: transform .7s var(--ease-back), box-shadow .7s var(--ease);
}
.figure-3d:hover .figure-3d__inner {
  transform: rotateY(0deg) rotateX(0deg) translateZ(14px);
  box-shadow: var(--shadow-lg);
}
.figure-3d img { margin-inline: auto; }
.figure-3d figcaption {
  margin-top: 1rem;
  text-align: center;
  font-size: .88rem;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   14. Contact
   -------------------------------------------------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}
@media (max-width: 880px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-card {
  padding: clamp(1.4rem, 3vw, 2rem);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.15rem; }
.contact-list li { display: flex; gap: .95rem; margin: 0; }
.contact-list .ico {
  flex: none;
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: var(--brand-100);
  color: var(--brand-700);
}
.contact-list .ico svg { width: 20px; height: 20px; }
.contact-list .key {
  display: block;
  font-family: var(--font-display);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: .1rem;
}
.contact-list .val {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  font-style: normal;
}
a.val:hover { color: var(--brand-700); }

.form { display: grid; gap: 1.1rem; }
.field { display: grid; gap: .4rem; }
.field label {
  font-family: var(--font-display);
  font-size: .85rem;
  font-weight: 700;
  color: var(--ink);
}
.field .req { color: var(--brand-700); }
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: .82rem .95rem;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 11px;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease), transform .25s var(--ease);
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(59, 141, 189, .18);
  transform: translateY(-1px);
}
.field .hint { font-size: .82rem; color: var(--muted); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }

.form__note { font-size: .88rem; color: var(--muted); }

.form-status {
  padding: .9rem 1.1rem;
  border-radius: 11px;
  font-size: .95rem;
  font-weight: 600;
  border: 1px solid;
}
.form-status[hidden] { display: none; }
.form-status--ok  { background: #eefaf3; border-color: #a9e0c3; color: #11693f; }
.form-status--err { background: #fdf0f0; border-color: #f0bcbc; color: #9b2222; }

/* --------------------------------------------------------------------------
   15. CTA band
   -------------------------------------------------------------------------- */
.cta {
  position: relative;
  overflow: hidden;
  padding: clamp(3rem, 6vw, 5rem) 0;
  background-image:
    radial-gradient(700px 400px at 80% 120%, rgba(59, 141, 189, .4), transparent 60%),
    linear-gradient(120deg, #0b1220, #1b2942);
  color: #c3cddd;
  perspective: 800px;
}
.cta::after {
  content: "";
  position: absolute;
  inset: auto -10% -60% -10%;
  height: 200px;
  background-image: repeating-linear-gradient(90deg, rgba(255, 255, 255, .07) 0 2px, transparent 2px 60px);
  transform: rotateX(72deg);
  animation: railRun 4s linear infinite;
  pointer-events: none;
}
.cta h2 { color: #fff; }
.cta__inner {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.75rem;
}
.cta__text { max-width: 58ch; }
.cta .btn-row { margin-top: 0; }

/* --------------------------------------------------------------------------
   16. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--ink);
  color: #93a3ba;
  padding: clamp(2.75rem, 5vw, 4rem) 0 1.75rem;
  font-size: .94rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(auto-fit, minmax(150px, 1fr));
  gap: clamp(1.75rem, 4vw, 3rem);
  padding-bottom: 2.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}
.site-footer .brand { display: inline-block; }
.site-footer .brand__img { width: 220px; filter: none; }
.site-footer h4 {
  color: #fff;
  font-size: .78rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.footer-links li { margin: 0; }
.footer-links a {
  color: #a7b6cc;
  text-decoration: none;
  display: inline-block;
  transition: transform .3s var(--ease), color .3s var(--ease);
}
.footer-links a:hover { color: #fff; transform: translateX(5px); }

.footer-about { margin-top: 1.1rem; max-width: 40ch; color: #93a3ba; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1.5rem;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.5rem;
  font-size: .86rem;
  color: #74839a;
}
.footer-bottom p { margin: 0; }
.footer-bottom a { color: #9db0c8; }
.site-footer address { font-style: normal; }

/* --------------------------------------------------------------------------
   17. Scroll reveal
   -------------------------------------------------------------------------- */
[data-reveal] {
  opacity: 0;
  transform: perspective(1000px) translateY(26px) rotateX(-8deg);
  transition: opacity .7s var(--ease), transform .8s var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: perspective(1000px) translateY(0) rotateX(0);
}
.no-js [data-reveal] { opacity: 1; transform: none; }

/* --------------------------------------------------------------------------
   18. Back to top
   -------------------------------------------------------------------------- */
.to-top {
  position: fixed;
  right: 1.1rem; bottom: 1.1rem;
  z-index: 90;
  width: 48px; height: 48px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 14px;
  background: var(--ink);
  color: #fff;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: perspective(500px) translateY(14px) rotateX(-35deg);
  transition: opacity .35s var(--ease), transform .45s var(--ease-back), background-color .25s;
  box-shadow: var(--shadow);
}
.to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: perspective(500px) translateY(0) rotateX(0);
}
.to-top:hover { background: var(--brand-700); }
.to-top svg { width: 20px; height: 20px; }

/* --------------------------------------------------------------------------
   19. Print
   -------------------------------------------------------------------------- */
@media print {
  .site-header, .to-top, .cta, .ticker, .hero__stage, .ring-wrap, .bars { display: none !important; }
  body { color: #000; background: #fff; }
  .hero, .page-hero, .section--dark, .site-footer { background: #fff !important; color: #000 !important; }
  .hero h1, .page-hero h1, .section--dark h2, .site-footer h4 { color: #000 !important; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .85em; }
}

/* --------------------------------------------------------------------------
   20. Reduced motion - honour the OS preference
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }

  .cube   { transform: rotateX(-18deg) rotateY(-32deg); }
  .ring   { transform: rotateX(-10deg) rotateY(-15deg); }
  .orbit  { opacity: .35; }
  .bars i { transform: scaleY(.7); opacity: .85; }
  .tilt   { transform: none !important; }
  .figure-3d__inner { transform: none; }
  [data-reveal] { opacity: 1; transform: none; }
}
