/* =============================================
   THE NOTCH REPORT — styles.css
   All styles shared across every page.
   ============================================= */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&family=Source+Sans+Pro:wght@400;600&display=swap');

/* --- CSS Custom Properties --- */
:root {
  --navy:   #0d1b2a;
  --green:  #4a7c2f;
  --gold:   #c9a84c;
  --cream:  #f4f0e8;
  --stone:  #8c7b6b;
  --white:  #ffffff;

  --max-width: 1100px;
  --radius: 4px;
  --shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  --transition: 0.15s;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Source Sans Pro', sans-serif;
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.7;
  background-color: var(--cream);
  color: var(--navy);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--navy);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--green);
}

ul {
  list-style: none;
}

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  line-height: 1.25;
  color: var(--navy);
}

h1 { font-size: 1.8rem; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.3rem; }

.section-label {
  font-family: 'Source Sans Pro', sans-serif;
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--green);
}

.meta {
  font-size: 0.85rem;
  color: var(--stone);
}

/* --- Layout Container --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* =============================================
   NAVIGATION
   ============================================= */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--navy);
  width: 100%;
  border-bottom: 2px solid var(--gold);
}

.site-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

/* Masthead */
.masthead {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.masthead-logo {
  height: 44px;
  width: auto;
  flex-shrink: 0;
}

.masthead-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.masthead-the {
  font-family: 'Source Sans Pro', sans-serif;
  font-weight: 600;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--green);
}

.masthead-name {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--white);
  white-space: nowrap;
}

.masthead-tagline {
  font-size: 0.72rem;
  color: var(--stone);
  letter-spacing: 0.02em;
  margin-top: 1px;
}

/* Nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-links a {
  font-family: 'Source Sans Pro', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--white);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius);
  border-bottom: 2px solid transparent;
  transition: color var(--transition), border-color var(--transition);
}

.nav-links a:hover {
  color: var(--gold);
}

.nav-links a.active {
  border-bottom-color: var(--gold);
  color: var(--white);
}

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 26px;
  height: 18px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.nav-hamburger span {
  display: block;
  height: 2px;
  width: 100%;
  background-color: var(--white);
  border-radius: 2px;
  transition: opacity var(--transition);
}

/* Mobile nav dropdown */
.nav-mobile {
  display: none;
  flex-direction: column;
  background-color: var(--navy);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.5rem 0 1rem;
}

.nav-mobile.open {
  display: flex;
}

.nav-mobile a {
  font-family: 'Source Sans Pro', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--white);
  padding: 0.65rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  transition: color var(--transition);
}

.nav-mobile a:hover,
.nav-mobile a.active {
  color: var(--gold);
}

/* =============================================
   FILTER BAR
   ============================================= */
.filter-bar {
  background-color: var(--cream);
  border-bottom: 2px solid var(--gold);
  padding: 0.75rem 0;
}

.filter-bar .container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.filter-bar label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--stone);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.filter-bar select {
  font-family: 'Source Sans Pro', sans-serif;
  font-size: 0.875rem;
  color: var(--navy);
  background-color: var(--white);
  border: 1px solid #d4c9b8;
  border-radius: var(--radius);
  padding: 0.35rem 2rem 0.35rem 0.65rem;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%238c7b6b'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.6rem center;
  cursor: pointer;
}

.filter-bar select:focus {
  outline: 2px solid var(--green);
  outline-offset: 1px;
}

.filter-clear {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--stone);
  text-decoration: underline;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  margin-left: 0.25rem;
  transition: color var(--transition);
}

.filter-clear:hover {
  color: var(--green);
}

/* =============================================
   FEATURED LEAD STORY
   ============================================= */
.featured-section {
  padding: 2rem 0 0;
}

.featured-card {
  display: block;
  background-color: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border-left: 5px solid var(--gold);
  padding: 1.75rem 2rem 1.5rem;
  text-decoration: none;
  color: inherit;
  transition: box-shadow var(--transition);
}

.featured-card:hover {
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.13);
  color: inherit;
}

.featured-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.featured-label {
  font-family: 'Source Sans Pro', sans-serif;
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold);
}

.featured-card h2 {
  font-size: 1.75rem;
  line-height: 1.2;
  margin-bottom: 0.75rem;
  color: var(--navy);
}

.featured-card:hover h2 {
  color: var(--green);
}

.featured-excerpt {
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--navy);
  max-width: 800px;
  margin-bottom: 0.85rem;
}

.featured-date {
  font-size: 0.85rem;
  color: var(--stone);
}

@media (max-width: 499px) {
  .featured-card {
    padding: 1.25rem 1.1rem 1rem;
    border-left-width: 4px;
  }

  .featured-card h2 {
    font-size: 1.35rem;
  }

  .featured-excerpt {
    font-size: 0.95rem;
  }
}

/* =============================================
   STORY FEED
   ============================================= */
.feed-section {
  padding: 2.5rem 0 3rem;
}

.feed-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  gap: 1rem;
}

.feed-header h1 {
  font-size: 1.2rem;
}

#story-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

/* Story Card */
.story-card {
  background-color: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  cursor: pointer;
  transition: box-shadow var(--transition);
  text-decoration: none;
  color: inherit;
}

.story-card:hover {
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.12);
  color: inherit;
}

.story-card-tags {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tag-town {
  font-family: 'Source Sans Pro', sans-serif;
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--white);
  background-color: var(--green);
  padding: 0.15rem 0.5rem;
  border-radius: 2px;
}

.tag-topic {
  font-family: 'Source Sans Pro', sans-serif;
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--stone);
  background-color: var(--cream);
  padding: 0.15rem 0.5rem;
  border-radius: 2px;
  border: 1px solid #d4c9b8;
}

.story-card h3 {
  font-size: 1.05rem;
  line-height: 1.3;
  color: var(--navy);
  margin-top: 0.15rem;
}

.story-card:hover h3 {
  color: var(--green);
}

.story-card-excerpt {
  font-size: 0.9rem;
  color: var(--navy);
  line-height: 1.55;
  flex: 1;
}

.story-card-date {
  font-size: 0.8rem;
  color: var(--stone);
  margin-top: 0.25rem;
}

/* Load More */
.load-more-wrap {
  text-align: center;
  margin-top: 2.5rem;
}

.btn-load-more {
  font-family: 'Source Sans Pro', sans-serif;
  font-weight: 600;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--navy);
  background-color: var(--white);
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  padding: 0.65rem 2rem;
  cursor: pointer;
  transition: background-color var(--transition), color var(--transition);
}

.btn-load-more:hover {
  background-color: var(--gold);
  color: var(--white);
}

.btn-load-more:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* No results message */
.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem 1rem;
  color: var(--stone);
  font-size: 1rem;
}

/* =============================================
   STORY PAGE
   ============================================= */
.story-page {
  padding: 2.5rem 0 4rem;
}

.story-wrapper {
  max-width: 720px;
  margin: 0 auto;
}

.story-meta-top {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.story-headline {
  font-size: 1.8rem;
  line-height: 1.2;
  margin-bottom: 0.6rem;
}

.story-dateline {
  font-size: 0.85rem;
  color: var(--stone);
  margin-bottom: 1.75rem;
}

.story-body {
  font-size: 1.1rem;
  line-height: 1.75;
  color: var(--navy);
}

.story-body p {
  margin-bottom: 1.2em;
}

.story-body a {
  text-decoration: underline;
}

.story-source {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid #d4c9b8;
  font-size: 0.85rem;
  color: var(--stone);
}

/* Related stories */
.related-stories {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid var(--gold);
}

.related-stories h2 {
  font-size: 1.1rem;
  margin-bottom: 1.25rem;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

/* =============================================
   TOWN PAGE
   ============================================= */
.town-page {
  padding: 2.5rem 0 4rem;
}

.town-header {
  margin-bottom: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 2px solid var(--gold);
}

.town-header h1 {
  font-size: 1.8rem;
  margin-bottom: 0.35rem;
}

.town-subhead {
  font-size: 1rem;
  color: var(--stone);
  margin-bottom: 0.4rem;
}

.town-region {
  font-size: 0.85rem;
  color: var(--stone);
}

/* =============================================
   ABOUT PAGE
   ============================================= */
.about-page {
  padding: 2.5rem 0 4rem;
}

.about-wrapper {
  max-width: 720px;
  margin: 0 auto;
}

.about-page h1 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}

.about-page .section-label {
  margin-bottom: 1rem;
  display: block;
}

.about-section {
  margin-bottom: 3rem;
}

.about-section h2 {
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--gold);
}

.about-section p {
  font-size: 1.05rem;
  line-height: 1.75;
  margin-bottom: 1em;
  color: var(--navy);
}

.about-section a {
  text-decoration: underline;
  color: var(--navy);
}

.about-section a:hover {
  color: var(--green);
}

/* =============================================
   ADVERTISE PAGE
   ============================================= */
.advertise-page {
  padding: 2.5rem 0 4rem;
}

.advertise-wrapper {
  max-width: 720px;
  margin: 0 auto;
}

.advertise-page h1 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

.advertise-page p {
  font-size: 1.05rem;
  line-height: 1.75;
  margin-bottom: 1.25em;
  color: var(--navy);
}

.advertise-page a {
  text-decoration: underline;
  color: var(--navy);
}

.advertise-page a:hover {
  color: var(--green);
}

.ad-options {
  margin: 1.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.ad-option {
  background-color: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--gold);
}

.ad-option h3 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.ad-option p {
  font-size: 0.9rem;
  margin-bottom: 0;
  color: var(--stone);
}

.advertise-cta {
  margin-top: 2rem;
  padding: 1.25rem 1.5rem;
  background-color: var(--navy);
  border-radius: var(--radius);
  color: var(--white);
}

.advertise-cta p {
  color: var(--white);
  margin-bottom: 0;
}

.advertise-cta a {
  color: var(--gold);
  text-decoration: underline;
}

.advertise-cta a:hover {
  color: var(--white);
}

/* =============================================
   404 / ERROR MESSAGES
   ============================================= */
.error-page {
  padding: 4rem 0;
  text-align: center;
}

.error-page h1 {
  font-size: 1.6rem;
  margin-bottom: 0.75rem;
}

.error-page p {
  color: var(--stone);
  margin-bottom: 1.25rem;
}

.error-page a {
  color: var(--green);
  text-decoration: underline;
}

/* =============================================
   FOOTER
   ============================================= */
.site-footer {
  background-color: var(--navy);
  color: var(--white);
  padding: 3rem 0 1.5rem;
  margin-top: 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-logo-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.footer-logo {
  height: 36px;
  width: auto;
}

.footer-logo-name {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--white);
}

.footer-tagline {
  font-size: 0.875rem;
  color: var(--stone);
  line-height: 1.5;
  max-width: 260px;
}

.footer-col h4 {
  font-family: 'Source Sans Pro', sans-serif;
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold);
  margin-bottom: 0.85rem;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.footer-col ul a {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.75);
  transition: color var(--transition);
}

.footer-col ul a:hover {
  color: var(--white);
}

.footer-col p {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.55;
}

.footer-col a {
  color: rgba(255, 255, 255, 0.75);
  transition: color var(--transition);
}

.footer-col a:hover {
  color: var(--white);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.25rem;
  font-size: 0.78rem;
  color: var(--stone);
  text-align: center;
}

/* =============================================
   RESPONSIVE — TABLET (768px)
   ============================================= */
@media (max-width: 768px) {
  /* Nav */
  .nav-links {
    display: none;
  }

  .nav-hamburger {
    display: flex;
  }

  .masthead-tagline {
    display: none;
  }

  /* Story grid */
  #story-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

/* =============================================
   RESPONSIVE — MOBILE (< 500px)
   ============================================= */
@media (max-width: 499px) {
  h1 { font-size: 1.5rem; }

  .story-headline { font-size: 1.4rem; }

  /* Nav */
  .masthead-name {
    font-size: 1.1rem;
  }

  /* Story grid — single column */
  #story-grid {
    grid-template-columns: 1fr;
  }

  .related-grid {
    grid-template-columns: 1fr;
  }

  /* Filter bar */
  .filter-bar .container {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .filter-bar select {
    width: 100%;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .footer-brand {
    grid-column: auto;
  }
}
