:root {
  --ink: #f8fbff;
  --ink-soft: #c8d8ea;
  --sand: #0f1720;
  --sand-strong: rgba(94, 231, 255, 0.14);
  --paper: #09111a;
  --clay: #7c3aed;
  --moss: #00d1c7;
  --line: rgba(159, 180, 200, 0.16);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
  --radius-lg: 32px;
  --radius-md: 22px;
  --radius-sm: 16px;
  --max-width: 1200px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at top left, rgba(124, 58, 237, 0.22), transparent 28%),
    radial-gradient(circle at 85% 12%, rgba(0, 209, 199, 0.18), transparent 24%),
    linear-gradient(180deg, #06101a 0%, #09131f 46%, #0b1624 100%);
  color: var(--ink);
  font-family: "Instrument Sans", sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(159, 180, 200, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(159, 180, 200, 0.06) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.55), transparent 92%);
}

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

.page-shell {
  width: min(calc(100% - 32px), var(--max-width));
  margin: 0 auto;
  padding-bottom: 48px;
}

.topbar {
  position: sticky;
  top: 16px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 18px;
  padding: 18px 22px;
  border: 1px solid rgba(159, 180, 200, 0.14);
  border-radius: 999px;
  background: rgba(9, 17, 26, 0.7);
  backdrop-filter: blur(16px);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.24);
}

.brand {
  display: inline-flex;
  align-items: center;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand-logo {
  display: block;
  width: auto;
  height: 38px;
  filter:
    drop-shadow(0 0 18px rgba(94, 231, 255, 0.14))
    drop-shadow(0 0 28px rgba(124, 58, 237, 0.08));
}

.nav {
  display: inline-flex;
  gap: 24px;
  color: rgba(248, 251, 255, 0.88);
  font-size: 0.95rem;
}

.nav a {
  position: relative;
  color: rgba(248, 251, 255, 0.88);
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}

.nav a:hover::after,
.nav a:focus-visible::after {
  transform: scaleX(1);
}

.nav a:hover,
.nav a:focus-visible {
  color: #f8fbff;
}

.auth-links {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.auth-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  font-weight: 600;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.auth-link:hover,
.auth-link:focus-visible {
  transform: translateY(-1px);
}

.auth-link-secondary {
  border: 1px solid rgba(94, 231, 255, 0.18);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(248, 251, 255, 0.92);
}

.auth-link-primary {
  background: linear-gradient(135deg, #5ee7ff 0%, #00d1c7 45%, #7c3aed 100%);
  color: #08111a;
}

section {
  margin-top: 34px;
}

.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 28px;
  align-items: stretch;
  padding-top: 36px;
}

.hero-copy,
.hero-panel,
.plan-card,
.plan-empty,
.problem-grid article,
.service-card,
.difference-panel,
.segments-grid article,
.cta-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(12, 22, 36, 0.82);
  box-shadow: var(--shadow);
}

.hero-copy {
  padding: 52px;
  background:
    radial-gradient(circle at top right, rgba(124, 58, 237, 0.18), transparent 28%),
    linear-gradient(180deg, rgba(10, 18, 30, 0.94), rgba(11, 21, 34, 0.94));
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.74rem;
  font-weight: 700;
  color: rgba(200, 216, 234, 0.78);
}

.eyebrow span,
.section-kicker::before {
  content: "";
  width: 28px;
  height: 1px;
  background: rgba(94, 231, 255, 0.42);
}

.hero h1,
.section-heading h2,
.cta-card h2 {
  margin: 22px 0 0;
  color: #f8fbff;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 0.96;
}

.hero h1 {
  font-size: clamp(3.4rem, 9vw, 6.8rem);
  max-width: 12ch;
}

.hero-lead,
.section-heading p,
.problem-grid p,
.service-card p,
.difference-panel p,
.segments-grid p {
  line-height: 1.65;
  color: rgba(248, 251, 255, 0.84);
}

.hero-lead {
  margin: 24px 0 0;
  max-width: 60ch;
  font-size: 1.08rem;
}

.hero-actions,
.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
}

.button-primary {
  background: linear-gradient(135deg, #5ee7ff 0%, #00d1c7 45%, #7c3aed 100%);
  color: #08111a;
  box-shadow: 0 16px 32px rgba(0, 209, 199, 0.22);
}

.button-secondary {
  border-color: rgba(94, 231, 255, 0.18);
  background: rgba(255, 255, 255, 0.03);
}

.hero-panel {
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(15, 23, 32, 0.48), rgba(15, 23, 32, 0.18)),
    linear-gradient(120deg, rgba(0, 209, 199, 0.14), rgba(124, 58, 237, 0.14));
}

.status-card {
  height: 100%;
  padding: 28px;
  border-radius: calc(var(--radius-lg) - 10px);
  background:
    radial-gradient(circle at 90% 10%, rgba(124, 58, 237, 0.22), transparent 20%),
    #0f1720;
  color: var(--paper);
}

.conversation-card {
  height: 100%;
  padding: 22px;
  border-radius: 24px;
  background: rgba(252, 250, 246, 0.08);
  border: 1px solid rgba(252, 250, 246, 0.1);
}

.conversation-label {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(94, 231, 255, 0.14);
  background: rgba(94, 231, 255, 0.06);
  color: rgba(248, 251, 255, 0.82);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.message-row {
  display: flex;
  flex-direction: column;
  margin-top: 16px;
}

.message-row.user {
  align-items: flex-end;
}

.message-row.ai {
  align-items: flex-start;
}

.message-meta {
  margin-bottom: 8px;
  color: rgba(200, 216, 234, 0.68);
  font-size: 0.78rem;
  font-weight: 600;
}

.bubble {
  max-width: 92%;
  padding: 14px 16px;
  border-radius: 18px;
  line-height: 1.55;
}

.bubble-user {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.28), rgba(0, 209, 199, 0.18));
  color: #f8fbff;
}

.bubble-ai {
  background: rgba(252, 250, 246, 0.14);
  color: rgba(248, 251, 255, 0.92);
}

.section-heading {
  max-width: 760px;
}

.section-heading.narrow {
  max-width: 680px;
}

.section-heading h2,
.cta-card h2 {
  font-size: clamp(2rem, 4vw, 4rem);
}

.section-heading p:last-child {
  margin-top: 18px;
}

.problem-grid,
.plans-grid,
.services-grid,
.segments-grid {
  display: grid;
  gap: 18px;
  margin-top: 24px;
}

.plans-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.plan-card,
.plan-empty {
  padding: 28px;
}

.plan-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 22px;
  background:
    radial-gradient(circle at top right, rgba(94, 231, 255, 0.08), transparent 22%),
    linear-gradient(180deg, rgba(11, 21, 34, 0.94), rgba(12, 22, 36, 0.94));
}

.plan-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  border: 1px solid rgba(94, 231, 255, 0.04);
}

.plan-topline {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.plan-badge {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.plan-badge {
  border: 1px solid rgba(94, 231, 255, 0.14);
  background: rgba(94, 231, 255, 0.08);
  color: rgba(248, 251, 255, 0.88);
}

.plan-header h3 {
  margin: 0;
  color: #f8fbff;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.5rem;
  letter-spacing: -0.04em;
}

.plan-header p {
  margin: 14px 0 0;
  line-height: 1.6;
  color: rgba(248, 251, 255, 0.82);
}

.plan-pricing {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.plan-pricing strong {
  color: #f8fbff;
  font-family: "Space Grotesk", sans-serif;
  font-size: 2.5rem;
  letter-spacing: -0.06em;
  line-height: 0.96;
}

.plan-pricing span {
  color: rgba(200, 216, 234, 0.76);
}

.plan-details {
  display: grid;
  gap: 16px;
  margin: 0;
}

.plan-details div {
  display: grid;
  gap: 6px;
}

.plan-details dt {
  color: rgba(200, 216, 234, 0.7);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.plan-details dd {
  margin: 0;
  color: rgba(248, 251, 255, 0.9);
  line-height: 1.55;
}

.plan-highlight {
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(159, 180, 200, 0.12);
}

.plan-highlight p {
  margin: 0;
  color: rgba(248, 251, 255, 0.88);
  font-weight: 600;
  line-height: 1.55;
}

.plan-features {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 10px;
  color: rgba(248, 251, 255, 0.88);
}

.plan-features li {
  line-height: 1.5;
}

.plan-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: auto;
  min-height: 50px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid rgba(94, 231, 255, 0.18);
  background: rgba(255, 255, 255, 0.03);
  color: #f8fbff;
  font-weight: 600;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.plan-cta:hover,
.plan-cta:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(94, 231, 255, 0.34);
  background: rgba(94, 231, 255, 0.08);
}

.plan-empty p {
  margin: 0;
  color: rgba(248, 251, 255, 0.82);
  line-height: 1.6;
}

.problem-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.problem-grid article,
.segments-grid article {
  padding: 28px;
}

.problem-grid h3,
.service-card h3,
.difference-panel h3,
.segments-grid h3 {
  margin: 0;
  color: #f8fbff;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.32rem;
  letter-spacing: -0.04em;
}

.problem-grid p,
.segments-grid p {
  margin: 14px 0 0;
}

.services-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.service-card {
  position: relative;
  padding: 28px;
  overflow: hidden;
}

.service-card::after {
  content: "";
  position: absolute;
  right: -18px;
  top: -18px;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  opacity: 0.45;
}

.accent-sand::after {
  background: rgba(94, 231, 255, 0.14);
}

.accent-ink::after {
  background: rgba(124, 58, 237, 0.2);
}

.accent-clay::after {
  background: rgba(124, 58, 237, 0.22);
}

.accent-moss::after {
  background: rgba(0, 209, 199, 0.24);
}

.service-index {
  display: inline-block;
  margin-bottom: 22px;
  color: rgba(237, 244, 252, 0.44);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.service-card p {
  margin: 14px 0 0;
}

.difference-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 18px;
  margin-top: 24px;
}

.difference-panel {
  padding: 30px;
}

.difference-panel ul {
  margin: 18px 0 0;
  padding-left: 18px;
  color: rgba(248, 251, 255, 0.9);
}

.difference-panel li + li {
  margin-top: 10px;
}

.difference-panel.inverse {
  background: linear-gradient(160deg, rgba(10, 18, 30, 0.96), rgba(26, 30, 72, 0.9));
  color: var(--paper);
}

.difference-panel.inverse p {
  color: rgba(248, 251, 255, 0.88);
}

.segments-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.cta-card {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 34px;
  background:
    radial-gradient(circle at top right, rgba(94, 231, 255, 0.12), transparent 18%),
    linear-gradient(180deg, rgba(11, 21, 34, 0.94), rgba(15, 23, 32, 0.98));
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 700ms ease,
    transform 700ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1080px) {
  .hero,
  .plans-grid,
  .difference-layout,
  .services-grid,
  .problem-grid,
  .segments-grid {
    grid-template-columns: 1fr 1fr;
  }

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

  .cta-card {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(calc(100% - 20px), var(--max-width));
  }

  .topbar {
    top: 10px;
    flex-direction: column;
    align-items: flex-start;
    border-radius: 28px;
    padding: 16px;
  }

  .topbar-actions {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
  }

  .nav {
    flex-wrap: wrap;
    gap: 14px 18px;
    font-size: 0.9rem;
  }

  .auth-links {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .auth-link {
    width: 100%;
  }

  .hero-copy,
  .status-card,
  .plan-card,
  .plan-empty,
  .problem-grid article,
  .service-card,
  .difference-panel,
  .segments-grid article,
  .cta-card {
    padding: 24px;
  }

  .hero,
  .plans-grid,
  .problem-grid,
  .services-grid,
  .difference-layout,
  .segments-grid {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: clamp(2.7rem, 16vw, 4.4rem);
  }

  .brand-logo {
    height: 34px;
  }

  .section-heading h2,
  .cta-card h2 {
    font-size: clamp(1.8rem, 10vw, 3rem);
    line-height: 1;
  }

  .button {
    width: 100%;
  }

  .hero-actions,
  .cta-actions {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .button,
  .nav a::after {
    transition: none;
  }
}
