/* Raines theme
   Black header. Primary #5B92E5. Geologica throughout.
*/

:root {
  --ink: #142033;
  --ink-soft: #3d4d63;
  --forest: #1e4f9a;
  --forest-mid: #2e6bc4;
  --moss: #2e6bc4;
  --sage: #5b92e5;
  --cream: #f3f6fb;
  --paper: #f7f9fc;
  --white: #ffffff;
  --gold: #5B92E5;
  --gold-deep: #2E6BC4;
  --primary: #5B92E5;
  --accent: #2E6BC4;
  --black: #0b0d10;
  --line: rgba(20, 32, 51, 0.12);
  --shadow: 0 18px 50px rgba(30, 79, 154, 0.12);
  --serif: "Geologica", "Segoe UI", sans-serif;
  --sans: "Geologica", "Segoe UI", sans-serif;
  --wrap: 1280px;
  --radius: 18px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.65;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--primary); }
h1, h2, h3, h4 {
  font-family: var(--sans);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin: 0 0 0.6em;
  color: var(--ink);
}
h1 { font-size: clamp(2.4rem, 5vw, 4.4rem); }
h2 { font-size: clamp(2rem, 3.4vw, 3.1rem); }
h3 { font-size: 1.45rem; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }

.wrap {
  width: min(var(--wrap), calc(100% - 40px));
  margin-inline: auto;
}

.screen-reader-text,
.skip-link {
  position: absolute;
  left: -9999px;
}
.skip-link:focus {
  left: 16px;
  top: 16px;
  background: var(--white);
  padding: 8px 12px;
  z-index: 1000;
}

/* Announce */
.announce {
  background: var(--black);
  color: #fff;
  font-size: 0.88rem;
}
.announce-inner {
  display: flex;
  justify-content: center;
  gap: 16px;
  align-items: center;
  padding: 10px 0;
  text-align: center;
  flex-wrap: wrap;
}
.announce a {
  color: var(--primary);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 9999;
  display: block !important;
  visibility: visible !important;
  background: var(--black);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.announce {
  display: block !important;
  position: relative;
  z-index: 10000;
}
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) {
  .admin-bar .site-header { top: 46px; }
}
.header-inner {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto minmax(120px, 1fr);
  align-items: center;
  min-height: 56px;
  padding: 8px 0;
  gap: 12px;
}
.brand { flex: 0 0 auto; }
.brand-name {
  font-family: var(--sans);
  font-size: 1.05rem;
  font-weight: 500;
  color: #fff;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.custom-logo-link,
.brand a {
  display: inline-flex;
  align-items: center;
  max-width: 200px;
}
.custom-logo-link img,
.custom-logo {
  max-width: 200px !important;
  width: auto !important;
  height: auto !important;
  max-height: 40px;
  object-fit: contain;
}
.site-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}
.header-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  justify-self: end;
}
.header-icon {
  font-size: 0.86rem;
  font-weight: 500;
  color: #fff;
  white-space: nowrap;
}
.header-icon:hover { color: var(--primary); }
.header-cart {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: #fff;
}
.header-cart .cart-icon { display: block; }
.cart-count {
  position: absolute;
  top: 2px;
  right: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 99px;
  background: var(--primary);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1;
}
.menu {
  display: flex;
  flex-wrap: nowrap;
  gap: 2px;
  align-items: center;
  justify-content: center;
}
.menu li { flex: 0 0 auto; }
.menu a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  color: #fff;
  font-size: 0.92rem;
  font-weight: 500;
  white-space: nowrap;
}
.nav-caret {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid #fff;
  opacity: 0.7;
}
.menu a:hover,
.menu .current-menu-item > a,
.menu .current_page_item > a { color: var(--primary); }
.menu li { position: relative; }
.menu .sub-menu {
  display: none;
  position: absolute;
  top: calc(100% - 2px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 280px;
  background: #111;
  padding: 18px 0;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.45);
  z-index: 30;
  flex-direction: column;
  align-items: stretch;
}
.menu li:hover > .sub-menu,
.menu li:focus-within > .sub-menu,
.menu li.is-open > .sub-menu { display: flex; }
.menu .sub-menu a {
  display: block;
  padding: 12px 22px;
  white-space: nowrap;
  font-size: 0.95rem;
}
.menu .sub-menu a:hover { background: rgba(91,146,229,0.12); color: #fff; }
.header-account {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-size: 0.86rem;
  font-weight: 500;
}
.header-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  background: #2a2f38;
}
.btn-subscribe {
  padding: 6px 14px;
  font-size: 0.78rem;
  border-radius: 999px;
  background: #fff;
  color: #0b0d10;
  font-weight: 600;
}
.btn-subscribe:hover { background: var(--primary); color: #fff; }
.header-cta {
  margin-left: 4px;
  padding: 6px 12px;
  font-size: 0.75rem;
  line-height: 1.2;
  white-space: nowrap;
}

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  width: 42px;
  height: 42px;
  position: relative;
}
.nav-toggle-bar,
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  content: "";
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  position: absolute;
  left: 10px;
}
.nav-toggle-bar { top: 20px; }
.nav-toggle-bar::before { top: -7px; }
.nav-toggle-bar::after { top: 7px; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  transition: 0.2s ease;
}
.btn-gold {
  background: var(--primary);
  color: #fff;
}
.btn-gold:hover {
  background: var(--accent);
  color: var(--white);
}
.btn-outline {
  border-color: var(--accent);
  color: var(--accent);
  background: transparent;
}
.btn-outline:hover {
  background: var(--accent);
  color: var(--white);
}
.btn-light {
  background: var(--white);
  color: var(--accent);
}
.btn-light:hover { background: var(--cream); color: var(--accent); }
.btn-ghost {
  border-color: rgba(244, 239, 230, 0.45);
  color: var(--cream);
}
.btn-ghost:hover { background: rgba(255,255,255,0.08); color: var(--white); }
.btn-small { padding: 10px 16px; font-size: 0.88rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--moss);
  margin-bottom: 10px;
}
.eyebrow.light { color: #b9d2f7; }
.lede { font-size: 1.15rem; max-width: 640px; color: rgba(255,255,255,0.88); }

/* Hero */
.hero {
  min-height: 86vh;
  margin: 12px 16px 0;
  border-radius: 24px;
  overflow: hidden;
  background-size: cover;
  background-position: 70% center;
  position: relative;
  display: flex;
  align-items: flex-end;
  color: var(--white);
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10,20,16,0.18) 0%, rgba(10,20,16,0.55) 55%, rgba(10,20,16,0.82) 100%);
}
.hero-content {
  position: relative;
  padding: 80px 0 72px;
  max-width: 860px;
  margin-left: max(20px, calc((100% - var(--wrap)) / 2));
}
.hero h1 { color: var(--white); max-width: 16ch; }
.is-front .hero { margin-top: 0; }

/* Sections */
.pillars,
.program,
.writing-home,
.page-hero + .wrap,
.inner-section {
  padding: 88px 0;
}
.grid-4, .grid-3 { display: grid; gap: 22px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); margin-top: 36px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); margin-top: 36px; }

.pillar, .card, .post-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: 0 8px 24px rgba(22, 48, 42, 0.04);
  color: inherit;
  display: block;
}
.pillar:hover, .post-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  color: inherit;
}
.pillar-num {
  display: block;
  font-family: var(--sans);
  color: var(--accent);
  font-size: 1.05rem;
  margin-bottom: 18px;
}
.pillar p, .card p, .post-card p { color: var(--ink-soft); margin-bottom: 0; }

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 560px;
  background: var(--white);
}
.split.reverse { direction: rtl; }
.split.reverse > * { direction: ltr; }
.split-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 520px;
}
.split-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 72px 64px;
}
.book-feature { background: #e8eef8; }
.book-feature .split-media {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #d7e3f6;
  padding: 48px;
}
.book-feature .split-media img {
  width: min(420px, 100%);
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  min-height: 0;
  box-shadow: 0 24px 60px rgba(30, 79, 154, 0.22);
  border-radius: 6px;
}

.program { background: var(--accent); color: var(--cream); }
.program h2, .program h3 { color: var(--cream); }
.program .eyebrow { color: #d6e6fb; }
.program .section-lede { max-width: 640px; color: rgba(244,239,230,0.82); }
.program .card { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.08); color: var(--cream); }
.program .card p { color: rgba(244,239,230,0.78); }
.program-cta {
  margin-top: 40px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.price {
  font-family: var(--sans);
  font-size: 2rem;
  margin: 0;
  color: var(--accent);
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
}
.text-link {
  font-weight: 600;
  border-bottom: 1px solid var(--gold);
}
.post-card .meta {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--moss);
  margin-bottom: 10px;
}
.post-card h3 { font-size: 1.35rem; }

.event-banner {
  position: relative;
  background-size: cover;
  background-position: center;
  color: white;
  min-height: 420px;
  display: flex;
  align-items: center;
}
.event-inner { position: relative; max-width: 680px; padding: 80px 0; }
.event-inner h2 { color: white; }

.cta-band {
  background: var(--forest-mid);
  color: var(--cream);
  padding: 80px 0;
  text-align: center;
}
.cta-band h2 { color: var(--cream); }
.cta-band-inner { max-width: 720px; }
.cta-band .btn-row { justify-content: center; }

.site-footer {
  background: var(--black);
  color: rgba(255,255,255,0.78);
  padding: 64px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.3fr;
  gap: 36px;
  padding-bottom: 40px;
}
.site-footer h3 {
  color: var(--cream);
  font-size: 1.15rem;
}
.footer-links a { color: rgba(255,255,255,0.78); display: inline-block; padding: 4px 0; }
.footer-links a:hover { color: var(--primary); }
.footer-form { display: flex; gap: 8px; margin: 12px 0; }
.footer-form input {
  flex: 1;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.05);
  color: white;
  padding: 10px 12px;
  border-radius: 8px;
}
.footer-note, .footer-meta { font-size: 0.82rem; opacity: 0.7; }
.footer-base {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 20px;
  font-size: 0.88rem;
}
.footer-base a { color: rgba(255,255,255,0.7); }

/* Inner pages */
.page-hero {
  background: var(--accent);
  color: var(--cream);
  padding: 92px 0 72px;
}
.page-hero h1 { color: #fff; max-width: 16ch; }
.page-hero p { max-width: 620px; color: rgba(255,255,255,0.82); }

.content-wrap {
  width: min(760px, calc(100% - 40px));
  margin: 56px auto 80px;
}
.content-wrap p { font-size: 1.08rem; }
.prose h2 { margin-top: 1.4em; }

.story-block {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
  padding: 72px 0;
}
.story-block img { border-radius: 18px; width: 100%; object-fit: cover; max-height: 520px; }
.story-block.alt { grid-template-columns: 0.9fr 1.1fr; }
.story-block.alt .story-copy { order: 2; }

.quote-band {
  background: #e8eef8;
  padding: 64px 0;
  text-align: center;
}
.quote-band blockquote {
  margin: 0 auto;
  max-width: 760px;
  font-family: var(--sans);
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  line-height: 1.35;
  color: var(--forest);
}
.quote-band cite {
  display: block;
  margin-top: 16px;
  font-style: normal;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--moss);
}

.price-box {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 36px;
  margin-top: 36px;
}
.steps { counter-reset: step; margin: 28px 0; }
.steps li {
  list-style: none;
  padding: 18px 0 18px 64px;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.steps li::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 18px;
  font-family: var(--sans);
  color: var(--accent);
  font-size: 1.3rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  padding: 72px 0 96px;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  background: var(--white);
}
.contact-form textarea { min-height: 160px; }

.article-header { padding: 56px 0 12px; }
.article-header .meta { color: var(--moss); font-size: 0.9rem; }
.entry-content { padding-bottom: 80px; }
.entry-content p { font-size: 1.1rem; }
.post-list { padding: 40px 0 80px; }
.post-list article {
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}

.raines-shop { padding: 72px 0 96px; }
.product-card img { border-radius: 12px; margin-bottom: 16px; max-height: 280px; object-fit: cover; width: 100%; }
.raines-table { width: 100%; border-collapse: collapse; margin: 12px 0 28px; }
.raines-table th, .raines-table td { text-align: left; padding: 12px 8px; border-bottom: 1px solid var(--line); }
.raines-notice { padding: 14px 16px; border-radius: 12px; margin: 0 0 24px; }
.raines-notice-ok { background: #e7f0e4; color: var(--forest); }
.raines-notice-err { background: #f6e4d8; color: #6a2e16; }
.pay-choice { display: block; margin: 0 0 10px; }
.header-inner { position: relative; }

.invoice-page {
  background: #eef3f9;
  padding: 48px 20px 80px;
}
.invoice-sheet {
  width: min(760px, 100%);
  margin: 0 auto;
  background: #fff;
  border-radius: 20px;
  padding: 40px 44px 36px;
  box-shadow: 0 24px 60px rgba(20, 32, 51, 0.08);
}
.invoice-top,
.invoice-grid,
.invoice-total {
  display: flex;
  justify-content: space-between;
  gap: 24px;
}
.invoice-brand {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 4px;
}
.invoice-no {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0;
  color: var(--accent);
}
.invoice-client { font-size: 1.15rem; font-weight: 600; margin: 0 0 4px; }
.invoice-meta { margin: 0; color: var(--ink-soft); font-size: 0.92rem; }
.invoice-grid { margin: 36px 0 28px; }
.invoice-table { width: 100%; border-collapse: collapse; }
.invoice-table th {
  text-align: left;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line);
  padding: 0 0 10px;
}
.invoice-table td {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.invoice-table td p { margin: 8px 0 0; color: var(--ink-soft); }
.invoice-amt { text-align: right; font-weight: 600; white-space: nowrap; padding-left: 24px; }
.invoice-notes {
  margin: 24px 0 8px;
  padding: 16px 18px;
  background: #f3f6fb;
  border-radius: 12px;
}
.invoice-notes p { margin: 0; }
.invoice-notes .eyebrow { margin-bottom: 8px; }
.invoice-total {
  align-items: baseline;
  margin: 22px 0 28px;
  font-size: 1.05rem;
}
.invoice-total strong { font-size: 1.8rem; color: var(--accent); }
.account-list { list-style: none; padding: 0; margin: 0 0 28px; }
.account-list li {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.account-list span { color: var(--ink-soft); font-size: 0.92rem; }
.websites-work { padding-bottom: 96px; }
.website-card h3 { margin-bottom: 0.4em; }
.website-card .text-link { display: inline-block; margin-top: 12px; }
.invoice-pay-btn { width: 100%; padding: 16px 24px; font-size: 1.05rem; }
.invoice-paid {
  background: #e7f3ea;
  color: #215c34;
  padding: 14px 16px;
  border-radius: 12px;
}
.invoice-foot { margin-top: 28px; font-size: 0.88rem; color: var(--ink-soft); }
@media print {
  .announce, .site-header, .cta-band, .site-footer, .invoice-pay { display: none !important; }
  .invoice-page { background: #fff; padding: 0; }
  .invoice-sheet { box-shadow: none; }
}

@media (max-width: 980px) {
  .grid-4, .grid-3, .split, .footer-grid, .story-block, .story-block.alt, .contact-grid {
    grid-template-columns: 1fr;
  }
  .split.reverse { direction: ltr; }
  .split-copy { padding: 48px 28px 64px; }
  .split-media img { min-height: 360px; }
  .header-inner {
    grid-template-columns: 1fr auto;
    min-height: 52px;
  }
  .nav-toggle { display: block; }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--black);
    border-bottom: 1px solid var(--line);
    padding: 16px 20px 24px;
    flex-direction: column;
    align-items: stretch;
    grid-column: 1 / -1;
  }
  .site-nav.is-open { display: flex; }
  .menu { flex-direction: column; align-items: stretch; justify-content: flex-start; }
  .menu .sub-menu {
    position: static;
    transform: none;
    min-width: 0;
    box-shadow: none;
    background: #1a1a1a;
    display: none;
    border-radius: 0;
  }
  .menu li.is-open > .sub-menu { display: flex; }
  .header-cta { margin: 0; }
  .header-tools { margin: 0; }
  .hero { min-height: 78vh; background-position: center; }
  .section-head { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 640px) {
  .hero-content { padding: 56px 0 48px; }
  .pillars, .program, .writing-home { padding: 64px 0; }
  .footer-form { flex-direction: column; }
}

.event-card-image { display: block; margin: -28px -24px 16px; }
.event-card-image img { width: 100%; height: 180px; object-fit: cover; border-radius: 18px 18px 0 0; }
.event-hero.has-image { background-size: cover; background-position: center; position: relative; }
.event-hero .hero-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11,13,16,0.25), rgba(11,13,16,0.78)); }
.event-feature { margin: 0 0 24px; }
.event-feature img { width: 100%; border-radius: 16px; }
.quest-form label { display: block; font-weight: 600; margin: 0 0 10px; }
.quest-form textarea, .quest-form input { width: 100%; margin-bottom: 16px; }
.quest-step { display: none; }
.quest-step.is-on { display: block; }
.program-feature { padding: 36px; }
