/* the shelf — a daylight specimen drawer. Tokens & motif from visual.md.
   Light only. One cyanotype-blue accent. No console DNA, no fine-press, no slop. */

@font-face {
  font-family: "Big Shoulders Text";
  src: url("/fonts/big-shoulders-text.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Hanken Grotesk";
  src: url("/fonts/hanken-grotesk.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --board:     #E6E7E2;
  --card:      #F5F6F2;
  --ink:       #1B1D1B;
  --ink-soft:  #53585A;
  --rule:      #C7C9C2;
  --blue:      #18467F;
  --blue-deep: #112F57;
  --blue-wash: #E0E6EE;

  --font-label: "Big Shoulders Text", "Arial Narrow", system-ui, sans-serif;
  --font-body:  "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;

  --measure: 38rem;
  --r: 0px;
  --r-chip: 2px;
  --gap: clamp(1rem, 4vw, 1.5rem);
  --pad: clamp(1.15rem, 4.5vw, 1.6rem);
}

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

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

body {
  margin: 0;
  background: var(--board);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.55;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  padding: clamp(1.5rem, 6vw, 4rem) clamp(1.1rem, 5vw, 2rem) clamp(3rem, 8vw, 5rem);
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--blue);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: var(--r-chip);
  font-family: var(--font-body);
  z-index: 10;
}
.skip:focus { left: 1rem; top: 1rem; }

/* ---------- masthead (the lock screen) ---------- */
.masthead {
  max-width: var(--measure);
  margin: 0 auto;
  padding-bottom: clamp(1.4rem, 5vw, 2.2rem);
  border-bottom: 1px solid var(--rule);
}
.overline {
  margin: 0 0 0.9rem;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.wordmark {
  margin: 0;
  font-family: var(--font-label);
  font-weight: 700;
  font-size: clamp(2.9rem, 12vw, 4.6rem);
  line-height: 0.92;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.frame {
  margin: clamp(1rem, 4vw, 1.4rem) 0 0;
  font-size: clamp(1.12rem, 4.4vw, 1.35rem);
  line-height: 1.45;
  max-width: 30rem;
  color: var(--ink);
}
.provenance {
  margin: 0.7rem 0 0;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

/* ---------- the drawer ---------- */
main { max-width: var(--measure); margin: 0 auto; }

.drawer {
  list-style: none;
  margin: clamp(1.6rem, 6vw, 2.6rem) 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}

.specimen {
  position: relative;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--r);
  padding: var(--pad);
  box-shadow: 0 1px 0 rgba(27, 29, 27, 0.03), 0 1px 3px rgba(27, 29, 27, 0.05);
  transition: box-shadow 180ms ease-out, transform 180ms ease-out;
}
/* newest specimen sits 'lifted' at the front of the drawer */
.specimen.is-newest {
  box-shadow: 0 2px 0 rgba(27, 29, 27, 0.04), 0 6px 18px rgba(17, 47, 87, 0.10);
}

/* photo-corner mounts — the ownable 'mounted specimen' signature (decorative).
   Sized to actually register at a glance — this is the detail meant to be remembered. */
.corner {
  position: absolute;
  width: 19px;
  height: 19px;
  border: 0 solid var(--blue);
  opacity: 0.9;
  pointer-events: none;
}
.corner-tl { top: 8px; left: 8px; border-top-width: 2.5px; border-left-width: 2.5px; }
.corner-br { bottom: 8px; right: 8px; border-bottom-width: 2.5px; border-right-width: 2.5px; }

.specimen-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem 0.9rem;
  margin-bottom: 0.55rem;
}
.accession {
  font-family: var(--font-label);
  font-weight: 600;
  font-size: 1.02rem;
  letter-spacing: 0.01em;
  color: var(--blue);
  font-variant-numeric: tabular-nums;
}
.date {
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  margin-left: auto;
}
.tag {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue-deep);
  background: var(--blue-wash);
  padding: 0.18rem 0.5rem;
  border-radius: var(--r-chip);
  align-self: center;
}

.name {
  margin: 0;
  font-family: var(--font-label);
  font-weight: 700;
  font-size: clamp(1.55rem, 6vw, 2.05rem);
  line-height: 1.0;
  letter-spacing: -0.005em;
  word-break: break-word;
  overflow-wrap: anywhere;
}
/* the name IS the link — give it a persistent (non-hover) cyanotype underline so
   it reads as interactive on touch, where there is no hover. */
.name a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--blue);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}
/* stretched link: the whole label is one tap target (phone, E2) */
.name a::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--r);
}
.note {
  margin: 0.65rem 0 0;
  color: var(--ink);
  font-size: 1.0625rem;
  line-height: 1.5;
}
.examine {
  display: inline-block;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--blue);
}
.examine .arrow { transition: transform 180ms ease-out; display: inline-block; }

/* primary "open it" + the quieter secondary "build log" share one row */
.actions {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.4rem 1.2rem;
  margin-top: 0.95rem;
}
/* the "open it" live shortcut — sits ABOVE the stretched card link (which goes to
   the log) so it is independently clickable; quieter than the primary card action. */
.open-live {
  position: relative;
  z-index: 1;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-underline-offset: 3px;
  padding: 0.35rem 0.1rem;
  margin: -0.35rem 0;
}
.open-live .arrow { display: inline-block; }
@media (hover: hover) {
  .open-live:hover { color: var(--blue); text-decoration-color: var(--blue); }
  .open-live:hover .arrow { transform: translate(2px, -2px); }
}

/* hover (pointer only) — never carries information, only deepens at-rest cues */
@media (hover: hover) {
  .specimen:hover .name a { text-decoration-color: var(--blue-deep); }
  .specimen:hover { transform: translateY(-1px); box-shadow: 0 2px 0 rgba(27,29,27,0.04), 0 8px 22px rgba(17,47,87,0.12); }
  .specimen:hover .examine { color: var(--blue-deep); }
  .specimen:hover .examine .arrow { transform: translateX(3px); }
}

/* keyboard focus on the primary card link (→ log, or → live when there's no log) rings the card */
.specimen:has(.name a:focus-visible) { outline: 2px solid var(--blue); outline-offset: 3px; }
/* the "open it" live shortcut gets its own, distinct focus ring */
.open-live:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 2px; }
/* fallback only where :has is unsupported */
@supports not (selector(:has(*))) {
  .name a:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; }
}

.empty {
  max-width: var(--measure);
  margin: clamp(1.6rem, 6vw, 2.6rem) auto 0;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

/* ---------- colophon ---------- */
.colophon {
  max-width: var(--measure);
  margin: clamp(2.4rem, 8vw, 4rem) auto 0;
  padding-top: clamp(1.2rem, 4vw, 1.8rem);
  border-top: 1px solid var(--rule);
  color: var(--ink-soft);
}
.count {
  margin: 0;
  font-family: var(--font-label);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--ink);
  letter-spacing: 0.005em;
}
.fineprint { margin: 0.35rem 0 0; font-size: 0.9rem; }
.disclosure { margin: 0.55rem 0 0; font-size: 0.82rem; color: var(--ink-soft); }
.disclosure a { color: var(--blue); }
.credit { margin: 0.5rem 0 0; font-size: 0.82rem; color: var(--ink-soft); }
.credit a { color: var(--blue); }
.credit .arrow { color: var(--ink-soft); }

/* ---------- the one motion: the newest specimen 'develops in' (once) ---------- */
@keyframes develop {
  from { opacity: 0; transform: translateY(5px); filter: saturate(0.25) brightness(1.05); }
  to   { opacity: 1; transform: none; filter: none; }
}
.specimen.is-newest { animation: develop 520ms ease-out both; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .specimen.is-newest { animation: none; opacity: 1; filter: none; transform: none; }
}

/* ============ the build log (a /slug page in the same daylight world) ============ */
.log-top { max-width: var(--measure); margin: 0 auto clamp(1.4rem, 5vw, 2.2rem); }
.back {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
}
.back .arrow { display: inline-block; transition: transform 180ms ease-out; }
@media (hover: hover) {
  .back:hover { color: var(--blue); }
  .back:hover .arrow { transform: translateX(-3px); }
}

.log-article { max-width: var(--measure); margin: 0 auto; }
.log-title {
  margin: 0.4rem 0 0;
  font-family: var(--font-label);
  font-weight: 700;
  font-size: clamp(2.5rem, 11vw, 4rem);
  line-height: 0.94;
  letter-spacing: -0.01em;
  color: var(--ink);
  word-break: break-word;
}
.log .lede {
  margin: clamp(1rem, 4vw, 1.4rem) 0 0;
  font-size: clamp(1.16rem, 4.4vw, 1.4rem);
  line-height: 1.46;
  color: var(--ink);
}

.cta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.8rem 1.1rem;
  margin: clamp(1.2rem, 4vw, 1.6rem) 0 0;
}
.live-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--blue);
  color: #fff;
  font-family: var(--font-label);
  font-weight: 600;
  font-size: 1.08rem;
  letter-spacing: 0.015em;
  text-decoration: none;
  padding: 0.72rem 1.25rem;
  border-radius: var(--r-chip);
  min-height: 2.9rem;
}
.live-cta .arrow { display: inline-block; transition: transform 180ms ease-out; }
@media (hover: hover) {
  .live-cta:hover { background: var(--blue-deep); }
  .live-cta:hover .arrow { transform: translate(2px, -2px); }
}
.live-cta:focus-visible { outline: 2px solid var(--blue-deep); outline-offset: 3px; }
.shipped { font-size: 0.86rem; color: var(--ink-soft); letter-spacing: 0.02em; }

.block { margin: clamp(2rem, 7vw, 3rem) 0 0; }
.block h2 {
  margin: 0 0 0.7rem;
  font-family: var(--font-label);
  font-weight: 700;
  font-size: clamp(1.4rem, 5.5vw, 1.85rem);
  line-height: 1.05;
  color: var(--ink);
}
.block p { margin: 0 0 0.85rem; }
.block p:last-child { margin-bottom: 0; }
.compare {
  border-left: 3px solid var(--blue);
  padding-left: 0.9rem;
  color: var(--ink);
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
  gap: 1px;
  margin: 1.1rem 0 0;
  background: var(--rule);
  border: 1px solid var(--rule);
}
.stat { background: var(--card); padding: 0.85rem 0.95rem; margin: 0; }
.stat dt {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
  order: 2;
}
.stat dd {
  margin: 0 0 0.25rem;
  font-family: var(--font-label);
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--blue);
  font-variant-numeric: tabular-nums;
}
.stat { display: flex; flex-direction: column; }

.snippet-caption { margin: 1.1rem 0 0.5rem; color: var(--ink-soft); font-size: 0.94rem; }
/* light, on-brand code sample (no console DNA) — reads like a mounted specimen label */
.snippet {
  margin: 0;
  background: #ECEDE8;
  color: var(--ink);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--blue);
  border-radius: var(--r-chip);
  padding: 0.95rem 1.05rem;
  overflow-x: auto;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.85rem;
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
}
.snippet code { white-space: pre; }

.learned { margin: 0; padding-left: 1.15rem; }
.learned li { margin: 0 0 0.6rem; }
.learned li::marker { color: var(--blue); }

.shot { margin: 1.2rem 0 0; }
.shot img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--rule);
  border-radius: var(--r-chip);
}
.shot figcaption {
  margin: 0.5rem 0 0;
  font-size: 0.88rem;
  color: var(--ink-soft);
  line-height: 1.45;
}

.log-foot {
  margin: clamp(2.4rem, 8vw, 3.5rem) 0 0;
  padding-top: clamp(1.2rem, 4vw, 1.8rem);
  border-top: 1px solid var(--rule);
}
.log-foot .fineprint { margin: 0.9rem 0 0; font-size: 0.9rem; color: var(--ink-soft); }
.log-foot .fineprint a { color: var(--blue); }
