/* ConjuringHouseOfficial.com — historic New England farmhouse aesthetic.
   System fonts only: no external font requests, keeps first paint fast. */

:root {
  --parchment: #efe6d3;
  --parchment-dark: #e2d5b8;
  --cream: #f8f3e6;
  --charcoal: #221d19;
  --brown-dark: #2c231d;
  --brown: #4a3a2c;
  --barn-red: #6d2c28;
  --barn-red-dark: #521f1c;
  --forest: #3a4635;
  --brass: #a6813f;
  --border: rgba(34, 29, 25, 0.16);
  --shadow: 0 10px 30px rgba(20, 16, 12, 0.18);
  --radius: 4px;
  --font-serif: Georgia, "Times New Roman", "Iowan Old Style", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --max-width: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--parchment);
  color: var(--charcoal);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  color: var(--brown-dark);
  line-height: 1.2;
  margin: 0 0 0.5em;
  font-weight: 700;
}
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin-top: 0; }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
a { color: var(--barn-red); }
a:hover { color: var(--barn-red-dark); }

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.sr-only, .skip-link:not(:focus) {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
.skip-link:focus {
  position: fixed;
  top: 8px; left: 8px;
  background: var(--cream);
  color: var(--charcoal);
  padding: 10px 16px;
  z-index: 1000;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  padding: 12px 24px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn-primary {
  background: var(--barn-red);
  color: var(--cream);
}
.btn-primary:hover { background: var(--barn-red-dark); color: var(--cream); }
.btn-ghost {
  background: transparent;
  color: var(--brown-dark);
  border-color: var(--brown-dark);
  margin-left: 10px;
}
.btn-ghost:hover { background: var(--brown-dark); color: var(--cream); }
.btn-cta {
  background: var(--forest);
  color: var(--cream);
  padding: 10px 18px;
  font-size: 0.9rem;
}
.btn-cta:hover { background: #2c3529; color: var(--cream); }

/* ---------- Header ---------- */
.site-header {
  background: var(--brown-dark);
  color: var(--cream);
  position: sticky;
  top: 0;
  z-index: 500;
  box-shadow: var(--shadow);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
  flex-wrap: wrap;
  gap: 10px;
}
.brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-decoration: none;
  color: var(--cream);
  line-height: 1.2;
  gap: 4px;
}
.brand-logo {
  height: 56px;
  width: auto;
}
.brand-mark {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--cream);
}
.brand-mark.small { font-size: 1.15rem; color: var(--cream); }
.brand-sub {
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  color: var(--parchment-dark);
  text-transform: uppercase;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--parchment-dark);
  border-radius: var(--radius);
  padding: 8px 10px;
  cursor: pointer;
}
.nav-toggle .bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--cream);
  margin: 4px 0;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.primary-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  margin: 0;
  padding: 0;
}
.primary-nav a {
  color: var(--parchment);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
}
.primary-nav a:hover,
.primary-nav a.active {
  color: var(--cream);
  border-bottom-color: var(--brass);
}

.official-strip {
  background: var(--charcoal);
  color: var(--parchment-dark);
  text-align: center;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  padding: 5px 12px;
}

@media (max-width: 860px) {
  .brand-logo { height: 42px; }
  .nav-toggle { display: inline-flex; flex-direction: column; align-items: center; }
  .primary-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    background: var(--brown-dark);
    padding: 12px 0;
  }
  .primary-nav.open { display: flex; }
  .primary-nav ul { flex-direction: column; gap: 10px; width: 100%; }
  .btn-cta { margin-top: 10px; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  color: var(--cream);
  overflow: hidden;
  min-height: 62vh;
  display: flex;
  align-items: flex-end;
}
.hero-plain {
  min-height: auto;
  background: var(--brown-dark);
  padding: 60px 0;
  align-items: center;
}
.hero-media {
  position: absolute;
  inset: 0;
}
.hero-media img,
.hero-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.hero-media video.hero-video {
  position: absolute;
  inset: 0;
}
.hero-media img.hero-poster {
  position: absolute;
  inset: 0;
}
@media (prefers-reduced-motion: reduce) {
  .hero-media video.hero-video {
    display: none;
  }
}
.hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(24,20,17,0.35) 0%, rgba(24,20,17,0.85) 100%);
}
.hero-inner {
  position: relative;
  padding: 60px 24px 56px;
}
/* Video heroes (homepage): pin the text to a fixed left gutter instead of a
   viewport-width-centered column, so it stays clear of the video's subject
   on wide screens instead of drifting toward center. */
.hero-inner-left {
  position: relative;
  max-width: 600px;
  padding: 60px 24px 56px;
}
.hero .eyebrow, .hero-plain .eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.8rem;
  color: var(--brass);
  font-weight: 700;
  margin-bottom: 10px;
}
.hero h1 { color: var(--cream); }
.hero .lede {
  max-width: 640px;
  font-size: 1.15rem;
  color: var(--parchment);
}
.hero-actions .btn-ghost { border-color: var(--parchment); color: var(--cream); }
.hero-actions .btn-ghost:hover { background: var(--cream); color: var(--brown-dark); }

/* ---------- Sections ---------- */
.section { padding: 56px 0; }
.section h2 { margin-bottom: 0.6em; }
.section .eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.8rem;
  color: var(--barn-red);
  font-weight: 700;
}
.fact-section { background: var(--parchment-dark); }

.two-col {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: start;
}
@media (max-width: 760px) {
  .two-col { grid-template-columns: 1fr; }
}

/* ---------- Fact grid ---------- */
.fact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
}
.fact {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.fact-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brown);
  font-weight: 700;
  white-space: nowrap;
}
.fact-value {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--brown-dark);
}

/* Home page fact grid: keep each value on a single line (or explicit <br> break) */
.fact-section .fact-grid {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}
.fact-section .fact-value {
  font-size: 1.05rem;
  white-space: nowrap;
}

/* Force a fixed column count (rather than auto-fit) so a short row of
   facts stretches to fill the full row width, matching a .fact-wide box
   spanning the same row below it instead of hugging the left edge. */
.fact-section .fact-grid-fixed-3,
.fact-grid-fixed-3 {
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 700px) {
  .fact-section .fact-grid-fixed-3,
  .fact-grid-fixed-3 {
    grid-template-columns: 1fr;
  }
}
.fact-section .fact-grid-fixed-3 .fact-value {
  font-size: 1.35rem;
  font-weight: 700;
  white-space: normal;
}
.fact-grid-fixed-3 .fact {
  padding: 20px;
}

.fact-wide {
  grid-column: 1 / -1;
  align-items: center;
  text-align: center;
  padding: 24px 20px;
}
.fact-wide .fact-label {
  white-space: normal;
}
.fact-section .fact-wide .fact-value,
.fact-wide .fact-value {
  font-size: 1.7rem;
  font-weight: 700;
  white-space: normal;
  line-height: 1.25;
}

/* ---------- Card grid ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}
.card {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.card h3 { margin-bottom: 0.4em; }
.card-link {
  display: inline-block;
  margin-top: 8px;
  font-weight: 700;
  text-decoration: none;
  font-size: 0.92rem;
}

/* ---------- Product grid ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}
.product-card {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.product-card-media {
  display: block;
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--parchment-dark);
}
.product-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.product-card-sold-out .product-card-media img {
  opacity: 0.55;
  filter: grayscale(40%);
}
.product-sold-out-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--charcoal);
  color: var(--cream);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 5px 10px;
  border-radius: var(--radius);
}
.product-card-body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.product-card-body h3 {
  font-size: 1.02rem;
  margin: 0;
  line-height: 1.3;
}
.product-card-body h3 a {
  color: var(--brown-dark);
  text-decoration: none;
}
.product-card-body h3 a:hover { color: var(--barn-red); }
.product-card-price {
  font-family: var(--font-serif);
  color: var(--barn-red);
  font-weight: 700;
  font-size: 1.05rem;
  margin: 0 0 8px;
}
.product-card-btn {
  margin-top: auto;
  text-align: center;
  font-size: 0.88rem;
  padding: 10px 16px;
}

/* ---------- Video grid ---------- */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.video-card {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.video-embed {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--charcoal);
}
.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.video-embed-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--parchment);
  font-family: var(--font-serif);
  font-style: italic;
  opacity: 0.6;
}
.video-card-body {
  padding: 16px 18px 18px;
}
.video-card-body h3 {
  font-size: 1.02rem;
  margin: 0 0 4px;
  line-height: 1.3;
}
.video-card-channel {
  font-size: 0.88rem;
  color: var(--brown);
  margin: 0;
}

/* ---------- Figures / gallery ---------- */
.figure { margin: 0; }
.figure figcaption {
  font-size: 0.85rem;
  color: var(--brown);
  margin-top: 8px;
  font-style: italic;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.gallery-item img { border-radius: var(--radius); box-shadow: var(--shadow); }
.muted { color: var(--brown); font-size: 0.92rem; }

/* ---------- Timeline ---------- */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-left: 3px solid var(--brass);
  margin-left: 6px;
}
.timeline-item {
  position: relative;
  padding: 4px 0 32px 30px;
}
.timeline-item::before {
  content: "";
  position: absolute;
  left: -9px;
  top: 8px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--barn-red);
  border: 2px solid var(--cream);
}
.timeline-year {
  font-family: var(--font-serif);
  font-weight: 700;
  color: var(--barn-red);
  font-size: 1.05rem;
  margin-bottom: 2px;
}

/* ---------- News ---------- */
.news-list { display: flex; flex-direction: column; gap: 22px; }
.news-card {
  background: var(--cream);
  border: 1px solid var(--border);
  border-left: 4px solid var(--forest);
  border-radius: var(--radius);
  padding: 20px 24px;
}
.news-date {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--brown);
  font-weight: 700;
  margin-bottom: 4px;
}

/* ---------- FAQ ---------- */
.faq-list { display: flex; flex-direction: column; gap: 10px; }
.faq-item {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: none;
  border: none;
  text-align: left;
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--brown-dark);
  padding: 16px 20px;
  cursor: pointer;
}
.faq-icon { font-size: 1.3rem; color: var(--barn-red); transition: transform .15s ease; }
.faq-question[aria-expanded="true"] .faq-icon { transform: rotate(45deg); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  padding: 0 20px;
  transition: max-height .2s ease, padding .2s ease;
}
.faq-answer p { margin: 0 0 16px; color: var(--charcoal); }
.faq-item.open .faq-answer { max-height: 600px; padding: 0 20px; }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--forest);
  color: var(--cream);
  padding: 48px 0;
}
.cta-band h2 { color: var(--cream); }
.cta-band p { color: var(--parchment); margin: 0; }
.cta-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.cta-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.cta-band .btn-ghost { border-color: var(--parchment); color: var(--cream); margin-left: 0; }
.cta-band .btn-ghost:hover { background: var(--cream); color: var(--forest); }

/* ---------- Forms ---------- */
.contact-form { max-width: 620px; }
.form-row { margin-bottom: 16px; display: flex; flex-direction: column; gap: 6px; }
.form-row label { font-weight: 700; font-size: 0.9rem; color: var(--brown-dark); }
.form-row input, .form-row select, .form-row textarea {
  font-family: var(--font-sans);
  font-size: 1rem;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--cream);
  color: var(--charcoal);
}
.form-note { font-size: 0.82rem; color: var(--brown); margin-top: 12px; }
.form-status { font-size: 0.9rem; margin-top: 12px; min-height: 1.2em; }
.form-status-success { color: var(--forest); font-weight: 600; }
.form-status-error { color: var(--barn-red); font-weight: 600; }

.map-embed {
  width: 100%;
  height: 320px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.plain-list { padding-left: 20px; }
.plain-list li { margin-bottom: 10px; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--brown-dark);
  color: var(--parchment);
  margin-top: 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
  padding: 48px 24px 32px;
}
.site-footer h2 {
  color: var(--cream);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.site-footer a { color: var(--parchment); }
.site-footer a:hover { color: var(--cream); }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.disclaimer { font-size: 0.82rem; color: var(--parchment-dark); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--parchment-dark);
}
.footer-bottom a { color: var(--parchment-dark); }
