/*
 * Shared by the home page and the resources: one set of tokens, one header, one footer, one set of buttons
 * and device frames, so the two cannot drift into looking like different sites.
 */
/*
       * The night court, as the brand has it: one palette, tokens, nothing a literal twice. A home page
       * is read once on a phone by somebody who has heard the name, so it says one thing, shows the
       * real screens, and points at the people it is for (docs/CONTENT-PLAN.md).
       */
:root {
  --court: #0f312c;
  --court-deep: #0a2420;
  --panel: #123e37;
  --chalk: #f4f7f6;
  --chalk-dim: rgb(244 247 246 / 0.74);
  --chalk-faint: rgb(244 247 246 / 0.5);
  --amber: #fbbf24;
  --line: rgb(244 247 246 / 0.14);
  --gutter: max(18px, env(safe-area-inset-left, 0px));
  color-scheme: dark;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--court);
  background-image: radial-gradient(
    ellipse 120% 50% at 50% 0%,
    #12453c 0%,
    var(--court) 55%,
    var(--court-deep) 100%
  );
  color: var(--chalk);
  font-family:
    'Public Sans',
    ui-sans-serif,
    system-ui,
    -apple-system,
    sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a {
  color: var(--amber);
  text-underline-offset: 3px;
}
:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 3px;
  border-radius: 4px;
}
img {
  display: block;
  max-width: 100%;
  height: auto;
}
.wrap {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--amber);
  color: #0f172a;
  padding: 8px 12px;
  border-radius: 8px;
  z-index: 30;
}
.skip:focus {
  left: 8px;
}

/* ---- header ---- */
.top {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgb(10 36 32 / 0.86);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.top .wrap {
  display: flex;
  align-items: center;
  gap: 10px 22px;
  min-height: 62px;
  padding-top: env(safe-area-inset-top, 0px);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--chalk);
  text-decoration: none;
  font-family: 'Archivo', sans-serif;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.02em;
}
.brand b {
  color: var(--amber);
  font-weight: 800;
}
.top nav {
  margin-left: auto;
  display: flex;
  gap: 4px 20px;
  align-items: center;
}
.top nav a {
  color: var(--chalk-dim);
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  padding: 12px 2px;
}
.top nav a:hover {
  color: var(--chalk);
}
.top nav .go {
  color: #0f172a;
  background: var(--amber);
  border-radius: 999px;
  padding: 9px 16px;
  font-weight: 600;
}
.top nav .go:hover {
  background: #fde68a;
  color: #0f172a;
}
@media (max-width: 640px) {
  .top nav a:not(.go) {
    display: none;
  }
}

/* ---- the mark ---- */
.mk-group {
  transform-origin: 50px 50px;
  animation: turn 1600ms cubic-bezier(0.65, 0, 0.2, 1) both;
}
.mk-center {
  animation: kitchen 1600ms cubic-bezier(0.65, 0, 0.2, 1) both;
}
@keyframes turn {
  0%,
  10% {
    transform: rotate(-45deg);
  }
  100% {
    transform: rotate(0deg);
  }
}
@keyframes kitchen {
  0%,
  55% {
    stroke-dasharray: 92 0 0;
  }
  100% {
    stroke-dasharray: 31.4 29.2 31.4;
  }
}
@media (prefers-reduced-motion: reduce) {
  .mk-group,
  .mk-center {
    animation: none;
  }
  html {
    scroll-behavior: auto;
  }
}

/* ---- type ---- */
h1,
h2,
h3 {
  font-family: 'Archivo', sans-serif;
  margin: 0;
  letter-spacing: -0.035em;
}
h1 {
  font-weight: 800;
  font-size: clamp(2.5rem, 7.4vw, 5.1rem);
  line-height: 0.96;
  text-wrap: balance;
}
h1 em {
  font-style: normal;
  color: var(--amber);
}
h2 {
  font-weight: 800;
  font-size: clamp(1.9rem, 4.6vw, 3rem);
  line-height: 1.02;
  text-wrap: balance;
}
h3 {
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
}
.tag {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--amber);
  font-weight: 600;
  margin: 0 0 14px;
}
.lede {
  font-size: clamp(1.1rem, 2.2vw, 1.3rem);
  color: var(--chalk-dim);
  max-width: 34ch;
  margin: 22px 0 0;
  text-wrap: pretty;
}
.buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}
.button {
  display: inline-flex;
  align-items: center;
  min-height: 50px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  font-size: 16px;
}
.button.main {
  background: var(--amber);
  color: #0f172a;
}
.button.main:hover {
  background: #fde68a;
}
.button.quiet {
  border: 1.5px solid var(--line);
  color: var(--chalk);
}
.button.quiet:hover {
  border-color: var(--amber);
  color: var(--amber);
}
.fine {
  font-size: 14px;
  color: var(--chalk-faint);
  margin: 18px 0 0;
}
section {
  padding: clamp(56px, 9vw, 112px) 0;
}

/* ---- devices: the real screens, in a frame ---- */
.device {
  margin: 0;
  background: #0a1c19;
  border: 7px solid #0a1c19;
  outline: 1.5px solid rgb(244 247 246 / 0.18);
  border-radius: 30px;
  overflow: hidden;
  box-shadow:
    0 30px 70px rgb(0 0 0 / 0.5),
    0 2px 0 rgb(255 255 255 / 0.06) inset;
}
.device img {
  width: 100%;
}
.device.land {
  width: 100%;
  border-radius: 26px;
}
.device.port {
  width: min(100%, 250px);
  border-radius: 34px;
}
.device.laptop {
  border-radius: 14px;
  border-width: 5px;
}

.caption {
  font-size: 13px;
  color: var(--chalk-faint);
  margin: 10px 0 0;
}

/* ---- doorways ---- */
.doors {
  border-top: 1px solid var(--line);
}
.door-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin-top: 36px;
  border-top: 1px solid var(--line);
}
@media (min-width: 860px) {
  .door-grid {
    grid-template-columns: 1fr 1fr;
    column-gap: 56px;
  }
}
.door {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: center;
  gap: 4px 14px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  color: var(--chalk);
  text-decoration: none;
}
.door:hover h3,
.door:hover .arrow {
  color: var(--amber);
}
.door svg {
  width: 44px;
  height: 44px;
}
.door p {
  margin: 2px 0 0;
  color: var(--chalk-dim);
  font-size: 15.5px;
}
.door .arrow {
  font-size: 22px;
  color: var(--chalk-faint);
}

/* ---- the court, in lines ---- */
.court-line {
  position: absolute;
  right: -8%;
  top: 4%;
  width: min(920px, 110vw);
  opacity: 0.17;
  transform: rotate(-9deg);
  pointer-events: none;
}

/* ---- footer ---- */
footer {
  border-top: 1px solid var(--line);
  padding: 28px 0 calc(env(safe-area-inset-bottom, 0px) + 36px);
  font-size: 14.5px;
  color: var(--chalk-faint);
}
footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  align-items: center;
}
footer a {
  color: var(--chalk-dim);
  text-decoration: none;
  padding: 8px 0;
}
footer a:hover {
  color: var(--amber);
}
footer .where {
  margin-left: auto;
}
