/* ============================================================
   BOWERS MILL — site styles
   Faithful to the original WordPress (Twenty Twenty-Two) look:
   black header with logo + italic serif title, white body,
   simple centred column, rounded photos. Modernised nav with
   proper dropdown sub-menus.
   ============================================================ */

@import url('fonts/fonts.css');

:root {
  --bg: #ffffff;
  --bg-soft: #f7f6f3;
  --text: #1d1d1d;
  --muted: #5c5c5c;
  --line: #e4e1db;
  --header: #000000;
  --header-text: #ffffff;
  --radius: 8px;
  --serif: 'Newsreader', 'Iowan Old Style', Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --wrap: 68rem;
  --col: 44rem;
  --pad: clamp(1.1rem, 4vw, 2.2rem);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--text); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: #000; text-decoration-thickness: 2px; }

::selection { background: #000; color: #fff; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: var(--pad); }
.col  { max-width: var(--col); margin-inline: auto; }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; }

/* ============ HEADER ============ */
.site-head {
  background: var(--header);
  color: var(--header-text);
}
.site-head .wrap {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  padding-block: 1.1rem;
  flex-wrap: wrap;
}
.site-logo { flex: none; }
.site-logo img { width: 58px; height: 58px; border-radius: 4px; }
.site-title {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.5rem, 4vw, 1.9rem);
  line-height: 1;
}
.site-title a { color: var(--header-text); text-decoration: none; }

/* ---- nav ---- */
.site-nav { margin-left: auto; }
.site-nav ul { list-style: none; display: flex; align-items: center; gap: .2rem; }
.site-nav li { position: relative; }
.site-nav a {
  display: block;
  color: var(--header-text);
  text-decoration: none;
  font-size: .98rem;
  padding: .55rem .8rem;
  border-radius: 4px;
  white-space: nowrap;
}
.site-nav > ul > li > a:hover { background: rgba(255,255,255,.14); }
.site-nav > ul > li > a[aria-current="page"],
.site-nav > ul > li.on > a { text-decoration: underline; text-underline-offset: 5px; }
.site-nav .has-sub > a::after {
  content: '';
  display: inline-block;
  margin-left: .45rem;
  vertical-align: .18em;
  border: 4px solid transparent;
  border-top-color: currentColor;
  border-bottom-width: 0;
}
.site-nav .sub {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 90;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  min-width: 13.5rem;
  background: #fff;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 10px 28px rgba(0,0,0,.16);
  padding: .35rem;
}
.site-nav .has-sub:hover .sub,
.site-nav .has-sub:focus-within .sub,
.site-nav .has-sub.open .sub { display: flex; }
.site-nav .sub a {
  color: var(--text);
  font-size: .95rem;
  padding: .5rem .7rem;
  border-radius: 4px;
  white-space: normal;
}
.site-nav .sub a:hover { background: var(--bg-soft); }
.site-nav .sub a[aria-current="page"] { font-weight: 600; text-decoration: underline; }
.site-nav .sub .sub-label {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted);
  padding: .5rem .7rem .15rem;
}

.nav-burger {
  display: none;
  margin-left: auto;
  background: none;
  border: 1px solid rgba(255,255,255,.4);
  border-radius: 4px;
  color: #fff;
  font: inherit;
  font-size: .9rem;
  padding: .45rem .8rem;
  cursor: pointer;
}

@media (max-width: 860px) {
  .nav-burger { display: block; }
  .site-nav { display: none; width: 100%; margin: .6rem 0 0; }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .site-nav .sub {
    display: flex;
    position: static;
    background: none;
    border: none;
    box-shadow: none;
    padding: 0 0 .3rem .9rem;
  }
  .site-nav .sub a { color: rgba(255,255,255,.85); }
  .site-nav .sub a:hover { background: rgba(255,255,255,.12); }
  .site-nav .sub .sub-label { color: rgba(255,255,255,.5); }
  .site-nav .has-sub > a::after { display: none; }
  .site-nav .has-sub > a { pointer-events: none; opacity: .75; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; }
}

/* ============ HERO ============ */
.hero { padding-top: clamp(1.4rem, 4vw, 2.6rem); }
.hero-media {
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
}
.hero-media.video { aspect-ratio: 16 / 9; position: relative; }
.hero-media.video iframe,
.hero-media.video video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0;
  object-fit: cover;
}
.hero-media img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.hero-caption {
  font-size: .85rem;
  color: var(--muted);
  margin-top: .5rem;
}
.hero-intro {
  margin-top: clamp(1.2rem, 3vw, 1.8rem);
  font-size: 1.08rem;
}
.hero-intro p + p { margin-top: 1rem; }

/* ============ SECTIONS ============ */
.sect { padding-block: clamp(1.8rem, 4.5vw, 3rem); }
.sect-head { margin-bottom: clamp(1rem, 2.5vw, 1.6rem); }
.sect-head h2 { font-size: clamp(1.45rem, 3.2vw, 1.9rem); }
.sect-head .no { display: none; }
.sect-alt { background: var(--bg-soft); }

/* ============ PROSE ============ */
.prose { max-width: var(--col); }
.prose > * + * { margin-top: 1rem; }
.prose h2 { font-size: 1.4rem; margin-top: 2rem; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.15rem; margin-top: 1.5rem; }
.prose ul, .prose ol { padding-left: 1.4rem; }
.prose li + li { margin-top: .3rem; }
.prose blockquote {
  border-left: 4px solid var(--line);
  padding: .3rem 0 .3rem 1.1rem;
  color: var(--muted);
}
.prose img { border-radius: var(--radius); }
.prose strong { font-weight: 600; }
.prose .md-fig { margin: 1.4rem 0; }
.prose .md-fig img { width: 100%; }
.prose .md-fig figcaption { font-size: .85rem; color: var(--muted); margin-top: .45rem; }

/* ============ CARDS (directory) ============ */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16.5rem, 1fr));
  gap: 1.1rem;
}
.tcard {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  position: relative;
  transition: box-shadow .15s ease, transform .15s ease;
}
.tcard:hover { box-shadow: 0 8px 22px rgba(0,0,0,.09); transform: translateY(-2px); }
.tcard-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .6rem;
  padding: .6rem .95rem 0;
}
.tcard-unit {
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #fff;
  background: #000;
  border-radius: 3px;
  padding: .2rem .5rem;
}
.tcard-cat {
  font-size: .72rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: right;
}
.tcard-body { padding: .7rem .95rem 1rem; flex: 1; }
.tcard h3 { font-size: 1.25rem; margin-bottom: .3rem; }
.tcard h3 a { text-decoration: none; }
.tcard h3 a::after { content: ''; position: absolute; inset: 0; }
.tcard p { font-size: .92rem; color: var(--muted); }
.tcard-foot {
  border-top: 1px solid var(--line);
  padding: .5rem .95rem;
  font-size: .8rem;
  color: var(--muted);
}

/* directory filters */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 1.4rem;
  align-items: center;
}
.chip {
  font: inherit;
  font-size: .85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  padding: .35rem .95rem;
  cursor: pointer;
  transition: background .12s, border-color .12s;
}
.chip:hover { border-color: #999; }
.chip[aria-pressed="true"] { background: #000; border-color: #000; color: #fff; }
.filters input[type="search"] {
  font: inherit;
  font-size: .92rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .4rem .9rem;
  min-width: 12rem;
  margin-left: auto;
}
.filters input[type="search"]:focus { outline: 2px solid #000; outline-offset: 1px; }
.dir-empty {
  display: none;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 1.6rem;
  text-align: center;
  color: var(--muted);
}

/* ============ BUSINESS DETAIL ============ */
.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: .9rem; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.biz-head { margin-bottom: 1.4rem; }
.biz-title { font-size: clamp(1.8rem, 4.5vw, 2.5rem); }
.biz-tagline { color: var(--muted); margin-top: .3rem; font-size: 1.05rem; }
.biz-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(15rem, 1fr);
  gap: 2rem;
  align-items: start;
}
@media (max-width: 760px) { .biz-grid { grid-template-columns: 1fr; } }
.biz-photo { border-radius: var(--radius); overflow: hidden; margin-bottom: 1.2rem; }
.factbox {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
}
.factbox-head {
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  background: #000;
  color: #fff;
  padding: .55rem .95rem;
}
.factbox dl { padding: .9rem .95rem; }
.factbox dt {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: .7rem;
}
.factbox dt:first-child { margin-top: 0; }
.factbox dd { margin: 0; word-break: break-word; }
.factbox .factbox-map {
  display: block;
  border-top: 1px solid var(--line);
  padding: .6rem .95rem;
  font-size: .85rem;
  text-decoration: none;
  background: var(--bg-soft);
}
.factbox .factbox-map:hover { text-decoration: underline; }

/* ============ MILL MAP ============ */
.map-wrap {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
  user-select: none;
}
.map-wrap img { width: 100%; }
.map-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  border: 2px solid #fff;
  background: #000;
  color: #fff;
  font-family: var(--sans);
  font-weight: 700;
  font-size: .8rem;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,.5);
  transition: transform .12s, background .12s, color .12s;
  padding: 0;
}
.map-pin:hover { transform: translate(-50%, -50%) scale(1.15); }
.map-pin[aria-pressed="true"] {
  background: #fff;
  color: #000;
  transform: translate(-50%, -50%) scale(1.25);
  z-index: 3;
}
.map-note { margin-top: .7rem; font-size: .9rem; color: var(--muted); }
.map-legend {
  margin-top: 1.4rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: .55rem;
}
.map-leg {
  display: flex;
  align-items: center;
  gap: .7rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: .5rem .7rem;
  cursor: pointer;
  font: inherit;
  font-size: .95rem;
  text-align: left;
  transition: border-color .12s, background .12s;
}
.map-leg:hover { border-color: #999; }
.map-leg[aria-pressed="true"] { border-color: #000; background: var(--bg-soft); }
.map-leg .n {
  flex: none;
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 50%;
  background: #000;
  color: #fff;
  font-weight: 700;
  font-size: .72rem;
  display: grid;
  place-items: center;
}
.map-leg .u {
  margin-left: auto;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
  text-align: right;
}
.map-card {
  display: none;
  margin-top: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 8px 22px rgba(0,0,0,.09);
  padding: 1rem 1.2rem;
}
.map-card.open { display: block; }
.map-card h3 { font-size: 1.3rem; }
.map-card .cat {
  font-size: .75rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--muted);
}
.map-card p { margin-top: .35rem; color: var(--muted); font-size: .95rem; }
.map-card a { font-size: .9rem; }

/* ============ GALLERY ============ */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16.5rem, 1fr));
  gap: 1.1rem;
}
.gallery figure { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: #fff; }
.gallery img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.gallery figcaption {
  font-size: .85rem;
  color: var(--muted);
  padding: .55rem .8rem;
}

/* ============ STORY SPLIT ============ */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 2.6rem);
  align-items: center;
}
@media (max-width: 760px) { .split { grid-template-columns: 1fr; } }
.split .photo { border-radius: var(--radius); overflow: hidden; }

/* ============ ARTICLE CARDS ============ */
.article-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); gap: 1.1rem; }
.acard {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem 1rem;
  transition: box-shadow .15s, transform .15s;
}
.acard:hover { box-shadow: 0 8px 22px rgba(0,0,0,.09); transform: translateY(-2px); }
.acard .kicker { margin-bottom: .4rem; }
.acard h3 { font-size: 1.3rem; }
.acard h3 a { text-decoration: none; }
.acard h3 a::after { content: ''; position: absolute; inset: 0; }
.acard p { margin-top: .45rem; font-size: .92rem; color: var(--muted); }

.kicker {
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ============ ARTICLE PAGE ============ */
.article-head { max-width: var(--col); margin: 0 auto clamp(1.4rem, 3.5vw, 2.2rem); }
.article-head h1 { font-size: clamp(1.9rem, 5vw, 2.7rem); }
.article-head .sub { font-family: var(--serif); font-style: italic; font-size: 1.15rem; color: var(--muted); margin-top: .5rem; }
.article-head .rules { margin-top: 1.2rem; border-bottom: 1px solid var(--line); }
.prose-article { margin-inline: auto; }

/* ============ PAGE HEAD ============ */
.page-head { margin-bottom: clamp(1.2rem, 3vw, 1.8rem); }
.page-head h1 { font-size: clamp(1.9rem, 5vw, 2.6rem); }
.page-head .lede { color: var(--muted); margin-top: .5rem; font-size: 1.05rem; }

/* ============ BUTTONS ============ */
.btn {
  display: inline-block;
  font: inherit;
  font-size: .95rem;
  font-weight: 500;
  text-decoration: none;
  color: #fff;
  background: #000;
  border: 1px solid #000;
  border-radius: 6px;
  padding: .6rem 1.3rem;
  cursor: pointer;
  transition: background .14s, color .14s;
}
.btn:hover { background: #fff; color: #000; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: #000; background: #fff; }
.btn-ink { background: #000; }
.band-more { margin-top: 1.5rem; }

/* ============ MISC ============ */
.callout {
  border: 1px solid var(--line);
  border-left: 4px solid #000;
  border-radius: 6px;
  background: var(--bg-soft);
  padding: 1rem 1.2rem;
  margin-top: 1.4rem;
}
.hr-orn { border: none; border-top: 1px solid var(--line); margin: clamp(1.6rem, 4vw, 2.4rem) 0; }

/* ============ FOOTER ============ */
.footer {
  margin-top: clamp(2.2rem, 6vw, 3.5rem);
  background: var(--header);
  color: rgba(255,255,255,.82);
}
.footer a { color: #fff; }
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 2rem;
  padding-block: clamp(1.8rem, 4.5vw, 2.6rem);
}
.footer h4 {
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,255,255,.6);
  margin-bottom: .7rem;
}
.footer ul { list-style: none; }
.footer li { margin-bottom: .35rem; }
.footer li a { text-decoration: none; }
.footer li a:hover { text-decoration: underline; }
.footer p { font-size: .95rem; }
.footer-mark {
  display: flex;
  align-items: center;
  gap: .7rem;
  margin-bottom: .7rem;
}
.footer-mark img { width: 44px; height: 44px; border-radius: 4px; }
.footer-mark span {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.3rem;
  color: #fff;
}
.footer-base {
  border-top: 1px solid rgba(255,255,255,.18);
  padding-block: .9rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: .82rem;
  color: rgba(255,255,255,.55);
}
.footer-base a { color: inherit; }

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