/* ============================================================
   Heritas House — brand stylesheet (shared base for all versions)
   Palette: warm cream, charcoal ink, muted sage accent
   Type: Fraunces (serif, italic emphasis) + Inter (sans body)
   ============================================================ */

:root {
  --cream:      #F7F4EF;   /* page background      */
  --cream-2:    #FDFBF7;   /* raised surfaces      */
  --ink:        #23221F;   /* text + dark sections */
  --ink-soft:   #4A4843;   /* secondary text       */
  --sage:       #6E7D62;   /* accent               */
  --sage-dark:  #556048;   /* accent (emphasis)    */
  --sage-tint:  #E7EAE0;   /* accent wash          */
  --line:       #E3DDD2;   /* borders              */
  --ondark:     #F7F4EF;   /* text on dark sections */
  --ondark-soft:#b9b4a8;   /* muted text on dark    */
  --radius:     4px;
  --maxw:       1120px;
  --ease:       cubic-bezier(.22,.61,.36,1);
  --header-bg:  rgba(247,244,239,.88);
}

/* ---------- Dark theme ----------
   Auto-applies to visitors whose device is in dark mode; a toggle can
   force light/dark via <html data-theme="...">. Semantic var names mean
   every version + page inherits this with no per-component edits. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --cream:      #1C1B19;   /* page background now dark   */
    --cream-2:    #26241F;   /* raised surfaces            */
    --ink:        #ECE7DD;   /* primary text now light     */
    --ink-soft:   #B4AE9F;   /* secondary text             */
    --sage:       #8A9B7B;   /* brighter sage for contrast */
    --sage-dark:  #A9C48F;   /* emphasis sage on dark      */
    --sage-tint:  #2E3328;   /* accent wash (dark)         */
    --line:       #3A362E;   /* borders                    */
    --ondark:     #ECE7DD;   /* text on the darkest blocks */
    --ondark-soft:#9a9589;
    --header-bg:  rgba(28,27,25,.9);
  }
  /* The intentionally-dark blocks (trust strip, footer, hero-b, rails)
     go a shade deeper than the page so they stay distinct. */
  :root:not([data-theme="light"]) .trust-strip,
  :root:not([data-theme="light"]) .site-footer,
  :root:not([data-theme="light"]) .hero-b,
  :root:not([data-theme="light"]) .post-feature,
  :root:not([data-theme="light"]) .rail-card,
  :root:not([data-theme="light"]) .article-cta,
  :root:not([data-theme="light"]) .how-cta { background: #111 !important; }
}
/* Explicit dark toggle (works regardless of device setting) */
:root[data-theme="dark"] {
  --cream:#1C1B19; --cream-2:#26241F; --ink:#ECE7DD; --ink-soft:#B4AE9F;
  --sage:#8A9B7B; --sage-dark:#A9C48F; --sage-tint:#2E3328; --line:#3A362E;
  --ondark:#ECE7DD; --ondark-soft:#9a9589; --header-bg:rgba(28,27,25,.9);
}
:root[data-theme="dark"] .trust-strip,
:root[data-theme="dark"] .site-footer,
:root[data-theme="dark"] .hero-b,
:root[data-theme="dark"] .post-feature,
:root[data-theme="dark"] .rail-card,
:root[data-theme="dark"] .article-cta { background:#111 !important; }

/* Keep text on the always-dark blocks light in BOTH themes.
   (In dark mode var(--cream) flips dark, so target these explicitly.) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .trust-strip,
  :root:not([data-theme="light"]) .site-footer,
  :root:not([data-theme="light"]) .footer-mark .wordmark-name,
  :root:not([data-theme="light"]) .hero-b h1 { color: var(--ondark); }
  :root:not([data-theme="light"]) .trust-item strong { color: #fff; }
}
:root[data-theme="dark"] .trust-strip,
:root[data-theme="dark"] .site-footer,
:root[data-theme="dark"] .footer-mark .wordmark-name,
:root[data-theme="dark"] .hero-b h1 { color: var(--ondark); }
:root[data-theme="dark"] .trust-item strong { color: #fff; }

/* ---------- Theme toggle button ---------- */
.theme-toggle {
  background: transparent; border: 1px solid var(--line); color: var(--ink);
  width: 38px; height: 38px; border-radius: 50%; cursor: pointer;
  display: inline-grid; place-items: center; font-size: 1rem; line-height: 1;
  transition: background .2s, border-color .2s;
}
.theme-toggle:hover { border-color: var(--sage); }
.nav-wrap .theme-toggle { margin-left: .4rem; }

* { box-sizing: border-box; }
html, body { overflow-x: hidden; max-width: 100%; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Inter", system-ui, sans-serif;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0;
  overflow-wrap: break-word;
  word-wrap: break-word;
}
h1 { font-size: clamp(2.1rem, 9vw, 4.4rem); }
h2 { font-size: clamp(1.75rem, 7vw, 3rem); }
h3 { font-size: 1.3rem; }
em { font-style: italic; color: var(--sage-dark); font-weight: 400; }

p { margin: 0 0 1rem; }
a { color: inherit; text-decoration: none; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(1.25rem, 4vw, 2.5rem); }
.narrow { max-width: 760px; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .72rem;
  font-weight: 600;
  color: var(--sage);
  margin: 0 0 1rem;
}
.body-lg { font-size: 1.15rem; color: var(--ink-soft); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: .85rem 1.6rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
  transition: all .25s var(--ease);
  border: 1.5px solid transparent;
}
.btn-primary { background: var(--sage); color: #fff; }
.btn-primary:hover { background: var(--sage-dark); transform: translateY(-1px); }
.btn-ghost { border-color: var(--ink); color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--cream); }
.btn-block { display: block; text-align: center; width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-wrap { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.wordmark { display: flex; flex-direction: column; line-height: 1; }
.wordmark-name { font-family: "Fraunces", serif; font-weight: 500; letter-spacing: .12em; font-size: 1.05rem; }
.wordmark-tag { font-size: .62rem; letter-spacing: .14em; text-transform: uppercase; color: var(--sage); margin-top: 4px; }
.nav { display: flex; align-items: center; gap: 1.9rem; }
.nav a { font-size: .92rem; color: var(--ink-soft); transition: color .2s; }
.nav a:hover { color: var(--ink); }
.nav-cta { background: var(--sage); color: #fff !important; padding: .55rem 1.1rem; border-radius: var(--radius); }
.nav-cta:hover { background: var(--sage-dark); }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 6px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--ink); display: block; transition: .3s; }

/* ---------- Hero ---------- */
.hero { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.hero-inner { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero-copy h1 { margin-bottom: 1.3rem; }
.lede { font-size: 1.25rem; color: var(--ink-soft); max-width: 34ch; margin-bottom: 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-bottom: 1.4rem; }
.hero-assurance { font-size: .9rem; color: var(--sage-dark); font-weight: 500; }
.hero-visual { display: flex; justify-content: center; }
.hero-card {
  background: var(--cream-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 3rem 2.4rem;
  box-shadow: 0 30px 60px -30px rgba(85,96,72,.35);
  text-align: center;
  max-width: 360px;
}
.hero-seal {
  width: 56px; height: 56px; margin: 0 auto 1.6rem;
  display: grid; place-items: center;
  border-radius: 50%; background: var(--sage-tint); color: var(--sage-dark);
  font-size: 1.4rem;
}
.hero-quote { font-family: "Fraunces", serif; font-style: italic; font-size: 1.35rem; line-height: 1.4; color: var(--ink); margin: 0; }

/* ---------- Trust strip ---------- */
.trust-strip { background: var(--ink); color: var(--cream); }
.trust-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 1.5rem; padding-top: 1.6rem; padding-bottom: 1.6rem; }
.trust-item { display: flex; flex-direction: column; }
.trust-item strong { font-family: "Fraunces", serif; font-size: 1.05rem; font-weight: 500; }
.trust-item span { font-size: .82rem; color: #b9b4a8; }

/* ---------- Sections ---------- */
.section { padding: clamp(3.5rem, 7vw, 6rem) 0; }
.section-alt { background: var(--cream-2); }
.section-head { max-width: 640px; margin-bottom: 3rem; }

/* ---------- Cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.5rem; }
.card {
  background: var(--cream); border: 1px solid var(--line);
  border-radius: 8px; padding: 2.2rem 1.9rem;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.section-alt .card { background: var(--cream); }
.card:hover { transform: translateY(-4px); box-shadow: 0 20px 40px -24px rgba(85,96,72,.4); }
.card-icon { width: 46px; height: 46px; border-radius: 50%; background: var(--sage-tint); color: var(--sage-dark); display: grid; place-items: center; font-size: 1.2rem; margin-bottom: 1.3rem; }
.card h3 { margin-bottom: .7rem; }
.card p { color: var(--ink-soft); margin: 0; }

/* ---------- Steps ---------- */
.steps { list-style: none; counter-reset: s; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3,1fr); gap: 2rem; }
.steps li { position: relative; }
.step-num { font-family: "Fraunces", serif; font-size: 2.4rem; color: var(--sage); display: block; margin-bottom: .6rem; }
.steps h3 { margin-bottom: .5rem; }
.steps p { color: var(--ink-soft); margin: 0; }

/* ---------- Pricing ---------- */
.price-card {
  background: var(--cream-2); border: 1px solid var(--line);
  border-radius: 12px; padding: clamp(2rem, 4vw, 3rem);
  box-shadow: 0 30px 60px -40px rgba(85,96,72,.4);
}
.price-head { display: flex; align-items: baseline; justify-content: space-between; padding-bottom: 1.4rem; border-bottom: 1px solid var(--line); margin-bottom: 1.6rem; }
.price { font-family: "Fraunces", serif; font-size: 2.6rem; font-weight: 500; color: var(--sage-dark); }
.price-list { list-style: none; padding: 0; margin: 0 0 1.6rem; }
.price-list li { padding: .55rem 0 .55rem 1.9rem; position: relative; color: var(--ink-soft); border-bottom: 1px dashed var(--line); }
.price-list li::before { content: "✓"; position: absolute; left: 0; color: var(--sage); font-weight: 700; }
.price-note { font-size: .92rem; color: var(--ink-soft); background: var(--sage-tint); padding: 1rem 1.2rem; border-radius: var(--radius); margin-bottom: 1.6rem; }
.price-sub { font-size: .82rem; color: var(--ink-soft); text-align: center; margin: 1rem 0 0; }

/* ---------- FAQ ---------- */
.faq details { border-bottom: 1px solid var(--line); padding: 1.3rem 0; }
.faq summary { font-family: "Fraunces", serif; font-size: 1.15rem; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--sage); font-size: 1.4rem; transition: transform .3s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 1rem 0 0; color: var(--ink-soft); }

/* ---------- Booking ---------- */
.book-inner { text-align: center; }
.book-inner .section-head { margin: 0 auto 2rem; }
.book-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--cream); padding: 3.5rem 0 2.2rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 2rem; padding-bottom: 2.5rem; border-bottom: 1px solid rgba(255,255,255,.12); }
.footer-mark .wordmark-name { color: var(--cream); }
.footer-mark .wordmark-tag { color: var(--sage); }
.footer-note { color: #b9b4a8; font-size: .9rem; max-width: 30ch; margin-top: 1rem; }
.footer-col h4 { font-family: "Inter", sans-serif; text-transform: uppercase; letter-spacing: .12em; font-size: .72rem; color: var(--sage); margin-bottom: .8rem; }
.footer-col p { color: #d6d1c6; font-size: .92rem; line-height: 1.8; }
.footer-col a:hover { color: #fff; }
.footer-legal { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; padding-top: 1.5rem; font-size: .8rem; color: #9a9589; }
.footer-legal a:hover { color: #fff; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .nav { position: fixed; inset: 76px 0 auto 0; flex-direction: column; background: var(--cream); padding: 1.5rem 2rem 2rem; gap: 1.2rem; border-bottom: 1px solid var(--line); transform: translateY(-120%); transition: transform .35s var(--ease); align-items: flex-start; }
  .nav.open { transform: translateY(0); }
  .nav-toggle { display: flex; }
  .hero { padding: 2.5rem 0 3rem; }
  .hero-inner { grid-template-columns: 1fr; gap: 2rem; }
  .hero-visual { order: 1; }                 /* keep card below copy on mobile */
  .hero-card { padding: 2.2rem 1.8rem; max-width: 100%; }
  .lede { max-width: 100%; font-size: 1.1rem; }
  .cards, .steps, .trust-grid { grid-template-columns: 1fr; }
  .trust-grid { gap: 1.1rem; padding-top: 1.6rem; padding-bottom: 1.6rem; }
  .section-head { margin-bottom: 2rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-legal { justify-content: flex-start; }
}
@media (max-width: 520px) {
  .container { padding: 0 1.25rem; }         /* guarantee side padding on small screens */
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { text-align: center; }
  .section { padding: 2.8rem 0; }
  .card { padding: 1.8rem 1.4rem; }
  .price-card { padding: 1.6rem 1.3rem; }
  .price-head { flex-direction: column; align-items: flex-start; gap: .4rem; }
  .site-footer { padding: 2.8rem 0 2.4rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.8rem; padding-bottom: 2rem; }
  .book-actions { flex-direction: column; }
  .book-actions .btn { width: 100%; text-align: center; }
}

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