/* Mobile-first hero: full-bleed city stage + centered copy plate. */

:root {
  --bg: #05080c;
  --ink: #f2f0ea;
  --ink-soft: #d4d0c6;
  --muted: #9a958c;
  --rule: rgba(255, 255, 255, 0.12);
  --panel: rgba(12, 16, 22, 0.78);
  --panel-border: rgba(100, 220, 200, 0.18);
  --link: #e8e4dc;
  --measure: 22rem;
  --page-pad: 1.25rem;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

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

html {
  -webkit-text-size-adjust: 100%;
  height: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font-family:
    "Iowan Old Style",
    "Palatino Linotype",
    Palatino,
    "Book Antiqua",
    Georgia,
    "Times New Roman",
    serif;
  font-size: 1.05rem;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  /* Hero shell: center the plate over the bleed */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: calc(var(--page-pad) + var(--safe-top)) var(--page-pad)
    calc(var(--page-pad) + var(--safe-bottom));
  overflow-x: hidden;
}

/* Full-viewport bleed — circuit city hero */
#stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(ellipse 90% 70% at 50% 45%, #0a1520 0%, #05080c 72%);
}

#stage canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

/* Centered readable plate — never clipped by half-offset tricks */
.panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--measure);
  margin: 0;
  padding: 1.5rem 1.35rem 1.65rem;
  text-align: center;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.35),
    0 20px 48px rgba(0, 0, 0, 0.45),
    0 0 64px rgba(40, 180, 160, 0.06);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  /* If content is taller than viewport, scroll inside the plate */
  max-height: min(100dvh - 2 * var(--page-pad) - var(--safe-top) - var(--safe-bottom), 40rem);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .panel {
    background: rgba(10, 14, 20, 0.94);
  }
}

.brand {
  margin: 0 0 1.35rem;
  font-family:
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    "Helvetica Neue",
    Arial,
    sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.entry {
  margin: 0 0 1.35rem;
  padding: 0 0 1.35rem;
  border-bottom: 1px solid var(--rule);
}

.term {
  margin: 0 0 0.75rem;
  font-family: inherit;
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.pos {
  margin-left: 0.15em;
  font-size: 0.85em;
  font-weight: 400;
  font-style: italic;
  color: var(--muted);
}

.sense {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.98rem;
  line-height: 1.7;
}

.about {
  margin: 0 0 1.5rem;
}

.about p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.98rem;
  line-height: 1.7;
}

footer {
  margin: 0;
}

footer p {
  margin: 0;
  font-family:
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    "Helvetica Neue",
    Arial,
    sans-serif;
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--muted);
}

a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: #fff;
}

a:focus-visible {
  outline: 2px solid rgba(100, 220, 200, 0.7);
  outline-offset: 3px;
}

/* Tablet+ : slightly larger type and plate */
@media (min-width: 480px) {
  :root {
    --measure: 28rem;
    --page-pad: 1.5rem;
  }

  body {
    font-size: 1.1rem;
  }

  .panel {
    padding: 1.85rem 1.75rem 2rem;
  }

  .brand {
    font-size: 0.7rem;
    margin-bottom: 1.5rem;
  }

  .entry {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
  }

  .term {
    font-size: 1.3rem;
  }

  .sense,
  .about p {
    font-size: 1.02rem;
  }

  .about {
    margin-bottom: 1.75rem;
  }

  footer p {
    font-size: 0.8125rem;
  }
}

@media (min-width: 768px) {
  :root {
    --measure: 32rem;
    --page-pad: 2rem;
  }

  body {
    font-size: 1.125rem;
  }

  .panel {
    padding: 2.1rem 2rem 2.25rem;
    border-radius: 6px;
  }
}
