/* ============================================================
   Candlelight Partners — Site Stylesheet
   Design tokens live at the top as CSS variables so every page
   pulls colors/spacing from one place. Change a value here and
   it updates everywhere the variable is used.
   ============================================================ */

:root {
  /* Brand colors, drawn from the Candlelight Partners identity */
  --navy: #0b2447;
  --navy-light: #16345f;
  --red: #a31621;
  --gold: #d9a441;
  --gold-light: #f0c878;
  --green: #4f7942;
  --cream: #f7f5f1;
  --white: #ffffff;
  --ink: #1a1f26;
  --ink-soft: #4a5160;
  --border: #e3ddd2;

  /* Type scale */
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;

  /* Spacing rhythm */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.75rem;
  --space-lg: 3rem;
  --space-xl: 5rem;

  --radius: 6px;
  --max-width: 1160px;
}

/* ---------- Reset & base ---------- */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.15;
  margin: 0 0 var(--space-sm);
  color: var(--navy);
}

h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 600; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.3rem); font-weight: 600; }
h3 { font-size: 1.3rem; font-weight: 600; }

p {
  margin: 0 0 var(--space-sm);
  max-width: 65ch;
  color: var(--ink-soft);
}

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

section {
  padding: var(--space-xl) 0;
}

/* Visible keyboard focus everywhere — accessibility baseline */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.98rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--gold);
  color: var(--navy);
}
.btn-primary:hover { background: var(--gold-light); }

.btn-secondary {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.55);
}
.btn-secondary:hover { border-color: var(--white); }

.btn-outline {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
}
.btn-outline:hover { background: var(--navy); color: var(--white); }

/* ---------- Header / Nav ---------- */
.site-header {
  background: var(--navy);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem var(--space-md);
  max-width: var(--max-width);
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--white);
}

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--gold-light), var(--gold) 60%, var(--red) 130%);
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  gap: var(--space-md);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.4rem 0;
  border-bottom: 2px solid transparent;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--white);
  border-bottom-color: var(--gold);
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.6rem;
  cursor: pointer;
  padding: 0.2rem 0.5rem;
}

@media (max-width: 860px) {
  .nav-toggle { display: block; }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--navy-light);
    flex-direction: column;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }

  .nav-links.open {
    max-height: 400px;
  }

  .nav-links li {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  .nav-links a {
    display: block;
    padding: 0.9rem var(--space-md);
  }

  .nav-cta .btn-secondary { display: none; }
}

/* ---------- Hero (home page) ---------- */
.hero {
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-light) 60%, #1c3f6e 100%);
  color: var(--white);
  padding: var(--space-xl) 0;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  width: 620px;
  height: 620px;
  right: -180px;
  top: -220px;
  background: radial-gradient(circle, rgba(217, 164, 65, 0.35), transparent 70%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--space-lg);
  align-items: center;
  position: relative;
  z-index: 1;
}

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

.hero-eyebrow {
  color: var(--gold-light);
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.hero h1 { color: var(--white); }

.hero p.lead {
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.15rem;
  max-width: 46ch;
}

.hero-actions {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin-top: var(--space-md);
}

.hero-stats {
  display: grid;
  gap: var(--space-md);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius);
  padding: var(--space-md);
}

.hero-stat .num {
  font-family: var(--font-display);
  font-size: 2.1rem;
  color: var(--gold-light);
  display: block;
}

.hero-stat .label {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.92rem;
}

/* ---------- Page header (non-home pages) ---------- */
.page-header {
  background: var(--navy);
  color: var(--white);
  padding: var(--space-lg) 0;
}

.page-header h1 { color: var(--white); margin-bottom: var(--space-xs); }
.page-header p { color: rgba(255, 255, 255, 0.78); }

/* ---------- Section helpers ---------- */
.section-head {
  max-width: 640px;
  margin: 0 0 var(--space-lg);
}

.section-head.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.section-alt {
  background: var(--white);
}

/* ---------- Cards / grids ---------- */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}

@media (max-width: 860px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-top: 4px solid var(--navy);
  border-radius: var(--radius);
  padding: var(--space-md);
}

.card.accent-red { border-top-color: var(--red); }
.card.accent-gold { border-top-color: var(--gold); }
.card.accent-green { border-top-color: var(--green); }

.card h3 { margin-bottom: 0.5rem; }

.card ul {
  margin: var(--space-xs) 0 0;
  padding-left: 1.1rem;
  color: var(--ink-soft);
  font-size: 0.94rem;
}

.card ul li { margin-bottom: 0.3rem; }

/* ---------- Why choose us tiles ---------- */
.reason {
  display: flex;
  gap: var(--space-sm);
  align-items: flex-start;
}

.reason-mark {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--navy);
  color: var(--gold-light);
  font-family: var(--font-display);
  font-weight: 600;
}

/* ---------- CTA banner ---------- */
.cta-banner {
  background: var(--red);
  color: var(--white);
  padding: var(--space-lg) 0;
  text-align: center;
}

.cta-banner h2 { color: var(--white); }
.cta-banner p { color: rgba(255, 255, 255, 0.88); margin-left: auto; margin-right: auto; }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: var(--space-lg);
}

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

.contact-item {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.contact-item .icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--cream);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--navy);
  font-weight: 700;
}

.contact-item h4 {
  margin: 0 0 0.2rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--navy);
}

.social-row {
  display: flex;
  gap: 0.7rem;
  margin-top: var(--space-md);
}

.social-row a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--navy);
}

.social-row a:hover { background: var(--navy); color: var(--white); }

/* ---------- Form ---------- */
.form-field {
  margin-bottom: var(--space-sm);
}

.form-field label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.35rem;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.96rem;
  background: var(--white);
  color: var(--ink);
}

.form-field textarea {
  min-height: 130px;
  resize: vertical;
}

.form-note {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-top: var(--space-sm);
}

.form-status {
  margin-top: var(--space-sm);
  padding: 0.8rem 1rem;
  border-radius: var(--radius);
  font-size: 0.92rem;
  display: none;
}

.form-status.visible { display: block; }
.form-status.success { background: #e9f3e6; color: #2d5024; border: 1px solid #c3ddba; }
.form-status.error { background: #fbe9ea; color: #7a1520; border: 1px solid #edc0c3; }

/* ---------- Map placeholder ---------- */
.map-frame {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  height: 320px;
}

.map-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.75);
  padding: var(--space-lg) 0 var(--space-md);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr; gap: var(--space-md); }
}

.site-footer h4 {
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.95rem;
  margin-bottom: var(--space-sm);
}

.site-footer .brand { margin-bottom: var(--space-sm); }

.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: 0.5rem; }
.footer-links a:hover { color: var(--white); }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding-top: var(--space-md);
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-sm);
}
