/* Rooted and Rising Legacy Services — shared styles
   Brand colors and type follow the Rooted & Rising look:
   warm cream ground, deep forest green, dark ink, terracotta accent,
   Fraunces headings with DM Sans body text. */

@font-face {
  font-family: "WLS Script"; font-display: swap;
  src: url("r-script.woff2") format("woff2");
}

:root {
  --cream: #F7F1E6;
  --cream-2: #EFE6D6;
  --paper: #FFFCF6;
  --ink: #1F2A24;
  --muted: #4A544D;
  --forest: #1F4A3A;
  --forest-dark: #163829;
  --forest-soft: #2E6350;
  --terracotta: #B5603D;
  --terracotta-text: #9A4C2D;
  --line: #E3D8C5;
  --on-dark: #EFE9DD;
  --on-dark-muted: #CFD8D1;
  --radius: 18px;
  --max: 1120px;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; font-family: var(--sans); font-size: 1.0625rem; line-height: 1.65;
  color: var(--ink); background: var(--cream); overflow-wrap: break-word;
}
h1, h2, h3 { font-family: var(--serif); font-weight: 600; color: var(--ink); line-height: 1.15; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.4rem); letter-spacing: -0.5px; text-wrap: balance; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.25rem); text-wrap: balance; }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
a { color: var(--forest); text-underline-offset: 3px; }
a:hover { color: var(--terracotta-text); }
:focus-visible { outline: 3px solid var(--terracotta); outline-offset: 3px; border-radius: 6px; }
.dark :focus-visible, footer :focus-visible { outline-color: var(--cream); }
img { max-width: 100%; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
section { padding: 64px 0; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 700px; }
.eyebrow {
  font-size: 0.85rem; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--terracotta-text); margin-bottom: 12px;
}
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 20;
  background: var(--forest); color: var(--cream);
  padding: 10px 16px; border-radius: 8px; text-decoration: none; font-weight: 700;
}
.skip:focus { top: 12px; color: var(--cream); }

/* Header and tabs */
.site-header { background: var(--cream); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.header-top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-top: 14px; padding-bottom: 10px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand-mark {
  width: 48px; height: 48px; flex: none; border-radius: 50%;
  background: var(--forest); color: var(--cream);
  display: flex; align-items: center; justify-content: center;
  font-family: "WLS Script", "Snell Roundhand", "Apple Chancery", cursive;
  font-size: 28px; line-height: 1; padding-top: 5px; padding-left: 3px; overflow: hidden;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name { font-family: var(--serif); font-weight: 600; font-size: 1.25rem; }
.brand-tag { font-size: 0.82rem; color: var(--muted); }
.tabs { margin-top: 2px; }
.tabs ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; gap: 4px; overflow-x: auto; scrollbar-width: thin;
}
.tabs a {
  display: inline-flex; align-items: center; min-height: 46px; padding: 0 14px;
  white-space: nowrap; text-decoration: none; font-weight: 500; font-size: 0.98rem;
  color: var(--muted); border-bottom: 3px solid transparent;
}
.tabs a:hover { color: var(--forest); border-bottom-color: var(--line); }
.tabs a[aria-current="page"] { color: var(--forest); font-weight: 700; border-bottom-color: var(--terracotta); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; text-align: center;
  min-height: 48px; padding: 12px 24px; border-radius: 999px;
  font-weight: 700; font-size: 1rem; text-decoration: none; border: 2px solid var(--forest);
  font-family: var(--sans); cursor: pointer;
}
.btn-primary { background: var(--forest); color: var(--cream); }
.btn-primary:hover { background: var(--forest-dark); border-color: var(--forest-dark); color: var(--cream); }
.btn-outline { background: transparent; color: var(--forest); }
.btn-outline:hover { background: var(--cream-2); color: var(--forest); }
.btn-small { min-height: 44px; padding: 8px 18px; font-size: 0.95rem; }
.btn-light { background: var(--cream); color: var(--forest); border-color: var(--cream); }
.btn-light:hover { background: var(--paper); color: var(--forest); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }

/* Page intro */
.page-hero { padding: 56px 0 40px; }
.page-hero .lead { margin-bottom: 0; }
.crumb { display: inline-block; margin-bottom: 18px; font-weight: 500; text-decoration: none; }
.license-line { font-size: 0.95rem; color: var(--muted); margin-top: 16px; }

/* Home hero */
.home-hero { padding: 64px 0 72px; }
.home-hero-single > div { max-width: 820px; }
.home-hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.hero-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.hero-photos img {
  width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover;
  border-radius: var(--radius); background: var(--cream-2);
  box-shadow: 0 10px 30px rgba(31, 42, 36, 0.12);
}
.hero-photos img:last-child { margin-top: 36px; }

/* Sections */
.bg-paper { background: var(--paper); }
.bg-cream2 { background: var(--cream-2); }
.dark { background: var(--forest); color: var(--on-dark); }
.dark h2, .dark h3 { color: var(--paper); }
.dark .lead { color: var(--on-dark-muted); }
.dark a { color: var(--paper); }

/* Cards */
.grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); margin-top: 28px; }
.card { background: var(--paper); border-radius: var(--radius); padding: 26px; border: 1px solid var(--line); }
.card p:last-child { margin-bottom: 0; }
.bar { width: 44px; height: 5px; border-radius: 3px; background: var(--terracotta); margin-bottom: 14px; }
.bg-paper .card { background: var(--cream); }
.dark .card { background: var(--forest-dark); border-color: var(--forest-soft); }

.photo-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.photo-card > :not(.card-photo) { margin-left: 26px; margin-right: 26px; }
.photo-card h3 { margin-top: 22px; }
.photo-card p:last-child { margin-bottom: 26px; }
.card-photo { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; background: var(--cream-2); }
.dark .card-photo { background: var(--forest-soft); }
.note { margin-top: 28px; padding: 16px 20px; border-radius: 12px; background: var(--forest-dark); font-size: 0.98rem; color: var(--on-dark-muted); }

/* Topic and article tiles */
.tile {
  display: flex; flex-direction: column; text-decoration: none; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.tile:hover { color: var(--ink); transform: translateY(-2px); box-shadow: 0 12px 28px rgba(31, 42, 36, 0.12); }
@media (prefers-reduced-motion: reduce) { .tile, .tile:hover { transition: none; transform: none; } }
.tile img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; background: var(--cream-2); }
.tile-body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.tile-kicker { font-size: 0.8rem; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--terracotta-text); }
.tile h3 { margin: 0; font-size: 1.25rem; }
.tile p { margin: 0; color: var(--muted); font-size: 0.98rem; }
.tile-link { margin-top: auto; padding-top: 10px; font-weight: 700; color: var(--forest); }

/* CTA band */
.cta-short { display: none; }
.cta-band { background: var(--forest); color: var(--on-dark); border-radius: 24px; padding: 36px; display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between; }
.cta-band h2 { color: var(--paper); margin: 0 0 6px; font-size: clamp(1.4rem, 3vw, 1.9rem); }
.cta-band p { margin: 0; color: var(--on-dark-muted); max-width: 560px; }

/* Comparison */
.compare { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); margin-top: 28px; }
.compare dl { margin: 0; }
.compare dt { font-weight: 700; color: var(--forest); margin-top: 12px; }
.compare dt:first-child { margin-top: 0; }
.compare dd { margin: 2px 0 0; color: var(--muted); }
.fair-note { margin-top: 24px; max-width: 760px; }

/* Glossary and DIME */
.glossary { display: grid; gap: 16px 24px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); margin: 28px 0 0; }
.glossary div { background: var(--paper); border-radius: 14px; padding: 18px 20px; border: 1px solid var(--line); }
.bg-paper .glossary div { background: var(--cream); }
.glossary dt { font-weight: 700; color: var(--forest); }
.glossary dd { margin: 4px 0 0; color: var(--muted); }
.dime { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }

/* Steps */
.steps { list-style: none; padding: 0; }
.step-num {
  width: 46px; height: 46px; border-radius: 50%; background: var(--forest); color: var(--cream);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-weight: 700; font-size: 1.3rem; margin-bottom: 12px;
}

/* About */
.about-grid { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 56px; align-items: start; }
.about-photo { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); border: 3px solid var(--terracotta); }
.about-text { max-width: 680px; }
.about-text p { color: var(--muted); }
.about-kicker { font-family: var(--serif); font-style: italic; font-size: 1.25rem; color: var(--terracotta-text) !important; margin-top: -0.3em; }
.about-sig { font-family: var(--serif); font-size: 1.2rem; font-weight: 600; color: var(--ink) !important; margin-top: 1.4em; }
.about-sig span { font-family: var(--sans); font-size: 0.95rem; font-weight: 400; color: var(--muted); }

/* Article */
.article { max-width: 760px; }
.article-meta { color: var(--muted); font-size: 0.95rem; }
.article-photo { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); margin: 8px 0 32px; background: var(--cream-2); display: block; }
.article h2 { font-size: 1.55rem; margin-top: 1.6em; }
.article ul { padding-left: 1.3em; margin: 0 0 1.2em; }
.article li { margin-bottom: 0.45em; }
.article blockquote {
  margin: 1.6em 0; padding: 18px 22px; border-radius: 14px;
  background: var(--paper); border: 1px solid var(--line); font-family: var(--serif); font-size: 1.15rem;
}
.callout {
  margin-top: 36px; padding: 24px; border-radius: var(--radius); background: var(--cream-2);
  display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between;
}
.callout p { margin: 0; }
.callout strong { font-family: var(--serif); font-size: 1.2rem; display: block; }
.disclaimer-small { font-size: 0.92rem; color: var(--muted); }

/* Checklist */
.checklist { max-width: 820px; }
.checklist fieldset { border: 0; margin: 0; padding: 0; }
.checklist legend { font-family: var(--serif); font-weight: 600; font-size: 1.3rem; margin-bottom: 14px; padding: 0; }
.check-item {
  display: flex; align-items: flex-start; gap: 14px; padding: 14px 16px; margin-bottom: 10px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 12px; cursor: pointer; min-height: 52px;
}
.check-item:hover { border-color: var(--forest-soft); }
.check-item input { width: 22px; height: 22px; margin: 2px 0 0; flex: none; accent-color: var(--forest); cursor: pointer; }
.check-item:has(input:checked) { background: #EEF3EF; border-color: var(--forest-soft); }
.results { margin-top: 28px; padding: 28px; border-radius: var(--radius); background: var(--paper); border: 2px solid var(--forest); }
.results[hidden] { display: none; }
.score { font-family: var(--serif); font-size: clamp(2.2rem, 6vw, 3rem); font-weight: 600; color: var(--forest); line-height: 1; margin-bottom: 6px; }
.meter { height: 12px; border-radius: 999px; background: var(--cream-2); overflow: hidden; margin: 12px 0 18px; }
.meter span { display: block; height: 100%; width: 0; background: var(--forest); border-radius: 999px; transition: width 0.4s ease; }
@media (prefers-reduced-motion: reduce) { .meter span { transition: none; } }
.plan { padding-left: 1.2em; }
.plan li { margin-bottom: 0.7em; }
.plan strong { color: var(--ink); }

/* FAQ */
.faq { max-width: 820px; }
details { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 4px 22px; margin-bottom: 12px; }
summary { cursor: pointer; font-weight: 700; color: var(--forest); font-size: 1.08rem; padding: 14px 0; min-height: 44px; }
details[open] summary { border-bottom: 1px solid var(--line); margin-bottom: 12px; }
details p { color: var(--muted); }

/* Contact box */
.next-box { background: var(--paper); border: 2px dashed var(--terracotta); border-radius: var(--radius); padding: 28px; }
.next-box h3:not(:first-child) { margin-top: 1.4em; }
.contact-list { margin: 0 0 1em; padding-left: 1.2em; }
.contact-list li { margin-bottom: 0.4em; }

/* Footer */
footer { background: var(--forest-dark); color: var(--on-dark-muted); padding: 48px 0 40px; font-size: 0.95rem; margin-top: 0; }
footer a { color: var(--paper); }
footer a:hover { color: var(--cream-2); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) repeat(2, minmax(0, 1fr)); gap: 32px; }
.footer-brand { font-family: var(--serif); font-size: 1.3rem; font-weight: 600; color: var(--paper); margin-bottom: 8px; }
.footer-head { color: var(--paper); font-weight: 700; margin-bottom: 8px; }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: 6px; }
.disclaimer { border-top: 1px solid var(--forest-soft); padding-top: 18px; margin-top: 28px; color: #B9C6BD; }

/* Mobile */
@media (max-width: 860px) {
  .home-hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero-photos { max-width: 420px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  section { padding: 48px 0; }
  .page-hero { padding: 36px 0 24px; }
  .home-hero { padding: 36px 0 48px; }
  .brand-tag { display: none; }
  .brand-name { font-size: 1.05rem; }
  .brand-mark { width: 42px; height: 42px; font-size: 25px; }
  .header-top .btn.header-cta { width: auto; padding: 8px 18px; font-size: 0.95rem; }
  .cta-long { display: none; }
  .cta-short { display: inline; }
  .site-header { position: static; }
  .about-grid { grid-template-columns: 1fr; gap: 28px; }
  .about-photo { max-width: 280px; }
  .btn { width: 100%; }
  .btn-row .btn { width: 100%; }
  .card, .next-box, .results { padding: 22px; }
  .photo-card { padding: 0; }
  .photo-card > :not(.card-photo) { margin-left: 22px; margin-right: 22px; }
  .cta-band { padding: 26px; }
  details { padding: 4px 16px; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 1000px) { .br-desk { display: none; } }
