/* base.css
   Reset, page chrome, type, header, sheets, footer.
   Section layouts that belong to the board live in board.css.
*/

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

html {
  scroll-behavior: smooth;
  /* Sticky header. Keeps in-page links from hiding the heading. */
  scroll-padding-top: 7.2rem;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}

img,
svg {
  max-width: 100%;
}

button,
input {
  font: inherit;
  color: inherit;
}

a {
  color: var(--patina-ink);
}

a:hover {
  color: var(--ink);
}

p,
li,
dd {
  text-wrap: pretty;
}

h1,
h2,
h3 {
  text-wrap: balance;
  font-family: var(--sans);
  font-weight: 640;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: max(0.75rem, env(safe-area-inset-left));
  top: -4rem;
  z-index: 80;
  background: var(--ink);
  color: #1a120c;
  padding: 0.7rem 1rem;
  text-decoration: none;
  font-family: var(--mono);
  font-size: 0.85rem;
}

.skip:focus {
  top: max(0.5rem, env(safe-area-inset-top));
}

:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--copper);
  outline-offset: 3px;
}

::selection {
  background: var(--copper);
  color: #1a120c;
}

.app {
  position: relative;
  z-index: 3;
}

.top {
  position: sticky;
  top: 0;
  z-index: 30;
  background: #080706;
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top);
}

.top__bar {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 3.1rem;
  padding: 0.35rem var(--pad);
  padding-left: max(var(--pad), env(safe-area-inset-left));
  padding-right: max(var(--pad), env(safe-area-inset-right));
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--mono);
  font-weight: 700;
  letter-spacing: 0.14em;
  font-size: 0.95rem;
  min-height: 44px;
}

.brand__mark {
  width: 22px;
  height: 22px;
  display: block;
}

.lamp {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  margin-left: auto;
  color: var(--warn-ink);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
}

.lamp__dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--warn);
  box-shadow: 0 0 8px var(--warn);
  flex: 0 0 auto;
}

.top__hq {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 0.8rem;
  border: 1px solid var(--warn);
  color: var(--ink);
  background: #2a1210;
  text-decoration: none;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.top__hq:hover {
  background: #3a1614;
  color: var(--ink);
}

.top__power {
  height: 2px;
  background: #1a120e;
}

.top__power span {
  display: block;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--copper-deep), var(--patina));
  transform: scaleX(0);
  transform-origin: 0 50%;
}

.nav {
  display: flex;
  gap: 0.15rem;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 0 var(--pad) 0.15rem;
  padding-left: max(var(--pad), env(safe-area-inset-left));
  padding-right: max(var(--pad), env(safe-area-inset-right));
}

.nav::-webkit-scrollbar {
  display: none;
}

.nav a {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.7rem;
  color: var(--ink-dim);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 2px solid transparent;
}

.nav a[aria-current="true"] {
  color: var(--ink);
  border-bottom-color: var(--patina);
}

.wrap {
  width: min(1120px, calc(100% - 1.4rem));
  margin-inline: auto;
  padding-bottom: max(2.5rem, env(safe-area-inset-bottom));
}

.hero__stage,
.sheet,
.disclaimer {
  position: relative;
  z-index: 1;
}

.sheet,
.disclaimer {
  margin-top: 1.1rem;
  padding: 1.15rem 1rem 1.25rem;
  background:
    linear-gradient(180deg, rgba(255, 236, 214, 0.035), transparent 28%),
    repeating-linear-gradient(90deg, transparent 0 3px, rgba(0, 0, 0, 0.18) 3px 4px),
    linear-gradient(165deg, var(--plate-2), var(--plate) 42%, #120f0c);
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 220, 190, 0.06), var(--shadow);
}

.sheet__kicker,
.kicker {
  margin: 0 0 0.35rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--copper);
}

.sheet h2,
.disclaimer h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.7rem, 4vw, 2.5rem);
}

.sheet__lead,
.sheet p,
.disclaimer p {
  margin: 0 0 0.85rem;
  max-width: 68ch;
  color: var(--ink);
}

.sheet__lead {
  color: var(--ink-dim);
}

.fine {
  color: var(--ink-dim);
  font-size: 0.95rem;
}

.site-footer {
  margin-top: 1.4rem;
  padding: 0.4rem var(--pad) 2rem;
  padding-left: max(var(--pad), env(safe-area-inset-left));
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
}

.site-footer p {
  margin: 0.2rem 0;
}

@media (min-width: 900px) {
  :root {
    --pad: 1.4rem;
    --top: 6.4rem;
  }

  .wrap {
    width: min(1120px, calc(100% - 3rem));
  }

  .sheet,
  .disclaimer {
    padding: 1.5rem 1.5rem 1.6rem;
  }
}

@media (max-width: 420px) {
  .lamp {
    letter-spacing: 0.08em;
    font-size: 0.62rem;
  }
}

/* Only the very narrow handsets drop the words. The dot stays, and the text remains available to assistive tech. */
@media (max-width: 330px) {
  .lamp__text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }
}

@media print {
  .atmo,
  .boot,
  .top__power,
  .nav,
  .cursor-glow,
  .scanlines {
    display: none !important;
  }

  body {
    background: #fff;
    color: #111;
  }

  .sheet,
  .disclaimer {
    box-shadow: none;
    break-inside: avoid;
  }

  a {
    color: #111;
  }
}
