/* ============================================================
   Components — header, footer, buttons, cards, hero, forms
   (SPEC §4)
   ============================================================ */

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  transition: background var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.site-header .container--wide {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}
.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 1px 0 rgba(18, 4, 10, 0.08);
  backdrop-filter: blur(8px);
}

.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand img { height: 2.4rem; width: auto; }
/* Light logo shown over dark/hero, dark logo after scroll */
.brand .logo-dark { display: none; }
.site-header.is-scrolled .logo-light { display: none; }
.site-header.is-scrolled .logo-dark { display: block; }
.site-header--solid { background: var(--bg); box-shadow: 0 1px 0 rgba(18,4,10,.08); }
.site-header--solid .logo-light { display: none; }
.site-header--solid .logo-dark { display: block; }

.site-nav ul {
  display: flex;
  gap: clamp(1rem, 2vw, 2rem);
  list-style: none;
  margin: 0; padding: 0;
}
.site-nav a {
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--c-white);
  padding-bottom: 4px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease);
}
.site-nav a:hover { border-bottom-color: var(--accent); color: var(--c-white); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--accent); }
.site-header.is-scrolled .site-nav a,
.site-header--solid .site-nav a { color: var(--c-near-black); }
.site-header.is-scrolled .site-nav a:hover,
.site-header--solid .site-nav a:hover { color: var(--c-burgundy); }

/* Mobile nav */
.nav-toggle {
  display: none;
  background: none; border: 0; cursor: pointer;
  padding: 0.5rem;
  z-index: 102;
}
.nav-toggle span {
  display: block; width: 26px; height: 2px;
  background: var(--c-white);
  margin: 6px 0;
  transition: transform 0.35s var(--ease), opacity 0.35s var(--ease), background 0.35s;
}
.site-header.is-scrolled .nav-toggle span,
.site-header--solid .nav-toggle span { background: var(--c-near-black); }

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: fixed; inset: 0;
    background: var(--c-near-black);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden;
    transition: opacity 0.4s var(--ease), visibility 0.4s;
    z-index: 101;
  }
  .site-nav.is-open { opacity: 1; visibility: visible; }
  .site-nav ul { flex-direction: column; text-align: center; gap: 1.75rem; }
  .site-nav a { color: var(--c-sand) !important; font-size: 1.05rem; }
  body.nav-open { overflow: hidden; }
  body.nav-open .nav-toggle span { background: var(--c-sand); }
  body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  color: var(--text-invert);
  overflow: hidden;
}
.hero--short { min-height: 62vh; }
.hero__media {
  position: absolute; inset: 0;
}
.hero__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 30%;
}
.hero__media::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(18, 4, 10, 0.55) 0%,
    rgba(18, 4, 10, 0.35) 45%,
    rgba(18, 4, 10, 0.62) 100%
  );
}
.hero__content {
  position: relative;
  z-index: 1;
  padding-block: calc(var(--header-h) + var(--space-lg)) var(--space-xl);
  max-width: 54rem;
}
.hero h1 {
  font-size: var(--fs-hero);
  color: var(--c-white);
  margin-bottom: var(--space-md);
}
.hero .eyebrow { color: var(--c-gold); }
.hero .lead { color: var(--c-sand-light); max-width: 38rem; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: var(--space-sm); margin-top: var(--space-md); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
  padding: 1.05rem 2.2rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.btn-primary {
  background: var(--c-burgundy);
  color: var(--c-sand-light);
  border-color: var(--c-burgundy);
}
.btn-primary:hover {
  background: var(--c-darkred);
  border-color: var(--c-gold);
  color: var(--c-white);
}
.btn-ghost {
  background: transparent;
  color: var(--c-burgundy);
  border-color: currentColor;
}
.btn-ghost:hover { color: var(--c-darkred); border-color: var(--c-gold); }
.hero .btn-ghost, .section--dark .btn-ghost, .section--burgundy .btn-ghost {
  color: var(--c-sand);
}
.hero .btn-ghost:hover, .section--dark .btn-ghost:hover, .section--burgundy .btn-ghost:hover {
  color: var(--c-white); border-color: var(--c-gold);
}
.section--dark .btn-primary, .section--burgundy .btn-primary {
  background: var(--c-sand); color: var(--c-near-black); border-color: var(--c-sand);
}
.section--dark .btn-primary:hover, .section--burgundy .btn-primary:hover {
  background: var(--c-white); border-color: var(--c-gold);
}
.btn[aria-disabled="true"] {
  opacity: 0.55; pointer-events: none;
}

/* ---------- Grids & Cards ---------- */
.grid {
  display: grid;
  gap: var(--space-md);
  grid-template-columns: 1fr;
}
@media (min-width: 641px)  { .grid--2, .grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1025px) { .grid--3 { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: var(--c-white);
  border: 1px solid rgba(18, 4, 10, 0.07);
  display: flex;
  flex-direction: column;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px -18px rgba(18, 4, 10, 0.28);
  border-color: rgba(212, 175, 55, 0.5);
}
.card__media { aspect-ratio: 4 / 3; overflow: hidden; background: var(--c-sand-light); }
.card__media img, .card__media video {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center 25%;
}
.card__media--portrait { aspect-ratio: 3 / 4; }
.card__body {
  padding: var(--space-md);
  display: flex; flex-direction: column; flex: 1;
  gap: var(--space-sm);
}
.card__body .eyebrow { margin-bottom: 0; }
.card h3 { margin: 0; }
.card p { margin: 0; color: var(--text-muted); font-size: var(--fs-small); line-height: 1.7; }
.card ul {
  margin: 0; padding: 0; list-style: none;
  font-size: var(--fs-small); color: var(--text-muted);
}
.card ul li { padding-left: 1.4em; position: relative; margin-bottom: 0.4em; line-height: 1.55; }
.card ul li::before { content: "—"; position: absolute; left: 0; color: var(--c-gold); }
/* Full card width, so CTAs stay the same size no matter how long the label is.
   Scoped to the card's own CTA — the submit button of a revealed capture
   form sizes itself inside .email-capture. */
.card__body > .btn { margin-top: auto; align-self: stretch; }
.card__note { font-size: 0.78rem; color: var(--text-muted); font-style: italic; }

/* Journey cards (Home) */
.journey-card {
  text-decoration: none;
  color: inherit;
  background: var(--c-white);
  padding: var(--space-lg) var(--space-md);
  border: 1px solid rgba(18, 4, 10, 0.08);
  text-align: center;
  display: flex; flex-direction: column; gap: var(--space-sm);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease);
}
.journey-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 44px -20px rgba(74, 14, 28, 0.35);
  border-color: rgba(212, 175, 55, 0.6);
  color: inherit;
}
.journey-card h3 { margin: 0; }
.journey-card p { margin-inline: auto; color: var(--text-muted); font-size: var(--fs-small); }
.journey-card .journey-card__cta {
  margin-top: auto;
  font-size: 0.8rem; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--c-burgundy);
}
.journey-card:hover .journey-card__cta { color: var(--c-darkred); }

/* ---------- Split (image + text) ---------- */
.split {
  display: grid;
  gap: var(--space-lg);
  align-items: center;
}
@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 6rem); }
  .split--reverse > .split__media { order: 2; }
}
.split__media img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center 20%;
}

/* ---------- Book (standalone product, Resource Library) ----------
   Its own block rather than .split: a cover must never be cropped, so the
   image keeps its natural ratio instead of the 3/4 frame .split__media forces. */
.book {
  display: grid;
  gap: var(--space-md);
  justify-items: center;
  align-items: center;
  text-align: center;
  max-width: 56rem;
  margin-inline: auto;
}
@media (min-width: 800px) {
  .book {
    grid-template-columns: 15rem minmax(0, 1fr);
    gap: var(--space-lg);
    justify-items: start;
    text-align: left;
  }
}
.book__cover {
  width: min(100%, 15rem);
  box-shadow: 0 20px 44px -18px rgba(18, 4, 10, 0.45);
}
.book__cover img { display: block; width: 100%; height: auto; }
.book__body > * + * { margin-top: var(--space-sm); }
.book__body h2 { margin: 0; }
.book__body .eyebrow { margin-bottom: 0; }
.book__body .btn { margin-top: var(--space-md); }
.book__body p { margin-inline: 0; }

/* ---------- Checklist ("This is for you if…") ---------- */
.checklist {
  list-style: none; padding: 0; margin: 0;
  max-width: var(--maxw-narrow);
}
.checklist li {
  position: relative;
  padding: 1.1rem 0 1.1rem 2.6rem;
  border-bottom: 1px solid rgba(18, 4, 10, 0.1);
  font-family: var(--font-serif);
  font-size: clamp(1.15rem, 1.8vw, 1.45rem);
  line-height: 1.4;
  color: var(--c-near-black);
}
.checklist li::before {
  content: "✓";
  position: absolute; left: 0; top: 1.05rem;
  color: var(--c-gold);
  font-family: var(--font-sans);
  font-size: 1.1rem;
}
.section--dark .checklist li { color: var(--c-sand-light); border-color: rgba(231, 213, 199, 0.18); }

/* ---------- Testimonials ---------- */
.testimonial {
  background: var(--c-white);
  border: 1px solid rgba(18, 4, 10, 0.07);
  padding: var(--space-lg) var(--space-md);
  display: flex; flex-direction: column; gap: var(--space-sm);
}
.testimonial blockquote {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  line-height: 1.55;
  color: var(--c-near-black);
}
.testimonial blockquote::before { content: "“"; color: var(--c-gold); font-size: 1.6em; line-height: 0; margin-right: 2px; }
.testimonial figcaption {
  font-size: var(--fs-small);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.testimonial figcaption strong { color: var(--c-burgundy); }
.section--warm .testimonial { background: var(--c-white); }

/* ---------- FAQ accordion ---------- */
.faq { max-width: var(--maxw-narrow); }
.faq details {
  border-bottom: 1px solid rgba(18, 4, 10, 0.12);
}
.faq summary {
  cursor: pointer;
  list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 1.3rem 0;
  font-family: var(--font-serif);
  font-size: clamp(1.1rem, 1.6vw, 1.35rem);
  font-weight: 700;
  color: var(--c-near-black);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  color: var(--c-gold);
  font-family: var(--font-sans);
  font-size: 1.3rem;
  transition: transform 0.3s var(--ease);
  flex-shrink: 0;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--text-muted); padding-bottom: 1.3rem; }

/* ---------- Forms ---------- */
.form-field { margin-bottom: var(--space-sm); }
.form-field label {
  display: block;
  font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  margin-bottom: 0.45rem;
  color: var(--c-burgundy);
}
.form-field input,
.form-field textarea,
.form-field select {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(18, 4, 10, 0.2);
  border-radius: var(--radius);
  background: var(--c-white);
  color: var(--text);
  transition: border-color 0.3s var(--ease);
}
.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--c-gold);
}
.form-note { font-size: 0.78rem; color: var(--text-muted); }

/* Inline email capture (newsletter) */
.email-capture {
  display: flex; flex-wrap: wrap; gap: var(--space-xs);
  max-width: 34rem;
}
.email-capture input {
  flex: 1 1 16rem;
  padding: 1.02rem 1rem;
  border: 1px solid rgba(18, 4, 10, 0.2);
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 1rem;
}
.section--dark .email-capture input,
.section--burgundy .email-capture input { border-color: transparent; }

/* Inside a card the capture form is full width — let its submit button
   match, so it lines up with the CTA button it replaced. */
.card .email-capture { max-width: none; }
.card .email-capture button[type="submit"] { flex: 1 1 100%; }

.email-capture input.is-invalid {
  border-color: var(--c-darkred);
  outline: 1px solid var(--c-darkred);
}
.email-capture__error {
  flex-basis: 100%;
  margin: 0.35rem 0 0;
  font-size: var(--fs-small);
  color: var(--c-darkred);
}
.section--burgundy .email-capture__error,
.section--dark .email-capture__error {
  color: #f0b8b8;
}

.email-capture__success {
  font-family: var(--font-serif);
  font-size: var(--fs-h3);
  color: var(--c-gold);
  margin: var(--space-md) auto 0;
  max-width: 34rem;
}
/* Email capture inside a freebie card (revealed by [data-reveal-form]) */
.card .email-capture { max-width: none; margin-top: auto; }
.card .email-capture .btn { margin-top: 0; align-self: stretch; width: 100%; }
.card .email-capture__success {
  margin: auto 0 0;
  font-size: 1.15rem;
  color: var(--c-burgundy);
}
.site-footer .email-capture__success {
  margin: 0; font-size: 1.1rem;
  color: var(--c-burgundy);
}

/* HubSpot embed container */
.hs-form-frame { min-height: 120px; }

/* HubSpot meetings calendar — light card framed on the warm (beige) section.
   The iframe is cross-origin, so the design lives entirely in the frame. */
.meetings-card {
  max-width: 960px;
  margin: var(--space-md) auto 0;
  background: var(--c-white);
  border: 1px solid var(--c-gold);
  border-radius: var(--radius);
  box-shadow: 0 24px 60px rgba(18, 4, 10, 0.35);
  padding: var(--space-sm);
  min-height: 640px;
}
/* No iframe to reserve room for — collapse to the fallback button. */
.meetings-card.is-fallback { min-height: 0; }
.meetings-card .meetings-iframe-container { width: 100%; }
.meetings-card iframe { display: block; width: 100% !important; border: 0; }
.meetings-card__fallback { text-align: center; padding: var(--space-lg) 0; }
/* The card is white, so the button reverts to the light-section treatment
   the .section--burgundy rule would otherwise invert. */
.section--burgundy .meetings-card__fallback .btn-primary {
  background: var(--c-burgundy); color: var(--c-sand-light); border-color: var(--c-burgundy);
}
.section--burgundy .meetings-card__fallback .btn-primary:hover {
  background: var(--c-darkred); border-color: var(--c-gold); color: var(--c-white);
}
.meetings-card__fallback p { color: var(--text-muted); margin-bottom: var(--space-sm); }
/* On the warm (beige) section the note sits on a light background, so it
   uses muted dark text with a burgundy link and gold underline. */
.meetings-note {
  margin: var(--space-md) auto 0;
  font-size: var(--fs-small);
  color: var(--text-muted);
}
.meetings-note a { color: var(--c-burgundy); text-decoration-color: var(--c-gold); }
.meetings-note a:hover { color: var(--c-darkred); }
@media (max-width: 640px) {
  .meetings-card { padding: var(--space-xs); min-height: 760px; }
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--c-sand);
  color: var(--text);
  padding-block: var(--space-lg) var(--space-md);
  font-size: var(--fs-small);
}
.site-footer a { color: var(--text); text-decoration: none; }
.site-footer a:hover { color: var(--c-burgundy); }
.site-footer__grid {
  display: grid; gap: var(--space-md);
  grid-template-columns: 1fr;
  padding-bottom: var(--space-md);
  border-bottom: 1px solid rgba(18, 4, 10, 0.15);
}
@media (min-width: 641px) { .site-footer__grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.site-footer h4 {
  color: var(--c-burgundy);
  font-family: var(--font-sans);
  font-size: 0.75rem; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  margin-bottom: var(--space-sm);
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 0.55rem; }
.site-footer__brand img { height: 3.2rem; width: auto; margin-bottom: var(--space-sm); }
.site-footer__brand p { color: var(--text-muted); max-width: 26rem; }
.site-footer__legal {
  display: flex; flex-wrap: wrap; gap: var(--space-sm);
  justify-content: space-between;
  padding-top: var(--space-md);
  color: var(--text-muted);
}
.site-footer__legal ul { display: flex; gap: var(--space-sm); list-style: none; padding: 0; margin: 0; }

/* ---------- Cookie banner ---------- */
.cookie-banner {
  position: fixed;
  inset: auto 1rem 1rem 1rem;
  z-index: 200;
  max-width: 30rem;
  margin-left: auto;
  background: var(--c-white);
  border: 1px solid rgba(18, 4, 10, 0.12);
  box-shadow: 0 20px 50px -20px rgba(18, 4, 10, 0.4);
  padding: var(--space-md);
  display: none;
}
.cookie-banner.is-visible { display: block; }
.cookie-banner p { font-size: var(--fs-small); color: var(--text-muted); margin-bottom: var(--space-sm); }
.cookie-banner__actions { display: flex; gap: var(--space-xs); flex-wrap: wrap; }
.cookie-banner .btn { padding: 0.7rem 1.4rem; font-size: 0.72rem; }

/* ---------- Page intro (inner pages) ---------- */
.page-intro {
  padding-top: calc(var(--header-h) + var(--space-lg));
  padding-bottom: var(--space-lg);
}
