/* Black Hole palette — shared with the macOS app for brand cohesion.
   Cosmic but calm: near-black space, indigo surfaces that glow from within,
   a hot violet accretion gradient for actions, editorial serif headings. */
:root {
  --canvas: #0c0a14;
  --surface: #12101f;
  --surface-raised: #1d1b26;
  --ink: #f2f0ff;
  --ink-soft: #d6d3e6;
  --ink-muted: #7c7796;
  --primary: #5b4be0;
  --primary-bright: #6d5cec;
  --primary-deep: #5138d6;
  --accent-light: #9e8cff;
  --accent-lightest: #c7beff;
  --hairline: rgba(150, 135, 255, 0.16);
  --grad: linear-gradient(160deg, #6d5cec 0%, #5138d6 100%);
  --top-edge: inset 0 1px 0 rgba(180, 165, 255, 0.22);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  color: var(--ink-soft);
  background: var(--canvas);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* A faint glow bleeding down from the top, like a distant star field. */
  background-image:
    radial-gradient(60% 40% at 50% -8%, rgba(44, 37, 96, 0.55) 0%, rgba(12, 10, 20, 0) 60%);
  background-repeat: no-repeat;
}

h1, h2, h3, h4, .brand, .card-body h3 {
  font-family: "Source Serif 4", Georgia, serif;
  color: var(--ink);
}

kbd {
  font-family: -apple-system, system-ui, sans-serif;
  font-size: 0.85em;
  font-weight: 600;
  background: var(--surface-raised);
  border: 1px solid var(--hairline);
  border-bottom-width: 2px;
  border-radius: 6px;
  padding: 1px 6px;
  color: var(--ink);
}

em { font-style: normal; color: var(--accent-light); }

/* ---- brand mark ---- */
.mark { width: 28px; height: 28px; display: block; }

/* ---- nav ---- */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1080px;
  margin: 0 auto;
  padding: 22px 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Source Serif 4", serif;
  font-weight: 600;
  font-size: 19px;
  color: var(--ink);
  text-decoration: none;
}
.nav-links { display: flex; gap: 26px; }
.nav-links a {
  color: var(--ink-muted);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--accent-light); }

/* ---- hero ---- */
main { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

.hero {
  text-align: center;
  padding: 76px 0 44px;
  max-width: 720px;
  margin: 0 auto;
}
.eyebrow {
  text-transform: lowercase;
  letter-spacing: 0.02em;
  color: var(--accent-light);
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 18px;
}
h1 {
  font-weight: 600;
  font-size: clamp(44px, 8vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}
.sub {
  font-size: clamp(17px, 2.4vw, 20px);
  color: var(--ink-soft);
  max-width: 560px;
  margin: 0 auto 34px;
}

/* ---- cta form ---- */
.cta {
  display: flex;
  gap: 10px;
  max-width: 460px;
  margin: 0 auto;
}
.cta input {
  flex: 1;
  font-family: inherit;
  font-size: 16px;
  padding: 14px 18px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: var(--surface-raised);
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.cta input::placeholder { color: var(--ink-muted); }
.cta input:focus {
  border-color: var(--primary-bright);
  box-shadow: 0 0 0 3px rgba(158, 140, 255, 0.22);
}
.cta input.invalid {
  border-color: #e0698a;
  box-shadow: 0 0 0 3px rgba(224, 105, 138, 0.22);
}
.cta button {
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
  padding: 14px 22px;
  border: none;
  border-radius: 8px;
  background: var(--grad);
  color: #fff;
  cursor: pointer;
  box-shadow: var(--top-edge), 0 10px 28px rgba(91, 75, 224, 0.4);
  transition: transform 0.05s, box-shadow 0.2s, filter 0.15s;
}
.cta button:hover {
  filter: brightness(1.06);
  box-shadow: var(--top-edge), 0 14px 36px rgba(91, 75, 224, 0.55);
}
.cta button:active { transform: translateY(1px); }
.cta button:disabled { opacity: 0.6; cursor: default; box-shadow: none; }

.note {
  font-size: 14px;
  color: var(--ink-muted);
  margin-top: 16px;
}
.note.error { color: #e0698a; font-weight: 500; }
.note.success { color: var(--accent-light); font-weight: 500; }

/* ---- showcase: the poster (tiles + summarizing popover) ---- */
.showcase {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
  padding: 44px 0 84px;
}
.tiles { display: flex; gap: 22px; }
.tiles figure { text-align: center; }
.tiles figcaption {
  margin-top: 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-muted);
}
.tiles .summarizing + figcaption { color: var(--accent-light); }

/* an icon tile: squircle with an inner radial glow */
.tile {
  width: 150px;
  height: 150px;
  border-radius: 34px;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 42%, #2c2560 0%, #151122 55%, #0b0912 100%);
  border: 1px solid var(--hairline);
  box-shadow: var(--top-edge), 0 16px 40px rgba(0, 0, 0, 0.6);
}
.tile svg { width: 96px; height: 96px; }
.tile.summarizing { box-shadow: var(--top-edge), 0 0 26px rgba(110, 92, 240, 0.35), 0 16px 40px rgba(0, 0, 0, 0.6); }

/* the menu-bar popover mock */
.popover {
  width: 340px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  box-shadow: var(--top-edge), 0 24px 60px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}
.popover-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  background: radial-gradient(120% 140% at 0% 0%, #1c1734 0%, #12101f 70%);
  border-bottom: 1px solid var(--hairline);
}
.brand-mini {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: "Source Serif 4", serif;
  font-weight: 600;
  font-size: 16px;
  color: var(--ink);
}
.brand-mini svg { width: 22px; height: 22px; }
.status { font-size: 14px; font-weight: 600; color: var(--accent-light); }
.skeleton { padding: 20px 18px 26px; display: flex; flex-direction: column; gap: 12px; }
.skeleton span {
  height: 11px;
  border-radius: 6px;
  background: var(--surface-raised);
}
.skeleton span:nth-child(1) { width: 92%; }
.skeleton span:nth-child(2) { width: 100%; }
.skeleton span:nth-child(3) { width: 78%; }
.skeleton span:nth-child(4) { width: 46%; }

/* ---- how it works ---- */
.how { padding: 44px 0 90px; text-align: center; }
.how h2, .closer h2 {
  font-weight: 600;
  font-size: clamp(28px, 4.5vw, 40px);
  letter-spacing: -0.01em;
  margin-bottom: 48px;
}
.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  text-align: left;
}
.steps li {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 28px;
  box-shadow: var(--top-edge);
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: radial-gradient(circle at 50% 40%, #2c2560 0%, #151122 100%);
  border: 1px solid var(--hairline);
  font-family: "Source Serif 4", serif;
  font-weight: 600;
  color: var(--accent-light);
  margin-bottom: 16px;
}
.steps h4 { font-size: 18px; margin-bottom: 8px; color: var(--ink); }
.steps p { color: var(--ink-soft); font-size: 15px; }

/* ---- closer ---- */
.closer { text-align: center; padding: 30px 0 100px; }
.closer h2 { margin-bottom: 32px; max-width: 640px; margin-inline: auto; }

/* ---- footer ---- */
.footer {
  border-top: 1px solid var(--hairline);
  max-width: 1080px;
  margin: 0 auto;
  padding: 28px 24px;
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: var(--ink-muted);
}
.footer a { color: var(--ink-muted); text-decoration: none; }
.footer a:hover { color: var(--accent-light); }

/* ---- responsive ---- */
@media (max-width: 720px) {
  .nav-links { display: none; }
  .hero { padding-top: 48px; }
  .cta { flex-direction: column; }
  .cta button { width: 100%; }
  .steps { grid-template-columns: 1fr; }
  .showcase { gap: 32px; }
  .tile { width: 128px; height: 128px; border-radius: 29px; }
  .tile svg { width: 80px; height: 80px; }
}

/* honor reduced motion — freeze the orbiting glint */
@media (prefers-reduced-motion: reduce) {
  #mark-orbit animateMotion { display: none; }
}
