/* LocksleyPassport ($LOCKSLEYPSP)
   tokens locked off BRIEF.md + 03_SITES.md lane:
   navy booklet #1B2A4A, cream page #F0E6D2, stamp red #C0392B
   type: Source Serif 4 (document data) + JetBrains Mono (barcode/CA/counter)
   spacing scale: 4 / 8 / 12 / 16 / 24 / 32 / 48px, radius 3px, motion: one stamp-thud */

@font-face {
  font-family: 'Source Serif';
  src: url('assets/fonts/source-serif-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Source Serif';
  src: url('assets/fonts/source-serif-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Source Serif';
  src: url('assets/fonts/source-serif-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('assets/fonts/jetbrains-mono-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('assets/fonts/jetbrains-mono-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --navy: #1b2a4a;
  --navy-deep: #101b30;
  --cream: #f0e6d2;
  --cream-dim: #ddcfaf;
  --ink: #241c12;
  --stamp-red: #c0392b;
  --stamp-red-dark: #8f2a20;
  --rule: rgba(36, 28, 18, 0.28);
  --font-serif: 'Source Serif', Georgia, 'Times New Roman', serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
}

body {
  background: radial-gradient(140% 100% at 50% 0%, var(--navy) 0%, var(--navy-deep) 72%, #0a1120 100%);
  color: var(--cream);
  font-family: var(--font-serif);
  overflow: hidden;
}

.stage {
  min-height: 100dvh;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: clamp(10px, 2vh, 20px);
  padding: clamp(12px, 2.4vh, 22px) clamp(16px, 4vw, 40px);
}

.chrome-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: clamp(10px, 1.4vw, 12px);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cream-dim);
  opacity: 0.85;
}

.chrome-chain { color: var(--stamp-red); }
.chrome-sep { opacity: 0.5; }

.booth {
  width: 100%;
  max-width: 760px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(10px, 1.8vh, 18px);
  flex: 1;
  justify-content: center;
  min-height: 0;
}

/* ---- the passport data page, built from the approved banner art ---- */

.doc-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 1;
  border-radius: 6px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(240, 230, 210, 0.14),
    0 18px 40px -20px rgba(0, 0, 0, 0.65);
  flex-shrink: 1;
  min-height: 0;
}

.doc-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.doc-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 2px clamp(10px, 2vw, 22px);
  padding: clamp(6px, 1.4%, 12px) clamp(10px, 2.4%, 18px);
  background: linear-gradient(0deg, rgba(16, 12, 6, 0.72) 0%, rgba(16, 12, 6, 0.5) 55%, rgba(16, 12, 6, 0) 100%);
}

.field {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.field-label {
  font-family: var(--font-mono);
  font-size: clamp(6.5px, 0.95vw, 9.5px);
  letter-spacing: 0.12em;
  color: var(--cream-dim);
  opacity: 0.85;
}

.field-value {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(10px, 1.6vw, 15px);
  color: var(--cream);
  letter-spacing: 0.02em;
}

.field-ca { margin-left: auto; }

.ca {
  appearance: none;
  border: 1px solid rgba(240, 230, 210, 0.45);
  background: rgba(240, 230, 210, 0.08);
  color: var(--cream);
  font-family: var(--font-mono);
  font-size: clamp(9px, 1.35vw, 13px);
  letter-spacing: 0.01em;
  padding: 3px 8px;
  border-radius: 3px;
  cursor: pointer;
  white-space: nowrap;
}
.stamp-btn, .link { cursor: pointer; }

.ca:hover { background: rgba(240, 230, 210, 0.16); }
.ca.copied { border-color: var(--stamp-red); color: #ffd9d3; }

/* ---- stamp hotspot + animated stamp mark ---- */

.stamp-zone {
  position: absolute;
  left: 50.5%;
  top: 46%;
  width: 22%;
  height: 44%;
  transform: translate(-50%, -50%);
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.stamp {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 46%;
  aspect-ratio: 1;
  min-width: 44px;
  min-height: 44px;
  border-radius: 50%;
  border: 4px solid var(--stamp-red);
  box-shadow: inset 0 0 0 2px rgba(240, 230, 210, 0.0);
  opacity: 0;
  transform: translate(-50%, -260%) scale(1.7) rotate(-16deg);
  pointer-events: none;
  mix-blend-mode: multiply;
}

.stamp::before,
.stamp::after {
  content: "";
  position: absolute;
  border: 1.5px solid var(--stamp-red);
  border-radius: 50%;
}
.stamp::before { inset: 18%; }
.stamp::after { inset: 38%; background: var(--stamp-red); }

.stamp.hit {
  animation: thud 0.5s cubic-bezier(0.34, 1.68, 0.62, 1) both;
}

@keyframes thud {
  0%   { opacity: 0;    transform: translate(-50%, -260%) scale(1.75) rotate(-16deg); }
  50%  { opacity: 0.96; transform: translate(-50%, -46%)  scale(1.08) rotate(-9deg); }
  70%  { opacity: 0.92; transform: translate(-50%, -52%)  scale(0.95) rotate(-10.5deg); }
  100% { opacity: 0.94; transform: translate(-50%, -50%)  scale(1)    rotate(-10deg); }
}

.doc-frame.shake { animation: shake 0.32s ease; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-3px); }
  55% { transform: translateX(3px); }
  80% { transform: translateX(-1.5px); }
}

/* ---- headline + controls ---- */

.headline {
  margin: 0;
  text-align: center;
  font-size: clamp(17px, 2.6vw, 27px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.005em;
  max-width: 32ch;
}

.sub {
  margin: 0;
  text-align: center;
  font-size: clamp(12px, 1.5vw, 15px);
  color: var(--cream-dim);
  max-width: 42ch;
  line-height: 1.4;
}

.controls {
  display: flex;
  align-items: center;
  gap: clamp(14px, 3vw, 28px);
  flex-wrap: wrap;
  justify-content: center;
}

.stamp-btn {
  appearance: none;
  border: 3px solid var(--stamp-red);
  background: transparent;
  color: var(--stamp-red);
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(14px, 1.9vw, 18px);
  letter-spacing: 0.16em;
  padding: clamp(8px, 1.4vh, 12px) clamp(20px, 3vw, 30px);
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease;
}

.stamp-btn:hover { background: rgba(192, 57, 43, 0.12); }
.stamp-btn:active { transform: scale(0.96); }

.counter {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.15;
}

.counter-label {
  font-family: var(--font-mono);
  font-size: clamp(8.5px, 1.1vw, 10.5px);
  letter-spacing: 0.12em;
  color: var(--cream-dim);
}

.counter-value {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(18px, 2.6vw, 26px);
  color: var(--cream);
  font-variant-numeric: tabular-nums;
}

.chrome-links {
  display: flex;
  gap: clamp(14px, 2.4vw, 22px);
  font-family: var(--font-mono);
  font-size: clamp(10px, 1.3vw, 12px);
}

.link {
  color: var(--cream);
  opacity: 0.75;
  text-decoration: none;
  letter-spacing: 0.04em;
}
.link:hover { opacity: 1; }
.link-x { text-transform: lowercase; }

@media (max-width: 520px) {
  .field-value { font-size: 9.5px; }
  .field-label { font-size: 6px; }
  .doc-overlay { gap: 1px 10px; }
  .field-ca { margin-left: 0; width: 100%; }
  .ca { font-size: 8.5px; padding: 2px 6px; }
  .headline { max-width: 26ch; }
}

@media (prefers-reduced-motion: reduce) {
  .stamp.hit { animation: none; opacity: 0.94; transform: translate(-50%, -50%) scale(1) rotate(-10deg); }
  .doc-frame.shake { animation: none; }
  .stamp-btn { transition: none; }
}
