:root {
  --background: #f7f5f3;
  --surface: #f1ece9;
  --accent-soft: #d0b3ff;
  --accent: #a179ff;
  --accent-deep: #8253f0;
  --foreground: #1b071f;
  --white: #ffffff;
  --muted: rgba(27, 7, 31, 0.62);
  --subtle: rgba(27, 7, 31, 0.12);
  --hairline: rgba(27, 7, 31, 0.08);
  --serif: "Instrument Serif", serif;
  --sans: "Geist", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
}

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

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

code,
pre {
  font-family: var(--mono);
}

.portal-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  padding: 28px;
  background: var(--foreground);
  color: var(--background);
  overflow-y: auto;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 28px;
  color: var(--background);
  font-family: var(--serif);
  font-size: 24px;
  line-height: 1;
}

.brand-lockup img {
  width: 18px;
  height: 22px;
  filter: invert(96%) sepia(6%) saturate(164%) hue-rotate(332deg) brightness(104%) contrast(94%);
}

.nav-groups {
  display: grid;
  gap: 32px;
  margin-top: 64px;
}

.nav-group {
  display: grid;
  gap: 6px;
}

.nav-group p {
  margin: 0 0 10px;
  color: rgba(247, 245, 243, 0.46);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  line-height: 1;
  text-transform: uppercase;
}

.nav-group a {
  display: flex;
  align-items: center;
  min-height: 34px;
  color: rgba(247, 245, 243, 0.72);
  font-size: 14px;
  font-weight: 400;
}

.nav-group a:hover,
.nav-group a.is-active {
  color: var(--background);
}

main {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 64px;
  padding: 0 48px;
  background: rgba(247, 245, 243, 0.86);
  border-bottom: 1px solid var(--hairline);
  backdrop-filter: blur(18px);
}

.topbar span,
.topbar a {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.topbar a {
  color: var(--muted);
}

.section-panel,
.content-section {
  scroll-margin-top: 88px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(360px, 0.78fr);
  gap: 64px;
  align-items: center;
  min-height: calc(100vh - 64px);
  padding: 64px 48px;
}

.hero-copy {
  max-width: 820px;
}

.section-kicker {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  line-height: 1;
  text-transform: uppercase;
}

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

h1,
h2 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: 0;
}

h1 {
  max-width: 12.5ch;
  margin-bottom: 24px;
  font-size: clamp(4rem, 7.4vw, 7.8rem);
  line-height: 0.9;
}

h2 {
  max-width: 14ch;
  margin-bottom: 18px;
  font-size: clamp(3rem, 5.8vw, 6.4rem);
  line-height: 0.92;
}

h3 {
  margin-bottom: 10px;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.25;
}

.hero-copy > p:last-child,
.section-heading > p:last-child,
.split-content p,
.motion-demo p,
.rules-list p,
.voice-grid p,
.principles-grid p,
.type-card p {
  color: var(--muted);
}

.hero-copy > p:last-child {
  max-width: 58ch;
  font-size: 18px;
}

.hero-art {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: minmax(110px, 1fr);
  gap: 10px;
  min-height: 390px;
}

.brand-sample {
  border: 1px solid var(--hairline);
  border-radius: 8px;
}

.sample-one {
  grid-row: span 2;
  background: var(--surface);
}

.sample-two {
  background: var(--accent-soft);
}

.sample-three {
  background: var(--accent);
}

.sample-four {
  grid-column: span 2;
  background: var(--foreground);
}

.sample-five {
  background: var(--accent-deep);
}

.sample-six {
  background: var(--white);
}

.content-section {
  padding: 112px 48px;
  border-top: 1px solid var(--hairline);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(320px, 1fr);
  gap: 48px;
  align-items: start;
  margin-bottom: 48px;
}

.section-heading .section-kicker {
  grid-column: 1 / -1;
  margin-bottom: -16px;
}

.section-heading > p {
  max-width: 58ch;
  margin-bottom: 0;
  padding-top: 10px;
}

.principles-grid,
.type-showcase,
.logo-grid,
.voice-grid,
.download-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.principles-grid article,
.type-card,
.voice-grid article {
  min-height: 240px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 8px;
}

.principles-grid span,
.type-card span {
  display: block;
  margin-bottom: 56px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.color-ramp {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 64px;
}

.color-swatch {
  display: flex;
  min-height: 340px;
  padding: 24px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  flex-direction: column;
  justify-content: space-between;
}

.color-swatch.is-dark {
  color: var(--background);
  border-color: transparent;
}

.swatch-index {
  color: currentColor;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  opacity: 0.64;
  text-transform: uppercase;
}

.swatch-name {
  display: block;
  margin-bottom: 6px;
  font-family: var(--serif);
  font-size: 28px;
  line-height: 1;
}

.swatch-hex,
.swatch-hsl {
  display: block;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.7;
  opacity: 0.76;
}

.split-content {
  display: grid;
  grid-template-columns: minmax(280px, 0.52fr) minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}

.split-content > div:first-child {
  max-width: 430px;
}

.semantic-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.semantic-family {
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--hairline);
  border-radius: 8px;
}

.semantic-family header {
  padding: 16px;
  border-bottom: 1px solid var(--hairline);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.semantic-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  height: 112px;
}

.type-showcase {
  grid-template-columns: 1.2fr 0.8fr;
  margin-bottom: 12px;
}

.display-type p {
  max-width: 10ch;
  color: var(--foreground);
  font-family: var(--serif);
  font-size: clamp(3.2rem, 7vw, 7.6rem);
  line-height: 0.9;
}

.system-type p {
  max-width: 42ch;
  font-size: 22px;
  line-height: 1.45;
}

.type-scale {
  display: grid;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--hairline);
  border-radius: 8px;
}

.type-row {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr) 280px;
  gap: 24px;
  align-items: center;
  min-height: 82px;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.44);
}

.type-row strong {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.type-row span:last-child {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  overflow-wrap: anywhere;
}

.type-specimen {
  margin: 0;
  color: var(--foreground);
  line-height: 1.1;
}

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

.logo-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 260px;
  padding: 42px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
}

.logo-light {
  background: var(--surface);
  color: var(--foreground);
}

.logo-dark {
  background: var(--foreground);
  color: var(--background);
}

.logo-dark img,
.logo-light img {
  color: currentColor;
}

.logo-dark img {
  filter: invert(96%) sepia(6%) saturate(164%) hue-rotate(332deg) brightness(104%) contrast(94%);
}

.mark-tile img {
  width: 64px;
}

.layout-demo {
  display: grid;
  grid-template-columns: 60fr 30fr 10fr;
  min-height: 220px;
  overflow: hidden;
  border-radius: 8px;
}

.layout-band {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 10px;
  padding: 24px;
}

.layout-band:nth-child(1) {
  background: var(--surface);
}

.layout-band:nth-child(2) {
  background: var(--foreground);
  color: var(--background);
}

.layout-band:nth-child(3) {
  background: var(--accent);
}

.layout-band span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.13em;
  opacity: 0.68;
  text-transform: uppercase;
}

.layout-band strong {
  font-family: var(--serif);
  font-size: clamp(2rem, 5vw, 5rem);
  font-weight: 400;
  line-height: 0.9;
}

.rules-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.rules-list p {
  min-height: 128px;
  margin: 0;
  padding: 22px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid var(--hairline);
  border-radius: 8px;
}

.motion-demo {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 360px;
  gap: 32px;
  align-items: center;
}

.motion-track {
  position: relative;
  min-height: 220px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 8px;
}

.motion-dot {
  position: absolute;
  top: 50%;
  left: 28px;
  width: 42px;
  height: 42px;
  background: var(--accent-deep);
  border-radius: 50%;
  transform: translateY(-50%);
  animation: focusMove 4s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}

@keyframes focusMove {
  0%,
  100% {
    left: 28px;
  }

  48%,
  58% {
    left: calc(100% - 70px);
  }
}

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

  .motion-dot {
    animation: none;
  }
}

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

.token-preview {
  max-height: 520px;
  margin: 0;
  padding: 24px;
  overflow: auto;
  background: var(--foreground);
  color: var(--accent-soft);
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.7;
}

.asset-list,
.download-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.asset-list a,
.download-grid a {
  display: flex;
  min-height: 92px;
  align-items: flex-end;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  font-weight: 600;
}

.final-section {
  padding-bottom: 144px;
}

@media (max-width: 1100px) {
  .portal-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    padding: 22px 24px;
  }

  .nav-groups {
    display: flex;
    gap: 28px;
    margin-top: 28px;
    overflow-x: auto;
  }

  .nav-group {
    min-width: 150px;
  }

  .topbar {
    top: 0;
    padding: 0 24px;
  }

  .hero,
  .section-heading,
  .split-content,
  .motion-demo {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding: 72px 24px 48px;
  }

  .content-section {
    padding: 84px 24px;
  }

  .color-ramp {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .semantic-grid,
  .asset-list,
  .download-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .hero-art,
  .principles-grid,
  .type-showcase,
  .logo-grid,
  .voice-grid,
  .rules-list,
  .asset-list,
  .download-grid {
    grid-template-columns: 1fr;
  }

  .color-ramp,
  .semantic-grid {
    grid-template-columns: 1fr;
  }

  .color-swatch {
    min-height: 220px;
  }

  .type-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .layout-demo {
    grid-template-columns: 1fr;
  }

  .layout-band {
    min-height: 130px;
  }

  .topbar {
    gap: 16px;
  }

  .topbar span,
  .topbar a {
    font-size: 10px;
  }
}
