@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,500;0,9..144,600;0,9..144,700;1,9..144,400&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --primary: #1f4e46;
  --primary-dark: #12332e;
  --secondary: #eef1e9;
  --accent: #d8623b;
  --bg: #fbf9f4;
  --bg-alt: #f2ede3;
  --text: #1c1b18;
  --text-light: #5f5a51;
  --radius: 10px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 2px rgba(28,27,24,.04), 0 2px 8px rgba(28,27,24,.05);
  --shadow-md: 0 6px 24px rgba(28,27,24,.09);
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --max-width: 1150px;
  --read-width: 720px;
  --header-h: 72px;
}

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

html, body {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6, p, ul, ol, figure, blockquote { margin: 0; }

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

p, li, blockquote, h1, h2, h3, h4 { overflow-wrap: break-word; }

a { color: var(--primary); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--accent); }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  color: var(--text);
  letter-spacing: -.01em;
}

h1 { font-size: clamp(2.1rem, 5vw, 3rem); font-weight: 600; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.1rem); margin-top: 2.4em; margin-bottom: .6em; }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.45rem); margin-top: 1.8em; margin-bottom: .4em; }

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

section { padding: 4rem 0; }
.section-alt { background: var(--bg-alt); }
.section-cream { background: var(--bg); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(251,249,244,.82);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid rgba(28,27,24,.07);
}
.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  height: 100%;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.3rem;
  color: var(--primary-dark);
  letter-spacing: -.02em;
}
.logo:hover { color: var(--primary); }
.logo svg { height: 32px; width: auto; flex-shrink: 0; }

.main-nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 2rem;
  margin: 0;
  padding: 0;
}
.main-nav a {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-weight: 600;
  color: var(--text);
  padding: .4rem 0;
  position: relative;
}
.main-nav a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width .25s ease;
}
.main-nav a:hover { color: var(--primary); }
.main-nav a:hover::after { width: 100%; }
.main-nav .nav-cta a {
  background: var(--accent);
  color: #fff;
  padding: .6rem 1.2rem;
  border-radius: 999px;
}
.main-nav .nav-cta a::after { display: none; }
.main-nav .nav-cta a:hover { background: #c1512d; color: #fff; }

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
}
.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  margin: 0 auto;
  background: var(--primary-dark);
  border-radius: 2px;
  transition: transform .3s ease, opacity .3s ease;
}
.nav-open .menu-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-open .menu-toggle span:nth-child(2) { opacity: 0; }
.nav-open .menu-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: .9rem;
  font-weight: 600;
  letter-spacing: .02em;
  padding: .8rem 1.6rem;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all .22s ease;
  text-align: center;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-primary:hover {
  background: #c1512d;
  border-color: #c1512d;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-outline:hover {
  background: var(--primary);
  color: #fff;
}

/* ---------- Hero ---------- */
.hero {
  background: var(--bg-alt);
  padding: 4.5rem 0 4rem;
  border-bottom: 1px solid rgba(28,27,24,.06);
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr);
  gap: 3rem;
  align-items: center;
}
.hero-grid > * { min-width: 0; }
.hero h1 {
  font-size: clamp(2.3rem, 5.5vw, 3.4rem);
  margin-bottom: 1rem;
}
.hero .lead {
  font-size: 1.2rem;
  color: var(--text-light);
  max-width: 34em;
  margin-bottom: 1.8rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: .9rem; }
.hero-aside {
  background: #fff;
  border: 1px solid rgba(28,27,24,.1);
  border-radius: var(--radius-lg);
  padding: 1.8rem;
  box-shadow: var(--shadow-sm);
}
.hero-aside h3 {
  margin-top: 0;
  font-size: 1.1rem;
  color: var(--primary);
}
.hero-aside p { color: var(--text-light); font-size: .98rem; margin-top: .5rem; }
.hero-aside .rule {
  width: 40px; height: 2px;
  background: var(--accent);
  margin: .3rem 0 1rem;
}

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  font-size: .74rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--text-light);
  margin-bottom: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: center;
}
.breadcrumb a { color: var(--text-light); font-weight: 600; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .sep { opacity: .5; }

/* ---------- Cards ---------- */
.section-head { max-width: 40em; margin-bottom: 2.5rem; }
.section-head .eyebrow {
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--accent);
  font-weight: 700;
}
.section-head h2 { margin-top: .4rem; }
.section-head p { color: var(--text-light); margin-top: .6rem; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.8rem;
}
.card-grid > * { min-width: 0; }
.card {
  background: #fff;
  border: 1px solid rgba(28,27,24,.08);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease;
  display: flex;
  flex-direction: column;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.card-img {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--secondary);
}
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 1.4rem 1.5rem 1.6rem; display: flex; flex-direction: column; gap: .6rem; flex: 1; }
.card-tag {
  align-self: flex-start;
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-weight: 700;
  color: var(--primary);
  background: var(--secondary);
  padding: .3rem .7rem;
  border-radius: 999px;
}
.card h3 { margin: 0; font-size: 1.25rem; }
.card h3 a { color: var(--text); }
.card h3 a:hover { color: var(--primary); }
.card p { color: var(--text-light); font-size: .96rem; margin: 0; }
.card .card-link {
  margin-top: auto;
  font-size: .82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--accent);
}

/* ---------- Article ---------- */
.article {
  max-width: var(--read-width);
  margin: 0 auto;
  padding: 3.5rem 1.5rem;
}
.article > p { margin: 1.3rem 0; }
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  color: var(--text-light);
  font-size: .88rem;
  margin: 1.2rem 0 2rem;
  padding-bottom: 1.4rem;
  border-bottom: 1px solid rgba(28,27,24,.1);
}
.article-meta .cat {
  color: var(--primary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-size: .72rem;
}
.article ul, .article ol { margin: 1.3rem 0; padding-left: 1.4rem; }
.article li { margin: .5rem 0; }
.article ul li::marker { color: var(--accent); }

.article-img, figure { margin: 2.2rem 0; }
.article-img img, figure img { border-radius: var(--radius); width: 100%; }
figcaption {
  color: var(--text-light);
  font-size: .85rem;
  margin-top: .7rem;
  font-style: italic;
  text-align: center;
}

/* ---------- Quote ---------- */
blockquote {
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1.4;
  font-style: italic;
  color: var(--primary-dark);
  border-left: 3px solid var(--accent);
  padding: .4rem 0 .4rem 1.6rem;
  margin: 2.4rem 0;
}

/* ---------- Info box ---------- */
.info-box {
  background: var(--secondary);
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.4rem 1.6rem;
  margin: 2.2rem 0;
}
.info-box .info-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  margin-bottom: .4rem;
  color: var(--primary-dark);
}
.info-box p { margin: 0; color: var(--text); font-size: .98rem; }
.info-box.tip { border-left-color: var(--primary); }
.info-box.warning { border-left-color: var(--accent); background: #faece5; }
.info-box.warning .info-title { color: var(--accent); }

/* ---------- Table ---------- */
.table-wrap { overflow-x: auto; margin: 2.2rem 0; border-radius: var(--radius); border: 1px solid rgba(28,27,24,.1); }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: .95rem;
  min-width: 520px;
}
table thead th {
  background: var(--primary);
  color: #fff;
  font-family: var(--font-body);
  font-weight: 600;
  text-align: left;
  padding: 1rem 1.1rem;
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .06em;
}
table th.featured, table td.featured {
  background: var(--secondary);
}
table thead th.featured { background: var(--accent); }
table td { padding: .9rem 1.1rem; border-top: 1px solid rgba(28,27,24,.08); }
table tbody tr:nth-child(even) { background: var(--bg-alt); }
table tbody tr:nth-child(even) td.featured { background: #e7e1d2; }

/* ---------- FAQ ---------- */
.faq { max-width: var(--read-width); margin: 0 auto; }
.faq details {
  border: 1px solid rgba(28,27,24,.12);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  background: #fff;
  transition: box-shadow .2s ease;
}
.faq details[open] { box-shadow: var(--shadow-sm); }
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 1.1rem 1.4rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  color: var(--primary-dark);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '';
  width: 12px; height: 12px;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(45deg);
  transition: transform .25s ease;
  flex-shrink: 0;
}
.faq details[open] summary::after { transform: rotate(-135deg); }
.faq details p {
  padding: 0 1.4rem 1.3rem;
  color: var(--text-light);
  margin: 0;
}

/* ---------- Timeline ---------- */
.timeline { max-width: var(--read-width); margin: 2rem auto; counter-reset: step; }
.timeline-item {
  position: relative;
  padding: 0 0 1.8rem 3.4rem;
  border-left: 2px solid rgba(31,78,70,.2);
  margin-left: 1rem;
}
.timeline-item:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline-item::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: -19px; top: -4px;
  width: 36px; height: 36px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 600;
}
.timeline-item h3 { margin: 0 0 .3rem; font-size: 1.15rem; }
.timeline-item p { margin: 0; color: var(--text-light); }

/* ---------- Testimonial ---------- */
.testimonial {
  background: #fff;
  border: 1px solid rgba(28,27,24,.08);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  max-width: 40em;
  margin: 0 auto;
  text-align: center;
}
.stars { color: var(--accent); letter-spacing: .1em; font-size: 1.1rem; margin-bottom: .8rem; }
.testimonial p { font-family: var(--font-display); font-style: italic; font-size: 1.25rem; color: var(--primary-dark); }
.testimonial .author { margin-top: 1rem; font-size: .9rem; color: var(--text-light); font-weight: 600; }

/* ---------- Related ---------- */
.related-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}
.related-cards > * { min-width: 0; }
.related-card {
  background: #fff;
  border: 1px solid rgba(28,27,24,.08);
  border-radius: var(--radius);
  padding: 1.3rem;
  box-shadow: var(--shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease;
}
.related-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.related-card .cat {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--accent);
  font-weight: 700;
}
.related-card h3 { margin: .5rem 0 0; font-size: 1.1rem; }
.related-card h3 a { color: var(--text); }

/* ---------- Author ---------- */
.author-card {
  display: flex;
  gap: 1.4rem;
  align-items: center;
  background: var(--secondary);
  border-radius: var(--radius-lg);
  padding: 1.6rem 1.8rem;
  max-width: var(--read-width);
  margin: 2.5rem auto;
}
.author-card img {
  width: 76px; height: 76px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid #fff;
}
.author-card .name { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; color: var(--primary-dark); }
.author-card .role { font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); font-weight: 600; }
.author-card .bio { color: var(--text-light); font-size: .95rem; margin-top: .4rem; }

/* ---------- Sidebar TOC ---------- */
.toc {
  position: sticky;
  top: calc(var(--header-h) + 1.5rem);
  background: #fff;
  border: 1px solid rgba(28,27,24,.1);
  border-radius: var(--radius);
  padding: 1.3rem 1.4rem;
}
.toc h4 { font-size: .75rem; text-transform: uppercase; letter-spacing: .12em; color: var(--text-light); margin-bottom: .8rem; }
.toc ul { list-style: none; padding: 0; margin: 0; }
.toc li { margin: .5rem 0; }
.toc a { font-size: .92rem; color: var(--text); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--primary-dark);
  color: var(--secondary);
  padding: 3.5rem 0 1.5rem;
  margin-top: 4rem;
}
.footer-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
  gap: 2.5rem;
}
.footer-grid > * { min-width: 0; }
.footer-brand .logo { color: var(--bg); font-size: 1.4rem; }
.footer-brand .logo svg { filter: brightness(0) invert(1); }
.footer-brand p { color: rgba(238,241,233,.7); margin-top: 1rem; font-size: .95rem; max-width: 26em; }
.footer-col h4 {
  font-family: var(--font-body);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: #fff;
  margin-bottom: 1rem;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin: .55rem 0; }
.footer-col a { color: rgba(238,241,233,.78); font-size: .95rem; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  max-width: var(--max-width);
  margin: 2.5rem auto 0;
  padding: 1.5rem 1.5rem 0;
  border-top: 1px solid rgba(238,241,233,.15);
  font-size: .85rem;
  color: rgba(238,241,233,.6);
  text-align: center;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2rem; }
  .card-grid, .related-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
  .menu-toggle { display: flex; }
  .main-nav {
    position: fixed;
    top: var(--header-h);
    right: 0;
    width: min(78%, 320px);
    height: calc(100vh - var(--header-h));
    background: var(--bg);
    border-left: 1px solid rgba(28,27,24,.1);
    box-shadow: var(--shadow-md);
    transform: translateX(100%);
    transition: transform .3s ease;
    padding: 2rem 1.5rem;
    overflow-y: auto;
  }
  .nav-open .main-nav { transform: translateX(0); }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: .3rem; }
  .main-nav a { display: block; padding: .9rem .4rem; min-height: 44px; font-size: .85rem; }
  .main-nav a::after { display: none; }
  .main-nav .nav-cta a { text-align: center; margin-top: 1rem; padding: .9rem 1.2rem; }

  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
  section { padding: 3rem 0; }
  .card-grid, .related-cards { grid-template-columns: minmax(0, 1fr); }
  .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 1.8rem; }
  .author-card { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  html { font-size: 14.5px; }
  .container, .header-inner { padding: 0 1rem; }
  .article { padding: 2.5rem 1rem; }
  blockquote { font-size: 1.25rem; }
  .hero { padding: 3rem 0 2.5rem; }
}
