/* ============================================================
   Hullia.us — Shared Stylesheet
   Editorial / small-town newspaper meets modern web
   ============================================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=Libre+Franklin:wght@300;400;500;600&display=swap');

/* --- CSS Custom Properties --- */
:root {
  --bg:          #F9F6F1;
  --text:        #1A1A1A;
  --accent:      #C97B2E;
  --accent-dark: #b06a22;
  --gray:        #6B6B6B;
  --band:        #F0EBE3;
  --border:      #E5DDD4;
  --serif:       'Playfair Display', Georgia, serif;
  --sans:        'Libre Franklin', system-ui, sans-serif;
  --max-w:       1160px;
  --post-w:      680px;
}

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

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

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

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: var(--serif);
  line-height: 1.2;
  font-weight: 700;
}

h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.5rem); }

p { margin-bottom: 1.25rem; }
p:last-child { margin-bottom: 0; }

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

.section { padding: 4rem 0; }
.section--band { background: var(--band); }

/* --- Section Labels --- */
.section-label {
  display: block;
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

/* --- Divider --- */
.rule {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  transition: border-bottom 0.2s ease, box-shadow 0.2s ease;
}

.site-header.scrolled {
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 8px rgba(0,0,0,0.04);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  max-width: var(--max-w);
  margin: 0 auto;
}

/* Wordmark */
.wordmark {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
  line-height: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.wordmark__rule {
  display: block;
  height: 1px;
  background: var(--accent);
  width: 100%;
}

.wordmark__text { display: block; }
.wordmark__text .tld { font-weight: 300; font-size: 0.85em; color: var(--gray); }

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

.site-nav a {
  font-family: var(--sans);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  transition: color 0.15s;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover { color: var(--accent); }
.site-nav a.active { border-bottom-color: var(--accent); color: var(--text); }

.nav-subscribe {
  background: var(--accent);
  color: #fff !important;
  padding: 0.45rem 1rem;
  border-radius: 2px;
  border-bottom: none !important;
  transition: background 0.15s !important;
}
.nav-subscribe:hover { background: var(--accent-dark) !important; color: #fff !important; }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: transform 0.2s, opacity 0.2s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav drawer */
.mobile-nav {
  display: none;
  flex-direction: column;
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 1rem 1.25rem 1.5rem;
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 500;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.mobile-nav a:last-child { border-bottom: none; }
.mobile-nav a.active { color: var(--accent); }

@media (max-width: 767px) {
  .site-nav { display: none; }
  .hamburger { display: flex; }
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--text);
  color: #fff;
  padding: 3rem 0 0;
  margin-top: 5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-wordmark {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.35rem;
}
.footer-wordmark .tld { font-weight: 300; color: rgba(255,255,255,0.55); }
.footer-location { font-size: 0.8rem; color: rgba(255,255,255,0.5); }

.footer-nav { display: flex; flex-direction: column; gap: 0.5rem; align-items: center; }
.footer-nav a { font-size: 0.875rem; color: rgba(255,255,255,0.7); transition: color 0.15s; }
.footer-nav a:hover { color: var(--accent); }

.footer-credit { text-align: right; }
.footer-credit p { font-size: 0.8rem; color: rgba(255,255,255,0.5); line-height: 1.6; }
.footer-credit a { color: var(--accent); }

.footer-bottom {
  padding: 1rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.35);
}
.footer-bottom a { color: rgba(255,255,255,0.35); transition: color 0.15s; }
.footer-bottom a:hover { color: var(--accent); }
.footer-bottom-links { display: flex; gap: 1.25rem; }

@media (max-width: 767px) {
  .footer-grid { grid-template-columns: 1fr; text-align: center; }
  .footer-nav { align-items: center; }
  .footer-credit { text-align: center; }
  .footer-bottom { flex-direction: column; gap: 0.5rem; text-align: center; }
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  overflow: hidden;
  min-height: 520px;
  display: flex;
  align-items: center;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background: #b5a990;
  z-index: 0;
}

.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.45;
  filter: saturate(0.5) brightness(0.9);
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(249,246,241,0.15) 0%, rgba(249,246,241,0.6) 100%);
  z-index: 1;
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 5rem 1.25rem 4rem;
  max-width: 700px;
}

.hero__headline {
  font-family: var(--serif);
  font-size: clamp(2.25rem, 5.5vw, 3.75rem);
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 1.25rem;
}

.hero__sub {
  font-size: 1.05rem;
  color: var(--gray);
  line-height: 1.7;
  margin-bottom: 2rem;
  max-width: 560px;
}

/* Hero email form */
.hero-form {
  display: flex;
  gap: 0.5rem;
  max-width: 460px;
  flex-wrap: wrap;
}

.hero-form input[type="email"] {
  flex: 1;
  min-width: 200px;
  padding: 0.7rem 1rem;
  border: 1px solid var(--border);
  background: rgba(249,246,241,0.92);
  font-family: var(--sans);
  font-size: 0.9rem;
  color: var(--text);
  border-radius: 2px;
  outline: none;
  transition: border-color 0.15s;
}
.hero-form input[type="email"]:focus { border-color: var(--accent); }

.btn {
  display: inline-block;
  padding: 0.7rem 1.4rem;
  background: var(--accent);
  color: #fff;
  font-family: var(--sans);
  font-size: 0.875rem;
  font-weight: 600;
  border: none;
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}
.btn:hover { background: var(--accent-dark); color: #fff; }
.btn--outline {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
}
.btn--outline:hover { background: var(--accent); color: #fff; }

.hero-form__note {
  width: 100%;
  font-size: 0.78rem;
  color: var(--gray);
  margin-top: 0.5rem;
}

/* ============================================================
   POST CARDS
   ============================================================ */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
.cards-grid--2col { grid-template-columns: repeat(2, 1fr); }

@media (max-width: 900px) {
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .cards-grid, .cards-grid--2col { grid-template-columns: 1fr; }
}

.card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 2px;
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
}
.card:hover { box-shadow: 0 6px 24px rgba(0,0,0,0.08); transform: translateY(-2px); }

.card__img {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--border);
}
.card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.card:hover .card__img img { transform: scale(1.03); }

.card__body { padding: 1.25rem; flex: 1; display: flex; flex-direction: column; }

.card__category {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.card__title {
  font-family: var(--serif);
  font-size: 1.15rem;
  line-height: 1.3;
  margin-bottom: 0.65rem;
  color: var(--text);
}
.card__title a:hover { color: var(--accent); }

.card__excerpt {
  font-size: 0.875rem;
  color: var(--gray);
  line-height: 1.6;
  flex: 1;
  margin-bottom: 1rem;
}

.card__byline {
  font-size: 0.75rem;
  color: var(--gray);
  border-top: 1px solid var(--border);
  padding-top: 0.75rem;
  margin-top: auto;
}

/* Placeholder card */
.card--placeholder .card__img { background: #ddd6cc; }
.card--placeholder .card__title { color: var(--gray); }

/* ============================================================
   SUBSCRIBE SECTION
   ============================================================ */
.subscribe-section { text-align: center; }
.subscribe-section h2 { margin-bottom: 0.75rem; }
.subscribe-section .lead {
  font-size: 1rem;
  color: var(--gray);
  max-width: 480px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

.subscribe-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 420px;
  margin: 0 auto;
}
.subscribe-form input {
  padding: 0.7rem 1rem;
  border: 1px solid var(--border);
  background: #fff;
  font-family: var(--sans);
  font-size: 0.9rem;
  color: var(--text);
  border-radius: 2px;
  outline: none;
  transition: border-color 0.15s;
}
.subscribe-form input:focus { border-color: var(--accent); }
.subscribe-form .btn { width: 100%; justify-content: center; }
.subscribe-form__note { font-size: 0.78rem; color: var(--gray); text-align: center; }

.subscribe-success {
  display: none;
  font-family: var(--serif);
  font-size: 1.1rem;
  color: var(--text);
  padding: 1rem;
}

/* ============================================================
   SECTION: ABOUT HULLIA
   ============================================================ */
.about-section .about-text {
  max-width: 640px;
}
.about-section .about-text p {
  font-size: 1.05rem;
  color: var(--gray);
  line-height: 1.8;
}

/* ============================================================
   SECTION: CORNERPOST PLACEHOLDERS
   ============================================================ */
.cornerpost-note {
  font-size: 0.9rem;
  color: var(--gray);
  font-style: italic;
  margin-top: 1.5rem;
}

/* ============================================================
   STORIES PAGE
   ============================================================ */
.stories-header {
  padding: 3.5rem 0 2.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 3rem;
}
.stories-header h1 { margin-bottom: 0.6rem; }
.stories-header .lead {
  font-size: 1rem;
  color: var(--gray);
  max-width: 560px;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding: 2.5rem 0;
  border-top: 1px solid var(--border);
  margin-top: 2rem;
}
.pagination a, .pagination button {
  font-family: var(--sans);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--accent);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.3rem 0;
  border-bottom: 1.5px solid transparent;
  transition: border-color 0.15s;
}
.pagination a:hover, .pagination button:hover { border-bottom-color: var(--accent); }
.pagination a.disabled, .pagination button:disabled {
  color: var(--border);
  cursor: default;
  pointer-events: none;
}
.pagination__info { font-size: 0.8rem; color: var(--gray); }

/* ============================================================
   POST PAGE
   ============================================================ */
.post-breadcrumb {
  font-size: 0.78rem;
  color: var(--gray);
  padding: 1.25rem 0 0;
}
.post-breadcrumb a { color: var(--gray); }
.post-breadcrumb a:hover { color: var(--accent); }
.post-breadcrumb span { margin: 0 0.35rem; }

.post-header { padding: 2rem 0 1.5rem; }
.post-header .post-category {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
  display: block;
}
.post-header h1 { margin-bottom: 1rem; }
.post-byline {
  font-size: 0.875rem;
  color: var(--gray);
}
.post-byline a { color: var(--text); font-weight: 500; }
.post-byline a:hover { color: var(--accent); }

.post-featured-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  margin-bottom: 0.5rem;
  border-radius: 2px;
}
.post-img-caption {
  font-size: 0.78rem;
  color: var(--gray);
  margin-bottom: 2rem;
}

.post-body {
  max-width: var(--post-w);
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--text);
}
.post-body h2 {
  font-family: var(--serif);
  font-size: 1.5rem;
  margin: 2rem 0 0.75rem;
}
.post-body h3 {
  font-family: var(--serif);
  font-size: 1.2rem;
  margin: 1.75rem 0 0.5rem;
}
.post-body blockquote {
  border-left: 3px solid var(--accent);
  padding: 0.5rem 1.25rem;
  margin: 1.5rem 0;
  font-family: var(--serif);
  font-size: 1.15rem;
  font-style: italic;
  color: var(--gray);
}
.post-body ul, .post-body ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}
.post-body li { margin-bottom: 0.4rem; }

.post-author-block {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  margin-top: 2.5rem;
  max-width: var(--post-w);
}
.post-author-block__avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--border);
  flex-shrink: 0;
  overflow: hidden;
}
.post-author-block__name {
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}
.post-author-block__bio { font-size: 0.875rem; color: var(--gray); line-height: 1.6; }

.post-more-stories { padding: 3rem 0; }
.post-more-stories h2 { margin-bottom: 1.5rem; }

/* ============================================================
   ABOUT PAGE
   ============================================================ */
.about-page-header {
  padding: 3.5rem 0 2rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 3rem;
}
.about-page-body {
  max-width: 640px;
  font-size: 1.05rem;
  line-height: 1.8;
}
.about-page-body h2 {
  font-family: var(--serif);
  font-size: 1.5rem;
  margin: 2rem 0 0.75rem;
}

/* ============================================================
   FADE-IN ON SCROLL (IntersectionObserver)
   ============================================================ */
.fade-in {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   SECTION LINK
   ============================================================ */
.section-link {
  display: inline-block;
  margin-top: 1.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
  border-bottom: 1.5px solid var(--accent);
  padding-bottom: 1px;
  transition: color 0.15s, border-color 0.15s;
}
.section-link:hover { color: var(--accent-dark); border-color: var(--accent-dark); }

/* ============================================================
   LOADING STATE
   ============================================================ */
.loading-spinner {
  text-align: center;
  padding: 3rem;
  color: var(--gray);
  font-size: 0.9rem;
}
