/* ============================================================
   Deerwood Improvement Association — Shared Stylesheet
   ============================================================ */

/* ── VARIABLES ── */
:root {
  --cream: #f5f0e8;
  --warm-white: #faf8f4;
  --charcoal: #2c2c2c;
  --slate: #404856;
  --sage: #7a8c78;
  --stone: #9e9589;
  --accent: #1f7335;
  --deerwood-green: #1f7335;
  --deerwood-blue: #2596be;
  --light-rule: rgba(0,0,0,0.08);
}

/* ── RESET / BASE ── */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--warm-white);
  color: var(--charcoal);
  font-family: 'Jost', sans-serif;
  font-weight: 300;
  font-size: 18px;
  line-height: 1.7;
}

/* ── NAVIGATION ── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--charcoal);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}
.nav-logo {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: 19px;
  color: var(--cream);
  text-decoration: none;
  letter-spacing: 0.04em;
  white-space: nowrap;
  line-height: 1.2;
}
.nav-logo span {
  font-weight: 300;
  font-size: 15px;
  color: var(--stone);
  display: block;
  letter-spacing: 0.12em;
  font-family: 'Jost', sans-serif;
  text-transform: uppercase;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 0;
  list-style: none;
}
.nav-links li {
  position: relative;
}
.nav-links > li > a {
  display: block;
  padding: 0 14px;
  height: 56px;
  line-height: 56px;
  font-family: 'Jost', sans-serif;
  font-weight: 400;
  font-size: 14px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #d4cec8;
  text-decoration: none;
  transition: color 0.3s ease;
  white-space: nowrap;
}
.nav-links > li > a:hover,
.nav-links > li > a.active {
  color: var(--cream);
}
.nav-links .has-dropdown > a::after {
  content: '';
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 3px solid transparent;
  border-right: 3px solid transparent;
  border-top: 4px solid currentColor;
  margin-left: 5px;
  vertical-align: middle;
  opacity: 0.6;
}
.dropdown-menu {
  display: none;
  position: absolute;
  top: 56px;
  left: 0;
  background: #222;
  border-top: 2px solid var(--accent);
  min-width: 210px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  z-index: 200;
}
.nav-links .has-dropdown:hover .dropdown-menu {
  display: block;
}
.dropdown-menu a {
  display: block;
  height: auto;
  line-height: 1.5;
  padding: 11px 18px;
  font-family: 'Jost', sans-serif;
  font-weight: 400;
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #b8b0a4;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: color 0.3s ease, background 0.3s ease;
}
.dropdown-menu a:last-child { border-bottom: none; }
.dropdown-menu a:hover { color: var(--cream); background: rgba(255,255,255,0.03); }
.nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.btn-portal {
  background: var(--accent);
  color: #fff;
  font-family: 'Jost', sans-serif;
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 8px 18px;
  text-decoration: none;
  transition: background 0.3s ease;
  white-space: nowrap;
}
.btn-portal:hover { background: #175c2a; }
.btn-help {
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Jost', sans-serif;
  font-weight: 400;
  font-size: 16px;
  color: var(--stone);
  padding: 6px 8px;
  transition: color 0.3s ease;
  line-height: 1;
}
.btn-help:hover { color: var(--cream); }
.nav-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--stone);
  transition: all 0.3s ease;
}
/* Mobile nav panel */
.nav-mobile-open {
  display: flex !important;
  flex-direction: column;
  position: absolute;
  top: 56px;
  left: 0;
  right: 0;
  background: #1e1e1e;
  padding: 8px 0 16px;
  z-index: 99;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.nav-mobile-open > li > a {
  height: auto;
  line-height: 1.5;
  padding: 12px 24px;
}
.nav-mobile-open .dropdown-menu {
  display: block;
  position: static;
  border-top: none;
  border-left: 3px solid rgba(31,115,53,0.3);
  margin: 0 24px 4px;
  box-shadow: none;
  background: transparent;
}
.nav-mobile-open .dropdown-menu a {
  padding: 8px 16px;
}

/* ── HERO ── */
.hero {
  background: var(--charcoal);
  padding: 100px 40px 72px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(138,115,85,0.18) 0%, transparent 70%);
  pointer-events: none;
}
.hero-eyebrow {
  font-family: 'Jost', sans-serif;
  font-weight: 400;
  font-size: 13px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--stone);
  margin-bottom: 22px;
  position: relative;
  z-index: 1;
}
.hero h1 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: clamp(44px, 6vw, 74px);
  color: var(--cream);
  line-height: 1.1;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}
.hero h1 em {
  font-style: italic;
  color: #c8b99a;
}
.hero-tagline {
  font-family: 'Jost', sans-serif;
  font-size: 17px;
  letter-spacing: 0.14em;
  color: var(--stone);
  position: relative;
  z-index: 1;
}

/* Inner page hero (smaller padding, no strip) */
.hero-inner {
  padding: 72px 40px 56px;
}
.hero-inner h1 {
  font-size: clamp(38px, 5vw, 58px);
}

/* ── INTRO BAND ── */
.intro-band {
  background: var(--cream);
  padding: 72px 32px;
  text-align: center;
  border-bottom: 1px solid var(--light-rule);
}
.intro-band p {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(22px, 2.5vw, 29px);
  font-weight: 300;
  line-height: 1.65;
  color: var(--charcoal);
  max-width: 720px;
  margin: 0 auto 20px;
}
.intro-band p:last-child { margin-bottom: 0; }
.intro-band .intro-note {
  font-family: 'Jost', sans-serif;
  font-size: 16px;
  color: var(--stone);
  letter-spacing: 0.08em;
  font-weight: 400;
}

/* ── LAYOUT ── */
.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 32px;
}
section {
  padding: 40px 0;
  border-bottom: 1px solid var(--light-rule);
}
section:last-of-type { border-bottom: none; }

/* ── TYPOGRAPHY ── */
.section-label {
  font-family: 'Jost', sans-serif;
  font-size: 12px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--stone);
  margin-bottom: 10px;
}
h2 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: clamp(30px, 3.5vw, 42px);
  line-height: 1.15;
  color: var(--charcoal);
  margin-bottom: 28px;
}
h2 em { font-style: italic; color: var(--accent); }
.prose {
  font-size: 18px;
  color: var(--slate);
  line-height: 1.75;
  max-width: 680px;
}
.prose p { margin-bottom: 18px; }
.prose p:last-child { margin-bottom: 0; }
.prose a {
  color: var(--deerwood-blue);
  text-decoration: none;
  border-bottom: 1px solid rgba(37,150,190,0.3);
  transition: border-color 0.3s ease;
}
.prose a:hover { border-bottom-color: var(--deerwood-blue); }

/* ── CALLOUT ── */
.callout {
  border-left: 3px solid var(--accent);
  padding: 18px 24px;
  background: var(--cream);
  margin: 32px 0;
  font-size: 16px;
  color: var(--slate);
  line-height: 1.65;
}
.callout strong { color: var(--charcoal); font-weight: 500; }

/* ── DARK BLOCK ── */
.dark-block {
  background: var(--charcoal);
  color: var(--cream);
  padding: 72px 40px;
  position: relative;
  overflow: hidden;
}
.dark-block::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 100% 100%, rgba(138,115,85,0.12) 0%, transparent 60%);
  pointer-events: none;
}
.dark-block .db-inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 32px;
  position: relative;
  z-index: 1;
}
.dark-block .section-label { color: var(--stone); }
.dark-block h2 { color: var(--cream); }
.dark-block h2 em { color: #c8b99a; }
.dark-block p {
  color: #b8b0a4;
  font-size: 16px;
  line-height: 1.75;
  max-width: 600px;
}
.dark-block a {
  font-family: 'Jost', sans-serif;
  font-size: 14px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #c8b99a;
  text-decoration: none;
  border-bottom: 1px solid rgba(200,185,154,0.3);
  transition: border-color 0.3s ease;
}
.dark-block a:hover { border-bottom-color: #c8b99a; }

/* ── NEWS ITEMS (shared: homepage preview + news page) ── */
.news-list { list-style: none; }
.news-item {
  padding: 28px 0;
  border-bottom: 1px solid var(--light-rule);
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 28px;
  align-items: start;
}
.news-item:first-child { padding-top: 0; }
.news-item:last-child { border-bottom: none; }
.news-date {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: 15px;
  color: var(--stone);
  text-align: right;
  padding-top: 3px;
  line-height: 1.4;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}
.news-date strong {
  display: block;
  font-size: 32px;
  font-weight: 300;
  color: var(--accent);
  line-height: 1;
}
.news-body h3 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  font-size: 23px;
  color: var(--charcoal);
  margin-bottom: 6px;
  line-height: 1.2;
}
.news-body p {
  font-size: 17px;
  color: var(--slate);
  line-height: 1.65;
  margin-bottom: 10px;
}
.news-body img {
  width: 100%;
  max-width: 480px;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
  margin: 14px 0 10px;
}
.news-more {
  display: inline-block;
  font-family: 'Jost', sans-serif;
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--deerwood-blue);
  text-decoration: none;
  border-bottom: 1px solid rgba(37,150,190,0.3);
  transition: border-color 0.3s ease;
}
.news-more:hover { border-bottom-color: var(--deerwood-blue); }
.news-loading, .news-empty {
  font-size: 17px;
  color: var(--stone);
  font-style: italic;
  padding: 28px 0;
}

/* ── FOOTER ── */
footer {
  background: #222;
  padding: 56px 40px 36px;
  text-align: center;
}
.footer-logo {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: 24px;
  color: var(--cream);
  margin-bottom: 6px;
  letter-spacing: 0.04em;
}
.footer-sub {
  font-family: 'Jost', sans-serif;
  font-size: 13px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--stone);
  margin-bottom: 0;
}

/* ── FOOTER CONTACT ── */
.footer-contact {
  border-top: 1px solid rgba(255,255,255,0.07);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  padding: 40px 40px;
  margin: 36px 0;
}
.fc-grid {
  max-width: 860px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px 48px;
  text-align: left;
}
.fc-item {}
.fc-head {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 7px;
}
.fc-icon { font-size: 13px; opacity: 0.65; }
.fc-label {
  font-family: 'Jost', sans-serif;
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--stone);
}
.fc-body {
  font-family: 'Jost', sans-serif;
  font-size: 13.5px;
  color: #b8b0a4;
  line-height: 1.65;
  display: flex;
  flex-direction: column;
}
.fc-body .fc-name {
  font-size: 14.5px;
  color: #ccc4b8;
}
.fc-body a {
  color: #c8b99a;
  text-decoration: none;
  border-bottom: 1px solid rgba(200,185,154,0.25);
  transition: border-color 0.3s ease;
}
.fc-body a:hover { border-bottom-color: #c8b99a; }
.fc-body a.fc-green {
  color: #5aaa72;
  border-bottom-color: rgba(90,170,114,0.3);
}
.fc-body a.fc-green:hover { border-bottom-color: #5aaa72; }
@media (max-width: 700px) {
  .fc-grid { grid-template-columns: repeat(2, 1fr); gap: 24px 32px; }
  .footer-contact { padding: 32px 24px; }
}
@media (max-width: 440px) {
  .fc-grid { grid-template-columns: 1fr; }
}
.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 24px;
  list-style: none;
  margin-bottom: 36px;
}
.footer-links a {
  font-family: 'Jost', sans-serif;
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #a8a098;
  text-decoration: none;
  transition: color 0.3s ease;
}
.footer-links a:hover { color: var(--stone); }
.footer-rule {
  border: none;
  border-top: 1px solid rgba(255,255,255,0.06);
  margin: 0 auto 24px;
  max-width: 320px;
}
.footer-copy {
  font-family: 'Jost', sans-serif;
  font-size: 13px;
  color: #8a8480;
  letter-spacing: 0.08em;
}
.footer-last-modified {
  font-family: 'Jost', sans-serif;
  font-size: 11px;
  color: #8a8480;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

/* ── HELP MODAL ── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(20,18,16,0.72);
  z-index: 500;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: var(--warm-white);
  max-width: 680px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  position: relative;
}
.modal-header {
  background: var(--charcoal);
  padding: 32px 40px 28px;
  position: relative;
}
.modal-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(138,115,85,0.18) 0%, transparent 70%);
  pointer-events: none;
}
.modal-eyebrow {
  font-family: 'Jost', sans-serif;
  font-size: 12px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--stone);
  margin-bottom: 10px;
  position: relative;
  z-index: 1;
}
.modal-header h2 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: 34px;
  color: var(--cream);
  margin-bottom: 0;
  position: relative;
  z-index: 1;
}
.modal-header h2 em { color: #c8b99a; }
.modal-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Jost', sans-serif;
  font-size: 24px;
  color: var(--stone);
  line-height: 1;
  transition: color 0.3s ease;
  z-index: 2;
}
.modal-close:hover { color: var(--cream); }
.modal-body { padding: 36px 40px 40px; }
.modal-section {
  margin-bottom: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--light-rule);
}
.modal-section:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.modal-section h3 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  font-size: 22px;
  color: var(--charcoal);
  margin-bottom: 12px;
}
.modal-section p,
.modal-section li {
  font-size: 15.5px;
  color: var(--slate);
  line-height: 1.65;
}
.modal-section ul,
.modal-section ol { padding-left: 20px; margin: 8px 0; }
.modal-section li { margin-bottom: 6px; }
.modal-code {
  background: var(--cream);
  border-left: 3px solid var(--accent);
  padding: 14px 18px;
  margin: 12px 0;
  font-family: 'Courier New', monospace;
  font-size: 14px;
  color: var(--charcoal);
  overflow-x: auto;
  white-space: pre;
  line-height: 1.6;
}
.modal-note {
  background: var(--cream);
  border-left: 3px solid var(--sage);
  padding: 12px 18px;
  margin: 12px 0;
  font-size: 15px;
  color: var(--slate);
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
}
@media (max-width: 680px) {
  .hero { padding: 64px 24px 48px; }
  .hero-inner { padding: 56px 24px 40px; }
  .intro-band { padding: 48px 24px; }
  .container { padding: 0 20px; }
  section { padding: 40px 0; }
  .dark-block { padding: 56px 24px; }
  .dark-block .db-inner { padding: 0; }
  .news-item { grid-template-columns: 72px 1fr; gap: 18px; }
  footer { padding: 48px 24px 28px; }
}
@media (max-width: 600px) {
  .nav-logo span { display: none; }
  .btn-portal { padding: 7px 12px; font-size: 12px; }
  .modal-body { padding: 28px 20px 32px; }
  .modal-header { padding: 28px 20px 24px; }
}
