/* Palette pulled from the cover (images/cover.jpg), weighted toward its shadows:
   soot slate from the Painted Ladies' shade, overcast fog, the red title band
   darkened to dried blood, the cream banner as bone, and the sunset orange
   kept back for a single ember glow behind the cover. */

:root {
  --soot: #182024;
  --soot-deep: #10161a;
  --fog: #d6d3cb;
  --fog-light: #e4e1d9;
  --bone: #e1d1b7;
  --blood: #9a2b22;
  --blood-deep: #7a2019;
  --ember: #ea7445;

  --bg: var(--fog);
  --field-bg: var(--fog-light);
  --ink: #1b2326;
  --ink-soft: #4a5356;
  --rule: #a9a69e;
  --accent: var(--blood);
  --accent-hover: var(--blood-deep);
  --on-accent: #ece6da;

  --max-w: 1040px;
  --measure: 38rem;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: var(--soot-deep);
    --field-bg: var(--soot);
    --ink: #e4ddd0;
    --ink-soft: #a9b0b0;
    --rule: #2e383c;
    --accent: var(--ember);
    --accent-hover: #f39a72;
    --on-accent: var(--soot-deep);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: var(--soot-deep);
  --field-bg: var(--soot);
  --ink: #e4ddd0;
  --ink-soft: #a9b0b0;
  --rule: #2e383c;
  --accent: var(--ember);
  --accent-hover: #f39a72;
  --on-accent: var(--soot-deep);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 18px;
  line-height: 1.7;
}

/* Fine grain over everything, like smoke in the air */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

h1, h2, h3, .post-title, .index-list .name {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 800;
  margin: 0;
  line-height: 1.1;
}

.brand, .site-nav a, .btn, label, .post-date, .index-list .detail {
  font-family: "Baloo 2", "Trebuchet MS", sans-serif;
}

a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { color: var(--accent-hover); }

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

img { max-width: 100%; display: block; }

.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 16px;
}

@media (min-width: 640px) {
  .wrap { padding: 0 32px; }
}

/* ---------------- Header: soot, continuous with the hero ---------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--soot);
  color: var(--bone);
}

.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
  flex-wrap: wrap;
}

.brand {
  color: var(--bone);
  text-decoration: none;
  font-size: 1.1rem;
  font-family: "Fraunces", Georgia, serif;
  font-weight: 700;
}
.brand:hover { color: var(--bone); }

.site-nav { display: flex; gap: 28px; }

.site-nav a {
  color: #a9b0b0;
  text-decoration: none;
  font-weight: 400;
  font-size: 1.05rem;
}
.site-nav a:hover { color: var(--ember); }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 8px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 5px 0;
  background: var(--bone);
}

@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .site-nav:not(.site-nav-static) {
    display: none;
    flex-direction: column;
    gap: 0;
    width: 100%;
    padding-bottom: 12px;
  }
  .site-nav:not(.site-nav-static) a { padding: 10px 0; border-top: 1px solid #2e383c; }
  .nav-open .site-nav { display: flex; }
}

/* ---------------- Hero: the cover, lit by a dying fire ---------------- */

.hero {
  position: relative;
  overflow: hidden;
  background: var(--soot);
  color: var(--bone);
  padding: 64px 0 88px;
}

.hero-layout {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 360px) 1fr;
  gap: 64px;
  align-items: center;
}

.cover-frame { position: relative; }

/* Ember glow behind the cover, breathing slowly */
.cover-frame::before {
  content: "";
  position: absolute;
  inset: -18% -30%;
  background: radial-gradient(closest-side, rgba(234, 116, 69, 0.42), rgba(154, 43, 34, 0.18) 55%, transparent);
  filter: blur(18px);
  animation: smolder 9s ease-in-out infinite;
}

@keyframes smolder {
  0%, 100% { opacity: 0.75; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.06); }
}

.cover {
  position: relative;
  width: 100%;
  height: auto;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
}

.hero h1 {
  font-family: "Baloo 2", "Trebuchet MS", sans-serif;
  font-weight: 400;
  letter-spacing: 0.01em;
  font-size: clamp(1.4rem, 2.8vw, 1.9rem);
  line-height: 1.2;
  color: var(--bone);
}

.hero h1 .city {
  display: block;
  font-family: "Fraunces", Georgia, serif;
  font-weight: 900;
  font-size: 2.6em;
  line-height: 0.95;
  letter-spacing: -0.01em;
  margin: 6px 0 10px;
}

.hero h1 .subtitle {
  display: block;
  color: #a9b0b0;
}

.summary {
  font-size: 1.15rem;
  line-height: 1.75;
  margin: 32px 0 0;
  max-width: 32em;
  color: #cfc8bb;
}

@media (max-width: 720px) {
  .hero { padding: 40px 0 56px; }
  .hero-layout { grid-template-columns: 1fr; gap: 40px; }
  .cover-frame { max-width: 300px; margin: 0 auto; }
}

/* ---------------- Sections ---------------- */

main > section:not(.hero) {
  padding: 72px 0;
}

main > section:not(.hero) + section {
  border-top: 1px solid var(--rule);
}

main > section:not(.hero) .wrap > * { max-width: var(--measure); }

.section-title {
  font-size: 2.2rem;
  margin-bottom: 24px;
}

.section-intro { margin: -8px 0 28px; color: var(--ink-soft); font-style: italic; }

/* ---------------- Blog ---------------- */

.post-list { list-style: none; margin: 0; padding: 0; }

.post-list li + li { border-top: 1px solid var(--rule); }

.post-link {
  display: block;
  padding: 18px 0;
  color: var(--ink);
  text-decoration: none;
}
.post-link:hover { color: var(--ink); }
.post-link:hover .post-title { color: var(--accent); }

.post-date {
  display: block;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.post-title {
  display: block;
  font-weight: 700;
  font-size: 1.45rem;
}

.post-summary { display: block; color: var(--ink-soft); }

.post-empty { color: var(--ink-soft); font-style: italic; }

/* Single post page */
.post { padding-top: 56px; padding-bottom: 80px; max-width: 760px; }
.post h1 { font-size: clamp(1.9rem, 5vw, 2.8rem); margin-bottom: 28px; }
.post-body { max-width: var(--measure); }
.post-body img { margin: 24px 0; }
.post-body blockquote {
  margin: 24px 0;
  padding-left: 20px;
  border-left: 3px solid var(--accent);
  color: var(--ink-soft);
}

/* ---------------- Contributors & links: a guidebook index ---------------- */

.index-list { list-style: none; margin: 0; padding: 0; }

.index-list a {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 8px 0;
  color: var(--ink);
  text-decoration: none;
}

.index-list .name {
  font-weight: 700;
  font-size: 1.25rem;
}

.index-list .leader {
  flex: 1;
  min-width: 24px;
  border-bottom: 2px dotted var(--rule);
  transform: translateY(-0.3em);
}

.index-list .detail {
  color: var(--ink-soft);
  font-size: 1rem;
  text-align: right;
}

.index-list a:hover .name { color: var(--accent); text-decoration: underline; text-underline-offset: 0.18em; }

/* ---------------- Contact ---------------- */

.contact-form { max-width: 560px; }

.field { margin-bottom: 18px; }

.field label {
  display: block;
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 4px;
}

.field input,
.field textarea {
  width: 100%;
  padding: 10px 12px;
  font: inherit;
  color: var(--ink);
  background: var(--field-bg);
  border: 1px solid var(--rule);
  border-radius: 2px;
}

.field input:focus,
.field textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: -1px;
}

.field textarea { resize: vertical; min-height: 140px; }

.btn {
  display: inline-block;
  padding: 10px 28px;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--on-accent);
  background: var(--accent);
  border: 0;
  border-radius: 2px;
  cursor: pointer;
}
.btn:hover { background: var(--accent-hover); }
.btn:disabled { opacity: 0.6; cursor: default; }

.form-status { margin-top: 16px; }
.form-status:empty { display: none; }

/* ---------------- Footer ---------------- */

footer {
  background: var(--soot);
  color: #a9b0b0;
  padding: 32px 0;
  font-size: 0.9rem;
}
footer p { margin: 0; }

/* ---------------- Inner pages (blog, contributors, posts) ---------------- */

.site-nav a[aria-current="page"] { color: var(--bone); }

main > section.page { padding: 56px 0 88px; }

.page-title {
  font-size: clamp(2.4rem, 6vw, 3.4rem);
  margin-bottom: 32px;
}

.index-group {
  font-size: 1.5rem;
  margin: 40px 0 8px;
}
.page-title + .index-group { margin-top: 0; }

.subscribe { margin-top: 32px; font-family: "Baloo 2", "Trebuchet MS", sans-serif; font-size: 1.1rem; }
