/* =====================================================================
   FamilyAdmin.com — Design System
   Single source of truth for the site's look. Loaded by the WordPress
   theme (functions.php enqueues it) AND by the local preview build, so
   what you see locally is what ships. Edit here; run `npm run build`.
   ===================================================================== */

/* ------------------------------------------------------------------ */
/* Design tokens                                                       */
/* ------------------------------------------------------------------ */
:root {
  /* Brand palette — warm, archival, trustworthy */
  --paper:        #faf7f0; /* page background — warm cream */
  --paper-2:      #f2ece0; /* raised surfaces, alternating sections */
  --ink:          #2a2420; /* body text — warm near-black */
  --ink-soft:     #5d554c; /* secondary text */
  --line:         #e4dccd; /* hairlines / borders */

  --evergreen:      #2f5d50; /* primary — heritage/permanence */
  --evergreen-deep: #1e3f36; /* hovers, deep sections */
  --amber:          #b8722a; /* accent — warmth, calls to action */
  --amber-deep:     #9a5e1f;

  /* Typography */
  --font-serif: "Fraunces", Georgia, "Times New Roman", serif;
  --font-sans:  system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Type scale (fluid) */
  --step--1: clamp(0.83rem, 0.80rem + 0.15vw, 0.94rem);
  --step-0:  clamp(1.00rem, 0.95rem + 0.25vw, 1.15rem);
  --step-1:  clamp(1.25rem, 1.15rem + 0.5vw, 1.55rem);
  --step-2:  clamp(1.60rem, 1.40rem + 1.0vw, 2.20rem);
  --step-3:  clamp(2.00rem, 1.65rem + 1.8vw, 3.10rem);
  --step-4:  clamp(2.55rem, 2.00rem + 2.8vw, 4.20rem);

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 0.85rem;
  --space-md: 1.4rem;
  --space-lg: 2.4rem;
  --space-xl: 4rem;
  --space-2xl: 6.5rem;

  --container: 1120px;
  --container-narrow: 760px;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(42, 36, 32, .06), 0 12px 30px -12px rgba(42, 36, 32, .22);
  --shadow-sm: 0 1px 2px rgba(42, 36, 32, .08), 0 6px 16px -10px rgba(42, 36, 32, .2);
}

/* ------------------------------------------------------------------ */
/* Base                                                                */
/* ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.12;
  color: var(--evergreen-deep);
  margin: 0 0 var(--space-sm);
  letter-spacing: -0.01em;
}
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }

p { margin: 0 0 var(--space-md); }
p:last-child { margin-bottom: 0; }

a { color: var(--evergreen); text-underline-offset: 3px; }
a:hover { color: var(--amber-deep); }

ul, ol { padding-left: 1.3em; }
li { margin-bottom: 0.4em; }

hr { border: 0; border-top: 1px solid var(--line); margin: var(--space-lg) 0; }

strong { font-weight: 650; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--evergreen-deep); color: #fff; padding: .6rem 1rem; z-index: 100;
}
.skip-link:focus { left: 8px; top: 8px; }

:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }

/* ------------------------------------------------------------------ */
/* Layout primitives                                                   */
/* ------------------------------------------------------------------ */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 1.35rem; }
.container--narrow { max-width: var(--container-narrow); }

.section { padding-block: var(--space-2xl); }
.section--tight { padding-block: var(--space-xl); }
.section--paper-2 { background: var(--paper-2); }
.section--evergreen { background: var(--evergreen-deep); color: #eef3ef; }
.section--evergreen h1, .section--evergreen h2, .section--evergreen h3 { color: #fff; }
.section--evergreen a { color: #e9c79a; }

.eyebrow {
  font-family: var(--font-sans);
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--amber-deep);
  margin: 0 0 var(--space-sm);
}
.section--evergreen .eyebrow { color: #e9c79a; }

.lead { font-size: var(--step-1); color: var(--ink-soft); line-height: 1.55; }
.section--evergreen .lead { color: #cdd8d1; }

.stack > * + * { margin-top: var(--space-md); }

/* ------------------------------------------------------------------ */
/* Buttons                                                             */
/* ------------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--font-sans); font-weight: 650; font-size: var(--step-0);
  line-height: 1; text-decoration: none; cursor: pointer;
  padding: .85rem 1.5rem; border-radius: 999px; border: 2px solid transparent;
  transition: transform .12s ease, background-color .12s ease, color .12s ease;
}
.btn:active { transform: translateY(1px); }
.btn--accent { background: var(--amber); color: #fff; }
.btn--accent:hover { background: var(--amber-deep); color: #fff; }
.btn--primary { background: var(--evergreen); color: #fff; }
.btn--primary:hover { background: var(--evergreen-deep); color: #fff; }
.btn--ghost { background: transparent; color: var(--evergreen-deep); border-color: var(--evergreen); }
.btn--ghost:hover { background: var(--evergreen); color: #fff; }
.section--evergreen .btn--ghost { color: #fff; border-color: rgba(255,255,255,.5); }
.section--evergreen .btn--ghost:hover { background: #fff; color: var(--evergreen-deep); }

.btn-row { display: flex; flex-wrap: wrap; gap: var(--space-sm); align-items: center; }

/* ------------------------------------------------------------------ */
/* Header / nav                                                        */
/* ------------------------------------------------------------------ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 247, 240, .88);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner { display: flex; align-items: center; gap: var(--space-md); min-height: 68px; }
.brand { display: inline-flex; align-items: baseline; text-decoration: none; font-family: var(--font-serif); font-weight: 600; font-size: 1.35rem; }
.brand__mark { color: var(--evergreen-deep); }
.brand__dot { color: var(--amber); }
.nav { margin-left: auto; }
.nav__list { display: flex; gap: 1.35rem; align-items: center; list-style: none; margin: 0; padding: 0; }
.nav__list li { margin: 0; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 550; font-size: var(--step-0); }
.nav a:hover { color: var(--amber-deep); }
.nav .current-menu-item > a { color: var(--amber-deep); }
.nav__cta { margin-left: var(--space-sm); padding: .6rem 1.1rem; }

/* ------------------------------------------------------------------ */
/* Hero                                                                */
/* ------------------------------------------------------------------ */
.hero {
  background:
    radial-gradient(1200px 500px at 78% -10%, rgba(184,114,42,.14), transparent 60%),
    radial-gradient(900px 500px at 10% 10%, rgba(47,93,80,.10), transparent 55%);
}
.hero__inner { padding-block: var(--space-2xl); max-width: 820px; }
.hero h1 { margin-bottom: var(--space-md); }
.hero .lead { margin-bottom: var(--space-lg); }

/* ------------------------------------------------------------------ */
/* Cards / grids                                                       */
/* ------------------------------------------------------------------ */
.grid { display: grid; gap: var(--space-md); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: var(--space-lg); box-shadow: var(--shadow-sm);
}
.card h3 { font-size: var(--step-1); }
.card__icon { font-size: 1.9rem; line-height: 1; margin-bottom: var(--space-sm); }
a.card { text-decoration: none; color: inherit; transition: transform .12s ease, box-shadow .12s ease; }
a.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

/* Section heading block */
.section-head { max-width: var(--container-narrow); margin-bottom: var(--space-lg); }
.section-head--center { margin-inline: auto; text-align: center; }

/* Callout / note */
.note {
  border-left: 4px solid var(--amber); background: var(--paper-2);
  padding: var(--space-md) var(--space-lg); border-radius: var(--radius-sm);
}

/* Price tag */
.price { font-family: var(--font-serif); font-size: var(--step-3); color: var(--evergreen-deep); }
.price small { font-size: var(--step-0); color: var(--ink-soft); font-family: var(--font-sans); }

/* ------------------------------------------------------------------ */
/* Prose (long-form guide/article content)                             */
/* ------------------------------------------------------------------ */
.prose { max-width: var(--container-narrow); }
.prose h2 { margin-top: var(--space-xl); }
.prose h3 { margin-top: var(--space-lg); }
.prose img { border-radius: var(--radius-sm); margin-block: var(--space-md); }
.prose blockquote {
  margin: var(--space-lg) 0; padding-left: var(--space-md);
  border-left: 4px solid var(--evergreen); font-family: var(--font-serif);
  font-size: var(--step-1); color: var(--evergreen-deep);
}

/* ------------------------------------------------------------------ */
/* Blog — post cards, single post, pagination, comments               */
/* ------------------------------------------------------------------ */
.post-card { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.post-card__thumb { display: block; }
.post-card__thumb img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.post-card > .eyebrow,
.post-card > h3,
.post-card > p,
.post-card__more { margin-inline: var(--space-lg); }
.post-card > .eyebrow { margin-top: var(--space-lg); margin-bottom: .3rem; }
.post-card > h3 { font-size: var(--step-1); margin-bottom: .5rem; }
.post-card > h3 a { color: var(--evergreen-deep); text-decoration: none; }
.post-card > h3 a:hover { color: var(--amber-deep); }
.post-card__more { margin-top: auto; padding-top: var(--space-sm); padding-bottom: var(--space-lg); font-weight: 650; text-decoration: none; }

.post-meta { color: var(--ink-soft); font-size: var(--step--1); margin-top: 0; }
.post-meta a { color: var(--ink-soft); }
.post-hero img { border-radius: var(--radius); width: 100%; }
.post-tags { margin-top: var(--space-lg); font-size: var(--step--1); }
.post-tags a { display: inline-block; padding: .15rem .6rem; margin-right: .3rem; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; }

/* Pagination + post navigation */
.pagination, .post-navigation { margin-top: var(--space-xl); }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; }
.page-numbers {
  display: inline-flex; align-items: center; justify-content: center; min-width: 2.5rem;
  padding: .5rem .8rem; border: 1px solid var(--line); border-radius: var(--radius-sm);
  text-decoration: none; color: var(--evergreen-deep); background: #fff;
}
.page-numbers.current { background: var(--evergreen); color: #fff; border-color: var(--evergreen); }
.page-numbers:hover:not(.current) { border-color: var(--evergreen); }
.post-navigation .nav-links { display: flex; justify-content: space-between; gap: var(--space-md); }
.post-navigation a { text-decoration: none; font-weight: 600; }

/* Comments */
.comments { margin-top: var(--space-xl); padding-top: var(--space-lg); border-top: 1px solid var(--line); }
.comments__title { font-size: var(--step-2); }
.comments__list { list-style: none; padding: 0; }
.comments__list .children { list-style: none; padding-left: var(--space-lg); }
.comments__list .comment-body { padding: var(--space-md) 0; border-bottom: 1px solid var(--line); }
.comments__list .comment-author { font-weight: 650; }
.comments__list .comment-meta { font-size: var(--step--1); color: var(--ink-soft); }
.comment-form { margin-top: var(--space-lg); display: grid; gap: var(--space-sm); }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
  width: 100%; padding: .7rem .9rem; border: 1px solid var(--line); border-radius: var(--radius-sm);
  font: inherit; background: #fff;
}
.comment-form textarea { min-height: 8rem; }

/* Search form */
.search-form { display: flex; gap: .5rem; margin-top: var(--space-md); }
.search-form input[type="search"] { flex: 1; padding: .7rem .9rem; border: 1px solid var(--line); border-radius: var(--radius-sm); font: inherit; }
.search-form input[type="submit"] { cursor: pointer; }

/* ------------------------------------------------------------------ */
/* Footer                                                              */
/* ------------------------------------------------------------------ */
.site-footer { background: var(--evergreen-deep); color: #cdd8d1; padding-block: var(--space-xl); }
.site-footer a { color: #e9c79a; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer__grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: var(--space-lg); }
.site-footer h4 { color: #fff; font-family: var(--font-sans); font-size: var(--step--1); text-transform: uppercase; letter-spacing: .1em; margin-bottom: var(--space-sm); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer__brand { font-family: var(--font-serif); font-size: 1.5rem; color: #fff; }
.site-footer__tagline { font-family: var(--font-serif); font-style: italic; color: #e9c79a; }
.site-footer__legal { margin-top: var(--space-lg); padding-top: var(--space-md); border-top: 1px solid rgba(255,255,255,.12); font-size: var(--step--1); color: #9fb0a8; }

/* ------------------------------------------------------------------ */
/* Responsive                                                          */
/* ------------------------------------------------------------------ */
@media (max-width: 860px) {
  .grid--3 { grid-template-columns: 1fr; }
  .grid--2 { grid-template-columns: 1fr; }
  .site-footer__grid { grid-template-columns: 1fr; }
  .nav { display: none; } /* v1: simple; a mobile menu can come later */
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
