/* ---------- Design tokens ---------- */
:root {
  /* Colors sampled directly from the live cpeo.biz site (header/nav navy,
     maroon nav buttons + footer bar, blue hyperlinks, black body text) —
     kept as the starting palette for the rebuild per Scott's request. */
  --color-navy-900: #252b43;
  --color-navy-800: #1c2138;
  --color-navy-700: #3333cc;
  --color-gold-500: #c51b26;
  --color-gold-600: #9e0704;
  --color-cream-50: #ffffff;
  --color-white: #ffffff;
  --color-ink-900: #000000;
  --color-ink-600: #4a4a4a;
  --color-border: #d9d9d9;

  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --font-heading: "Source Serif 4", Georgia, serif;

  --container-width: 1120px;
  --radius: 10px;
  --shadow-card: 0 2px 10px rgba(11, 31, 51, 0.08);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-ink-900);
  background: var(--color-white);
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: var(--color-navy-700); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--color-navy-900);
  line-height: 1.2;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 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;
}
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--color-navy-900);
  color: var(--color-white);
  padding: 0.75em 1em;
  z-index: 100;
}
.skip-link:focus { left: 0; }

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-gold-600);
  margin: 0 0 0.5em;
}

/* ---------- Buttons ---------- */
.button {
  display: inline-block;
  padding: 0.8em 1.6em;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease;
}
.button:hover { text-decoration: none; transform: translateY(-1px); }
.button--gold {
  background: var(--color-gold-500);
  color: var(--color-white);
}
.button--gold:hover { background: var(--color-gold-600); }
.button--outline {
  border-color: var(--color-navy-700);
  color: var(--color-navy-700);
}
.button--outline:hover { background: var(--color-navy-700); color: var(--color-white); }

/* ---------- Header ---------- */
.site-header {
  background: var(--color-navy-900);
  color: var(--color-white);
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.9rem 1.5rem;
  max-width: 1360px;
}
.site-header__brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--color-white);
  flex-shrink: 0;
}
.site-header__brand:hover { text-decoration: none; }
.site-header__logo { height: 96px; width: auto; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
}
.nav-toggle__bar {
  width: 22px;
  height: 2px;
  background: var(--color-white);
  display: block;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  min-width: 0;
}
.site-nav ul {
  display: flex;
  gap: 1rem;
  list-style: none;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.site-nav a {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
  font-size: 0.88rem;
  white-space: nowrap;
}
.site-nav a:hover, .site-nav a[aria-current="page"] {
  color: var(--color-white);
  text-decoration: none;
  border-bottom: 2px solid var(--color-gold-500);
}
.nav-cta { white-space: nowrap; }

@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-navy-900);
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem 1.5rem 1.5rem;
    display: none;
  }
  .site-nav.is-open { display: flex; }
  .site-nav ul {
    flex-direction: column;
    gap: 0.9rem;
    width: 100%;
  }
  .nav-cta { margin-top: 0.5rem; }
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(160deg, var(--color-navy-900), var(--color-navy-700));
  color: var(--color-white);
  padding: 4.5rem 0;
}
.hero__grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 3rem;
  align-items: stretch;
}
.hero h1 { color: var(--color-white); }
.hero p { color: rgba(255, 255, 255, 0.85); font-size: 1.1rem; }
.hero__actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 1.5rem; }
.hero__art { display: flex; justify-content: center; min-height: 320px; }
.hero__art svg { width: 100%; max-width: 340px; }
.hero__art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

@media (max-width: 860px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__art { order: -1; min-height: 220px; }
  .hero__art svg { max-width: 220px; }
}

/* ---------- Video ---------- */
.video-frame {
  max-width: 800px;
  margin: 2rem auto 0;
}
.video-frame video {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  background: var(--color-navy-900);
  display: block;
}

/* ---------- Services grid ---------- */
.services {
  padding: 4rem 0;
  background: var(--color-cream-50);
}
.services__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}
.service-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.6rem;
  box-shadow: var(--shadow-card);
}
.service-card .icon {
  color: var(--color-gold-600);
  margin-bottom: 0.8rem;
}
.service-card__icon {
  width: 88px;
  height: 88px;
  object-fit: contain;
  margin-bottom: 0.8rem;
}
.page-hero-icon {
  display: block;
  width: 130px;
  height: 130px;
  object-fit: contain;
  margin: 0 auto 1.5rem;
}
.info-card h3 .icon { margin-right: 0.4em; }
.service-card h3 { font-size: 1.05rem; margin-bottom: 0.4em; }
.service-card p { font-size: 0.92rem; color: var(--color-ink-600); margin: 0; }

/* ---------- Section / CTA ---------- */
.section { padding: 4rem 0; }
.cta-banner {
  background: var(--color-navy-900);
  color: var(--color-white);
  padding: 3rem 0;
  text-align: center;
}
.cta-banner h2 { color: var(--color-white); }
.cta-banner p { color: rgba(255, 255, 255, 0.85); }

.cta-banner--photo {
  position: relative;
  background-size: cover;
  background-position: center;
  padding: 5rem 0;
}
.cta-banner__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(11, 31, 51, 0.92), rgba(11, 31, 51, 0.75));
}
.cta-banner__content {
  position: relative;
  z-index: 1;
}

/* ---------- Page header (inner pages) ---------- */
.page-header {
  background: var(--color-cream-50);
  border-bottom: 1px solid var(--color-border);
  padding: 3rem 0;
}
.page-header__intro {
  max-width: 65ch;
  color: var(--color-ink-600);
  font-size: 1.05rem;
}
.page-body {
  padding: 3rem 0 4.5rem;
  max-width: 75ch;
}
.page-body h2 { margin-top: 1.6em; }
.page-body ul { margin: 0 0 1em 1.3em; padding: 0; list-style: disc; }
.page-body li { margin-bottom: 0.4em; }

/* ---------- Icon utility ---------- */
.icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}
.icon--sm { width: 18px; height: 18px; vertical-align: -3px; margin-right: 0.3em; }

/* ---------- Security badge (About) ---------- */
.security-block {
  display: flex;
  gap: 2rem;
  align-items: center;
  margin-bottom: 2rem;
}
.security-badge { width: 140px; flex-shrink: 0; }
@media (max-width: 640px) {
  .security-block { flex-direction: column; align-items: flex-start; }
  .security-badge { width: 110px; }
}

/* ---------- Resource photo (Resources) ---------- */
.resource-photo {
  width: 100%;
  max-width: 360px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  float: right;
  margin: 0 0 1rem 1.5rem;
}
@media (max-width: 640px) {
  .resource-photo { float: none; margin: 0 0 1rem; max-width: 100%; }
}

/* ---------- Cards / lists (About, Resources) ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0;
}
.info-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.4rem;
  background: var(--color-white);
}
.info-card h3 { font-size: 1rem; margin-bottom: 0.5em; }
.info-card p { font-size: 0.92rem; color: var(--color-ink-600); }
.info-card a.button { margin-top: 0.5rem; }

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0;
}

/* ---------- Further reading sidebar box ---------- */
.sidebar-box {
  float: right;
  width: 260px;
  margin: 0 0 1.5rem 2rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.25rem;
  background: var(--color-cream-50);
  box-shadow: var(--shadow-card);
}
.sidebar-box h3 {
  display: flex;
  align-items: center;
  gap: 0.5em;
  font-size: 0.95rem;
  margin-bottom: 0.9rem;
  color: var(--color-navy-900);
}
.sidebar-box h3 .icon { color: var(--color-gold-600); flex-shrink: 0; }
.sidebar-box ul { list-style: none; margin: 0; padding: 0; }
.sidebar-box li + li { margin-top: 0.7rem; padding-top: 0.7rem; border-top: 1px solid var(--color-border); }
.sidebar-box a { font-size: 0.88rem; line-height: 1.4; }
@media (max-width: 700px) {
  .sidebar-box { float: none; width: auto; margin: 0 0 1.5rem; }
}

.info-card__icon {
  width: 88px;
  height: 88px;
  object-fit: contain;
  margin-bottom: 0.6rem;
}

/* ---------- Icon lightbox (click-to-enlarge) ---------- */
.icon-zoomable { cursor: zoom-in; }
.icon-lightbox[hidden] { display: none; }
.icon-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 2rem;
}
.icon-lightbox img {
  max-width: min(420px, 90vw);
  max-height: 80vh;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}
.icon-lightbox__close {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: #fff;
  font-size: 2.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
}
/* ---------- Photo fullscreen (click-to-enlarge, real photos) ---------- */
.photo-fullscreen__btn {
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;
  font-size: 0.85rem;
  padding: 0.5rem 1rem;
  background: var(--color-white);
  border-color: var(--color-border);
  color: var(--color-navy-900);
}
.photo-fullscreen:fullscreen {
  background: #000;
  object-fit: contain;
  width: 100%;
  height: 100%;
  cursor: zoom-out;
}

.photo-grid figure {
  margin: 0;
  position: relative;
}
.photo-grid img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}
.photo-grid figcaption {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--color-ink-600);
  text-align: center;
}

.testimonial {
  position: relative;
  margin: 2rem 0;
  padding: 1.75rem 1.75rem 1.5rem 2.5rem;
  border-left: 4px solid var(--color-gold-500);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: #f3f4f8;
  font-style: italic;
  color: var(--color-ink-900);
}
.testimonial::before {
  content: "\201C";
  position: absolute;
  top: -0.3rem;
  left: 0.6rem;
  font-family: var(--font-heading);
  font-style: normal;
  font-size: 3.5rem;
  line-height: 1;
  color: var(--color-gold-500);
  opacity: 0.5;
}
.testimonial__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.9rem;
  font-style: normal;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-navy-900);
}
.testimonial__badge .icon { width: 0.95rem; height: 0.95rem; color: var(--color-gold-500); margin-right: -0.15rem; }
.review-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
  margin: 1.5rem 0;
  padding: 1.4rem 1.6rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-cream-50);
}
.review-cta__stars {
  display: flex;
  gap: 0.15rem;
  color: var(--color-gold-500);
}
.review-cta__stars .icon { width: 1.2rem; height: 1.2rem; }
.review-cta__rating { font-weight: 700; font-size: 1.05rem; color: var(--color-navy-900); }
.review-cta__count { color: var(--color-ink-600); font-size: 0.92rem; }
.review-cta__actions { margin-left: auto; display: flex; gap: 0.75rem; flex-wrap: wrap; }
.review-cta__qr {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--color-ink-600);
}
.review-cta__qr img {
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 4px;
  background: var(--color-white);
}

@media (max-width: 640px) {
  .review-cta__actions { margin-left: 0; }
}

.testimonial footer {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(37, 43, 67, 0.12);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  font-style: normal;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--color-navy-900);
}
.testimonial__more {
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--color-gold-500);
  text-decoration: underline;
}

/* ---------- Reviews page ---------- */
.review-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.1rem;
  margin: 1.5rem 0;
}
.review-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.2rem 1.3rem;
  background: var(--color-white);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.review-card--empty { background: var(--color-cream-50); }
.review-card--flagged { border-color: var(--color-gold-500); }
.review-card__stars {
  display: flex;
  gap: 0.1rem;
  color: var(--color-gold-500);
}
.review-card__stars .icon { width: 0.95rem; height: 0.95rem; }
.review-card__quote {
  font-size: 0.92rem;
  color: var(--color-ink-900);
  flex-grow: 1;
}
.review-card__empty-note {
  font-size: 0.88rem;
  font-style: italic;
  color: var(--color-ink-600);
}
.review-card__meta {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-navy-900);
  border-top: 1px solid var(--color-border);
  padding-top: 0.5rem;
  margin-top: 0.2rem;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
}
.review-card__date {
  font-weight: 400;
  color: var(--color-ink-600);
  font-size: 0.8rem;
}

.resource-links {
  list-style: none;
  margin: 0 0 2rem;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}
.resource-links li {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 0.9rem 1.1rem;
}
.resource-links a { font-weight: 600; }

.calc-groups { display: grid; gap: 1.75rem; margin-top: 1rem; }
.calc-group h3 { font-size: 1rem; margin-bottom: 0.5em; }
.calc-group ul { list-style: none; margin: 0; display: grid; gap: 0.4rem; }
.calc-group a { font-size: 0.95rem; }

/* ---------- Blog ---------- */
.post-list { list-style: none; margin: 0; display: grid; gap: 1.75rem; }
.post-list li {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.6rem;
}
.post-list .eyebrow { margin-bottom: 0.3em; }
.post-list h2 { font-size: 1.25rem; margin-bottom: 0.3em; }
.post-list p { color: var(--color-ink-600); margin-bottom: 0.6em; }

.post__header { padding-top: 3rem; }
.post__body { max-width: 70ch; padding-bottom: 3rem; }
.post__footer { max-width: 70ch; padding-bottom: 4rem; }

/* ---------- Forms ---------- */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.form-grid .full { grid-column: 1 / -1; }
label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 0.35rem; }
input, textarea {
  width: 100%;
  font: inherit;
  padding: 0.7em 0.9em;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-white);
}
input:focus, textarea:focus {
  outline: 2px solid var(--color-navy-700);
  outline-offset: 1px;
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}
@media (max-width: 860px) {
  .contact-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
}
.contact-details { display: grid; gap: 1rem; }
.contact-details a { display: flex; align-items: center; font-weight: 600; }

.schedule-heading {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.schedule-heading h2 { margin-bottom: 0.3em; }
.schedule-heading img { margin-top: 0.3em; }

.scheduler-frame {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 600px;
}
.scheduler-frame iframe { width: 100%; height: 700px; border: 0; display: block; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-navy-900);
  color: rgba(255, 255, 255, 0.85);
  padding: 3.5rem 0 1.5rem;
}
.site-footer__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}
.site-footer__logo {
  height: 64px;
  width: auto;
  margin-bottom: 0.8em;
}
.site-footer__heading {
  display: block;
  color: var(--color-white);
  font-weight: 600;
  margin-bottom: 0.7em;
}
.site-footer a { color: rgba(255, 255, 255, 0.85); }
.site-footer a:hover { color: var(--color-white); }
.site-footer__links { list-style: none; display: grid; gap: 0.5rem; }
.site-footer__social { display: flex; gap: 0.9rem; }
.site-footer__social .icon { width: 20px; height: 20px; }
.site-footer__bottom {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.85rem;
}

@media (max-width: 860px) {
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
}
