/* Victor Silva — design tokens and documentation primitives */
:root {
  color-scheme: light;
  --vs-graphite: #17191d;
  --vs-ivory: #f5f1e8;
  --vs-cobalt: #155eef;
  --vs-steel: #717784;
  --vs-white: #ffffff;
  --vs-line: color-mix(in srgb, var(--vs-graphite) 16%, transparent);
  --vs-panel: color-mix(in srgb, var(--vs-white) 52%, transparent);
  --vs-font-sans: "Manrope", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --vs-font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --vs-space-1: .5rem;
  --vs-space-2: 1rem;
  --vs-space-3: 1.5rem;
  --vs-space-4: 2rem;
  --vs-space-5: 4rem;
  --vs-radius: 1rem;
  --vs-max: 74rem;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
::selection { background: var(--vs-cobalt); color: var(--vs-white); }
body {
  margin: 0;
  background: var(--vs-ivory);
  color: var(--vs-graphite);
  font: 1rem/1.65 var(--vs-font-sans);
}
a { color: inherit; }
img { display: block; max-width: 100%; }
h1, h2, h3 { line-height: 1.08; letter-spacing: -.035em; }
h1 { max-width: 12ch; margin: .25rem 0 1.25rem; font-size: clamp(3.4rem, 9vw, 8rem); }
h2 { margin: 0 0 1rem; font-size: clamp(2.1rem, 5vw, 4.6rem); }
h3 { margin: 0 0 .6rem; font-size: 1.3rem; }
p { max-width: 72ch; }
code { font-family: var(--vs-font-mono); }
blockquote { margin: 2rem 0; padding-left: 1.25rem; border-left: 3px solid var(--vs-cobalt); font-size: clamp(1.2rem, 2.5vw, 1.8rem); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: .85rem; border-bottom: 1px solid var(--vs-line); text-align: left; vertical-align: top; }
th, .label, .eyebrow { font: 600 .75rem/1.4 var(--vs-font-mono); letter-spacing: .1em; text-transform: uppercase; }
th, .muted { color: var(--vs-steel); }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 1rem; top: 1rem; z-index: 100; padding: .75rem 1rem; background: var(--vs-cobalt); color: var(--vs-white); }
.shell { width: min(calc(100% - 2rem), var(--vs-max)); margin-inline: auto; }
.topbar { position: sticky; top: 0; z-index: 10; border-bottom: 1px solid var(--vs-line); background: color-mix(in srgb, var(--vs-ivory) 90%, transparent); backdrop-filter: blur(14px); }
.topbar .shell { display: flex; align-items: center; justify-content: space-between; min-height: 4rem; gap: 1rem; }
.topbar nav { display: flex; flex-wrap: wrap; gap: 1rem; font-size: .8rem; }
.topbar a { text-decoration: none; }
.topbar nav a { padding-block: .35rem; border-bottom: 2px solid transparent; }
.topbar nav a:hover, .topbar nav a:focus-visible { border-color: var(--vs-cobalt); }
.brand { display: flex; align-items: center; gap: .7rem; }
.brand img { width: 2.25rem; height: 2.25rem; object-fit: contain; }
.hero { position: relative; overflow: hidden; padding: clamp(5rem, 11vw, 10rem) 0 5rem; border-bottom: 1px solid var(--vs-line); }
.hero::before { content: ""; position: absolute; inset: 0 0 auto; height: .35rem; background: var(--vs-cobalt); }
.hero-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(16rem, .42fr); align-items: center; gap: clamp(2rem, 6vw, 6rem); }
.hero-mark { position: relative; }
.hero-mark::before { content: "VS / 001"; position: absolute; top: -1.5rem; right: 0; color: var(--vs-steel); font: 600 .7rem/1 var(--vs-font-mono); letter-spacing: .1em; }
.hero-mark img { width: min(100%, 25rem); margin-inline: auto; filter: drop-shadow(0 1.5rem 2.5rem color-mix(in srgb, var(--vs-cobalt) 16%, transparent)); }
.hero .eyebrow, .accent { color: var(--vs-cobalt); }
.hero-copy { max-width: 48rem; font-size: clamp(1.1rem, 2vw, 1.35rem); }
.meta { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 2rem; }
.pill { padding: .35rem .7rem; border: 1px solid var(--vs-line); border-radius: 999px; font-size: .8rem; }
main > section { padding: clamp(4rem, 8vw, 7rem) 0; border-bottom: 1px solid var(--vs-line); scroll-margin-top: 5rem; }
.tone-dark { background: var(--vs-graphite); color: var(--vs-ivory); }
.tone-dark .muted { color: color-mix(in srgb, var(--vs-ivory) 66%, var(--vs-steel)); }
.tone-dark .card { border-color: color-mix(in srgb, var(--vs-ivory) 15%, transparent); background: color-mix(in srgb, var(--vs-white) 5%, transparent); }
.tone-dark .label { color: color-mix(in srgb, var(--vs-cobalt) 78%, var(--vs-white)); }
.section-head { display: grid; grid-template-columns: minmax(10rem, .35fr) 1fr; gap: 2rem; margin-bottom: 2.5rem; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card { padding: 1.4rem; border: 1px solid var(--vs-line); border-radius: var(--vs-radius); background: var(--vs-panel); }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
.series { position: relative; overflow: hidden; border-top: 3px solid var(--vs-cobalt); }
.series::after { content: ""; position: absolute; inset: auto -1.5rem -1.5rem auto; width: 4rem; height: 4rem; background: var(--vs-cobalt); transform: rotate(45deg); opacity: .12; }
.series h3 { margin-top: .8rem; font-size: clamp(1.55rem, 3vw, 2.25rem); }
.number { color: var(--vs-cobalt); font: 700 2.6rem/1 var(--vs-font-mono); }
.logo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.logo-panel { min-height: 22rem; display: grid; place-items: center; padding: 2rem; border-radius: var(--vs-radius); background: var(--vs-white); }
.logo-panel.dark { background: var(--vs-graphite); }
.logo-panel img { max-height: 17rem; object-fit: contain; }
.swatches { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.swatch { min-height: 12rem; display: flex; flex-direction: column; justify-content: flex-end; padding: 1rem; border: 1px solid var(--vs-line); border-radius: var(--vs-radius); }
.swatch.graphite { background: var(--vs-graphite); color: var(--vs-white); }
.swatch.ivory { background: var(--vs-ivory); }
.swatch.cobalt { background: var(--vs-cobalt); color: var(--vs-white); }
.swatch.steel { background: var(--vs-steel); color: var(--vs-white); }
.callout { padding: 1.25rem; border-left: 3px solid var(--vs-cobalt); background: color-mix(in srgb, var(--vs-cobalt) 7%, transparent); }
.flow { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem; padding: 0; list-style: none; }
.flow li { padding: .55rem .8rem; border: 1px solid var(--vs-line); border-radius: 999px; }
.flow li:not(:last-child)::after { content: "→"; margin-left: 1.25rem; color: var(--vs-cobalt); }
.space-top { margin-top: 2rem; }
.space-top-lg { margin-top: 3rem; }
.footer { padding: 3rem 0; background: var(--vs-graphite); color: var(--vs-ivory); }

@media (max-width: 800px) {
  .topbar nav { display: none; }
  .hero-layout, .section-head, .grid, .grid.three, .logo-grid, .swatches { grid-template-columns: 1fr; }
  .hero-mark { width: min(65vw, 18rem); margin: 1rem auto 0; }
  .logo-panel { min-height: 17rem; }
  .swatches { grid-template-columns: 1fr 1fr; }
  .flow { display: grid; }
  .flow li:not(:last-child)::after { content: none; }
  table { display: block; max-width: 100%; overflow-x: auto; }
}

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