/* =========================================================
   PHASE 1 · LOW-FIDELITY WIREFRAME
   Grayscale only. Structure, spacing, and behaviour, no visual design.
   Phase 3 will replace this file with the real UI layer.
   ========================================================= */

:root {
  --bg: #fafafa;
  --ink: #1a1a1a;
  --muted: #8a8a8a;
  --line: #c8c8c8;
  --fill: #ececec;
  --note: #2f6fed;           /* blue = wireframe annotations only */
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1200px;
  --nav-h: 72px;
  font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }
body { background: var(--bg); color: var(--ink); line-height: 1.5; }
a { color: inherit; }

.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 16px; top: 16px; background: #fff; padding: 8px 12px; z-index: 100; }

/* ---------- Wireframe primitives ---------- */
.wf-box, .wf-btn, .wf-pill {
  border: 1.5px solid var(--ink);
  padding: 6px 14px;
  text-decoration: none;
  font-size: 14px;
  display: inline-block;
}
.wf-btn { background: var(--ink); color: var(--bg); border-radius: 4px; }
.wf-pill { border-style: dashed; border-radius: 999px; color: var(--muted); border-color: var(--muted); }
.wf-img {
  background:
    linear-gradient(to top right, transparent calc(50% - 1px), var(--line) 50%, transparent calc(50% + 1px)),
    linear-gradient(to top left,  transparent calc(50% - 1px), var(--line) 50%, transparent calc(50% + 1px)),
    var(--fill);
  border: 1.5px solid var(--line);
  display: grid; place-items: center; text-align: center;
  color: var(--muted); font-size: 14px;
}
.wf-img--wide { min-height: 60vh; margin-top: 24px; }
.wf-label {
  font: 12px/1 ui-monospace, Menlo, monospace;
  color: var(--note); text-transform: uppercase; letter-spacing: .08em;
  margin-bottom: 16px;
}
body.hide-notes .wf-label { visibility: hidden; }

/* ---------- Nav (centered) ---------- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.nav {
  max-width: var(--max); margin: 0 auto; height: var(--nav-h);
  padding: 0 var(--gutter);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
}
.nav__logo { justify-self: start; }
.nav__links {
  list-style: none; padding: 0;
  display: flex; gap: 32px; align-items: center;
  grid-column: 2;
}
.nav__links a:not(.wf-btn) { text-decoration: none; color: var(--muted); padding: 4px 0; }
.nav__links a[aria-current="true"] { color: var(--ink); border-bottom: 2px solid var(--ink); }
.nav__cta { margin-left: 16px; }
.nav__toggle { display: none; }

/* ---------- First fold ---------- */
.hero {
  position: relative;
  max-width: var(--max); margin: 0 auto;
  min-height: calc(100svh - var(--nav-h));
  padding: 32px var(--gutter) 110px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.hero__label { align-self: flex-start; }

/* ---------- Passport spread ---------- */
.passport {
  width: 100%; max-width: 1040px;
  display: grid; grid-template-columns: 1fr 14px 1fr;
  border: 1.5px solid var(--ink); border-radius: 10px;
  background: #fff;
}
.pp-page { padding: clamp(20px, 3vw, 36px); position: relative; }
.pp-spine { background: repeating-linear-gradient(to bottom, var(--line) 0 6px, transparent 6px 12px); border-inline: 1px solid var(--line); }

.pp-head {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font: 11px ui-monospace, Menlo, monospace; text-transform: uppercase; letter-spacing: .08em; color: var(--muted);
  border-bottom: 1px solid var(--line); padding-bottom: 10px; margin-bottom: 18px;
}
.pp-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 20px; }
.pp-field--wide { grid-column: 1 / -1; }
.pp-field dt, .pp-k {
  font: 10px ui-monospace, Menlo, monospace; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 2px;
}
.pp-field dd { margin: 0; font-size: 16px; font-weight: 600; }
.pp-name { font-size: clamp(24px, 3vw, 34px); line-height: 1.1; letter-spacing: -.01em; }

.pp-block { margin-top: 20px; }
.pp-what { font-size: 15px; color: var(--ink); }
.pp-tools { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.wf-chip { border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; font-size: 12px; color: var(--muted); }
.pp-flow { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; font-size: 13px; }
.pp-flow li:not(:last-child)::after { content: "→"; margin-left: 4px; color: var(--muted); }

.pp-mrz {
  margin-top: 24px; padding-top: 12px; border-top: 1px dashed var(--line);
  font: 12px/1.6 ui-monospace, Menlo, monospace; letter-spacing: .12em; color: var(--muted);
  overflow: hidden; white-space: nowrap; text-overflow: clip;
}

.pp-right { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; }
.pp-photo { width: 100%; max-width: 340px; }
.pp-photo .wf-img { aspect-ratio: 4 / 5; width: 100%; }
.pp-sign { font: italic 20px ui-serif, Georgia, serif; color: var(--muted); border-bottom: 1px solid var(--line); padding: 0 24px 4px; }
.pp-stamp {
  position: absolute; right: 8%; bottom: 10%;
  border: 2px dashed var(--muted); border-radius: 50%; width: 104px; height: 104px;
  display: grid; place-items: center; text-align: center;
  font: 11px/1.3 ui-monospace, Menlo, monospace; text-transform: uppercase; color: var(--muted);
  transform: rotate(-12deg); background: rgba(255,255,255,.7);
}

.hero__scroll {
  position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  text-decoration: none; font-size: 13px; color: var(--muted);
}
.hero__arrow { font-size: 22px; color: var(--ink); animation: bob 1.8s ease-in-out infinite; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(8px); } }

/* ---------- Stubs ---------- */
.stub {
  max-width: var(--max); margin: 0 auto;
  padding: 96px var(--gutter);
  border-top: 1px dashed var(--line);
}
.stub h2 { font-size: 28px; color: var(--muted); font-weight: 500; }

/* ---------- Notes toggle (wireframe-only tool) ---------- */
.notes-toggle {
  position: fixed; right: 16px; bottom: 16px; z-index: 20;
  font: 12px ui-monospace, Menlo, monospace;
  background: var(--note); color: #fff; border: 0; padding: 8px 12px; border-radius: 4px; cursor: pointer;
}

/* ---------- Mobile ---------- */
@media (max-width: 760px) {
  .nav { grid-template-columns: 1fr auto; }
  .nav__toggle {
    display: block; justify-self: end;
    border: 1.5px solid var(--ink); background: none; padding: 6px 12px; font: inherit; font-size: 14px;
  }
  .nav__links {
    display: none; grid-column: 1 / -1;
    position: absolute; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; gap: 0; align-items: stretch;
    background: var(--bg); border-bottom: 1px solid var(--line);
  }
  .nav__links.is-open { display: flex; }
  .nav__links li { border-top: 1px solid var(--line); }
  .nav__links a { display: block; padding: 16px var(--gutter) !important; }
  .nav__links a[aria-current="true"] { border-bottom: 0; font-weight: 600; }
  .nav__cta { margin: 0; }
  .nav__cta .wf-btn { border-radius: 0; }

  .hero { justify-content: flex-start; padding-top: 20px; }
  /* Passport stacks: photo page first, then data page */
  .passport { grid-template-columns: 1fr; }
  .pp-spine { height: 12px; background: repeating-linear-gradient(to right, var(--line) 0 6px, transparent 6px 12px); border-inline: 0; border-block: 1px solid var(--line); }
  .pp-right { order: -1; flex-direction: row; justify-content: flex-start; flex-wrap: wrap; }
  .pp-spine { order: -1; }
  .pp-right { order: -2; }
  .pp-photo { max-width: 140px; }
  .pp-sign { font-size: 16px; }
  .pp-stamp { width: 84px; height: 84px; font-size: 10px; right: 16px; bottom: 16px; }
  .pp-mrz { font-size: 10px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__arrow { animation: none; }
}
