/* ===== HomeCover.org Global Styles ===== */
/* Modern editorial: navy ink, blue accent, serif display headings */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=Source+Sans+3:wght@400;500;600;700&display=swap');

:root {
  --ink:      #0f1e3a;   /* deep navy - headers, footer, headings */
  --ink-2:    #15294d;   /* navy panel alt */
  --blue:     #2563eb;   /* primary accent */
  --blue-dk:  #1d4ed8;   /* accent hover */
  --blue-lt:  #6ea8fe;   /* accent on dark bg */
  --bg:       #ffffff;
  --panel:    #f6f8fb;   /* off-white sections */
  --border:   #e3e8ef;
  --border-2: #cdd5e0;
  --text:     #1f2733;   /* body text */
  --muted:    #5a6573;   /* secondary text */
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans:  'Source Sans 3', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

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

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

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

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

/* --- Utility --- */
.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* ===== HEADER & NAV ===== */
.site-header {
  background: var(--ink);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  max-width: 1180px;
  margin: 0 auto;
  height: 70px;
}

.logo {
  display: flex;
  align-items: center;
  font-family: var(--serif);
  font-size: 1.55rem;
  font-weight: 600;
  letter-spacing: -.5px;
  color: #fff;
}

.logo img { height: 46px; width: auto; }
.logo span { color: var(--blue-lt); }

/* Desktop nav */
.main-nav ul { list-style: none; display: flex; align-items: center; gap: 2px; }

.main-nav a {
  display: block;
  padding: 8px 14px;
  font-family: var(--sans);
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .3px;
  text-transform: uppercase;
  color: rgba(255,255,255,.72);
  border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s;
}

.main-nav a:hover,
.main-nav a.active {
  color: #fff;
  border-bottom-color: var(--blue-lt);
}

/* Gold "Sign Up" CTA pill (always the last nav item) */
.main-nav li:last-child a {
  margin-left: 10px;
  padding: 7px 16px 7px 13px;
  color: var(--ink);
  background: linear-gradient(135deg, #f4d779 0%, #d4af37 55%, #c9971f 100%);
  border: 1px solid #b8860b;
  border-bottom: 1px solid #b8860b;
  border-radius: 999px;
  font-weight: 800;
  box-shadow: 0 2px 6px rgba(201,151,31,.35);
  transition: transform .15s, box-shadow .15s, filter .15s;
}
.main-nav li:last-child a::before {
  content: "\2605"; /* star */
  margin-right: 6px;
  font-size: .9em;
  color: #7a5c00;
}
.main-nav li:last-child a:hover {
  color: var(--ink);
  border-bottom-color: #b8860b;
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(201,151,31,.45);
}

/* Hamburger */
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 6px; }
.nav-toggle span { display: block; width: 26px; height: 2px; background: #fff; margin: 6px 0; transition: .3s; }

/* ===== HERO (Homepage) ===== */
.hero {
  background: var(--ink);
  color: #fff;
  text-align: center;
  padding: 92px 24px 84px;
  position: relative;
  border-bottom: 3px solid var(--blue);
}

.hero h1 {
  font-family: var(--serif);
  font-size: 3.1rem;
  font-weight: 600;
  letter-spacing: -1px;
  line-height: 1.12;
  max-width: 860px;
  margin: 0 auto 18px;
}

.hero p {
  font-size: 1.16rem;
  max-width: 620px;
  margin: 0 auto 32px;
  color: rgba(255,255,255,.82);
}

.hero .btn-primary { font-weight: 700; }

/* ===== BUTTONS ===== */
/* Editorial solid-blue CTA: flat, confident, high-contrast on light & dark. */
.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 6px;
  font-family: var(--sans);
  font-size: .98rem;
  font-weight: 700;
  letter-spacing: .2px;
  cursor: pointer;
  text-align: center;
  background: var(--blue);
  color: #fff;
  border: 1px solid var(--blue-dk);
  transition: background .18s ease, transform .12s ease, box-shadow .2s ease;
  box-shadow: 0 1px 2px rgba(15,30,58,.12);
}

.btn:hover { background: var(--blue-dk); transform: translateY(-1px); box-shadow: 0 6px 18px rgba(37,99,235,.28); }
.btn:active { transform: translateY(0); box-shadow: 0 1px 2px rgba(15,30,58,.2); }

/* ===== ARTICLE CARDS GRID (Homepage) ===== */
.section-heading {
  text-align: center;
  padding: 64px 24px 8px;
  max-width: 720px;
  margin: 0 auto;
}

.section-heading h2 {
  font-family: var(--serif);
  font-size: 2.1rem;
  font-weight: 600;
  letter-spacing: -.5px;
  color: var(--ink);
  margin-bottom: 10px;
}

.section-heading h2::before {
  content: "";
  display: block;
  width: 44px;
  height: 3px;
  background: var(--blue);
  margin: 0 auto 18px;
}

.section-heading p { color: var(--muted); max-width: 560px; margin: 0 auto; font-size: 1.02rem; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 26px;
  padding: 36px 24px 64px;
  max-width: 1180px;
  margin: 0 auto;
}

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}

.card:hover {
  border-color: var(--border-2);
  box-shadow: 0 12px 30px rgba(15,30,58,.1);
  transform: translateY(-3px);
}

.card-img { width: 100%; height: 196px; object-fit: cover; border-bottom: 1px solid var(--border); }

.card-body { padding: 24px 26px 28px; }

.card-tag {
  display: inline-block;
  font-family: var(--sans);
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  margin-bottom: 12px;
  padding-bottom: 4px;
  border-bottom: 2px solid currentColor;
}

.card-body h3 {
  font-family: var(--serif);
  font-size: 1.28rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -.3px;
  margin-bottom: 10px;
  color: var(--ink);
}

.card-body p { font-size: .96rem; color: var(--muted); margin-bottom: 18px; }

.card-link {
  font-size: .82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--blue);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap .2s;
}

.card-link:hover { gap: 11px; }

/* Card tag accent colors - muted editorial spectrum (cards stay white, links stay blue) */
.theme-forest     .card-tag { color: #0f5132; }
.theme-terracotta .card-tag { color: #9a3412; }
.theme-sand       .card-tag { color: #854d0e; }
.theme-sage       .card-tag { color: #3f6212; }
.theme-clay       .card-tag { color: #9f1239; }
.theme-mustard    .card-tag { color: #a16207; }
.theme-mocha      .card-tag { color: #57534e; }
.theme-rust       .card-tag { color: #b91c1c; }
.theme-olive      .card-tag { color: #4d7c0f; }
.theme-cinnamon   .card-tag { color: #c2410c; }
.card-link { color: var(--blue); }
.theme-forest .card-link, .theme-terracotta .card-link, .theme-sand .card-link,
.theme-sage .card-link, .theme-clay .card-link, .theme-mustard .card-link,
.theme-mocha .card-link, .theme-rust .card-link, .theme-olive .card-link,
.theme-cinnamon .card-link { color: var(--blue); }

/* ===== ARTICLE PAGE ===== */
.article-hero {
  padding: 76px 24px 64px;
  text-align: center;
  color: #fff;
  background: var(--ink);
  border-bottom: 3px solid var(--blue);
}

.article-hero .breadcrumb { font-size: .8rem; margin-bottom: 18px; letter-spacing: .4px; color: rgba(255,255,255,.6); }
.article-hero .breadcrumb a { color: var(--blue-lt); text-decoration: none; }
.article-hero .breadcrumb a:hover { text-decoration: underline; }

.article-hero h1 {
  font-family: var(--serif);
  font-size: 2.7rem;
  font-weight: 600;
  letter-spacing: -.6px;
  max-width: 760px;
  margin: 0 auto 16px;
  line-height: 1.18;
}

.article-hero .subtitle { font-size: 1.12rem; max-width: 600px; margin: 0 auto; color: rgba(255,255,255,.82); }

/* Hero variants unified to the editorial navy masthead (per-topic accent kept via tags elsewhere) */
.hero-forest, .hero-terracotta, .hero-sand, .hero-sage, .hero-clay,
.hero-mustard, .hero-mocha, .hero-rust, .hero-olive, .hero-cinnamon { background: var(--ink); }

/* Article content */
.article-content {
  max-width: 740px;
  margin: 0 auto;
  background: #fff;
  padding: 56px 8px 48px;
  position: relative;
  z-index: 1;
}

.article-content .featured-img {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 36px;
  border: 1px solid var(--border);
}

.article-content h2 {
  font-family: var(--serif);
  font-size: 1.7rem;
  font-weight: 600;
  letter-spacing: -.3px;
  margin: 44px 0 14px;
  color: var(--ink);
  padding-bottom: 0;
}

.article-content h3 {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 600;
  margin: 30px 0 10px;
  color: var(--ink-2);
}

.article-content p { margin-bottom: 20px; color: var(--text); font-size: 1.08rem; line-height: 1.78; }

.article-content ul, .article-content ol { margin: 0 0 22px 26px; color: var(--text); }
.article-content li { margin-bottom: 10px; font-size: 1.06rem; line-height: 1.7; }

.article-content blockquote {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 500;
  font-style: italic;
  line-height: 1.45;
  color: var(--ink);
  border-left: 4px solid var(--blue);
  padding: 8px 0 8px 28px;
  margin: 36px 0;
}

/* CTA box inside article */
.cta-box {
  text-align: center;
  padding: 40px 32px;
  border-radius: 10px;
  margin: 44px 0;
  background: var(--ink);
  border: 1px solid var(--ink-2);
}

.cta-box h3 { font-family: var(--serif); color: #fff; font-size: 1.55rem; font-weight: 600; margin-bottom: 12px; }
.cta-box p { color: rgba(255,255,255,.8); margin-bottom: 22px; font-size: 1.02rem; }
.cta-box .btn { font-weight: 700; }

/* CTA box variants unified to navy panel (button stays solid blue) */
.cta-forest, .cta-terracotta, .cta-sand, .cta-sage, .cta-clay,
.cta-mustard, .cta-mocha, .cta-rust, .cta-olive, .cta-cinnamon { background: var(--ink); }

/* CTA boxes hidden by default; shown only when s1 parameter is present */
.cta-box { display: none; }
body.has-s1 .cta-box { display: block; }
/* Landing pages: CTAs always visible regardless of s1 */
body.landing-page .cta-box { display: block; }

/* Special offer banner at top of article hero */
.offer-ribbon {
  display: inline-block;
  background: var(--blue);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.6px;
  padding: 7px 18px;
  border-radius: 4px;
  margin-bottom: 20px;
}

/* Offer highlight box inside article content */
.offer-highlight {
  background: var(--panel);
  border: 1px solid var(--border);
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  padding: 28px 30px;
  margin: 36px 0;
  text-align: left;
}

.offer-highlight h3 { font-family: var(--serif); color: var(--ink); font-size: 1.35rem; font-weight: 600; margin-bottom: 8px; }
.offer-highlight p { color: var(--text); font-size: 1.02rem; margin-bottom: 0; }

/* Related articles bar at bottom of landing pages */
.related-articles { max-width: 740px; margin: 0 auto 56px; padding: 0 24px; }

.related-articles h3 {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 16px;
}

.related-articles ul { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; }

.related-articles a {
  display: inline-block;
  padding: 9px 18px;
  background: #fff;
  border: 1px solid var(--border-2);
  border-radius: 6px;
  font-size: .88rem;
  font-weight: 600;
  color: var(--ink);
  transition: border-color .2s, color .2s;
}

.related-articles a:hover { border-color: var(--blue); color: var(--blue); }

/* ===== PORTAL PAGE ===== */
.portal-welcome {
  background: var(--ink);
  border: none;
  border-bottom: 3px solid var(--blue);
  border-radius: 0;
  padding: 56px 36px;
  margin: 0 auto 44px;
  max-width: none;
  text-align: center;
  color: #fff;
}

.portal-welcome h2 {
  font-family: var(--serif);
  font-size: 2.3rem;
  font-weight: 600;
  letter-spacing: -.5px;
  color: #fff;
  margin-bottom: 10px;
  line-height: 1.25;
}

.portal-welcome h2 span { color: var(--blue-lt); }
.portal-welcome p { color: rgba(255,255,255,.82); font-size: 1.1rem; margin: 0 auto; max-width: 620px; }

.portal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 26px;
  padding: 0 24px 56px;
  max-width: 1180px;
  margin: 0 auto;
}

.portal-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s, transform .2s;
  position: relative;
}

.portal-card:hover { border-color: var(--border-2); box-shadow: 0 12px 30px rgba(15,30,58,.1); transform: translateY(-3px); }
.portal-card .card-img { width: 100%; height: 196px; object-fit: cover; border-bottom: 1px solid var(--border); }
.portal-card .card-body { padding: 24px 26px 28px; }
.portal-card .card-body h3 { font-family: var(--serif); font-size: 1.28rem; font-weight: 600; margin-bottom: 10px; color: var(--ink); line-height: 1.3; }
.portal-card .card-body p { font-size: .96rem; color: var(--muted); margin-bottom: 18px; }

.portal-card .offer-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  background: var(--blue);
  color: #fff;
  font-size: .66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 5px 12px;
  border-radius: 4px;
}

/* Portal CTAs use the same solid editorial blue as .btn */
.portal-card .portal-btn {
  display: block;
  text-align: center;
  padding: 13px 24px;
  border-radius: 6px;
  font-family: var(--sans);
  font-size: .96rem;
  font-weight: 700;
  letter-spacing: .2px;
  background: var(--blue);
  color: #fff;
  border: 1px solid var(--blue-dk);
  transition: background .18s ease, transform .12s ease, box-shadow .2s ease;
}

.portal-card .portal-btn:hover { background: var(--blue-dk); transform: translateY(-1px); box-shadow: 0 6px 18px rgba(37,99,235,.28); }
.portal-card .portal-btn:active { transform: translateY(0); }

/* Legacy theme classes left as no-ops so existing markup stays valid */
.portal-btn-forest, .portal-btn-terracotta, .portal-btn-sand { /* unified blue applied above */ }

/* Info boxes */
.info-box {
  background: var(--panel);
  border: 1px solid var(--border);
  border-left: 4px solid var(--ink);
  border-radius: 8px;
  padding: 24px 28px;
  margin: 28px 0;
}

.info-box h4 { font-family: var(--serif); color: var(--ink); margin-bottom: 10px; font-size: 1.15rem; font-weight: 600; }
.info-box ul { margin-left: 20px; }
.info-box li { font-size: 1.04rem; }

/* ===== FOOTER ===== */
.site-footer {
  background: var(--ink);
  color: rgba(255,255,255,.66);
  padding: 60px 24px 0;
  margin-top: 72px;
  border-top: 3px solid var(--blue);
}

.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 44px;
}

.footer-brand .logo { font-family: var(--serif); }
.footer-brand .logo img { height: 46px; }
.footer-brand p { font-size: .92rem; line-height: 1.7; margin-top: 14px; color: rgba(255,255,255,.5); max-width: 320px; }

.footer-col h4 {
  font-family: var(--sans);
  color: #fff;
  font-size: .76rem;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
}

.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { font-size: .9rem; color: rgba(255,255,255,.5); transition: color .2s; }
.footer-col a:hover { color: var(--blue-lt); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  text-align: center;
  padding: 22px 0;
  font-size: .82rem;
  color: rgba(255,255,255,.4);
}
.footer-bottom a { color: rgba(255,255,255,.55); }
.footer-bottom a:hover { color: var(--blue-lt); }

/* ===== RESPONSIVE ===== */
@media (max-width: 860px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 680px) {
  .nav-toggle { display: block; }

  .main-nav {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--ink-2);
    padding: 10px 24px 18px;
    box-shadow: 0 8px 16px rgba(0,0,0,.25);
  }

  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .main-nav a { padding: 12px 4px; border-bottom: 1px solid rgba(255,255,255,.08); }
  .main-nav li:last-child a {
    margin: 12px 0 4px;
    padding: 12px 16px;
    text-align: center;
    border-bottom: 1px solid #b8860b;
  }

  .hero { padding: 60px 24px 56px; }
  .hero h1 { font-size: 2.1rem; }
  .hero p { font-size: 1.05rem; }

  .article-content { padding: 36px 20px 36px; }
  .article-hero h1 { font-size: 1.9rem; }
  .article-content p, .article-content li { font-size: 1.04rem; }

  .section-heading h2 { font-size: 1.7rem; }

  .card-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
  .portal-welcome h2 { font-size: 1.7rem; }
}

/* ===== SIGN-UP FORM ===== */
.signup-form {
  max-width: 560px;
  margin: 0 auto;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 36px 32px;
}
.form-row { display: flex; gap: 16px; }
.form-row .form-group { flex: 1; }
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-family: var(--serif);
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 7px;
  font-size: 1rem;
}
.form-group .req { color: var(--blue); font-weight: 700; }
.form-group input[type="text"],
.form-group input[type="email"] {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 7px;
  font-family: var(--sans);
  font-size: 1.02rem;
  color: var(--text);
  background: #fff;
  box-sizing: border-box;
  transition: border-color .15s, box-shadow .15s;
}
.form-group input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}
.form-group input:invalid:not(:placeholder-shown) { border-color: #dc2626; }
.consent-group {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-bottom: 24px;
}
.consent-group input[type="checkbox"] {
  width: 19px; height: 19px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--blue);
  cursor: pointer;
}
.consent-group label {
  font-family: var(--sans);
  font-size: .94rem;
  line-height: 1.5;
  color: var(--muted);
}
.consent-group a { color: var(--blue); }
.signup-form .btn { width: 100%; font-weight: 700; border: none; cursor: pointer; font-size: 1.05rem; }
.form-error {
  color: #dc2626;
  font-size: .9rem;
  margin-top: -12px;
  margin-bottom: 16px;
  display: none;
}
.form-success {
  display: none;
  background: var(--panel);
  border: 1px solid var(--border);
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  padding: 28px 26px;
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
}
.form-success h3 { font-family: var(--serif); color: var(--ink); font-size: 1.45rem; margin-bottom: 10px; }
.form-success p { color: var(--text); font-size: 1.05rem; }
@media (max-width: 600px) {
  .form-row { flex-direction: column; gap: 0; }
  .signup-form { padding: 28px 20px; }
}
