:root {
  --ink: #0b1220;
  --blue: #0554be;
  --blue-hover: #033f8f;
  --body: #4b5565;
  --muted: #5b6474;
  --subtle: #8a93a3;
  --chip: #334155;
  --border-strong: #e2e6ec;
  --border: #e7e9ee;
  --border-faint: #eef0f3;
  --ok-bg: #f0fdf4;
  --ok: #15803d;
  --error: #c2410c;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; background: #fff; -webkit-font-smoothing: antialiased; }
body { font-family: 'Geist', system-ui, sans-serif; color: var(--ink); }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-hover); }
input, button { font-family: inherit; font-size: inherit; }
[hidden] { display: none !important; }

@keyframes kflow { to { stroke-dashoffset: -240; } }
@keyframes kring { 0% { r: 5; opacity: 0.6; } 100% { r: 22; opacity: 0; } }
@keyframes kpulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

.page {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: #fff;
  overflow: hidden;
}

/* Background pipe diagram */
.bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}
.pipes path {
  fill: none;
  stroke: var(--blue);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.45;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1800ms var(--ease-out) calc(var(--i) * 120ms);
}
.flow path {
  fill: none;
  stroke: var(--blue);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 1 23;
  opacity: 0.9;
  animation: kflow 3.4s linear infinite;
  transition: opacity 600ms ease calc(1600ms + var(--i) * 80ms);
}
.node { transition: opacity 600ms ease calc(1400ms + var(--i) * 100ms); }
.node .ring {
  fill: none;
  stroke: var(--blue);
  stroke-width: 1;
  animation: kring 2.2s ease-out infinite;
  animation-delay: calc(var(--i) * 0.35s);
}
.node .core { fill: #fff; stroke: var(--blue); stroke-width: 2; }
.node text { font-family: 'Geist Mono', monospace; font-size: 13px; fill: var(--subtle); }

/* Header */
.header {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 24px clamp(20px, 4vw, 40px);
  background: linear-gradient(#fff 70%, rgba(255, 255, 255, 0));
}
.logo { display: block; height: 34px; width: auto; }
.lang {
  display: flex;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
}
.lang button {
  padding: 6px 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
}
.lang button[aria-pressed="true"] { background: var(--ink); color: #fff; }

/* Main */
.main {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px 48px;
}
.col {
  width: 100%;
  max-width: 760px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 26px;
}
.rise { margin: 0; width: 100%; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  font-size: 13px;
  color: var(--body);
}
.pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--blue);
  animation: kpulse 1.6s infinite;
}

h1 {
  font-size: clamp(40px, 7vw, 84px);
  line-height: 1.02;
  font-weight: 400;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-wrap: balance;
}
.h1a { font-weight: 500; letter-spacing: -0.05em; }
.h1b {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--blue);
}

.lead {
  font-size: clamp(16px, 1.6vw, 19px);
  line-height: 1.6;
  color: var(--body);
  max-width: 56ch;
  text-wrap: pretty;
}

/* Signup */
.form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 6px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 20px 50px -30px rgba(5, 84, 190, 0.35);
}
.email {
  flex: 1 1 200px;
  min-width: 0;
  padding: 12px 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-size: 15px;
  outline: none;
}
.submit {
  flex: 0 0 auto;
  padding: 12px 22px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
}
.submit:hover { background: var(--blue); }
.submit:disabled { cursor: default; opacity: 0.7; }
.form:focus-within { border-color: var(--blue); }
.hp { position: absolute; left: -9999px; }
.note { margin: 12px 0 0; font-size: 13px; color: var(--subtle); }
.error { margin: 8px 0 0; font-size: 13px; color: var(--error); }

.success {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  border-radius: 999px;
  background: var(--ok-bg);
  color: var(--ok);
  font-size: 15px;
  font-weight: 500;
}
.check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--ok);
  color: #fff;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

@media (max-width: 420px) {
  .form { border-radius: 24px; }
  .submit { flex: 1 1 100%; }
  .success { border-radius: 24px; }
}

.chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.chips li {
  padding: 8px 14px;
  border: 1px solid var(--border-faint);
  border-radius: 999px;
  background: #fff;
  font-size: 13.5px;
  color: var(--chip);
}

.contact {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  color: var(--body);
}
.contact a { font-size: 17px; font-weight: 500; }

/* Footer */
.footer {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 20px clamp(20px, 4vw, 40px);
  border-top: 1px solid var(--border-faint);
  background: rgba(255, 255, 255, 0.85);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  font-size: 13px;
  color: var(--subtle);
}
.mono { font-family: 'Geist Mono', monospace; font-size: 12px; }

/* Entrance: hidden start state only when JS runs, so content shows if it fails */
.rise {
  transition: opacity 800ms ease var(--d), transform 1000ms var(--ease-out) var(--d);
}
.js .page:not(.on) .rise { opacity: 0; transform: translateY(16px); }
.js .page:not(.on) .pipes path { stroke-dashoffset: 1; }
.js .page:not(.on) .flow path { opacity: 0; }
.js .page:not(.on) .node { opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  .rise, .pipes path, .flow path, .node { transition: none !important; }
  .js .page:not(.on) .rise,
  .js .page:not(.on) .flow path,
  .js .page:not(.on) .node { opacity: 1; transform: none; }
  .js .page:not(.on) .pipes path { stroke-dashoffset: 0; }
  .flow path, .node .ring, .pulse { animation: none; }
  .node .ring { opacity: 0; }
}
