:root {
  --bg: #fbf4e8;
  --bg-2: #f4e9d6;
  --card: #fffaf1;
  --ink: #2a1f2d;
  --ink-2: #5e5060;
  --muted: #8a7b85;
  --line: #e4d6bf;
  --ginger: #e39a45;
  --ginger-ink: #b46a1f;
  --teal: #2a7a84;
  --pink: #f2a7a0;
  --awake: #3d9a5b;
  --shadow: 0 1px 0 #2a1f2d, 0 0 0 2px #2a1f2d;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1c1620;
    --bg-2: #241d29;
    --card: #2a2230;
    --ink: #f6ecdc;
    --ink-2: #cdbfc6;
    --muted: #9a8b96;
    --line: #3e3345;
    --ginger: #eca85a;
    --ginger-ink: #f0b46e;
    --teal: #5fb3bc;
    --awake: #6cc98a;
    --shadow: 0 0 0 2px #0d0a10;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #1c1620; --bg-2: #241d29; --card: #2a2230; --ink: #f6ecdc; --ink-2: #cdbfc6; --muted: #9a8b96;
  --line: #3e3345; --ginger: #eca85a; --ginger-ink: #f0b46e; --teal: #5fb3bc; --awake: #6cc98a;
  --shadow: 0 0 0 2px #0d0a10; color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.6 Figtree, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
.wrap { width: min(1080px, 100% - 32px); margin-inline: auto; }
a { color: inherit; }
code { font: 500 .88em/1 ui-monospace, "SF Mono", Menlo, monospace; background: var(--bg-2); padding: .15em .4em; border-radius: 6px; }

h1, h2, h3, .lockup span {
  font-family: Fraunces, Georgia, serif;
  font-variation-settings: "SOFT" 100, "WONK" 1;
  letter-spacing: -0.01em;
}

/* header */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 0; }
.lockup { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.lockup span { font-size: 26px; font-weight: 700; }
.lockup em { font-style: normal; color: var(--ginger-ink); }
.status { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); display: inline-block; flex: none; }
.status .dot { animation: doze 4s ease-in-out infinite; }

/* hero */
.hero { display: grid; grid-template-columns: 1.25fr 1fr; align-items: center; gap: 40px; padding: 40px 0 72px; }
.eyebrow { margin: 0 0 14px; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--teal); }
h1 { margin: 0 0 22px; font-size: clamp(42px, 7vw, 76px); line-height: 1.02; font-weight: 750; }
.squiggle {
  color: var(--ginger-ink);
  text-decoration: underline wavy var(--ginger);
  text-decoration-thickness: .06em;
  text-underline-offset: .14em;
}
.lede { margin: 0 0 14px; font-size: 19px; color: var(--ink-2); max-width: 38em; }
.lede.small { font-size: 16px; color: var(--muted); }
.lede b { color: var(--ink); }
.hero-art { display: grid; place-items: center; }
.mark { width: min(100%, 400px); height: auto; overflow: visible; }
.breathe { transform-origin: 128px 140px; animation: breathe 5s ease-in-out infinite; }
.z { animation: drift 4s ease-in-out infinite; }
.z2 { animation-delay: 1.2s; }

/* sections */
section h2 { margin: 0; font-size: clamp(28px, 4vw, 38px); font-weight: 700; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px 20px; margin-bottom: 22px; }
.section-head p { margin: 0; color: var(--muted); }

.burrows { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: auto auto; gap: 18px; }
.card {
  background: var(--card);
  border-radius: 22px;
  padding: 24px 26px;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 10px;
}
.card h3 { margin: 0; font-size: 30px; font-weight: 700; line-height: 1.1; }
.card p { margin: 0; color: var(--ink-2); }
.resident { grid-row: span 2; text-decoration: none; transition: transform .2s ease, box-shadow .2s ease; }
.resident:hover { transform: translateY(-3px) rotate(-.4deg); box-shadow: var(--shadow), 6px 8px 0 var(--ginger); }
.resident.compact { grid-row: auto; }
.resident:focus-visible { outline: 3px solid var(--teal); outline-offset: 4px; }
.card-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.no { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.pill { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 500; padding: 4px 11px; border-radius: 99px; background: var(--bg-2); color: var(--ink-2); }
.pill.awake .dot { background: var(--awake); box-shadow: 0 0 0 0 var(--awake); animation: ping 2.4s ease-out infinite; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 8px 0 4px; }
.stats div { background: var(--bg); border-radius: 14px; padding: 12px 14px; }
.stats dt { font-size: 13px; color: var(--muted); }
.stats dd { margin: 2px 0 0; font: 700 30px/1.1 Fraunces, Georgia, serif; font-variant-numeric: tabular-nums; }
.aside { font-size: 15px; border-left: 3px solid var(--ginger); padding-left: 12px; }
.go { margin-top: auto; padding-top: 8px; font-weight: 600; color: var(--teal); }
.resident:hover .go span { display: inline-block; transform: translateX(4px); transition: transform .2s; }
.vacant { background: transparent; box-shadow: none; border: 2px dashed var(--line); }
.vacant h3, .compact h3 { font-size: 24px; }
.vacant h3 { color: var(--ink-2); }

.rules { padding: 80px 0 20px; }
.rules ol { list-style: none; counter-reset: r; padding: 0; margin: 22px 0 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 28px; }
.rules li { counter-increment: r; position: relative; padding: 14px 0 14px 54px; border-top: 2px solid var(--line); color: var(--ink-2); }
.rules li::before {
  content: counter(r);
  position: absolute; left: 0; top: 12px;
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  font: 700 18px/1 Fraunces, Georgia, serif;
  background: var(--ginger); color: #2a1f2d;
}
.rules b { color: var(--ink); display: block; }

.why { padding: 60px 0 40px; }
.why-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; margin-top: 18px; }
.why-grid p { margin: 0; color: var(--ink-2); font-size: 18px; }

.foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 40px 0 48px; margin-top: 30px; border-top: 2px solid var(--line); font-size: 15px; }
.foot .muted { color: var(--muted); margin-left: auto; }

@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.025, 1.04); } }
@keyframes drift { 0%, 100% { transform: translate(0, 0); opacity: 1; } 50% { transform: translate(4px, -6px); opacity: .55; } }
@keyframes doze { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
@keyframes ping { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--awake) 60%, transparent); } 80%, 100% { box-shadow: 0 0 0 7px transparent; } }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .z { stroke: var(--ink); }
  :root:not([data-theme="light"]) .saucer { fill: #cdbca6; }
}
:root[data-theme="dark"] .z { stroke: var(--ink); }
:root[data-theme="dark"] .saucer { fill: #cdbca6; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; padding: 16px 0 48px; gap: 8px; }
  .hero-art { order: -1; }
  .mark { width: min(70%, 280px); }
  .burrows { grid-template-columns: 1fr; }
  .resident { grid-row: auto; }
  .rules ol, .why-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  body { font-size: 16px; }
  .status { display: none; }
  .stats { grid-template-columns: 1fr; }
  .stats div { display: flex; justify-content: space-between; align-items: baseline; }
  .card { padding: 20px; }
  .foot .muted { margin-left: 0; width: 100%; }
}
