/*
 * Acylic landing page.
 *
 * tokens.css is the IDE's own token sheet and ide.css its chrome, both
 * loaded before this. This file is the page around them: nav, hero,
 * waitlist, the footer — and the few rules that set the mock
 * window into the page and draw what Monaco would draw inside it.
 */

:root {
  --gutter: 24px;
  --measure: 1080px;
}

/* ---------- Base ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--bg-app);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.5;
  letter-spacing: -0.005em;
  color: var(--fg);
  background: var(--bg-app);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern", "liga", "calt";
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
  letter-spacing: inherit;
  color: inherit;
}

button {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.defs {
  position: absolute;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Shared controls ---------- */

.button-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-inverse);
  color: var(--fg-inverse);
  padding: 9px 16px;
  border-radius: var(--radius-md);
  font-weight: 500;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
  transition:
    transform var(--duration-bouncy) var(--ease-bouncy),
    filter var(--duration-fast) var(--ease-out),
    opacity var(--duration-fast) var(--ease-out);
}
.button-primary:hover {
  filter: brightness(1.08);
}
.button-primary:active {
  transform: scale(0.96);
  transition-duration: 60ms;
}
.button-primary:disabled {
  opacity: 0.5;
  cursor: default;
}

/* The brand tile: logo.svg inverted for the black page — white tile, glyph in the tile's black.
   The radius keeps the file's 308/1400 corner ratio at every size. */
.brand-tile {
  display: inline-grid;
  place-items: center;
  flex: none;
  background: var(--bg-inverse);
  color: var(--fg-inverse);
  border-radius: 22%;
}
.brand-tile svg {
  width: 62%;
  height: 62%;
}
.brand-tile-sm {
  width: 24px;
  height: 24px;
}
.brand-tile-lg {
  width: 72px;
  height: 72px;
  box-shadow: var(--shadow-md);
}

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 60px;
  padding: 0 var(--gutter);
  background: rgba(5, 5, 5, 0.72);
  -webkit-backdrop-filter: blur(28px);
  backdrop-filter: blur(28px);
  border-bottom: 1px solid var(--separator);
}
.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.nav-wordmark {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.03em;
}
.nav-cta {
  padding: 7px 14px;
  font-size: 14px;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: 88px var(--gutter) 72px;
}
/* The dot grid sits behind the content and fades out toward the edges, so it reads as texture, not a sheet. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--dot-color) var(--dot-size), transparent var(--dot-size));
  background-size: var(--dot-spacing) var(--dot-spacing);
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 50% 40%, #000 30%, transparent 100%);
  mask-image: radial-gradient(ellipse 70% 80% at 50% 40%, #000 30%, transparent 100%);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.bloup-figure {
  position: relative;
  display: inline-block;
  margin: 0 0 36px;
  width: 200px;
  animation: bloup-float 5s ease-in-out infinite;
}
.bloup-hero {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  filter: drop-shadow(0 0 24px rgba(255, 255, 255, 0.08));
}
/* The capsule in the island's black, with a hairline edge so it doesn't dissolve into the page. */
.bloup-hero .bloup-body {
  fill: var(--island-bg);
  stroke: var(--border-strong);
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}
/* Light eyes in the black, the same as the island's face. */
.bloup-hero .bloup-eye {
  fill: var(--fg);
}
/* A faint pool of light under the bloup, so the black capsule sits on the page rather than floating in it. */
.bloup-shadow {
  position: absolute;
  left: 50%;
  bottom: -22px;
  width: 140px;
  height: 18px;
  translate: -50% 0;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.09), transparent 70%);
  pointer-events: none;
}
@keyframes bloup-float {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -6px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .bloup-figure {
    animation: none;
  }
}

.hero-title {
  margin: 0 0 20px;
  font-family: var(--font-display);
  font-size: clamp(40px, 7.4vw, 76px);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.045em;
  color: var(--fg);
}
.hero-lede {
  max-width: 600px;
  margin: 0 auto 36px;
  font-size: 17px;
  line-height: 1.55;
  color: var(--fg-secondary);
  text-wrap: pretty;
}

/* ---------- Waitlist ---------- */

.waitlist {
  max-width: 460px;
  margin: 0 auto;
}
.waitlist-field {
  display: flex;
  gap: 8px;
  padding: 5px;
  border-radius: var(--radius-lg);
  background: var(--bg-input);
  border: 1px solid var(--border);
  transition:
    border-color var(--duration-fast) var(--ease-out),
    box-shadow var(--duration-normal) var(--ease-out);
}
/* Quiet at rest, a soft halo on focus — the IDE's input treatment. */
.waitlist-field:focus-within {
  border-color: var(--border-strong);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.waitlist-input {
  flex: 1;
  min-width: 0;
  padding: 8px 12px;
  background: transparent;
  border: none;
  outline: none;
  color: var(--fg);
}
.waitlist-input::placeholder {
  color: var(--fg-subtle);
}
.waitlist-submit {
  flex: none;
}
.waitlist-note {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--fg-muted);
  transition: color var(--duration-fast) var(--ease-out);
}
/* The honeypot: off-canvas rather than display:none, so naive bots still "see" it. */
.waitlist-trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.waitlist.is-error .waitlist-field {
  border-color: rgba(255, 94, 91, 0.5);
  box-shadow: 0 0 0 3px rgba(255, 94, 91, 0.15);
  animation: waitlist-shake 420ms var(--ease-out);
}
.waitlist.is-error .waitlist-note {
  color: var(--danger);
}
.waitlist.is-done .waitlist-note {
  color: var(--success);
}
.waitlist.is-busy .waitlist-submit {
  opacity: 0.6;
  pointer-events: none;
}
@keyframes waitlist-shake {
  0%,
  100% {
    translate: 0 0;
  }
  20% {
    translate: -5px 0;
  }
  40% {
    translate: 4px 0;
  }
  60% {
    translate: -3px 0;
  }
  80% {
    translate: 2px 0;
  }
}

/* ---------- Product preview ---------- */

.preview {
  padding: 24px var(--gutter) 96px;
}
.preview-caption {
  margin: 20px 0 0;
  text-align: center;
  font-size: 13px;
  color: var(--fg-muted);
}

/*
 * The mock window is the IDE's .workbench (ide.css) set into the page:
 * the app's body metrics, a card's corners and shadow, and a fixed height
 * in place of the viewport's. Everything inside it is styled by ide.css.
 */
.preview-scale {
  max-width: var(--measure);
  margin: 0 auto;
}
.window {
  position: relative;
  width: auto;
  max-width: var(--measure);
  height: 462px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  font-size: 13px;
  letter-spacing: -0.005em;
  user-select: none;
  cursor: default;
}
.window .workbench-body {
  height: calc(100% - var(--title-bar-height));
}
/* The island sits in this window's title bar, not the viewport's. */
.window .island {
  position: absolute;
  z-index: 5;
}
/* The explorer's width is the app's default. */
.window .sidebar {
  width: 260px;
}
/* Readouts, not controls. */
.window .menu-bar-item,
.window .window-control,
.window .tab,
.window .tree-row,
.window .island-compact {
  cursor: default;
}

/*
 * Monaco, drawn by hand: the editor as EditorPane.tsx and the default
 * settings configure it — 13px on a 20px line, 8px of padding above, a
 * glyph margin one line high, five digits of line numbers, 12px of
 * decorations, the current line lit across the gutter — with the colours
 * of monacoTheme.ts (the Xcode-ish syntax palette, Monaco's own bracket
 * pair colours) and its smooth-blinking cursor.
 */
.monaco {
  position: absolute;
  inset: 0;
  padding-top: 8px;
  overflow: hidden;
  font-family: "SF Mono", "JetBrains Mono", "Cascadia Code", Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  line-height: 20px;
  color: #ececec;
  font-feature-settings: "liga", "calt";
  -webkit-font-smoothing: auto;
  -moz-osx-font-smoothing: auto;
}
.ml {
  position: relative;
  display: flex;
  height: 20px;
  white-space: pre;
}
.ml.current-line {
  background: #121212;
}
.ln {
  flex: none;
  width: 59px; /* 20px glyph margin + 5 digits at 13px mono */
  padding-left: 20px;
  text-align: right;
  color: #454545;
}
.current-line .ln {
  color: #a0a0a0;
}
.lc {
  position: relative;
  padding-left: 12px;
  color: #e6e6e8;
}
/* Indent guides, one per tab stop of the line's indentation (script.js counts them into --i); the innermost around the cursor lit. */
.lc::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 12px;
  width: calc(var(--i, 0) * 2ch);
  background: repeating-linear-gradient(to right, #1c1c1c 0 1px, transparent 1px 2ch);
  pointer-events: none;
}
.ml.active-guide .lc::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(12px + var(--a, 0) * 2ch);
  width: 1px;
  background: #383838;
  pointer-events: none;
}
.monaco .k {
  color: #fc5fa3;
}
.monaco .s {
  color: #fc6a5d;
}
.monaco .n {
  color: #d0bf69;
}
.monaco .t {
  color: #5dd8ff;
}
.monaco .c {
  color: #7f8c98;
  font-style: italic;
}
.monaco .b1 {
  color: #ffd700;
}
.monaco .b2 {
  color: #da70d6;
}
.monaco .b3 {
  color: #179fff;
}
.monaco .cursor {
  display: inline-block;
  width: 2px;
  height: 20px;
  vertical-align: top;
  background: #f5f5f5;
  animation: monaco-cursor-smooth 0.5s ease-in-out 0s infinite alternate;
}
@keyframes monaco-cursor-smooth {
  0%,
  20% {
    opacity: 1;
  }
  60%,
  to {
    opacity: 0;
  }
}

/* ---------- Closing ---------- */

.closing {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 var(--gutter) 120px;
  text-align: center;
}
.closing-title {
  margin: 28px 0 10px;
  font-family: var(--font-display);
  font-size: clamp(30px, 4.6vw, 44px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.05;
}
.closing-lede {
  max-width: 440px;
  margin: 0 0 28px;
  color: var(--fg-secondary);
  text-wrap: pretty;
}
.waitlist-compact {
  width: 100%;
}

/* ---------- Footer ---------- */

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 24px var(--gutter);
  border-top: 1px solid var(--separator);
  font-size: 13px;
  color: var(--fg-muted);
}
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--fg);
}

/* ---------- Responsive ---------- */


@media (max-width: 720px) {
  :root {
    --gutter: 16px;
  }
  .hero {
    padding-top: 56px;
  }
  .bloup-figure {
    width: 156px;
    margin-bottom: 28px;
  }
  .hero-lede {
    font-size: 16px;
  }
  .waitlist-field {
    flex-direction: column;
    gap: 6px;
  }
  .waitlist-input {
    padding: 10px 12px;
  }
  .waitlist-submit {
    width: 100%;
  }
  .nav-cta {
    display: none;
  }
  /* The window keeps its geometry and is scaled down to fit (script.js sets --scale). */
  .preview-scale {
    height: calc(462px * var(--scale, 1));
  }
  .window {
    width: 840px;
    max-width: none;
    transform: scale(var(--scale, 1));
    transform-origin: top left;
  }
  .footer {
    justify-content: center;
    text-align: center;
  }
}

/* ---------- 404 ---------- */

/* The page is nav, one centred block, footer — the footer pinned to the bottom on tall viewports. */
.notfound {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
.notfound-main {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 72px var(--gutter) 96px;
  text-align: center;
}
/* The hero's dot grid, faded toward the edges. */
.notfound-main::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--dot-color) var(--dot-size), transparent var(--dot-size));
  background-size: var(--dot-spacing) var(--dot-spacing);
  -webkit-mask-image: radial-gradient(ellipse 60% 70% at 50% 50%, #000 20%, transparent 100%);
  mask-image: radial-gradient(ellipse 60% 70% at 50% 50%, #000 20%, transparent 100%);
  pointer-events: none;
}
.notfound-main > * {
  position: relative;
}
.notfound-code {
  margin: 0 0 12px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--fg-subtle);
}
.notfound-title {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: clamp(30px, 4.6vw, 44px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.05;
}
.notfound-lede {
  max-width: 400px;
  margin: 0 0 28px;
  color: var(--fg-secondary);
  text-wrap: pretty;
}
