/* pre spin previews: directory chrome. Values from project/02-brand/identity-5/tokens.json. */
@font-face {
  font-family: "prespin Funnel";
  src: url("fonts/prespinFunnel-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "prespin Funnel";
  src: url("fonts/prespinFunnel-Medium.woff2") format("woff2");
  font-weight: 550;
  font-display: swap;
}

:root {
  /* color */
  --blue-100: #EBEFFF; --blue-200: #D1DBFF; --blue-400: #6D89FF; --blue-500: #311FFF;
  --blue-600: #1820DB; --blue-700: #0022B9; --blue-900: #021149;
  --stone-50: #F4F2EE; --stone-100: #EBE9E5; --stone-200: #DBD9D5; --stone-400: #9A9894;
  --stone-500: #797774; --stone-600: #5C5B58; --stone-800: #292928; --stone-900: #1B1A1A;
  --stone-950: #111111; --white: #FFFFFF;

  /* role: light */
  --surface: var(--stone-50);
  --surface-sunken: var(--stone-100);
  --text: var(--stone-950);
  --text-muted: var(--stone-600);
  --border: var(--stone-200);
  --accent-text: var(--blue-600);
  --accent-hover: var(--blue-700);
  --focus-ring: var(--blue-500);

  /* type and space */
  --font: "prespin Funnel", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(16px, 3.4vw, 48px);
  --max: 1344px;
  --col-gap: clamp(16px, 1.7vw, 24px);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --surface: var(--stone-950);
    --surface-sunken: var(--stone-900);
    --text: var(--stone-50);
    --text-muted: var(--stone-200);
    --border: var(--stone-800);
    --accent-text: var(--blue-200);
    --accent-hover: var(--white);
    --focus-ring: var(--blue-400);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "pnum";
}
img { display: block; max-width: 100%; height: auto; }
:where(ul[role="list"]) { list-style: none; margin: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 3px; }

.skip {
  position: absolute; left: var(--gutter); top: 12px; z-index: 10;
  padding: 10px 14px; background: var(--text); color: var(--surface);
  transform: translateY(-200%);
}
.skip:focus { transform: none; }

.wrap { max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }

/* header */
.top { display: flex; align-items: center; justify-content: space-between; height: 96px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--text); }
.brand .mark { height: 26px; width: auto; }
.brand .word { height: 24px; width: auto; transform: translateY(3px); } /* descender: optical centre on the x-height */
.back { font-size: 15px; font-weight: 550; color: var(--text-muted); }
.back:hover { color: var(--text); }

/* intro */
.intro { padding: clamp(96px, 13vw, 184px) 0 0; }
h1 {
  margin: 0;
  font-weight: 550;
  font-size: clamp(40px, 6.1vw, 88px);
  line-height: 1.0;
  letter-spacing: -0.03em;
  max-width: 11.6em;
  text-wrap: balance;
}
.note { margin: clamp(24px, 2.6vw, 36px) 0 0; font-size: clamp(16px, 1.25vw, 18px); color: var(--text-muted); }

/* sections */
.block { margin-top: clamp(96px, 11vw, 160px); border-top: 1px solid var(--border); padding-top: 16px; }
h2 { margin: 0 0 clamp(28px, 3.4vw, 48px); font-size: 15px; font-weight: 550; color: var(--text-muted); letter-spacing: 0; }
.block:last-child { margin-bottom: clamp(120px, 14vw, 200px); }

.chip { display: inline-block; width: 9px; height: 9px; background: var(--chip); flex: none; }

/* websites */
.t-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(40px, 4.4vw, 64px) var(--col-gap); }
.t-img { display: block; }
.t-img img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; background: var(--surface-sunken); outline: 1px solid var(--border); outline-offset: -1px; }
.t-card h3 { margin: 16px 0 0; font-size: 18px; font-weight: 550; letter-spacing: -0.01em; }
.t-links { display: flex; gap: 24px; margin-top: 8px; }
.t-links a {
  display: inline-flex; align-items: center; gap: 8px; min-height: 32px;
  font-size: 15px; font-weight: 550; color: var(--accent-text);
  text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 4px;
}
.t-links a:hover { color: var(--accent-hover); text-decoration-color: currentColor; }

@media (max-width: 1099px) { .t-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 759px) {
  .top { height: 72px; }
  .brand .mark { height: 22px; }
  .brand .word { height: 20px; }
}
@media (max-width: 639px) { .t-grid { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: no-preference) {
  .t-links a, .back, .card .name, .links a, .back-row a { transition: color .15s ease, text-decoration-color .15s ease; }
}

/* ---- brand archive ---- */
.grid { display: grid; gap: clamp(40px, 4.4vw, 64px) var(--col-gap); }
.grid-featured { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.grid-featured .card { grid-column: span 2; }
.grid-featured .card.wide { grid-column: span 3; }
.grid-normal { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-small { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px var(--col-gap); }
.card a { display: block; }
.thumb { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface-sunken); outline: 1px solid var(--border); outline-offset: -1px; }
.card.wide .thumb { aspect-ratio: 16 / 9; }
.grid-small .thumb { aspect-ratio: 4 / 5; }
.thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.fit-contain .thumb img { object-fit: contain; object-position: center; }
.grid-featured .thumb img { object-fit: contain; }
.card .name {
  display: flex; align-items: center; gap: 10px; margin-top: 16px;
  font-size: 18px; font-weight: 550; letter-spacing: -0.01em;
}
.card.wide .name { font-size: clamp(18px, 1.5vw, 22px); }
.grid-small .name { font-size: 16px; margin-top: 12px; }
.card .meta { display: block; margin-top: 4px; font-size: 14px; color: var(--text-muted); }
.card a:hover .name { color: var(--accent-text); }
.card a:hover img { opacity: .92; }

/* item page */
.item { padding-bottom: clamp(64px, 8vw, 120px); }
.item-title { display: flex; align-items: center; gap: 14px; font-size: clamp(32px, 4vw, 56px); max-width: none; padding-top: clamp(48px, 6vw, 96px); }
.item-title .chip { width: 14px; height: 14px; }
.idea { margin: 20px 0 0; max-width: 40em; font-size: clamp(17px, 1.4vw, 20px); line-height: 1.4; }
.date { margin: 8px 0 0; font-size: 15px; color: var(--text-muted); }
.links { display: flex; gap: 24px; margin: 20px 0 clamp(32px, 4vw, 56px); }
.links a, .back-row a {
  font-size: 15px; font-weight: 550; color: var(--accent-text);
  text-decoration: underline; text-underline-offset: 4px; text-decoration-color: transparent;
}
.links a:hover, .back-row a:hover { text-decoration-color: currentColor; color: var(--accent-hover); }
.figure { display: block; }
.figure img, .more img, .motion video { width: 100%; height: auto; background: var(--surface-sunken); outline: 1px solid var(--border); outline-offset: -1px; }
.motion { margin: var(--col-gap) 0 0; }
.motion video { display: block; }
.more { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--col-gap); margin-top: var(--col-gap); align-items: start; }
.more a { display: block; }
.back-row { margin: clamp(48px, 6vw, 80px) 0 0; }

@media (max-width: 1099px) {
  .grid-featured { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-featured .card, .grid-featured .card.wide { grid-column: span 1; }
  .grid-normal { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-small { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 759px) {
  .grid-featured .card.wide { grid-column: 1 / -1; }
}
@media (max-width: 639px) {
  .grid-featured, .grid-normal { grid-template-columns: 1fr; }
  .grid-featured .card { grid-column: auto; }
  .grid-small { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .more { grid-template-columns: 1fr; }
}
@media (min-width: 640px) { .motion { max-width: calc(50% - var(--col-gap) / 2); } }
