:root {
  color-scheme: light;
  --paper: #f7f7f7;
  --surface: #ffffff;
  --ink: #000000;
  --ink-soft: #000000;
  --muted: #000000;
  --line: #cfcfcf;
  --quiet: #e7e7e7;
  --red: #9e1b32;
  --red-dark: #6d1222;
  --blue: #007298;
  --orange: #e77204;
  --green: #45842a;
  --violet: #652f6c;
  font-family: Arial, Helvetica, sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
  color: var(--ink);
}

body {
  margin: 0;
  min-width: 320px;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

button,
input,
select {
  font: inherit;
}

.masthead {
  min-height: 72px;
  padding: 0 3.2vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  border: 0;
  background: var(--surface);
}

.masthead nav {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

.masthead nav a {
  color: #000000;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-decoration: none;
  text-transform: uppercase;
}

.masthead nav a:hover,
.masthead nav a:focus-visible {
  text-decoration: underline;
}

.palette-strip {
  display: flex;
  gap: 4px;
}

.swatch {
  width: 16px;
  height: 16px;
}

.swatch-red { background: var(--red); }
.swatch-blue { background: var(--blue); }
.swatch-orange { background: var(--orange); }
.swatch-green { background: var(--green); }
.swatch-violet { background: var(--violet); }
.swatch-ink { background: var(--ink); }

main {
  width: min(1640px, 100%);
  margin: 0 auto;
}

.hero {
  min-height: 0;
  padding: 32px 3.2vw 24px;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.7fr);
  align-items: center;
  gap: 24px;
  border: 0;
}

.eyebrow {
  margin: 0 0 20px;
  color: #000000;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  line-height: 1.4;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 980px;
  margin: 0;
  font-size: clamp(36px, 4.5vw, 64px);
  font-weight: 900;
  letter-spacing: -0.068em;
  line-height: 0.88;
}

.hero-context > p {
  max-width: 650px;
  margin: 0 0 16px;
  color: var(--ink-soft);
  font-size: clamp(20px, 1.55vw, 28px);
  line-height: 1.45;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  border: 0;
  background: var(--surface);
}

.hero-stats div {
  min-height: 112px;
  padding: 20px;
  border: 0;
}

.hero-stats div:last-child {
  border: 0;
}

.hero-stats dt {
  color: #000000;
  font-size: 25px;
  font-weight: 900;
}

.hero-stats dd {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.35;
  text-transform: uppercase;
}

.method {
  padding: 80px 3.2vw;
  display: grid;
  grid-template-columns: minmax(260px, 0.55fr) minmax(0, 1.45fr);
  gap: 7vw;
  background: var(--ink);
  color: var(--surface);
}

.method h2,
.section-heading h2,
.rights h2 {
  margin: 0;
  font-size: clamp(38px, 4vw, 70px);
  letter-spacing: -0.052em;
  line-height: 0.98;
}

.method .eyebrow {
  color: #ffffff;
}

.method-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--ink);
  border: 0;
}

.method-grid article {
  min-height: 260px;
  padding: 28px;
  background: var(--ink);
}

.method-grid strong {
  color: #ffffff;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.method-grid p {
  margin: 28px 0 0;
  font-size: 18px;
  line-height: 1.55;
}

.controls {
  position: sticky;
  z-index: 10;
  top: 0;
  padding: 20px 3.2vw;
  display: grid;
  grid-template-columns: auto minmax(260px, 1fr) minmax(190px, 0.35fr) auto;
  align-items: end;
  gap: 18px;
  border: 0;
  background: rgb(247 247 247 / 96%);
  backdrop-filter: blur(10px);
}

.controls fieldset,
.controls label {
  min-width: 0;
}

.controls fieldset {
  margin: 0;
  padding: 0;
  display: flex;
  gap: 8px;
  border: 0;
}

.controls legend,
.controls label > span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.colorset-button {
  min-height: 44px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 0;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.colorset-button.is-active {
  background: var(--ink);
  color: var(--surface);
}

.control-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.cs1-dot { background: var(--red); }
.cs2-dot { background: var(--blue); }

.controls input,
.controls select {
  width: 100%;
  min-height: 44px;
  padding: 0 13px;
  border: 0;
  border-radius: 0;
  background: var(--surface);
  color: var(--ink);
}

.controls input:focus,
.controls select:focus,
.colorset-button:focus-visible {
  outline: 3px solid #ffccd5;
  outline-offset: 1px;
}

.result-count {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.result-count strong {
  color: #000000;
  font-size: 20px;
}

.gallery-shell {
  padding: 84px 3.2vw 110px;
}

.section-heading {
  margin-bottom: 48px;
  display: grid;
  grid-template-columns: 0.4fr 1.6fr;
  gap: 5vw;
  align-items: end;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.artwork-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  border: 0;
  background: var(--surface);
}

.artwork-card[hidden] {
  display: none;
}

.image-link {
  display: block;
  aspect-ratio: 4 / 3;
  padding: 18px;
  border: 0;
  background:
    linear-gradient(45deg, #f7f7f7 25%, transparent 25%),
    linear-gradient(-45deg, #f7f7f7 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #f7f7f7 75%),
    linear-gradient(-45deg, transparent 75%, #f7f7f7 75%),
    var(--surface);
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  background-size: 16px 16px;
}

.image-link:hover,
.image-link:focus-visible {
  background-color: #ffffff;
}

.artwork-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.artwork-copy {
  flex: 1;
  padding: 25px;
  display: flex;
  flex-direction: column;
}

.card-kicker {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #000000;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.artwork-card h3 {
  margin: 20px 0 12px;
  font-size: clamp(25px, 2vw, 36px);
  letter-spacing: -0.042em;
  line-height: 1;
}

.creator,
.date {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.4;
}

.creator {
  font-size: 15px;
  font-weight: 700;
}

.date {
  margin-top: 3px;
  font-size: 13px;
}

.card-data {
  margin: 26px 0;
  border: 0;
}

.card-data div {
  padding: 10px 0;
  display: grid;
  grid-template-columns: 0.42fr 0.58fr;
  gap: 10px;
  border: 0;
}

.card-data dt,
.card-data dd {
  margin: 0;
  font-size: 11px;
  line-height: 1.35;
}

.card-data dt {
  color: var(--muted);
}

.card-data dd {
  text-align: right;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.actions {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.actions a {
  min-height: 42px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-decoration: none;
  text-transform: uppercase;
}

.actions .open-svg {
  background: var(--ink);
  color: var(--surface);
}

.actions a:hover,
.actions a:focus-visible {
  background: var(--red);
  color: var(--surface);
}

.empty-state {
  padding: 80px;
  border: 0;
  text-align: center;
}

.rights {
  margin: 0 3.2vw 90px;
  padding: 64px;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 24px;
  background: var(--red-dark);
  color: var(--surface);
}

.rights .eyebrow {
  color: #ffffff;
}

.rights > p {
  margin: 0;
  align-self: end;
  font-size: 21px;
  line-height: 1.55;
}

footer {
  min-height: 100px;
  padding: 30px 3.2vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  border: 0;
  color: var(--muted);
  font-size: 11px;
}

@media (max-width: 1180px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 58px;
  }

  .method,
  .rights {
    grid-template-columns: 1fr;
  }

  .controls {
    grid-template-columns: 1fr 1fr;
    align-items: end;
  }

  .gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .masthead {
    padding: 18px 14px;
    align-items: flex-start;
  }

  .masthead nav {
    gap: 10px 18px;
  }

  .palette-strip {
    display: none;
  }

  .hero {
    min-height: 0;
    padding: 72px 14px 58px;
  }

  h1 {
    font-size: clamp(54px, 16vw, 78px);
  }

  .hero-context > p {
    font-size: 18px;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .hero-stats div {
    min-height: 86px;
    border: 0;
    border: 0;
  }

  .hero-stats div:last-child {
    border: 0;
  }

  .method,
  .gallery-shell {
    padding: 58px 14px;
  }

  .method-grid {
    grid-template-columns: 1fr;
  }

  .method-grid article {
    min-height: 0;
  }

  .controls {
    position: static;
    padding: 20px 14px;
    grid-template-columns: 1fr;
  }

  .controls fieldset {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .section-heading {
    grid-template-columns: 1fr;
  }

  .gallery {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .image-link {
    padding: 12px;
  }

  .artwork-copy {
    padding: 22px;
  }

  .rights {
    margin: 0 14px 58px;
    padding: 38px 28px;
  }

  .rights > p {
    font-size: 17px;
  }

  footer {
    padding: 28px 14px;
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
  }
}
