/* =========================================================
   OMENHOUND CHRONICLES — design tokens
   bg:      #14131b  near-black indigo-charcoal (night/omen)
   panel:   #1c1a24
   ink:     #ece7de  warm off-white
   muted:   #948d99  dusty lavender-grey
   gold:    #c9973f  lantern gold (primary accent)
   rust:    #b3583f  dusty rust-pink (Ratleap nod, secondary accent)
   line:    #322f3d
   display font: Fraunces (characterful serif)
   body font:    Work Sans
   ========================================================= */

:root {
  --bg: #14131b;
  --panel: #1c1a24;
  --ink: #ece7de;
  --muted: #948d99;
  --gold: #c9973f;
  --rust: #b3583f;
  --rust-text: #c6826f; /* lightened for 4.5:1+ text contrast on --bg; use --rust for borders/decoration only */
  --line: #322f3d;
  --radius: 6px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Work Sans', sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  margin: 0;
}

a { color: inherit; }

/* ---------- shared paw glyph ---------- */
.paw {
  display: inline-block;
  width: 10px;
  height: 10px;
  background: var(--gold);
  border-radius: 50% 50% 50% 0;
  transform: rotate(45deg);
  margin-right: 8px;
  vertical-align: middle;
}

.pawprint-large, .pawprint-small {
  fill: var(--gold);
}

/* ---------- print-trail nav ---------- */
.print-trail {
  position: fixed;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 14px;
  z-index: 50;
}
.print-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--line);
  transition: background 0.25s, transform 0.25s;
}
.print-dot:hover {
  background: var(--gold);
  transform: scale(1.3);
}
@media (max-width: 720px) {
  .print-trail { display: none; }
}

/* ---------- hero ---------- */
.hero {
  min-height: 92vh;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
  padding: 6rem 8vw 4rem;
  position: relative;
  overflow: hidden;
}
.hero-inner {
  max-width: 620px;
  position: relative;
  z-index: 2;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0 0 1.5rem;
}
h1 {
  font-size: clamp(2.8rem, 6vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -0.01em;
  margin-bottom: 1.75rem;
}
h1 .ital { font-style: italic; color: var(--gold); font-weight: 500; }

.hero-copy {
  font-size: 1.08rem;
  color: #cfc8d9;
  max-width: 52ch;
  margin-bottom: 1rem;
}
.hero-sub {
  color: var(--rust-text);
  font-style: italic;
  font-family: 'Fraunces', serif;
  font-size: 1.05rem;
  margin-bottom: 2.25rem;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-block;
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: transform 0.2s, background 0.2s, border-color 0.2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--gold); color: #14131b; }
.btn-primary:hover { background: #dcaa52; }
.btn-ghost { border: 1px solid var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--gold); }

.hero-mark {
  position: relative;
  flex-shrink: 0;
  width: 40vw;
  max-width: 420px;
  opacity: 0.9;
}
.pawprint-large { width: 100%; height: auto; opacity: 0.14; }

@media (max-width: 900px) {
  .hero { flex-direction: column; text-align: left; padding-top: 5rem; }
  .hero-mark { width: 60vw; max-width: 260px; opacity: 0.5; margin-top: -2rem; }
}

/* ---------- generic sections ---------- */
.section {
  padding: 6rem 8vw;
  max-width: 1000px;
  margin: 0 auto;
}
.section-alt { background: var(--panel); max-width: none; }
.section-alt > * { max-width: 1000px; margin-left: auto; margin-right: auto; }

.section-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 1rem;
}
.section h2 {
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  margin-bottom: 0.6rem;
}
.section-lede {
  color: var(--muted);
  margin-bottom: 2.75rem;
}

/* ---------- story accordion ---------- */
.story-list { display: flex; flex-direction: column; gap: 12px; }
.story {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(255,255,255,0.015);
}
.story-toggle {
  position: relative;
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  row-gap: 6px;
  column-gap: 14px;
  padding: 1.35rem 2.75rem 1.35rem 1.5rem;
  background: none;
  border: none;
  color: var(--ink);
  font-family: 'Fraunces', serif;
  font-size: 1.15rem;
  line-height: 1.3;
  text-align: left;
  cursor: pointer;
}
.story-toggle:hover { background: rgba(201,151,63,0.06); }
.story-name { max-width: 100%; }
.story-tag {
  font-family: 'Work Sans', sans-serif;
  font-size: 0.78rem;
  color: var(--muted);
  font-style: normal;
}
.story-icon {
  position: absolute;
  top: 1.6rem;
  right: 1.5rem;
  width: 10px; height: 10px;
  border-right: 2px solid var(--gold);
  border-bottom: 2px solid var(--gold);
  transform: rotate(45deg);
  transition: transform 0.25s;
  flex-shrink: 0;
}
.story-toggle[aria-expanded="true"] .story-icon { transform: rotate(-135deg); }

.story-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
  padding: 0 1.5rem;
}
.story-panel.open { max-height: 900px; padding-bottom: 1.75rem; }

.story-blurb { color: #cfc8d9; max-width: 60ch; margin: 0.25rem 0 1.5rem; font-size: 0.94rem; }

.cast-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.char-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem;
}
.char-icon {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(201,151,63,0.12);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 0.7rem;
}
.char-icon-alt { color: var(--gold); font-family: 'Fraunces', serif; font-size: 1rem; }
.pawprint-small { width: 16px; height: 16px; }
.char-card h3 { font-size: 1rem; margin-bottom: 0.15rem; }
.char-role { font-size: 0.78rem; color: var(--rust-text); margin: 0 0 0.4rem; }
.char-note { font-size: 0.82rem; color: var(--muted); margin: 0; }

/* ---------- connections ---------- */
.connection-flow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
  margin-bottom: 1.5rem;
}
.node {
  background: var(--bg);
  border: 1px solid var(--gold);
  color: var(--ink);
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius);
  font-family: 'Fraunces', serif;
  font-size: 0.95rem;
}
.node-origin { border-color: var(--gold); background: rgba(201,151,63,0.1); }
.node-loose { border-color: var(--rust); border-style: dashed; }
.branch { display: flex; align-items: center; }
.branch-line {
  width: 46px; height: 1px; background: var(--gold); margin: 0 10px;
}
.branch-line-dashed { background: repeating-linear-gradient(90deg, var(--rust) 0 6px, transparent 6px 11px); }
.connection-note { color: var(--muted); font-size: 0.85rem; font-style: italic; }

@media (max-width: 640px) {
  .connection-flow { flex-direction: column; align-items: flex-start; }
  .branch { flex-direction: row; }
  .branch-line { width: 1px; height: 26px; margin: 6px 0 6px 20px; }
}

/* ---------- link lists ---------- */
.link-list { display: flex; flex-direction: column; gap: 8px; }
.link-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1rem 1.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  font-size: 0.95rem;
  transition: border-color 0.2s, background 0.2s;
}
.link-row:hover { border-color: var(--gold); background: rgba(201,151,63,0.05); }
.link-arrow { color: var(--gold); }

/* ---------- social links ---------- */
.links-section { text-align: center; }
.social-row { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-bottom: 2.5rem; }
.social-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.6rem 1.4rem;
  text-decoration: none;
  font-size: 0.88rem;
  transition: border-color 0.2s, color 0.2s;
}
.social-pill:hover { border-color: var(--rust); color: var(--rust-text); }
.footer-note { color: var(--muted); font-size: 0.8rem; }

/* =========================================================
   SPLASH PAGE (index.html — the gate before the real site)
   ========================================================= */
.splash-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.splash {
  text-align: center;
  padding: 2rem;
  max-width: 480px;
}
.splash-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  color: var(--muted);
  margin: 0 0 2.5rem;
}

.splash-door {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 140px;
  height: 140px;
  margin-bottom: 2rem;
  text-decoration: none;
}
.splash-paw {
  width: 68px;
  height: 68px;
  fill: var(--gold);
  position: relative;
  z-index: 2;
  transition: transform 0.3s ease, fill 0.3s ease;
}
.splash-ring {
  position: absolute;
  inset: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}
.splash-ring::before {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid var(--line);
  border-radius: 50%;
  transition: border-color 0.3s ease;
}
.splash-door:hover .splash-paw {
  transform: scale(1.08) rotate(-4deg);
  fill: #dcaa52;
}
.splash-door:hover .splash-ring {
  border-color: var(--gold);
  box-shadow: 0 0 28px rgba(201,151,63,0.25);
  transform: scale(1.04);
}
.splash-door:hover .splash-ring::before { border-color: var(--rust); }

@keyframes pulse-ring {
  0%, 100% { box-shadow: 0 0 0 rgba(201,151,63,0); }
  50% { box-shadow: 0 0 24px rgba(201,151,63,0.15); }
}
.splash-ring { animation: pulse-ring 3.5s ease-in-out infinite; }

.splash-title {
  font-size: clamp(2.2rem, 7vw, 3rem);
  line-height: 1.05;
  margin-bottom: 1rem;
}
.splash-title .ital { font-style: italic; color: var(--gold); font-weight: 500; }

.splash-tag {
  font-family: 'Fraunces', serif;
  font-style: italic;
  color: var(--rust-text);
  font-size: 1rem;
  margin-bottom: 2.25rem;
}

.splash-enter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--line);
  padding-bottom: 4px;
  transition: border-color 0.2s, color 0.2s;
  margin-bottom: 3rem;
}
.splash-enter:hover { border-color: var(--gold); color: var(--gold); }
.splash-enter .arrow { transition: transform 0.2s; }
.splash-enter:hover .arrow { transform: translateX(4px); }

.splash-info {
  list-style: none;
  padding: 0;
  margin: 0;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 2;
}

/* =========================================================
   EXTRAS PAGE — lore & cults
   ========================================================= */
.back-link {
  position: fixed;
  top: 22px;
  left: 22px;
  z-index: 50;
  font-size: 0.82rem;
  color: var(--muted);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg);
  transition: color 0.2s, border-color 0.2s;
}
.back-link:hover { color: var(--gold); border-color: var(--gold); }

.extras-hero { padding-top: 8rem; text-align: center; }
.extras-hero h1 { font-size: clamp(2.2rem, 5vw, 3rem); margin-bottom: 0.75rem; }
.extras-hero .section-eyebrow { text-align: center; }
.extras-hero .section-lede { max-width: 46ch; margin-left: auto; margin-right: auto; }

.cult-list { display: flex; flex-direction: column; gap: 12px; max-width: 760px; margin: 0 auto; }

.cult {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(255,255,255,0.015);
}
.cult-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 1.25rem 1.5rem;
  background: none;
  border: none;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  position: relative;
}
.cult-toggle:not(:disabled):hover { background: rgba(201,151,63,0.06); }
.cult-toggle:disabled { cursor: default; opacity: 0.55; }

.cult-emblem {
  flex-shrink: 0;
  width: 46px; height: 46px;
  color: var(--gold);
}
.cult-emblem svg { width: 100%; height: 100%; }
.cult-emblem-locked { color: var(--line); }

.cult-heading { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.cult-name { font-family: 'Fraunces', serif; font-size: 1.2rem; }
.cult-tag { font-size: 0.78rem; color: var(--muted); }

.cult-toggle .story-icon { position: static; margin-left: auto; }

.cult-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
  padding: 0 1.5rem;
}
.cult-panel.open { max-height: 600px; padding-bottom: 1.75rem; }
.cult-blurb { color: #cfc8d9; font-size: 0.92rem; max-width: 62ch; margin: 0.25rem 0 1rem; }
.cult-blurb-note { color: var(--muted); font-style: italic; font-size: 0.82rem; }

/* =========================================================
   ACCESSIBILITY — visible keyboard focus states
   Uses :focus-visible so the outline only shows for keyboard
   navigation, not on mouse clicks.
   ========================================================= */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 3px;
}
.splash-door:focus-visible .splash-ring {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,151,63,0.35);
}

/* =========================================================
   TRAVELER'S LOG — embedded guestbook (iframe)
   ========================================================= */
.guestbook-frame {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
}
.guestbook-frame iframe {
  width: 100%;
  height: 720px;
  border: none;
  display: block;
}
@media (max-width: 640px) {
  .guestbook-frame iframe { height: 900px; } /* stacked form needs more room on narrow screens */
}
