/* Asterisk site — brand blue star, not generic purple SaaS */

:root {
  --blue: #0a84ff;
  --blue-deep: #0066cc;
  --blue-soft: #3da4ff;
  --ink: #071422;
  --ink-2: #1a2d42;
  --paper: #eef4fb;
  --paper-2: #f7fafc;
  --white: #ffffff;
  --line: rgba(7, 20, 34, 0.12);
  --shadow: 0 18px 50px rgba(7, 20, 34, 0.12);
  --radius: 18px;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --display: "Syne", system-ui, sans-serif;
  --max: 1120px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(10, 132, 255, 0.18), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(61, 164, 255, 0.12), transparent 50%),
    linear-gradient(180deg, var(--paper-2) 0%, var(--paper) 40%, #e4edf7 100%);
  font-family: var(--display);
  font-weight: 500;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}

.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 50;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.starfield {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0.35;
  background-image:
    radial-gradient(2px 2px at 12% 18%, var(--blue), transparent),
    radial-gradient(1.5px 1.5px at 78% 22%, var(--blue-soft), transparent),
    radial-gradient(1.5px 1.5px at 42% 70%, var(--blue), transparent),
    radial-gradient(2px 2px at 88% 78%, var(--blue-soft), transparent),
    radial-gradient(1px 1px at 55% 40%, var(--blue), transparent);
}

a {
  color: inherit;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

.mono {
  font-family: var(--mono);
  font-weight: 500;
}

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

/* Header */
.top {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.9rem 1.25rem;
  backdrop-filter: blur(12px);
  background: rgba(247, 250, 252, 0.72);
  border-bottom: 1px solid transparent;
}

.top.scrolled {
  border-bottom-color: var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-size: 1.15rem;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--ink);
  padding: 4px;
  box-shadow: 0 0 0 2px var(--white), 0 0 0 4px rgba(10, 132, 255, 0.35);
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.nav a {
  text-decoration: none;
  opacity: 0.8;
}

.nav a:hover {
  opacity: 1;
  color: var(--blue-deep);
}

.nav-cta {
  background: var(--ink);
  color: var(--white) !important;
  opacity: 1 !important;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
}

.nav-cta:hover {
  background: var(--blue) !important;
  color: var(--white) !important;
}

/* Hero */
.hero {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  margin: 0 auto;
  padding: 3rem 1.25rem 2.5rem;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2.5rem;
  align-items: center;
}

.eyebrow {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1rem;
}

.pill {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  background: var(--white);
  border: 1px solid var(--line);
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
}

.pill.muted {
  opacity: 0.75;
}

.hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -0.045em;
  font-weight: 800;
}

.hero h1 em {
  font-style: normal;
  color: var(--blue);
  position: relative;
}

.hero h1 em::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.08em;
  height: 0.18em;
  background: rgba(10, 132, 255, 0.22);
  z-index: -1;
  transform: rotate(-0.6deg);
}

.lede {
  margin: 0 0 1.5rem;
  font-size: 1.1rem;
  max-width: 34rem;
  color: var(--ink-2);
  font-weight: 500;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.98rem;
  border-radius: 12px;
  padding: 0.85rem 1.2rem;
  border: 2px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn.primary {
  background: var(--blue);
  color: var(--white);
  box-shadow: 0 10px 28px rgba(10, 132, 255, 0.35);
}

.btn.primary:hover {
  background: var(--blue-deep);
}

.btn.ghost {
  background: var(--white);
  border-color: var(--line);
  color: var(--ink);
}

.btn.big {
  font-size: 1.1rem;
  padding: 1rem 1.5rem;
}

.btn-star {
  font-weight: 800;
  opacity: 0.9;
}

.hero-stats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 1.75rem;
}

.hero-stats li {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.hero-stats strong {
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  color: var(--blue);
}

.hero-stats span {
  font-size: 0.82rem;
  color: var(--ink-2);
  opacity: 0.85;
}

.hero-visual {
  position: relative;
  min-height: 380px;
  display: grid;
  place-items: center;
}

.hero-frame {
  background: var(--blue);
  border-radius: 28px;
  padding: 1.5rem;
  width: min(100%, 360px);
  box-shadow: var(--shadow);
  position: relative;
  z-index: 2;
}

.hero-frame::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 3px solid rgba(255, 255, 255, 0.35);
  border-radius: 20px;
  pointer-events: none;
}

.hero-logo {
  display: block;
  width: 100%;
  height: auto;
  background: var(--white);
  border-radius: 16px;
  padding: 1.5rem;
}

.hero-caption {
  margin-top: 1rem;
  color: var(--white);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.hero-caption .mono {
  font-size: 0.95rem;
}

.caption-note {
  font-size: 0.85rem;
  opacity: 0.85;
}

.float-card {
  position: absolute;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.55rem 0.8rem;
  font-size: 0.85rem;
  box-shadow: 0 10px 30px rgba(7, 20, 34, 0.1);
  z-index: 3;
  animation: bob 4.5s ease-in-out infinite;
}

.f1 { top: 12%; left: 0; animation-delay: 0s; }
.f2 { top: 48%; right: 0; animation-delay: 0.8s; }
.f3 { bottom: 10%; left: 8%; animation-delay: 1.4s; }

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* Ticker */
.ticker {
  position: relative;
  z-index: 1;
  border-block: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.55);
  overflow: hidden;
  margin: 1rem 0 0;
}

.ticker-track {
  display: flex;
  gap: 2rem;
  padding: 0.85rem 0;
  width: max-content;
  font-family: var(--mono);
  font-size: 0.9rem;
  color: var(--ink-2);
  animation: marquee 28s linear infinite;
}

.ticker-track span::before {
  content: "* ";
  color: var(--blue);
  font-weight: 700;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* Features */
.features,
.commands,
.invite {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  margin: 0 auto;
  padding: 4rem 1.25rem 2rem;
}

.section-head {
  margin-bottom: 2rem;
  max-width: 36rem;
}

.section-head.row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  max-width: none;
  align-items: end;
}

.section-head h2,
.demo-side h2,
.invite-card h2 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  letter-spacing: -0.04em;
  line-height: 1.1;
  font-weight: 800;
}

.section-head p,
.demo-side p {
  margin: 0;
  color: var(--ink-2);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.feat {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem 1.4rem 1.5rem;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.feat:hover {
  border-color: rgba(10, 132, 255, 0.45);
  transform: translateY(-2px);
}

.feat-icon {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 10px;
  background: var(--ink);
  color: var(--blue-soft);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.2rem;
  margin-bottom: 0.85rem;
  font-family: var(--mono);
}

.feat h3 {
  margin: 0 0 0.45rem;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.feat p {
  margin: 0;
  color: var(--ink-2);
  font-size: 0.98rem;
}

.feat .mono {
  color: var(--blue-deep);
  background: rgba(10, 132, 255, 0.1);
  padding: 0.05rem 0.3rem;
  border-radius: 4px;
  font-size: 0.88em;
}

/* Demo */
.demo {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  margin: 0 auto;
  padding: 2rem 1.25rem 1rem;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 2rem;
  align-items: center;
}

.demo-panel {
  background: #1e1f22;
  color: #dbdee1;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid #111214;
}

.demo-chrome {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 0.9rem;
  background: #2b2d31;
  border-bottom: 1px solid #1a1b1e;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #4e5058;
}

.dot:nth-child(1) { background: #ed4245; }
.dot:nth-child(2) { background: #fee75c; }
.dot:nth-child(3) { background: #57f287; }

.demo-title {
  margin-left: 0.5rem;
  font-size: 0.8rem;
  opacity: 0.85;
}

.demo-body {
  padding: 1rem 1.1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.msg {
  display: flex;
  gap: 0.75rem;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.9rem;
}

.a1 {
  background: #eb459e;
  color: white;
}

.bot-av {
  background: #0a1a2b;
  overflow: hidden;
}

.bot-av img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.msg-meta {
  font-size: 0.85rem;
  margin-bottom: 0.2rem;
}

.msg-meta span {
  opacity: 0.55;
  font-size: 0.75rem;
  margin-left: 0.25rem;
}

.msg-meta .app {
  background: #5865f2;
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.1rem 0.3rem;
  border-radius: 3px;
  opacity: 1;
  vertical-align: middle;
}

.msg-text {
  font-size: 0.95rem;
}

.embed {
  display: flex;
  margin-top: 0.35rem;
  max-width: 320px;
}

.embed-bar {
  width: 4px;
  border-radius: 4px 0 0 4px;
  background: var(--blue);
}

.embed-inner {
  background: #2b2d31;
  border-radius: 0 6px 6px 0;
  padding: 0.65rem 0.8rem 0.8rem;
  flex: 1;
}

.embed-title {
  margin: 0 0 0.55rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.embed-gif {
  background: linear-gradient(135deg, #0a84ff33, #1e1f22);
  border-radius: 6px;
  min-height: 120px;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(10, 132, 255, 0.4);
}

.gif-placeholder {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--blue-soft);
}

.demo-side .aside {
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  background: var(--white);
  border-left: 4px solid var(--blue);
  border-radius: 0 12px 12px 0;
  font-size: 0.95rem;
}

/* Commands */
.cmd-tools {
  min-width: min(100%, 280px);
}

.search-wrap input {
  width: 100%;
  font-family: var(--mono);
  font-size: 0.9rem;
  padding: 0.7rem 0.9rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  outline: none;
}

.search-wrap input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.2);
}

.cmd-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.chip {
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.85rem;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink-2);
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  cursor: pointer;
}

.chip.active,
.chip:hover {
  background: var(--ink);
  color: var(--white);
  border-color: var(--ink);
}

.chip.active {
  background: var(--blue);
  border-color: var(--blue);
}

.cmd-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.65rem;
}

.cmd {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.75rem 0.85rem;
  transition: border-color 0.12s ease;
}

.cmd:hover {
  border-color: var(--blue);
}

.cmd-name {
  font-family: var(--mono);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--blue-deep);
  margin: 0 0 0.25rem;
}

.cmd-name::before {
  content: "/";
  opacity: 0.55;
}

.cmd-desc {
  margin: 0;
  font-size: 0.8rem;
  color: var(--ink-2);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cmd-empty {
  text-align: center;
  color: var(--ink-2);
  padding: 2rem;
}

/* Invite */
.invite {
  padding-bottom: 4rem;
}

.invite-card {
  background: var(--blue);
  color: var(--white);
  border-radius: 28px;
  padding: 2.5rem 2rem;
  text-align: center;
  box-shadow: 0 20px 60px rgba(10, 132, 255, 0.35);
  position: relative;
  overflow: hidden;
}

.invite-card::before {
  content: "*";
  position: absolute;
  font-size: 18rem;
  font-weight: 800;
  opacity: 0.08;
  right: -0.1em;
  top: -0.25em;
  line-height: 1;
  pointer-events: none;
}

.invite-logo {
  background: var(--white);
  border-radius: 18px;
  padding: 0.55rem;
  margin-bottom: 1rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.invite-card h2 {
  color: var(--white);
}

.invite-card p {
  max-width: 32rem;
  margin: 0 auto 1.4rem;
  opacity: 0.92;
}

.invite-card .btn.primary {
  background: var(--white);
  color: var(--blue-deep);
  box-shadow: none;
}

.invite-card .btn.primary:hover {
  background: var(--ink);
  color: var(--white);
}

.invite-note {
  margin: 1.1rem 0 0;
  font-size: 0.75rem;
  opacity: 0.7;
}

/* Footer */
.foot {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 0.75rem;
}

.foot-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.foot-brand img {
  width: 28px;
  height: 28px;
  background: var(--ink);
  border-radius: 8px;
  padding: 3px;
}

.foot-copy,
.foot-links {
  margin: 0;
  font-size: 0.88rem;
  color: var(--ink-2);
}

.foot-links a {
  color: var(--blue-deep);
}

/* Responsive */
@media (max-width: 900px) {
  .hero,
  .demo {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    min-height: 320px;
    order: -1;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .nav a:not(.nav-cta) {
    display: none;
  }
}

@media (max-width: 520px) {
  .hero {
    padding-top: 1.5rem;
  }

  .float-card.f2 {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ticker-track,
  .float-card {
    animation: none;
  }

  html {
    scroll-behavior: auto;
  }
}

/* ----- Legal pages (terms / privacy) ----- */
body.legal-page .hero,
body.legal-page .ticker,
body.legal-page .features {
  display: none;
}

.legal-wrap {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

.legal-kicker {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--blue-deep);
  margin: 0 0 0.75rem;
  text-transform: uppercase;
}

.legal-wrap h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(2rem, 4vw, 2.75rem);
  letter-spacing: -0.04em;
  line-height: 1.1;
  font-weight: 800;
}

.legal-updated {
  margin: 0 0 1.75rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--ink-2);
  opacity: 0.8;
}

.legal-lead {
  margin: 0 0 2rem;
  padding: 1rem 1.15rem;
  background: var(--white);
  border-left: 4px solid var(--blue);
  border-radius: 0 12px 12px 0;
  color: var(--ink-2);
  font-size: 1.02rem;
}

.legal-wrap h2 {
  margin: 2rem 0 0.65rem;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  font-weight: 800;
}

.legal-wrap h2 .num {
  font-family: var(--mono);
  color: var(--blue);
  font-weight: 600;
  margin-right: 0.35rem;
  font-size: 0.9em;
}

.legal-wrap p,
.legal-wrap li {
  color: var(--ink-2);
  font-size: 0.98rem;
  line-height: 1.65;
}

.legal-wrap p {
  margin: 0 0 0.85rem;
}

.legal-wrap ul {
  margin: 0 0 1rem;
  padding-left: 1.2rem;
}

.legal-wrap li {
  margin-bottom: 0.4rem;
}

.legal-wrap li::marker {
  color: var(--blue);
}

.legal-wrap a {
  color: var(--blue-deep);
  font-weight: 600;
}

.legal-note {
  margin-top: 2.5rem;
  padding: 1rem 1.15rem;
  border: 1px dashed rgba(10, 132, 255, 0.45);
  border-radius: 14px;
  background: rgba(10, 132, 255, 0.06);
  font-size: 0.92rem;
  color: var(--ink-2);
}

.legal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin-bottom: 1.5rem;
  font-family: var(--mono);
  font-size: 0.82rem;
}

.legal-nav a {
  text-decoration: none;
  color: var(--ink-2);
  border-bottom: 2px solid transparent;
}

.legal-nav a:hover,
.legal-nav a.here {
  color: var(--blue-deep);
  border-bottom-color: var(--blue);
}

.foot-links a + a::before {
  content: none;
}
