:root {
  --page-bg: #09111a;
  --page-ink: #f4fbff;
  --frame-bg: #17212b;
  --header-bg: #1d2a36;
  --chat-bg: #0e1621;
  --border: #233241;
  --incoming: #182533;
  --incoming-ink: #f4fbff;
  --outgoing: #2aabee;
  --outgoing-ink: #ffffff;
  --muted: #92a2b3;
  --accent: #2aabee;
  --accent-hover: #229ed9;
  --link: #68c8ff;
  --shadow: 0 32px 80px rgba(0, 0, 0, 0.48);
  --surface-shadow: 0 16px 38px rgba(0, 0, 0, 0.22);
  --mono: "IBM Plex Mono", "SFMono-Regular", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Manrope", sans-serif;
}

body[data-theme="dark"] {
  --page-bg: #09111a;
  --page-ink: #f4fbff;
  --frame-bg: #17212b;
  --header-bg: #1d2a36;
  --chat-bg: #0e1621;
  --border: #233241;
  --incoming: #182533;
  --incoming-ink: #ffffff;
  --outgoing: #2aabee;
  --outgoing-ink: #ffffff;
  --muted: #92a2b3;
  --accent: #2aabee;
  --accent-hover: #229ed9;
  --link: #68c8ff;
  --shadow: 0 32px 80px rgba(0, 0, 0, 0.48);
  --surface-shadow: 0 16px 38px rgba(0, 0, 0, 0.22);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--page-ink);
  background:
    radial-gradient(circle at top left, rgba(42, 171, 238, 0.15), transparent 30%),
    radial-gradient(circle at top right, rgba(34, 158, 217, 0.14), transparent 26%),
    linear-gradient(180deg, #08111a 0%, #09111a 52%, #0b141d 100%);
}

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

.page-shell {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  padding: 32px 16px 48px;
}

.page-shell__glow {
  position: absolute;
  width: 40vw;
  height: 40vw;
  border-radius: 999px;
  background: rgba(42, 171, 238, 0.08);
  filter: blur(48px);
  pointer-events: none;
}

.page-shell__glow--left {
  top: -12vw;
  left: -10vw;
}

.page-shell__glow--right {
  right: -12vw;
  top: 16vw;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 460px) minmax(0, 420px);
  justify-content: center;
  gap: 36px;
  align-items: center;
  max-width: 1160px;
  margin: 0 auto;
  min-height: min(960px, calc(100vh - 64px));
}

.hero__backdrop {
  position: absolute;
  inset: 6% 0 auto;
  height: 78%;
  border-radius: 44px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0)),
    linear-gradient(135deg, rgba(42, 171, 238, 0.08), rgba(42, 171, 238, 0));
  border: 1px solid rgba(255, 255, 255, 0.04);
  pointer-events: none;
}

.device {
  position: relative;
  width: 100%;
  max-width: 460px;
  border-radius: 3rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0)), var(--frame-bg);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.device__header {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
  padding: 16px 20px;
  background: rgba(29, 42, 54, 0.92);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand__avatar {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), transparent),
    linear-gradient(135deg, #34b4f1, #138dcc);
  color: white;
  display: grid;
  place-items: center;
  font-weight: 700;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.2);
}

.brand__copy {
  min-width: 0;
}

.brand__eyebrow,
.brand__status {
  margin: 0;
  font-size: 0.75rem;
  color: var(--muted);
}

.brand__name {
  margin: 3px 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--page-ink);
}

.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--page-ink);
}

.theme-toggle__sun {
  display: block;
  width: 16px;
  height: 16px;
  margin: auto;
  border-radius: 999px;
  border: 2px solid currentColor;
}

.chat {
  position: relative;
  overflow-y: auto;
  max-height: 72vh;
  padding: 18px 20px 28px;
  background: var(--chat-bg);
}

.chat__intro {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
}

.chat__intro-pill {
  display: inline-flex;
  width: fit-content;
  min-height: 24px;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--link);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.chat__intro-copy {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.chat__tabs {
  position: relative;
  z-index: 1;
  display: inline-flex;
  gap: 6px;
  margin: 0 0 14px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.chat__tab {
  min-height: 32px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.chat__tab.is-active {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), transparent),
    var(--accent);
  color: white;
  box-shadow: 0 8px 20px rgba(42, 171, 238, 0.26);
}

.chat__pattern {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(114, 145, 172, 0.08) 1px, transparent 0),
    radial-gradient(circle at 18px 18px, rgba(114, 145, 172, 0.04) 1px, transparent 0);
  background-size: 24px 24px, 32px 32px;
  opacity: 0.28;
  pointer-events: none;
}

.message {
  position: relative;
  z-index: 1;
  max-width: 88%;
  margin: 0 0 14px;
  padding: 14px 16px;
  border-radius: 1rem 1rem 1rem 0.45rem;
  background: var(--incoming);
  color: var(--incoming-ink);
  box-shadow: var(--surface-shadow);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.message[hidden] {
  display: none;
}

.message--outgoing,
.message--cta {
  margin-left: auto;
  border-radius: 1rem 1rem 0.45rem 1rem;
  background: var(--outgoing);
  color: var(--outgoing-ink);
}

.message--join {
  padding: 12px;
  background: transparent;
  box-shadow: none;
  border: 0;
}

.join-card {
  display: block;
  text-align: center;
  padding: 12px 16px;
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent),
    var(--accent);
  color: white;
  font-weight: 600;
  box-shadow: 0 10px 28px rgba(42, 171, 238, 0.26);
}

.join-card:hover,
.composer__button:hover,
.hero-copy__link:hover {
  background: var(--accent-hover);
}

.message__topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.message__pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(42, 171, 238, 0.16);
  color: var(--link);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.message__time,
.message__meta,
.message__source {
  font-size: 10px;
  color: var(--muted);
}

.message--outgoing .message__meta,
.message--outgoing .message__source,
.message--cta .message__meta {
  color: rgba(255, 255, 255, 0.82);
}

.message__title {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 600;
}

.message__body,
.message__line {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
}

.message__lines {
  display: grid;
  gap: 6px;
}

.message__line--code {
  padding: 9px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  font-family: var(--mono);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.message__source {
  margin-top: 9px;
}

.message__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.message__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(42, 171, 238, 0.34);
  background: rgba(42, 171, 238, 0.12);
  color: var(--link);
  font-size: 13px;
  font-weight: 600;
  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease;
}

.message--outgoing .message__action {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.14);
  color: white;
}

.message__action:hover {
  transform: translateY(-1px);
  background: rgba(42, 171, 238, 0.18);
}

.device__footer {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 16px 20px;
  background: rgba(23, 33, 43, 0.96);
}

.composer {
  display: grid;
  gap: 10px;
}

.composer__hint {
  color: var(--muted);
  font-size: 13px;
}

.composer__button {
  display: inline-flex;
  width: 100%;
  min-height: 42px;
  justify-content: center;
  align-items: center;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent),
    var(--accent);
  color: white;
  font-weight: 600;
  box-shadow: 0 12px 32px rgba(42, 171, 238, 0.22);
}

.hero-copy {
  max-width: 420px;
  position: relative;
  z-index: 1;
}

.hero-copy__eyebrow,
.seo__eyebrow {
  margin: 0 0 8px;
  color: var(--link);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.12em;
  font-weight: 700;
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(3rem, 6vw, 5.4rem);
  line-height: 0.9;
  letter-spacing: -0.07em;
}

.hero-copy__subhead {
  margin: 14px 0 0;
  font-size: clamp(1.1rem, 2.4vw, 1.6rem);
  line-height: 1.15;
  color: #d9ecf7;
}

.hero-copy__lead {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

.hero-copy__actions {
  display: grid;
  gap: 10px;
}

.locale-menu {
  position: relative;
  width: fit-content;
  margin: 0 0 18px;
}

.locale-menu[open] {
  z-index: 4;
}

.locale-menu__trigger {
  display: inline-grid;
  grid-template-columns: auto auto 10px;
  gap: 10px;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)),
    rgba(255, 255, 255, 0.04);
  box-shadow: 0 16px 32px rgba(2, 8, 18, 0.22);
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.locale-menu__trigger::-webkit-details-marker {
  display: none;
}

.locale-menu__label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.locale-menu__value {
  color: var(--page-ink);
  font-size: 14px;
  font-weight: 600;
}

.locale-menu__chevron {
  width: 10px;
  height: 10px;
  margin-top: -5px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 140ms ease;
}

.locale-menu[open] .locale-menu__chevron {
  margin-top: 3px;
  transform: rotate(225deg);
}

.locale-menu__list {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  display: grid;
  gap: 6px;
  min-width: 220px;
  padding: 10px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent),
    rgba(12, 20, 29, 0.96);
  box-shadow: 0 24px 48px rgba(2, 8, 18, 0.34);
  backdrop-filter: blur(18px);
}

.locale-menu__item {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 12px;
  color: var(--page-ink);
  font-size: 14px;
  font-weight: 600;
  transition: background 140ms ease, color 140ms ease, transform 140ms ease;
}

.locale-menu__item:hover {
  background: rgba(42, 171, 238, 0.12);
  color: white;
  transform: translateX(1px);
}

.locale-menu__item.is-active {
  background: rgba(42, 171, 238, 0.18);
  color: white;
}

.hero-copy__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-top: 20px;
  padding: 0 18px;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent),
    var(--accent);
  color: white;
  font-weight: 700;
  box-shadow: 0 12px 36px rgba(42, 171, 238, 0.26);
}

.hero-copy__meta {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.hero-copy::before {
  content: "";
  display: block;
  width: 88px;
  height: 3px;
  margin-bottom: 18px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

.seo {
  max-width: 1180px;
  margin: 56px auto 0;
}

.seo__inner {
  display: grid;
  gap: 22px;
}

.seo h1,
.seo h2,
.seo summary {
  color: var(--page-ink);
}

.seo h1 {
  margin: 0;
  font-size: clamp(1.9rem, 3vw, 2.8rem);
  line-height: 1.05;
}

.seo__lead {
  margin: 0;
  max-width: 860px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
}

.seo__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.seo__grid h2,
.faq h2 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

.seo__grid p,
.faq p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.faq {
  display: grid;
  gap: 12px;
  padding-top: 6px;
}

.faq details {
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
}

.faq p {
  margin-top: 8px;
}

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 24px;
    min-height: auto;
  }

  .hero-copy {
    max-width: 640px;
  }

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

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

  .hero__backdrop,
  .page-shell__glow {
    display: none;
  }

  .device {
    max-width: none;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }

  .chat {
    max-height: none;
    min-height: calc(100vh - 154px);
  }

  .hero-copy,
  .seo {
    padding: 0 16px;
  }

  .hero-copy h1 {
    font-size: 2.7rem;
  }

  .locale-menu {
    width: 100%;
    margin-top: 8px;
  }

  .locale-menu__trigger,
  .locale-menu__list {
    width: 100%;
  }
}
