/* ──────────────────────────────────────────────────────────────
   e.bs landing page — flowing layout + current animation
   ────────────────────────────────────────────────────────────── */

:root {
  --color-accent:       #E30613;
  --color-accent-light: #F9D2D5;
  --color-bg-primary:   #FFFFFF;
  --color-bg-dark:      #0F0F0F;
  --color-text-primary: #000000;
  --color-text-secondary: #7A7A7A;
  --color-text-muted:   #BBBBBB;
  --color-border:       #E6E6E6;

  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 40px;
  --space-xl: 64px;
  --space-2xl: 96px;
  --space-3xl: 160px;

  --radius: 6px;
  --radius-pill: 999px;
  --shadow-dock: 0 6px 20px rgba(0,0,0,0.2);

  --font-display: "PP Supply Sans", "Supply Sans", "Neue Haas Grotesk Display", "Inter", system-ui, sans-serif;
  --font-body:    "Simplon Norm", "Simplon", "Inter", -apple-system, system-ui, sans-serif;

  --col-max: 1400px;
}

.h1 { font-family: var(--font-display); font-weight: 500; font-size: clamp(56px, 7vw, 112px); line-height: 0.98; letter-spacing: -2.5px; }
.h2 { font-family: var(--font-display); font-weight: 500; font-size: clamp(42px, 4.5vw, 72px); line-height: 1; letter-spacing: -1.4px; }
.h3 { font-family: var(--font-display); font-weight: 500; font-size: clamp(28px, 2.6vw, 44px); line-height: 1.05; letter-spacing: -0.6px; }
.h4 { font-family: var(--font-display); font-weight: 500; font-size: 24px; line-height: 1.1; letter-spacing: -0.2px; }
.body-lg { font-family: var(--font-body); font-size: clamp(18px, 1.3vw, 22px); line-height: 1.45; }
.body    { font-family: var(--font-body); font-size: 17px; line-height: 1.55; }
.caption { font-family: var(--font-body); font-size: 14px; line-height: 1.5; color: var(--color-text-secondary); }
.eyebrow { font-family: var(--font-body); font-size: 12px; line-height: 1; color: var(--color-accent); letter-spacing: 1.5px; text-transform: uppercase; font-weight: 500; }

html {
  overflow-x: hidden;
}
body {
  margin: 0; padding: 0;
  width: 100%;
  overflow-x: hidden;
  background: var(--color-bg-primary);
  color: var(--color-text-primary);
  font-family: var(--font-body);
  font-size: 17px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
a { color: inherit; text-decoration: none; cursor: pointer; }
img, video { display: block; max-width: 100%; }
button { font-family: inherit; }

/* ───── Page shell — single flowing document ───── */
.page {
  position: relative;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

/* ───── Current-flow canvas — spans entire page, fixed on the edge ───── */
.current-rail {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 60px;
  width: 2px;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}
.current-rail::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom,
    transparent 0%,
    rgba(227,6,19,0.08) 6%,
    rgba(227,6,19,0.18) 50%,
    rgba(227,6,19,0.08) 94%,
    transparent 100%);
}
.current-rail::after {
  content: '';
  position: absolute;
  left: -1px;
  top: 0;
  width: 4px;
  height: 80px;
  background: linear-gradient(to bottom, transparent, var(--color-accent), transparent);
  filter: blur(1px);
  animation: railPulse 4s linear infinite;
}
@keyframes railPulse {
  0%   { top: -80px; opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}
.rail-node {
  position: absolute;
  left: -5px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--color-accent);
  box-shadow: 0 0 0 4px rgba(227,6,19,0.1);
}

/* Electrons traveling down the rail (contained within rail bounds) */
.electron {
  position: absolute;
  left: -3px;
  top: 0;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--color-accent);
  box-shadow: 0 0 12px rgba(227,6,19,0.8), 0 0 24px rgba(227,6,19,0.4);
  animation: electronFall 6s linear infinite;
  will-change: top;
}
.electron:nth-child(2) { animation-delay: -1.5s; }
.electron:nth-child(3) { animation-delay: -3s; }
.electron:nth-child(4) { animation-delay: -4.5s; }
@keyframes electronFall {
  0%   { top: 0; opacity: 0; }
  5%   { opacity: 1; }
  95%  { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

/* ───── Nav pills ───── */
/* Logo — floating pill that scrolls with the page (top of page, position: absolute) */
.nav-logo-static {
  position: fixed;
  top: 24px;
  left: 24px;
  z-index: 50;
  display: flex;
  align-items: center;
  padding: 12px 18px;
  background: rgba(255,255,255,0.7);
  border: 1px solid rgba(255,255,255,0.4);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow-dock);
  border-radius: var(--radius-pill);
}
.nav-logo-static img { height: 30px; width: auto; display: block; }

/* Slim side-dock — minimal vertical tick marks on the right */
.nav-dock-slim {
  position: fixed;
  top: 50%;
  right: 24px;
  transform: translateY(-50%);
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 0;
  background: transparent;
  border: none;
  pointer-events: auto;
}
.nav-dock-slim::before {
  /* invisible hover-hit area so labels reveal on hover of the dock zone */
  content: '';
  position: absolute;
  top: -10px; bottom: -10px; right: -8px; left: -40px;
  pointer-events: auto;
}
.nav-dock-slim .dock-item {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  background: transparent; border: none; padding: 0; cursor: pointer;
  justify-content: flex-end;
}
.nav-dock-slim .dock-indicator {
  width: 18px; height: 2px; border-radius: 0;
  /* Mid-grey: visible on both white and near-black backgrounds. */
  background: #9A9A9A;
  transition: width 0.25s ease, background 0.25s ease;
}
.nav-dock-slim .dock-item[aria-current="true"] .dock-indicator {
  background: var(--color-accent);
  width: 28px;
  height: 2px;
}
.nav-dock-slim .dock-item:hover .dock-indicator {
  background: var(--color-accent);
}
.nav-dock-slim .dock-label {
  font-family: var(--font-body); font-size: 11px;
  /* Mid-grey label works on both bg tones too. */
  color: #9A9A9A;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.2s ease;
  letter-spacing: 0.3px;
}
.nav-dock-slim .dock-item[aria-current="true"] .dock-label,
.nav-dock-slim .dock-item:hover .dock-label { opacity: 1; }
.nav-dock-slim .dock-item[aria-current="true"] .dock-label { color: var(--color-accent); }

/* ───── Section layout — flowing, content-sized ───── */
.section {
  position: relative;
  padding: var(--space-3xl) 120px;
  z-index: 2;
  overflow: hidden;
}
.section--tight   { padding: var(--space-2xl) 120px; }
.section--dark    { background: var(--color-bg-dark); color: #fff; }
.section--dark .caption { color: var(--color-text-muted); }
.section--dark .eyebrow { color: var(--color-accent); }

.section-inner {
  max-width: var(--col-max);
  margin-left: 0;
  padding-left: 80px; /* leave room for rail */
}
.section-inner--wide { max-width: none; }

/* Anchor-style index label (01/02/03…) next to headings */
.section-index {
  position: absolute;
  top: var(--space-3xl);
  left: 120px;
  transform: translateX(-100%);
  padding-right: 24px;
  font-family: var(--font-body);
  font-size: 12px;
  letter-spacing: 1.5px;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  /* keep the label simple — skip vertical mode if wrapping is ugly */
}

/* ───── Hero ───── */
.hero {
  position: relative;
  min-height: 100vh;
  padding: 160px 120px 120px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 80px;
  z-index: 2;
  overflow: hidden;
}
.hero-inner { max-width: var(--col-max); padding-left: 80px; }
.hero-title { max-width: 1400px; text-wrap: balance; }
.hero-sub   { max-width: 900px; color: var(--color-text-secondary); margin-top: 24px; }

.hero-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
  margin-top: 60px;
  max-width: 1100px;
}
.stat-num {
  font-family: var(--font-display); font-weight: 500; font-size: 80px; line-height: 1;
  letter-spacing: -2px; color: #000;
}
.stat-num .unit { font-size: 26px; color: var(--color-accent); margin-left: 6px; }

/* ───── Cards & UI primitives ───── */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--color-accent); color: #fff;
  border-radius: var(--radius);
  padding: 18px 26px;
  font-family: var(--font-display); font-weight: 500; font-size: 20px; line-height: 1;
  border: none; cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}
.btn-primary:hover { transform: translateY(-1px); background: #c80410; }
.btn-secondary {
  display: inline-flex; align-items: center; gap: 10px;
  background: transparent; color: inherit;
  border: 1px solid currentColor;
  border-radius: var(--radius);
  padding: 18px 26px;
  font-family: var(--font-body); font-weight: 500; font-size: 17px;
  cursor: pointer;
}

.card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 32px;
  background: #fff;
}
.section--dark .card { border-color: rgba(255,255,255,0.12); background: transparent; color: #fff; }

.chip {
  display: inline-flex; align-items: center;
  background: var(--color-accent); color: #fff;
  padding: 8px 14px;
  border-radius: var(--radius);
  font-family: var(--font-body); font-size: 11px; font-weight: 500;
  letter-spacing: 1.2px; text-transform: uppercase;
}

.media {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
}
.media video, .media img { width: 100%; height: 100%; object-fit: cover; display: block; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-xl); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-lg); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-md); }

.rule { height: 1px; background: var(--color-border); width: 100%; }
.section--dark .rule { background: rgba(255,255,255,0.12); }

/* Reveal */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.8s cubic-bezier(.2,.7,.2,1), transform 0.8s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: translateY(0); }

/* Flow connector — short SVG line between sections with animated pulse */
.flow-connect {
  position: relative;
  height: 120px;
  margin: 0 120px;
  padding-left: 80px;
  pointer-events: none;
}
.flow-connect svg { height: 100%; width: 100%; }
.flow-pulse { stroke-dasharray: 4 8; animation: dashFlow 2s linear infinite; }
@keyframes dashFlow { to { stroke-dashoffset: -24; } }

/* Architecture flow — horizontal nodes connected by animated wires */
.arch-flow {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0;
  margin-top: 40px;
  position: relative;
}
.arch-node {
  padding: 24px 20px;
  border: 1px solid var(--color-border);
  border-right: none;
  background: #fff;
  min-height: 180px;
  position: relative;
}
.arch-node:first-child { border-top-left-radius: var(--radius); border-bottom-left-radius: var(--radius); }
.arch-node:last-child { border-right: 1px solid var(--color-border); border-top-right-radius: var(--radius); border-bottom-right-radius: var(--radius); }
.arch-node .n { font-family: var(--font-display); font-size: 32px; color: var(--color-accent); line-height: 1; }
.arch-node .l { font-family: var(--font-display); font-size: 18px; margin-top: 12px; font-weight: 500; }
.arch-node .d { font-size: 13px; color: var(--color-text-secondary); margin-top: 8px; line-height: 1.4; }
.arch-node::after {
  content: '';
  position: absolute;
  right: -6px; top: 50%;
  width: 10px; height: 10px;
  border-top: 2px solid var(--color-accent);
  border-right: 2px solid var(--color-accent);
  transform: translateY(-50%) rotate(45deg);
  z-index: 2;
  opacity: 0.8;
}
.arch-node:last-child::after { display: none; }
.arch-flow { overflow: hidden; border-radius: var(--radius); }

/* Animated current line on architecture */
.arch-wire {
  position: absolute;
  left: 20px; right: 20px; top: calc(50% - 1px);
  height: 2px;
  background: linear-gradient(to right, transparent, var(--color-accent), var(--color-accent), transparent);
  background-size: 200% 100%;
  animation: wireFlow 3s linear infinite;
  opacity: 0.35;
  z-index: 1;
}
@keyframes wireFlow { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* Flow-phase ring (sustainability) */
.phase-card {
  position: relative;
  padding: 32px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
}
.phase-card[data-active="true"] { border-color: var(--color-accent); box-shadow: 0 0 0 3px rgba(227,6,19,0.08); }
.phase-card .phase-n { font-family: var(--font-display); font-size: 40px; color: var(--color-accent); line-height: 1; }
.phase-card .phase-l { font-size: 12px; color: var(--color-text-secondary); letter-spacing: 1.2px; text-transform: uppercase; margin-top: 16px; }
.phase-card .phase-t { font-family: var(--font-display); font-size: 22px; margin-top: 8px; font-weight: 500; }
.phase-card .phase-y { font-size: 13px; color: var(--color-accent); margin-top: 10px; font-weight: 500; }
.phase-card .phase-d { font-size: 14px; color: var(--color-text-secondary); margin-top: 10px; line-height: 1.5; }

/* Use-case tile */
.uc-tile { border-top: 1px solid var(--color-border); padding-top: 24px; }
.uc-tile .icon { color: var(--color-accent); margin-bottom: 18px; }

/* Specs */
.spec-row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 12px 0;
  border-top: 1px solid var(--color-border);
}
.spec-row:first-child { border-top: none; }
.spec-row .k { font-size: 14px; color: var(--color-text-secondary); }
.spec-row .v { font-family: var(--font-display); font-size: 17px; font-weight: 500; color: #000; }

/* ───── Footer ───── */
.footer {
  background: #0F0F0F;
  color: #fff;
  padding: 80px 120px 40px;
  position: relative;
  z-index: 2;
}
.footer-top { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 64px; padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.footer h4 { font-family: var(--font-display); font-size: 14px; margin: 0 0 18px; color: rgba(255,255,255,0.6); font-weight: 500; letter-spacing: 1px; text-transform: uppercase; }
.footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer ul a { font-size: 15px; color: rgba(255,255,255,0.75); }
.footer ul a:hover { color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 32px; font-size: 13px; color: rgba(255,255,255,0.5); }


/* ──────────────────────────────────────────────────────────────
   Horizontal-scrollbar guard — defence in depth.
   Any absolutely-positioned decoration (::after arrows on arch-node,
   arch-wire background, box-shadows on electrons) can nudge layout
   width during reveal animations. Clip at every containing block.
   ────────────────────────────────────────────────────────────── */
html, body { overflow-x: hidden !important; }
.page, .hero, .section, .footer, .section-inner, .arch-flow {
  max-width: 100vw;
  overflow-x: clip;
}
