/* Verdigris — paint & pigment supply (fictional demo shop for Vemvavor labs).
 *
 * Direction: the site is a gallery wall — near-monochrome chrome so the pigments
 * carry every drop of colour on the page. All imagery is generated: colour
 * fields with an SVG-turbulence canvas grain, no external asset is ever fetched.
 */

:root {
  --wall: #f3f2ef;
  --card: #ffffff;
  --graphite: #161615;
  --muted: #6b6b66;
  --edge: #e2e1dc;
  --brand: #2e7d6f;
  --brand-deep: #1d5a50;
  --danger: #9a3b2c;

  --display: Optima, Candara, "Gill Sans MT", "Gill Sans", Avenir, system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --gap: clamp(20px, 4vw, 48px);
  --radius: 4px;

  /* Canvas grain: an inline SVG data URI, so the page renders with no network. */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

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

html {
  color-scheme: light;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--wall);
  color: var(--graphite);
  font: 16px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: rgba(46, 125, 111, 0.16);
}

img,
svg {
  max-width: 100%;
}

a {
  color: var(--brand-deep);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--graphite);
}

:focus-visible {
  outline: 2px solid var(--brand-deep);
  outline-offset: 3px;
  border-radius: 2px;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

button {
  touch-action: manipulation;
}

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: 12px;
  top: 12px;
  z-index: 50;
  background: var(--card);
  padding: 10px 14px;
  border-radius: var(--radius);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.16);
}

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--gap);
}

/* ── chrome ──────────────────────────────────────────────────────────────── */

.masthead {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(243, 242, 239, 0.92);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--edge);
}

.masthead .wrap {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 64px;
}

.wordmark {
  font-family: var(--display);
  font-size: 20px;
  letter-spacing: 0.02em;
  font-weight: 600;
  text-decoration: none;
  color: var(--graphite);
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.wordmark .dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 3px rgba(46, 125, 111, 0.16);
}

.masthead nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
}

.masthead nav a {
  color: var(--graphite);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: var(--radius);
  font-size: 15px;
}

.masthead nav a:hover {
  background: rgba(22, 22, 21, 0.06);
}

.masthead nav a[aria-current="page"] {
  box-shadow: inset 0 -2px 0 var(--brand);
}

.cart-link {
  font-variant-numeric: tabular-nums;
}

.cart-count {
  display: inline-block;
  min-width: 21px;
  padding: 0 5px;
  margin-left: 6px;
  border-radius: 11px;
  background: var(--brand);
  color: #fff;
  font: 600 12px/21px var(--mono);
  text-align: center;
}

footer.site {
  border-top: 1px solid var(--edge);
  margin-top: 88px;
  padding: 36px 0 56px;
  color: var(--muted);
  font-size: 14px;
}

footer.site .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  align-items: baseline;
}

footer.site .fine {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ── type ────────────────────────────────────────────────────────────────── */

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.015em;
  text-wrap: balance;
  overflow-wrap: break-word;
  margin: 0 0 0.4em;
}

h1 {
  font-size: clamp(34px, 6vw, 60px);
  line-height: 1.04;
}

h2 {
  font-size: clamp(24px, 3.2vw, 33px);
  line-height: 1.15;
}

h3 {
  font-size: 19px;
  letter-spacing: -0.005em;
}

.eyebrow {
  font: 500 11px/1 var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 14px;
}

.lede {
  font-size: 19px;
  color: #3b3b38;
  max-width: 54ch;
  text-wrap: pretty;
}

.meta {
  font: 12px/1.5 var(--mono);
  letter-spacing: 0.06em;
  color: var(--muted);
  text-transform: uppercase;
}

.price {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

/* ── buttons ─────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--brand);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color 0.18s ease,
    transform 0.18s ease;
}

.btn:hover {
  background: var(--brand-deep);
  color: #fff;
}

.btn:active {
  transform: translateY(1px);
}

.btn.ghost {
  background: transparent;
  color: var(--graphite);
  border-color: var(--edge);
}

.btn.ghost:hover {
  background: var(--card);
  color: var(--graphite);
  border-color: #c9c8c2;
}

.btn.link {
  background: none;
  border: 0;
  padding: 4px 2px;
  color: var(--brand-deep);
  text-decoration: underline;
  font-weight: 500;
}

/* ── the paint chip: the one piece of colour on the page ─────────────────── */

.chip {
  position: relative;
  display: block;
  background: var(--pig, #ccc);
  border-radius: var(--radius);
  overflow: hidden;
  isolation: isolate;
}

.chip::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--grain);
  background-size: 140px 140px;
  mix-blend-mode: multiply;
  opacity: 0.16;
}

/* Finish is a real product choice, so it changes the sheen you see. */
.chip[data-finish="eggshell"]::before,
.chip[data-finish="gloss"]::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(118deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0) 46%);
}

.chip[data-finish="eggshell"]::before {
  opacity: 0.42;
}

/* ── product grid ────────────────────────────────────────────────────────── */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 26px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.pcard {
  background: var(--card);
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  overflow: hidden;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.pcard:hover {
  border-color: #cfcec8;
  box-shadow: 0 10px 30px rgba(22, 22, 21, 0.09);
  transform: translateY(-2px);
}

.pcard a {
  display: block;
  text-decoration: none;
  color: inherit;
}

.pcard .chip {
  aspect-ratio: 4 / 3;
  border-radius: 0;
}

/* Name and price share the first line; the colour code sits under the name, so
 * a long name wraps without dragging the code and the price out of alignment. */
.pcard .body {
  padding: 15px 16px 17px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 12px;
  align-items: baseline;
}

.pcard .name {
  grid-area: 1 / 1;
  font-family: var(--display);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.2;
}

.pcard .code {
  grid-area: 2 / 1;
  font: 11px/1 var(--mono);
  color: var(--muted);
  letter-spacing: 0.06em;
}

.pcard .price {
  grid-area: 1 / 2;
  font-size: 14px;
}

/* ── filters ─────────────────────────────────────────────────────────────── */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  align-items: center;
  padding: 18px 0 26px;
  border-bottom: 1px solid var(--edge);
  margin-bottom: 30px;
}

.filterset {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.filterset > .meta {
  margin-right: 2px;
}

.pill {
  border: 1px solid var(--edge);
  background: var(--card);
  border-radius: 999px;
  padding: 7px 15px;
  font-size: 14px;
  cursor: pointer;
  transition:
    border-color 0.16s ease,
    background-color 0.16s ease;
}

.pill:hover {
  border-color: #bdbcb6;
}

.pill[aria-pressed="true"] {
  background: var(--graphite);
  border-color: var(--graphite);
  color: #fff;
}

.result-count {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
}

/* ── product page ────────────────────────────────────────────────────────── */

.product {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
  padding-top: 44px;
}

.product .swatch {
  position: sticky;
  top: 92px;
}

.product .swatch .chip {
  aspect-ratio: 1 / 1;
  box-shadow: 0 24px 60px rgba(22, 22, 21, 0.14);
}

.swatch-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
}

.spec {
  width: 100%;
  border-collapse: collapse;
  margin: 26px 0 0;
  font-size: 14px;
}

.spec th,
.spec td {
  text-align: left;
  padding: 10px 0;
  border-bottom: 1px solid var(--edge);
  vertical-align: top;
}

.spec th {
  font: 500 11px/1.5 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  width: 42%;
  padding-right: 16px;
}

.spec td {
  font-family: var(--mono);
  font-size: 13px;
}

.buybox {
  margin: 26px 0 0;
  padding: 22px;
  background: var(--card);
  border: 1px solid var(--edge);
  border-radius: var(--radius);
}

.field {
  display: block;
  margin-bottom: 16px;
}

.field > .meta {
  display: block;
  margin-bottom: 7px;
}

.qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  background: var(--card);
  overflow: hidden;
}

.qty button {
  border: 0;
  background: none;
  width: 38px;
  height: 40px;
  font-size: 17px;
  cursor: pointer;
}

.qty button:hover {
  background: rgba(22, 22, 21, 0.06);
}

.qty output {
  min-width: 36px;
  text-align: center;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

.buyrow {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.added {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: rgba(46, 125, 111, 0.09);
  border: 1px solid rgba(46, 125, 111, 0.28);
  font-size: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
}

.added:empty {
  display: none;
}

/* "See it on a wall" — floods the viewport with the pigment. */
body.wall {
  background: var(--pig-wall, var(--wall));
  transition: background-color 0.4s ease;
}

body.wall .masthead {
  background: rgba(255, 255, 255, 0.82);
}

body.wall .wall-note {
  display: inline;
}

.wall-note {
  display: none;
  font-size: 13px;
  color: var(--muted);
}

/* ── cart & checkout ─────────────────────────────────────────────────────── */

.lines {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--edge);
}

.line {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid var(--edge);
}

.line .chip {
  width: 74px;
  height: 58px;
}

.line .title {
  font-family: var(--display);
  font-size: 17px;
  font-weight: 600;
}

.line .sub {
  color: var(--muted);
  font-size: 13px;
}

.line .right {
  text-align: right;
  display: grid;
  gap: 6px;
  justify-items: end;
}

.totals {
  margin-left: auto;
  max-width: 340px;
  padding-top: 20px;
  display: grid;
  gap: 8px;
}

.totals div {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  font-variant-numeric: tabular-nums;
}

.totals .grand {
  border-top: 1px solid var(--edge);
  padding-top: 10px;
  font-family: var(--display);
  font-size: 20px;
  font-weight: 600;
}

.panel {
  background: var(--card);
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  padding: clamp(20px, 3vw, 30px);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 18px;
}

.form-grid .full {
  grid-column: 1 / -1;
}

label.f {
  display: block;
}

label.f > span {
  display: block;
  font: 500 11px/1.5 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

input[type="text"],
input[type="email"],
input[type="tel"],
select {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  background: var(--wall);
  color: var(--graphite);
}

input:focus-visible,
select:focus-visible {
  background: var(--card);
}

/* The UA default placeholder grey misses 4.5:1 on this paper. */
input::placeholder {
  color: #63635e;
  opacity: 1;
}

.checkout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 48px);
  align-items: start;
  padding-top: 40px;
}

.summary {
  position: sticky;
  top: 92px;
}

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

.summary li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  font-size: 14px;
}

.summary .chip {
  width: 34px;
  height: 28px;
}

.empty {
  padding: 56px 0 24px;
  max-width: 46ch;
}

/* ── home ────────────────────────────────────────────────────────────────── */

.hero {
  padding-top: clamp(52px, 9vw, 104px);
  padding-bottom: clamp(30px, 5vw, 56px);
}

.hero .lede {
  margin: 18px 0 30px;
}

/* The signature: a mixing bench of pigment bands that settle on load. */
.bench {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
  height: clamp(150px, 26vw, 260px);
  margin: 46px 0 0;
}

.bench .chip {
  height: 100%;
  transform: translateY(14px);
  opacity: 0;
  animation: settle 0.62s cubic-bezier(0.22, 0.68, 0.35, 1) forwards;
}

.bench .chip:nth-child(1) {
  animation-delay: 0.04s;
}
.bench .chip:nth-child(2) {
  animation-delay: 0.1s;
}
.bench .chip:nth-child(3) {
  animation-delay: 0.16s;
}
.bench .chip:nth-child(4) {
  animation-delay: 0.22s;
}
.bench .chip:nth-child(5) {
  animation-delay: 0.28s;
}
.bench .chip:nth-child(6) {
  animation-delay: 0.34s;
}

@keyframes settle {
  to {
    transform: none;
    opacity: 1;
  }
}

.band {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 40px;
  padding-top: 26px;
  padding-bottom: 26px;
  border-top: 1px solid var(--edge);
  border-bottom: 1px solid var(--edge);
  margin: 64px 0 0;
}

.section {
  padding-top: 68px;
}

.section-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 26px;
}

.section-head a {
  margin-left: auto;
  font-size: 15px;
}

@media (max-width: 860px) {
  .product,
  .checkout {
    grid-template-columns: minmax(0, 1fr);
  }

  /* Nobody should reach "Place order" before seeing what they are buying. */
  .checkout .summary {
    order: -1;
  }

  .product .swatch,
  .summary {
    position: static;
  }

  .bench {
    grid-template-columns: repeat(3, 1fr);
    height: clamp(180px, 44vw, 260px);
  }

  .masthead nav a {
    padding: 8px 9px;
    font-size: 14px;
  }

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

/* On a phone the header keeps only the two links that lead somewhere you can
 * buy from; the in-page anchor is reachable by scrolling anyway. */
@media (max-width: 560px) {
  .masthead nav a[href="/#bench-note"] {
    display: none;
  }

  .masthead .wrap {
    gap: 12px;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .bench .chip {
    opacity: 1;
    transform: none;
  }
}
