/* ============================================================
   The Ember House Foundation — premium build
   Black / gold / ivory. Cormorant Garamond + Inter.
   All text/background pairs are WCAG AA compliant (4.5:1+).
   ============================================================ */

:root {
  --black: #0a0a0a;
  --ink: #17140f;
  --ivory: #faf7f0;
  --white: #ffffff;
  --gold: #c9a227;
  --gold-bright: #e3b32d;
  --gold-deep: #8a5a0c;
  --gold-soft: #f3e9cf;
  --red: #8b1a1a;
  --muted-dark: #cfc9bc;
  --muted-light: #5c554a;
  --line-dark: rgba(201, 162, 39, 0.28);
  --line-light: rgba(138, 90, 12, 0.22);

  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --radius: 14px;
  --maxw: 1180px;
  --shadow: 0 24px 60px rgba(10, 10, 10, 0.10);
  --shadow-photo: 0 30px 70px rgba(10, 10, 10, 0.22);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--black);
  line-height: 1.7;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
::selection { background: var(--gold); color: #111007; }

/* ---------- Type ---------- */
h1, h2, h3, .serif { font-family: var(--serif); font-weight: 500; line-height: 1.12; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.7rem, 5.6vw, 4.6rem); letter-spacing: 0.01em; }
h2 { font-size: clamp(2.05rem, 3.7vw, 3.1rem); }
h3 { font-size: clamp(1.35rem, 2.2vw, 1.7rem); }
p { margin: 0 0 1.1em; }
.lede { font-size: clamp(1.12rem, 1.8vw, 1.34rem); line-height: 1.75; }
.small { font-size: 0.92rem; }

.kicker {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin: 0 0 1.2rem;
}
.on-dark .kicker, .kicker.on-dark { color: var(--gold); }
.on-ivory .kicker, .on-white .kicker, .kicker.on-light { color: var(--gold-deep); }

.gold-rule {
  width: 72px; height: 2px; background: var(--gold);
  margin: 1.6rem 0; border: 0;
}
.center .gold-rule { margin-left: auto; margin-right: auto; }

/* ---------- Layout ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(20px, 4vw, 48px); }
.section { padding: clamp(76px, 9vw, 132px) 0; }
.on-dark { background: var(--black); color: var(--muted-dark); }
.on-dark h1, .on-dark h2, .on-dark h3 { color: var(--white); }
.on-ivory { background: var(--ivory); color: var(--ink); }
.on-white { background: var(--white); color: var(--ink); }
.center { text-align: center; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(36px, 5vw, 76px); align-items: center; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }
.three-col { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
@media (max-width: 900px) { .three-col { grid-template-columns: 1fr; max-width: 560px; margin-left: auto; margin-right: auto; } }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  background: rgba(8, 8, 7, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-dark);
  transition: background 0.3s ease;
}
.header-inner {
  max-width: var(--maxw); margin: 0 auto;
  padding: 13px clamp(20px, 4vw, 48px);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.brand img { width: 46px; height: 46px; object-fit: cover; border-radius: 50%; }
.brand-name {
  font-family: var(--serif); font-size: 1.25rem; letter-spacing: 0.06em;
  color: var(--white); line-height: 1.15;
}
.brand-name small {
  display: block; font-family: var(--sans); font-size: 0.62rem;
  letter-spacing: 0.34em; color: var(--gold); font-weight: 600;
}
.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  color: var(--muted-dark); text-decoration: none;
  font-size: 0.9rem; font-weight: 500; letter-spacing: 0.04em;
  padding: 10px 13px; border-radius: 8px; transition: color 0.2s, background 0.2s;
  white-space: nowrap;
}
.nav a:hover { color: var(--white); background: rgba(255, 255, 255, 0.06); }
.nav a[aria-current="page"] { color: var(--gold); }
.nav-cta {
  border: 1px solid var(--gold); color: var(--gold) !important;
  margin-left: 8px;
}
.nav-cta:hover { background: var(--gold) !important; color: var(--black) !important; }
.menu-toggle {
  display: none; background: none; border: 1px solid var(--line-dark);
  border-radius: 8px; padding: 10px 12px; cursor: pointer;
}
.menu-toggle span { display: block; width: 22px; height: 2px; background: var(--gold); margin: 5px 0; transition: transform 0.25s, opacity 0.25s; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media (max-width: 1020px) {
  .menu-toggle { display: block; }
  .nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: #0d0d0c; flex-direction: column; align-items: stretch;
    padding: 12px 20px 20px; border-bottom: 1px solid var(--line-dark); gap: 2px;
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 8px; white-space: normal; }
  .nav-cta { margin: 8px 0 0; text-align: center; }
}

/* ---------- Hero (photographic) ---------- */
.hero-photo {
  position: relative; overflow: hidden;
  min-height: 100svh; display: flex; align-items: center;
  background: var(--black); color: var(--muted-dark);
  padding: 150px 0 90px; text-align: center;
}
.hero-photo .hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center 38%;
  animation: heroDrift 26s ease-in-out infinite alternate;
}
.hero-photo .hero-veil {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(6,6,5,0.78) 0%, rgba(6,6,5,0.52) 42%, rgba(6,6,5,0.90) 100%),
    radial-gradient(900px 480px at 50% 30%, rgba(227,179,45,0.08), transparent 60%);
}
.hero-photo .hero-inner { position: relative; z-index: 1; width: 100%; }
.hero-photo .hero-mark {
  width: 92px; height: 92px; border-radius: 50%; object-fit: cover;
  margin: 0 auto 28px;
  border: 1px solid var(--line-dark);
  box-shadow: 0 18px 44px rgba(227, 179, 45, 0.20);
}
.hero-photo h1 { color: var(--white); max-width: 17ch; margin-left: auto; margin-right: auto; }
.hero-photo h1 em { font-style: italic; color: var(--gold-bright); }
.hero-photo .lede { max-width: 62ch; margin: 1.4rem auto 0; color: #e6e0d2; }
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-top: 2.8rem; }
.hero-note { margin-top: 2.2rem; font-size: 0.86rem; letter-spacing: 0.08em; color: #a89f8c; }
@keyframes heroDrift {
  from { transform: scale(1.0); }
  to { transform: scale(1.07); }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; text-decoration: none; font-weight: 600;
  font-size: 1rem; letter-spacing: 0.02em;
  padding: 16px 34px; border-radius: 999px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.btn-gold { background: var(--gold); color: #111007; box-shadow: 0 12px 30px rgba(201, 162, 39, 0.30); }
.btn-gold:hover { background: var(--gold-bright); transform: translateY(-2px); }
.btn-outline { border: 1px solid var(--gold); color: var(--gold); background: transparent; }
.btn-outline:hover { background: rgba(201, 162, 39, 0.12); transform: translateY(-2px); }
.btn-outline-light { border: 1px solid rgba(255,255,255,0.85); color: var(--white); background: rgba(6,6,5,0.25); }
.btn-outline-light:hover { background: rgba(255,255,255,0.12); transform: translateY(-2px); }
.btn-dark { background: var(--black); color: var(--white); }
.btn-dark:hover { background: #1c1a15; transform: translateY(-2px); }

/* ---------- Page hero (interior, photographic option) ---------- */
.page-hero {
  background: radial-gradient(900px 480px at 50% 0%, rgba(227, 179, 45, 0.09), transparent 62%), var(--black);
  color: var(--muted-dark); text-align: center;
  padding: 172px 0 88px;
  border-bottom: 1px solid var(--line-dark);
}
.page-hero h1 { color: var(--white); }
.page-hero .lede { max-width: 60ch; margin: 1.2rem auto 0; color: #ddd6c6; }
.page-hero-photo { position: relative; overflow: hidden; padding: 0; border-bottom: 1px solid var(--line-dark); }
.page-hero-photo .hero-bg {
  position: absolute; inset: 0; background-size: cover; background-position: center 40%;
}
.page-hero-photo .hero-veil {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(6,6,5,0.80) 0%, rgba(6,6,5,0.58) 50%, rgba(6,6,5,0.92) 100%);
}
.page-hero-photo .hero-inner { position: relative; z-index: 1; padding: 180px 0 92px; text-align: center; }
.page-hero-photo h1 { color: var(--white); }
.page-hero-photo .lede { max-width: 60ch; margin: 1.2rem auto 0; color: #e2dccc; }

/* ---------- Photography treatments ---------- */
.img-frame {
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line-light);
  box-shadow: var(--shadow-photo);
  background: #111;
}
.on-dark .img-frame { border-color: var(--line-dark); }
.img-frame img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; }
.img-frame.portrait img { aspect-ratio: 4 / 5; }
.img-caption {
  margin-top: 12px; font-size: 0.84rem; color: var(--muted-light); font-style: italic;
}
.on-dark .img-caption { color: #9d9687; }

/* Photo band: full-bleed image with centered pull quote */
.photo-band { position: relative; overflow: hidden; padding: clamp(90px, 11vw, 150px) 0; text-align: center; }
.photo-band .band-bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
.photo-band .band-veil { position: absolute; inset: 0; background: rgba(6,6,5,0.68); }
.photo-band .wrap { position: relative; z-index: 1; }
.photo-band .pull { color: var(--white); }
.photo-band .pull-attr { color: var(--gold); }

/* ---------- Credibility fact strip ---------- */
.fact-strip {
  border-top: 1px solid var(--line-dark); border-bottom: 1px solid var(--line-dark);
  background: #0c0b09;
}
.fact-strip .wrap {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
  padding-top: 40px; padding-bottom: 40px;
}
@media (max-width: 760px) { .fact-strip .wrap { grid-template-columns: repeat(2, 1fr); } }
.fact { text-align: center; }
.fact .fact-value {
  font-family: var(--serif); font-size: clamp(1.5rem, 2.4vw, 2rem);
  color: var(--gold-bright); line-height: 1.2; margin-bottom: 6px;
}
.fact .fact-label {
  font-size: 0.78rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted-dark);
}

/* ---------- Cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; margin-top: 3rem; }
@media (max-width: 900px) { .card-grid { grid-template-columns: 1fr; max-width: 560px; margin-left: auto; margin-right: auto; } }
.card {
  border-radius: var(--radius); padding: 42px 36px;
  display: flex; flex-direction: column; gap: 12px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card:hover { transform: translateY(-4px); }
.on-dark .card { background: #121210; border: 1px solid var(--line-dark); }
.on-dark .card:hover { box-shadow: 0 24px 50px rgba(0,0,0,0.45); }
.on-dark .card h3 { color: var(--gold-bright); }
.on-dark .card p { color: var(--muted-dark); font-size: 0.99rem; }
.on-ivory .card, .on-white .card {
  background: var(--white); border: 1px solid var(--line-light); box-shadow: var(--shadow);
}
.on-ivory .card h3, .on-white .card h3 { color: var(--ink); }
.card .numeral {
  font-family: var(--serif); font-size: 2.4rem; color: var(--gold);
  line-height: 1; margin-bottom: 6px;
}
.on-ivory .card .numeral, .on-white .card .numeral { color: var(--gold-deep); }
.card .card-link { margin-top: auto; padding-top: 14px; font-weight: 600; font-size: 0.95rem; }
.on-dark .card-link a { color: var(--gold); text-decoration: none; border-bottom: 1px solid var(--line-dark); }
.on-ivory .card-link a, .on-white .card-link a { color: var(--gold-deep); text-decoration: none; border-bottom: 1px solid var(--line-light); }
.card-link a:hover { border-bottom-color: currentColor; }

/* ---------- Feature rows ---------- */
.feature { display: grid; grid-template-columns: 88px 1fr; gap: 26px; padding: 30px 0; border-bottom: 1px solid var(--line-light); }
.feature:last-child { border-bottom: 0; }
.on-dark .feature { border-bottom-color: var(--line-dark); }
.feature .step {
  font-family: var(--serif); font-size: 2.6rem; color: var(--gold-deep); line-height: 1;
}
.on-dark .feature .step { color: var(--gold); }
.feature h3 { margin-bottom: 0.35em; }
.feature p { margin: 0; color: var(--muted-light); font-size: 1rem; }
.on-dark .feature p { color: var(--muted-dark); }
@media (max-width: 560px) { .feature { grid-template-columns: 56px 1fr; gap: 18px; } .feature .step { font-size: 2rem; } }

/* ---------- Checklists ---------- */
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li {
  position: relative; padding: 14px 0 14px 40px;
  border-bottom: 1px solid var(--line-light);
}
.checklist li:last-child { border-bottom: 0; }
.checklist li::before {
  content: "\2713";
  position: absolute; left: 0; top: 14px;
  width: 26px; height: 26px; border-radius: 50%;
  border: 1px solid var(--gold-deep); color: var(--gold-deep);
  font-size: 0.85rem; font-weight: 700; line-height: 24px; text-align: center;
}
.on-dark .checklist li { border-bottom-color: var(--line-dark); }
.on-dark .checklist li::before { border-color: var(--gold); color: var(--gold); }

/* ---------- Fact table (transparency) ---------- */
.fact-table { border-top: 1px solid var(--line-light); margin: 1.6rem 0 0; }
.fact-table .row {
  display: grid; grid-template-columns: 220px 1fr; gap: 24px;
  padding: 18px 0; border-bottom: 1px solid var(--line-light);
}
.fact-table .row dt { font-weight: 600; color: var(--ink); font-size: 0.95rem; }
.fact-table .row dd { margin: 0; color: var(--muted-light); }
@media (max-width: 560px) { .fact-table .row { grid-template-columns: 1fr; gap: 4px; } }

/* ---------- Pull quote ---------- */
.pull {
  font-family: var(--serif); font-style: italic;
  font-size: clamp(1.5rem, 2.8vw, 2.15rem); line-height: 1.45;
  max-width: 34ch; margin: 0 auto;
}
.on-dark .pull { color: var(--white); }
.pull::before { content: "\201C"; display: block; font-size: 3.2rem; color: var(--gold); line-height: 0.6; margin-bottom: 18px; font-style: normal; }
.pull-attr { margin-top: 1.4rem; font-family: var(--sans); font-style: normal; font-size: 0.9rem; letter-spacing: 0.14em; text-transform: uppercase; }
.on-dark .pull-attr { color: var(--gold); }
.on-ivory .pull-attr, .on-white .pull-attr { color: var(--gold-deep); }

/* ---------- Flywheel / supporter strip ---------- */
.flywheel {
  border-top: 1px solid var(--line-dark); border-bottom: 1px solid var(--line-dark);
  background: #0e0d0b; color: var(--muted-dark);
  padding: 60px 0; font-size: 0.99rem;
}
.flywheel .wrap { max-width: 880px; }
.flywheel strong { color: var(--white); font-weight: 600; }
.flywheel .kicker { color: var(--gold); }
.supporter-band {
  border-top: 1px solid var(--line-dark);
  background: #0c0b09; color: var(--muted-dark);
  padding: 64px 0; text-align: center;
}
.supporter-band .wrap { max-width: 820px; }
.supporter-band .kicker { color: var(--gold); }
.supporter-band strong { color: var(--white); }
.supporter-mark {
  font-family: var(--serif); font-size: 1.6rem; color: var(--white);
  letter-spacing: 0.04em; margin: 0.6rem 0 1rem;
}

/* ---------- Guide (newsroom) ---------- */
.guide-toc {
  background: var(--white); border: 1px solid var(--line-light);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 34px 38px; margin: 2.4rem 0;
}
.guide-toc h3 { margin-bottom: 0.6em; }
.guide-toc ol { margin: 0; padding-left: 1.3em; }
.guide-toc li { margin-bottom: 0.55em; }
.guide-toc a { color: var(--gold-deep); font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--line-light); }
.guide-toc a:hover { border-bottom-color: currentColor; }
.guide-section { padding: 44px 0; border-bottom: 1px solid var(--line-light); }
.guide-section:last-of-type { border-bottom: 0; }
.guide-section h2 .g-num {
  font-family: var(--sans); font-size: 0.85rem; font-weight: 700;
  letter-spacing: 0.24em; text-transform: uppercase; color: var(--gold-deep);
  display: block; margin-bottom: 0.7rem;
}
.disclaimer {
  border: 1px solid var(--line-light); border-left: 3px solid var(--gold-deep);
  background: #fffdf8; border-radius: 0 var(--radius) var(--radius) 0;
  padding: 22px 26px; font-size: 0.92rem; color: var(--muted-light);
  margin: 2rem 0;
}
.disclaimer strong { color: var(--ink); }
.media-block {
  background: var(--black); color: var(--muted-dark);
  border: 1px solid var(--line-dark); border-radius: var(--radius);
  padding: 44px 40px;
}
.media-block h3 { color: var(--gold-bright); }
.media-block p { font-size: 0.99rem; }

/* ---------- Form ---------- */
.form-card {
  background: var(--white); border: 1px solid var(--line-light);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: clamp(30px, 4vw, 52px); max-width: 720px; margin: 0 auto;
}
.field { margin-bottom: 22px; }
.field label { display: block; font-weight: 600; font-size: 0.94rem; margin-bottom: 8px; color: var(--ink); }
.field label .req { color: var(--red); }
.field input, .field textarea, .field select {
  width: 100%; font: inherit; color: var(--ink);
  border: 1px solid #d8d2c4; border-radius: 10px;
  padding: 13px 15px; background: #fffdf9;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: 2px solid var(--gold); outline-offset: 1px; border-color: var(--gold);
}
.field textarea { min-height: 150px; resize: vertical; }
.field .hint { font-size: 0.86rem; color: var(--muted-light); margin-top: 6px; }
.form-note { font-size: 0.9rem; color: var(--muted-light); margin-top: 18px; }

/* Honeypot anti-spam field: hidden from humans, traps bots. */
.hp-field { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Footer ---------- */
.site-footer {
  background: #060605; color: var(--muted-dark);
  border-top: 1px solid var(--line-dark);
  padding: 76px 0 36px; font-size: 0.94rem;
}
.footer-grid {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 44px;
  max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(20px, 4vw, 48px);
}
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand img { width: 64px; border-radius: 50%; margin-bottom: 16px; }
.footer-brand .tagline { font-family: var(--serif); font-style: italic; color: var(--gold); font-size: 1.1rem; }
.site-footer h4 {
  font-family: var(--sans); font-size: 0.78rem; letter-spacing: 0.24em;
  text-transform: uppercase; color: var(--gold); margin: 0 0 16px;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 10px; }
.site-footer a { color: var(--muted-dark); text-decoration: none; }
.site-footer a:hover { color: var(--white); }
.footer-legal {
  max-width: var(--maxw); margin: 48px auto 0; padding: 24px clamp(20px, 4vw, 48px) 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  font-size: 0.84rem; color: #8f887a;
}

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  .hero-photo .hero-bg { animation: none; }
}

/* ---------- Utility ---------- */
.mt-2 { margin-top: 2rem; } .mt-3 { margin-top: 3rem; }
.narrow { max-width: 780px; margin-left: auto; margin-right: auto; }
.fine { font-size: 0.88rem; color: var(--muted-light); }
.on-dark .fine { color: #9d9687; }
