:root {
  --bg: #08090a;
  --raised: #0e0f11;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f4f5f6;
  --muted: #8b8f98;
  --faint: #5f636b;
  --accent: #e8a45c;
  --paper: #6f93ea;
  --concept: #62bd8e;
  --idea: #e8a45c;
  --direction: #a583ea;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --gutter: clamp(20px, 4vw, 40px);
  --section: clamp(88px, 12vw, 168px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  color-scheme: dark;
  scroll-behavior: smooth;
  scroll-padding-top: 104px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  font-optical-sizing: auto;
  font-feature-settings: "cv11", "ss03";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection {
  background: rgba(232, 164, 92, 0.32);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

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

h1,
h2,
p,
ul,
dl,
dd,
figure {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.shell {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: 16px;
  top: -64px;
  z-index: 20;
  padding: 10px 14px;
  background: var(--text);
  color: var(--bg);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 550;
}

.skip:focus {
  top: 12px;
}

.nav {
  position: sticky;
  top: 12px;
  z-index: 10;
  margin-top: 12px;
  padding-inline: var(--gutter);
}

.nav-island {
  display: flex;
  align-items: center;
  gap: 28px;
  max-width: 1120px;
  height: 56px;
  margin-inline: auto;
  padding: 0 10px 0 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(16, 17, 19, 0.56);
  -webkit-backdrop-filter: saturate(160%) blur(22px);
  backdrop-filter: saturate(160%) blur(22px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 0 0 rgba(0, 0, 0, 0);
  transition: background-color 240ms ease-out, border-color 240ms ease-out, box-shadow 240ms ease-out;
}

.nav.scrolled .nav-island {
  background: rgba(16, 17, 19, 0.78);
  border-color: rgba(255, 255, 255, 0.11);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 18px 48px rgba(0, 0, 0, 0.5);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.015em;
}

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

.nav-links {
  position: relative;
  display: flex;
  margin-right: auto;
  font-size: 14px;
  color: var(--muted);
}

.nav-links a {
  position: relative;
  padding: 7px 12px;
  border-radius: 9px;
  transition: color 140ms ease-out;
}

.nav-links a:hover,
.nav-links a[aria-current="true"] {
  color: var(--text);
}

.nav-indicator {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  opacity: 0;
  transition: transform 360ms var(--ease), width 360ms var(--ease), opacity 200ms ease-out;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
}

.nav-source {
  font-size: 14px;
  color: var(--muted);
  transition: color 140ms ease-out;
}

.nav-source:hover {
  color: var(--text);
}

.footer a {
  transition: color 120ms ease-out;
}

.footer a:hover {
  color: var(--text);
}

.lang {
  display: inline-flex;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.lang button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: 500 12px/1 var(--sans);
  letter-spacing: 0.04em;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: color 120ms ease-out, background-color 120ms ease-out;
}

.lang button:hover {
  color: var(--text);
}

.lang button[aria-pressed="true"] {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding-inline: 20px;
  border: 1px solid var(--text);
  border-radius: 10px;
  background: var(--text);
  color: var(--bg);
  font-size: 15px;
  font-weight: 550;
  letter-spacing: -0.005em;
  white-space: nowrap;
  transition: background-color 120ms ease-out, border-color 120ms ease-out, color 120ms ease-out, transform 120ms ease-out;
}

.button:hover {
  background: #ffffff;
  border-color: #ffffff;
}

.button:active {
  transform: scale(0.98);
}

.button-ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--text);
}

.button-ghost:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.28);
}

.button-small {
  height: 34px;
  padding-inline: 14px;
  border-radius: 8px;
  font-size: 14px;
}

.hero {
  position: relative;
  padding-top: clamp(28px, 3.4vw, 44px);
  overflow-x: clip;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 560px) minmax(0, 1fr);
  column-gap: clamp(32px, 4vw, 64px);
  align-items: center;
}

.hero-copy {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero h1 {
  font-size: clamp(40px, 4.5vw, 62px);
  line-height: 1.02;
  font-weight: 560;
  letter-spacing: -0.038em;
  text-wrap: balance;
}

.hero h1,
.hero .lede,
.hero .actions,
.hero .meta {
  position: relative;
}

.lede {
  max-width: 56ch;
  margin-top: 22px;
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.55;
  color: var(--muted);
  text-wrap: pretty;
}

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

.meta {
  margin-top: 22px;
  font-size: 13px;
  color: var(--faint);
}

.stage {
  position: relative;
  min-width: 0;
}

.switch {
  display: inline-flex;
  gap: 2px;
  max-width: 100%;
  padding: 3px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.03);
  scrollbar-width: none;
}

.switch::-webkit-scrollbar {
  display: none;
}

.switch button {
  appearance: none;
  flex: none;
  padding: 9px 14px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font: 500 14px/1 var(--sans);
  white-space: nowrap;
  cursor: pointer;
  transition: color 140ms ease-out, background-color 140ms ease-out;
}

.switch button:hover {
  color: var(--text);
}

.switch button[aria-selected="true"] {
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.tour-switch {
  margin-top: 26px;
}

.scene {
  position: relative;
  width: clamp(760px, calc((100vh - 170px) * 1.602), 1080px);
}

.views {
  position: relative;
}

.window {
  position: relative;
  width: 100%;
  filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.34)) drop-shadow(0 40px 90px rgba(0, 0, 0, 0.6));
  transition: opacity 320ms ease-out, visibility 0s linear 0s;
}

.window[hidden] {
  display: block;
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 320ms ease-out, visibility 0s linear 320ms;
}

.principles {
  margin-top: clamp(56px, 7vw, 96px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.principle-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.principle-grid article {
  padding: clamp(32px, 4vw, 56px) clamp(20px, 3vw, 40px);
  border-left: 1px solid var(--line);
}

.principle-grid article:first-child {
  padding-left: 0;
  border-left: 0;
}

.principle-grid article:last-child {
  padding-right: 0;
}

.principle-grid h2 {
  font-size: 19px;
  line-height: 1.3;
  font-weight: 560;
  letter-spacing: -0.015em;
}

.principle-grid p {
  margin-top: 10px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
  text-wrap: pretty;
}

.feature {
  padding-top: var(--section);
}

.copy h2 {
  font-size: clamp(30px, 3.8vw, 46px);
  line-height: 1.08;
  font-weight: 560;
  letter-spacing: -0.032em;
  text-wrap: balance;
}

.copy p {
  margin-top: 20px;
  max-width: 50ch;
  color: var(--muted);
  text-wrap: pretty;
}

.copy p + p {
  margin-top: 14px;
}

.copy-wide {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  column-gap: clamp(32px, 6vw, 96px);
  align-items: end;
}

.copy-wide h2 {
  grid-column: 1;
}

.copy-wide p {
  grid-column: 2;
  margin-top: 18px;
}

.split-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  column-gap: clamp(32px, 6vw, 96px);
  align-items: center;
}

.shot {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #1c1c1e;
}

.shot img {
  width: 100%;
}

.stacked .shot {
  margin-top: clamp(36px, 5vw, 64px);
}

.board-switch {
  margin-top: clamp(28px, 4vw, 44px);
}

.board-switch ~ .shot {
  margin-top: 16px;
}

.zoom {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}

.zoom:focus-visible {
  outline-offset: -3px;
  border-radius: 14px;
}

.lightbox {
  width: min(1440px, 94vw);
  max-height: 92vh;
  padding: 0;
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: #1c1c1e;
  color: var(--text);
}

.lightbox::backdrop {
  background: rgba(4, 5, 6, 0.84);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.lightbox img {
  width: 100%;
  cursor: zoom-out;
}

.lightbox form {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
}

.lightbox-close {
  appearance: none;
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(16, 17, 19, 0.82);
  color: var(--text);
  font: 500 13px/1 var(--sans);
  cursor: pointer;
}

.browser {
  display: grid;
  grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
  margin-top: clamp(36px, 5vw, 64px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--raised);
}

.tree {
  padding: 16px 10px;
  border-right: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.5;
}

.tree p {
  padding: 4px 10px;
  color: var(--faint);
}

.tree .tree-folder {
  margin-top: 6px;
  padding-left: 24px;
}

.tree button {
  appearance: none;
  display: flex;
  align-items: baseline;
  gap: 9px;
  width: 100%;
  padding: 6px 10px 6px 38px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: color 140ms ease-out, background-color 140ms ease-out;
}

.tree button i {
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--dot);
  transform: translateY(-1px);
}

.tree button span {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow-wrap: anywhere;
}

.tree button:hover {
  color: var(--text);
}

.tree button[aria-selected="true"] {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.code pre {
  max-height: 580px;
  margin: 0;
  padding: 20px 22px 26px;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.75;
  color: #c9ccd1;
}

.code pre[hidden] {
  display: none;
}

.code pre:focus-visible {
  outline-offset: -2px;
}

.c-rule,
.c-key {
  color: var(--faint);
}

.c-good {
  color: var(--concept);
}

.c-head {
  color: var(--text);
  font-weight: 500;
}

.c-link {
  color: var(--accent);
}

.rest {
  padding-top: var(--section);
}

.rest-title {
  font-size: clamp(24px, 2.6vw, 30px);
  line-height: 1.15;
  font-weight: 560;
  letter-spacing: -0.025em;
}

.rest-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  column-gap: clamp(20px, 3vw, 40px);
  margin-top: clamp(28px, 4vw, 44px);
}

.rest-grid > div {
  padding: 20px 0 30px;
  border-top: 1px solid var(--line);
}

.rest-grid dt {
  font-size: 15px;
  font-weight: 550;
  letter-spacing: -0.005em;
}

.rest-grid dd {
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
  text-wrap: pretty;
}

.closing {
  margin-top: var(--section);
  border-top: 1px solid var(--line);
  padding-block: clamp(88px, 11vw, 152px);
}

.closing-inner h2 {
  font-size: clamp(34px, 4.8vw, 58px);
  line-height: 1.04;
  font-weight: 560;
  letter-spacing: -0.036em;
}

.closing-inner > p:not(.note) {
  margin-top: 16px;
  font-size: clamp(17px, 1.6vw, 20px);
  color: var(--muted);
}

.closing-inner .actions {
  margin-top: 32px;
}

.note {
  max-width: 62ch;
  margin-top: 24px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--faint);
}

.footer {
  border-top: 1px solid var(--line);
  padding-block: 30px;
  font-size: 13px;
  color: var(--faint);
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px 40px;
}

.footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

@media (max-width: 960px) {
  .nav-links,
  .nav-source {
    display: none;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 40px;
  }

  .scene {
    width: 100%;
  }

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

  .principle-grid article,
  .principle-grid article:first-child,
  .principle-grid article:last-child {
    padding: 28px 0;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .principle-grid article:first-child {
    border-top: 0;
  }

  .split-grid,
  .copy-wide {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 36px;
  }

  .copy-wide {
    row-gap: 0;
  }

  .copy-wide h2,
  .copy-wide p {
    grid-column: 1;
  }

  .browser {
    grid-template-columns: minmax(0, 1fr);
  }

  .tree {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .rest-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 520px) {
  body {
    font-size: 16px;
  }

  .nav-island {
    gap: 12px;
    padding-left: 12px;
  }

  .hero h1 {
    letter-spacing: -0.032em;
  }

  .actions .button {
    flex: 1 1 100%;
  }

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

  .code pre {
    padding-inline: 16px;
    font-size: 12px;
  }

  .switch button {
    padding-inline: 12px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .motion .rise {
    opacity: 0;
    animation: rise 700ms var(--ease) forwards;
  }

  .motion .hero h1 {
    animation-delay: 60ms;
  }

  .motion .hero .lede {
    animation-delay: 120ms;
  }

  .motion .hero .actions {
    animation-delay: 180ms;
  }

  .motion .hero .meta {
    animation-delay: 240ms;
  }

  .motion .stage {
    opacity: 0;
    animation: settle 1100ms var(--ease) 300ms forwards;
  }

  .motion .nav-island {
    animation: drop 700ms var(--ease) both;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes settle {
  from {
    opacity: 0;
    transform: translateY(36px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes drop {
  from {
    opacity: 0;
    transform: translateY(-14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
