/* ───────── Bearing · holdbearing.com ───────── */

:root {
  --ink: #121314;
  --cream: #fbf5e6;
  --hivis: #f4d80f;
  --reflect: #d3d8dc;
  --rescue: #d9412b;
  --brass: #3b2b1f;

  --sky-top: #2a73c9;
  --sky-mid: #4f9be0;
  --sky-low: #b9dcf5;
  --sky-haze: #e3f1fb;

  --serif: "Libre Caslon Text", Georgia, "Times New Roman", serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
}

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

html, body { height: 100%; }

body {
  min-height: 100svh;
  font-family: var(--serif);
  color: var(--ink);
  background: linear-gradient(180deg,
    var(--sky-top) 0%,
    var(--sky-mid) 35%,
    var(--sky-low) 62%,
    var(--sky-haze) 100%);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ───────── Scene ───────── */

.scene {
  position: fixed;
  inset: 0;
  z-index: 0;
}
.scene svg { display: block; width: 100%; height: 100%; }

/* Print-like grain, keeps the illustration from looking too digital */
.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: .22;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ───────── Content ───────── */

.content {
  position: relative;
  z-index: 2;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 6vh 16px 20vh;
  text-align: center;
}

/* Compass */
.compass-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
}
#compass {
  width: clamp(92px, 14vw, 128px);
  height: auto;
  overflow: visible;
  filter: drop-shadow(4px 4px 0 var(--ink));
}
.c-bail   { fill: none; stroke: var(--ink); stroke-width: 3.5; }
.c-case   { fill: var(--brass); stroke: var(--ink); stroke-width: 3; }
.c-bezel  { fill: none; stroke: #6b4f38; stroke-width: 3; }
.c-face   { fill: #f3ead6; stroke: var(--ink); stroke-width: 2; }
#ticks line { stroke: var(--ink); stroke-linecap: round; }
.c-letters text {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 11px;
  fill: var(--ink);
  text-anchor: middle;
  dominant-baseline: central;
}
.c-letters .c-n { fill: var(--rescue); font-size: 13px; }
.n-north { fill: var(--rescue); stroke: var(--ink); stroke-width: 1.5; stroke-linejoin: round; }
.n-south { fill: #fff;          stroke: var(--ink); stroke-width: 1.5; stroke-linejoin: round; }
.n-pin   { fill: var(--hivis);  stroke: var(--ink); stroke-width: 1.5; }

.readout {
  display: inline-flex;
  gap: 10px;
  margin-top: 12px;
  padding: 4px 9px;
  font-family: var(--mono);
  font-weight: 600;
  font-size: .72rem;
  letter-spacing: .12em;
  font-variant-numeric: tabular-nums;
  color: var(--hivis);
  background: var(--ink);
}
#status { color: #fff; opacity: .8; transition: color .2s; }
.is-locked #status { color: var(--hivis); opacity: 1; }

/* Eyebrow chip */
.eyebrow {
  font-family: var(--mono);
  font-weight: 600;
  font-size: .78rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--hivis);
  border: 2px solid var(--ink);
  padding: 5px 10px;
  box-shadow: 3px 3px 0 var(--ink);
}

/* Title: white with heavy ink outline, like the chapter cards */
.title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(4.2rem, 16vw, 10.5rem);
  line-height: .92;
  letter-spacing: -.01em;
  color: #fff;
  -webkit-text-stroke: .075em var(--ink);
  paint-order: stroke fill;
  text-shadow: .05em .06em 0 var(--ink);
}

/* Narration box */
.hook {
  max-width: 34ch;
  padding: 14px 18px;
  font-size: clamp(1.05rem, 2.3vw, 1.25rem);
  line-height: 1.5;
  background: var(--cream);
  border: 2.5px solid var(--ink);
  box-shadow: 5px 5px 0 var(--ink);
}
.hook strong { display: block; font-style: italic; }

/* Buttons */
.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 8px;
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 13px 20px;
  font-family: var(--mono);
  font-weight: 600;
  font-size: .95rem;
  letter-spacing: .02em;
  text-decoration: none;
  border: 2.5px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover        { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.btn:active       { transform: translate(2px, 2px);   box-shadow: 2px 2px 0 var(--ink); }
.btn:focus-visible { outline: 3px solid #fff; outline-offset: 4px; }

/* Hi-vis with a reflective strip, straight off North's jacket */
.btn-primary {
  color: var(--ink);
  background: var(--hivis);
  padding-bottom: 21px;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.btn-primary::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 5px;
  height: 6px;
  background: var(--reflect);
  border-top: 1.5px solid var(--ink);
  border-bottom: 1.5px solid var(--ink);
}
.btn-icon { width: 14px; height: 14px; fill: currentColor; }

.btn-ghost {
  color: #fff;
  background: var(--ink);
}

/* Footer */
.foot {
  position: fixed;
  right: 16px;
  bottom: 12px;
  z-index: 2;
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 1px 1px 0 var(--ink);
}

@media (max-width: 520px) {
  .content { gap: 16px; padding-bottom: 14vh; }
  .actions { flex-direction: column; align-items: stretch; width: 100%; max-width: 320px; }
  .btn { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
}
