:root {
  --cbc-graphite: #1A1F2E;
  --cbc-graphite-2: #242B3D;
  --cbc-paper: #F7F4ED;
  --cbc-gold: #D4AF37;
  --cbc-gold-light: #E8D28C;
  --cbc-warm: #C88A5A;
  --cbc-green: #8FB98A;
  --cbc-fade: rgba(26, 31, 46, 0.92);
  --wrap-max: 1100px;
  --section-pad: clamp(4rem, 10vh, 8rem);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--cbc-graphite);
  color: var(--cbc-paper);
  line-height: 1.55;
}

a { color: var(--cbc-gold); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Hide SEO block visually but keep it accessible to parsers */
.sw-seo-copy {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Engine overrides — ensure video stays behind topbar and post-hero content flows */
.sw-root {
  position: relative;
  z-index: 1;
}

.sw-topbar {
  z-index: 100 !important;
}

.sw-master-stage {
  position: fixed;
  top: var(--sw-topbar-height, 64px);
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  background: var(--cbc-graphite);
  overflow: hidden;
}

.sw-master__video,
.sw-master__poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover !important;
  object-position: center center !important;
  background: var(--cbc-graphite);
  pointer-events: none;
}

.sw-master__video { z-index: 1; }
.sw-master__poster { z-index: 2; }

/* Hide all edge-fade masks so the full video frame is visible */
.sw-fade { display: none !important; }

/* Mobile overlay experiment: headline up, body/CTA where scroll hint was */
@media (max-width: 860px) {
  #world .sw-copy {
    position: absolute !important;
    inset: 0 !important;
    width: auto !important;
    height: auto !important;
    padding: 1.25rem 2.75rem 1.25rem 1.25rem !important;
    display: block !important;
    text-align: center !important;
  }

  #world .sw-copy__eyebrow { margin-bottom: 0.5rem !important; }
  #world .sw-copy__title { margin: 0 !important; }

  /* Default: body sits at the bottom of the viewport */
  #world .sw-copy__body {
    position: absolute !important;
    left: 1.25rem !important;
    right: 2.75rem !important;
    bottom: 1.25rem !important;
    margin: 0 !important;
    max-width: 100% !important;
    text-align: center !important;
  }

  /* Last cue: body under title, CTAs at bottom */
  #world #sw-copy-direct-republic .sw-copy__body {
    position: static !important;
    margin-top: 0.75rem !important;
    text-align: center !important;
  }
  #world .sw-copy__cta {
    position: absolute !important;
    left: 1.25rem !important;
    right: 1.25rem !important;
    bottom: 1.25rem !important;
    width: auto !important;
    margin: 0 !important;
  }
  #world .sw-copy__cta a {
    display: block !important;
    width: 100% !important;
    text-align: center !important;
    margin: 0.5rem 0 !important;
  }

  /* Hide scroll hint, route dots and tags on mobile */
  #world .sw-hint { display: none !important; }
  #world .sw-route { display: none !important; }
  #world .sw-copy__tags { display: none !important; }
}

/* Desktop preview helper: add ?preview=mobile to URL to see the mobile overlay layout */
html.sw-preview-mobile #world .sw-copy {
  position: absolute !important;
  inset: 0 !important;
  width: auto !important;
  height: auto !important;
  padding: 1.25rem 2.75rem 1.25rem 1.25rem !important;
  display: block !important;
  text-align: center !important;
}

html.sw-preview-mobile #world .sw-copy__eyebrow { margin-bottom: 0.5rem !important; }
html.sw-preview-mobile #world .sw-copy__title { margin: 0 !important; }

html.sw-preview-mobile #world .sw-copy__body {
  position: absolute !important;
  left: 1.25rem !important;
  right: 2.75rem !important;
  bottom: 1.25rem !important;
  margin: 0 !important;
  max-width: 100% !important;
  text-align: center !important;
}

html.sw-preview-mobile #world #sw-copy-direct-republic .sw-copy__body {
  position: static !important;
  margin-top: 0.75rem !important;
  text-align: center !important;
}

html.sw-preview-mobile #world .sw-copy__cta {
  position: absolute !important;
  left: 1.25rem !important;
  right: 1.25rem !important;
  bottom: 1.25rem !important;
  width: auto !important;
  margin: 0 !important;
}

html.sw-preview-mobile #world .sw-copy__cta a {
  display: block !important;
  width: 100% !important;
  text-align: center !important;
  margin: 0.5rem 0 !important;
}

html.sw-preview-mobile #world .sw-hint,
html.sw-preview-mobile #world .sw-route,
html.sw-preview-mobile #world .sw-copy__tags { display: none !important; }

html.sw-preview-mobile body { min-width: 0 !important; }

/* Track spacer and post-hero content */
.sw-track {
  pointer-events: none;
}

main#content {
  position: relative;
  z-index: 10;
  background: var(--cbc-graphite);
  border-top: 1px solid rgba(212, 175, 55, 0.15);
}

.wrap {
  width: min(92%, var(--wrap-max));
  margin: 0 auto;
}

.section {
  padding: var(--section-pad) 0;
}

.section__eyebrow {
  display: block;
  color: var(--cbc-gold);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.78rem;
  margin-bottom: 0.75rem;
}

.section__title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1.15;
  margin: 0 0 1.25rem;
  color: var(--cbc-paper);
}

.section__lead,
.section p {
  color: rgba(247, 244, 237, 0.82);
  max-width: 720px;
}

.section__note {
  font-size: 0.85rem;
  color: rgba(247, 244, 237, 0.55);
  margin-top: 1rem;
}

/* Steps grid */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.step {
  background: var(--cbc-graphite-2);
  border: 1px solid rgba(212, 175, 55, 0.12);
  border-radius: 16px;
  padding: 1.5rem;
}

.step__num {
  display: inline-block;
  color: var(--cbc-graphite);
  background: var(--cbc-gold);
  width: 2.2rem;
  height: 2.2rem;
  line-height: 2.2rem;
  border-radius: 50%;
  text-align: center;
  font-weight: 800;
  margin-bottom: 1rem;
}

.step h3 {
  font-size: 1.25rem;
  margin: 0 0 0.6rem;
  color: var(--cbc-paper);
}

.step p {
  margin: 0;
  font-size: 0.95rem;
  color: rgba(247, 244, 237, 0.75);
}

/* Forms */
.inline-search,
.join-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
  max-width: 640px;
}

.inline-search input,
.join-form input,
.join-form select {
  flex: 1 1 220px;
  padding: 0.85rem 1rem;
  border-radius: 8px;
  border: 1px solid rgba(247, 244, 237, 0.18);
  background: rgba(247, 244, 237, 0.05);
  color: var(--cbc-paper);
  font-size: 1rem;
}

.join-form input::placeholder,
.inline-search input::placeholder { color: rgba(247, 244, 237, 0.45); }

.join-form select option { background: var(--cbc-graphite); color: var(--cbc-paper); }

.inline-search button,
.join-form button {
  padding: 0.85rem 1.4rem;
  border: 0;
  border-radius: 8px;
  background: var(--cbc-gold);
  color: var(--cbc-graphite);
  font-weight: 700;
  cursor: pointer;
}

.inline-search button:hover,
.join-form button:hover { background: var(--cbc-gold-light); }

.join-form label {
  width: 100%;
  font-size: 0.85rem;
  color: rgba(247, 244, 237, 0.7);
  margin-bottom: -0.25rem;
}

.join-form input,
.join-form select { flex: 1 1 100%; }

.join-form button { flex: 0 0 auto; }

/* FAQ */
.section--faq details {
  background: var(--cbc-graphite-2);
  border: 1px solid rgba(212, 175, 55, 0.12);
  border-radius: 12px;
  margin: 0.75rem 0;
  padding: 1rem 1.25rem;
}

.section--faq summary {
  font-weight: 600;
  cursor: pointer;
  color: var(--cbc-paper);
}

.section--faq p { margin: 0.75rem 0 0; }

/* Footer */
.site-footer {
  background: #11141c;
  border-top: 1px solid rgba(212, 175, 55, 0.12);
  padding: 2.5rem 0;
  position: relative;
  z-index: 10;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.site-footer a { color: rgba(247, 244, 237, 0.72); }
.site-footer a:hover { color: var(--cbc-gold); }

.site-footer .legal {
  width: 100%;
  font-size: 0.8rem;
  color: rgba(247, 244, 237, 0.5);
  margin: 1rem 0 0;
}

.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;
}

/* Reduced motion page styles */
body.sw-reduced main#content,
body.sw-reduced .site-footer {
  margin-top: 0;
}

/* Ensure CTA buttons in engine copy are styled */
.sw-copy__cta a {
  display: inline-block;
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  font-weight: 700;
  margin-right: 0.5rem;
  margin-top: 0.5rem;
}

.sw-copy__cta a:first-child {
  background: var(--sw-accent, var(--cbc-gold));
  color: var(--cbc-graphite);
}

.sw-copy__cta a:last-child {
  background: transparent;
  border: 1px solid var(--sw-accent, var(--cbc-gold));
  color: var(--sw-accent, var(--cbc-gold));
}

@media (max-width: 480px) {
  .sw-copy__cta a { display: block; width: 100%; text-align: center; margin: 0.5rem 0; }
}

/* Mobile tag hiding per brief */
@media (max-width: 380px) {
  .sw-copy__tags { display: none; }
}
