/* Northflow Automation
   Dark navy rail, luminous blue signal, soft rounded surfaces.
   Motion is springy but purposeful: it shows what changed. */

@view-transition { navigation: auto; }

:root {
  --ink:       #0C1E31;
  --ink-2:     #12293F;
  --paper:     #EDF2F8;
  --surface:   #FFFFFF;
  --signal:    #2F8FF0;
  --glow:      #61B4FF;
  --soft:      rgba(47, 143, 240, 0.12);
  --flag:      #F2854A;
  --muted:     #63788F;
  --rule:      #D7E2EE;
  --on-rail:   #A9C2DB;

  --r-sm: 12px;
  --r:    18px;
  --pill: 999px;

  --spring: cubic-bezier(.34, 1.4, .64, 1);
  --rail: 252px;
  --gutter: clamp(1.25rem, 4vw, 4rem);
  --measure: 36rem;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-2);
  font-family: Archivo, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.6;
}

h1, h2, h3 { margin: 0; font-weight: 800; letter-spacing: -0.03em; line-height: 1.06; }
p { margin: 0; }
a { color: inherit; }

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

/* ================= rail ================= */

.rail {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--rail);
  background: var(--ink);
  color: #fff;
  display: flex;
  flex-direction: column;
  padding: 1.6rem 1.1rem;
  z-index: 40;
  overflow: hidden;
}

.rail::before {
  content: "";
  position: absolute;
  inset: -40% -60% auto -60%;
  height: 78%;
  background: radial-gradient(closest-side, rgba(47,143,240,.5), transparent 72%);
  filter: blur(26px);
  animation: drift 17s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes drift {
  from { transform: translate3d(-8%, 4%, 0) scale(1); }
  to   { transform: translate3d(12%, -8%, 0) scale(1.22); }
}

.brand {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  margin-bottom: 2.2rem;
}
.brand svg { width: 38px; height: 38px; flex: none; }
.brand b { font-size: 1.2rem; font-weight: 800; letter-spacing: -0.03em; display: block; line-height: 1.1; }
.brand span { display: block; font-size: 0.63rem; font-weight: 600; color: var(--on-rail); letter-spacing: 0.2em; }

.orbit { transform-origin: 40px 36px; animation: orbit 9s linear infinite; }
@keyframes orbit { to { transform: rotate(360deg); } }

nav { position: relative; display: flex; flex-direction: column; gap: 0.2rem; }

nav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.66rem 0.85rem;
  border-radius: var(--r-sm);
  color: var(--on-rail);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.98rem;
  transition: color .22s ease, background .22s ease, transform .3s var(--spring);
}
nav a:hover { color: #fff; background: rgba(255,255,255,.07); transform: translateX(3px); }
nav a[aria-current="page"] { color: #fff; background: rgba(47,143,240,.22); }

nav a .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--signal);
  opacity: 0; transform: scale(.4);
  transition: opacity .3s ease, transform .35s var(--spring);
}
nav a[aria-current="page"] .dot { opacity: 1; transform: scale(1); box-shadow: 0 0 10px var(--glow); }

.rail-foot { position: relative; margin-top: auto; padding-top: 1.5rem; }
.rail-foot p { font-size: 0.85rem; color: var(--on-rail); margin-bottom: 0.7rem; line-height: 1.45; }

.rail-cta {
  display: block;
  text-align: center;
  background: var(--signal);
  color: #fff;
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
  padding: 0.7rem 1rem;
  border-radius: var(--pill);
  transition: transform .3s var(--spring), box-shadow .3s ease;
}
.rail-cta:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(47,143,240,.4); }

.rail-toggle {
  display: none;
  position: fixed;
  top: 0.85rem; right: 0.85rem;
  z-index: 60;
  min-width: 46px; height: 46px; padding: 0 0.95rem;
  border: 0; border-radius: var(--r-sm);
  background: var(--ink); color: #fff;
  font-size: 1.05rem; font-weight: 700; line-height: 1;
  cursor: pointer;
}

/* ================= page shell ================= */

.page { margin-left: var(--rail); min-height: 100vh; }
.inner { max-width: 1000px; padding: clamp(2.2rem, 5vw, 4rem) var(--gutter) 5rem; }

.rise { animation: rise .6s var(--spring) both; }
.rise:nth-of-type(2) { animation-delay: .07s; }
.rise:nth-of-type(3) { animation-delay: .13s; }
.rise:nth-of-type(4) { animation-delay: .19s; }
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

.lede { font-size: clamp(1.02rem, 1.6vw, 1.13rem); color: var(--muted); max-width: var(--measure); margin-top: 1.15rem; }

h1.big { font-size: clamp(1.9rem, 4.2vw, 3.05rem); max-width: 24ch; }
h2.sec { font-size: clamp(1.45rem, 2.8vw, 2.05rem); max-width: 26ch; }

.spacer { height: clamp(2.4rem, 5.5vw, 3.8rem); }

.aura { position: relative; z-index: 0; }
.aura::before {
  content: "";
  position: absolute;
  top: -30%; left: -14%;
  width: 56%; aspect-ratio: 1;
  background: radial-gradient(closest-side, rgba(97,180,255,.45), transparent 70%);
  filter: blur(16px);
  animation: drift 21s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: -1;
}

/* ================= cards ================= */

.card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r);
  padding: clamp(1.3rem, 2.5vw, 1.8rem);
}

.grid { display: grid; gap: 1.1rem; }
.grid.two   { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.card h3 { font-size: 1.12rem; font-weight: 700; margin-bottom: 0.5rem; }
.card p  { color: var(--muted); }

.lift { transition: transform .35s var(--spring), box-shadow .35s ease, border-color .3s ease; }
.lift:hover { transform: translateY(-4px); border-color: rgba(47,143,240,.5); box-shadow: 0 14px 34px rgba(12,30,49,.1); }

.glyph {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: var(--pill);
  background: var(--soft);
  color: var(--signal);
  font-weight: 800; font-size: 0.95rem;
  margin-bottom: 0.9rem;
}

/* ================= sorter ================= */

.sorter {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 1.1rem;
}

.panel, .result {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r);
  padding: clamp(1.3rem, 2.5vw, 1.7rem);
}

.panel > h2, .result > h2 {
  font-size: 0.83rem; font-weight: 700; color: var(--muted);
  letter-spacing: 0; margin-bottom: 0.9rem;
}

textarea {
  width: 100%; min-height: 150px; resize: vertical;
  padding: 0.95rem 1rem;
  border: 1px solid var(--rule);
  border-radius: var(--r-sm);
  background: #FAFCFE; color: var(--ink-2);
  font: inherit; font-size: 1rem; line-height: 1.55;
  transition: border-color .2s ease, box-shadow .25s ease;
}
textarea::placeholder { color: #9AAABC; }
textarea:focus { outline: none; border-color: var(--signal); box-shadow: 0 0 0 4px var(--soft); }

.examples { margin-top: 0.95rem; display: flex; flex-wrap: wrap; gap: 0.45rem; }
.examples span { flex: 1 0 100%; font-size: 0.88rem; color: var(--muted); margin-bottom: 0.15rem; }

.chip {
  font: inherit; font-size: 0.86rem; font-weight: 600;
  color: var(--ink-2); background: var(--paper);
  border: 1px solid var(--rule); border-radius: var(--pill);
  padding: 0.3rem 0.76rem; cursor: pointer;
  transition: transform .3s var(--spring), border-color .2s ease, color .2s ease;
}
.chip:hover { transform: translateY(-2px); border-color: var(--signal); color: var(--signal); }
.chip:active { transform: scale(.95); }

.go {
  margin-top: 1.2rem; width: 100%;
  font: inherit; font-size: 1rem; font-weight: 700;
  color: #fff; background: var(--ink-2);
  border: 0; border-radius: var(--pill);
  padding: 0.85rem 1.4rem; cursor: pointer;
  transition: transform .3s var(--spring), box-shadow .3s ease, background .25s ease;
}
.go:hover { background: var(--signal); transform: translateY(-2px); box-shadow: 0 10px 26px rgba(47,143,240,.36); }
.go:active { transform: scale(.98); }
.go[disabled] { background: var(--muted); cursor: progress; transform: none; box-shadow: none; }

.empty { color: var(--muted); max-width: 30ch; font-size: 1.03rem; }
.notice { color: var(--muted); }

.tags { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-bottom: 1.1rem; }

.tag {
  font-size: 0.84rem; font-weight: 700;
  padding: 0.3rem 0.75rem; border-radius: var(--pill);
  background: var(--paper); color: var(--ink-2);
  border: 1px solid var(--rule);
  animation: pop .45s var(--spring) both;
}
.tag:nth-child(2) { animation-delay: .09s; }
.tag[data-level="High"]   { background: var(--flag); border-color: var(--flag); color: #3A1B06; }
.tag[data-level="Medium"] { background: var(--soft); border-color: rgba(47,143,240,.4); color: #0E4A85; }
@keyframes pop {
  from { opacity: 0; transform: scale(.7); }
  to   { opacity: 1; transform: none; }
}

.field { border-top: 1px solid var(--rule); padding-top: 0.9rem; margin-top: 0.9rem; }
.field:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.field h3 { font-size: 0.82rem; font-weight: 700; color: var(--muted); margin-bottom: 0.35rem; }
.field p { max-width: 46ch; }

.reply { background: #FAFCFE; border: 1px solid var(--rule); border-radius: var(--r-sm); padding: 1rem; }

.copy {
  margin-top: 0.75rem;
  font: inherit; font-size: 0.88rem; font-weight: 600;
  color: var(--ink-2); background: transparent;
  border: 1px solid var(--rule); border-radius: var(--pill);
  padding: 0.38rem 0.9rem; cursor: pointer;
  transition: border-color .2s ease, color .2s ease, transform .3s var(--spring);
}
.copy:hover { border-color: var(--signal); color: var(--signal); transform: translateY(-1px); }

.arrive { animation: rise .42s var(--spring) both; }

.pulse { display: inline-flex; gap: 5px; vertical-align: middle; margin-left: 6px; }
.pulse i { width: 6px; height: 6px; border-radius: 50%; background: var(--signal); animation: bounce 1s ease-in-out infinite; }
.pulse i:nth-child(2) { animation-delay: .15s; }
.pulse i:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 0%,100% { transform: translateY(0); opacity: .45; } 50% { transform: translateY(-5px); opacity: 1; } }

/* ================= misc ================= */

.quote { color: var(--muted); font-style: italic; max-width: 40ch; margin-bottom: 1rem; }
.out { border-top: 1px solid var(--rule); padding-top: 1rem; max-width: 46ch; }

.list { display: grid; gap: 0.6rem; margin-top: 1.3rem; padding: 0; list-style: none; }
.list li { display: flex; gap: 0.7rem; align-items: flex-start; color: var(--muted); }
.list li::before {
  content: ""; flex: none; margin-top: .55rem;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--signal); box-shadow: 0 0 0 4px var(--soft);
}

.mail {
  display: inline-block; margin-top: 1.6rem;
  font-size: 1.01rem; font-weight: 700;
  color: #fff; background: var(--ink-2);
  border-radius: var(--pill); padding: 0.85rem 1.6rem;
  text-decoration: none;
  transition: transform .3s var(--spring), box-shadow .3s ease, background .25s ease;
}
.mail:hover { background: var(--signal); transform: translateY(-2px); box-shadow: 0 12px 30px rgba(47,143,240,.36); }

label.fld { display: block; font-size: 0.87rem; font-weight: 700; color: var(--muted); margin-bottom: 0.35rem; }
input.fld, select.fld {
  width: 100%; padding: 0.8rem 1rem;
  border: 1px solid var(--rule); border-radius: var(--r-sm);
  background: #FAFCFE; font: inherit; color: var(--ink-2);
  transition: border-color .2s ease, box-shadow .25s ease;
}
input.fld:focus, select.fld:focus { outline: none; border-color: var(--signal); box-shadow: 0 0 0 4px var(--soft); }
.stack { display: grid; gap: 1rem; }

.foot { color: var(--muted); font-size: 0.89rem; padding-top: 2.4rem; }

/* ================= responsive ================= */

@media (max-width: 980px) {
  .sorter, .grid.two, .grid.three { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 820px) {
  .rail {
    transform: translateX(-100%);
    transition: transform .38s var(--spring);
    width: min(84vw, 300px);
    box-shadow: 0 0 60px rgba(0,0,0,.35);
  }
  body.rail-open .rail { transform: none; }
  .rail-toggle { display: block; }
  .page { margin-left: 0; }
  .inner { padding-top: 4.6rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition-duration: .01ms !important;
  }
}

/* ================= scroll reveal ================= */

.reveal { opacity: 0; transform: translateY(18px); }
.reveal.seen { animation: rise .62s var(--spring) both; }
.reveal.d1.seen { animation-delay: .08s; }
.reveal.d2.seen { animation-delay: .16s; }
.reveal.d3.seen { animation-delay: .24s; }

/* ================= pipeline ================= */

.pipe {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.7rem;
  background: var(--ink);
  border-radius: var(--r);
  padding: 1.5rem 1.3rem;
  overflow: hidden;
}
.pipe::after {
  content: "";
  position: absolute;
  inset: auto -30% -55% -30%;
  height: 70%;
  background: radial-gradient(closest-side, rgba(47,143,240,.45), transparent 70%);
  filter: blur(24px);
  animation: drift 19s ease-in-out infinite alternate;
  pointer-events: none;
}
.stage {
  position: relative;
  z-index: 1;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--r-sm);
  padding: 0.85rem 0.9rem;
  background: rgba(255,255,255,.04);
}
.stage b { display: block; color: #fff; font-size: 0.93rem; font-weight: 700; }
.stage span { display: block; color: var(--on-rail); font-size: 0.8rem; line-height: 1.4; margin-top: 0.2rem; }
.stage i {
  position: absolute; inset: 0;
  border-radius: var(--r-sm);
  box-shadow: inset 0 0 0 1.5px var(--signal);
  opacity: 0;
  animation: sweep 6s ease-in-out infinite;
}
.stage:nth-child(1) i { animation-delay: 0s; }
.stage:nth-child(2) i { animation-delay: 1.5s; }
.stage:nth-child(3) i { animation-delay: 3s; }
.stage:nth-child(4) i { animation-delay: 4.5s; }
@keyframes sweep {
  0%, 100% { opacity: 0; }
  6%, 20%  { opacity: 1; }
  30%      { opacity: 0; }
}

/* ================= calculator ================= */

.calc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .85fr); gap: 1.1rem; }

.dials { display: grid; gap: 1.35rem; }
.dial label { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; font-size: 0.92rem; font-weight: 600; color: var(--muted); margin-bottom: 0.45rem; }
.dial label b { font-size: 1.12rem; font-weight: 800; color: var(--ink-2); font-variant-numeric: tabular-nums; }

input[type="range"] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 6px; border-radius: var(--pill);
  background: linear-gradient(to right, var(--signal) var(--pct, 40%), var(--rule) var(--pct, 40%));
  cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 22px; height: 22px; border-radius: 50%;
  background: #fff; border: 3px solid var(--signal);
  box-shadow: 0 2px 10px rgba(47,143,240,.45);
  transition: transform .25s var(--spring);
}
input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.18); }
input[type="range"]::-moz-range-thumb {
  width: 22px; height: 22px; border-radius: 50%;
  background: #fff; border: 3px solid var(--signal);
}

.readout {
  background: var(--ink);
  border-radius: var(--r);
  padding: 1.5rem 1.4rem;
  color: #fff;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.readout::before {
  content: "";
  position: absolute; inset: -50% -40% auto -40%; height: 90%;
  background: radial-gradient(closest-side, rgba(47,143,240,.5), transparent 72%);
  filter: blur(26px); animation: drift 15s ease-in-out infinite alternate;
}
.readout > * { position: relative; }
.readout .big-num {
  font-size: clamp(2.3rem, 5vw, 3.2rem);
  font-weight: 800; letter-spacing: -0.04em; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.readout .unit { color: var(--on-rail); font-size: 0.92rem; margin-top: 0.3rem; }
.readout hr { border: 0; border-top: 1px solid rgba(255,255,255,.15); margin: 1.2rem 0; }
.readout .sub { font-size: 1.35rem; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.readout .fine { color: var(--on-rail); font-size: 0.8rem; line-height: 1.5; margin-top: 1.1rem; }

/* ================= picker ================= */

.picker { display: grid; gap: 1.4rem; }
.opts { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.opt {
  font: inherit; font-size: 0.92rem; font-weight: 600;
  color: var(--ink-2); background: var(--surface);
  border: 1px solid var(--rule); border-radius: var(--pill);
  padding: 0.5rem 1rem; cursor: pointer;
  transition: transform .3s var(--spring), border-color .2s ease, background .2s ease, color .2s ease;
}
.opt:hover { transform: translateY(-2px); border-color: var(--signal); }
.opt[aria-pressed="true"] {
  background: var(--signal); border-color: var(--signal); color: #fff;
  box-shadow: 0 6px 18px rgba(47,143,240,.32);
}
.opt:active { transform: scale(.96); }

.picked { display: grid; gap: 0.8rem; }
.match {
  background: var(--surface); border: 1px solid var(--rule);
  border-left: 4px solid var(--signal);
  border-radius: var(--r-sm); padding: 1.05rem 1.2rem;
  animation: pop .45s var(--spring) both;
}
.match:nth-child(2) { animation-delay: .08s; }
.match:nth-child(3) { animation-delay: .16s; }
.match b { display: block; font-size: 1.04rem; font-weight: 700; margin-bottom: 0.25rem; }
.match span { color: var(--muted); font-size: 0.96rem; }

/* ================= accordion ================= */

.qa { border-top: 1px solid var(--rule); }
.qa:last-of-type { border-bottom: 1px solid var(--rule); }

.qa button {
  width: 100%; text-align: left;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  font: inherit; font-size: 1.05rem; font-weight: 700; color: var(--ink-2);
  background: transparent; border: 0; padding: 1.15rem 0; cursor: pointer;
  transition: color .2s ease;
}
.qa button:hover { color: var(--signal); }
.qa button::after {
  content: ""; flex: none;
  width: 11px; height: 11px;
  border-right: 2.5px solid currentColor; border-bottom: 2.5px solid currentColor;
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform .35s var(--spring);
}
.qa button[aria-expanded="true"]::after { transform: rotate(225deg) translate(-3px, -3px); }

.qa .ans {
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows .38s var(--spring);
}
.qa button[aria-expanded="true"] + .ans { grid-template-rows: 1fr; }
.qa .ans > div { overflow: hidden; }
.qa .ans p { color: var(--muted); max-width: 62ch; padding-bottom: 1.2rem; }

/* ================= service rows ================= */

.svc {
  display: grid; grid-template-columns: minmax(0,.9fr) minmax(0,1.1fr);
  gap: 1.2rem; align-items: start;
  background: var(--surface); border: 1px solid var(--rule);
  border-radius: var(--r); padding: clamp(1.2rem, 2.4vw, 1.7rem);
  transition: transform .35s var(--spring), box-shadow .35s ease, border-color .3s ease;
}
.svc:hover { transform: translateY(-3px); border-color: rgba(47,143,240,.45); box-shadow: 0 14px 34px rgba(12,30,49,.09); }
.svc h3 { font-size: 1.18rem; font-weight: 800; margin-bottom: 0.4rem; }
.svc .tagline { color: var(--signal); font-weight: 600; font-size: 0.92rem; }
.svc p { color: var(--muted); }
.svc .eg {
  margin-top: 0.85rem; padding: 0.8rem 0.95rem;
  background: var(--paper); border-radius: var(--r-sm);
  font-size: 0.93rem; color: var(--ink-2);
}
.svc .eg b { color: var(--muted); font-weight: 700; display: block; font-size: 0.8rem; margin-bottom: 0.25rem; }

/* ================= stats ================= */

.stats { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 1.1rem; }
.stat { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); padding: 1.35rem; }
.stat b { display: block; font-size: 2rem; font-weight: 800; letter-spacing: -0.04em; color: var(--signal); font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: 0.95rem; display: block; margin-top: 0.3rem; }

@media (max-width: 980px) {
  .calc, .svc { grid-template-columns: minmax(0, 1fr); }
  .pipe { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}

/* ================= billboard ================= */

.billboard {
  position: relative;
  background: var(--ink);
  border-radius: var(--r);
  overflow: hidden;
  color: #fff;
}
.billboard::before {
  content: "";
  position: absolute;
  inset: -45% -35% auto -35%;
  height: 120%;
  background: radial-gradient(closest-side, rgba(47,143,240,.42), transparent 72%);
  filter: blur(30px);
  animation: drift 20s ease-in-out infinite alternate;
  pointer-events: none;
}

.bb-inner {
  position: relative;
  padding: clamp(1.6rem, 3.6vw, 2.6rem);
  display: grid;
  gap: 1.6rem;
}

/* every slide shares one grid cell, so the panel never jumps height */
.bb-stage { display: grid; }
.bb-slide {
  grid-area: 1 / 1;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .55s ease, transform .55s var(--spring);
  pointer-events: none;
}
.bb-slide.is-on { opacity: 1; transform: none; pointer-events: auto; }

.bb-tag {
  display: inline-block;
  font-size: 0.8rem; font-weight: 700;
  color: var(--glow);
  border: 1px solid rgba(97,180,255,.45);
  background: rgba(47,143,240,.14);
  padding: 0.26rem 0.72rem;
  border-radius: var(--pill);
  margin-bottom: 1rem;
  justify-self: start;
}

.bb-slide h2 {
  font-size: clamp(1.45rem, 3.1vw, 2.2rem);
  max-width: 20ch;
  color: #fff;
}
.bb-slide p {
  margin-top: 0.85rem;
  max-width: 44ch;
  color: #C8DAEC;
  font-size: clamp(1rem, 1.5vw, 1.09rem);
}

.bb-bars { display: flex; gap: 0.45rem; }
.bb-bars button {
  flex: 1 1 0;
  height: 4px;
  padding: 0;
  border: 0;
  border-radius: var(--pill);
  background: rgba(255,255,255,.11);
  cursor: pointer;
  overflow: hidden;
  position: relative;
}
.bb-bars button i {
  position: absolute; inset: 0 auto 0 0;
  width: 0;
  background: var(--signal);
  border-radius: var(--pill);
}
.bb-bars button {
  transition: background .3s ease, box-shadow .3s ease, transform .3s ease;
}

/* the slide you are on: a slightly lighter track and a fill that sweeps across */
.bb-bars button[aria-current="true"] {
  background: rgba(255,255,255,.18);
}
.bb-bars button[aria-current="true"] i {
  width: 100%;
  transition: width var(--dwell, 6s) linear;
}

/* slides already shown: filled but dimmed, so you can see where you are in the set */
.bb-bars button.done i { width: 100%; opacity: .2; transition: none; }

.bb-bars button:hover { background: rgba(255,255,255,.24); }
.bb-bars button:hover i { opacity: .55; }

/* ================= rail active indicator ================= */

.rail nav { --y: 0px; }
.rail nav::before {
  content: "";
  position: absolute;
  left: 0; top: 0;
  width: 3px; height: 40px;
  border-radius: var(--pill);
  background: var(--glow);
  box-shadow: 0 0 12px var(--glow);
  transform: translateY(var(--y));
  transition: transform .34s cubic-bezier(.22, .61, .36, 1), opacity .25s ease;
  opacity: var(--ind, 0);
  will-change: transform;
}

/* placed instantly on first paint, so it never slides in from the top */
.rail nav.no-anim::before { transition: none; }

/* ================= refinements ================= */

.sec-mark {
  display: block;
  width: 34px; height: 3px;
  border-radius: var(--pill);
  background: var(--signal);
  margin-bottom: 1rem;
  transform-origin: left;
  animation: stretch .6s var(--spring) both;
}
@keyframes stretch { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.card.lift:hover, .svc:hover { box-shadow: 0 14px 34px rgba(12,30,49,.1), 0 0 0 1px rgba(47,143,240,.25); }

.readout .big-num, .readout .sub { transition: color .3s ease; }

.tile {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-sm);
  padding: 1rem 1.1rem;
  transition: transform .32s var(--spring), border-color .25s ease, box-shadow .32s ease;
}
.tile:hover { transform: translateY(-3px); border-color: rgba(47,143,240,.5); box-shadow: 0 10px 26px rgba(12,30,49,.08); }
.tile b { display: block; font-size: 1rem; font-weight: 700; }
.tile span { display: block; color: var(--muted); font-size: 0.92rem; margin-top: 0.22rem; line-height: 1.5; }

.tiles { display: grid; gap: 0.75rem; grid-template-columns: repeat(3, minmax(0,1fr)); }

@media (max-width: 980px) {
  .tiles { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 640px) {
  .tiles { grid-template-columns: minmax(0,1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .bb-slide { transition: none; }
  .bb-bars button[aria-current="true"] i { transition: none; }
}

/* ---- billboard: the artifact each automation produces ---- */

.bb-slide { grid-template-columns: minmax(0, 1fr) minmax(0, .92fr); gap: 1.8rem; align-items: center; }
.bb-slide.is-on { display: grid; }
.bb-slide:not(.is-on) { display: grid; visibility: hidden; }

.bb-copy { display: grid; align-content: center; }
.bb-art { display: grid; gap: 0.55rem; align-content: center; }
.bb-art > small { color: #8FAFCC; font-size: 0.78rem; font-weight: 600; }

.bubble {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 16px 16px 16px 5px;
  padding: 0.9rem 1.05rem;
  color: #E6EFF8;
  font-size: 0.95rem;
  line-height: 1.55;
  max-width: 34ch;
}
.bb-slide.is-on .bubble { animation: bubble .6s var(--spring) .18s both; }
@keyframes bubble {
  from { opacity: 0; transform: translateY(10px) scale(.97); }
  to   { opacity: 1; transform: none; }
}

.stars { display: flex; gap: 3px; color: var(--flag); font-size: 1.05rem; letter-spacing: 2px; }

.mini { display: grid; gap: 0.4rem; }
.mini div {
  display: flex; align-items: center; gap: 0.55rem;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px;
  padding: 0.5rem 0.7rem;
  font-size: 0.86rem;
  color: #D6E5F4;
}
.mini b {
  font-size: 0.72rem; font-weight: 700;
  padding: 0.14rem 0.5rem; border-radius: var(--pill);
  background: rgba(47,143,240,.22); color: var(--glow);
  border: 1px solid rgba(97,180,255,.35);
  flex: none;
}
.mini div[data-hot] b { background: var(--flag); color: #3A1B06; border-color: var(--flag); }
.bb-slide.is-on .mini div { animation: pop .5s var(--spring) both; }
.bb-slide.is-on .mini div:nth-child(2) { animation-delay: .09s; }
.bb-slide.is-on .mini div:nth-child(3) { animation-delay: .18s; }

@media (max-width: 860px) {
  .bb-slide { grid-template-columns: minmax(0, 1fr); gap: 1.3rem; }
  .bubble { max-width: none; }
}


/* ================= home showcase ================= */

:root { --cyan: #46D5E8; }

.showcase {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 8% -10%, #16405F 0%, transparent 55%),
    radial-gradient(90% 80% at 95% 110%, #0B3A4A 0%, transparent 55%),
    #08172A;
  padding: clamp(1.8rem, 4vw, 3.2rem);
  color: #fff;
  isolation: isolate;
}

.showcase canvas {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
}

.showcase > * { position: relative; z-index: 1; }

.showcase h1 {
  font-size: clamp(1.85rem, 4vw, 3rem);
  max-width: 24ch;
  color: #fff;
}
.showcase .lede { color: #B7D0E4; max-width: 40ch; }

/* headline words stagger in once, on load */
.word { display: inline-block; animation: word .7s cubic-bezier(.22,.61,.36,1) both; }
@keyframes word {
  from { opacity: 0; transform: translateY(20px) rotate(2deg); }
  to   { opacity: 1; transform: none; }
}

.showcase .billboard {
  margin-top: clamp(1.6rem, 3vw, 2.4rem);
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.1);
  backdrop-filter: blur(2px);
}
.showcase .billboard::before { opacity: .55; }
.showcase .bb-tag { color: var(--cyan); border-color: rgba(70,213,232,.4); background: rgba(70,213,232,.12); }
.showcase .bb-bars button i { background: rgba(150,200,235,.7); }

/* ================= spotlight tiles ================= */

.tile { position: relative; overflow: hidden; }
.tile::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: radial-gradient(180px circle at var(--mx, 50%) var(--my, 50%), rgba(47,143,240,.16), transparent 62%);
  opacity: 0;
  transition: opacity .3s ease;
  pointer-events: none;
}
.tile:hover::before { opacity: 1; }
.tile > * { position: relative; }

/* ================= scroll progress ================= */

.scrollbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  z-index: 70;
  background: transparent;
  pointer-events: none;
}
.scrollbar i {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, rgba(47,143,240,.55), rgba(70,213,232,.55));
}

@media (max-width: 820px) { .scrollbar { left: 0; } }

@media (prefers-reduced-motion: reduce) {
  .word { animation: none; }
  .showcase canvas { display: none; }
}
