/* =========================================================
   Cornerstone Risk Partners — Site Styles
   ========================================================= */

:root {
  --navy: #0F1F3D;
  --navy-dark: #0A1730;
  --navy-mid: #16294C;
  --gold: #C9A227;
  --gold-light: #E3C15E;
  --gold-dark: #9C7A1B;
  --ink: #1B2430;
  --ink-soft: #4B5566;
  --paper: #FBFAF7;
  --paper-dim: #F1EEE6;
  --line: #E4E0D6;
  --white: #FFFFFF;

  --font-head: "Playfair Display", "Cambria", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --container: 1140px;
  --radius: 10px;
  --shadow-sm: 0 1px 3px rgba(15, 31, 61, 0.08);
  --shadow-md: 0 10px 30px rgba(15, 31, 61, 0.12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  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-head);
  color: var(--navy);
  line-height: 1.15;
  margin: 0 0 0.5em;
  font-weight: 700;
}

h1 { font-size: clamp(2.1rem, 4vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; color: var(--ink-soft); }

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

.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.75rem;
  color: var(--gold-dark);
  margin-bottom: 0.9em;
}

section { padding: 88px 0; }
@media (max-width: 720px) {
  section { padding: 56px 0; }
}

.section-alt { background: var(--paper-dim); }
.section-navy { background: var(--navy); color: var(--white); }
.section-navy h2, .section-navy h3 { color: var(--white); }
.section-navy p { color: rgba(255,255,255,0.78); }
.section-navy .eyebrow { color: var(--gold-light); }

.section-head {
  max-width: 640px;
  margin: 0 0 3rem;
}
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.85em 1.7em;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}
.btn-gold {
  background: var(--gold);
  color: var(--navy-dark);
}
.btn-gold:hover { background: var(--gold-light); transform: translateY(-1px); }

.btn-outline {
  background: transparent;
  border-color: rgba(255,255,255,0.5);
  color: var(--white);
}
.btn-outline:hover { border-color: var(--white); background: rgba(255,255,255,0.08); }

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

/* =========================================================
   Header / Nav
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251, 250, 247, 0.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand img { width: 42px; height: 42px; }
.brand-text {
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--navy);
  line-height: 1.05;
  font-size: 1.02rem;
  letter-spacing: 0.02em;
}
.brand-text span { display: block; font-size: 0.72em; color: var(--gold-dark); font-weight: 600; letter-spacing: 0.12em; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
  padding: 0.4em 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--navy);
  border-color: var(--gold);
}

.nav-cta { display: flex; align-items: center; gap: 1.6rem; }
.nav-phone {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--navy);
  display: none;
}
@media (min-width: 900px) { .nav-phone { display: inline-block; } }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--navy);
  margin: 5px 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

@media (max-width: 860px) {
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--paper);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px 24px 20px;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: 0.7em 0; border-bottom: 1px solid var(--line); }
  .nav-toggle { display: block; }
}

/* =========================================================
   Hero
   ========================================================= */
.hero {
  position: relative;
  background: radial-gradient(1100px 600px at 85% -10%, rgba(201,162,39,0.16), transparent 60%), var(--navy);
  color: var(--white);
  padding: 110px 0 100px;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, var(--paper) 100%);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3rem;
  align-items: center;
}
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
}
.hero h1 { color: var(--white); }
.hero .lede { font-size: 1.15rem; color: rgba(255,255,255,0.82); max-width: 46ch; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 2rem; }

.hero-badge {
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.05);
  border-radius: var(--radius);
  padding: 1.6rem;
}
.hero-badge-crest { width: 64px; height: 64px; margin-bottom: 1rem; }
.hero-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.4rem;
  margin-top: 1.2rem;
}
.hero-stat .num {
  font-family: var(--font-head);
  font-size: 1.9rem;
  color: var(--gold-light);
  font-weight: 700;
  display: block;
}
.hero-stat .label {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.72);
  letter-spacing: 0.03em;
}

/* =========================================================
   Cards / Grids
   ========================================================= */
.grid {
  display: grid;
  gap: 1.75rem;
}
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

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

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem 1.7rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.2rem;
}
.card-icon svg { width: 24px; height: 24px; stroke: var(--gold-light); }

.card h3 { margin-bottom: 0.5em; }
.card p { margin-bottom: 0; font-size: 0.95rem; }

/* Value strip */
.value-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 2.2rem 0;
}
.value-item { flex: 1 1 200px; }
.value-item .num {
  font-family: var(--font-head);
  font-size: 2.4rem;
  color: var(--navy);
  font-weight: 700;
  display: block;
}
.value-item .label { color: var(--ink-soft); font-size: 0.92rem; }

/* =========================================================
   Team teaser (home) + Team grid (about)
   ========================================================= */
.team-teaser {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.5rem;
}
@media (max-width: 980px) { .team-teaser { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 620px) { .team-teaser { grid-template-columns: repeat(2, 1fr); } }

.team-teaser a { display: block; text-align: center; }
.team-teaser img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 0.9rem;
  filter: grayscale(15%);
  transition: filter 0.2s ease;
}
.team-teaser a:hover img { filter: grayscale(0%); }
.team-teaser .name { font-weight: 700; color: var(--navy); }
.team-teaser .role { font-size: 0.85rem; color: var(--ink-soft); }

.team-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.5rem;
}
@media (max-width: 780px) { .team-grid { grid-template-columns: 1fr; } }
/* Odd team count: center the last card on its own row (desktop only) */
@media (min-width: 781px) {
  .team-grid > .team-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    justify-self: center;
    width: calc(50% - 1.25rem);
  }
}

.team-card {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 1.4rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem;
  box-shadow: var(--shadow-sm);
}
@media (max-width: 480px) {
  .team-card { grid-template-columns: 1fr; text-align: left; }
  .team-card img { width: 110px; }
}
.team-card img {
  width: 140px;
  height: 140px;
  object-fit: cover;
  border-radius: 10px;
}
.team-card .name { font-family: var(--font-head); font-size: 1.25rem; color: var(--navy); font-weight: 700; }
.team-card .role { color: var(--gold-dark); font-weight: 700; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.6em; }
.team-card .meta { font-size: 0.82rem; color: var(--ink-soft); margin-bottom: 0.8em; }
.team-card ul { margin: 0; padding-left: 1.1em; color: var(--ink-soft); font-size: 0.9rem; }
.team-card li { margin-bottom: 0.35em; }

/* =========================================================
   CTA band
   ========================================================= */
.cta-band {
  background: var(--navy);
  color: var(--white);
  border-radius: var(--radius);
  padding: 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}
.cta-band h2 { color: var(--white); margin-bottom: 0.3em; }
.cta-band p { color: rgba(255,255,255,0.78); margin-bottom: 0; }

/* =========================================================
   Contact page
   ========================================================= */
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 3rem;
  align-items: start;
}
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-info-card {
  background: var(--navy);
  color: var(--white);
  border-radius: var(--radius);
  padding: 2.4rem;
}
.contact-info-card h3 { color: var(--white); }
.contact-line {
  display: flex;
  gap: 0.9rem;
  margin-bottom: 1.4rem;
  align-items: flex-start;
}
.contact-line .ic {
  width: 22px; height: 22px; flex: none; margin-top: 2px;
  stroke: var(--gold-light);
}
.contact-line a, .contact-line span { color: rgba(255,255,255,0.9); font-size: 0.98rem; }
.contact-line a:hover { color: var(--gold-light); }

.map-wrap {
  margin-top: 1.6rem;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.15);
}
.map-wrap iframe { width: 100%; height: 220px; border: 0; display: block; }

.form-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2.4rem;
  box-shadow: var(--shadow-sm);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }

.field { margin-bottom: 1.2rem; }
.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.4em;
}
.field input, .field select, .field textarea {
  width: 100%;
  padding: 0.75em 0.9em;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--paper);
  transition: border-color 0.15s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--gold);
}
.field textarea { resize: vertical; min-height: 120px; }

.form-note {
  font-size: 0.82rem;
  color: var(--ink-soft);
  margin-top: 1rem;
}

/* =========================================================
   Footer
   ========================================================= */
.site-footer {
  background: var(--navy-dark);
  color: rgba(255,255,255,0.75);
  padding: 56px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 2.2rem;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr; } }

.footer-brand { display: flex; gap: 12px; align-items: center; margin-bottom: 1rem; }
.footer-brand img { width: 36px; height: 36px; }
.footer-brand span {
  font-family: var(--font-head);
  color: var(--white);
  font-weight: 700;
  font-size: 1.02rem;
}
.site-footer h4 {
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1em;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 0.7em; }
.site-footer a:hover { color: var(--gold-light); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.8rem;
  padding-top: 1.6rem;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.5);
}

/* =========================================================
   Page hero (interior pages)
   ========================================================= */
.page-hero {
  background: var(--navy);
  color: var(--white);
  padding: 74px 0 64px;
}
.page-hero h1 { color: var(--white); margin-bottom: 0.4em; }
.page-hero p { color: rgba(255,255,255,0.78); max-width: 60ch; margin-bottom: 0; }

.breadcrumb {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.6);
  margin-bottom: 1rem;
}
.breadcrumb a:hover { color: var(--gold-light); }

/* Utility */
.mt-0 { margin-top: 0; }
.text-center { text-align: center; }
