
:root {
  --paper: #fafaf8;
  --ink: #141414;
  --soft: #5a5a57;
  --line: #e4e4e0;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font: 400 1rem/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 2px; }

/* Shared containers */
.site-header .inner,
.site-footer .inner,
.legal {
  width: min(100% - 3rem, 46rem);
  margin: 0 auto;
}
.home-page .site-header .inner,
.home-page .site-footer .inner,
.hero {
  width: min(100% - 3rem, 68rem);
  margin: 0 auto;
}

.site-header .inner { padding: 1.5rem 0; }
.site-header .wordmark { display: block; width: 128px; height: auto; }

/* Home page */
.hero {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 3rem;
  padding: 2rem 0 4rem;
}

.hero h1 {
  margin: 0 0 1.25rem;
  font-size: clamp(2.25rem, 4.6vw, 3.5rem);
  line-height: 1.08;
  font-weight: 600;
  letter-spacing: -.025em;
  max-width: 13ch;
  text-wrap: balance;
}

.lede { text-wrap: balance; margin: 0 0 2rem; max-width: 26rem; color: var(--soft); font-size: 1.1875rem; line-height: 1.55; }

.actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.button {
  display: inline-block;
  padding: .6875rem 1.25rem;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 500;
  text-decoration: none;
}
.button:hover { background: #333; border-color: #333; }

/* Integration diagram */
.hero-visual svg {
  display: block;
  width: 100%;
  max-width: 460px;
  height: auto;
  margin-left: auto;
  overflow: visible;
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
}
.hero-visual .orbit,
.hero-visual .links,
.hero-visual .packets,
.hero-visual .badge { pointer-events: none; }

.hero-visual .orbit {
  fill: none;
  stroke: var(--line);
  stroke-width: 1;
  stroke-dasharray: 2 6;
  transform-box: fill-box;
  transform-origin: center;
  animation: spin 120s linear infinite;
}
.hero-visual .links path {
  fill: none;
  stroke: var(--line);
  stroke-width: 1.25;
  transition: stroke .3s, stroke-width .3s;
}
.hero-visual .links path.is-active { stroke: #a3a39e; stroke-width: 1.5; }

.hero-visual .packet { fill: var(--ink); }
.hero-visual .packet-out { fill: #fff; stroke: var(--ink); stroke-width: 1.5; }

/* Hub */
.hero-visual .hub-disc { fill: #fff; stroke: var(--ink); stroke-width: 1.5; }
.hero-visual .shock,
.hero-visual .arc {
  fill: none;
  stroke: var(--ink);
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
}
.hero-visual .shock { stroke-width: 1.25; }
.hero-visual .hub.is-shock .shock { animation: shock .75s cubic-bezier(.2, .7, .3, 1); }
.hero-visual .arc { stroke-width: 2; stroke-linecap: round; stroke-dasharray: 0 100; }
.hero-visual .hub.is-working .arc { animation: work .8s cubic-bezier(.45, 0, .25, 1); }

/* Tools */
.hero-visual .disc { fill: #fff; stroke: var(--line); stroke-width: 1.25; transition: stroke .2s, stroke-width .2s; }
.hero-visual .icon { fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.hero-visual .glyph { transform-box: fill-box; transform-origin: center; }
.hero-visual .node.is-ack .glyph { animation: ack .5s ease-out; }
.hero-visual .badge { opacity: 0; transform: scale(.4); transform-box: fill-box; transform-origin: center; transition: opacity .2s, transform .35s cubic-bezier(.34, 1.56, .64, 1); }
.hero-visual .badge circle { fill: var(--ink); }
.hero-visual .badge path { fill: none; stroke: #fff; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.hero-visual .node.is-done .badge { opacity: 1; transform: scale(1); }

/* Interaction (only present while the script runs) */
.hero-visual .node[role="button"] { cursor: grab; touch-action: none; }
.hero-visual .hub[role="button"] { cursor: pointer; }
.hero-visual svg.is-dragging,
.hero-visual svg.is-dragging .node { cursor: grabbing; }
.hero-visual .node[role="button"]:hover .disc { stroke: var(--ink); }
.hero-visual [role="button"]:focus { outline: none; }
.hero-visual .node:focus-visible .disc { stroke: var(--ink); stroke-width: 2.5; }
.hero-visual .hub:focus-visible .hub-disc { stroke-width: 3; }
.hero-visual svg.is-paused * { animation-play-state: paused !important; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes ack {
  0% { transform: rotate(0) scale(1); }
  30% { transform: rotate(-12deg) scale(1.12); }
  60% { transform: rotate(8deg) scale(1.05); }
  100% { transform: rotate(0) scale(1); }
}
@keyframes shock {
  0% { transform: scale(1); opacity: .55; }
  100% { transform: scale(2.6); opacity: 0; }
}
@keyframes work {
  0% { stroke-dasharray: 0 100; opacity: 1; transform: rotate(-90deg); }
  80% { stroke-dasharray: 100 0; opacity: 1; transform: rotate(270deg); }
  100% { stroke-dasharray: 100 0; opacity: 0; transform: rotate(270deg); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-visual .orbit { animation: none; }
}

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; gap: 2.5rem; padding: 1rem 0 3rem; }
  .hero-visual svg { max-width: 340px; margin: 0 auto; }
}

/* Shared footer */
.site-footer {
  border-top: 1px solid var(--line);
  color: var(--soft);
  font-size: .875rem;
}
.site-footer .inner {
  padding: 1.25rem 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .5rem 1.5rem;
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--ink); text-decoration: underline; }

/* Legal pages */
.legal { flex: 1; padding: 2rem 0 4rem; }
.legal h1 { margin: 0 0 .25rem; font-size: 2rem; line-height: 1.2; letter-spacing: -.01em; }
.legal .meta { margin: 0 0 2.5rem; color: var(--soft); font-size: .9375rem; }
.legal h2 { margin: 2.5rem 0 .75rem; font-size: 1.1875rem; line-height: 1.35; scroll-margin-top: 1rem; }
.legal h3 { margin: 1.5rem 0 .5rem; font-size: 1rem; }
.legal p, .legal ul, .legal address { margin: 0 0 1rem; }
.legal ul { padding-left: 1.25rem; }
.legal li { margin-bottom: .375rem; }
.legal address { font-style: normal; }
.legal .notice { padding: 1rem 1.125rem; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.legal .caps { font-size: .875rem; }

@media print {
  .site-footer { display: none; }
  body { background: #fff; }
}