/* ========================================================================
   pincode.fyi — coming soon
   Anti-slop rewrite: dense, flat, information-forward.
   No gradients, no glass, no decorative blobs, no hero padding theatre.
   ======================================================================== */

:root {
  --ink: #1a1a1a;
  --secondary: #4a4a4f;
  --dim: #6d6d72;
  --rule: #d4d4d8;
  --surface: #fafafa;
  --bg: #ffffff;
  --accent: #0057b8;          /* one accent, used sparingly */
  --accent-faint: #0057b80c;
  --max: 720px;               /* narrow measure — information density, not billboard */
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, sans-serif;
}

/* ---- Reset ----------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }

/* ---- Page shell ------------------------------------------------------ */
.page {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- Header ---------------------------------------------------------- */
.hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  border-bottom: 1px solid var(--rule);
}
.mark {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.mark span { color: var(--accent); }
.hdr nav { display: flex; gap: 24px; }
.hdr nav a {
  font-size: 13px;
  color: var(--secondary);
  letter-spacing: -0.01em;
}
.hdr nav a:hover { color: var(--ink); }

/* ---- Lede ------------------------------------------------------------ */
.lede {
  padding: 48px 0 40px;
  border-bottom: 1px solid var(--rule);
}
.lede h1 {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.035em;
  max-width: 520px;
}
.lede p {
  margin-top: 16px;
  color: var(--secondary);
  font-size: 15px;
  line-height: 1.6;
  max-width: 580px;
}

/* ---- Diagram --------------------------------------------------------- */
.diagram {
  position: relative;
  margin: 40px auto 40px;
  padding: 0;
  width: 100%;
  max-width: 600px;
  aspect-ratio: 5 / 3;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--surface);
}

/* Center label */
.diagram-center {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  z-index: 3;
}
.diagram-label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--dim);
  text-transform: uppercase;
}
.diagram-pin {
  display: block;
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-top: 2px;
}
.diagram-place {
  display: block;
  font-size: 11px;
  color: var(--dim);
  margin-top: 2px;
  letter-spacing: 0.02em;
}

/* Ring — single, thin, functional */
.diagram-ring {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 52%;
  aspect-ratio: 1;
  border: 1px solid var(--rule);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
}

/* Lines connecting center to nodes */
.diagram-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}
.diagram-lines line {
  stroke: var(--rule);
  stroke-width: 1;
  stroke-dasharray: 4 4;
}

/* Nodes — flat chips, no glass, no blur */
.diagram-nodes {
  position: absolute;
  inset: 0;
  z-index: 2;
}
.dnode {
  position: absolute;
  font-size: 12px;
  line-height: 1.35;
  color: var(--secondary);
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 8px 12px;
  max-width: 180px;
}
.dnode b {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 2px;
}

/* Node positions — corners of the figure */
.dnode-tl { top: 4%;  left: 2%; }
.dnode-tr { top: 4%;  right: 2%; }
.dnode-bl { bottom: 4%; left: 2%; }
.dnode-br { bottom: 4%; right: 2%; }

/* ---- What section ---------------------------------------------------- */
.what {
  padding: 40px 0;
  border-bottom: 1px solid var(--rule);
}
.what h2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 16px;
}
.what-body p {
  color: var(--secondary);
  font-size: 15px;
  line-height: 1.65;
}
.what-body p + p {
  margin-top: 12px;
}

/* ---- How / Layers ---------------------------------------------------- */
.how {
  padding: 40px 0;
  border-bottom: 1px solid var(--rule);
}
.how h2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 20px;
}
.layers {
  display: grid;
  gap: 0;
}
.layer {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--rule);
  align-items: baseline;
}
.layer:last-child {
  padding-bottom: 0;
}
.layer dt {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.layer dd {
  font-size: 14px;
  color: var(--secondary);
  line-height: 1.55;
}

/* ---- Footer ---------------------------------------------------------- */
.ftr {
  padding: 28px 0 32px;
  font-size: 12px;
  color: var(--dim);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  align-items: baseline;
}
.mark-sm {
  font-weight: 700;
  font-size: 12px;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.mark-sm span { color: var(--accent); }
.sep { color: var(--rule); }
.yr { margin-left: auto; }

/* ---- Responsive: ≤600px --------------------------------------------- */
@media (max-width: 600px) {
  :root { --max: 100%; }
  .page { padding: 0 16px; }
  .lede { padding: 36px 0 32px; }
  .lede h1 { font-size: 26px; }
  .lede p { font-size: 14px; }
  .diagram { aspect-ratio: 4 / 3; }
  .dnode { font-size: 11px; padding: 6px 8px; max-width: 150px; }
  .diagram-pin { font-size: 28px; }
  .layer { grid-template-columns: 1fr; gap: 4px; }
  .layer dt { font-size: 14px; }
  .ftr { flex-direction: column; gap: 4px; }
  .yr { margin-left: 0; }
}

/* ---- Very small: ≤400px --------------------------------------------- */
@media (max-width: 400px) {
  .diagram {
    aspect-ratio: 3 / 4;
  }
  .dnode-tl, .dnode-tr { position: static; }
  .dnode-bl, .dnode-br { position: static; }
  .diagram-nodes {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    padding: 8px;
  }
  .diagram-center {
    position: relative;
    transform: none;
    left: auto;
    top: auto;
    padding: 24px 0 8px;
    grid-column: 1 / -1;
  }
  .diagram-ring, .diagram-lines { display: none; }
  .diagram {
    aspect-ratio: unset;
    display: flex;
    flex-direction: column;
  }
  .dnode { max-width: none; }
}

/* ---- No pointless motion --------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
