:root {
  --bg: #05070d;
  --plate: #0a1226;
  --ink: #f4f8fc;
  --body: #d5e0ee;
  --quiet: #c5d2e4;
  --caption: #9aadc4;
  --accent: #4da3ff;
  --accent-deep: #2f7bff;
  --line: rgba(158, 180, 204, 0.24);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Noto Serif Display", "Noto Serif", Georgia, "Liberation Serif", "Times New Roman", Times, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Liberation Sans", "Helvetica Neue", Arial, sans-serif;
  --rail: 16.5rem;
  --gap: 2.75rem;
  --header: 4.5rem;
  color-scheme: dark;
}

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

html {
  scroll-padding-top: calc(var(--header) + 0.75rem);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  caret-color: var(--accent);
}

::selection {
  background: var(--accent);
  color: var(--bg);
}

::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: #243656;
  border: 3px solid var(--bg);
}

html {
  scrollbar-color: #243656 var(--bg);
}

:focus {
  outline: none;
}

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

a,
button {
  -webkit-tap-highlight-color: rgba(77, 163, 255, 0.28);
  touch-action: manipulation;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
}

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

.skip {
  position: absolute;
  left: 0.75rem;
  top: 0.75rem;
  z-index: 80;
  padding: 0.55rem 0.85rem;
  background: var(--accent);
  color: var(--bg);
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  clip-path: inset(50%);
  width: 1px;
  height: 1px;
  overflow: hidden;
  white-space: nowrap;
}

.skip:focus {
  position: fixed;
  clip-path: none;
  width: auto;
  height: auto;
  overflow: visible;
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.wrap {
  width: min(1120px, 100%);
  margin-inline: auto;
  padding-left: max(clamp(1.25rem, 3vw, 2rem), env(safe-area-inset-left));
  padding-right: max(clamp(1.25rem, 3vw, 2rem), env(safe-area-inset-right));
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header);
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--ink);
  text-decoration: none;
  min-height: 44px;
}

.brand:hover {
  color: var(--accent);
}

.mark {
  width: 1.75rem;
  height: 1.75rem;
  display: block;
  flex: none;
}

.brand-name {
  font-family: var(--serif);
  font-size: 1.125rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1;
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.1rem;
}

.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.35rem 0.62rem;
  color: var(--quiet);
  text-decoration: none;
  font-size: 0.9375rem;
  white-space: nowrap;
}

.nav a:hover,
.nav a[aria-current="true"] {
  color: var(--ink);
  box-shadow: inset 0 -1px 0 var(--accent);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(77, 163, 255, 0.5);
  color: var(--ink);
}

.nav-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.nav-toggle svg {
  width: 22px;
  height: 22px;
  display: block;
}

.nav-toggle .icon-close {
  display: none;
}

body.menu-open .nav-toggle .icon-open {
  display: none;
}

body.menu-open .nav-toggle .icon-close {
  display: block;
}

#content:focus {
  outline: none;
}

#content:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -6px;
}

.hero {
  padding-top: clamp(2.6rem, 6vh, 4.25rem);
}

.hero-grid,
.entry-grid {
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
  column-gap: var(--gap);
}

.hero-grid h1,
.hero-grid .lede,
.hero-grid .action {
  grid-column: 2;
}

.hero-grid h1 {
  grid-row: 1;
}

.hero-grid .lede {
  grid-row: 2;
}

.hero-grid .state {
  grid-column: 1;
  grid-row: 1;
  align-self: end;
  margin: 0 0 0.2rem;
}

.hero-grid .action {
  grid-row: 3;
  margin: 1.4rem 0 0;
}

.hero-grid figure {
  grid-column: 1 / -1;
  grid-row: 4;
  margin: 2.6rem 0 0;
}

h1,
h2,
.mail {
  font-family: var(--serif);
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.03em;
  text-wrap: balance;
}

h1 {
  margin: 0;
  font-size: clamp(2.7rem, 5.5vw, 5.15rem);
  line-height: 0.98;
}

h1::after {
  content: "";
  display: block;
  width: 3.25rem;
  height: 1px;
  margin-top: 1.15rem;
  background: var(--accent);
}

h1:focus-visible,
h2:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.lede {
  margin: 1.2rem 0 0;
  max-width: 38rem;
  font-size: 1.1875rem;
  line-height: 1.55;
  color: var(--body);
}

.state {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin: 0;
  max-width: 16rem;
  color: var(--quiet);
  font-size: 0.9375rem;
  line-height: 1.4;
}

.state-mark {
  width: 7px;
  height: 7px;
  margin-top: 0.4em;
  background: var(--accent);
  flex: none;
}

.query {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 44px;
  padding: 0.55rem 0.95rem;
  border: 1px solid var(--accent);
  color: var(--ink);
  text-decoration: none;
  font-size: 1rem;
  line-height: 1.3;
}

.query svg {
  width: 18px;
  height: 18px;
  display: block;
  flex: none;
}

.query:hover {
  background: rgba(77, 163, 255, 0.12);
  color: #ffffff;
}

.entry {
  margin-top: clamp(3.25rem, 6.5vw, 5.25rem);
}

.entry-grid {
  border-top: 1px solid var(--line);
  padding-top: 2rem;
}

.entry:last-child .entry-grid {
  padding-bottom: clamp(3rem, 7vw, 5rem);
}

.entry-grid h2 {
  grid-column: 2;
  grid-row: 1;
  margin: 0;
  font-size: clamp(1.85rem, 3vw, 2.55rem);
  line-height: 1.12;
}

.entry-grid .state {
  grid-column: 1;
  grid-row: 1;
  align-self: end;
  margin: 0 0 0.35rem;
}

.entry-grid .prose {
  grid-column: 2;
  grid-row: 2;
  margin-top: 1.2rem;
}

.entry-grid figure,
.entry-grid .mail-line {
  grid-column: 2;
  grid-row: 3;
}

.entry-grid figure {
  margin: 2rem 0 0;
}

.prose {
  max-width: 68ch;
}

.prose p {
  margin: 0;
}

.prose p + p {
  margin-top: 1rem;
}

.plate-frame {
  position: relative;
  height: clamp(168px, 22vw, 220px);
  padding: 16px;
  background-color: var(--plate);
  border: 1px solid rgba(77, 163, 255, 0.32);
  background-image:
    linear-gradient(var(--accent), var(--accent)),
    linear-gradient(var(--accent), var(--accent)),
    linear-gradient(var(--accent), var(--accent)),
    linear-gradient(var(--accent), var(--accent)),
    linear-gradient(var(--accent), var(--accent)),
    linear-gradient(var(--accent), var(--accent)),
    linear-gradient(var(--accent), var(--accent)),
    linear-gradient(var(--accent), var(--accent));
  background-repeat: no-repeat;
  background-size:
    12px 1px, 1px 12px,
    12px 1px, 1px 12px,
    12px 1px, 1px 12px,
    12px 1px, 1px 12px;
  background-position:
    8px 8px, 8px 8px,
    calc(100% - 20px) 8px, calc(100% - 9px) 8px,
    8px calc(100% - 9px), 8px calc(100% - 20px),
    calc(100% - 20px) calc(100% - 9px), calc(100% - 9px) calc(100% - 20px);
}

.plate-frame.is-tall {
  height: clamp(210px, 28vw, 280px);
}

.plate-frame.is-hero {
  height: clamp(220px, 34vh, 340px);
}

.plate-frame svg,
.plate-frame canvas {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
}

.field {
  position: absolute;
  inset: 16px;
}

.plate-frame.is-ready .field-fallback {
  visibility: hidden;
}

figcaption {
  margin-top: 0.75rem;
  max-width: 68ch;
  color: var(--caption);
  font-size: 0.9375rem;
  line-height: 1.45;
}

.hero-grid figcaption {
  margin-left: calc(var(--rail) + var(--gap));
  margin-right: 0;
}

.mail-line {
  margin: 1.7rem 0 0;
}

.mail {
  font-size: clamp(1.45rem, 3.5vw, 2.65rem);
  line-height: 1.2;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.14em;
  overflow-wrap: anywhere;
}

.mail:hover {
  color: var(--accent);
}

.site-footer {
  border-top: 1px solid var(--line);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem 1.5rem;
  padding-block: 1.6rem 2rem;
}

.legal {
  margin: 0;
  color: var(--caption);
  font-size: 0.9375rem;
  text-align: center;
}

.footer-mail {
  justify-self: end;
  color: var(--quiet);
  text-underline-offset: 0.18em;
}

.footer-mail:hover {
  color: var(--accent);
}

@media (max-width: 880px) {
  .hero-grid,
  .entry-grid {
    grid-template-columns: 1fr;
    row-gap: 0;
  }

  .hero-grid h1,
  .hero-grid .lede,
  .hero-grid .state,
  .hero-grid .action,
  .hero-grid figure,
  .entry-grid h2,
  .entry-grid .state,
  .entry-grid .prose,
  .entry-grid figure,
  .entry-grid .mail-line {
    grid-column: auto;
    grid-row: auto;
  }

  .hero-grid .state,
  .entry-grid .state {
    margin: 1.1rem 0 0;
    max-width: none;
  }

  .hero-grid figcaption {
    margin-left: 0;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .legal {
    text-align: left;
  }

  .footer-mail {
    justify-self: start;
  }
}

@media (max-width: 840px) {
  .js .nav-toggle {
    display: inline-flex;
  }

  .js .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.35rem max(1.25rem, env(safe-area-inset-left)) 0.85rem max(1.25rem, env(safe-area-inset-right));
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    max-height: calc(100vh - var(--header));
    max-height: calc(100dvh - var(--header));
    overflow: auto;
  }

  body.menu-open {
    overflow: hidden;
  }

  body.menu-open .nav {
    display: flex;
  }

  .js .nav a,
  .no-js .nav a {
    font-family: var(--serif);
    font-size: 1.35rem;
    letter-spacing: -0.02em;
    min-height: 52px;
    padding: 0.35rem 0;
    border-bottom: 1px solid var(--line);
    box-shadow: none;
  }

  .js .nav a[aria-current="true"],
  .js .nav a:hover {
    border-bottom-color: var(--accent);
    box-shadow: none;
  }

  .no-js .header-bar {
    flex-wrap: wrap;
    padding-bottom: 0.5rem;
  }

  .no-js .nav {
    flex: 1 0 100%;
    flex-direction: column;
    align-items: stretch;
  }
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }

  .js .hero-rise {
    animation: rise 0.95s cubic-bezier(0.16, 1, 0.3, 1) backwards;
  }

  .js .lede.hero-rise {
    animation-delay: 0.05s;
  }

  .js .state.hero-rise {
    animation-delay: 0.08s;
  }

  .js .action.hero-rise {
    animation-delay: 0.12s;
  }

  .js figure.hero-rise {
    animation-delay: 0.18s;
  }

  .js .reveal.is-in {
    animation: rise 0.9s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .state-mark {
    animation: pulse 3.8s ease-in-out infinite;
  }

  .query svg {
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .query:hover svg {
    transform: translateX(4px);
  }
}

@keyframes rise {
  from {
    opacity: 0.86;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.72;
  }
}

@media (prefers-contrast: more) {
  .plate-frame,
  .query,
  .nav-toggle {
    border-color: var(--accent);
  }

  .nav a,
  .state,
  figcaption,
  .legal {
    color: var(--ink);
  }
}

@media (forced-colors: active) {
  .state-mark {
    background: CanvasText;
  }

  .plate-frame {
    background: Canvas;
    border-color: CanvasText;
  }

  .query {
    border-color: LinkText;
  }
}

@media print {
  .site-header {
    position: static;
  }

  .nav-toggle {
    display: none !important;
  }

  .nav {
    display: flex !important;
    position: static;
    max-height: none;
  }

  body,
  .site-header,
  .site-footer,
  .plate-frame {
    background: #fff;
    color: #141820;
  }

  h1,
  h2,
  .brand,
  .mail,
  .lede,
  .prose,
  .nav a,
  .state,
  figcaption,
  .legal,
  .footer-mail,
  .query {
    color: #141820;
  }

  .field {
    display: none !important;
  }

  .field-fallback {
    visibility: visible !important;
  }
}
