:root {
  color-scheme: dark;
  --bg: #090b14;
  --surface: #111522;
  --surface-secondary: #151b2a;
  --text: #f5f7ff;
  --muted: #a0a8bb;
  --border: #252d40;
  --hover: #1b2232;
  --brand-primary: #6256e8;
  --brand-primary-hover: #5145d0;
  --brand-accent: #29c6e9;
  --focus-ring: 0 0 0 3px rgb(165 155 255 / 28%);
  --page: 1160px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-size: 16px;
  line-height: 1.65;
  overflow-x: clip;
}
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 3px solid #a59bff; outline-offset: 3px; }
.skip-link { position: absolute; z-index: 10; top: 8px; left: 8px; padding: 10px 14px; transform: translateY(-150%); background: var(--brand-primary); color: #fff; border-radius: 8px; text-decoration: none; }
.skip-link:focus { transform: none; }
.page-width { width: min(var(--page), calc(100% - 56px - env(safe-area-inset-left) - env(safe-area-inset-right))); margin-inline: auto; }

/* Unified site header */
.site-header {
  position: relative;
  z-index: 2;
  min-height: 78px;
  display: flex;
  align-items: center;
  gap: 36px;
  padding-inline: max(28px, env(safe-area-inset-left), calc((100vw - var(--page)) / 2)) max(28px, env(safe-area-inset-right), calc((100vw - var(--page)) / 2));
  border-bottom: 1px solid rgb(148 163 184 / 14%);
  background: rgb(9 11 20 / 92%);
  box-shadow: 0 8px 30px rgb(0 0 0 / 16%);
  backdrop-filter: blur(16px);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 18px;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}
.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  overflow: visible;
  border-radius: 10px;
  background: transparent;
  filter: drop-shadow(0 4px 14px rgb(41 198 233 / 24%));
}
.brand-mark img, .art-avatar img, .preview-mark img { width: 100%; height: 100%; display: block; object-fit: contain; }
.site-nav { display: flex; align-items: center; gap: 26px; margin-right: auto; }
.site-nav a, .footer-bottom nav a { color: #aeb6c8; font-size: 14px; font-weight: 550; text-decoration: none; transition: color .16s ease; }
.site-nav a:hover, .footer-bottom nav a:hover, .text-link:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
.site-nav a[aria-current="page"] { color: #fff; font-weight: 650; }
.header-actions, .hero-actions { display: flex; align-items: center; gap: 12px; }

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .16s ease, color .16s ease, border-color .16s ease, transform .16s ease;
}
.button:hover { transform: translateY(-1px); }
.button:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.button svg { width: 17px; height: 17px; flex-shrink: 0; }
.button-dark { color: #fff; background: var(--brand-primary); box-shadow: 0 8px 24px rgb(98 86 232 / 26%); }
.button-dark:hover { background: var(--brand-primary-hover); }
.button-quiet { color: #e6e9f2; background: transparent; }
.button-quiet:hover, .button-outline:hover { background: var(--hover); }
.button-outline { color: #edf0fa; border-color: #343d53; background: rgb(17 21 34 / 78%); }
.button-large { min-height: 50px; padding-inline: 24px; }

.eyebrow { margin: 0 0 13px; color: #a8b2ce; font-size: 12px; font-weight: 750; letter-spacing: .13em; line-height: 1.4; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }

/* Landing page hero */
.hero {
  position: relative;
  isolation: isolate;
  padding-top: 92px;
  text-align: center;
}
.hero::before,
.document-hero::before {
  position: absolute;
  z-index: -1;
  top: 10px;
  left: 50%;
  width: min(900px, 95vw);
  height: 480px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgb(76 83 180 / 20%), rgb(40 118 164 / 8%) 44%, transparent 72%);
  content: "";
  filter: blur(18px);
  pointer-events: none;
  transform: translateX(-50%);
}
.hero h1 {
  max-width: 980px;
  margin: 0 auto 18px;
  color: #fbfcff;
  font-size: clamp(44px, 7vw, 78px);
  font-weight: 760;
  letter-spacing: -.065em;
  line-height: 1.02;
  text-shadow: 0 8px 50px rgb(120 132 255 / 12%);
}
.hero-copy { max-width: 630px; margin: 0 auto 27px; color: #b0b8c9; font-size: clamp(17px, 2vw, 20px); line-height: 1.6; }
.hero-actions { justify-content: center; flex-wrap: wrap; }
.hero-art {
  position: relative;
  display: flex;
  height: 390px;
  align-items: center;
  justify-content: center;
  margin: 62px auto 0;
  overflow: hidden;
  border: 1px solid #303951;
  border-radius: 26px 26px 0 0;
  background:
    radial-gradient(ellipse at 50% 105%, rgb(106 91 255 / 22%), transparent 48%),
    radial-gradient(ellipse at 15% 15%, rgb(38 171 205 / 13%), transparent 35%),
    linear-gradient(145deg, #151b2b, #0c101a 68%);
  box-shadow: 0 28px 90px rgb(0 0 0 / 28%), inset 0 1px rgb(255 255 255 / 5%);
}
.art-panel {
  position: absolute;
  display: flex;
  width: 215px;
  height: 255px;
  flex-direction: column;
  gap: 13px;
  padding: 21px;
  border: 1px solid rgb(180 192 220 / 18%);
  border-radius: 17px;
  background: linear-gradient(160deg, #20283a, #151b29);
  box-shadow: 0 24px 70px rgb(0 0 0 / 36%);
}
.art-left { left: calc(50% - 330px); top: 60px; transform: rotate(-7deg); }
.art-center {
  z-index: 1;
  width: 280px;
  height: 300px;
  justify-content: center;
  overflow: hidden;
  padding: 29px;
  border-color: rgb(164 153 255 / 46%);
  background: linear-gradient(155deg, #171a2c, #10131e);
  color: #fff;
  box-shadow: 0 22px 85px rgb(87 86 224 / 22%);
  transform: translateY(10px);
}
.art-center strong { position: relative; z-index: 1; font-size: 36px; letter-spacing: -.055em; line-height: 1.04; }
.art-eyebrow { position: relative; z-index: 1; color: #aaa; font-size: 10px; font-weight: 700; letter-spacing: .15em; }
.art-orbit {
  position: absolute;
  right: -35px;
  bottom: -95px;
  display: grid;
  width: 210px;
  height: 210px;
  place-items: start center;
  padding-top: 22px;
  border: 1px solid rgb(160 169 255 / 25%);
  border-radius: 50%;
  color: rgb(160 169 255 / 30%);
  font-size: 90px;
  font-weight: 800;
}
.art-right { right: calc(50% - 335px); top: 75px; transform: rotate(7deg); }
.art-avatar {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 5px;
  border-radius: 50%;
  background: rgb(13 17 30 / 88%);
  border: 1px solid rgb(165 155 255 / 26%);
}
.art-line, .art-block, .art-chat-line { display: block; height: 9px; border-radius: 9px; background: #3a4357; }
.art-line { width: 68%; }
.art-line.long { width: 90%; }
.art-line.medium { width: 50%; }
.art-block { height: 115px; margin-top: 3px; border-radius: 10px; }
.art-chat-line { width: 83%; height: 34px; border-radius: 12px 12px 12px 3px; }
.art-chat-line.short { width: 57%; }
.art-chat-line.reply { align-self: flex-end; background: #6557df; }
.art-chat-line.reply.short { width: 62%; }

/* Bands and feature cards */
.intro-band {
  padding: 78px 0;
  border-block: 1px solid rgb(148 163 184 / 12%);
  background: linear-gradient(120deg, #101522, #111522 55%, #111827);
  text-align: center;
}
.intro-inner { max-width: 760px; }
.intro-inner h2, .section-heading h2, .privacy-inner h2, .closing h2 { margin-bottom: 16px; font-size: clamp(29px, 4vw, 43px); letter-spacing: -.045em; line-height: 1.15; }
.intro-inner > p:last-child { max-width: 650px; margin: 0 auto; color: #aeb6c8; }

.feature-grid { display: grid; grid-template-columns: repeat(2, 1fr); column-gap: 28px; row-gap: 18px; padding-block: 84px 90px; }
.section-heading { grid-column: 1 / -1; max-width: 620px; margin-bottom: 18px; }
.feature-card {
  min-height: 176px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: linear-gradient(145deg, rgb(20 26 41 / 94%), rgb(15 19 31 / 94%));
  padding: 25px 26px 28px;
  box-shadow: 0 12px 36px rgb(0 0 0 / 16%);
}
.feature-number { color: #aaa2ff; font-size: 12px; font-weight: 700; }
.feature-card h3 { margin: 12px 0 7px; color: #f4f6ff; font-size: 20px; letter-spacing: -.025em; }
.feature-card p { max-width: 450px; margin-bottom: 0; color: #aeb6c8; }

.privacy-band {
  padding: 77px 0;
  border-block: 1px solid #2a3044;
  background:
    radial-gradient(ellipse at 12% 50%, rgb(37 152 180 / 10%), transparent 44%),
    radial-gradient(ellipse at 90% 10%, rgb(99 86 232 / 14%), transparent 46%),
    #0f1420;
  color: #fff;
}
.privacy-inner { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 60px; }
.privacy-inner .eyebrow { color: #a8b2ce; }
.privacy-inner h2 { margin-bottom: 0; }
.privacy-inner > div:last-child p { max-width: 490px; color: #b2bbcd; }
.text-link { color: #c6c2ff; font-size: 14px; font-weight: 650; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.text-link:hover { color: #fff; }

.closing {
  position: relative;
  isolation: isolate;
  display: flex;
  min-height: 300px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 76px;
  margin-bottom: 76px;
  padding: 55px 28px;
  border: 1px solid #303852;
  border-radius: 26px;
  background: linear-gradient(135deg, #141b2b, #101522 60%, #17172b);
  box-shadow: 0 24px 70px rgb(0 0 0 / 22%), inset 0 1px rgb(255 255 255 / 4%);
  text-align: center;
}
.closing::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(ellipse at 50% 120%, rgb(99 86 232 / 19%), transparent 65%);
  content: "";
  pointer-events: none;
}
.closing h2 { max-width: 620px; margin-bottom: 23px; }

/* Unified sub-pages (Features, About, Privacy, Terms) */
.document {
  position: relative;
  isolation: isolate;
  min-height: 68vh;
  padding-block: 76px 96px;
}
.document-hero {
  position: relative;
  max-width: 760px;
  margin-bottom: 42px;
}
.document h1, .not-found h1, .install-hero h1 {
  margin-bottom: 17px;
  color: #fbfcff;
  font-size: clamp(38px, 6vw, 60px);
  font-weight: 760;
  letter-spacing: -.055em;
  line-height: 1.05;
  text-shadow: 0 8px 50px rgb(120 132 255 / 12%);
}
.document .lead, .not-found .lead, .install-hero .lead {
  max-width: 650px;
  margin-bottom: 0;
  color: #b0b8c9;
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.58;
}
.doc-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}
.doc-grid.single-col {
  grid-template-columns: minmax(0, 1fr);
  max-width: 820px;
}
.doc-card {
  border: 1px solid var(--border);
  border-radius: 20px;
  background: linear-gradient(145deg, rgb(20 26 41 / 94%), rgb(15 19 31 / 94%));
  padding: 26px 28px;
  box-shadow: 0 12px 36px rgb(0 0 0 / 16%);
}
.doc-card .feature-number { display: inline-block; margin-bottom: 10px; }
.doc-card h2 {
  margin-bottom: 10px;
  color: #f4f6ff;
  font-size: 21px;
  letter-spacing: -.025em;
}
.doc-card p {
  margin-bottom: 0;
  color: #aeb6c8;
  font-size: 15.5px;
  line-height: 1.65;
}
.doc-card a:not(.button) { color: #c6c2ff; text-underline-offset: 4px; }
.doc-card a:not(.button):hover { color: #fff; }
.doc-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

/* Unified Install (/download/) page */
.install-page {
  position: relative;
  isolation: isolate;
  padding-block: 68px 88px;
}
.install-shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(290px, .85fr);
  gap: 48px;
  align-items: center;
  padding: 48px 52px;
  border: 1px solid #303951;
  border-radius: 28px;
  background: linear-gradient(155deg, rgb(21 27 43 / 96%), rgb(12 16 26 / 98%) 65%);
  box-shadow: 0 28px 90px rgb(0 0 0 / 32%), inset 0 1px rgb(255 255 255 / 5%);
}
.install-hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.install-hero .eyebrow::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #8575ff;
  box-shadow: 0 0 12px #8575ff;
  content: "";
}
.install-benefits {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 28px 0;
  padding: 0;
  list-style: none;
}
.install-benefits li {
  display: grid;
  gap: 8px;
  align-content: center;
  min-height: 82px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgb(17 21 34 / 78%);
  color: #e4e8f5;
  font-size: 13px;
  font-weight: 600;
}
.install-benefits svg { width: 19px; height: 19px; color: #9c92ff; }
.install-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
#install-status {
  min-height: 1.4em;
  margin: 16px 0 0;
  color: #c2b9ff;
  font-size: 14px;
  font-weight: 550;
}
.install-hint {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 12px 0 0;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgb(17 21 34 / 68%);
  color: #aeb6c8;
  font-size: 13px;
  line-height: 1.55;
}
.install-hint::before {
  flex: 0 0 auto;
  color: #9c92ff;
  content: "ⓘ";
  font-size: 15px;
  line-height: 1.3;
}
.install-preview {
  position: relative;
  display: grid;
  min-height: 390px;
  place-items: center;
  overflow: hidden;
  border: 1px solid #2b344c;
  border-radius: 24px;
  background:
    radial-gradient(ellipse at 50% 40%, rgb(98 86 232 / 22%), transparent 62%),
    radial-gradient(ellipse at 20% 85%, rgb(41 198 233 / 12%), transparent 45%),
    linear-gradient(145deg, #161d2f, #0b0f1a);
}
.preview-glow {
  position: absolute;
  width: 245px;
  height: 245px;
  border-radius: 50%;
  background: #6256e8;
  opacity: .18;
  filter: blur(70px);
}
.preview-device {
  position: relative;
  width: 210px;
  min-height: 310px;
  padding: 13px;
  border: 1px solid rgb(180 192 220 / 24%);
  border-radius: 28px;
  background: #090b14;
  box-shadow: 0 28px 70px rgb(0 0 0 / 60%), 0 0 0 6px rgb(255 255 255 / 3%);
  transform: rotate(-4deg);
}
.preview-camera { width: 48px; height: 5px; margin: 1px auto 13px; border-radius: 9px; background: #2c3448; }
.preview-brand { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; color: #f4f6ff; font-size: 11px; font-weight: 700; }
.preview-mark { display: grid; width: 20px; height: 20px; place-items: center; overflow: visible; border-radius: 6px; background: transparent; }
.preview-story-row { display: flex; gap: 8px; margin-bottom: 12px; }
.preview-story { width: 31px; height: 31px; border: 2px solid #887aff; border-radius: 50%; background: linear-gradient(145deg, #29c6e9, #6256e8 65%, #191d30); }
.preview-post { overflow: hidden; border: 1px solid #252d40; border-radius: 12px; background: #111522; }
.preview-post-head { display: flex; align-items: center; gap: 7px; padding: 8px; color: #e2e6f3; font-size: 9px; }
.preview-avatar { width: 19px; height: 19px; border-radius: 50%; background: linear-gradient(145deg, #29c6e9, #6256e8); }
.preview-media { display: grid; height: 132px; place-items: center; background: linear-gradient(155deg, #243652, #182238 58%, #101522); color: #f5f7ff; font-size: 9.5px; font-weight: 700; }
.preview-actions { display: flex; gap: 9px; padding: 8px; color: #dedde8; font-size: 11px; }
.preview-caption { padding: 0 8px 9px; color: #a0a8bb; font-size: 7.5px; }

/* 404 page */
.not-found { display: flex; min-height: var(--app-viewport-height, 100vh); flex-direction: column; align-items: flex-start; justify-content: center; }
.not-found .brand { margin-bottom: 56px; }
.not-found .lead { margin-bottom: 28px; }

/* Unified footer */
.site-footer { padding: 34px 0 24px; border-top: 1px solid var(--border); background: #080a11; }
.footer-top { display: flex; align-items: center; justify-content: space-between; padding-bottom: 24px; border-bottom: 1px solid rgb(148 163 184 / 10%); }
.footer-top p { margin: 0; color: #8992a6; font-size: 14px; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 18px; }
.footer-bottom nav { display: flex; flex-wrap: wrap; gap: 20px; }
.footer-bottom small { color: #8992a6; font-size: 12px; }

@media (max-width: 900px) {
  .install-shell { grid-template-columns: 1fr; padding: 34px 28px; gap: 32px; }
  .install-preview { min-height: 330px; }
}

@media (max-width: 700px) {
  .page-width { width: min(var(--page), calc(100% - 36px - env(safe-area-inset-left) - env(safe-area-inset-right))); }
  .site-header { min-height: 68px; flex-wrap: wrap; gap: 4px 10px; padding: 9px max(18px, env(safe-area-inset-right)) 0 max(18px, env(safe-area-inset-left)); }
  .brand { gap: 8px; font-size: 16px; }
  .brand-mark { width: 31px; height: 31px; }
  .site-nav { display: flex; order: 3; width: 100%; justify-content: center; gap: clamp(20px, 8vw, 36px); margin: 4px 0 0; border-top: 1px solid rgb(148 163 184 / 12%); }
  .site-nav a { display: inline-flex; min-height: 44px; align-items: center; }
  .header-actions { gap: 4px; margin-left: auto; }
  .header-actions .button { min-height: 42px; padding-inline: 12px; font-size: 13px; }
  .hero { padding-top: 62px; }
  .hero h1 { font-size: clamp(40px, 11.5vw, 60px); }
  .hero-copy { font-size: 17px; }
  .button-large { min-height: 46px; padding-inline: 18px; }
  .hero-art { height: 300px; margin-top: 40px; border-radius: 18px 18px 0 0; }
  .art-panel { width: 155px; height: 215px; padding: 15px; }
  .art-left { left: -9px; top: 42px; }
  .art-center { width: 205px; height: 255px; padding: 22px; }
  .art-center strong { font-size: 29px; }
  .art-right { right: -14px; top: 51px; }
  .art-block { height: 91px; }
  .intro-band { padding: 61px 0; }
  .feature-grid { grid-template-columns: 1fr; gap: 14px; padding-block: 62px; }
  .section-heading { margin-bottom: 10px; }
  .privacy-band { padding: 60px 0; }
  .privacy-inner { grid-template-columns: 1fr; gap: 25px; }
  .closing { min-height: 250px; margin-top: 48px; margin-bottom: 56px; border-radius: 22px; padding: 40px 22px; }
  .document { min-height: auto; padding-block: 56px 72px; }
  .document-hero { margin-bottom: 30px; }
  .doc-grid { grid-template-columns: 1fr; gap: 14px; margin-bottom: 30px; }
  .doc-card { padding: 22px 20px; border-radius: 18px; }
  .install-page { padding-block: 36px 64px; }
  .install-shell { padding: 26px 20px; border-radius: 22px; gap: 26px; }
  .install-benefits { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 22px 0; }
  .install-benefits li { min-height: 70px; padding: 10px; font-size: 11.5px; border-radius: 14px; }
  .install-actions { flex-direction: column; align-items: stretch; }
  .install-preview { min-height: 290px; }
  .preview-device { width: 188px; min-height: 270px; transform: rotate(-2deg); }
  .footer-top, .footer-bottom { align-items: flex-start; flex-direction: column; }
  .footer-top { gap: 10px; }
  .footer-bottom nav { gap: 13px 18px; }
}

@media (max-width: 360px) {
  .page-width { width: min(var(--page), calc(100% - 28px - env(safe-area-inset-left) - env(safe-area-inset-right))); }
  .site-header { padding-inline: max(14px, env(safe-area-inset-left)) max(14px, env(safe-area-inset-right)); }
  .header-actions .button-quiet { display: none; }
  .site-nav { justify-content: flex-start; }
  .install-benefits { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
