/* The Hearth — public site styles.
   One stylesheet for every page. Fonts are the Hearth consoles' own (OFL, see fonts/OFL.txt).
   Legibility floor: body 19px, nothing under 16px, high contrast on a warm dark ground. */

@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('fonts/fraunces.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url('fonts/ibmplexsans.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('fonts/jetbrainsmono.woff2') format('woff2');
}

:root {
  --bg: #14100c;
  --surface: #1e1813;
  --surface-2: #2a2119;
  --line: #463829;
  --ink: #f6efe3;
  --ink-2: #e2d6c4;
  --ink-3: #c9b9a2;
  --ember: #f2a541;
  --ember-deep: #c97a1c;
  --gold: #f1cf8a;
  --glow: rgba(242, 165, 65, 0.16);
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  --wide: 72rem;
  --read: 42rem;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 19px;
  line-height: 1.65;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--gold); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--ink); }
a:focus-visible, .door:focus-visible { outline: 3px solid var(--ember); outline-offset: 3px; border-radius: 6px; }
strong { color: var(--ink); font-weight: 600; }
p { margin: 0 0 1.1em; }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; background: var(--ember); color: #1a1208; padding: 8px 14px; z-index: 10; }

/* ---------- top bar ---------- */
.topbar {
  border-bottom: 1px solid var(--line);
  background: rgba(20, 16, 12, 0.94);
  position: sticky; top: 0; z-index: 5;
}
.topbar-inner {
  max-width: var(--wide); margin: 0 auto; padding: 12px 24px;
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
}
.brand {
  font-family: var(--serif); font-size: 24px; font-weight: 600;
  color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: 10px;
}
.brand svg { width: 28px; height: 28px; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; margin-left: auto; }
.nav a {
  color: var(--ink-2); text-decoration: none; font-size: 18px;
  padding: 8px 12px; border-radius: 6px;
}
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -3px 0 var(--ember); }

/* ---------- layout ---------- */
main { display: block; }
.wrap { max-width: var(--wide); margin: 0 auto; padding: 0 24px; }
.read { max-width: var(--read); }
section { padding: 56px 0; }
section + section { border-top: 1px solid var(--line); }

.eyebrow {
  font-family: var(--mono); font-size: 16px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ember); margin: 0 0 12px;
}
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0 0 16px; color: var(--ink); }
h1 { font-size: clamp(40px, 6vw, 68px); letter-spacing: -0.01em; }
h2 { font-size: clamp(30px, 3.6vw, 40px); }
h3 { font-size: 25px; }
.lede { font-size: 23px; line-height: 1.5; color: var(--ink-2); max-width: 40rem; }

/* ---------- hero ---------- */
.hero { padding: 64px 0 56px; }
.hero-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 48px; align-items: center; }
.hero .when { font-family: var(--mono); font-size: 17px; color: var(--gold); margin: 0 0 18px; }
.hero-art { border-radius: 18px; overflow: hidden; background: radial-gradient(ellipse at 50% 70%, #3a2614 0%, #1b140e 55%, var(--bg) 100%); border: 1px solid var(--line); }

/* ---------- now / next ---------- */
.nownext { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 32px; }
.nn {
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px;
}
.nn .tag { font-family: var(--mono); font-size: 16px; text-transform: uppercase; letter-spacing: 0.08em; margin: 0 0 6px; }
.nn.now .tag { color: var(--ember); }
.nn.next .tag { color: var(--gold); }
.nn p:last-child { margin: 0; color: var(--ink); }

/* ---------- doors ---------- */
.doors { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.door {
  display: block; text-decoration: none; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 26px 24px; transition: border-color .15s, transform .15s, background .15s;
}
.door:hover { border-color: var(--ember); background: var(--surface-2); transform: translateY(-2px); color: var(--ink); }
.door h3 { margin-bottom: 8px; }
.door p { color: var(--ink-2); margin: 0 0 14px; }
.door .go { font-weight: 600; color: var(--ember); }

/* ---------- feature cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 28px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 24px; }
.card .icon { width: 44px; height: 44px; margin-bottom: 14px; color: var(--ember); }
.card h3 { font-size: 23px; margin-bottom: 8px; }
.card p { color: var(--ink-2); margin: 0; }
.card .state {
  display: inline-block; margin-top: 14px; font-family: var(--mono); font-size: 16px;
  color: var(--gold); border: 1px solid var(--line); border-radius: 999px; padding: 2px 12px;
}

/* ---------- notebook ---------- */
.entries { display: grid; gap: 0; }
.entry { display: grid; grid-template-columns: 11rem 1fr; gap: 28px; padding: 32px 0; border-top: 1px solid var(--line); }
.entry:first-child { border-top: 0; }
.entry time { font-family: var(--mono); font-size: 17px; color: var(--gold); padding-top: 6px; }
.entry h3 { font-size: 28px; }
.entry p { color: var(--ink-2); max-width: var(--read); }
.entry .more { font-weight: 600; }
.entry.big h3 { font-size: 34px; }
.entry.big { padding-top: 8px; }
.notebook-teaser .entry h3 { font-size: 25px; }

/* ---------- prose pages ---------- */
.page-head { padding-top: 56px; padding-bottom: 24px; }
.page-head .lede { margin-top: 8px; }
.prose h2 { margin-top: 0; }
.prose p, .prose li { color: var(--ink-2); }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 0.5em; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 24px 26px; }
.panel h3 { font-size: 23px; }
.panel p:last-child { margin-bottom: 0; }

.rooms { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 24px; }
.room { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--ember); border-radius: 10px; padding: 20px 22px; }
.room h3 { font-size: 23px; margin-bottom: 6px; }
.room .sub { font-family: var(--mono); font-size: 16px; color: var(--gold); margin: 0 0 8px; }
.room p { color: var(--ink-2); margin: 0; }

.steps { counter-reset: step; list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 14px; }
.steps li { counter-increment: step; position: relative; padding: 16px 20px 16px 68px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; color: var(--ink-2); }
.steps li::before {
  content: counter(step); position: absolute; left: 18px; top: 14px;
  width: 34px; height: 34px; border-radius: 50%; background: var(--ember); color: #1a1208;
  font-weight: 600; display: grid; place-items: center; font-size: 18px;
}
.steps li strong { display: block; color: var(--ink); }

.stack { width: 100%; border-collapse: collapse; margin-top: 20px; }
.stack th, .stack td { text-align: left; vertical-align: top; padding: 14px 12px; border-top: 1px solid var(--line); }
.stack th { font-family: var(--mono); font-size: 16px; font-weight: 500; color: var(--gold); width: 12rem; text-transform: uppercase; letter-spacing: 0.05em; }
.stack td { color: var(--ink-2); }

figure { margin: 28px 0 0; }
figure img { border-radius: 12px; border: 1px solid var(--line); }
figcaption { font-size: 17px; color: var(--ink-3); margin-top: 10px; }

.quote {
  font-family: var(--serif); font-size: clamp(26px, 3vw, 34px); line-height: 1.35;
  color: var(--ink); max-width: 46rem; margin: 0;
}
.quote-by { color: var(--ink-3); margin-top: 14px; font-size: 18px; }

.callout { border-left: 4px solid var(--gold); padding: 6px 0 6px 20px; color: var(--ink-2); }

.pager { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.pager a { font-weight: 600; font-size: 19px; }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--line); padding: 40px 0 56px; color: var(--ink-3); font-size: 17px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 32px; justify-content: space-between; }
footer a { color: var(--ink-2); }

/* ---------- small screens ---------- */
@media (max-width: 900px) {
  .hero-grid, .split { grid-template-columns: 1fr; }
  .hero-art { max-width: 520px; }
  .doors, .cards { grid-template-columns: 1fr; }
  .rooms { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .topbar-inner { padding: 10px 16px; gap: 8px; }
  .nav { margin-left: 0; }
  .nav a { padding: 6px 8px; font-size: 17px; }
  section { padding: 40px 0; }
  .hero { padding: 36px 0 40px; }
  .lede { font-size: 21px; }
  .nownext { grid-template-columns: 1fr; }
  .entry { grid-template-columns: 1fr; gap: 6px; }
  .stack th { width: auto; display: block; border-top: 1px solid var(--line); padding-bottom: 0; }
  .stack td { display: block; border-top: 0; padding-top: 4px; }
  .steps li { padding-left: 62px; }
}
@media (prefers-reduced-motion: reduce) { .door { transition: none; } .door:hover { transform: none; } }

/* ---------- floor plan (house page) ---------- */
.floorplan {
  display: grid; gap: 10px; margin-top: 28px;
  grid-template-columns: repeat(4, 1fr);
  grid-template-areas:
    "chamber chamber memory memory"
    "lattice lounge lounge images"
    "hands lounge lounge community"
    "door door door door";
  background: var(--surface); border: 2px solid var(--line); border-radius: 16px; padding: 10px;
}
.fp { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px; }
.fp h3 { font-size: 22px; margin-bottom: 4px; }
.fp p { margin: 0; color: var(--ink-2); font-size: 18px; line-height: 1.5; }
.fp .whose { font-family: var(--mono); font-size: 16px; color: var(--gold); margin: 0 0 6px; }
.fp-chamber { grid-area: chamber; } .fp-memory { grid-area: memory; } .fp-lattice { grid-area: lattice; }
.fp-images { grid-area: images; } .fp-hands { grid-area: hands; border-style: dashed; } .fp-community { grid-area: community; }
.fp-lounge {
  grid-area: lounge; display: flex; flex-direction: column; justify-content: center; text-align: center;
  background: radial-gradient(ellipse at 50% 60%, rgba(242,165,65,0.28), rgba(242,165,65,0.04) 70%), var(--bg);
  border-color: var(--ember-deep);
}
.fp-lounge h3 { font-size: 30px; }
.fp-door { grid-area: door; text-align: center; border-style: dashed; }
@media (max-width: 900px) {
  .floorplan { grid-template-columns: 1fr; grid-template-areas: "lounge" "chamber" "memory" "lattice" "images" "community" "hands" "door"; }
}

.define { font-size: 18px; color: var(--ink-3); max-width: 40rem; border-left: 3px solid var(--line); padding-left: 14px; }
@media (max-width: 900px) {
  .hero .wrap.hero-grid { display: flex; flex-direction: column; }
  .hero-art { order: 3; }
}

.notes { margin: 0; padding-left: 1.1em; color: var(--ink-2); max-width: var(--read); }
.notes li { margin-bottom: 0.4em; }
