@import "tailwindcss";

:root {
  --paper: #f3efe7;
  --card: #fffdf8;
  --ink: #18213a;
  --muted: #697087;
  --blue: #3158d5;
  --red: #e85738;
  --amber: #f2bb4e;
  --line: rgba(24, 33, 58, .16);
  --mono: "DM Mono", ui-monospace, monospace;
  --sans: "DM Sans", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
.topbar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; width: min(1340px, calc(100% - 40px)); min-height: 68px; margin: 0 auto; border-bottom: 1px solid var(--ink); }
.brand { display: inline-flex; align-items: center; gap: 9px; width: max-content; font-size: 14px; font-weight: 700; letter-spacing: -.03em; }
.brand b { display: grid; place-items: center; width: 25px; height: 25px; background: var(--blue); color: white; font-size: 12px; transform: rotate(-4deg); }
.top-meta { display: flex; align-items: center; gap: 11px; color: var(--muted); font: 500 9px var(--mono); letter-spacing: .12em; }
.top-meta i { width: 4px; height: 4px; border-radius: 50%; background: var(--red); }
.github { justify-self: end; padding: 8px 10px; border: 1px solid var(--ink); font-size: 12px; font-weight: 700; box-shadow: 2px 2px 0 var(--ink); }

.intro { position: relative; width: min(1340px, calc(100% - 40px)); margin: 0 auto; padding: 76px 0 80px; text-align: center; }
.kicker { margin: 0 0 17px; color: var(--blue); font: 500 10px var(--mono); letter-spacing: .14em; }
.intro h1 { margin: 0; font-size: clamp(52px, 6.8vw, 96px); font-weight: 600; line-height: .9; letter-spacing: -.075em; }
.hero-mark { --ann-text-x: 25px; --ann-text-y: -1px; --ann-rotate: -6deg; }
.hero-mark::after { font-size: 14px; white-space: nowrap; }
.intro > p:not(.kicker) { max-width: 540px; margin: 40px auto 18px; color: var(--muted); font-size: 15px; line-height: 1.6; }
.intro > code { display: inline-block; max-width: 100%; padding: 10px 13px; overflow-x: auto; border: 1px solid var(--line); background: rgba(255,255,255,.5); color: var(--blue); font: 400 11px var(--mono); white-space: nowrap; }

.spec-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(320px, .75fr); gap: 16px; width: min(1340px, calc(100% - 40px)); margin: 0 auto; }
.panel { min-width: 0; border: 1px solid var(--ink); background: var(--card); box-shadow: 5px 5px 0 rgba(24,33,58,.13); }
.panel-title { display: grid; grid-template-columns: 35px 1fr auto; align-items: center; min-height: 51px; padding: 0 17px; border-bottom: 1px solid var(--line); }
.panel-title > span { color: var(--blue); font: 500 10px var(--mono); }
.panel-title h2 { margin: 0; font-size: 14px; letter-spacing: -.02em; }
.panel-title code { color: var(--muted); font: 400 10px var(--mono); }

.directions-grid { position: relative; display: grid; grid-template-areas: "nw n ne" "w center e" "sw s se"; grid-template-columns: repeat(3, 1fr); min-height: 430px; overflow: hidden; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 33.3333% 33.3333%; }
.direction-cell { display: grid; place-items: center; min-height: 140px; }
.cell-nw { grid-area: nw; }.cell-n { grid-area: n; }.cell-ne { grid-area: ne; }.cell-w { grid-area: w; }.cell-e { grid-area: e; }.cell-sw { grid-area: sw; }.cell-s { grid-area: s; }.cell-se { grid-area: se; }
.direction-cell .ann { display: inline-flex; align-items: center; gap: 7px; padding: 5px; --ann-label-max-width: 60px; }
.direction-cell .ann::after { font-size: 10px; }
.direction-cell b { color: var(--blue); font-size: 21px; }
.direction-cell small { color: var(--muted); font: 500 9px var(--mono); }
.direction-center { z-index: 2; grid-area: center; align-self: center; justify-self: center; display: grid; place-content: center; width: 86px; height: 86px; border-radius: 50%; background: var(--ink); color: white; text-align: center; box-shadow: 0 0 0 8px rgba(24,33,58,.08); }
.direction-center strong { font-size: 30px; line-height: .9; }
.direction-center span { margin-top: 7px; font: 400 8px var(--mono); text-transform: uppercase; }

.colors-panel { background: #ece8df; }
.color-stack { padding: 8px 20px; }
.color-row { display: grid; grid-template-columns: 22px 1fr auto; align-items: center; min-height: 53px; border-bottom: 1px solid var(--line); }
.color-row:last-child { border-bottom: 0; }
.color-row code { color: var(--muted); font: 400 9px var(--mono); }
.swatch { width: 10px; height: 10px; border-radius: 50%; background: #8a8782; }
.swatch-amber { background: #b8751a; }.swatch-blue { background: #3b72c4; }.swatch-green { background: #2f8f5b; }.swatch-red { background: #c45a38; }.swatch-purple { background: #8657c8; }.swatch-rainbow { background: linear-gradient(135deg,#ff1493,#3b72c4,#2f8f5b); }
.color-row .ann { width: max-content; font-size: 15px; font-weight: 600; }

.variants-panel { grid-column: 1 / -1; margin-top: 2px; }
.variant-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.demo-cell { min-width: 0; min-height: 190px; padding: 17px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.demo-cell:nth-child(4n) { border-right: 0; }
.demo-cell:nth-last-child(-n + 4) { border-bottom: 0; }
.demo-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.demo-meta span { font-size: 11px; font-weight: 700; }
.demo-meta code { color: var(--muted); font: 400 8px var(--mono); text-align: right; }
.demo-cell p { display: grid; place-content: center; min-height: 115px; margin: 14px 0 0; text-align: center; font-size: clamp(18px, 1.7vw, 24px); font-weight: 500; line-height: 1.4; letter-spacing: -.035em; }
.demo-cell .ann::after { font-size: 10px; }
.status-pill { display: inline-block; padding: 5px 8px; border-radius: 99px; background: #e3dcff; color: #6642a2; font-size: 12px; }
.custom-pink { --ann-color: #e1269f; --ann-mark: rgba(225,38,159,.12); }
.long-note { --ann-label-max-width: 125px; }
.tuned-note { --ann-arrow-x: 18px; --ann-arrow-y: -6px; --ann-text-x: 20px; }
.rotated-note { --ann-rotate: 9deg; --ann-text-y: -4px; }

footer { display: flex; align-items: center; justify-content: space-between; width: min(1340px, calc(100% - 40px)); margin: 42px auto 0; padding: 22px 0 35px; border-top: 1px solid var(--ink); color: var(--muted); font: 400 10px var(--mono); }
footer a { color: var(--blue); }

@media (max-width: 900px) {
  .spec-grid { grid-template-columns: 1fr; }
  .variants-panel { grid-column: auto; }
  .variant-grid { grid-template-columns: repeat(2, 1fr); }
  .demo-cell:nth-child(4n) { border-right: 1px solid var(--line); }
  .demo-cell:nth-child(2n) { border-right: 0; }
  .demo-cell:nth-last-child(-n + 4) { border-bottom: 1px solid var(--line); }
  .demo-cell:nth-last-child(-n + 2) { border-bottom: 0; }
}

@media (max-width: 600px) {
  .topbar { grid-template-columns: 1fr auto; width: calc(100% - 28px); }
  .top-meta { display: none; }
  .intro { width: calc(100% - 28px); padding: 66px 0 70px; }
  .intro h1 { font-size: 56px; }
  .spec-grid { width: calc(100% - 28px); }
  .panel-title { grid-template-columns: 30px 1fr; }
  .panel-title code { display: none; }
  .directions-grid { min-height: 390px; }
  .direction-cell { min-height: 125px; }
  .direction-cell .ann::after { font-size: 8px; }
  .variant-grid { grid-template-columns: 1fr; }
  .demo-cell, .demo-cell:nth-child(2n), .demo-cell:nth-child(4n), .demo-cell:nth-last-child(-n + 2), .demo-cell:nth-last-child(-n + 4) { border-right: 0; border-bottom: 1px solid var(--line); }
  .demo-cell:last-child { border-bottom: 0; }
  footer { width: calc(100% - 28px); }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
