/* ============================================================
   Beep — "The Faceplate Collection" landing
   Editorial / collector's-catalog: cream-green paper, Space Mono headers
   + labels, framed plates, № numbering, refined motion.
   A deliberately distinct, retro-but-modern look — not a device skin.
   ============================================================ */

:root {
  --paper:     #ece8db;   /* cream page */
  --paper-2:   #f5f1e6;   /* lighter mat/card */
  --ink:       #1d2a22;   /* deep forest ink (headings) */
  --ink-2:     #3c4842;   /* body */
  --muted:     #6e776a;   /* labels / meta */
  --hair:      #d6cfba;   /* hairlines, frames */
  --accent:    #2f6e50;   /* forest-green accent (fills, hovers) */
  --accent-tx: #245a40;   /* accent for text (AA on paper) */
  --screen:    #0f140f;   /* dark well behind a skin */
  --shadow:    rgba(20,30,24,.14);

  --display: 'Space Mono', ui-monospace, 'Courier New', monospace;  /* mono headers */
  --mono:    'Space Mono', ui-monospace, 'Courier New', monospace;
  --sans:    system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh;
  background: var(--paper); color: var(--ink-2);
  font-family: var(--sans); font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}

/* faint halftone/paper texture (print feel, click-through) */
.grain {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image: radial-gradient(circle, rgba(29,42,34,.05) 1px, transparent 1.4px);
  background-size: 22px 22px; opacity: .6;
}
body > * { position: relative; z-index: 1; }
::selection { background: var(--accent); color: var(--paper-2); }

/* ---------- masthead ---------- */
.masthead { max-width: 760px; margin: 0 auto; padding: clamp(54px, 9vw, 104px) 24px 18px; text-align: center; }
.eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--accent-tx); margin: 0 0 22px; }
.masthead__title {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(40px, 8vw, 80px); line-height: 1.0; letter-spacing: -.03em;
  color: var(--ink); margin: 0;
}
.masthead__title em { font-style: italic; font-weight: 700; color: var(--accent-tx); }
.masthead__lede { max-width: 54ch; margin: 26px auto 0; font-size: 18px; line-height: 1.62; color: var(--ink-2); }
.masthead__index {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  font-family: var(--mono); font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted);
  margin: 34px auto 0; max-width: 520px;
}
.masthead__index .rule { flex: 1; height: 1px; background: var(--hair); }

/* ---------- the plates grid ---------- */
.plates {
  list-style: none; margin: 40px auto 8px; padding: 0 28px; max-width: 1180px;
  display: grid; gap: 46px 34px; grid-template-columns: repeat(auto-fill, minmax(264px, 1fr));
  counter-reset: plate;
}
.plate {
  counter-increment: plate;
  display: flex; flex-direction: column;
  padding-top: 16px; border-top: 1px solid var(--hair);
  opacity: 0; transform: translateY(18px);
  transition: opacity .55s ease, transform .55s cubic-bezier(.2,.7,.2,1);
}
.plate.is-in { opacity: 1; transform: none; }

.plate__num { font-family: var(--mono); font-size: 12px; letter-spacing: .14em; color: var(--accent-tx); margin-bottom: 12px; }

/* the framed thumbnail is a button → quick preview */
.plate__frame {
  display: block; width: 100%; margin: 0 0 16px; padding: 12px;
  background: var(--paper-2); border: 1px solid var(--hair); border-radius: 4px;
  box-shadow: 0 8px 22px var(--shadow); cursor: pointer; font: inherit; color: inherit; text-align: left;
  -webkit-appearance: none; appearance: none;
  transition: box-shadow .22s ease, border-color .22s ease, transform .22s cubic-bezier(.2,.7,.2,1);
}
.plate__frame:hover { box-shadow: 0 16px 34px var(--shadow); border-color: color-mix(in srgb, var(--accent) 40%, var(--hair)); transform: translateY(-4px); }
.plate__frame:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.plate__shotwrap { aspect-ratio: 4 / 5; overflow: hidden; border: 1px solid var(--hair); border-radius: 2px; background: var(--screen); }
.plate__shot { width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; transition: transform .35s cubic-bezier(.2,.7,.2,1); }
.plate__frame:hover .plate__shot { transform: scale(1.04); }

.plate__name { font-family: var(--display); font-weight: 700; font-size: 20px; line-height: 1.15; letter-spacing: -.02em; color: var(--ink); margin-bottom: 8px; }
.plate__meta { display: flex; align-items: center; gap: 9px; margin-bottom: 9px; }
.plate__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); border: 1px solid rgba(0,0,0,.12); flex: 0 0 auto; }
.plate__era { font-family: var(--mono); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.plate__blurb { font-size: 14.5px; line-height: 1.55; color: var(--ink-2); margin: 0 0 16px; max-width: 42ch; }

/* two explicit actions per plate */
.plate__actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: auto; }
.btn {
  flex: 1 1 auto; min-width: max-content; justify-content: center;
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px;
  font-family: var(--mono); font-size: 12px; letter-spacing: .05em; text-transform: uppercase;
  border-radius: 8px; border: 1px solid var(--hair); cursor: pointer; text-decoration: none;
  transition: background .15s, border-color .15s, color .15s, filter .15s, transform .05s;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn--preview { background: var(--accent); border-color: var(--accent); color: var(--paper-2); }
.btn--preview:hover { filter: brightness(1.08); }
.btn--full { background: var(--paper-2); color: var(--accent-tx); }
.btn--full:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--paper-2)); }

/* ---------- colophon ---------- */
.colophon { max-width: 1180px; margin: 40px auto 0; padding: 26px 28px 56px; border-top: 1px solid var(--hair); text-align: center; }
.colophon__line { margin: 0; color: var(--ink-2); font-size: 14px; }
.colophon__set { margin: 6px 0 0; font-family: var(--mono); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

/* ---------- preview modal ----------
   mobile-first: a full-screen sheet with the bar pinned at top (always reachable).
   desktop: a centered, wider window. */
.modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(20,30,24,.55); backdrop-filter: blur(3px); }
.modal__panel {
  position: relative; z-index: 1;
  width: 100%; height: 100dvh;
  display: flex; flex-direction: column;
  background: var(--paper-2); border: 0; border-radius: 0; overflow: hidden;
  animation: rise .2s ease;
}
@supports not (height: 100dvh) { .modal__panel { height: 100vh; } }
@keyframes rise { from { transform: translateY(10px); opacity: 0; } }

.modal__bar { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--hair); background: var(--paper); }
.modal__id { display: flex; align-items: center; gap: 10px; min-width: 0; }
.modal__num { font-family: var(--mono); font-size: 12px; letter-spacing: .12em; color: var(--accent-tx); flex: 0 0 auto; }
.modal__swatch { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); border: 1px solid rgba(0,0,0,.12); flex: 0 0 auto; }
.modal__title { font-family: var(--display); font-weight: 700; font-size: 18px; letter-spacing: -.01em; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.modal__actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.modal__open { font-family: var(--mono); font-size: 12px; letter-spacing: .04em; text-decoration: none; color: var(--paper-2); background: var(--accent); padding: 9px 12px; border-radius: 6px; min-height: 40px; display: inline-flex; align-items: center; }
.modal__open:hover { filter: brightness(1.07); }
.modal__close { width: 40px; height: 40px; border-radius: 6px; cursor: pointer; background: none; border: 1px solid var(--hair); color: var(--muted); font-size: 15px; flex: 0 0 auto; }
.modal__close:hover { border-color: var(--accent); color: var(--accent-tx); }
.modal__screen { flex: 1; min-height: 0; background: var(--screen); }
.modal__frame { width: 100%; height: 100%; border: 0; display: block; background: var(--screen); }

@media (min-width: 640px) {
  .modal { padding: 24px; }
  .modal__panel {
    width: min(540px, 94vw); height: min(900px, 90dvh);
    border: 1px solid var(--hair); border-radius: 10px;
    box-shadow: 0 30px 80px rgba(20,30,24,.4);
  }
}

/* ---------- responsive ---------- */
@media (max-width: 560px) {
  .plates { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 30px 18px; padding: 0 18px; }
  .plate__name { font-size: 18px; }
  .plate__blurb { font-size: 13.5px; }
  .masthead { padding-top: 44px; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .plate { opacity: 1; transform: none; }
}
