/* ═══════════════════════════════════════════════
   Moonstruck — Lattice
   Editorial / blueprint. Wireframe-lattice hero,
   mono technical labels, stats band, rail timeline.
   ═══════════════════════════════════════════════ */

body { background: #04060a; }

/* Fallback for non-compositing preview contexts where CSS transitions never
   advance — show all reveal content instantly so nothing is stuck hidden. */
html.reveal-instant .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
html.reveal-instant .step2 { opacity: 1 !important; transform: none !important; transition: none !important; }
html.reveal-instant .rail__line span,
html.reveal-instant .step2__dot,
html.reveal-instant .step2__dot::before { transition: none !important; }
html.reveal-instant .cmore { transition: none !important; }
html.reveal-instant .ctoggle, html.reveal-instant .chev { transition: none !important; }
html.reveal-instant .railpanel { transition: none !important; }
html.reveal-instant .railpanel__caret { transition: none !important; }

/* faint slow-drifting starfield behind everything */
.starbg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  width: 100vw; height: 100vh;
  mask-image: radial-gradient(135% 100% at 50% 0%, #000 55%, transparent 96%);
  -webkit-mask-image: radial-gradient(135% 100% at 50% 0%, #000 55%, transparent 96%);
}
main, .foot, #footMount { position: relative; z-index: 1; }
/* contact / Start-a-project: transparent so the starfield flows through and
   blends seamlessly into the footer below (no hard section seam) */
.contact { border-top: 0; background: transparent; }
/* recolor form validation from the off-brand pink to a footer-matching violet
   (drives both the error border and the inline validation message) */
.contact { --aurora-pink: #A87BE0; }
.field input.err, .field textarea.err, .field select.err {
  border-color: #A87BE0 !important; background: rgba(168,123,224,.07) !important;
}

/* ─── Footer over the planet image ──────── */
.vfoot {
  position: relative; isolation: isolate; overflow: hidden;
  background: transparent;
  min-height: clamp(420px, 36vw, 560px);
  padding-top: clamp(70px, 9vw, 150px);
  display: flex; align-items: flex-end;
}
/* planet plate on its own layer; the top is masked to transparency so the
   background stars show through and the curve emerges smoothly out of the
   contact section above. A real element (not ::before) so the mask only
   touches the image, never the footer text. */
.vfoot__veil {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: url("footer-bg-clean.png") no-repeat center bottom / cover;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, rgba(0,0,0,.32) 13%, rgba(0,0,0,.78) 26%, #000 38%);
          mask-image: linear-gradient(180deg, transparent 0%, rgba(0,0,0,.32) 13%, rgba(0,0,0,.78) 26%, #000 38%);
}
/* faint wash to settle the lower blend, above the planet but below content */
.vfoot::after {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(4,6,10,0) 66%, rgba(4,6,10,.22) 100%);
}
.vfoot__inner {
  position: relative; z-index: 1; width: 100%;
  max-width: var(--maxw, 1400px); margin: 0 auto;
  padding: 0 var(--gutter) clamp(34px, 4vw, 56px);
}
.vfoot__rule { height: 1px; width: 100%; margin-bottom: clamp(46px, 7vw, 96px);
  background: linear-gradient(90deg, rgba(120,210,225,.05), rgba(150,225,240,.5) 50%, rgba(120,210,225,.05)); }
.vfoot__row {
  display: grid; align-items: center;
  grid-template-columns: auto auto 1fr auto;
  gap: clamp(28px, 4vw, 72px);
}
.vfoot__brand { text-decoration: none; display: inline-flex; align-items: center; }
.vfoot__logo { width: clamp(160px, 14vw, 240px); height: auto; }
.vfoot__col { display: flex; flex-direction: column; gap: 7px; white-space: nowrap;
  font-size: clamp(14px, 1.15vw, 18px); line-height: 1.5; color: #7fb6c4; }
.vfoot__col a { color: #7fb6c4; text-decoration: none; transition: color .25s ease; }
.vfoot__col a:hover { color: var(--teal-pale, #cef9ff); }
.vfoot__mail { align-self: start; }
.vfoot__socials { display: flex; align-items: center; gap: clamp(16px, 1.6vw, 26px); justify-self: end; }
.vfoot__socials a {
  width: 30px; height: 30px; display: grid; place-items: center; color: var(--teal);
  transition: transform .25s ease, color .25s ease; opacity: .85;
}
.vfoot__socials a:hover { transform: translateY(-3px); color: var(--teal-pale, #cef9ff); opacity: 1; }
.vfoot__socials svg { width: 24px; height: 24px; fill: currentColor; }
.vfoot__copy {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  margin-top: clamp(28px, 3.5vw, 46px);
  font-size: 13px; color: rgba(160,200,212,.5);
}
.vfoot__copy .mono { font-family: "Space Grotesk", monospace; letter-spacing: .08em; }
@media (max-width: 1000px) {
  .vfoot { min-height: 0; padding-top: 90px; }
  .vfoot__row { grid-template-columns: auto auto auto; gap: clamp(24px, 4vw, 48px); row-gap: 30px; }
  .vfoot__brand { grid-column: 1 / -1; }
  .vfoot__socials { grid-column: 1 / -1; justify-self: start; }
  .vfoot__copy { flex-direction: column; }
}
@media (max-width: 560px) {
  .vfoot__row { grid-template-columns: 1fr 1fr; }
}

.hdr nav a { font-size: 15px; }
.hdr .cta-pill {
  border: 1px solid var(--teal); color: var(--teal);
  padding: 10px 22px; border-radius: 6px; font-weight: 600; font-size: 15px;
  transition: background .25s ease, color .25s ease;
}
.hdr .cta-pill:hover { background: var(--teal); color: #04121a; }

.mono-label {
  font-family: "Space Grotesk", ui-monospace, monospace;
  font-size: 12px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--teal); display: inline-flex; align-items: center; gap: 10px;
}
.mono-label::before { content: ""; width: 26px; height: 1px; background: var(--teal); }

/* ─── Hero ─────────────────────────────────── */
.hero {
  position: relative; min-height: 100vh; overflow: hidden; isolation: isolate;
  display: grid; grid-template-columns: 1.02fr .98fr; align-items: center;
  padding: calc(var(--header-h) + 40px) var(--gutter) 0;
  gap: 30px; background: #04060a;
}
/* ambient aurora wash — also the pre-decode fallback behind the video */
.hero__glow {
  position: absolute; inset: 0; z-index: -3; pointer-events: none;
  background:
    radial-gradient(50% 52% at 70% 40%, rgba(94,214,230,.26), transparent 70%),
    radial-gradient(46% 48% at 60% 30%, rgba(110,139,232,.24), transparent 72%),
    radial-gradient(40% 42% at 78% 58%, rgba(176,123,218,.22), transparent 72%),
    radial-gradient(42% 40% at 64% 64%, rgba(232,95,196,.18), transparent 72%),
    radial-gradient(70% 70% at 50% 92%, rgba(8,18,42,.6), transparent 74%);
  filter: blur(10px);
  animation: heroGlow 28s ease-in-out infinite alternate;
}
@keyframes heroGlow {
  0%   { transform: translate3d(0,0,0) scale(1); opacity: .92; }
  50%  { transform: translate3d(-2%, 1.4%, 0) scale(1.07); opacity: 1; }
  100% { transform: translate3d(2.2%, -1%, 0) scale(1.04); opacity: .92; }
}
/* the native video renders full-res; the canvas is only a fallback */
.hero__video { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; display: block; }
.hero__video--native {
  object-fit: cover;
  object-position: 66% 58%;
  background: transparent;
  opacity: 0;
}
.hero__video--fallback { opacity: 0; }
html.hero-native-video-ok .hero__video--native,
html:not(.hero-native-video-ok) .hero__video--fallback { opacity: 1; }
/* soft vignette so the video melts into the page edges */
.hero__grain {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(125% 95% at 68% 44%, transparent 38%, rgba(4,6,10,.5) 78%, #04060a 100%);
}
.hero__fade {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(90deg, #04060a 0%, rgba(4,6,10,.72) 26%, rgba(4,6,10,0) 58%),
    linear-gradient(180deg, rgba(4,6,10,.4) 0%, transparent 22%, transparent 64%, #04060a 100%);
}
.hero__l { max-width: 640px; }
.hero__eyebrow { margin-bottom: 30px; }
.hero__title {
  font-weight: 700; font-size: clamp(48px, 6.4vw, 104px); line-height: .95;
  letter-spacing: -.02em; margin: 0 0 30px; color: #fff;
}
.hero__title .accent {
  background: linear-gradient(100deg, var(--teal), #6E8BE8 55%, #B07BDA);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero__copy { font-size: 20px; line-height: 1.45; color: rgba(255,255,255,.66); max-width: 500px; margin: 0 0 40px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 30px; border-radius: 8px; font-weight: 600; font-size: 16px;
  transition: transform .25s ease, box-shadow .3s ease, background .25s ease, border-color .25s ease, color .25s ease;
}
.btn--primary { background: var(--teal); color: #04121a; }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 14px 38px rgba(94,201,215,.3); }
.btn--ghost { border: 1px solid rgba(255,255,255,.18); color: #fff; }
.btn--ghost:hover { border-color: var(--teal); color: var(--teal); }

/* technical readout at the bottom of hero */
.hero__readout {
  position: absolute; left: var(--gutter); right: var(--gutter); bottom: 26px; z-index: 1;
  display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  font-family: "Space Grotesk", monospace; font-size: 11.5px; letter-spacing: .12em;
  color: rgba(94,201,215,.55); text-transform: uppercase;
  border-top: 1px solid rgba(94,201,215,.14); padding-top: 14px;
}
.hero__readout .dotlive { color: var(--aurora-lime); }

/* ─── Trusted-by — transparent so the starfield shows ─ */
.trusted2 {
  position: relative; overflow: hidden;
  padding: clamp(26px, 4vh, 46px) 0;
  background: transparent;
}
.trusted2__label {
  text-align: center;
  font-family: "Space Grotesk", monospace; font-size: 12px; letter-spacing: .26em; text-transform: uppercase;
  color: rgba(255,255,255,.46); margin: 0 0 clamp(18px, 2.6vh, 30px);
}
.trusted2__marquee {
  position: relative; overflow: hidden; width: 100%;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 5%, #000 95%, transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 5%, #000 95%, transparent 100%);
}
.trusted2__track { display: flex; align-items: center; width: max-content; will-change: transform; animation: trustedSlide 40s linear infinite; }
.trusted2__marquee:hover .trusted2__track { animation-play-state: paused; }
@keyframes trustedSlide { from { transform: translate3d(0,0,0); } to { transform: translate3d(-50%,0,0); } }
.client {
  font-family: "Syne", sans-serif; font-weight: 700; font-size: clamp(16px, 1.6vw, 25px); letter-spacing: .005em;
  color: var(--cc, #fff); white-space: nowrap; flex: 0 0 auto;
  text-shadow: 0 0 22px color-mix(in srgb, var(--cc, #fff) 34%, transparent);
  transition: transform .35s cubic-bezier(.2,.7,.2,1), filter .35s ease;
}
.client:hover { transform: translateY(-2px); filter: brightness(1.15); }
.client__sep {
  flex: 0 0 auto; width: 6px; height: 6px; margin: 0 clamp(18px, 2.4vw, 38px); border-radius: 2px;
  background: rgba(255,255,255,.95); transform: rotate(45deg);
}

/* ─── Stats band — separated cards ─────────── */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: clamp(14px, 1.6vw, 22px);
  padding: clamp(36px, 5vw, 72px) var(--gutter);
}
.stat {
  padding: clamp(28px, 2.8vw, 44px);
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.1);
  background: linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.012)), #04060a;
  transition: transform .5s cubic-bezier(.2,.7,.2,1), border-color .4s ease, box-shadow .5s ease, background .4s ease;
}
.stat:hover {
  transform: translateY(-6px);
  border-color: rgba(94,201,215,.42);
  background: linear-gradient(180deg, rgba(94,201,215,.06), rgba(255,255,255,.012)), #04060a;
  box-shadow: 0 28px 70px -34px rgba(0,0,0,.85), 0 18px 50px -34px rgba(94,201,215,.45);
}
.stat__num { font-weight: 700; font-size: clamp(40px, 4.6vw, 72px); line-height: 1; color: #fff; letter-spacing: -.02em; }
.stat__num .suf { color: var(--teal); }
.stat__lab { margin-top: 14px; font-family: "Space Grotesk", monospace; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.5); }

/* ─── Section scaffold ─────────────────────── */
.sec { padding: clamp(90px, 12vh, 140px) var(--gutter); max-width: var(--maxw); margin: 0 auto; }
.sec__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; margin-bottom: 64px; flex-wrap: wrap; }
.sec__title { font-weight: 700; font-size: clamp(40px, 5vw, 80px); line-height: 1; letter-spacing: -.02em; margin: 18px 0 0; color: #fff; }
.sec__lead { font-size: 19px; line-height: 1.5; color: rgba(255,255,255,.6); max-width: 420px; }

/* ─── What we build — highlighted cards ────── */
.rows {
  --bcard-collapsed-height: clamp(300px, 25vw, 360px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: auto;
  align-items: start;
  gap: clamp(16px, 1.6vw, 24px);
}
.bcard {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; flex-direction: column;
  height: auto;
  min-height: var(--bcard-collapsed-height);
  padding: clamp(28px, 3vw, 46px);
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,.1);
  background: linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.012)), #04060a;
  transition: transform .6s cubic-bezier(.2,.7,.2,1), border-color .5s ease, box-shadow .6s ease, background .5s ease;
}
.bcard:not(.is-open) { height: var(--bcard-collapsed-height); }
.bcard--expandable { cursor: pointer; }
.rows.is-measuring .bcard {
  height: auto !important;
  min-height: 0 !important;
  transition: none !important;
}
.rows.is-measuring .cmore { transition: none !important; }
.bcard:hover {
  transform: translateY(-8px);
  border-color: rgba(94,201,215,.42);
  background: linear-gradient(180deg, rgba(94,201,215,.07), rgba(255,255,255,.012)), #04060a;
  box-shadow: 0 34px 80px -34px rgba(0,0,0,.85), 0 22px 60px -34px rgba(94,201,215,.5);
}
/* top accent edge that wipes in on hover */
.bcard__edge {
  position: absolute; top: 0; left: 0; right: 0; height: 2px; z-index: 2;
  background: linear-gradient(90deg, var(--teal), color-mix(in srgb, var(--teal) 8%, transparent));
  transform: scaleX(0); transform-origin: 0 50%;
  transition: transform .65s cubic-bezier(.2,.7,.2,1);
}
.bcard:hover .bcard__edge { transform: scaleX(1); }
/* soft corner glow */
.bcard__sheen {
  position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0;
  background: radial-gradient(58% 70% at 100% 0%, rgba(94,201,215,.16), transparent 62%);
  transition: opacity .6s ease;
}
.bcard:hover .bcard__sheen { opacity: 1; }
.bcard__top { display: flex; align-items: center; justify-content: space-between; }
.bcard__num {
  font-family: "Space Grotesk", monospace; font-weight: 600; font-size: 14px; letter-spacing: .18em;
  color: var(--teal); display: inline-flex; align-items: center; gap: 11px;
}
.bcard__num::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 12px var(--teal); transition: transform .4s ease; }
.bcard:hover .bcard__num::before { transform: scale(1.5); }
.bcard__arrow {
  width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgba(255,255,255,.16);
  display: grid; place-items: center; font-size: 18px; color: rgba(255,255,255,.5);
  transition: transform .55s cubic-bezier(.2,.7,.2,1), background .45s ease, border-color .45s ease, color .45s ease;
}
.bcard:hover .bcard__arrow { background: var(--teal); border-color: var(--teal); color: #04121a; transform: translate(3px,-3px); }
.bcard__body { margin-top: auto; }
.bcard__title {
  font-weight: 700; font-size: clamp(25px, 2.3vw, 36px); line-height: 1.04; color: #fff;
  white-space: pre-line; margin: 30px 0 14px;
  transition: transform .55s cubic-bezier(.2,.7,.2,1);
}
.bcard:hover .bcard__title { transform: translateY(-2px); }
.bcard__desc { font-size: 16px; line-height: 1.55; color: rgba(255,255,255,.56); margin: 0; max-width: 48ch; transition: color .45s ease; }
.bcard:hover .bcard__desc { color: rgba(255,255,255,.8); }

/* ─── Shared expand toggle + collapsible body (cards & steps) ─── */
.ctoggle {
  width: 44px; height: 44px; border-radius: 50%; flex: 0 0 auto;
  border: 1px solid rgba(255,255,255,.16); background: transparent; color: rgba(255,255,255,.58);
  display: grid; place-items: center; cursor: pointer;
  transition: background .4s ease, border-color .4s ease, color .4s ease;
}
.chev { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.bcard:hover .ctoggle, .step2:hover .ctoggle { border-color: var(--teal); color: var(--teal); }
.is-open .ctoggle { border-color: var(--teal); color: var(--teal); background: transparent; }
.is-open .chev { transform: rotate(180deg); }
.cmore { display: grid; grid-template-rows: 0fr; opacity: 0; margin-top: 0;
  transition: grid-template-rows .55s cubic-bezier(.2,.7,.2,1), opacity .45s ease, margin-top .55s ease; }
.cmore__inner { overflow: hidden; min-height: 0; }
.cmore__inner p { font-size: 14.5px; line-height: 1.62; color: rgba(255,255,255,.6); margin: 0 0 13px; }
.cmore__inner p:last-child { margin-bottom: 0; }
.cmore__label {
  margin: 20px 0 10px;
  font-family: "Space Grotesk", monospace;
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--teal);
}
.cmore__list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
}
.cmore__list li {
  border: 1px solid rgba(94,201,215,.2);
  border-radius: 5px;
  background: rgba(94,201,215,.07);
  color: rgba(255,255,255,.72);
  font-family: "Space Grotesk", monospace;
  font-size: 11px;
  letter-spacing: .04em;
  line-height: 1.25;
  padding: 6px 9px;
}
.is-open .cmore { grid-template-rows: 1fr; opacity: 1; margin-top: 18px; }
.cmore__hint {
  display: inline-flex; align-items: center; gap: 7px; margin-top: 16px; align-self: flex-start;
  font-family: "Space Grotesk", monospace; font-size: 12px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--teal); transition: color .3s ease;
}

/* Active step + shared detail panel (tabs drive one panel beneath the rail) */
.step2.is-open .step2__label { color: var(--teal); }
.step2.is-open .step2__dot { transform: scale(1.1); box-shadow: 0 0 0 8px #04060a, 0 0 42px rgba(94,201,215,.75); }
.step2.is-open .step2__dot::before { background: #eafcff; box-shadow: 0 0 16px var(--teal); }

.railpanel {
  display: grid; grid-template-rows: 0fr; opacity: 0; margin-top: 0;
  transition: grid-template-rows .55s cubic-bezier(.2,.7,.2,1), opacity .4s ease, margin-top .55s ease;
}
.railpanel.is-open { grid-template-rows: 1fr; opacity: 1; margin-top: 30px; }
.railpanel__wrap { overflow: hidden; min-height: 0; }
.railpanel__card {
  position: relative; border: 1px solid rgba(94,201,215,.22); border-radius: 18px;
  background: linear-gradient(180deg, rgba(94,201,215,.05), rgba(255,255,255,.012)), #04060a;
  padding: clamp(26px, 3vw, 40px);
}
.railpanel__caret {
  position: absolute; top: -8px; left: var(--caret, 50%); width: 16px; height: 16px;
  transform: translateX(-50%) rotate(45deg); background: #0b1620;
  border-left: 1px solid rgba(94,201,215,.22); border-top: 1px solid rgba(94,201,215,.22);
  transition: left .55s cubic-bezier(.2,.7,.2,1);
}
.railpanel__kicker {
  font-family: "Space Grotesk", monospace; font-size: 12px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--teal); margin-bottom: 16px;
}
.railpanel__body {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(260px, .72fr);
  gap: clamp(24px, 4vw, 52px);
  align-items: start;
}
.railpanel__body p { font-size: 15px; line-height: 1.65; color: rgba(255,255,255,.66); margin: 0 0 14px; break-inside: avoid; }
.railpanel__body p:last-child { margin-bottom: 0; }
.railpanel__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.railpanel__list li {
  position: relative;
  padding: 12px 14px 12px 34px;
  border: 1px solid rgba(94,201,215,.18);
  border-radius: 8px;
  background: rgba(94,201,215,.055);
  color: rgba(255,255,255,.72);
  font-size: 14px;
  line-height: 1.35;
}
.railpanel__list li::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 18px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 12px rgba(94,201,215,.58);
}

/* ─── Projects — persistent labels ─────────── */
.projects2 { padding: clamp(90px, 12vh, 140px) 0; }
.projects2 .sec__head { max-width: var(--maxw); margin: 0 auto 56px; padding: 0 var(--gutter); }
.slider {
  position: relative; width: 100%; overflow: hidden; padding: 4px 0 28px;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 3%, #000 97%, transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 3%, #000 97%, transparent 100%);
}
.slider__track { display: flex; gap: 22px; width: max-content; will-change: transform; animation: slide var(--slide-dur, 70s) linear infinite; }
.slider:hover .slider__track { animation-play-state: paused; }
@keyframes slide { from { transform: translate3d(0,0,0); } to { transform: translate3d(calc(-1 * var(--track-half, 50%)), 0, 0); } }
.p2 {
  flex: 0 0 auto; width: clamp(320px, 30vw, 460px);
  border: 1px solid rgba(255,255,255,.1); border-radius: 14px; overflow: hidden;
  background: #0a0f15; transition: transform .5s cubic-bezier(.2,.7,.2,1), border-color .4s ease;
  color: inherit; text-decoration: none;
}
.p2:first-child { margin-left: var(--gutter); }
.p2:focus-visible { outline: 2px solid var(--teal); outline-offset: 6px; }
.p2:hover { transform: translateY(-6px); border-color: rgba(94,201,215,.5); }
.p2__media { position: relative; aspect-ratio: 16/11; overflow: hidden; }
.p2__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .8s ease; }
.p2__media--contain {
  background:
    radial-gradient(48% 56% at 70% 36%, rgba(94,201,215,.18), transparent 70%),
    linear-gradient(135deg, rgba(255,255,255,.045), rgba(255,255,255,.01)),
    #070c11;
}
.p2__media--contain img {
  inset: 14px;
  width: calc(100% - 28px);
  height: calc(100% - 28px);
  object-fit: contain;
}
.p2:hover .p2__media img { transform: scale(1.06); }
.p2__tag {
  position: absolute; top: 16px; left: 16px;
  font-family: "Space Grotesk", monospace; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: #cfeff5;
  padding: 6px 11px; border-radius: 5px; background: rgba(4,12,18,.6); backdrop-filter: blur(6px); border: 1px solid rgba(94,201,215,.3);
}
.p2__body { padding: 24px 26px 28px; }
.p2__top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.p2__name { font-weight: 700; font-size: 28px; color: #fff; margin: 0; }
.p2__visit { font-family: "Space Grotesk", monospace; font-size: 12px; letter-spacing: .1em; color: var(--teal); white-space: nowrap; }
.p2__desc { font-size: 15px; line-height: 1.55; color: rgba(255,255,255,.6); margin: 12px 0 18px; }
.p2__stack { display: flex; flex-wrap: wrap; gap: 7px; }
.p2__chip { font-family: "Space Grotesk", monospace; font-size: 11px; letter-spacing: .04em; padding: 5px 9px; border-radius: 5px; background: rgba(94,201,215,.08); border: 1px solid rgba(94,201,215,.2); color: var(--teal); }
.projects2__footer { display: flex; justify-content: center; margin-top: 14px; padding: 0 var(--gutter); }

/* ─── How we work — rail timeline ──────────── */
.how2 { position: relative; }
.rail { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; margin-top: 40px; padding-top: 6px; align-items: start; }
.rail__line { position: absolute; top: 25px; left: 4%; right: 4%; height: 2px; background: rgba(255,255,255,.08); border-radius: 2px; overflow: hidden; }
.rail__line span {
  position: absolute; inset: 0; width: 0;
  background: linear-gradient(90deg, var(--teal-deep), var(--teal));
  box-shadow: 0 0 12px rgba(94,201,215,.5);
  transition: width 2s cubic-bezier(.45,0,.15,1);
}
.rail.in .rail__line span { width: 100%; }
.rail__pulse {
  position: absolute; top: 21px; left: 4%; width: 10px; height: 10px; border-radius: 50%;
  background: #eafcff; box-shadow: 0 0 18px 5px rgba(150,232,255,.85); opacity: 0;
}
.rail.in .rail__pulse { animation: railPulse 4.6s cubic-bezier(.4,0,.2,1) 2.1s infinite; }
@keyframes railPulse { 0% { left: 4%; opacity: 0; } 12% { opacity: .95; } 88% { opacity: .95; } 100% { left: 96%; opacity: 0; } }

.step2 {
  --d: 0s; --d2: 0s; position: relative; padding: 0 6px; cursor: pointer;
  opacity: 0; transform: translateY(28px);
  transition: opacity .8s cubic-bezier(.2,.7,.2,1) var(--d), transform .8s cubic-bezier(.2,.7,.2,1) var(--d);
}
.rail.in .step2 { opacity: 1; transform: none; }
.step2::before {
  content: ""; position: absolute; inset: -14px -8px 0; z-index: 0; border-radius: 18px;
  background: radial-gradient(60% 46% at 50% 0%, rgba(94,201,215,.14), transparent 72%);
  opacity: 0; transition: opacity .5s ease; pointer-events: none;
}
.step2:hover::before { opacity: 1; }
.step2 > * { position: relative; z-index: 1; }
.step2__dot {
  width: 50px; height: 50px; border-radius: 50%; position: relative; z-index: 2;
  margin-bottom: 60px;            /* generous gap — keeps the line clear of the numbers */
  background: #0a1117; border: 2px solid rgba(255,255,255,.18);
  display: grid; place-items: center;
  box-shadow: 0 0 0 8px #04060a;
  transition: border-color .7s ease var(--d2), box-shadow .7s ease var(--d2), transform .45s cubic-bezier(.2,.7,.2,1);
}
.step2__dot::before {
  content: ""; width: 11px; height: 11px; border-radius: 50%;
  background: rgba(255,255,255,.16);
  transition: background .7s ease var(--d2), box-shadow .7s ease var(--d2);
}
.step2__dot::after {
  content: ""; position: absolute; inset: -2px; border-radius: 50%;
  border: 2px solid var(--teal); opacity: 0; transform: scale(1); pointer-events: none;
}
.rail.in .step2__dot { border-color: var(--teal); box-shadow: 0 0 0 8px #04060a, 0 0 28px rgba(94,201,215,.5); }
.rail.in .step2__dot::before { background: var(--teal); box-shadow: 0 0 14px var(--teal); }
.rail.in .step2__dot::after { animation: dotPing 1.3s ease-out var(--d2) 1 forwards; }
@keyframes dotPing { 0% { opacity: .7; transform: scale(1); } 100% { opacity: 0; transform: scale(1.9); } }
.step2:hover .step2__dot { transform: scale(1.12); box-shadow: 0 0 0 8px #04060a, 0 0 40px rgba(94,201,215,.7); }
.step2__num { font-family: "Space Grotesk", monospace; font-weight: 600; font-size: 14px; color: var(--teal); letter-spacing: .16em; }
.step2__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.step2__label { font-weight: 700; font-size: clamp(24px, 2.2vw, 34px); color: #fff; margin: 8px 0 14px; transition: color .4s ease; }
.step2:hover .step2__label { color: var(--teal); }
.step2__desc { font-size: 15px; line-height: 1.55; color: rgba(255,255,255,.6); margin: 0 0 18px; }
.step2 .cmore__hint { margin-bottom: 18px; }
@media (max-width: 1100px) {
  .hero { grid-template-columns: 1fr; padding-top: calc(var(--header-h) + 40px); }
  .hero__video { opacity: .55; }
  .stats { grid-template-columns: 1fr 1fr; }
  .rows { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .rail { grid-template-columns: 1fr 1fr; }
  .rail__line, .rail__pulse { display: none; }
  .railpanel__caret { display: none; }
  .step2__dot { margin-bottom: 28px; }
}
@media (max-width: 700px) {
  .hdr nav a.n-build, .hdr nav a.n-how { display: none; }
  .stats { grid-template-columns: 1fr; }
  .p2 { width: 80vw; }
  .rail { grid-template-columns: 1fr; }
  .railpanel__body { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .rail__line span, .rail.in .step2, .step2__dot, .step2__dot::before { transition: none; }
  .rail.in .rail__pulse, .rail.in .step2__dot::after { animation: none; }
}
