:root {
  color-scheme: light;
  --bg: #f6f8fa;
  --surface: #ffffff;
  --surface-alt: #eef2f6;
  --border: #d7dee7;
  --text: #1f2328;
  --muted: #626e7a;
  --strong: #0f1720;
  --accent: #c95800;
  --accent-strong: #a94700;
  --title-accent: #c95800;
  --shadow: rgb(31 35 40 / 0.16);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #151b23;
  --surface: #1d242d;
  --surface-alt: #26313c;
  --border: #3a4654;
  --text: #d3dbe5;
  --muted: #9aa6b2;
  --strong: #f6f8fa;
  --accent: #ffa657;
  --accent-strong: #ffb86c;
  --title-accent: #ffa657;
  --shadow: rgb(0 0 0 / 0.34);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  transition:
    background-color 180ms ease,
    color 180ms ease;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 20px;
  min-height: 64px;
  padding: 0 clamp(18px, 4vw, 56px);
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(18px);
  transition:
    background-color 180ms ease,
    border-color 180ms ease;
}

.brand {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  gap: 10px;
  color: var(--strong);
  font-weight: 760;
  text-decoration: none;
}

.brand img {
  width: 30px;
  height: 30px;
}

nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-size: 14px;
}

nav a {
  text-decoration: none;
}

nav a:hover {
  color: var(--strong);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

button,
.primary-action,
.secondary-action {
  min-height: 38px;
  border-radius: 7px;
  font: inherit;
  font-weight: 700;
}

.github-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 8px;
  border-radius: 7px;
  color: var(--strong);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition:
    background-color 180ms ease,
    color 180ms ease;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  padding: 0;
  border: 0;
  background: var(--surface);
  color: var(--strong);
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    color 180ms ease;
}

.github-link:hover,
.theme-toggle:hover {
  background: var(--surface-alt);
}

.github-link svg {
  width: 19px;
  height: 19px;
}

.theme-icon {
  display: none;
  width: 18px;
  height: 18px;
}

:root[data-theme="light"] .theme-icon-moon,
:root[data-theme="dark"] .theme-icon-sun {
  display: block;
}

main {
  display: grid;
  gap: 72px;
  width: min(1440px, 90vw);
  margin: 0 auto;
  padding: 72px 0 54px;
}

.hero {
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  gap: 34px;
}

.hero-copy {
  justify-self: center;
  width: min(90%, 980px);
  text-align: center;
  min-width: 0;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--title-accent);
  font-size: 13px;
  font-weight: 780;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 18px;
  color: var(--strong);
  font-size: 76px;
  line-height: 0.96;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 12px;
  color: var(--strong);
  font-size: 36px;
  line-height: 1.08;
}

h3 {
  margin-bottom: 8px;
  color: var(--strong);
  font-size: 18px;
}

.lead {
  max-width: 860px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.58;
}

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

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  text-decoration: none;
}

.primary-action {
  background: var(--accent);
  color: #07120d;
}

.secondary-action {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--strong);
}

.preview {
  justify-self: center;
  width: min(90%, 1200px);
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 22px 58px var(--shadow);
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.preview-bar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border-bottom: 0;
  color: var(--muted);
  font-size: 13px;
}

.preview-bar strong {
  color: var(--strong);
}

.preview-image-window {
  overflow: hidden;
  aspect-ratio: 2646 / 826;
}

.preview img {
  display: block;
  width: 100%;
  height: auto;
}

.section-grid,
.changelog-section,
.install-section,
.token-section {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.install-section,
.changelog-section {
  align-items: start;
  grid-template-columns: 1fr;
}

.section-grid article,
.changelog-entry,
.platform-panel,
.token-section {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  transition:
    background-color 180ms ease,
    border-color 180ms ease;
}

.section-grid article,
.changelog-entry,
.platform-panel {
  padding: 26px;
}

.section-grid p,
.changelog-section p,
.install-section p,
.token-section p {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

.changelog-list {
  display: grid;
  gap: 14px;
}

.changelog-entry-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}

.changelog-entry-header h3 {
  margin-bottom: 0;
}

.changelog-entry-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  margin-top: 16px;
}

.changelog-entry-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--strong);
  font-size: 14px;
  font-weight: 760;
  text-decoration: none;
  transition: color 180ms ease;
}

.changelog-entry-link:hover {
  color: var(--accent-strong);
}

.changelog-entry-link svg {
  width: 16px;
  height: 16px;
}

.changelog-entry ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.55;
}

.platform-tabs {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.platform-tablist {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  transition:
    background-color 180ms ease,
    border-color 180ms ease;
}

.platform-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition:
    background-color 180ms ease,
    color 180ms ease;
}

.platform-tab:hover {
  background: var(--surface-alt);
  color: var(--strong);
}

.platform-tab:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.platform-tab[aria-selected="true"] {
  color: var(--strong);
}

.platform-tab[aria-selected="true"]::after {
  position: absolute;
  right: 12px;
  bottom: 5px;
  left: 12px;
  height: 2px;
  border-radius: 999px;
  background: var(--accent);
  content: "";
}

.platform-tab svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.platform-panel[hidden] {
  display: none;
}

.artifact-links {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.artifact-link {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface-alt);
  color: var(--strong);
  font-size: 14px;
  font-weight: 760;
  text-decoration: none;
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    color 180ms ease;
}

.artifact-link:hover {
  border-color: var(--accent);
  background: var(--surface);
}

.command {
  overflow-x: auto;
  margin: 16px 0 0;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-alt);
  color: var(--strong);
}

.command code {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
}

.inline-link {
  color: var(--strong);
  font-weight: 760;
  text-underline-offset: 4px;
}

.platform-panel .inline-link {
  display: inline-flex;
  margin-top: 14px;
}

.platform-panel .changelog-entry-link {
  margin-top: 14px;
}

.token-section {
  align-items: center;
  grid-template-columns: 1fr;
  padding: 28px;
}

code {
  padding: 2px 5px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--surface-alt);
  color: var(--strong);
  font-size: 0.92em;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 26px clamp(18px, 4vw, 56px);
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 14px;
}

footer a {
  color: var(--strong);
  text-decoration: none;
}

@media (max-width: 900px) {
  main {
    padding-top: 44px;
  }

  .hero,
  .section-grid,
  .changelog-section,
  .install-section,
  .platform-tabs,
  .token-section {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 58px;
  }

  h2 {
    font-size: 31px;
  }
}

@media (max-width: 560px) {
  .preview-bar,
  footer {
    flex-direction: column;
  }

  .site-header {
    gap: 12px;
    padding: 0 16px;
  }

  .nav-home-link {
    display: none;
  }

  .platform-tab {
    flex-direction: column;
    gap: 4px;
    min-height: 62px;
    padding: 6px 4px;
    font-size: 12px;
  }

  h1 {
    font-size: 44px;
  }

  h2 {
    font-size: 27px;
  }
}
