/* ColorSpread brand preview. Tokens live in tokens.css; no inline styles (strict CSP). */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  -webkit-text-size-adjust: 100%;
}

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

body {
  margin: 0;
  background: var(--cs-bg);
  color: var(--cs-text);
  font-family: var(--cs-font);
  font-size: var(--cs-text-md);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

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

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

h1,
h2,
h3 {
  font-family: var(--cs-font);
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h1 {
  font-size: var(--cs-text-display);
  font-weight: 800;
  letter-spacing: -0.03em;
}

h2 {
  font-size: var(--cs-text-2xl);
  font-weight: 800;
}

h3 {
  font-size: var(--cs-text-lg);
  font-weight: 700;
  letter-spacing: -0.01em;
}

a {
  color: var(--cs-link);
}

:focus-visible {
  outline: 3px solid var(--cs-focus);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  width: 100%;
  max-width: var(--cs-max);
  margin-inline: auto;
  padding-inline: var(--cs-gutter);
}

.skip-link {
  position: absolute;
  left: var(--cs-gutter);
  top: -80px;
  z-index: 20;
  padding: 10px 16px;
  border-radius: var(--cs-radius-sm);
  background: var(--cs-btn-bg);
  color: var(--cs-btn-text);
  font-weight: 700;
}

.skip-link:focus {
  top: 12px;
}

/* ---------------------------------------------------------------- header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--cs-bg) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--cs-border);
}

.site-header__row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 24px;
  min-height: 72px;
  padding-block: 10px;
}

.brand-link {
  display: inline-flex;
  margin-right: auto;
}

.brand-link img {
  display: block;
  height: 36px;
  width: auto;
}

.site-nav {
  display: flex;
  gap: 4px;
  order: 3;
  width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}

.site-nav a {
  padding: 8px 12px;
  border-radius: var(--cs-radius-pill);
  color: var(--cs-text);
  font-size: var(--cs-text-sm);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav a:hover {
  background: var(--cs-surface-alt);
}

@media (min-width: 900px) {
  .site-nav {
    order: 0;
    width: auto;
  }
}

.lang-switch {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--cs-border);
  border-radius: var(--cs-radius-pill);
  background: var(--cs-surface);
}

.lang-switch button {
  min-width: 44px;
  min-height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--cs-radius-pill);
  background: transparent;
  color: var(--cs-text-muted);
  font: 700 var(--cs-text-xs) / 1 var(--cs-font);
  letter-spacing: 0.06em;
  cursor: pointer;
}

.lang-switch button[aria-pressed='true'] {
  background: var(--cs-btn-bg);
  color: var(--cs-btn-text);
}

/* ------------------------------------------------------------------ type */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  color: var(--cs-accent-text);
  font-size: var(--cs-text-sm);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Three dots that grow: the brand idea in miniature. */
.eyebrow::before {
  content: '';
  width: 40px;
  height: 14px;
  background:
    radial-gradient(circle at 4px 50%, var(--cs-yellow) 0 3px, transparent 3.5px),
    radial-gradient(circle at 16px 50%, var(--cs-magenta) 0 4.5px, transparent 5px),
    radial-gradient(circle at 31px 50%, var(--cs-cyan) 0 6px, transparent 6.5px);
}

.lead {
  max-width: 62ch;
  margin-top: 16px;
  color: var(--cs-text-muted);
  font-size: var(--cs-text-lg);
}

.note {
  margin-top: 24px;
  color: var(--cs-text-muted);
  font-size: var(--cs-text-sm);
}

/* ---------------------------------------------------------------- layout */

.section {
  padding-block: clamp(48px, 8vw, 96px);
}

.section--alt {
  background: var(--cs-surface-alt);
}

.section__head {
  margin-bottom: clamp(28px, 4vw, 48px);
}

.grid {
  display: grid;
  gap: 20px;
}

@media (min-width: 720px) {
  .grid--2 {
    grid-template-columns: repeat(2, 1fr);
  }

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

.hero {
  padding-block: clamp(40px, 7vw, 88px);
  overflow: clip;
}

.hero__grid {
  display: grid;
  gap: clamp(32px, 5vw, 56px);
  align-items: center;
}

@media (min-width: 900px) {
  .hero__grid {
    grid-template-columns: 1.05fr 0.95fr;
  }
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.hero__art {
  overflow: hidden;
  border-radius: var(--cs-radius-lg);
  box-shadow: var(--cs-shadow);
  aspect-ratio: 4 / 3;
  background: #fff;
}

.hero__art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ----------------------------------------------------------------- cards */

.card {
  position: relative;
  padding: 28px;
  border: 1px solid var(--cs-border);
  border-radius: var(--cs-radius-lg);
  background: var(--cs-surface);
}

.card h3 {
  margin-bottom: 10px;
}

.card p {
  color: var(--cs-text-muted);
}

.card--dot::before {
  content: '';
  display: block;
  width: 36px;
  height: 36px;
  margin-bottom: 20px;
  border-radius: 50%;
  background: var(--dot, var(--cs-cyan));
}

.card--cyan {
  --dot: var(--cs-cyan);
}

.card--magenta {
  --dot: var(--cs-magenta);
}

.card--yellow {
  --dot: var(--cs-yellow);
}

.rules {
  margin-top: 28px;
}

/* ------------------------------------------------------------------ logo */

.logo-grid {
  display: grid;
  gap: 16px;
}

@media (min-width: 720px) {
  .logo-grid {
    grid-template-columns: repeat(6, 1fr);
  }

  .tile--wide {
    grid-column: span 3;
  }

  .tile:not(.tile--wide) {
    grid-column: span 2;
  }
}

.tile {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  min-height: 200px;
  margin: 0;
  padding: 28px;
  border: 1px solid var(--cs-border);
  border-radius: var(--cs-radius-lg);
}

.tile--paper {
  background: #fff;
  color: var(--cs-ink);
}

.tile--substrate {
  background: var(--cs-substrate);
  color: var(--cs-ink);
}

.tile--ink {
  background: var(--cs-ink);
  border-color: var(--cs-ink-500);
  color: #f6f4ff;
}

.tile--violet {
  background: var(--cs-violet);
  border-color: transparent;
  color: #fff;
}

.tile img {
  display: block;
}

.tile__row {
  display: flex;
  align-items: flex-end;
  gap: 24px;
  flex: 1;
}

.tile--wide img {
  margin: auto;
}

.tile figcaption {
  font-size: var(--cs-text-sm);
  font-weight: 600;
  opacity: 0.8;
}

/* ----------------------------------------------------------------- color */

.swatches {
  display: grid;
  gap: 14px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr));
}

@media (min-width: 720px) {
  .swatches {
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  }
}

.swatch {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  height: 100%;
  padding: 12px 12px 16px;
  border: 1px solid var(--cs-border);
  border-radius: var(--cs-radius);
  background: var(--cs-surface);
  color: var(--cs-text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 120ms ease;
}

@media (prefers-reduced-motion: no-preference) {
  .swatch:hover {
    transform: translateY(-2px);
  }
}

.swatch__chip {
  display: block;
  width: 100%;
  height: 84px;
  margin-bottom: 12px;
  border-radius: calc(var(--cs-radius) - 4px);
  box-shadow: inset 0 0 0 1px rgb(20 17 43 / 8%);
}

@media (prefers-color-scheme: dark) {
  .swatch__chip {
    box-shadow: inset 0 0 0 1px rgb(255 255 255 / 22%);
  }
}

.sw-cyan {
  background: var(--cs-cyan);
}

.sw-magenta {
  background: var(--cs-magenta);
}

.sw-yellow {
  background: var(--cs-yellow);
}

.sw-violet {
  background: var(--cs-violet);
}

.sw-orange {
  background: var(--cs-orange);
}

.sw-ink {
  background: var(--cs-ink);
}

.sw-substrate {
  background: var(--cs-substrate);
}

.swatch__name {
  font-weight: 700;
}

.swatch__hex {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: var(--cs-text-sm);
  color: var(--cs-text-muted);
}

.swatch__role {
  margin-top: 6px;
  font-size: var(--cs-text-sm);
  color: var(--cs-text-muted);
  line-height: 1.4;
}

.copy-status {
  min-height: 1.6em;
  margin-top: 14px;
  color: var(--cs-accent-text);
  font-size: var(--cs-text-sm);
  font-weight: 600;
}

.access {
  margin-top: 16px;
}

.pairs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.pair {
  padding: 10px 16px;
  border-radius: var(--cs-radius-pill);
  font-size: var(--cs-text-sm);
  font-weight: 700;
}

.pair--ink-yellow {
  background: var(--cs-yellow);
  color: var(--cs-ink);
}

.pair--ink-cyan {
  background: var(--cs-cyan);
  color: var(--cs-ink);
}

.pair--white-violet {
  background: var(--cs-violet);
  color: #fff;
}

.pair--white-magenta {
  background: var(--cs-magenta-700);
  color: #fff;
}

/* ------------------------------------------------------------------ type */

.type-specimen {
  display: grid;
  gap: 8px;
  padding: clamp(20px, 4vw, 40px);
}

.type-row {
  display: grid;
  gap: 4px;
  padding-block: 20px;
  border-bottom: 1px solid var(--cs-border);
}

.type-row:last-child {
  border-bottom: 0;
}

@media (min-width: 720px) {
  .type-row {
    grid-template-columns: 200px 1fr;
    align-items: baseline;
    gap: 24px;
  }
}

.type-meta {
  color: var(--cs-text-muted);
  font-size: var(--cs-text-sm);
  font-weight: 600;
}

.type-row p {
  color: var(--cs-text);
}

.type-display {
  font-size: var(--cs-text-display);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.type-heading {
  font-size: var(--cs-text-xl);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.type-body {
  max-width: 60ch;
  font-size: var(--cs-text-lg);
}

.type-label {
  font-size: var(--cs-text-sm);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ----------------------------------------------------------------- voice */

.voice ul {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.voice li {
  padding: 12px 16px 12px 44px;
  position: relative;
  border-radius: var(--cs-radius);
  background: var(--cs-surface-alt);
  color: var(--cs-text);
}

.voice li::before {
  content: '';
  position: absolute;
  left: 16px;
  top: 50%;
  width: 14px;
  height: 14px;
  margin-top: -7px;
  border-radius: 50%;
}

.voice--do li::before {
  background: var(--cs-cyan);
}

.voice--dont li {
  color: var(--cs-text-muted);
  text-decoration: line-through;
  text-decoration-color: color-mix(in srgb, var(--cs-magenta) 70%, transparent);
  text-decoration-thickness: 2px;
}

.voice--dont li::before {
  background: var(--cs-magenta);
}

/* ------------------------------------------------------------ components */

.stack {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border: 2px solid transparent;
  border-radius: var(--cs-radius-pill);
  font: 700 var(--cs-text-md) / 1 var(--cs-font);
  text-decoration: none;
  cursor: pointer;
}

.btn--primary {
  background: var(--cs-btn-bg);
  color: var(--cs-btn-text);
}

.btn--secondary {
  border-color: var(--cs-text);
  background: transparent;
  color: var(--cs-text);
}

/* Misregistration: the inks land a little off, like a real print. */
@media (prefers-reduced-motion: no-preference) {
  .btn {
    transition:
      box-shadow 140ms ease,
      transform 140ms ease;
  }

  .btn:hover {
    transform: translate(-2px, -2px);
    box-shadow:
      3px 3px 0 var(--cs-magenta),
      6px 6px 0 var(--cs-cyan);
  }

  .btn:active {
    transform: none;
    box-shadow: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn:hover {
    box-shadow:
      3px 3px 0 var(--cs-magenta),
      6px 6px 0 var(--cs-cyan);
  }
}

.text-link {
  font-weight: 700;
  text-underline-offset: 4px;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border: 1.5px solid transparent;
  border-radius: var(--cs-radius-pill);
  font-size: var(--cs-text-sm);
  font-weight: 700;
}

.tag--yellow {
  background: var(--cs-yellow);
  color: var(--cs-ink);
}

.tag--violet {
  background: var(--cs-violet);
  color: #fff;
}

.tag--outline {
  border-color: var(--cs-text-muted);
  color: var(--cs-text);
}

/* ---------------------------------------------------------------- footer */

.site-footer {
  padding-block: 40px;
  border-top: 1px solid var(--cs-border);
  color: var(--cs-text-muted);
  font-size: var(--cs-text-sm);
}

.site-footer__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
}

.site-footer__row p:last-child {
  margin-left: auto;
}
