: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);
  --glow: rgb(234 88 12 / 0.2);
  --button-text: #ffffff;
}

: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);
  --glow: rgb(255 166 87 / 0.16);
  --button-text: #2b1607;
}

* {
  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);
}

nav a[aria-current="page"] {
  color: var(--strong);
  font-weight: 700;
}

.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: 96px;
  width: min(1480px, 92vw);
  margin: 0 auto;
  padding: 88px 0 72px;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  gap: 54px;
  isolation: isolate;
}

.hero::before {
  position: absolute;
  z-index: -1;
  top: -180px;
  left: 50%;
  width: min(1100px, 96vw);
  height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--glow) 0, transparent 68%);
  content: "";
  filter: blur(16px);
  transform: translateX(-50%);
  pointer-events: none;
}

.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.08em;
  text-transform: uppercase;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 13px;
  border: 1px solid color-mix(in srgb, var(--accent) 34%, var(--border));
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 76%, transparent);
  letter-spacing: 0.06em;
  backdrop-filter: blur(12px);
}

.hero-eyebrow span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent);
}

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.04em;
}

.hero h1 {
  max-width: 1080px;
  margin-bottom: 24px;
  font-size: clamp(64px, 7.2vw, 112px);
  line-height: 0.92;
  letter-spacing: -0.065em;
}

h1 em {
  background: linear-gradient(112deg, var(--accent) 4%, #ff8a3d 50%, #ff3d81 100%);
  background-clip: text;
  color: transparent;
  font-style: normal;
  -webkit-background-clip: text;
}

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: 760px;
  color: var(--muted);
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.55;
}

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

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

.hero-actions {
  justify-content: center;
  margin-top: 32px;
}

.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 10px;
  text-decoration: none;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease;
}

.primary-action {
  background: var(--accent);
  color: var(--button-text);
  box-shadow: 0 10px 26px color-mix(in srgb, var(--accent) 26%, transparent);
}

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

.primary-action:hover,
.secondary-action:hover {
  transform: translateY(-2px);
}

.primary-action:hover {
  background: var(--accent-strong);
  box-shadow: 0 14px 32px color-mix(in srgb, var(--accent) 32%, transparent);
}

.secondary-action:hover {
  border-color: color-mix(in srgb, var(--accent) 44%, var(--border));
}

.primary-action svg {
  width: 19px;
  height: 19px;
}

.hero-note {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.04em;
}

.preview {
  position: relative;
  justify-self: center;
  width: min(100%, 1320px);
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--surface);
  box-shadow:
    0 44px 110px var(--shadow),
    0 0 0 1px color-mix(in srgb, var(--surface) 60%, transparent) inset;
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.preview-bar {
  align-items: center;
  min-height: 45px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 16px;
  border-bottom: 0;
  color: var(--muted);
  font-size: 13px;
}

.window-controls {
  display: flex;
  gap: 7px;
}

.window-controls span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff5f57;
}

.window-controls span:nth-child(2) {
  background: #febc2e;
}

.window-controls span:nth-child(3) {
  background: #28c840;
}

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

.preview-image-window {
  overflow: hidden;
  aspect-ratio: 2646 / 1400;
  border-top: 1px solid var(--border);
}

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

.section-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
}

.section-grid article {
  min-height: 290px;
  padding: 38px;
  border: 0;
  border-right: 1px solid var(--border);
  border-radius: 0;
}

.section-grid article:last-child {
  border-right: 0;
}

.section-grid h2 {
  max-width: 300px;
  margin-top: 0;
  font-size: clamp(27px, 2.6vw, 38px);
  letter-spacing: -0.035em;
}

.keyboard-section {
  display: grid;
  grid-template-columns: minmax(240px, 0.75fr) minmax(0, 1.7fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: start;
  padding: clamp(34px, 5vw, 64px);
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  transition:
    background-color 180ms ease,
    border-color 180ms ease;
}

.keyboard-copy h2 {
  margin-bottom: 16px;
  font-size: clamp(34px, 4vw, 52px);
  letter-spacing: -0.045em;
}

.keyboard-copy p:last-child {
  max-width: 430px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
}

.shortcut-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 42px;
}

.shortcut-group h3 {
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.shortcut-list {
  display: grid;
  gap: 0;
  margin: 0;
}

.shortcut-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 48px;
  border-bottom: 1px solid var(--border);
}

.shortcut-list > div:last-child {
  border-bottom: 0;
}

.shortcut-list dt {
  color: var(--text);
  font-size: 14px;
  font-weight: 650;
}

.shortcut-list dd {
  display: flex;
  flex: none;
  gap: 4px;
  margin: 0;
}

kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 27px;
  padding: 0 7px;
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: var(--surface-alt);
  color: var(--strong);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  font-weight: 750;
  line-height: 1;
}

.closing-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  padding: clamp(64px, 9vw, 120px) 24px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 120%, var(--glow), transparent 52%),
    var(--surface);
  text-align: center;
}

.closing-cta h2 {
  margin-bottom: 32px;
  font-size: clamp(44px, 7vw, 84px);
  line-height: 0.94;
  letter-spacing: -0.055em;
}

.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;
}

.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;
}

.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-brand {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.footer-brand a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.footer-brand img {
  width: 22px;
  height: 18px;
  object-fit: contain;
}

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

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

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

  .section-grid {
    gap: 0;
  }

  .section-grid article {
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .section-grid article:last-child {
    border-bottom: 0;
  }

  .shortcut-groups {
    gap: 28px;
  }

  h1 {
    font-size: 58px;
  }

  h2 {
    font-size: 31px;
  }
}

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

  main {
    gap: 68px;
    width: min(100% - 32px, 1480px);
    padding-top: 58px;
  }

  .hero {
    gap: 38px;
  }

  .hero-copy {
    width: 100%;
  }

  .hero-eyebrow {
    font-size: 11px;
  }

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

  .hero-actions a {
    width: 100%;
  }

  .preview-bar {
    align-items: flex-start;
    gap: 6px;
  }

  .preview-caption {
    display: none;
  }

  .preview-image-window {
    aspect-ratio: 4 / 3;
  }

  .preview img {
    width: auto;
    max-width: none;
    height: 100%;
    transform: translateX(-8%);
  }

  .section-grid article {
    padding: 30px;
  }

  .keyboard-section {
    padding: 30px;
  }

  .shortcut-groups {
    grid-template-columns: 1fr;
  }

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

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

  .site-header .brand span,
  .site-header .github-link span {
    display: none;
  }

  .site-header nav {
    gap: 10px;
    font-size: 12px;
  }

  .site-header .github-link {
    padding: 0 4px;
  }

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

  h1 {
    font-size: 50px;
  }

  .page-hero h1 {
    font-size: 44px;
  }

  h2 {
    font-size: 27px;
  }
}
