/* Night desk: one dark room, one lit screen. Values live in the tokens below. */

/* ---------- Tokens ---------- */
:root {
  --bg: #08090a;
  --fg: #f2f3f5;
  --muted: #8a8f98;
  --dim: #5c616a;
  --line: #1c1f23;
  --raise: #111316;
  --accent: #4c7df0;

  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --wrap: 1180px;
  --radius: 12px;

  color-scheme: dark;
}

/* ---------- Motion tokens (motion skill, editorial personality) ---------- */
:root {
  --dur-1: 100ms; --dur-2: 160ms; --dur-3: 240ms; --dur-4: 520ms; --dur-5: 720ms; --dur-6: 840ms;
  --ease-out: cubic-bezier(0, 0, 0, 1);
  --ease-emphasized: cubic-bezier(0.16, 1, 0.3, 1);
  --move-md: 24px; --move-lg: 48px;
  --stagger: 90ms;
}
@media (prefers-reduced-motion: reduce) {
  :root { --dur-1: 1ms; --dur-2: 1ms; --dur-3: 1ms; --dur-4: 1ms; --dur-5: 1ms; --dur-6: 1ms;
          --move-md: 0px; --move-lg: 0px; --stagger: 0ms; }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; background: var(--bg); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, p, figure { margin: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.dim { color: var(--dim); }


.eyebrow { font: 13px/1.5 var(--font-mono); color: var(--dim); letter-spacing: 0.04em; margin-bottom: 20px; }

/* Two-tone statements: the lead phrase is lit, the rest recedes */
.big {
  font-size: clamp(28px, 3.9vw, 52px);
  line-height: 1.14;
  letter-spacing: -0.03em;
  font-weight: 500;
  color: var(--muted);
  max-width: 22em;
  text-wrap: pretty;
}
.big .hi { color: var(--fg); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 44px; padding: 0 20px; border-radius: 999px; border: 0;
  font: 500 15px/1 var(--font-sans); cursor: pointer;
  transition: transform var(--dur-1) var(--ease-out), background-color var(--dur-2) var(--ease-out), color var(--dur-2);
}
.btn:active { transform: scale(0.97); }
.btn-solid { background: var(--fg); color: var(--bg); }
.btn-solid:hover { background: #ffffff; }
.btn-quiet { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); }
.btn-quiet:hover { color: var(--fg); background: var(--raise); }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 10;
  transition: background-color var(--dur-3) var(--ease-out), box-shadow var(--dur-3);
}
.site-header.is-scrolled {
  background: rgb(8 9 10 / 0.72);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  box-shadow: 0 1px 0 var(--line);
}
.header-row { height: 64px; display: flex; align-items: center; justify-content: space-between; }
.header-row .btn { height: 36px; padding: 0 16px; font-size: 14px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: -0.01em; }
.brand-mark { width: 24px; height: 24px; }
.brand-sub { font-weight: 500; color: var(--muted); }
.brand-sm { font-size: 15px; }

/* ---------- 1. Opening ---------- */
.opening {
  position: relative;
  min-height: 100svh;
  display: grid; grid-template-rows: 1fr auto; justify-items: center; align-items: center;
  padding: 88px 24px 64px;
  text-align: center;
}
.opening-mark { display: grid; justify-items: center; gap: 24px; }
.stage { width: clamp(210px, 44vmin, 400px); height: auto; }
/* The real editor, seen through the overlap. The capture is light mode, so it is
   inverted into a dim texture that keeps the overlap reading as open space. */
.opening-copy { display: grid; justify-items: center; gap: 18px; margin-top: 28px; }
.opening h1 {
  font-size: clamp(44px, 6.6vw, 96px);
  line-height: 0.98; letter-spacing: -0.05em; font-weight: 600;
}
.lede { max-width: 32em; font-size: clamp(17px, 1.5vw, 20px); color: var(--muted); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }

/* The window onto your work opens once the shapes lock (JS adds .is-met) */
.js .stage .lens { opacity: 0; transition: opacity var(--dur-5) var(--ease-out); }
.js .stage.is-met .lens { opacity: 1; }
.js .opening-copy > * { opacity: 0; transform: translateY(var(--move-md)); transition: opacity var(--dur-5) var(--ease-out), transform var(--dur-5) var(--ease-emphasized); }
.js .opening.is-met .opening-copy > * { opacity: 1; transform: none; }
.js .opening.is-met .opening-copy > :nth-child(2) { transition-delay: 90ms; }
.js .opening.is-met .opening-copy > :nth-child(3) { transition-delay: 180ms; }
.no-motion .opening-copy > * { opacity: 1 !important; transform: none !important; }


/* ---------- 2. Desk photograph ---------- */
.desk { padding: 48px 0 0; }
/* Room under the photo for the water to fill (the water itself is positioned, not in flow). */
.desk::after { content: ""; display: block; height: min(45vw, 720px); }
.desk-photo { max-width: 1600px; margin: 0 auto; }
.desk-photo { position: relative; }
.desk-photo img {
  position: relative; z-index: 1;
  border-radius: 28px 28px 0 0;
  width: 100%;
  /* Crop the shadowed front edge of the desk (water.js CUT). */
  aspect-ratio: 3840 / 2342; object-fit: cover; object-position: top;
  /* Fade on a curve that follows the light's fan below, not a straight line. */
  -webkit-mask-image: radial-gradient(ellipse 72% 100% at 50% 10%, #000 64%, transparent 94%);
          mask-image: radial-gradient(ellipse 72% 100% at 50% 10%, #000 64%, transparent 94%);
}
/* The water (water.js): behind the photo's faded lower fifth, down to the screenshots.
   water.js sets its top; it runs to the bottom of .lit, the end of the statement. */
.lit { position: relative; }
/* A soft blur across the photo's bottom and the water's top, so the two melt together. */
.water-blur {
  position: absolute; z-index: 2; left: 50%; transform: translateX(-50%); width: min(100%, 1600px); pointer-events: none;
  -webkit-backdrop-filter: blur(9px); backdrop-filter: blur(9px);
  -webkit-mask-image: linear-gradient(transparent, #000 40%, #000 55%, transparent);
          mask-image: linear-gradient(transparent, #000 40%, #000 55%, transparent);
}
.desk-water { position: absolute; z-index: 0; top: 60%; bottom: 0; left: 50%; transform: translateX(-50%); width: min(100%, 1600px); display: block; }

/* ---------- 3. Statement ---------- */
.statement {
  /* Rise into the lower light of the water, so the words sit in the fading shafts. */
  position: relative; z-index: 1;
  margin-top: max(-400px, -25vw);
  padding-top: 0; padding-bottom: 160px;
}
.statement .big { text-shadow: 0 2px 24px rgb(8 9 10 / 0.6); }

/* ---------- 4. Screens ---------- */
.screens { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; padding-bottom: 160px; }
.bezel { padding: 10px; border-radius: 24px; background: #000; box-shadow: inset 0 0 0 1px #24272c, 0 40px 80px -40px rgb(0 0 0 / 0.9); }
.bezel img { border-radius: 14px; filter: brightness(0.9); }
.screen .label { margin-top: 18px; font-weight: 500; color: var(--muted); }
@media (max-width: 820px) { .screens { grid-template-columns: 1fr; } }

/* ---------- 5. Tools ---------- */
.tools { padding-bottom: 104px; }
.tool-line .t { color: var(--dim); transition: color var(--dur-2) var(--ease-out); }
.tool-line .t:hover { color: var(--fg); }
.note { margin-top: 28px; max-width: 34em; color: var(--muted); }

/* ---------- 6. Your own server ---------- */
.own { padding-bottom: 160px; }
.cmd {
  display: inline-block; margin: 32px 0 0; padding: 14px 20px; border-radius: 999px;
  background: var(--raise); box-shadow: inset 0 0 0 1px var(--line);
  font: 15px/1.4 var(--font-mono); color: var(--fg);
}
.cmd .prompt { color: var(--dim); margin-right: 6px; }

/* ---------- 7. Close ---------- */
.close { display: grid; justify-items: center; text-align: center; gap: 18px; padding-bottom: 160px; }
.close-mark { width: 72px; height: 72px; margin-bottom: 12px; }
.close h2 { font-size: clamp(36px, 5vw, 64px); letter-spacing: -0.045em; line-height: 1; font-weight: 600; }
.signup { display: flex; gap: 8px; width: min(100%, 440px); margin-top: 12px; }
.signup input[type="email"] {
  flex: 1; min-width: 0; height: 44px; padding: 0 16px; border: 0; border-radius: var(--radius);
  background: var(--raise); box-shadow: inset 0 0 0 1px var(--line);
  font: 15px/1 var(--font-sans); color: var(--fg);
}
.signup input[type="email"]::placeholder { color: var(--dim); }
.signup input[type="email"]:focus { outline: none; box-shadow: inset 0 0 0 1px var(--accent), 0 0 0 3px rgb(76 125 240 / 0.25); }
.signup .btn { height: 44px; flex: none; }
.signup[aria-busy="true"] .btn { opacity: 0.6; pointer-events: none; }
.signup .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.signup-note { font-size: 14px; color: var(--dim); min-height: 1.4em; }
.signup-note.is-done { color: var(--fg); }
.signup-note.is-error { color: #f2a38f; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 480px) { .signup { flex-direction: column; } .signup .btn { width: 100%; } }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; min-height: 80px; padding-top: 20px; font-size: 14px; }
@media (max-width: 560px) { .footer-row { flex-direction: column; justify-content: center; padding-top: 24px; padding-bottom: 24px; } }

/* ---------- Scroll reveal (fires once; JS adds .is-in) ---------- */
.js [data-reveal] {
  opacity: 0; transform: translateY(var(--move-lg));
  transition: opacity var(--dur-5) var(--ease-out), transform var(--dur-6) var(--ease-emphasized);
  transition-delay: calc(var(--i, 0) * var(--stagger));
}
.js [data-reveal].is-in { opacity: 1; transform: none; }
.nowrap { white-space: nowrap; }

/* ---------- Works with (a slow, endless strip) ---------- */
.works { padding-bottom: 150px; }
.works .eyebrow { margin-bottom: 28px; }
.marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent);
          mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent);
}
.marquee + .marquee { margin-top: 20px; }
.marquee-track { display: flex; width: max-content; animation: marquee var(--marquee-duration, 60s) linear infinite; }
.marquee-reverse .marquee-track { animation-direction: reverse; }
.marquee-group {
  display: flex; align-items: center; gap: 80px; padding: 10px 80px 10px 0; margin: 0; list-style: none;
  font-size: 24px; font-weight: 600; letter-spacing: -0.02em; color: var(--fg); white-space: nowrap;
}
.marquee-group li { display: flex; align-items: center; gap: 12px; }
.marquee-group .mark { width: 30px; height: 30px; flex: none; }
.marquee-group .mark-wide { width: 62px; height: 24px; }
.marquee-group .mark-img { height: 30px; width: auto; }
.marquee-group .mark-lockup { display: block; height: 28px; width: auto; }
.marquee-group sup { font-size: 0.5em; font-weight: 500; margin-left: 1px; }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; width: auto; }
  .marquee-group { flex-wrap: wrap; justify-content: center; row-gap: 24px; padding: 0 24px; white-space: normal; }
  .marquee-group[aria-hidden] { display: none; }
  .marquee { -webkit-mask-image: none; mask-image: none; }
  .marquee + .marquee { margin-top: 24px; }
}

/* Footer trademark notice */
.site-footer .legal { flex: 1 0 100%; margin: 0 0 20px; font-size: 12px; line-height: 1.5; color: var(--dim); }
