/* === Roamwick — shared editorial stylesheet ===
   Feel: printed field guide / Americana journal. Paper, ink, rust, brass.
   NOT a SaaS landing page: no gradients, no glassmorphism, no giant rounded cards. */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --paper:      #f7f1e6;
  --paper-deep: #efe6d3;
  --ink:        #221d15;
  --ink-soft:   #6b5f4d;
  --rust:       #9a3b1e;
  --brass:      #8f6a1f;
  --rule:       #cfc2a8;
  --rule-dark:  #a89877;
  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

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

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 10px 18px;
  font-family: var(--sans); font-size: 0.8rem;
}
.skip-link:focus { left: 0; text-decoration: none; }

body {
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

/* subtle paper grain via layered gradients — cheap, no images */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(ellipse at 20% 10%, rgba(143,106,31,0.045), transparent 55%),
    radial-gradient(ellipse at 85% 90%, rgba(154,59,30,0.035), transparent 50%);
}
body > * { position: relative; z-index: 1; }

a { color: var(--rust); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- type helpers ---------- */
.kicker {
  font-family: var(--sans); font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--rust);
}
.kicker--muted { color: var(--ink-soft); }

/* ---------- masthead ---------- */
.masthead {
  border-bottom: 1px solid var(--rule-dark);
  padding: 0 28px;
}
.masthead-inner {
  max-width: 1060px; margin: 0 auto;
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 20px 0 16px;
}
.wordmark {
  font-family: var(--serif); font-weight: 600; font-size: 1.5rem;
  letter-spacing: 0.30em; text-transform: uppercase; color: var(--ink);
}
.wordmark:hover { text-decoration: none; color: var(--rust); }
.masthead-nav { display: flex; gap: 26px; }
.masthead-nav a {
  font-family: var(--sans); font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-soft);
}
.masthead-nav a:hover { color: var(--rust); text-decoration: none; }
.masthead-tagline {
  max-width: 1060px; margin: 0 auto; padding: 7px 0 9px;
  border-top: 1px solid var(--rule);
  font-style: italic; font-size: 0.85rem; color: var(--ink-soft);
  display: flex; justify-content: space-between;
}
.masthead-tagline .issue { font-style: normal; font-family: var(--sans); font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; }

/* ---------- shared section scaffolding ---------- */
.band { padding: 0 28px; }
.band-inner { max-width: 1060px; margin: 0 auto; }
.band-inner--text { max-width: 700px; margin: 0 auto; }

.rule-heavy { border: 0; border-top: 3px double var(--rule-dark); }
.rule-light { border: 0; border-top: 1px solid var(--rule); }

.section-head { display: flex; align-items: baseline; gap: 18px; margin-bottom: 30px; }
.section-head .kicker { flex-shrink: 0; }
.section-head::after { content: ""; flex: 1; border-top: 1px solid var(--rule-dark); transform: translateY(-4px); }

h2.display {
  font-weight: 500; font-size: clamp(1.7rem, 3.6vw, 2.4rem);
  line-height: 1.15; letter-spacing: -0.01em; margin-bottom: 14px;
}
.prose p { margin-bottom: 1.1em; }
.prose p:last-child { margin-bottom: 0; }
.prose em { font-style: italic; }

.dropcap::first-letter {
  font-size: 3.4em; line-height: 0.82; float: left;
  padding: 6px 10px 0 0; font-weight: 600; color: var(--rust);
}

/* ---------- horseshoe seal ---------- */
.shoe { display: inline-block; vertical-align: -0.18em; }
.shoe svg { display: block; }
.shoe-row { display: inline-flex; gap: 4px; }

.seal-tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 1px solid var(--rule-dark); background: var(--paper-deep); }
.seal-tier { padding: 30px 26px 26px; border-right: 1px solid var(--rule-dark); text-align: center; }
.seal-tier:last-child { border-right: none; }
.seal-tier .shoe-row { justify-content: center; margin-bottom: 14px; }
.seal-tier h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 6px; }
.seal-tier p { font-size: 0.88rem; color: var(--ink-soft); line-height: 1.55; }

/* ---------- photo placeholders (become real <img> later) ---------- */
.photo {
  background: var(--paper-deep);
  border: 1px dashed var(--rule-dark);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; text-align: center; padding: 24px; color: var(--ink-soft);
}
.photo .photo-mark { font-family: var(--sans); font-size: 0.65rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--rule-dark); }
.photo .photo-shot { font-style: italic; font-size: 0.88rem; max-width: 420px; }
.photo--wide { aspect-ratio: 21 / 9; }
.photo--land { aspect-ratio: 3 / 2; }
.photo--tall { aspect-ratio: 4 / 5; }
figcaption { font-family: var(--sans); font-size: 0.72rem; letter-spacing: 0.04em; color: var(--ink-soft); padding-top: 8px; border-bottom: 1px solid var(--rule); padding-bottom: 8px; }
figcaption .credit { float: right; color: var(--ink-soft); }
figcaption .credit a { color: inherit; }
img.photo-img { width: 100%; height: auto; display: block; border: 1px solid var(--rule-dark); filter: sepia(0.08) saturate(0.95); }
img.photo-img--wide { aspect-ratio: 21 / 9; object-fit: cover; }
img.photo-img--land { aspect-ratio: 3 / 2; object-fit: cover; }
img.photo-img--tall { aspect-ratio: 4 / 5; object-fit: cover; }

/* ---------- guide entries (numbered, field-guide style) ---------- */
.entry { display: grid; grid-template-columns: 56px 1fr 300px; gap: 26px; padding: 30px 0; border-top: 1px solid var(--rule); align-items: start; }
.entry:first-of-type { border-top: none; padding-top: 6px; }
.entry-no {
  font-family: var(--serif); font-weight: 300; font-size: 2rem;
  color: var(--rule-dark); line-height: 1; padding-top: 4px; font-style: italic;
}
.entry-body h3 { font-size: 1.3rem; font-weight: 600; margin-bottom: 2px; }
.entry-meta { font-family: var(--sans); font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 10px; }
.entry-body p { font-size: 0.98rem; margin-bottom: 0.9em; }
.entry-body p:last-child { margin-bottom: 0; }
.entry-tip { font-size: 0.88rem; font-style: italic; color: var(--ink-soft); border-left: 2px solid var(--brass); padding-left: 12px; }
.entry-links { font-family: var(--sans); font-size: 0.74rem; font-weight: 600; letter-spacing: 0.08em; margin-top: 14px; }
.entry-links a { color: var(--rust); }
.entry-links .go { font-size: 0.85em; }

/* ---------- maps-app chooser sheet ---------- */
.maps-backdrop {
  position: fixed; inset: 0; background: rgba(34, 29, 21, 0.45);
  opacity: 0; pointer-events: none; transition: opacity 0.18s ease; z-index: 90;
}
.maps-backdrop.open { opacity: 1; pointer-events: auto; }
.maps-sheet {
  position: fixed; left: 50%; bottom: 0; transform: translate(-50%, 105%);
  transition: transform 0.22s ease; width: min(440px, 100%);
  background: var(--paper); border: 1px solid var(--rule-dark); border-bottom: 0;
  padding: 24px 24px 32px; z-index: 91;
}
.maps-sheet.open { transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) {
  .maps-sheet, .maps-backdrop { transition: none; }
}
.maps-sheet-title { margin-bottom: 14px; text-align: center; }
.maps-app {
  display: block; width: 100%; padding: 13px 16px; margin-bottom: 10px;
  border: 1px solid var(--rule-dark); background: var(--paper-deep);
  font-family: var(--serif); font-size: 1.02rem; color: var(--ink);
  cursor: pointer; text-align: center;
}
.maps-app:hover { background: var(--paper); border-color: var(--ink-soft); }
.maps-sheet-note { font-family: var(--sans); font-size: 0.72rem; color: var(--ink-soft); text-align: center; margin-top: 6px; }


/* ---------- town directory (scales to many towns) ---------- */
.town-list { list-style: none; }
.town-row { border-top: 1px solid var(--rule); }
.town-row:last-child { border-bottom: 1px solid var(--rule); }
.town-row > a {
  display: grid; grid-template-columns: 90px minmax(0, 1fr) auto; gap: 20px;
  align-items: baseline; padding: 22px 6px; color: inherit; text-decoration: none;
}
.town-row > a:hover { background: var(--paper-deep); text-decoration: none; }
.town-row .town-no { font-family: var(--sans); font-size: 0.7rem; letter-spacing: 0.14em; color: var(--ink-soft); text-transform: uppercase; }
.town-row .town-name { font-size: 1.25rem; font-weight: 600; }
.town-row .town-name em { font-style: italic; font-weight: 400; font-size: 0.9rem; color: var(--ink-soft); margin-left: 10px; }
.town-row .town-blurb { display: block; font-size: 0.92rem; color: var(--ink-soft); margin-top: 4px; }
.town-row .town-shoes { color: var(--brass); white-space: nowrap; }
@media (max-width: 560px) {
  .town-row > a { grid-template-columns: 1fr auto; }
  .town-row .town-no { grid-column: 1 / -1; }
}

/* ---------- footer ---------- */
.site-footer { border-top: 3px double var(--rule-dark); margin-top: 90px; padding: 40px 28px 60px; }
.footer-inner { max-width: 1060px; margin: 0 auto; display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-inner .wordmark { font-size: 1rem; }
.footer-note { font-size: 0.85rem; color: var(--ink-soft); font-style: italic; max-width: 480px; }
.footer-legal { font-family: var(--sans); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); width: 100%; margin-top: 22px; }

/* ---------- page-level layout blocks ---------- */
.orient-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; align-items: start; }

.feature-card {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 36px; align-items: center;
  color: inherit; text-decoration: none;
}
.feature-card:hover { text-decoration: none; }
.feature-card:hover .feature-cta { text-decoration: underline; text-underline-offset: 3px; }

.detour-box { border: 1px solid var(--rule-dark); background: var(--paper-deep); padding: 48px 48px 44px; }

/* ---------- responsive ---------- */
@media (max-width: 880px) {
  .entry { grid-template-columns: 40px 1fr; }
  .entry .photo, .entry figure { grid-column: 2; }
  .seal-tiers { grid-template-columns: 1fr; }
  .seal-tier { border-right: none; border-bottom: 1px solid var(--rule-dark); }
  .seal-tier:last-child { border-bottom: none; }
  .orient-grid { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 720px) {
  .feature-card { grid-template-columns: 1fr; gap: 20px; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .masthead-inner { flex-direction: column; gap: 10px; align-items: flex-start; }
  .masthead-tagline { flex-direction: column; gap: 2px; }
  .entry { grid-template-columns: 1fr; }
  .entry-no { display: none; }
  .entry .photo, .entry figure { grid-column: auto; }
  .band { padding-left: 20px; padding-right: 20px; }
  .detour-box { padding: 28px 20px 26px; }
}

/* ---------- print: the guide should survive a glovebox ---------- */
@media print {
  body::before { display: none; }
  .skip-link, .masthead-nav, .draft-note { display: none; }
  body { font-size: 11pt; color: #000; background: #fff; }
  a { color: inherit; text-decoration: none; }
  img.photo-img { filter: none; }
  .entry, figure, .seal-tier, .detour-box { break-inside: avoid; }
  .site-footer { margin-top: 40px; }
}
