/* sans.supply
   One stylesheet. Paper, ink, one grotesk. The photographs carry the colour.
   Test for everything here: would it look right printed? */

@font-face {
  font-family: "The Future";
  src: url("../fonts/the-future-regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "The Future";
  src: url("../fonts/the-future-medium.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "The Future";
  src: url("../fonts/the-future-bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "The Future Mono";
  src: url("../fonts/the-future-mono-regular.woff2") format("woff2");
  font-weight: 400;
  font-feature-settings: "ss02", "ss06", "ss07", "ss08", "ss09"; /* hard f, h, m, n, r - same as vasser.no */
  font-display: swap;
}
@font-face {
  font-family: "The Future Mono";
  src: url("../fonts/the-future-mono-bold.woff2") format("woff2");
  font-weight: 700;
  font-feature-settings: "ss02", "ss06", "ss07", "ss08", "ss09";
  font-display: swap;
}

:root {
  --paper: #eeece6;
  --ink: #1b1a17;
  --muted: #76736c;
  --rule: rgba(27, 26, 23, 0.16);

  --font: "The Future", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "The Future Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --text: 1.0625rem;          /* 17px */
  --small: 0.875rem;          /* 14px */
  --lead: clamp(1.5rem, 1rem + 2.4vw, 2.625rem);   /* the one big line */
  --title: clamp(1.375rem, 1rem + 1.4vw, 2rem);

  --page: clamp(1.25rem, 4vw, 3.5rem);   /* page gutter */
  --gap: clamp(1.25rem, 3vw, 2.5rem);    /* grid gap */
  --block: clamp(3rem, 8vw, 7rem);       /* between major blocks */
  --measure: 34em;
}

/* --- base --------------------------------------------------------------- */

html {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 100%;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  font-size: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  animation: page-in 320ms ease-out both;
}
@keyframes page-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  body { animation: none; }
  * { transition: none !important; }
}

img { max-width: 100%; height: auto; display: block; background: rgba(27, 26, 23, 0.05); }
figure { margin: 0; }
h1, h2, h3, p, dl, ul { margin: 0; }
h1, h2, h3 { font-weight: 500; font-size: inherit; line-height: inherit; }
a { color: inherit; text-decoration: none; }
p a, .text a { text-decoration: underline; text-underline-offset: 0.16em; text-decoration-thickness: 1px; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
::selection { background: var(--ink); color: var(--paper); }

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

.site-header {
  flex-wrap: wrap;
  gap: 0.5em 1.5em;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: calc(var(--page) * 0.75) var(--page);
}
.wordmark { font-weight: 500; letter-spacing: -0.01em; }
.site-nav { display: flex; gap: 1.5em; }
.site-nav a { transition: color 120ms; }
.site-nav a:hover { color: var(--muted); }
.site-nav a[aria-current] { text-decoration: underline; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }

.site-main { flex: 1; padding: var(--page); }

/* --- the one big line --------------------------------------------------- */

.lead {
  font-size: var(--lead);
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: -0.018em;
  max-width: 22ch;
  text-wrap: balance;
}
.t-home .lead { margin: var(--gap) 0 var(--block); }

/* --- catalogue ---------------------------------------------------------- */

.product-grid {
  display: grid;
  gap: var(--block) var(--gap);
  grid-template-columns: 1fr;
}
@media (min-width: 60em) { .product-grid { grid-template-columns: 1fr 1fr; } }

.plate { display: block; }
.plate img { transition: opacity 200ms; }
.plate:hover img { opacity: 0.94; }
.plate:hover .caption-title { text-decoration: underline; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }

/* caption row under a photograph, like a plate in a printed catalogue */
.caption {
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: var(--gap);
  margin-top: 0.9em;
  line-height: 1.35;
}
.caption-title { font-weight: 500; }
.caption-price { text-align: right; white-space: nowrap; font-family: var(--mono); font-size: 0.94em; }
.caption-summary { grid-column: 1; color: var(--muted); max-width: var(--measure); margin-top: 0.15em; }

.featured .caption { max-width: none; }
.featured .caption-summary { font-size: var(--text); }

/* --- product page ------------------------------------------------------- */
/* Images stack on the left and scroll; the details column on the right stays
   put until the images run out. Single column on small screens, images first. */

.product-split {
  display: grid;
  gap: var(--gap);
  grid-template-columns: 1fr;
  grid-template-areas: "lead" "details" "more";   /* phones: one image, the details, the rest */
  align-items: start;
}
.gallery-lead { grid-area: lead; }
.gallery-more { grid-area: more; }
.details { grid-area: details; }
@media (min-width: 60em) {
  .product-split {
    grid-template-columns: 1fr 1fr;
    grid-template-areas: "lead details" "more details";
    gap: var(--gap);
  }
  .details { position: sticky; top: var(--page); }
}

.gallery { display: grid; gap: var(--gap); }
.gallery figcaption { color: var(--muted); font-family: var(--mono); font-size: var(--small); margin-top: 0.5em; }

.details { display: grid; gap: var(--gap); max-width: var(--measure); }
.product-head h1 { font-size: var(--title); font-weight: 500; line-height: 1.15; letter-spacing: -0.015em; }
.product-meta { display: flex; justify-content: space-between; gap: 1em; margin-top: 0.4em; }
.product-meta .kind { color: var(--muted); font-family: var(--mono); font-size: 0.94em; }

.summary { font-size: 1.15em; line-height: 1.4; }
.text p + p, .text ul + p, .text ol + p, .text p + ul, .text p + ol { margin-top: 1em; }
.text h2, .text h3 { margin-top: 2em; margin-bottom: 0.5em; }
.text ul, .text ol { padding-left: 1.2em; }
.text li + li { margin-top: 0.35em; }
.text code { font-family: var(--mono); font-size: 0.92em; }

.specs { font-family: var(--mono); font-size: var(--small); }
.specs > div {
  display: grid;
  grid-template-columns: minmax(7em, 1fr) 2fr;
  gap: 1em;
  padding: 0.55em 0;
  border-top: 1px solid var(--rule);
}
.specs > div:last-child { border-bottom: 1px solid var(--rule); }
.specs dt { color: var(--muted); }
.specs dd { margin: 0; }

.button {
  display: inline-grid;
  grid-auto-flow: column;
  gap: 1.5em;
  align-items: baseline;
  padding: 0.85em 1.25em;
  border: 1px solid var(--ink);
  font-family: var(--mono);
  font-size: var(--small);
  line-height: 1;
  transition: background-color 120ms, color 120ms;
}
.button .price { opacity: 0.75; }
.button--buy { background: var(--ink); color: var(--paper); }
.button--buy:hover { background: transparent; color: var(--ink); }
.button--disabled { color: var(--muted); border-color: var(--rule); }
.variants { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.5em; }
.licence-note { color: var(--muted); font-family: var(--mono); font-size: var(--small); margin-top: 1em; }
.licence-note a { text-decoration: underline; text-underline-offset: 0.16em; text-decoration-thickness: 1px; }

.contact-sheet { margin-top: var(--block); }
.contact-sheet h2 { color: var(--muted); margin-bottom: 0.9em; }

/* --- simple pages ------------------------------------------------------- */

.page { max-width: var(--measure); }
.page h1 { font-size: var(--title); font-weight: 500; line-height: 1.15; letter-spacing: -0.015em; margin-bottom: var(--gap); }

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

.site-footer {
  padding: var(--block) var(--page) var(--page);
  color: var(--muted);
  font-family: var(--mono);
  font-size: var(--small);
  display: grid;
  gap: var(--gap);
}
@media (min-width: 60em) {
  .site-footer { grid-template-columns: 1fr 1fr; align-items: end; }
}

.newsletter { max-width: 26em; color: var(--ink); font-family: var(--font); font-size: var(--text); }
.newsletter label { display: block; margin-bottom: 0.75em; }
.newsletter-row { display: flex; border-bottom: 1px solid var(--ink); }
.newsletter input {
  flex: 1;
  min-width: 0;
  padding: 0.5em 0;
  border: 0;
  background: transparent;
  font: inherit;
  color: inherit;
}
.newsletter input::placeholder { color: var(--muted); }
.newsletter input:focus-visible { outline: none; }
.newsletter button {
  padding: 0.5em 0 0.5em 1em;
  border: 0;
  background: transparent;
  font: inherit;
  font-family: var(--mono);
  font-size: var(--small);
  color: inherit;
  cursor: pointer;
}
.newsletter button:hover { color: var(--muted); }

.footer-meta { display: grid; gap: 0.5em; }
@media (min-width: 60em) { .footer-meta { justify-items: end; text-align: right; } }
.footer-social, .footer-legal { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0 1.25em; }
.footer-meta a:hover { color: var(--ink); }
.footer-text p { margin: 0; }
.footer-meta:only-child { grid-column: 1 / -1; justify-items: start; text-align: left; }

/* --- mockup tool -------------------------------------------------------- */
/* Preview left, lead and actions right; scenes below. One column on small screens. */

.tool-top {
  display: grid;
  gap: var(--gap);
  grid-template-columns: 1fr;
  align-items: start;
}
@media (min-width: 60em) {
  .tool-top { grid-template-columns: minmax(0, 1600px) minmax(18rem, 30rem); justify-content: start; }
  .tool-side { position: sticky; top: var(--page); }
}
.tool-side { display: grid; gap: 2.5rem; }
.tool-section { display: grid; gap: 0.75rem; justify-items: start; }
.tool-side .lead { margin-bottom: 0.5rem; }
.tool .lead { font-size: clamp(1.375rem, 1rem + 1.4vw, 1.9rem); max-width: none; text-wrap: pretty; margin: 0; }

.preview { position: relative; background: rgba(27, 26, 23, 0.05); max-width: 1600px; }
.preview canvas { display: block; width: 100%; height: auto; }
.preview.is-over { outline: 1px solid var(--ink); outline-offset: -1px; }
.preview-hint {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  padding: 0.6em 1em; border: 0; background: var(--paper); color: var(--ink);
  font-family: var(--mono); font-size: var(--small); cursor: pointer; max-width: 90%; text-align: center;
}
.preview-hint:hover { background: var(--ink); color: var(--paper); }
.preview-hint.is-error { pointer-events: none; }

.tool-actions { display: flex; flex-wrap: wrap; gap: 0.75em; }
.tool-actions .button { cursor: pointer; background: none; color: var(--ink); }
.tool-actions .button--buy { background: var(--ink); color: var(--paper); }
.tool-actions .button--buy:hover:not(:disabled) { background: transparent; color: var(--ink); }
.tool-actions .button:disabled { color: var(--muted); border-color: var(--rule); background: transparent; cursor: default; }
.tool-status { font-family: var(--mono); font-size: var(--small); color: var(--muted); }
.tool-status:empty { display: none; }
.tool-size { font-family: var(--mono); font-size: var(--small); color: var(--muted); display: grid; gap: 0.2em; }
.tool-size-label { color: var(--ink); font-family: var(--mono); font-size: var(--small); }

.scenes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(5.5rem, 1fr)); gap: 0.5em; width: 100%; }
.scenes-note { font-family: var(--mono); font-size: var(--small); color: var(--muted); }
.scene { padding: 0; border: 1px solid transparent; background: none; cursor: pointer; }
.scene img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; height: auto; }
.scene[aria-selected="true"] { border-color: var(--ink); }
.scene:hover img { opacity: 0.9; }

.preview-overlay { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.lock { width: 1em; height: 1em; color: var(--muted); }
.size--full .lock--open { display: block; }
.size--full .lock--closed { display: none; }
.size--full.is-locked .lock--open { display: none; }
.size--full.is-locked .lock--closed { display: block; }
.size--full { gap: 0.5em; }
.size-note { color: var(--muted); }

.unlock { font-family: var(--mono); font-size: var(--small); color: var(--muted); }
.unlock summary { cursor: pointer; color: var(--ink); }
.unlock summary:hover { text-decoration: underline; text-underline-offset: 0.16em; }
.unlock-form { display: flex; gap: 0.5em; margin: 0.75em 0 0.5em; }
.unlock-form input { flex: 1; min-width: 0; padding: 0.5em 0.6em; border: 1px solid var(--rule); background: transparent; font: inherit; color: var(--ink); }
.unlock-form input:focus-visible { outline: none; border-color: var(--ink); }
.unlock-form .button { cursor: pointer; background: none; color: var(--ink); padding: 0.5em 0.9em; }
.unlock-form .button:hover { background: var(--ink); color: var(--paper); }
.unlock-note { margin: 0; }
.unlock-state { color: var(--ink); }
.sizes { display: grid; gap: 0.35em; justify-items: start; font-family: var(--mono); font-size: var(--small); }
.size { padding: 0; border: 0; background: none; color: var(--muted); font: inherit; cursor: pointer; display: inline-flex; align-items: center; gap: 0.5em; }
.size::before { content: ""; flex: none; width: 0.6em; height: 0.6em; border: 1px solid currentColor; border-radius: 50%; box-sizing: border-box; }
.size[aria-checked="true"] { color: var(--ink); }
.size[aria-checked="true"]::before { background: currentColor; }
.size:hover:not(:disabled) { color: var(--ink); }
.size:disabled { cursor: default; color: var(--muted); opacity: 0.6; }
.tool-licence { font-family: var(--mono); font-size: var(--small); color: var(--muted); max-width: 30em; }
.tool-licence a { color: var(--ink); text-decoration: underline; text-underline-offset: 0.16em; }
.key-pitch { font-family: var(--mono); font-size: var(--small); color: var(--muted); max-width: 30em; }
.key-pitch a { color: var(--ink); text-decoration: underline; text-underline-offset: 0.16em; }

/* --- notes -------------------------------------------------------------- */
.notes-intro { color: var(--muted); margin-bottom: var(--block); }
.post-list { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--gap); }
.post-list time, .post-meta { font-family: var(--mono); font-size: var(--small); color: var(--muted); display: block; }
.post-list a { font-weight: 500; text-decoration: none; }
.post-list a:hover { text-decoration: underline; text-underline-offset: 0.16em; }
.post-list p { color: var(--muted); margin-top: 0.2em; }
.post-meta { margin-bottom: var(--gap); }
.post-meta a { text-decoration: none; }
.post-meta a:hover { text-decoration: underline; }
.post-summary { font-size: 1.15em; line-height: 1.4; color: var(--muted); margin-bottom: var(--gap); }
.post-cta { margin-top: var(--block); font-family: var(--mono); font-size: var(--small); color: var(--muted); }
.post-cta a { color: var(--ink); text-decoration: underline; text-underline-offset: 0.16em; }

/* listing plates: second image fades in on hover or keyboard focus */
.plate-media { position: relative; }
.plate-media img + img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 260ms ease; }
.plate.has-hover:hover .plate-media img + img,
.plate.has-hover:focus-visible .plate-media img + img { opacity: 1; }
.plate.has-hover:hover .plate-media img:first-child { opacity: 1; }   /* the earlier dim-on-hover does not apply when a hover image exists */
