:root {
  --ink: #0B1517;
  --line: #1E3236;
  --plan: #2A4A50;
  --plan-hi: #4F7C84;
  --text: #EAF2F3;
  --soft: #C4D5D8;
  --muted: #AFC3C7;
  --dim: #93AAAF;
  --accent: #00A5BD;
  --accent-hi: #3CC6DA;
  --coral: #FF8A5B;
}

* { box-sizing: border-box; }
html { color-scheme: dark; }
html, body { overflow-x: clip; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background-color: var(--ink);
  background-image: radial-gradient(#1A2A2E 1.2px, transparent 1.2px);
  background-size: 18px 18px;
  color: var(--text);
  font: 17px/1.55 ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); }
a:hover { color: var(--accent-hi); }
a:focus-visible { outline: 2px solid var(--coral); outline-offset: 3px; border-radius: 6px; }

.top, main, .foot { position: relative; width: 100%; max-width: 1160px; margin: 0 auto; padding-left: 20px; padding-right: 20px; }

.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 20px; padding-bottom: 20px; }
.brand { display: inline-flex; align-items: center; min-height: 44px; }
.brand img { display: block; height: 24px; width: auto; }

.langs { display: flex; gap: 2px; padding: 2px; border: 1px solid #2A3E42; border-radius: 999px; background: rgba(11, 21, 23, 0.7); }
.langs a { position: relative; display: inline-flex; align-items: center; justify-content: center; min-width: 28px; height: 16px; padding: 0 7px; border-radius: 999px; color: var(--soft); text-decoration: none; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; line-height: 1; }
/* The visible pill is small; this keeps a comfortable 40px-tall tap area around each language */
.langs a::after { content: ""; position: absolute; inset: -12px 0; }
.langs a:hover { color: var(--text); background: #13232A; }
.langs a[aria-current="page"] { background: var(--accent); color: var(--ink); }

main { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr); align-content: center; gap: 40px; padding-top: 16px; padding-bottom: 56px; }
@media (min-width: 900px) {
  main { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); align-items: center; gap: 64px; padding-bottom: 72px; }
}

.intro { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; }

h1 { margin: 0; font-weight: 700; font-size: clamp(40px, 9.5vw, 68px); line-height: 1; letter-spacing: -0.035em; max-width: 12ch; text-wrap: balance; }
@media (min-width: 900px) { h1 { font-size: clamp(52px, 5.4vw, 72px); } }

.lead { margin: 0; font-size: clamp(18px, 2vw, 20px); color: var(--muted); max-width: 36ch; }

.btn { display: inline-flex; align-items: center; min-height: 52px; padding: 14px 24px; border-radius: 999px; background: var(--accent); color: var(--ink); font-weight: 600; text-decoration: none; transition: transform 0.15s ease, background-color 0.15s ease; }
.btn:hover { background: var(--accent-hi); color: var(--ink); transform: translateY(-1px); }

/* The construction sheet: four plots marked off like a drawing, with registration corners */
.stage {
  --m: var(--plan-hi);
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  width: 100%;
  max-width: 600px;
  justify-self: center;
  background:
    linear-gradient(var(--m) 0 0) 0 0 / 16px 1.5px,
    linear-gradient(var(--m) 0 0) 0 0 / 1.5px 16px,
    linear-gradient(var(--m) 0 0) 100% 0 / 16px 1.5px,
    linear-gradient(var(--m) 0 0) 100% 0 / 1.5px 16px,
    linear-gradient(var(--m) 0 0) 0 100% / 16px 1.5px,
    linear-gradient(var(--m) 0 0) 0 100% / 1.5px 16px,
    linear-gradient(var(--m) 0 0) 100% 100% / 16px 1.5px,
    linear-gradient(var(--m) 0 0) 100% 100% / 1.5px 16px,
    rgba(11, 21, 23, 0.6);
  background-repeat: no-repeat;
}
@media (min-width: 900px) { .stage { justify-self: end; } }

.zone { min-width: 0; margin: 0; padding: clamp(10px, 2.4vw, 20px); display: flex; flex-direction: column; gap: 10px; }
.zone:nth-child(odd) { border-right: 1px dashed var(--plan); }
.zone:nth-child(-n+2) { border-bottom: 1px dashed var(--plan); }
.zone figcaption { display: flex; align-items: center; gap: 8px; font-size: 14px; line-height: 1.3; color: var(--soft); }

.scene { display: block; width: 100%; height: auto; overflow: visible; }

/* Each piece: finished by default; on a live sheet it waits as a dashed outline until its zone builds */
.scene .p {
  stroke: var(--accent);
  stroke-width: 1.2;
  stroke-dasharray: 3 3;
  stroke-opacity: 0;
  fill-opacity: 1;
  transform-box: fill-box;
  transform-origin: center;
  transition: fill-opacity 0.45s ease, stroke-opacity 0.3s ease, transform 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
  transition-delay: calc(var(--i, 0) * 120ms);
}
.scene .bar { transform-origin: 50% 100%; }
.is-live .zone:not(.building):not(.built) .p { fill-opacity: 0; stroke-opacity: 0.5; transform: scale(0.92); transition-duration: 0.35s; transition-delay: 0s; }
.is-live .zone:not(.building):not(.built) .bar { transform: scaleY(0.2); }

/* Status dot: open ring = plan, coral = being built, teal check = done */
.state { position: relative; flex: none; width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid var(--dim); transition: background-color 0.3s ease, border-color 0.3s ease; }
.building .state { background: var(--coral); border-color: var(--coral); }
.built .state, .stage:not(.is-live) .state { background: var(--accent); border-color: var(--accent); }
.built .state::after, .stage:not(.is-live) .state::after { content: ""; position: absolute; left: 2.6px; top: 0.6px; width: 3px; height: 6px; border: solid var(--ink); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }

/* The AI cursor travels between the plots */
.cursor { position: absolute; left: 0; top: 0; z-index: 2; display: none; align-items: flex-start; pointer-events: none; transition: transform 0.8s cubic-bezier(0.65, 0, 0.35, 1); }
.is-live .cursor { display: flex; }
.cursor svg { display: block; transition: transform 0.15s ease; transform-origin: 2px 2px; }
.cursor.tap svg { transform: scale(0.82); }
.cursor span { margin: 16px 0 0 -2px; padding: 2px 9px; border-radius: 999px; background: var(--coral); color: var(--ink); font-size: 13px; font-weight: 700; line-height: 1.5; }

/* Small signs of life once a plot is finished */
.swing, .hop { transform-box: fill-box; }
.swing { transform-origin: 0% 50%; }
@media (prefers-reduced-motion: no-preference) {
  .is-live .built .swing { animation: swing 2.4s ease-in-out infinite; }
  .is-live .built .knob { animation: flip 2.4s ease-in-out infinite; }
  .is-live .built .hop { animation: hop 1.2s cubic-bezier(0.3, 0, 0.3, 1) infinite; }
}
@keyframes swing { 0%, 100% { transform: rotate(-7deg); } 50% { transform: rotate(7deg); } }
@keyframes flip { 0%, 40% { transform: translateX(0); } 50%, 90% { transform: translateX(-6px); } }
@keyframes hop { 0%, 100% { transform: translateY(0); } 45% { transform: translateY(-20px); } }

.foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 24px; padding-top: 12px; padding-bottom: 20px; border-top: 1px solid var(--line); font-size: 14px; color: var(--dim); }
.legal-links { display: flex; flex-wrap: wrap; gap: 0 20px; }
.legal-links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--soft); text-decoration: none; }
.legal-links a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.legal-links a[aria-current="page"] { color: var(--accent); }

/* Imprint and privacy pages: one readable column, aligned with the logo */
main.doc { display: block; padding-top: 24px; padding-bottom: 72px; }
.legal { max-width: 68ch; }
.legal h1 { max-width: none; margin-bottom: 8px; font-size: clamp(36px, 6vw, 52px); hyphens: manual; }
.legal h2 { margin: 36px 0 8px; font-size: 20px; line-height: 1.3; letter-spacing: -0.01em; }
.legal p { margin: 0 0 12px; color: var(--soft); }
.legal .updated { color: var(--dim); font-size: 14px; }
