:root {
  --color-highlight: #8178fa;
  --color-white: #f4f5f7;
  --color-black: #121417;
  --color-background: #e3e6ea;
  --color-foreground: #5b6470;
  --container: min(920px, calc(100vw - 3rem));
  --font-ui: "SF Pro Text", "Avenir Next", "Helvetica Neue", sans-serif;
  --font-display: "SF Pro Display", "Avenir Next", "Helvetica Neue", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-ui);
  background: var(--color-background);
  color: var(--color-black);
  line-height: 1.6;
  font-optical-sizing: auto;
}

a {
  color: inherit;
}

.page {
  width: var(--container);
  margin: 0 auto;
  padding: 2rem 0 4rem;
}

.header {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.brand {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.01em;
  text-align: center;
  color: #2f2766;
}

.brand img {
  width: 64px;
  height: 64px;
  border-radius: 16px;
}

.nav {
  display: inline-flex;
  gap: 1rem;
}

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

.nav a:hover,
.nav a.active {
  color: #3f3490;
  border-color: var(--color-highlight);
}

.hero {
  margin-bottom: 2.5rem;
  text-align: center;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.15;
  color: #2f2766;
}

.hero p {
  margin: 1rem 0 0;
  max-width: 62ch;
  margin-left: auto;
  margin-right: auto;
  color: var(--color-foreground);
}

.card {
  background: var(--color-white);
  border: 1px solid rgba(91, 100, 112, 0.2);
  border-radius: 14px;
  padding: 1.25rem;
  margin-top: 1rem;
}

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

.card h2,
.card h3 {
  margin: 0;
}

.card p {
  margin: 0.7rem 0 0;
  color: var(--color-foreground);
}

.list {
  margin: 0.9rem 0 0;
  padding-left: 1.1rem;
}

.list li {
  margin: 0.4rem 0;
}

.grid {
  display: grid;
  gap: 1rem;
}

.badge-link {
  display: inline-flex;
  margin-top: 1rem;
  padding: 0.15rem;
  border: 1px solid rgba(129, 120, 250, 0.22);
  border-radius: 10px;
  background: rgba(129, 120, 250, 0.06);
}

.badge-link img {
  height: 54px;
  width: auto;
}

.code {
  margin-top: 0.8rem;
  padding: 0.9rem;
  background: #111318;
  color: #e9ecf1;
  border-radius: 10px;
  overflow-x: auto;
  font-family: Menlo, Monaco, Consolas, monospace;
  font-size: 0.86rem;
  line-height: 1.5;
}

.footer {
  margin-top: 2.5rem;
  color: var(--color-foreground);
  font-size: 0.9rem;
  text-align: center;
}

@media (max-width: 760px) {
  .page {
    width: min(920px, calc(100vw - 1.5rem));
  }
}

/* Landing page layout */
body.landing {
  background: linear-gradient(132deg, #8f82ff 0%, #8178fa 44%, #5d4cf7 100%);
}

.landing-wrap {
  width: min(1080px, calc(100vw - 3rem));
  margin: 0 auto;
}

.landing-header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 10;
  padding: 0.7rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.landing-menu {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 1.2rem;
  width: min(1080px, calc(100vw - 3rem));
  margin: 0 auto;
}

.landing-menu a {
  color: var(--color-white);
  text-decoration: none;
  font-weight: 560;
  font-size: 1.12rem;
  letter-spacing: 0.012em;
  padding: 0.25rem 0;
}

.landing-menu a:hover {
  text-decoration: underline;
}

.hero-band {
  min-height: 100vh;
  overflow: hidden;
}

.hero-band .landing-wrap {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 430px);
  align-items: center;
  gap: clamp(1.5rem, 5vw, 5rem);
  padding-top: clamp(5.8rem, 10vw, 7rem);
}

.hero-copy {
  color: var(--color-white);
  padding-bottom: clamp(1rem, 4vw, 3rem);
}

.hero-logo {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-family: var(--font-display);
  font-weight: 620;
  letter-spacing: 0.01em;
  line-height: 1;
}

.hero-logo img {
  width: clamp(52px, 6vw, 74px);
  height: clamp(52px, 6vw, 74px);
  border-radius: clamp(12px, 1.5vw, 18px);
}

.hero-copy h1 {
  margin: 1.2rem 0 0;
  font-size: clamp(1.2rem, 3.8vw, 2.5rem);
  font-family: var(--font-display);
  font-weight: 550;
  letter-spacing: -0.016em;
  line-height: 1.06;
  max-width: none;
  white-space: nowrap;
  color: var(--color-white);
  text-wrap: balance;
}

.hero-subtagline {
  margin: 0.85rem 0 0;
  max-width: 34ch;
  font-size: clamp(1rem, 1.9vw, 1.22rem);
  font-weight: 500;
  letter-spacing: 0.004em;
  line-height: 1.45;
  color: rgba(244, 245, 247, 0.92);
}

body.landing .badge-link {
  margin-top: 1.4rem;
  border: 0;
  background: transparent;
  padding: 0;
}

body.landing .badge-link img {
  height: 58px;
}

.hero-device {
  display: flex;
  justify-content: flex-end;
  align-self: end;
}

.hero-device img {
  width: min(100%, 390px);
  height: auto;
  display: block;
  transform: translateY(115px);
  filter: drop-shadow(0 26px 34px rgba(18, 20, 23, 0.28));
}

.landing-footer {
  position: fixed;
  right: 0;
  bottom: 0.85rem;
  width: 100%;
  z-index: 9;
  padding: 0;
}

.landing-footer .landing-wrap {
  display: flex;
  justify-content: flex-start;
}

.landing-footer p {
  margin: 0;
  color: rgba(244, 245, 247, 0.9);
  font-size: 0.92rem;
  letter-spacing: 0.01em;
  text-align: left;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
}

@media (max-width: 900px) {
  .hero-band {
    min-height: 0;
  }

  .hero-band .landing-wrap {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-copy h1 {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-device {
    justify-content: center;
  }

  .hero-device img {
    width: min(82vw, 360px);
    transform: translateY(48px);
  }

  .landing-footer p {
    text-align: left;
  }
}
