/* Pipelet - pipelet.ai */

:root {
  --bg:          #0a0f1a;
  --bg-alt:      #0c1220;
  --panel:       #0e1524;
  --panel-2:     #111a2c;
  --line:        #1b2740;
  --line-soft:   #162034;
  --text:        #e8eef8;
  --text-dim:    #9fb0c8;
  --text-mute:   #6c7f9a;
  --cyan:        #22d3ee;
  --cyan-deep:   #0891a8;
  --cyan-glow:   rgba(34, 211, 238, 0.10);
  --amber:       #f0b34a;
  --green:       #3ecf8e;
  --radius:      10px;
  --maxw:        1140px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }

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

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 28px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--cyan);
  color: #04121a;
  padding: 10px 18px;
  font-weight: 600;
  z-index: 200;
}
.skip:focus { left: 12px; top: 12px; }

/* ---------- Typography ---------- */

h1, h2, h3, h4 {
  line-height: 1.2;
  margin: 0 0 0.6em;
  letter-spacing: -0.02em;
  font-weight: 600;
}

h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); letter-spacing: -0.035em; }
h2 { font-size: clamp(1.55rem, 3vw, 2.15rem); letter-spacing: -0.03em; }
h3 { font-size: 1.15rem; }

p { margin: 0 0 1.1em; }

.lede {
  font-size: clamp(1.05rem, 2vw, 1.28rem);
  color: var(--text-dim);
  line-height: 1.6;
  max-width: 62ch;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cyan);
  margin: 0 0 1rem;
  display: block;
}

.muted { color: var(--text-dim); }
.small { font-size: 0.875rem; }
.mono  { font-family: var(--mono); }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 15, 26, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 66px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 600;
  font-size: 1.08rem;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}
.brand:hover { text-decoration: none; }

.brand-mark {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  gap: 30px;
  align-items: center;
  margin-left: auto;
}

.nav-links a {
  color: var(--text-dim);
  font-size: 0.92rem;
  font-weight: 500;
}
.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav-links a[aria-current="page"] { color: var(--text); }

/* `.nav-links a` outranks `.btn-primary` on specificity - restore button colors. */
.nav-links a.btn-primary { color: #04121a; }
.nav-links a.btn-primary:hover { color: #04121a; }
.nav-links a.btn-ghost { color: var(--text); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 7px;
  padding: 7px 11px;
  font-size: 0.9rem;
  cursor: pointer;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  padding: 11px 22px;
  border-radius: 7px;
  font-size: 0.92rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}
.btn:hover { text-decoration: none; }

.btn-primary {
  background: var(--cyan);
  color: #04121a;
}
.btn-primary:hover { background: #4ce0f5; }

.btn-ghost {
  border-color: var(--line);
  color: var(--text);
  background: transparent;
}
.btn-ghost:hover { border-color: var(--cyan-deep); color: var(--cyan); }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  border-bottom: 1px solid var(--line-soft);
  overflow: hidden;
  background:
    radial-gradient(900px 420px at 82% 26%, rgba(34, 211, 238, 0.13), transparent 68%),
    radial-gradient(760px 380px at 4% 92%, rgba(34, 211, 238, 0.055), transparent 70%),
    var(--bg);
}

/* Dot grid, fading out toward the bottom. Pure CSS - no image request. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(34, 211, 238, 0.28) 1.15px, transparent 1.15px);
  background-size: 30px 30px;
  -webkit-mask-image: radial-gradient(105% 120% at 88% 0%, #000 0%, rgba(0,0,0,.45) 45%, transparent 78%);
  mask-image: radial-gradient(105% 120% at 88% 0%, #000 0%, rgba(0,0,0,.45) 45%, transparent 78%);
  opacity: 0.9;
  pointer-events: none;
  z-index: 0;
}

/* Metrics promoted into the hero */
.hero-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 40px;
  border-top: 1px solid var(--line);
  padding-top: 26px;
  max-width: 880px;
}

.hero-metrics > div {
  padding-right: 24px;
  border-right: 1px solid var(--line);
}
.hero-metrics > div + div { padding-left: 24px; }
.hero-metrics > div:last-child { border-right: none; padding-right: 0; }

.hero-metrics b {
  display: block;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 1.2;
  white-space: nowrap;
}
/* The unit sits inline inside the value - it must not inherit the block
   display used by the label span below. */
.hero-metrics b .unit {
  display: inline;
  font-size: 0.95rem;
  color: var(--text-dim);
}

.hero-metrics > div > span {
  display: block;
  font-size: 0.8rem;
  color: var(--text-mute);
  margin-top: 5px;
  line-height: 1.4;
}

@media (max-width: 860px) {
  .hero-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 0; }
  .hero-metrics > div:nth-child(2n) { border-right: none; padding-right: 0; }
  .hero-metrics > div:nth-child(2n+1) { padding-left: 0; }
  .hero-metrics b { font-size: 1.32rem; }
}

@media (max-width: 420px) {
  .hero-metrics { grid-template-columns: 1fr; gap: 18px 0; }
  .hero-metrics > div { border-right: none; padding: 0 !important; }
}

.hero .wrap {
  position: relative;
  z-index: 1;
  padding-top: 104px;
  padding-bottom: 104px;
}

.hero-inner { max-width: 790px; }
.hero .lede { max-width: 52ch; }

.hero h1 { margin-bottom: 0.5em; }
.hero h1 .accent {
  background: linear-gradient(96deg, var(--cyan), #7de9f7);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Sections ---------- */

section { padding: 84px 0; }
section.tight { padding: 60px 0; }
section.alt { background: var(--bg-alt); border-block: 1px solid var(--line-soft); }

.section-head { max-width: 68ch; margin-bottom: 46px; }

.page-head {
  padding: 76px 0 52px;
  border-bottom: 1px solid var(--line-soft);
  background:
    radial-gradient(760px 300px at 18% 0%, rgba(34, 211, 238, 0.07), transparent 70%),
    var(--bg);
}

/* ---------- Grid + cards ---------- */

.grid { display: grid; gap: 22px; }
/* Grid/flex items default to min-width:auto, which lets wide tables blow out
   the page instead of scrolling inside their wrapper. */
.grid > *, .flow > * { min-width: 0; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
}

.card h3 { margin-bottom: 0.5em; }
.card p:last-child { margin-bottom: 0; }
.card p { color: var(--text-dim); font-size: 0.945rem; }

.card-num {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--cyan);
  letter-spacing: 0.14em;
  display: block;
  margin-bottom: 14px;
}

/* ---------- Metrics ---------- */

.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.metric {
  background: var(--panel);
  padding: 26px 22px;
}

.metric .val {
  font-size: 1.95rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 1.1;
  display: block;
}
.metric .val .unit { font-size: 1rem; color: var(--text-dim); font-weight: 500; }

.metric .lbl {
  font-size: 0.83rem;
  color: var(--text-dim);
  margin-top: 8px;
  display: block;
}

/* ---------- Table ---------- */

.table-wrap {
  overflow-x: auto;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.93rem;
  min-width: 560px;
}

th, td {
  text-align: left;
  padding: 15px 20px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
}

th {
  background: var(--panel-2);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
}

td { color: var(--text-dim); }
td strong { color: var(--text); font-weight: 600; }
tr:last-child td { border-bottom: none; }

/* ---------- Status pills ---------- */

.pill {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 100px;
  border: 1px solid;
  white-space: nowrap;
}
.pill-now     { color: var(--green); border-color: rgba(62, 207, 142, 0.35); background: rgba(62, 207, 142, 0.08); }
.pill-progress{ color: var(--amber); border-color: rgba(240, 179, 74, 0.35);  background: rgba(240, 179, 74, 0.08); }
.pill-planned { color: var(--text-mute); border-color: var(--line); background: transparent; }

/* ---------- Lists ---------- */

.ticks { list-style: none; padding: 0; margin: 0; }
.ticks li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 13px;
  color: var(--text-dim);
  font-size: 0.95rem;
}
.ticks li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--cyan);
  opacity: 0.75;
}
.ticks li strong { color: var(--text); font-weight: 600; }

/* ---------- Callout ---------- */

.callout {
  border: 1px solid var(--line);
  border-left: 3px solid var(--cyan);
  background: var(--cyan-glow);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 22px 26px;
}
.callout p:last-child { margin-bottom: 0; }
.callout p { color: var(--text-dim); }

/* ---------- Flow diagram ---------- */

.flow {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 12px;
}

.flow-step {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  position: relative;
}
.flow-step .n {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--cyan);
  letter-spacing: 0.14em;
  display: block;
  margin-bottom: 10px;
}
.flow-step h4 { font-size: 0.98rem; margin-bottom: 0.4em; }
.flow-step p { font-size: 0.87rem; color: var(--text-dim); margin: 0; }

/* ---------- CTA ---------- */

.cta {
  background:
    radial-gradient(700px 260px at 50% 0%, rgba(34, 211, 238, 0.10), transparent 70%),
    var(--bg-alt);
  border-top: 1px solid var(--line-soft);
  text-align: center;
}
.cta .lede { margin-inline: auto; }
.cta .btn-row { justify-content: center; }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line-soft);
  padding: 54px 0 40px;
  background: var(--bg);
  font-size: 0.9rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-grid h4 {
  font-size: 0.75rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 16px;
  font-weight: 600;
}

.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 10px; }
.footer-grid a { color: var(--text-dim); }
.footer-grid a:hover { color: var(--text); }

.footer-bottom {
  border-top: 1px solid var(--line-soft);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  color: var(--text-mute);
  font-size: 0.83rem;
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .grid-3, .grid-4, .metrics, .flow { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .wrap { padding: 0 20px; }
  section { padding: 60px 0; }
  .hero .wrap { padding-top: 76px; padding-bottom: 76px; }

  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 66px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--panel);
    border-bottom: 1px solid var(--line);
    padding: 8px 20px 16px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 0; width: 100%; font-size: 1rem; }
  .nav-links .btn { margin-top: 10px; }
}

@media (max-width: 560px) {
  .grid-2, .grid-3, .grid-4, .metrics, .flow { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .metric { padding: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

@media print {
  .site-header, .cta, #hero-canvas, .btn-row { display: none; }
  body { background: #fff; color: #000; }
}

/* ---------- Figures / diagrams ---------- */

.figure {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 10px;
  margin: 0;
}
.figure img { width: 100%; height: auto; border-radius: 6px; display: block; }
.figure figcaption {
  color: var(--text-mute);
  font-size: 0.83rem;
  padding: 12px 8px 4px;
  text-align: center;
}
