:root {
  --paper: #EDF0EE;
  --paper-2: #E3E8E5;
  --ink: #22303C;
  --muted: #5E6B74;
  --line: #C9D1CF;
  --link: #2945C7;
  --sage: #7F9C86;
  --mulberry: #8B4E5E;
  --mustard: #D3A63A;
  --harbor: #3E5F78;
  --teal: #4F8C8B;
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --sans: "Avenir Next", Avenir, "Segoe UI", "Helvetica Neue", system-ui, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.6 var(--sans);
}

a { color: var(--link); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--link); outline-offset: 3px; border-radius: 2px; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 28px; }

/* Header */
.site-header { padding: 26px 0; }
.site-header .wrap { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.wordmark {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.wordmark span { color: var(--muted); font-weight: 400; }
.site-nav { display: flex; gap: 26px; font-size: 16px; }
.site-nav a { color: var(--ink); text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent; }
.site-nav a:hover, .site-nav a[aria-current="page"] { border-bottom-color: var(--ink); }

/* Type */
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; letter-spacing: -0.015em; margin: 0; }
h1 { font-size: clamp(38px, 5.4vw, 60px); }
h2 { font-size: clamp(28px, 3.4vw, 36px); }
h3 { font-size: 23px; }
p { margin: 0 0 1em; max-width: 62ch; }
.lead { font-size: 20px; color: var(--muted); max-width: 46ch; }

/* Hero */
.hero { padding: 56px 0 84px; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.hero h1 { margin-bottom: 22px; max-width: 13ch; }
.hero .actions { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; margin-top: 30px; }

.button {
  display: inline-block;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  padding: 13px 22px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 16px;
}
.button:hover { background: var(--harbor); }

/* Swatch fan — the one bold element */
.fan { position: relative; height: 420px; }
.chip {
  position: absolute;
  left: 50%; bottom: 0;
  width: 150px; height: 360px;
  margin-left: -75px;
  transform-origin: 50% 92%;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 1px 0 var(--line), 0 14px 30px -18px rgba(34, 48, 60, 0.55);
  padding: 10px 10px 16px;
  display: flex; flex-direction: column;
}
.chip .bands { flex: 1; display: grid; grid-template-rows: 3fr 1fr 1fr 1fr; gap: 3px; border-radius: 6px; overflow: hidden; }
.chip .name { font-family: var(--serif); font-size: 19px; font-weight: 600; margin-top: 10px; }
.chip .kind { font-size: 13px; color: var(--muted); }
.chip:nth-child(1) { transform: rotate(-30deg); }
.chip:nth-child(2) { transform: rotate(-15deg); }
.chip:nth-child(3) { transform: rotate(0deg); }
.chip:nth-child(4) { transform: rotate(15deg); }
.chip:nth-child(5) { transform: rotate(30deg); }

@media (prefers-reduced-motion: no-preference) {
  .chip { animation: open-fan 900ms cubic-bezier(.2,.7,.2,1) both; }
  .chip:nth-child(1) { --r: -30deg; animation-delay: 60ms; }
  .chip:nth-child(2) { --r: -15deg; animation-delay: 30ms; }
  .chip:nth-child(3) { --r: 0deg; }
  .chip:nth-child(4) { --r: 15deg; animation-delay: 30ms; }
  .chip:nth-child(5) { --r: 30deg; animation-delay: 60ms; }
  @keyframes open-fan { from { transform: rotate(0deg); } to { transform: rotate(var(--r)); } }
}

/* Sections */
.section { padding: 72px 0; border-top: 1px solid var(--line); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; flex-wrap: wrap; margin-bottom: 34px; }
.section-head p { margin: 0; color: var(--muted); }

/* Theme rows */
.theme-list { list-style: none; margin: 0; padding: 0; }
.theme-row {
  display: grid;
  grid-template-columns: 132px 1fr auto;
  gap: 28px;
  align-items: center;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}
.theme-row:first-child { border-top: 1px solid var(--line); }
.strip { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; height: 48px; border-radius: 5px; overflow: hidden; }
.theme-row h3 { margin-bottom: 4px; }
.theme-row h3 a { color: var(--ink); text-decoration: none; }
.theme-row h3 a:hover { text-decoration: underline; }
.theme-row p { margin: 0; color: var(--muted); }
.theme-row .platform { font-size: 15px; color: var(--ink); white-space: nowrap; }

/* Notes grid */
.notes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.notes h3 { margin-bottom: 10px; }
.notes p { color: var(--muted); }

/* Theme detail (themes page) */
.detail { display: grid; grid-template-columns: 300px 1fr; gap: 44px; padding: 52px 0; border-top: 1px solid var(--line); }
.detail .specimen { background: #fff; border-radius: 10px; padding: 14px; box-shadow: 0 1px 0 var(--line); }
.detail .specimen .bands { height: 220px; display: grid; grid-template-rows: 3fr 1fr 1fr 1fr; gap: 3px; border-radius: 6px; overflow: hidden; }
.detail .specimen .sample { font-family: var(--serif); font-size: 34px; margin-top: 12px; line-height: 1.1; }
.detail h2 { margin-bottom: 8px; }
.detail .meta { color: var(--muted); margin-bottom: 18px; }
.detail ul { margin: 0 0 18px; padding-left: 20px; max-width: 60ch; }
.detail li { margin-bottom: 6px; }

/* Docs */
.docs { display: grid; grid-template-columns: 220px 1fr; gap: 56px; padding: 40px 0 80px; }
.docs nav { position: sticky; top: 24px; align-self: start; font-size: 16px; }
.docs nav a { display: block; color: var(--ink); text-decoration: none; padding: 6px 0; }
.docs nav a:hover { color: var(--link); }
.docs article h2 { margin: 44px 0 14px; }
.docs article h2:first-child { margin-top: 0; }
.docs ol { padding-left: 22px; max-width: 62ch; }
.docs ol li { margin-bottom: 10px; }
code, kbd {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.88em;
  background: var(--paper-2);
  padding: 2px 6px;
  border-radius: 4px;
}
.note { background: #fff; border-left: 4px solid var(--mustard); padding: 14px 18px; border-radius: 0 6px 6px 0; max-width: 62ch; margin: 18px 0; }
.note p { margin: 0; }

/* Contact */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.contact dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 10px 22px; }
.contact dt { color: var(--muted); }
.contact dd { margin: 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 34px 0 48px; color: var(--muted); font-size: 15px; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); }

/* Responsive */
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .fan { height: 340px; max-width: 420px; }
  .chip { width: 120px; height: 290px; margin-left: -60px; }
  .notes { grid-template-columns: 1fr; gap: 28px; }
  .detail { grid-template-columns: 1fr; }
  .docs { grid-template-columns: 1fr; gap: 24px; }
  .docs nav { position: static; display: flex; flex-wrap: wrap; gap: 4px 18px; }
  .contact { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  body { font-size: 16px; }
  .theme-row { grid-template-columns: 1fr; gap: 12px; }
  .strip { width: 160px; }
  .hero { padding-bottom: 56px; overflow: hidden; }
  .fan { height: 280px; margin: 0 auto; }
  .chip { width: 96px; height: 236px; margin-left: -48px; padding: 7px 7px 12px; }
  .chip .name { font-size: 15px; }
  .site-nav { gap: 18px; }
}
