/*
 * Main Street — community-site theme.
 *
 * The high street as a page: an awning along the top, enamel sign-boards with
 * brass trim, shopfront tiles for businesses, ticket stubs for events and a
 * notice board for news. Loaded after /assets/site.css; styles the shared
 * building blocks only (see ../README.md).
 *
 * Colour. The site's own --primary (Site Settings) is the awning, the buttons
 * and the highlights, so every site keeps its brand. Everything else is the
 * theme's: sign black, enamel, brass, brick, paper.
 *   - Text on paper that uses the brand colour goes through --ms-ink-brand, a
 *     darker mix of --primary, so small orange (or any light brand) text still
 *     reads; the plain --primary is kept for large type and fills.
 *   - Text on sign black is enamel or brass, never --primary: a dark brand
 *     colour (Explore DC's navy) would vanish on it.
 *   - color-mix() has a plain fallback before it for older browsers.
 */

:root {
  --ms-sign: #211e1b;        /* sign black */
  --ms-enamel: #f3ece0;      /* sign enamel, card faces */
  --ms-paper: #e9e4da;       /* page */
  --ms-card: #fbf8f2;        /* notices, forms */
  --ms-brass: #b8913f;
  --ms-brass-dark: #7a5c1d;
  --ms-brick: #7b3a28;
  --ms-street: #1f5130;      /* street-name sign green */
  --ms-rule: #cfc5b4;
  --ms-ink-brand: #6d3a14;   /* fallback for the mix below */
  --ms-ink-brand: color-mix(in srgb, var(--primary) 68%, #000);
  --ms-display: 'Bricolage Grotesque', 'Arial Narrow', 'Helvetica Neue', Arial, sans-serif;
  --ms-body: 'Work Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* base tokens, redefined for this theme */
  --text: #211e1b;
  --text-muted: #6a6055;
  --text-light: #6c6152;
  --border: #d6ccbb;
  --border-warm: #d6ccbb;
  --cream: #f3ece0;
  --gray: #e3dccf;
  --surface: #fbf8f2;
  --radius: 2px;
  --shadow: 0 1px 0 rgba(33, 30, 27, .22), 0 8px 18px -12px rgba(33, 30, 27, .45);
  --shadow-md: 0 2px 0 rgba(33, 30, 27, .3), 0 14px 26px -14px rgba(33, 30, 27, .55);
}

/* ========== PAGE ========== */
body { font-family: var(--ms-body); background: var(--ms-paper); color: var(--text); }
a { color: var(--ms-ink-brand); }
h1, h2, h3, h4 { font-family: var(--ms-display); }
:focus-visible { outline: 3px solid var(--ms-brass); outline-offset: 2px; }

/* The awning: a striped, scalloped band across the top of every page. */
body::before {
  content: ''; display: block; height: 26px;
  background: repeating-linear-gradient(90deg, var(--primary) 0 28px, var(--ms-enamel) 28px 56px);
  -webkit-mask: radial-gradient(14px 10px at 14px 26px, #0000 98%, #000) 0 0 / 28px 100%;
          mask: radial-gradient(14px 10px at 14px 26px, #0000 98%, #000) 0 0 / 28px 100%;
  position: relative; z-index: 60;
}

/* Condensed sign lettering for titles */
.page-title, .page-title-list, .page-title-sm, .notfound-title,
.profile-header h1, .article-header h1, .section-heading, .spotlight-title,
.cta-row h2, .deal-submit-title, .review-form-title, .profile-section-title,
.pp-heading, .nh-heading, .nh-heading-sm {
  font-family: var(--ms-display); font-stretch: 75%; font-weight: 800;
  text-transform: uppercase; letter-spacing: .01em; line-height: 1;
}
.page-title, .page-title-list, .profile-header h1, .article-header h1, .spotlight-title { font-size: clamp(2rem, 4.2vw, 2.9rem); }
.page-title-sm, .notfound-title { font-size: clamp(1.8rem, 3.6vw, 2.4rem); }
.page-intro, .page-intro-lg, .page-intro-sm { color: var(--text-muted); }

/* Section labels become painted headings with a dashed rule */
.sec-label {
  font-family: var(--ms-display); font-stretch: 75%; font-weight: 800;
  font-size: 1.55rem; letter-spacing: .02em; color: var(--ms-sign);
  text-transform: uppercase; gap: 12px; margin-bottom: 18px;
}
.sec-label::after {
  height: 3px; background: repeating-linear-gradient(90deg, var(--ms-sign) 0 10px, transparent 10px 16px);
}
.section-link, .news-read, .story-more, .spotlight-card-more, .guide-link-more {
  font-family: var(--ms-display); font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; font-size: .8rem; color: var(--ms-ink-brand);
}

/* ========== NAV ========== */
.nav-band { background: var(--ms-sign); border-bottom: 3px solid var(--ms-brass); }
.nav-brand-text {
  font-family: var(--ms-display); font-stretch: 75%; font-style: normal; font-weight: 800;
  text-transform: uppercase; letter-spacing: .03em; font-size: 1.45rem; color: var(--ms-enamel);
}
.nav-links a {
  font-family: var(--ms-display); font-weight: 700; font-size: .8rem;
  letter-spacing: .1em; text-transform: uppercase; color: rgba(243, 236, 224, .82);
}
.nav-links a:hover { color: var(--ms-enamel); }
.nav-links a.active { color: var(--ms-enamel); border-bottom-color: var(--ms-brass); }
@media (max-width: 768px) {
  .nav-links { background: var(--ms-sign); border-top: 3px solid var(--ms-brass); }
}

/* ========== HERO: the sign-board ========== */
.hero { background-color: var(--ms-sign); }
.hero-has-image::before {
  background: linear-gradient(to bottom, rgba(33, 30, 27, .15) 0%, rgba(33, 30, 27, .35) 60%, rgba(33, 30, 27, .6) 100%);
}
.hero-body {
  max-width: 640px;
  margin: 18px 0 0 max(16px, calc((100% - 1100px) / 2 + 24px));
  padding: 24px 26px 26px;
  background: var(--ms-sign);
  border: 3px solid var(--ms-brass);
  box-shadow: inset 0 0 0 4px var(--ms-sign), inset 0 0 0 5px rgba(184, 145, 63, .55), 0 18px 40px -18px rgba(0, 0, 0, .7);
}
.hero-logo-img { height: 72px; }
.hero-logo-initial { background: var(--ms-brick); border-radius: 0; color: var(--ms-enamel); }
.hero-eyebrow { color: var(--ms-brass); letter-spacing: .18em; font-size: .72rem; }
.hero h1 {
  font-family: var(--ms-display); font-stretch: 75%; font-weight: 800; text-transform: uppercase;
  color: var(--ms-enamel); font-size: clamp(2.3rem, 6vw, 3.9rem); line-height: .92; letter-spacing: .01em;
  max-width: none;
}
.hero-tagline { color: rgba(243, 236, 224, .82); }
.hero-search { border-radius: 0; box-shadow: none; max-width: none; }
.hero-search input { border-radius: 0; background: var(--ms-enamel); font-family: var(--ms-body); }
.hero-search button {
  border-radius: 0; background: var(--primary);
  font-family: var(--ms-display); font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
}

/* ========== SHOPFRONT TILES (businesses) ========== */
.spot-card, .biz-card {
  position: relative; background: var(--ms-enamel); border-radius: 0; border: 0;
  box-shadow: 0 2px 0 var(--ms-sign), 0 10px 20px -14px rgba(33, 30, 27, .6);
}
.spot-card:hover, .biz-card:hover { box-shadow: 0 3px 0 var(--ms-sign), 0 14px 26px -14px rgba(33, 30, 27, .7); }
.spot-card::before, .biz-card::before {          /* the shop's own little awning */
  content: ''; display: block; height: 12px;
  background: repeating-linear-gradient(90deg, var(--primary) 0 12px, var(--ms-enamel) 12px 24px);
}
.spot-card-photo, .biz-card-photo {
  width: calc(100% - 12px); margin: 6px 6px 0; height: 132px; border: 2px solid var(--ms-sign);
}
.spot-card-initial, .biz-card-initial {          /* no photo: a painted sign */
  width: calc(100% - 12px); margin: 6px 6px 0; height: 132px; border: 2px solid var(--ms-sign);
  background: var(--ms-brick); color: var(--ms-enamel);
  font-family: var(--ms-display); font-stretch: 75%; font-size: 3.4rem;
  text-shadow: 3px 3px 0 var(--ms-sign);
}
.spot-card-name, .biz-card .card-body h3 {
  font-family: var(--ms-display); font-weight: 800; font-size: .98rem; line-height: 1.15;
}
.spot-cat, .biz-card .biz-category {
  background: transparent; color: var(--text-muted); border-radius: 0; padding: 0;
  font-size: .7rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
}
.stars-sm, .biz-card .stars, .review-item-stars, .nh-review-stars, .featured-biz .fb-rating { color: var(--ms-brass-dark); }

/* "Featured": a brass seal */
.badge-featured, .nh-badge-featured {
  display: inline-grid; place-items: center; width: 58px; height: 58px; padding: 0;
  border-radius: 50%; background: var(--ms-brass); color: var(--ms-sign);
  font-family: var(--ms-display); font-weight: 800; font-size: .56rem; letter-spacing: .1em; text-transform: uppercase;
  box-shadow: 0 0 0 3px var(--ms-enamel), 0 0 0 4px var(--ms-sign);
  transform: rotate(-12deg);
}
.biz-card .badge-featured { position: absolute; top: 4px; right: 4px; z-index: 2; }

/* ========== CARDS (news, events, generic) ========== */
.card, .news-featured-card, .deal-card, .pp-card, .story-card, .form-panel, .event-facts {
  border-radius: 0; border: 0; background: var(--ms-card);
  box-shadow: var(--shadow);
}
.card:hover, .news-featured-card:hover, .deal-card:hover { box-shadow: var(--shadow-md); }
.card-body h3, .news-featured-body h3, .deal-title, .pp-title, .story-title, .offer-title {
  font-family: var(--ms-display); font-weight: 700;
}
.card-img, .news-featured-img, .article-image, .story-img, .profile-photos img, .profile-map {
  border-radius: 0;
}

/* The notice board: news pinned up, slightly askew (listing cards and the
   home page's lead story) */
.card-news, .news-featured-card { position: relative; overflow: visible; background: #fffdf8; padding: 8px 8px 0; }
.card-news::before, .news-featured-card::before {
  content: ''; position: absolute; top: -7px; left: 50%; translate: -50% 0; z-index: 2;
  width: 14px; height: 14px; border-radius: 50%; background: var(--primary); box-shadow: 0 2px 0 var(--ms-brick);
}
.card-grid > .card-news:nth-child(odd) { transform: rotate(-.6deg); }
.card-grid > .card-news:nth-child(even) { transform: rotate(.5deg); }
.card-grid > .card-news:hover { transform: none; }
.card-news .card-body .meta { text-transform: uppercase; letter-spacing: .06em; font-size: .74rem; }
.news-list-item { border-top: 2px dashed var(--ms-rule); }
.news-list-thumb, .news-list-thumb-placeholder { border-radius: 0; border: 2px solid var(--ms-sign); }
.news-cat-badge { border-radius: 0; background: var(--ms-sign); color: var(--ms-enamel); }
.news-meta { text-transform: uppercase; letter-spacing: .06em; font-size: .74rem; }

/* Ticket stubs: events (home list and listing cards) */
.event-list-item {
  background: var(--ms-enamel); padding: 10px 12px; margin-bottom: 10px; border-bottom: 0; align-items: center;
  -webkit-mask: radial-gradient(7px at 70px 0, #0000 98%, #000) top / 100% 51% no-repeat,
                radial-gradient(7px at 70px 100%, #0000 98%, #000) bottom / 100% 51% no-repeat;
          mask: radial-gradient(7px at 70px 0, #0000 98%, #000) top / 100% 51% no-repeat,
                radial-gradient(7px at 70px 100%, #0000 98%, #000) bottom / 100% 51% no-repeat;
}
.event-date-box {
  width: 52px; height: auto; border-radius: 0; background: transparent; color: var(--ms-sign);
  border-right: 2px dashed var(--text-light); padding-right: 8px; margin-right: 2px;
}
.event-date-month { color: var(--ms-ink-brand); letter-spacing: .12em; font-family: var(--ms-display); }
.event-date-day { font-family: var(--ms-display); font-stretch: 75%; font-size: 1.9rem; }
.event-list-title { font-family: var(--ms-display); font-weight: 700; }
.card-event { background: var(--ms-enamel); }
.card-event .card-body { border-top: 2px dashed var(--text-light); margin: 0 10px; padding-inline: 8px; }
.card-event .card-body .meta {
  font-family: var(--ms-display); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ms-ink-brand);
}

/* ========== OFFERS: the window display ========== */
.offer-card { border: 3px solid var(--ms-brass); border-radius: 0; background: var(--ms-enamel); box-shadow: 0 2px 0 var(--ms-sign); }
.offer-photo { border-right: 3px solid var(--ms-brass); }
.offer-badge, .deal-badge, .deal-row-badge, .pp-badge, .story-badge {
  border-radius: 0; background: var(--primary); color: #fff;
  font-family: var(--ms-display); font-weight: 800; letter-spacing: .08em;
  clip-path: polygon(0 0, 100% 0, 92% 50%, 100% 100%, 0 100%);
  padding-right: 18px;
}
.offer-biz a, .deal-biz, .deal-biz a, .story-biz, .spotlight-card-biz, .text-accent { color: var(--ms-ink-brand); }
.offer-cta, .deal-cta {
  border-radius: 0; background: var(--primary);
  font-family: var(--ms-display); font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
}
.offer-code, .deal-code, .deal-row-code, .pp-code {
  border-radius: 0; background: var(--ms-card); border: 2px dashed var(--ms-brass); color: var(--ms-sign);
}
.deal-row { border-radius: 0; border: 2px dashed var(--ms-rule); background: var(--ms-card); }
.deal-row-icon { border-radius: 0; background: var(--ms-sign); color: var(--ms-brass); }

/* ========== STREET SIGNS: neighbourhood and guide links ========== */
.chip-link, .nh-pill {
  border-radius: 3px; border: 2px solid #fff; outline: 1px solid var(--ms-street);
  background: var(--ms-street); color: #fff;
  font-family: var(--ms-display); font-weight: 700; letter-spacing: .05em; text-transform: uppercase; font-size: .8rem;
}
.chip-link:hover, .nh-pill:hover { background: #173f25; color: #fff; text-decoration: none; }
.chip-count { color: rgba(255, 255, 255, .7); opacity: 1; }
.guide-link { border-radius: 0; }

/* ========== BUTTONS, FILTERS, FORMS ========== */
.btn { border-radius: 0; font-family: var(--ms-display); font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.btn-accent, .btn-secondary, .btn-primary { background: var(--primary); color: #fff; }
.btn-outline { border-color: var(--ms-sign); color: var(--ms-sign); }
.btn-outline-white { border-color: var(--ms-brass); color: var(--ms-enamel); }
.filter-btn, .nh-filter-btn, .nh-view-btn, .pagination a, .pagination span {
  border-radius: 0; border-color: var(--ms-rule); background: var(--ms-card);
  font-family: var(--ms-display); font-weight: 700; letter-spacing: .05em;
}
.filter-btn:hover, .filter-btn.active, .nh-filter-btn:hover, .nh-filter-btn.active, .nh-view-btn.active,
.pagination a:hover, .pagination .current { background: var(--ms-sign); border-color: var(--ms-sign); color: var(--ms-enamel); }
.search-bar { border-radius: 0; box-shadow: none; }
.search-bar input { border-radius: 0; border: 2px solid var(--ms-sign); border-right: 0; background: var(--ms-card); }
.search-bar button { background: var(--ms-sign); color: var(--ms-enamel); font-family: var(--ms-display); font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.form-control { border-radius: 0; border: 2px solid var(--ms-rule); background: var(--ms-card); }
.form-control:focus { border-color: var(--ms-sign); }
.alert { border-radius: 0; }

/* ========== SECTIONS ========== */
.section-white { background: var(--ms-paper); }
.section-cream { background: var(--ms-enamel); }
.section-dark {
  background: var(--ms-sign); color: var(--ms-enamel);
  border-top: 3px solid var(--ms-brass); border-bottom: 3px solid var(--ms-brass);
}
.section-dark .cta-row p { opacity: .8; }

/* Featured business, business spotlight story */
.featured-biz-photo { border-radius: 0; border: 3px solid var(--ms-sign); }
.featured-biz h4 { font-family: var(--ms-display); font-weight: 800; }
.story-card { border-radius: 0; }
.story-media { border-right: 3px solid var(--ms-brass); }

/* ========== PROFILE, ARTICLE, SPOTLIGHT, GUIDES ========== */
.profile-header { border-bottom: 3px solid var(--ms-sign); padding-bottom: 14px; }
.profile-photos img { border: 2px solid var(--ms-sign); }
.profile-hours dt { font-family: var(--ms-display); }
.review-item { border-bottom: 2px dashed var(--ms-rule); }
.review-form { border-radius: 0; background: var(--ms-enamel); border: 2px solid var(--ms-rule); }
.article-image { border: 3px solid var(--ms-sign); }
.spotlight-badge { border-radius: 0; background: var(--ms-brass); color: var(--ms-sign); }
.spotlight-biz-card { border-radius: 0; background: var(--ms-enamel); border: 3px solid var(--ms-brass); }
.nh-stat { border-radius: 0; background: var(--ms-sign); color: var(--ms-enamel); }
.nh-stat-num { font-family: var(--ms-display); font-stretch: 75%; color: var(--ms-brass); }
.nh-stat-label { color: rgba(243, 236, 224, .75); }
.nh-review { border-radius: 0; }
.nh-newsletter, .deal-submit-section { border-radius: 0; background: var(--ms-sign); color: var(--ms-enamel); }
.nh-newsletter h3 { font-family: var(--ms-display); font-stretch: 75%; text-transform: uppercase; color: var(--ms-enamel); }
.nh-nl-row input { border-radius: 0; }
.nh-nl-row button { border-radius: 0; background: var(--primary); font-family: var(--ms-display); text-transform: uppercase; letter-spacing: .08em; }

/* ========== FOOTER: the shop sign at the bottom ========== */
.site-footer { background: var(--ms-sign); border-top: 3px solid var(--ms-brass); color: rgba(243, 236, 224, .72); }
.footer-heading { font-family: var(--ms-display); font-stretch: 75%; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ms-enamel); }
.footer-links-list a { color: rgba(243, 236, 224, .72); }
.footer-links-list a:hover { color: var(--ms-brass); }
.footer-nl-fields input { border-radius: 0; }
.footer-nl-fields button { border-radius: 0; background: var(--primary); font-family: var(--ms-display); letter-spacing: .08em; text-transform: uppercase; }
.notice-ok { color: #9fd3a6; }

@media (max-width: 768px) {
  .hero-body { margin: 12px 16px 0; padding: 20px 18px; }
  .spot-card-photo, .spot-card-initial, .biz-card-photo, .biz-card-initial { height: 112px; }
  .card-grid > .card-news:nth-child(n) { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .card-grid > .card-news:nth-child(n), .badge-featured, .nh-badge-featured { transform: none; }
}

/* ========== HOME: rotating hero + modules ========== */
/* The sign-board sits in the hero's grid rather than centring itself */
.home-hero-inner > .hero-body { margin: 18px 0 0; padding: 24px 26px 26px; max-width: 640px; }
.home-hero-inner.has-feature > .hero-body { max-width: none; }
/* The feature panel: a shop window with brass trim */
.hero-feature {
  border-radius: 0; background: var(--ms-paper);
  border: 3px solid var(--ms-brass); box-shadow: 0 2px 0 var(--ms-sign), 0 18px 40px -18px rgba(0, 0, 0, .7);
}
.hero-feature-label {
  font-family: var(--ms-display); font-stretch: 75%; font-weight: 800; font-size: .95rem;
  letter-spacing: .1em; color: var(--ms-ink-brand);
}
.hero-feature .event-list-item, .event-grid > .event-list-item { padding-top: 10px; }
.hero-feature .event-list-item:last-of-type { margin-bottom: 0; }
/* Category shortcuts stay street signs on the dark board */
.hero-shortcuts .chip-link { background: var(--ms-street); border-color: #fff; color: #fff; padding: 6px 12px; font-size: .74rem; }
.hero-shortcuts .chip-link:hover { background: #173f25; }
/* Tiles: the brass seal hangs off the top corner, as on listing cards */
.spot-card .badge-featured { top: 4px; right: 4px; left: auto; }
.hero-feature-tiles .badge-featured { width: 46px; height: 46px; font-size: .5rem; }
.biz-strip .spot-card { box-shadow: 0 2px 0 var(--ms-sign), 0 10px 20px -14px rgba(33, 30, 27, .6); }
.biz-strip .spot-card:hover { box-shadow: 0 3px 0 var(--ms-sign), 0 14px 26px -14px rgba(33, 30, 27, .7); }
a.deal-row:hover { border-color: var(--primary); }

@media (max-width: 768px) {
  .home-hero-inner > .hero-body { margin: 12px 0 0; padding: 20px 18px; }
}
