/* ============================================
   Frugal Faye — warm minimal design system
   ============================================ */

:root {
  --bg: #FDFBF7;
  --ink: #2B2B27;
  --ink-soft: #5C5B53;
  --green: #4A7C59;
  --green-dark: #3A6347;
  --green-tint: #EEF3EC;
  --amber: #E8A33D;
  --amber-tint: #FBF1DE;
  --border: #E7E2D8;
  --card: #FFFFFF;
  --max: 1080px;
  --radius: 12px;
  --font-display: "Bricolage Grotesque", system-ui, sans-serif;
  --font-body: "Source Sans 3", system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--green); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--green-dark); }

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 2px;
  border-radius: 4px;
}

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* ---------- Header ---------- */

.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.logo-link { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-mark { width: 38px; height: 38px; flex-shrink: 0; }
.logo-word {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.45rem;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.logo-word span { color: var(--green); }

.main-nav { display: flex; align-items: center; gap: 26px; }
.main-nav a {
  text-decoration: none;
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 1rem;
}
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--green-dark); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
  color: var(--ink);
  font-size: 1.1rem;
  line-height: 1;
}

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 24px 20px;
    gap: 16px;
  }
  .main-nav.open { display: flex; }
}

/* ---------- Hero ---------- */

.hero { padding-top: 64px; padding-bottom: 48px; }

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 5vw, 3.2rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  max-width: 17ch;
}

.hero h1 .underline {
  position: relative;
  white-space: nowrap;
}
.hero h1 .underline svg {
  position: absolute;
  left: 0;
  bottom: -0.18em;
  width: 100%;
  height: 0.32em;
  overflow: visible;
}

.hero p {
  margin-top: 18px;
  font-size: 1.25rem;
  color: var(--ink-soft);
  max-width: 54ch;
}

/* ---------- Section headings ---------- */

.section { padding-top: 36px; padding-bottom: 56px; }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  letter-spacing: -0.01em;
}

.section-head a { font-weight: 600; font-size: 1rem; white-space: nowrap; }

/* ---------- Article cards ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

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

.article-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.article-card:hover { border-color: var(--green); transform: translateY(-2px); }

.article-card.has-image { padding-top: 0; overflow: hidden; }

.card-image {
  display: block;
  margin: 0 -22px 8px;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--green-tint);
}
.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}
.article-card.has-image:hover .card-image img { transform: scale(1.03); }

@media (prefers-reduced-motion: reduce) {
  .card-image img { transition: none; }
  .article-card.has-image:hover .card-image img { transform: none; }
}

.card-category {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--green-dark);
  background: var(--green-tint);
  padding: 3px 10px;
  border-radius: 999px;
}

.article-card h3 { font-family: var(--font-display); font-size: 1.2rem; line-height: 1.3; }
.article-card h3 a { color: var(--ink); text-decoration: none; }
.article-card h3 a:hover { color: var(--green-dark); }

.article-card p { color: var(--ink-soft); font-size: 1rem; flex-grow: 1; }

.card-date { font-size: 0.875rem; color: var(--ink-soft); }

/* ---------- Article page ---------- */

.article-main { max-width: 720px; margin: 0 auto; padding: 40px 24px 64px; }

.breadcrumbs { font-size: 0.9rem; color: var(--ink-soft); margin-bottom: 20px; }
.breadcrumbs a { color: var(--ink-soft); }
.breadcrumbs a:hover { color: var(--green-dark); }

.article-main h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4.5vw, 2.6rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin-bottom: 14px;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-soft);
  font-size: 0.95rem;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.byline-mark { width: 30px; height: 30px; }

.article-hero {
  margin-bottom: 32px;
}
.article-hero img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: var(--radius);
}
.article-hero figcaption {
  font-size: 0.875rem;
  color: var(--ink-soft);
  margin-top: 8px;
}

.article-body h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin: 38px 0 14px;
  letter-spacing: -0.01em;
}

.article-body h3 { font-family: var(--font-display); font-size: 1.2rem; margin: 28px 0 10px; }

.article-body p { margin-bottom: 18px; }
.article-body ul, .article-body ol { margin: 0 0 18px 24px; }
.article-body li { margin-bottom: 8px; }

.article-body .callout {
  background: var(--green-tint);
  border-left: 4px solid var(--green);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 16px 20px;
  margin: 24px 0;
}

.article-body .callout strong { color: var(--green-dark); }

/* ---------- Forms (contact) ---------- */

.form-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  max-width: 560px;
}

.form-row { margin-bottom: 18px; }
.form-row label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 1rem; }

.form-row input, .form-row textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
}

.form-row input:focus, .form-row textarea:focus { border-color: var(--green); }

.btn {
  display: inline-block;
  background: var(--green);
  color: #fff;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.05rem;
  padding: 12px 28px;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease;
}
.btn:hover { background: var(--green-dark); color: #fff; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--green-tint);
  border-top: 1px solid var(--border);
  margin-top: 48px;
  padding: 40px 0 32px;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 24px;
}

.footer-links { display: flex; flex-wrap: wrap; gap: 8px 22px; list-style: none; }
.footer-links a { color: var(--ink-soft); text-decoration: none; font-weight: 600; }
.footer-links a:hover { color: var(--green-dark); }

.footer-note { margin-top: 20px; font-size: 0.875rem; }

/* ---------- Utility ---------- */

.page-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 2.6rem);
  letter-spacing: -0.015em;
  margin: 48px 0 18px;
}

.prose { max-width: 720px; }
.prose p { margin-bottom: 18px; }
.prose h2 { font-family: var(--font-display); font-size: 1.4rem; margin: 32px 0 12px; }
.prose ul { margin: 0 0 18px 24px; }

/* ---------- Share bar ---------- */

.share-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: -12px 0 28px;
}

.share-label { font-size: 0.9rem; font-weight: 600; color: var(--ink-soft); }

.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--green-tint);
  color: var(--green-dark);
  border: 1px solid var(--border);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.share-btn:hover { background: var(--green); color: #fff; }

.share-copied { font-size: 0.875rem; color: var(--green-dark); font-weight: 600; }

/* ---------- Newsletter box ---------- */

.newsletter-box {
  background: var(--green-tint);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  margin-top: 48px;
  text-align: center;
}

.newsletter-box h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}

.newsletter-box > p { color: var(--ink-soft); max-width: 46ch; margin: 0 auto 20px; }

.newsletter-form {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.newsletter-form input[type="email"] {
  font: inherit;
  font-size: 1rem;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  width: min(320px, 100%);
}
.newsletter-form input[type="email"]:focus { border-color: var(--green); }

.newsletter-fineprint { font-size: 0.85rem; color: var(--ink-soft); margin-top: 14px; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Mobile spacing rhythm ---------- */

@media (max-width: 600px) {
  body { font-size: 1.0625rem; }

  .wrap { padding: 0 20px; }
  .hero h1 { font-size: clamp(1.9rem, 8vw, 2.4rem); }

  .hero { padding-top: 36px; padding-bottom: 20px; }
  .hero p { margin-top: 14px; font-size: 1.125rem; }

  .section { padding-top: 20px; padding-bottom: 32px; }
  .section-head { margin-bottom: 16px; }

  .card-grid { gap: 16px; }

  .article-card { padding: 18px; }
  .card-image { margin: 0 -18px 8px; }

  .article-main { padding: 28px 20px 48px; }
  .page-title { margin: 32px 0 14px; }

  .site-footer { margin-top: 28px; padding: 32px 0 24px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .article-card { transition: none; }
}

.mobile-trust-links {
  display: none;
}

@media (max-width: 760px) {
  .mobile-trust-links {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
    padding-top: 14px;
    margin-top: 2px;
    border-top: 1px solid var(--border);
  }

  .mobile-trust-links a {
    font-size: 0.95rem;
  }
}
