/* ==========================================================================
   Charles Appraisal Group — shared stylesheet
   Tokens pulled from the client logo (slate-navy wordmark, blue-teal crescent)
   ========================================================================== */

:root {
  --navy: #1f2a44;
  --slate-blue: #3b4a7a;
  --teal-accent: #2da7c4;
  --brass: #b08d4f;
  --ivory: #f6f3ec;
  --ivory-deep: #efebe1;
  --ink: #2b2b28;
  --ink-soft: #5a5a54;
  --line: rgba(31, 42, 68, 0.14);
  --white: #fffefb;

  --font-display: "Cormorant Garamond", "Times New Roman", serif;
  --font-body: "Work Sans", -apple-system, "Segoe UI", sans-serif;

  --max-width: 1180px;
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  --space-6: 6rem;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--ivory);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--navy);
  margin: 0 0 var(--space-2);
  font-weight: 600;
  line-height: 1.15;
}
p { margin: 0 0 var(--space-2); color: var(--ink-soft); }
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-3);
}
:focus-visible {
  outline: 2px solid var(--teal-accent);
  outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ---- Signature crescent motif ----
   Echoes the logo's crescent mark wherever a section needs a quiet divider. */
.crescent-rule {
  display: block;
  width: 64px;
  height: 32px;
  margin: var(--space-2) 0 var(--space-3);
  border: 2px solid var(--teal-accent);
  border-radius: 50%;
  border-right-color: transparent;
  border-bottom-color: transparent;
  transform: rotate(45deg);
  opacity: 0.85;
}
.center .crescent-rule { margin-left: auto; margin-right: auto; }
.crescent-bullet::before {
  content: "";
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 10px;
  border: 1.5px solid var(--teal-accent);
  border-radius: 50%;
  border-right-color: transparent;
  border-bottom-color: transparent;
  transform: rotate(45deg) translateY(-1px);
}

/* ---- Top utility bar ---- */
.topbar {
  background: var(--navy);
  color: var(--ivory);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}
.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.45rem;
  padding-bottom: 0.45rem;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.topbar a { opacity: 0.92; }
.topbar a:hover { color: var(--teal-accent); opacity: 1; }
.topbar-contacts { display: flex; gap: var(--space-3); flex-wrap: wrap; }

/* ---- Header / Nav ---- */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-2);
  padding-bottom: var(--space-2);
}
.brand {
  display: flex;
  align-items: center;
}
.brand-logo {
  height: 56px;
  width: auto;
  display: block;
}

.main-nav ul {
  display: flex;
  gap: var(--space-4);
  align-items: center;
}
.main-nav a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--navy);
  padding: 0.3rem 0.1rem;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.main-nav a:hover,
.main-nav a[aria-current="page"] {
  border-bottom-color: var(--teal-accent);
  color: var(--slate-blue);
}
.nav-cta {
  background: var(--navy);
  color: var(--white) !important;
  padding: 0.55rem 1.15rem !important;
  border-radius: 2px;
  border-bottom: none !important;
}
.nav-cta:hover { background: var(--slate-blue); color: var(--white) !important; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 0.4rem 0.6rem;
  font-size: 1.1rem;
  color: var(--navy);
}

@media (max-width: 880px) {
  .nav-toggle { display: inline-flex; }
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--line);
  }
  .main-nav.open { display: block; }
  .main-nav .container { padding: var(--space-2) var(--space-3); }
  .main-nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-2);
  }
  .topbar-contacts { font-size: 0.76rem; }
}

/* ---- Hero ---- */
.hero {
  background: linear-gradient(180deg, var(--ivory) 0%, var(--ivory-deep) 100%);
  padding: var(--space-6) 0 var(--space-5);
  border-bottom: 1px solid var(--line);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--space-5);
  align-items: center;
}
.hero .eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brass);
  font-weight: 600;
  margin-bottom: var(--space-2);
}
.hero h1 {
  font-size: clamp(2.3rem, 4vw, 3.4rem);
  margin-bottom: var(--space-3);
}
.hero p.lead {
  font-size: 1.08rem;
  max-width: 38ch;
}
.hero-media {
  aspect-ratio: 4 / 3;
  border-radius: 4px;
  overflow: hidden;
  background: var(--ivory-deep);
}
@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-media { order: -1; }
}

/* ---- Buttons ---- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.8rem 1.7rem;
  border-radius: 2px;
  border: 1px solid var(--navy);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn-primary { background: var(--navy); color: var(--white); }
.btn-primary:hover { background: var(--slate-blue); border-color: var(--slate-blue); }
.btn-ghost { background: transparent; color: var(--navy); }
.btn-ghost:hover { background: var(--navy); color: var(--white); }
.btn-row { display: flex; gap: var(--space-2); flex-wrap: wrap; margin-top: var(--space-3); }

/* ---- Generic section ---- */
section { padding: var(--space-5) 0; }
.section-tight { padding: var(--space-4) 0; }
.section-alt { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-navy { background: var(--navy); color: var(--ivory); }
.section-navy h2, .section-navy h3 { color: var(--ivory); }
.section-navy p { color: rgba(246, 243, 236, 0.78); }
.section-head { max-width: 62ch; margin-bottom: var(--space-4); }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brass);
  font-weight: 600;
  display: block;
  margin-bottom: var(--space-1);
}

/* ---- Cards / grids ---- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-3); }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-4); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-3); }
@media (max-width: 880px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
}

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: var(--space-3);
  height: 100%;
  display: flex;
  flex-direction: column;
}
.card .card-media {
  aspect-ratio: 16/10;
  background: var(--ivory-deep);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: var(--space-2);
}
.card h3 { font-size: 1.25rem; margin-bottom: 0.4rem; }
.card p { font-size: 0.93rem; flex-grow: 1; }
.card .card-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--slate-blue);
  margin-top: var(--space-1);
}
.card .card-link:hover { color: var(--teal-accent); }

.service-card { text-align: left; }

/* Situations / tags list (succession, divorce, insurance, etc.) */
.tag-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}
.tag {
  border: 1px solid var(--line);
  background: var(--white);
  padding: 0.5rem 1rem;
  font-size: 0.86rem;
  border-radius: 2px;
  color: var(--navy);
}

/* ---- Image placeholder (data-slot driven) ---- */
.img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: repeating-linear-gradient(
    45deg, var(--ivory-deep), var(--ivory-deep) 10px, #e4dfd1 10px, #e4dfd1 20px
  );
  color: var(--ink-soft);
  font-size: 0.78rem;
  text-align: center;
  padding: var(--space-2);
}
.img-placeholder span {
  background: rgba(255, 254, 251, 0.85);
  padding: 0.3rem 0.6rem;
  border-radius: 2px;
}

/* ---- CTA strip ---- */
.cta-strip {
  background: var(--navy);
  color: var(--ivory);
  padding: var(--space-4) 0;
  text-align: center;
}
.cta-strip h2 { color: var(--ivory); }
.cta-strip .btn-primary { background: var(--brass); border-color: var(--brass); color: var(--navy); }
.cta-strip .btn-primary:hover { background: var(--ivory); border-color: var(--ivory); }

/* ---- Process / numbered steps (genuine sequence) ---- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-3); }
.step .num {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--brass);
  margin-bottom: 0.3rem;
}
.step h4 { font-size: 1.05rem; margin-bottom: 0.3rem; }
.step p { font-size: 0.9rem; }
@media (max-width: 880px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .steps { grid-template-columns: 1fr; } }

/* ---- Page header (for sub-pages) ---- */
.page-header {
  background: var(--ivory-deep);
  border-bottom: 1px solid var(--line);
  padding: var(--space-5) 0 var(--space-4);
}
.breadcrumb {
  font-size: 0.82rem;
  color: var(--ink-soft);
  margin-bottom: var(--space-2);
}
.breadcrumb a { color: var(--slate-blue); }
.breadcrumb a:hover { color: var(--teal-accent); }
.page-header h1 { font-size: clamp(2rem, 3.4vw, 2.8rem); margin-bottom: 0; }
.page-header p.lead { max-width: 60ch; margin-top: var(--space-2); }

/* ---- Two-column content block (used heavily on service pages) ---- */
.content-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
  align-items: center;
}
.content-block.reverse { direction: rtl; }
.content-block.reverse > * { direction: ltr; }
.content-block .media {
  aspect-ratio: 4/3;
  border-radius: 3px;
  overflow: hidden;
  background: var(--ivory-deep);
}
.content-block ul.checklist li {
  position: relative;
  padding-left: 1.4rem;
  margin-bottom: 0.55rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
}
.content-block ul.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.42em;
  width: 8px;
  height: 8px;
  border: 1.5px solid var(--teal-accent);
  border-radius: 50%;
  border-right-color: transparent;
  border-bottom-color: transparent;
  transform: rotate(45deg);
}
@media (max-width: 880px) {
  .content-block { grid-template-columns: 1fr; }
  .content-block.reverse { direction: ltr; }
}

/* ---- Service hub overview cards ---- */
.service-overview-card {
  position: relative;
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 3px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.service-overview-card .media { aspect-ratio: 16/10; background: var(--ivory-deep); }
.service-overview-card .body { padding: var(--space-3); flex-grow: 1; display: flex; flex-direction: column; }
.service-overview-card h3 { margin-bottom: 0.4rem; }
.service-overview-card p { font-size: 0.92rem; flex-grow: 1; }

/* ---- Quote / pull statement ---- */
.pull-statement {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
  color: var(--navy);
  font-weight: 500;
  max-width: 48ch;
  line-height: 1.35;
}

/* ---- Contact page ---- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
}
.contact-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: var(--space-4);
}
.contact-card h3 { font-size: 1.1rem; margin-bottom: var(--space-1); }
.contact-card a.contact-line {
  display: block;
  font-size: 1.05rem;
  color: var(--navy);
  margin-bottom: 0.3rem;
}
.contact-card a.contact-line:hover { color: var(--teal-accent); }
.contact-list { margin-bottom: var(--space-4); }
.contact-list > li { margin-bottom: var(--space-3); }
.hours-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.hours-table td { padding: 0.4rem 0; border-bottom: 1px solid var(--line); color: var(--ink-soft); }
.hours-table td:first-child { color: var(--navy); font-weight: 600; width: 40%; }

.form-field { margin-bottom: var(--space-2); }
.form-field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.3rem;
}
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--white);
  color: var(--ink);
}
.form-field textarea { min-height: 120px; resize: vertical; }
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: 2px solid var(--teal-accent);
  outline-offset: 1px;
  border-color: var(--teal-accent);
}
.map-embed {
  aspect-ratio: 16/9;
  background: var(--ivory-deep);
  border-radius: 3px;
  margin-top: var(--space-3);
}
@media (max-width: 880px) { .contact-grid { grid-template-columns: 1fr; } }

/* ---- Footer ---- */
.site-footer {
  background: var(--navy);
  color: rgba(246, 243, 236, 0.82);
  padding: var(--space-5) 0 var(--space-3);
  font-size: 0.9rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}
.footer-grid h4 {
  color: var(--ivory);
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: var(--space-2);
}
.footer-grid li { margin-bottom: 0.55rem; }
.footer-grid a:hover { color: var(--teal-accent); }
.footer-brand .brand-logo {
  filter: brightness(0) invert(1) opacity(0.9);
}
.footer-bottom {
  border-top: 1px solid rgba(246, 243, 236, 0.16);
  padding-top: var(--space-3);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.8rem;
  opacity: 0.75;
}
@media (max-width: 880px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 540px) {
  .footer-grid { grid-template-columns: 1fr; }
}
