/*
 * Radial homepage
 * Translated from Paper design 01KVPVNQ429EBA0AAVH24T55VY (Jun 22, 2026)
 */

:root {
  --ink: #17191d;
  --cream: #f3e8dc;
  --font: 'ABC Camera Plain Variable', 'ABCCameraPlainVariable-Regular',
    system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: #fff;
  color: var(--ink);
  font-family: var(--font);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.page {
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: clip;
  padding: 40px 152px;
  min-height: 100vh;
}

.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 96px;
  width: 100%;
}

/* Brand */
.brand {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
}

.brand-logo {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: block;
}

/* Content */
.content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 64px;
  width: 100%;
}

.hero-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 27px;
  width: 100%;
}

.tagline {
  margin: 0;
  width: 420px;
  max-width: 100%;
  text-align: center;
  font-size: 16px;
  line-height: 20px;
  color: var(--ink);
}

/* CTA pill */
.cta-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border: 0;
  border-radius: 9999px;
  background: var(--ink);
  text-decoration: none;
  font: inherit;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition: opacity 0.15s ease;
}

.cta:hover {
  opacity: 0.88;
}

.cta-icon {
  flex-shrink: 0;
}

.cta-label {
  font-size: 16px;
  line-height: 20px;
  color: #fff;
}

/*
 * Hero — replicates Figma frame 69:3071: a 2177×1258 viewport onto the
 * landscape, with the app window bleeding off the right & bottom edges.
 * All offsets below are the Figma layer positions ÷ the 2177×1258 frame.
 */
.hero {
  position: relative;
  align-self: stretch;
  width: auto;
  max-width: none;
  /* Break out of the page's 152px side padding, leaving a 4px gutter */
  margin-left: -148px;
  margin-right: -148px;
  aspect-ratio: 2177 / 1258;
  overflow: clip;
  /* Query container so the app window scales with the hero */
  container-type: size;
}

/* Backdrop video — placed to match the Figma landscape layer (node 75:8) */
.hero-backdrop {
  position: absolute;
  left: -9.4%; /* -204.6 / 2177 */
  top: -10.66%; /* -134.12 / 1258 */
  width: 158.69%; /* 3454.68 / 2177 */
  height: 119.0%; /* 1497.03 / 1258 */
  object-fit: cover;
  object-position: 50% 50%;
  display: block;
}

/* App window — placed + sized per node 69:3074; bleeds off the right & bottom */
.hero-card {
  position: absolute;
  left: 14.33%; /* 312 / 2177 */
  top: 21.94%; /* 276 / 1258 */
  width: 137.8%; /* 3000.6 / 2177 */
  aspect-ratio: 3000.598 / 1875.373;
  border-radius: clamp(5px, 0.7cqw, 13px);
  overflow: clip;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.07),
    0 24px 60px -24px rgba(0, 0, 0, 0.45);
}

/*
 * Radial app preview — translated from Figma node 69:3071.
 * The whole UI is authored in `em`; the root font-size is a fraction of the
 * card width (container units) so the preview stays proportional at any size.
 * 1em ≈ 12px at the ~929px reference card (= Figma 25.005px @2x export).
 */
.app {
  position: absolute;
  inset: 0;
  display: flex;
  /* 1em ≈ Figma 25.005px @2x; the window renders at 137.8cqw → 1em = 1.1483cqw */
  font-size: 1.1483cqw;
  line-height: 1.2;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI',
    Roboto, system-ui, sans-serif;
  color: rgba(255, 255, 255, 0.9);
  background: transparent;
  -webkit-font-smoothing: antialiased;
  --line: rgba(255, 255, 255, 0.06);
  --hair: 0.085em;
  --accent: #9ab3d5;
  --mono: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, monospace;
}

.app img,
.app svg {
  display: block;
  object-fit: contain;
}

/* LEFT — Projects rail */
.app-rail {
  position: relative;
  flex: 0 0 16.67em;
  min-width: 0;
  overflow: hidden;
  padding-top: 0.35em;
  /* Frosted glass: blur the landscape behind + warm glow rising from the field below */
  background: linear-gradient(
      to top,
      rgba(188, 150, 98, 0.2),
      rgba(188, 150, 98, 0.04) 45%,
      transparent 62%
    ),
    rgba(22, 25, 29, 0.64);
  -webkit-backdrop-filter: blur(clamp(8px, 0.85cqw, 18px)) saturate(1.4);
  backdrop-filter: blur(clamp(8px, 0.85cqw, 18px)) saturate(1.4);
  border-right: var(--hair) solid var(--line);
}

.rail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6em 0.75em 0.45em;
}

.rail-title {
  font-size: 1em;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
}

.rail-collapse {
  width: 1.15em;
  height: 1.15em;
  opacity: 0.5;
}

.tree {
  display: flex;
  flex-direction: column;
  gap: 0.1em;
  padding: 0 0.5em;
}

.row {
  display: flex;
  align-items: center;
  gap: 0.55em;
  border-radius: 0.6em;
}

.row-top {
  padding: 0.42em 0.6em;
}

.label {
  font-size: 0.97em;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.9);
}

.label.dim {
  color: rgba(255, 255, 255, 0.5);
}

.label.muted {
  color: rgba(255, 255, 255, 0.3);
}

.ic {
  flex: none;
  width: 1.3em;
  height: 1.3em;
  border-radius: 0.34em;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.ic img,
.ic svg {
  width: 100%;
  height: 100%;
}

.ic-home {
  overflow: visible;
}

.ic-home img {
  width: 1.1em;
  height: 1.1em;
}

.ic-site {
  background: #b6c3db;
}

/* Project sub-trees */
.children {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.1em;
}

/* vertical tree spine */
.children::before {
  content: '';
  position: absolute;
  left: 1.26em;
  top: 0;
  bottom: 0.95em;
  width: var(--hair);
  background: rgba(255, 255, 255, 0.16);
}

.row-child {
  position: relative;
  padding: 0.34em 0.6em 0.34em 2.15em;
}

/* horizontal connector stub */
.row-child::before {
  content: '';
  position: absolute;
  left: 1.26em;
  top: 50%;
  width: 0.66em;
  height: var(--hair);
  background: rgba(255, 255, 255, 0.16);
}

.row-child .label {
  font-size: 0.95em;
}

.row-child.active {
  background: rgba(255, 255, 255, 0.09);
}

.bullet {
  flex: none;
  width: 0.72em;
  height: 0.72em;
  border-radius: 50%;
  border: 0.12em solid var(--accent);
  box-sizing: border-box;
}

.bullet.fill {
  background: var(--accent);
}

.plus {
  flex: none;
  width: 0.72em;
  text-align: center;
  color: rgba(255, 255, 255, 0.3);
  font-weight: 500;
}

/* CENTER — Agent / terminal dock */
.app-dock {
  position: relative;
  flex: 0 0 36.67em;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  /* Frosted glass: blur the landscape behind + warm glow rising from the field below */
  background: linear-gradient(
      to top,
      rgba(188, 150, 98, 0.15),
      rgba(188, 150, 98, 0.03) 42%,
      transparent 58%
    ),
    rgba(18, 20, 22, 0.74);
  -webkit-backdrop-filter: blur(clamp(8px, 0.85cqw, 18px)) saturate(1.4);
  backdrop-filter: blur(clamp(8px, 0.85cqw, 18px)) saturate(1.4);
  border-right: var(--hair) solid var(--line);
}

.dock-tabs {
  display: flex;
  align-items: center;
  gap: 0.3em;
  height: 3.45em;
  padding: 0 0.85em;
  border-bottom: var(--hair) solid var(--line);
}

.tab {
  font-size: 0.99em;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
  padding: 0.4em 0.7em;
  border-radius: 0.6em;
}

.tab-active {
  color: rgba(255, 255, 255, 0.82);
}

.badge {
  font-weight: 600;
}

.term {
  display: flex;
  flex-direction: column;
  padding: 0.7em 0.9em;
  font-family: var(--mono);
}

.term-box {
  margin: 0 0 0.85em;
  min-inline-size: 0;
  padding: 0.15em 1em 1em;
  border: var(--hair) solid #d77757;
  border-radius: 0.55em;
  text-align: center;
}

.term-legend {
  padding: 0 0.45em;
  margin-left: 0.15em;
  color: #d77757;
  font-size: 1em;
}

.term-head {
  margin-top: 0.15em;
  color: #e6e8ee;
  font-weight: 700;
}

.term-mark {
  display: inline-block;
  margin: 0.65em auto;
  color: #d77757;
  font-size: 1em;
  line-height: 1;
  text-align: left;
  white-space: pre;
}

.term-muted {
  color: #999;
  line-height: 1.5;
}

.term-rule {
  height: var(--hair);
  margin: 0.5em 0;
  background: rgba(255, 255, 255, 0.17);
}

.term-prompt {
  color: rgba(230, 232, 238, 0.5);
  white-space: nowrap;
}

.caret-prompt {
  color: #e6e8ee;
}

.term-hint {
  margin-top: 0.15em;
  padding-left: 1.25em;
  color: #999;
}

.caret {
  color: rgba(230, 232, 238, 0.7);
  animation: term-blink 1.1s steps(1, end) infinite;
}

@keyframes term-blink {
  50% {
    opacity: 0;
  }
}

/* RIGHT — Browser preview (full 66.66em pane; bleeds off the hero's right edge) */
.app-browser {
  flex: 0 0 66.66em;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #0e0f13;
}

.br-tabs {
  display: flex;
  align-items: center;
  gap: 0.6em;
  height: 3.45em;
  padding: 0 0.85em;
  white-space: nowrap;
  background: #121416;
  border-bottom: var(--hair) solid var(--line);
}

.br-tab {
  display: flex;
  align-items: center;
  gap: 0.45em;
  font-size: 1em;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
  padding: 0.45em 0.7em;
  border-radius: 0.55em;
  border: var(--hair) solid transparent;
}

.br-tab-active {
  color: rgba(255, 255, 255, 0.9);
  background: #1c1f22;
  border-color: var(--line);
}

.br-ic {
  width: 1.1em;
  height: 1.1em;
}

.br-nav {
  display: flex;
  align-items: center;
  gap: 0.55em;
  height: 3.05em;
  padding: 0 0.85em;
  white-space: nowrap;
  background: #121416;
  border-bottom: var(--hair) solid var(--line);
}

.br-pages {
  display: flex;
  align-items: center;
  gap: 0.45em;
  font-size: 1em;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
}

.kbd {
  font-size: 0.82em;
  font-weight: 700;
  padding: 0.12em 0.36em;
  border-radius: 0.34em;
  background: rgba(255, 255, 255, 0.12);
}

.br-btns {
  display: flex;
  align-items: center;
  gap: 0.12em;
}

.br-navic {
  box-sizing: border-box;
  width: 2.2em;
  height: 2.05em;
  padding: 0.58em;
  border-radius: 0.6em;
}

.br-navic.faint {
  opacity: 0.4;
}

.br-addr {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.6em;
  height: 2.4em;
  padding: 0 0.85em;
  border-radius: 0.6em;
  border: var(--hair) solid var(--line);
  background: #1c1f22;
}

.br-favicon {
  flex: none;
  width: 1.25em;
  height: 1.25em;
  border-radius: 0.34em;
  background: var(--accent);
}

.br-slash {
  font-family: var(--mono);
  color: #757575;
}

.br-view {
  flex: 1;
  background: #0e0f13;
}

@media (prefers-reduced-motion: reduce) {
  .caret {
    animation: none;
    opacity: 0.5;
  }
}

@media (max-width: 1024px) {
  .page {
    padding: 40px 48px;
  }

  .hero {
    margin-left: -40px;
    margin-right: -40px;
  }
}

@media (max-width: 640px) {
  .page {
    padding: 32px 20px;
  }

  .hero {
    margin-left: -12px;
    margin-right: -12px;
  }

  .container {
    gap: 64px;
  }

  .content {
    gap: 40px;
  }
}

/* ── Waitlist overlay ─────────────────────────────────────────────────── */
.no-scroll {
  overflow: hidden;
}

.waitlist-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  /* Hidden until opened; kept in the DOM so it can transition */
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.waitlist-overlay.is-open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.waitlist-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.96);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.waitlist-close {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--font);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.15s ease;
}

.waitlist-close:hover {
  opacity: 1;
}

.waitlist-panel {
  position: relative;
  width: 100%;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  transform: translateY(6px);
  transition: transform 0.2s ease;
}

.waitlist-overlay.is-open .waitlist-panel {
  transform: translateY(0);
}

.waitlist-title {
  margin: 0;
  text-align: center;
  font-size: 16px;
  line-height: 20px;
  color: var(--ink);
}

.waitlist-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 100%;
}

/* Bare text field — no box, just centered text with a blinking caret */
.waitlist-input {
  width: 100%;
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  caret-color: var(--ink);
  font-family: var(--font);
  font-size: 18px;
  line-height: 24px;
  text-align: center;
}

.waitlist-input::placeholder {
  color: rgba(23, 25, 29, 0.35);
}

.waitlist-input:focus {
  outline: none;
}

/* Submit reuses the early-access pill (.cta); just handle the disabled state */
.waitlist-submit:disabled {
  opacity: 0.5;
  cursor: default;
}

.waitlist-msg {
  margin: 0;
  min-height: 20px;
  text-align: center;
  font-size: 14px;
  line-height: 20px;
  color: rgba(23, 25, 29, 0.6);
}

.waitlist-msg.is-error {
  color: #c0392b;
}

.waitlist-msg.is-success {
  color: var(--ink);
}

@media (prefers-reduced-motion: reduce) {
  .waitlist-overlay,
  .waitlist-panel {
    transition: none;
  }

  .waitlist-panel {
    transform: none;
  }
}
