/* ==========================================
   AI CHAIN ART — Space DeFi Galaxy Theme
   Responsive: PC / Tablet / Phone
   ========================================== */

:root{
  --bg: #05060a;
  --fg: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.68);
  --muted2: rgba(255,255,255,.54);

  --cyan: #4de1ff;
  --violet: #7a5cff;

  --shadow: 0 20px 60px rgba(0,0,0,.45);
  --max: 1120px;
}

*{ box-sizing: border-box; }
html,body{ height:100%; }
body{
  margin:0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  letter-spacing: .1px;
  overflow-x: hidden;
}

a{ color: inherit; text-decoration: none; }
img{ max-width: 100%; display: block; }


/* ---- Progressive enhancement for reveals ----
   If JS fails (or file is opened in a restricted context), content must still be visible.
   When JS runs it adds the .js class to <html>, enabling reveal animations safely.
*/
.reveal-on-scroll{ opacity: 1; transform: none; }
html.js .reveal-on-scroll{
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .65s ease, transform .65s ease;
}
html.js .reveal-on-scroll.in-view{ opacity: 1; transform: translateY(0); }

/* ---- Galaxy Background (scroll-down loop) ---- */
.galaxy{
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  overflow: hidden;
  background: radial-gradient(1200px 900px at 18% 8%, rgba(122,92,255,.20), transparent 55%),
              radial-gradient(1200px 900px at 82% 18%, rgba(77,225,255,.17), transparent 55%),
              radial-gradient(1400px 900px at 50% 110%, rgba(77,225,255,.12), transparent 60%),
              radial-gradient(900px 700px at 70% 70%, rgba(122,92,255,.10), transparent 60%),
              linear-gradient(180deg, #03040a 0%, #05060a 45%, #05060a 100%);
}

.stars, .nebula, .noise{
  position: absolute;
  inset: -30% 0;
  transform: translate3d(0,-8%,0);
  will-change: transform;
  animation: scrollDown 14s linear infinite;
}

.stars{
  opacity: .55;
  filter: blur(.15px);
  background:
    radial-gradient(1px 1px at 8% 22%, rgba(255,255,255,.9), transparent 55%),
    radial-gradient(1px 1px at 18% 62%, rgba(255,255,255,.75), transparent 55%),
    radial-gradient(1px 1px at 32% 12%, rgba(255,255,255,.85), transparent 55%),
    radial-gradient(1px 1px at 44% 48%, rgba(255,255,255,.7), transparent 55%),
    radial-gradient(1px 1px at 56% 74%, rgba(255,255,255,.9), transparent 55%),
    radial-gradient(1px 1px at 67% 35%, rgba(255,255,255,.65), transparent 55%),
    radial-gradient(1px 1px at 78% 82%, rgba(255,255,255,.8), transparent 55%),
    radial-gradient(1px 1px at 86% 18%, rgba(255,255,255,.78), transparent 55%),
    radial-gradient(1px 1px at 92% 55%, rgba(255,255,255,.9), transparent 55%),
    radial-gradient(1px 1px at 12% 86%, rgba(255,255,255,.62), transparent 55%);
}

.nebula{
  opacity: .95;
  mix-blend-mode: screen;
  filter: blur(18px);
}

.nebula--a{
  animation-duration: 16s;
  background:
    radial-gradient(900px 620px at 24% 46%, rgba(122,92,255,.26), transparent 60%),
    radial-gradient(820px 560px at 72% 40%, rgba(77,225,255,.22), transparent 62%),
    radial-gradient(700px 520px at 62% 78%, rgba(122,92,255,.18), transparent 65%);
}

.nebula--b{
  opacity: .75;
  animation-duration: 20s;
  background:
    radial-gradient(900px 620px at 30% 18%, rgba(77,225,255,.14), transparent 62%),
    radial-gradient(840px 560px at 70% 72%, rgba(122,92,255,.15), transparent 64%),
    radial-gradient(700px 520px at 52% 56%, rgba(77,225,255,.10), transparent 66%);
}

.noise{
  opacity: .10;
  background-image:
    repeating-linear-gradient(0deg,
      rgba(255,255,255,.10) 0px,
      rgba(255,255,255,.10) 1px,
      rgba(0,0,0,0) 2px,
      rgba(0,0,0,0) 4px);
  mix-blend-mode: overlay;
  filter: blur(0.25px);
  animation-duration: 12s;
  animation-timing-function: linear;
}

@keyframes scrollDown{
  0%{ transform: translate3d(-1.5%,-14%,0); }
  100%{ transform: translate3d(1.5%,14%,0); }
}

/* ---- Layout ---- */
.container{
  width: min(var(--max), calc(100% - 48px));
  margin: 0 auto;
}

.main{
  position: relative;
  z-index: 1;
}

/* Each section behaves like a “page” */
.section{
  min-height: 100svh;
  padding: 110px 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.section--hero{ padding-top: 140px; }
.section--final{ padding-bottom: 130px; }

.center{ text-align: center; }

/* ---- Header ---- */
.header{
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: linear-gradient(180deg, rgba(5,6,10,.72) 0%, rgba(5,6,10,.42) 100%);
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.header__inner{
  width: min(var(--max), calc(100% - 48px));
  margin: 0 auto;
  padding: 14px 0;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
  position: relative;
}

.brand{
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 240px;
}

.brand__logo{
  width: 40px;
  height: 40px;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,.4);
}

.brand__name{
  font-weight: 700;
  letter-spacing: 1.4px;
  font-size: 14px;
}
.brand__sub{
  font-size: 12px;
  color: var(--muted2);
  margin-top: 2px;
}

.nav{
  display: inline-flex;
  align-items: center;
  gap: 18px;
}

.nav__link{
  font-size: 14px;
  color: rgba(255,255,255,.78);
  padding: 8px 10px;
  border-radius: 12px;
  transition: transform .18s ease, background .18s ease, color .18s ease;
}

.nav__link:hover{
  color: rgba(255,255,255,.96);
  background: rgba(255,255,255,.06);
  transform: translateY(-1px);
}

/* Hover panel */
.panel{
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: 320px;
  opacity: 0;
  transform: translateY(-8px) scale(.98);
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
  background: linear-gradient(180deg, rgba(255,255,255,.10) 0%, rgba(255,255,255,.06) 100%);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 18px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  padding: 14px;
}

.header:hover .panel,
.header:focus-within .panel{
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.panel__top{
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,.10);
}

.panel__logo{
  width: 38px;
  height: 38px;
  border-radius: 12px;
}

.panel__title{
  font-weight: 700;
  letter-spacing: .8px;
  font-size: 13px;
}
.panel__hint{
  font-size: 12px;
  color: var(--muted2);
  margin-top: 2px;
}

.panel__links{
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding-top: 12px;
}

.iconlink{
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(0,0,0,.18);
  border: 1px solid rgba(255,255,255,.10);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.iconlink img{
  width: 18px;
  height: 18px;
  opacity: .95;
}

.iconlink span{
  font-size: 13px;
  color: rgba(255,255,255,.86);
}

.iconlink:hover{
  transform: translateY(-1px);
  border-color: rgba(77,225,255,.35);
  box-shadow: 0 0 0 1px rgba(77,225,255,.10), 0 18px 55px rgba(0,0,0,.35);
}

/* ---- Hero (clean, centered) ---- */
.hero{ width: 100%; }
.hero--center{
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 14px;
}

.hero__title{
  display: grid;
  gap: 10px;
}

.hero__line{
  display: block;
}

.hero__title{
  font-size: clamp(44px, 5.8vw, 74px);
  line-height: 1.03;
  margin: 0;
  letter-spacing: -1.0px;
  text-shadow: 0 30px 120px rgba(0,0,0,.55);
  opacity: 0;
  transform: translateY(14px);
  animation: heroIn .7s ease forwards;
  animation-delay: .12s;
  max-width: 16ch;
}

.hero__claim{
  font-size: clamp(17px, 2.0vw, 22px);
  color: rgba(255,255,255,.84);
  margin: 0;
  max-width: 70ch;
  opacity: 0;
  transform: translateY(12px);
  animation: heroIn .7s ease forwards;
  animation-delay: .26s;
}

.hero__support{
  font-size: 15px;
  color: var(--muted);
  margin: 0;
  max-width: 70ch;
  opacity: 0;
  transform: translateY(10px);
  animation: heroIn .7s ease forwards;
  animation-delay: .38s;
}

.hero__cta{
  display: flex;
  justify-content: center;
  opacity: 0;
  transform: translateY(10px);
  animation: heroIn .7s ease forwards;
  animation-delay: .50s;
  margin-top: 10px;
}

@keyframes heroIn{ to{ opacity: 1; transform: translateY(0); } }

/* ---- Section Head ---- */
.section__head{ margin-bottom: 26px; }
.section__title{
  margin: 0 0 10px;
  font-size: 30px;
  letter-spacing: -0.4px;
}
.section__subtitle{
  margin: 0 auto;
  color: var(--muted);
  max-width: 72ch;
}

/* ---- Ecosystem Timeline (horizontal reveal) ---- */
.timeline{
  position: relative;
  width: min(980px, 100%);
  margin: 0 auto;
  padding: 34px 24px 26px;
  border-radius: 32px;
  background: linear-gradient(180deg, rgba(255,255,255,.08) 0%, rgba(255,255,255,.05) 100%);
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 35px 110px rgba(0,0,0,.42);
  overflow: hidden;

  
  

  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-items: start;
}



.timeline__rail{
  position: absolute;
  left: 10%;
  right: 10%;
  top: 58px;
  height: 1px;
  background: linear-gradient(90deg,
    rgba(77,225,255,.55),
    rgba(255,255,255,.14),
    rgba(122,92,255,.45));
  opacity: .90;
}

.step{
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 10px;
  padding: 10px 12px;
}

.step__node{
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.22);
  box-shadow: 0 0 0 8px rgba(77,225,255,.06);
  margin-top: 12px;
}

.step__node--active{
  background: rgba(77,225,255,.60);
  border-color: rgba(77,225,255,.85);
  box-shadow: 0 0 0 10px rgba(77,225,255,.12), 0 0 44px rgba(77,225,255,.30);
  animation: pulse 2.2s ease-in-out infinite;
}

.step__label{
  font-size: 12px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: rgba(255,255,255,.62);
}

.step__title{
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.2px;
}

.step__desc{
  margin: 0;
  color: rgba(255,255,255,.72);
  line-height: 1.6;
  max-width: 30ch;
}

.step--active .step__title{ text-shadow: 0 0 30px rgba(77,225,255,.18); }

@keyframes pulse{
  0%,100%{ transform: scale(1); }
  50%{ transform: scale(1.10); }
}

/* ---- Manifesto ---- */
.manifesto{
  width: min(900px, 100%);
  margin: 0 auto;
  padding: 30px 28px;
  border-radius: 32px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.10);
  box-shadow: 0 35px 90px rgba(0,0,0,.35);
  text-align: center;
}

.manifesto p{
  margin: 0;
  color: rgba(255,255,255,.78);
  line-height: 1.85;
  font-size: 16px;
}
.manifesto p + p{ margin-top: 16px; }


/* ---- Ecosystem Map Card ---- */
.mapCard{
  width: min(900px, 100%);
  margin: 28px auto 0;
  padding: 18px 18px;
  border-radius: 32px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.10);
  box-shadow: 0 35px 90px rgba(0,0,0,.35);
}

.mapCard--embedded{ margin-top: 26px; }

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

/* ---- Cards / Grid ---- */
.grid{
  width: min(980px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(12, minmax(0,1fr));
  gap: 16px;
  align-items: stretch;
}

.card{
  grid-column: span 6;
  border-radius: 32px;
  padding: 26px;
  background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.04));
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 35px 110px rgba(0,0,0,.35);
  text-align: center;
}

.card--wide{
  grid-column: span 12;
  display: grid;
  gap: 14px;
  justify-items: center;
}

.card__kicker{
  font-size: 12px;
  letter-spacing: 1.6px;
  color: rgba(255,255,255,.62);
  text-transform: uppercase;
}

.cmd{
  margin-top: 10px;
  display: inline-flex;
  border-radius: 16px;
  padding: 10px 12px;
  background: rgba(0,0,0,.22);
  border: 1px solid rgba(255,255,255,.10);
  width: fit-content;
}

.cmd__prompt{
  font-weight: 700;
  letter-spacing: .2px;
  color: rgba(255,255,255,.88);
}

.card__p{
  margin: 12px 0 0;
  color: rgba(255,255,255,.74);
  line-height: 1.7;
  max-width: 70ch;
}

.card__p--big{
  margin-top: 0;
  font-size: 18px;
  color: rgba(255,255,255,.84);
}

.card__ctaRow{
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ---- Buttons ---- */
.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 18px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.88);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
  user-select: none;
}

.btn:hover{
  transform: translateY(-1px);
  border-color: rgba(255,255,255,.20);
  box-shadow: 0 18px 55px rgba(0,0,0,.38);
}

.btn--primary{
  background: linear-gradient(180deg, rgba(77,225,255,.22), rgba(122,92,255,.10));
  border-color: rgba(77,225,255,.30);
  box-shadow: 0 0 0 1px rgba(77,225,255,.10), 0 30px 90px rgba(0,0,0,.42);
}

.btn--primary:hover{
  border-color: rgba(77,225,255,.55);
  box-shadow: 0 0 0 1px rgba(77,225,255,.14), 0 35px 120px rgba(0,0,0,.46);
}

.btn--subtle{ background: rgba(0,0,0,.18); }

/* ---- Final CTA ---- */
.final__glass{
  width: min(900px, 100%);
  margin: 0 auto;
  border-radius: 36px;
  padding: 42px 34px;
  background: linear-gradient(180deg, rgba(255,255,255,.09), rgba(255,255,255,.05));
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 40px 130px rgba(0,0,0,.45);
  text-align: center;
}

.final__title{
  margin: 0 0 10px;
  font-size: 34px;
  letter-spacing: -0.3px;
}

.final__sub{
  margin: 0 0 22px;
  color: rgba(255,255,255,.72);
}

.final__title--small{
  font-size: 26px;
  margin: 0 0 10px;
}

.final__sub--small{
  font-size: 16px;
  margin: 0 0 22px;
}

/* ---- Footer ---- */
.footer{
  padding: 34px 0 46px;
  border-top: 1px solid rgba(255,255,255,.06);
  background: rgba(0,0,0,.10);
}

.footer__inner{
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.footer__brand{
  font-weight: 700;
  letter-spacing: 1.2px;
}

.footer__muted{
  color: rgba(255,255,255,.60);
  font-size: 13px;
  margin-top: 6px;
}

.footer__right{
  display: flex;
  gap: 14px;
  align-items: center;
}

.footer__link{
  color: rgba(255,255,255,.72);
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.04);
  transition: transform .18s ease, border-color .18s ease;
}

.footer__link:hover{
  transform: translateY(-1px);
  border-color: rgba(77,225,255,.30);
}


/* ---- Responsive ---- */
@media (max-width: 900px){
  .header__inner{
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 12px 0;
  }
  .nav{
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 8px;
  }
  .panel{
    right: auto;
    left: 0;
  }
  .section{ padding: 96px 0; }
  .timeline__rail{ left: 8%; right: 8%; }
}

@media (max-width: 720px){
  /* Mobile background: deep-space cinematic gradient (soft blur + subtle motion) */
  .galaxy{
    background: #050A14;
  }
  .galaxy::before{
    content: "";
    position: absolute;
    inset: -22%;
    background:
      radial-gradient(900px 700px at 14% 12%, rgba(36, 30, 92, .72), transparent 62%),
      radial-gradient(980px 760px at 86% 34%, rgba(31, 109, 122, .66), transparent 64%),
      radial-gradient(1050px 820px at 58% 112%, rgba(44, 62, 122, .55), transparent 66%),
      radial-gradient(780px 620px at 84% 54%, rgba(58, 140, 161, .35), transparent 70%),
      radial-gradient(1200px 900px at 45% 55%, rgba(11, 22, 48, .70), transparent 72%);
    filter: blur(120px);
    opacity: 1;
    transform: translate3d(-2%, -2%, 0) scale(1.12);
    animation: mobileNebulaDrift 14s ease-in-out infinite alternate;
    pointer-events: none;
  }
  .stars, .nebula, .noise{ display: none; }

  /* Mobile header: keep brand + sections in one horizontal strip */
  .header__inner{
    grid-template-columns: auto 1fr;
    gap: 10px;
    align-items: center;
  }

  .brand{
    min-width: 0;
    gap: 10px;
  }
  .brand__logo{
    width: 30px;
    height: 30px;
    border-radius: 10px;
  }
  .brand__name{
    font-size: 12px;
    letter-spacing: 1.0px;
    line-height: 1.05;
  }
  .brand__sub{
    font-size: 10px;
    margin-top: 1px;
  }

  .nav{
    /* Start from the beginning (Home) on mobile */
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .nav::-webkit-scrollbar{ display:none; }
  .nav__link{
    font-size: 12px;
    padding: 6px 8px;
    border-radius: 10px;
    white-space: nowrap;
  }

  /* Mobile dropdown: smaller, horizontal strip style */
  .panel{
    width: calc(100vw - 32px);
    padding: 10px;
    border-radius: 16px;
  }
  .panel__top{
    display: none; /* keep it minimal on mobile */
  }
  .panel__links{
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding-top: 0;
  }
  .iconlink{
    justify-content: center;
    padding: 10px 10px;
    border-radius: 14px;
  }
  .iconlink img{
    width: 18px;
    height: 18px;
  }
  .iconlink span{
    font-size: 12px;
  }

  .container{ width: min(var(--max), calc(100% - 32px)); }
  .section--hero{ padding-top: 120px; }
  .hero__title{ max-width: 18ch; }
  .card{ grid-column: span 12; }
  .timeline{
    grid-template-columns: 1fr;
    padding: 28px 18px 22px;
  }
  .timeline__rail{ display: none; }
  .step__desc{ max-width: 42ch; }
}

@media (prefers-reduced-motion: reduce){
  .stars,.nebula,.noise{ animation: none !important; transform: none !important; }
  .hero__title,.hero__claim,.hero__support,.hero__cta{ animation: none !important; opacity: 1 !important; transform: none !important; }
  .reveal-on-scroll{ transition: none !important; opacity: 1 !important; transform: none !important; }
  .timeline{ transition: none !important; clip-path: inset(0 0 0 0 round 32px) !important; }
}



/* ---- Ecosystem Rectangular Chapter Boxes ---- */
.timeline{
  --connector: 44px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--connector);
  padding-top: 44px;
}

.timeline__rail{
  display: none; /* connectors are handled by boxes themselves */
}

.chapterBox{
  position: relative;
  border-radius: 22px;
  padding: 22px 18px 18px;
  background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.04));
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 35px 110px rgba(0,0,0,.30);
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 12px;
  min-height: 150px;
}

/* Connector line between rectangles */
.chapterBox:not(:last-child)::after{
  content: "";
  position: absolute;
  top: 50%;
  right: calc(-1 * var(--connector));
  width: var(--connector);
  height: 2px;
  transform: translateY(-50%);
  background: linear-gradient(90deg, rgba(77,225,255,.55), rgba(255,255,255,.12), rgba(122,92,255,.45));
  opacity: .80;
}

.chapterBox__num{
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 700;
  letter-spacing: .4px;
  background: rgba(0,0,0,.22);
  border: 1px solid rgba(255,255,255,.14);
  color: rgba(255,255,255,.88);
  box-shadow: 0 0 0 8px rgba(77,225,255,.06);
}

.chapterBox__label{
  font-weight: 700;
  letter-spacing: 1.2px;
  font-size: 14px;
  color: rgba(255,255,255,.88);
}

.chapterBox--active{
  border-color: rgba(77,225,255,.26);
  background: linear-gradient(180deg, rgba(77,225,255,.08), rgba(255,255,255,.04));
  box-shadow: 0 0 0 1px rgba(77,225,255,.10), 0 45px 140px rgba(0,0,0,.38);
}

.chapterBox__num--active{
  background: rgba(77,225,255,.18);
  border-color: rgba(77,225,255,.45);
  box-shadow: 0 0 0 10px rgba(77,225,255,.12), 0 0 44px rgba(77,225,255,.30);
  animation: pulse 2.2s ease-in-out infinite;
}

/* Mobile: stack boxes vertically, hide connectors */
@media (max-width: 720px){
  .timeline{
    grid-template-columns: 1fr;
    padding-top: 28px;
    gap: 16px;
  }
  .chapterBox:not(:last-child)::after{ display: none; }
  .chapterBox{ min-height: 120px; }
}

  .timeline__rail{ display: none; }
  .chapterBox{ min-height: 120px; }
}


/* ---- Ecosystem Horizontal Reveal (safe: never hides content if JS fails) ---- */
html.js .timeline{
  /* mask overlay handles the reveal; content stays laid out */
}
.timeline::after{
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 32px;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(5,6,10,.92) 0%, rgba(5,6,10,.78) 45%, rgba(5,6,10,.45) 100%);
  transform-origin: left center;
  transform: scaleX(0); /* by default: no mask */
  transition: transform .9s cubic-bezier(.2,.9,.2,1);
}
html.js .timeline::after{
  transform: scaleX(1); /* with JS: start covered */
}
html.js .timeline.revealed::after{
  transform: scaleX(0); /* reveal left -> right */
}

/* Clickable chapter boxes */
.chapterBox--link{
  cursor: pointer;
}
.chapterBox--link:focus-visible{
  outline: 2px solid rgba(77,225,255,.55);
  outline-offset: 4px;
}
.chapterBox--link:hover{
  transform: translateY(-1px);
  border-color: rgba(255,255,255,.22);
}

/* Mobile deep-space gradient drift */
@keyframes mobileNebulaDrift{
  0%{ transform: translate3d(0,0,0) scale(1.18); }
  50%{ transform: translate3d(2.5%, -1.5%, 0) scale(1.22); }
  100%{ transform: translate3d(-2.5%, 2%, 0) scale(1.18); }
}
