/*
 * Prelaunch waitlist surface — a self-contained stylesheet.
 *
 * Sphere's design language, composed as a campaign page rather than an app
 * window. The black canvas dominates; one very large dotted sphere bleeds
 * off the top-right edge; the copy anchors bottom-left at scale; and the
 * only light material on the page is a single frosted, square-edged card
 * holding the waitlist. Materials and tokens come from the app's theme.css
 * (Switzer, Geist Mono for the one system label, hairlines, accent
 * #1f70c1 as live status, radius 0) — the vocabulary, not the layout.
 * Release pages keep styles.css; nothing here reaches them.
 */

@font-face {
  font-family: "Switzer";
  src: url("/assets/fonts/switzer-regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Switzer";
  src: url("/assets/fonts/switzer-medium.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "Switzer";
  src: url("/assets/fonts/switzer-semibold.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "Geist Mono";
  src: url("/assets/fonts/geist-mono-latin.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --canvas: #000;
  --canvas-ink: #f2f2f4;
  --canvas-ink-72: rgba(242, 242, 244, 0.72);
  --canvas-ink-55: rgba(242, 242, 244, 0.52);
  --canvas-hairline: rgba(255, 255, 255, 0.13);

  /* The app's light-mode surface tokens. */
  --field: radial-gradient(
    125% 90% at 50% -12%,
    #ffffff 0%,
    #f2f3f6 55%,
    #e8e9ee 100%
  );
  --ink: #17181b;
  --ink-70: rgba(23, 24, 27, 0.77);
  --ink-55: rgba(23, 24, 27, 0.64);
  --on-ink: #f4f4f6;
  --hairline: rgba(0, 0, 0, 0.14);
  --hairline-soft: rgba(0, 0, 0, 0.07);
  --accent: #1f70c1;
  --sel: rgba(145, 175, 215, 0.14);
  --lift: 0 1px 2px rgba(0, 0, 0, 0.5), 0 24px 64px rgba(0, 0, 0, 0.6);

  --sans: "Switzer", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --label:
    "Geist Mono", ui-monospace, "SF Mono", "SFMono-Regular", Menlo, monospace;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--canvas);
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background: var(--canvas);
  color: var(--canvas-ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

::selection {
  background: rgba(145, 175, 215, 0.35);
  color: var(--ink);
}

a {
  color: inherit;
}

img,
canvas {
  display: block;
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
}

button:disabled {
  cursor: not-allowed;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

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

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 14px;
  transform: translateY(-160%);
  background: var(--canvas-ink);
  color: var(--canvas);
  text-decoration: none;
  font-size: 13px;
}

.skip-link:focus {
  transform: translateY(0);
}

/* Document pages get a small way back; home composes its own mark. */

.site-header {
  padding: 0 clamp(20px, 4vw, 56px);
}

.nav-shell {
  height: 64px;
  display: flex;
  align-items: center;
}

.brand {
  color: var(--canvas-ink);
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* The hero: one full-viewport composition. */

.hero {
  position: relative;
  min-height: max(580px, 100svh);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  padding: 96px clamp(24px, 6vw, 104px) clamp(44px, 7vh, 88px);
}

/* The object, at scale, cropped by the canvas edge. */

.hero-object {
  position: absolute;
  z-index: 1;
  top: -16%;
  right: -6%;
  width: min(64vw, 92vh);
  max-width: 880px;
  aspect-ratio: 1;
  pointer-events: none;
}

.hero-object .sphere-canvas {
  width: 100%;
  height: 100%;
  /* The container stays inert; the sphere itself takes the pointer so it
     can be spun. Horizontal drags rotate it; vertical drags still scroll. */
  pointer-events: auto;
  touch-action: pan-y;
  cursor: grab;
}

.hero-object .sphere-canvas:active {
  cursor: grabbing;
}

.hero-mark {
  position: absolute;
  z-index: 2;
  top: clamp(26px, 5vh, 46px);
  left: clamp(24px, 6vw, 104px);
  margin: 0;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* The one system label on the page: live status, in the app's own voice. */

.hero-status {
  position: absolute;
  z-index: 2;
  top: clamp(30px, 5.4vh, 50px);
  right: clamp(24px, 6vw, 104px);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--canvas-ink-55);
  font-family: var(--label);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  /* The label may sit over the sphere's dots; keep it legible without
     adding chrome. */
  text-shadow:
    0 0 6px #000,
    0 0 3px #000;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex: none;
  background: var(--accent);
  box-shadow: 0 0 6px rgba(31, 112, 193, 0.7);
  animation: status-breathe 2.6s ease-in-out infinite;
}

@keyframes status-breathe {
  0%,
  100% {
    opacity: 1;
    box-shadow: 0 0 6px rgba(31, 112, 193, 0.7);
  }
  50% {
    opacity: 0.45;
    box-shadow: 0 0 3px rgba(31, 112, 193, 0.35);
  }
}

/* Copy: anchored low and left, at campaign scale. */

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 640px;
}

h1 {
  margin: 0;
  max-width: 13ch;
  font-size: clamp(40px, 4.8vw, 66px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.04;
  text-wrap: balance;
}

.hero-desc {
  margin: 20px 0 0;
  max-width: 42ch;
  color: var(--canvas-ink-72);
  font-size: 17px;
  line-height: 1.6;
}

/* The one light material on the page: a frosted, square-edged card holding
   the waitlist. The sphere's edge passes behind its blur. */

.waitlist-card {
  color-scheme: light;
  width: min(480px, 100%);
  margin-top: 40px;
  padding: 20px 20px 18px;
  background: rgba(240, 242, 246, 0.9);
  -webkit-backdrop-filter: blur(28px);
  backdrop-filter: blur(28px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: var(--lift);
  color: var(--ink);
}

.waitlist-form {
  width: 100%;
}

.field-label {
  display: block;
  margin-bottom: 9px;
  color: var(--ink-55);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.field-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

/* The success state hides the fields via the hidden attribute; an authored
   display would silently win over it. */
.waitlist-fields[hidden] {
  display: none;
}

.waitlist-fields input[type="email"] {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 11px 13px;
  border: 1px solid var(--hairline);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  caret-color: var(--accent);
  outline: none;
  transition:
    border-color 150ms ease,
    background 150ms ease;
}

.waitlist-fields input[type="email"]:focus {
  border-color: var(--accent);
  background: #fff;
}

.waitlist-fields input[type="email"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.waitlist-fields button {
  min-height: 46px;
  padding: 0 22px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--ink);
  color: var(--on-ink);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: opacity 150ms ease;
}

.waitlist-fields button:hover:not(:disabled) {
  opacity: 0.85;
}

.waitlist-fields button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.waitlist-consent,
.waitlist-noscript {
  color: var(--ink-55);
  font-size: 12.5px;
  line-height: 1.5;
}

.waitlist-consent {
  margin: 11px 0 0;
}

.waitlist-consent a {
  color: var(--ink-55);
}

.waitlist-noscript {
  margin: 0 0 10px;
}

.waitlist-status {
  min-height: 0;
  margin: 0;
  color: var(--ink-55);
  font-size: 13px;
  line-height: 1.5;
  outline: none;
}

.waitlist-status.success,
.waitlist-status.error {
  margin-top: 12px;
}

.waitlist-status.success {
  padding: 13px 14px;
  border-left: 2px solid var(--accent);
  background: var(--sel);
  color: var(--ink);
  font-size: 14px;
}

.waitlist-status.error {
  padding: 2px 0 2px 10px;
  border-left: 2px solid var(--ink);
  color: var(--ink);
  font-weight: 500;
}

/* How it works: one compact strip, label left, three plain sentences
   divided by fine rules. */

.strip {
  display: grid;
  grid-template-columns: minmax(150px, 230px) repeat(3, minmax(0, 1fr));
  gap: 32px;
  align-items: start;
  border-top: 1px solid var(--canvas-hairline);
  padding: clamp(52px, 8vh, 88px) clamp(24px, 6vw, 104px);
}

.strip-label {
  margin: 2px 0 0;
  color: var(--canvas-ink-55);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.strip-item {
  min-width: 0;
}

.strip-item + .strip-item {
  border-left: 1px solid var(--canvas-hairline);
  padding-left: 32px;
}

.strip-item h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.005em;
}

.strip-item p {
  margin: 10px 0 0;
  max-width: 34ch;
  color: var(--canvas-ink-55);
  font-size: 14.5px;
  line-height: 1.55;
}

/* What Sphere sees: one light sheet, weighted to the right. */

.sees {
  padding: clamp(16px, 4vh, 48px) clamp(24px, 6vw, 104px)
    clamp(72px, 11vh, 128px);
}

.sees-sheet {
  color-scheme: light;
  width: min(920px, 100%);
  margin-left: auto;
  display: grid;
  grid-template-columns: minmax(170px, 240px) minmax(0, 1fr);
  gap: 36px;
  padding: clamp(28px, 4vw, 52px);
  background: var(--field);
  color: var(--ink);
  border: 1px solid var(--canvas-hairline);
  box-shadow: var(--lift);
}

.sees-sheet h2 {
  margin: 0;
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.sees-sheet p {
  margin: 0;
  max-width: 60ch;
  color: var(--ink-70);
  font-size: 15.5px;
  line-height: 1.65;
}

/* Footer: one quiet row on the canvas. */

.site-footer {
  border-top: 1px solid var(--canvas-hairline);
  padding: 0 clamp(20px, 4vw, 56px);
}

.footer-grid {
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.footer-brand {
  font-size: 13px;
}

.footer-links {
  display: flex;
  gap: 26px;
}

.footer-links a {
  color: var(--canvas-ink-55);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--canvas-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-state {
  margin-left: auto;
  color: var(--canvas-ink-55);
  font-size: 11px;
  letter-spacing: 0.04em;
}

/* Privacy and support: a light document sheet on the canvas. */

.doc-stage {
  flex: 1;
  display: grid;
  justify-items: center;
  padding: clamp(8px, 2vh, 24px) clamp(16px, 4vw, 56px) clamp(28px, 5vh, 64px);
}

.doc-panel {
  color-scheme: light;
  width: min(860px, 100%);
  height: fit-content;
  padding: clamp(30px, 5vw, 56px) clamp(24px, 5vw, 64px);
  background: var(--field);
  color: var(--ink);
  border: 1px solid var(--canvas-hairline);
  box-shadow: var(--lift);
}

.page-hero .eyebrow {
  margin: 0;
  color: var(--ink-55);
  font-family: var(--label);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.page-hero h1 {
  margin: 16px 0 0;
  max-width: 18ch;
  font-size: clamp(26px, 3.4vw, 34px);
  line-height: 1.12;
}

.page-hero .lede {
  margin: 14px 0 0;
  max-width: 56ch;
  color: var(--ink-70);
  font-size: 15.5px;
  line-height: 1.6;
}

.legal-updated {
  margin: 34px 0 0;
  color: var(--ink-55);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.legal-page section {
  margin-top: 30px;
  padding-top: 24px;
  border-top: 1px solid var(--hairline-soft);
}

.legal-page h2 {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.005em;
}

.legal-page p {
  margin: 0 0 12px;
  max-width: 72ch;
  color: var(--ink-70);
  font-size: 14.5px;
  line-height: 1.65;
}

.legal-page p:last-child {
  margin-bottom: 0;
}

.text-link {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.tag {
  display: block;
  margin-bottom: 8px;
  color: var(--ink-55);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.support-contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  margin-top: 34px;
  padding: 24px 0;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline-soft);
}

.support-contact p {
  margin: 0;
  font-size: 17px;
  font-weight: 500;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.button.secondary {
  display: inline-flex;
  align-items: center;
  padding: 13px 20px;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  transition:
    background 150ms ease,
    color 150ms ease;
}

.button.secondary:hover {
  background: var(--ink);
  color: var(--on-ink);
}

.support-safety {
  margin-top: 28px;
  color: var(--ink-70);
  font-size: 14px;
  line-height: 1.6;
}

.support-safety strong {
  color: var(--ink);
  font-weight: 600;
}

.support-response {
  margin-top: 20px;
}

.support-response p {
  margin: 0;
  color: var(--ink-55);
  font-size: 12px;
}

/* Responsive. */

@media (max-width: 900px) {
  .hero {
    padding-inline: 22px;
  }

  .hero-object {
    top: -6%;
    right: -22%;
    width: min(96vw, 60vh);
  }

  .hero-mark {
    left: 22px;
  }

  .hero-status {
    right: 22px;
  }

  h1 {
    font-size: clamp(34px, 9.6vw, 46px);
  }

  .hero-desc {
    font-size: 16px;
  }

  .field-row {
    grid-template-columns: 1fr;
  }

  .strip {
    grid-template-columns: 1fr;
    gap: 0;
    padding-block: 44px 8px;
  }

  .strip-label {
    margin-bottom: 8px;
  }

  .strip-item {
    padding-block: 22px 24px;
  }

  .strip-item + .strip-item {
    border-left: none;
    border-top: 1px solid var(--canvas-hairline);
    padding-left: 0;
  }

  .sees-sheet {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .support-contact {
    grid-template-columns: 1fr;
    align-items: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .status-dot {
    animation: none;
  }

  * {
    transition-duration: 0.01ms !important;
  }
}
