/* ============================================================
   John Grossi Referrals — site stylesheet (redesign, July 2026)
   Palette:  ink navy #10203D · slate #1D3560 · gold #C9A227
             sand #F7F5EF · text #262C39 · muted #5B6372
   Type:     Fraunces (display) · Inter (body)
   Signature: gold hairlines + a soft shoreline wave under heroes
   ============================================================ */

:root {
  --navy: #10203D;
  --navy-light: #1D3560;
  --gold: #C9A227;
  --gold-light: #E7CD75;
  --bg: #F7F5EF;
  --text: #262C39;
  --muted: #5B6372;
  --border: #E4E0D5;
  --white: #ffffff;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --shadow-sm: 0 1px 2px rgba(16, 32, 61, 0.06), 0 2px 8px rgba(16, 32, 61, 0.05);
  --shadow-md: 0 4px 14px rgba(16, 32, 61, 0.10), 0 1px 3px rgba(16, 32, 61, 0.06);
  --shadow-lg: 0 14px 40px rgba(16, 32, 61, 0.16);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--gold-light); color: var(--navy); }

a { color: var(--navy-light); text-decoration: none; }
a:hover { text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 3px; }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 2px; }

/* ------------------------------------------------------------
   Header
   ------------------------------------------------------------ */
header.site-header {
  background: var(--navy);
  color: var(--white);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(201, 162, 39, 0.45);
  box-shadow: 0 2px 16px rgba(10, 20, 40, 0.25);
}

.header-inner {
  max-width: 1140px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 24px;
}

.brand {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--white);
  letter-spacing: 0.2px;
  white-space: nowrap;
}
.brand span {
  display: block;
  font-family: var(--sans);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 2.6px;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-top: 1px;
}

nav.main-nav ul {
  list-style: none;
  display: flex;
  gap: 24px;
  margin: 0;
  padding: 0;
}

nav.main-nav a {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.86rem;
  font-weight: 500;
  letter-spacing: 0.3px;
  padding-bottom: 5px;
  position: relative;
}
nav.main-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: 0;
  height: 2px;
  background: var(--gold-light);
  transition: right 0.25s ease;
}
nav.main-nav a:hover { color: var(--white); text-decoration: none; }
nav.main-nav a:hover::after { right: 0; }
nav.main-nav a.active { color: var(--gold-light); }
nav.main-nav a.active::after { right: 0; }

/* Tap-to-call button (header) */
.phone-cta, .email-cta {
  display: inline-block;
  background: var(--gold);
  color: var(--navy);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.2px;
  padding: 10px 18px;
  border-radius: 6px;
  white-space: nowrap;
  box-shadow: 0 2px 10px rgba(201, 162, 39, 0.35);
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.phone-cta:hover, .email-cta:hover {
  background: var(--gold-light);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(201, 162, 39, 0.45);
}
.phone-cta::before { content: "\260E\FE0E\2002"; }
.email-cta::before { content: "\2709\FE0E\2002"; }

/* ------------------------------------------------------------
   Hero — layered navy with gold glow and shoreline wave
   ------------------------------------------------------------ */
.hero {
  position: relative;
  background:
    radial-gradient(900px 420px at 85% -10%, rgba(201, 162, 39, 0.22), transparent 60%),
    radial-gradient(700px 380px at -10% 110%, rgba(59, 90, 145, 0.5), transparent 55%),
    linear-gradient(150deg, var(--navy) 0%, var(--navy-light) 100%);
  color: var(--white);
  padding: 88px 24px 120px;
  text-align: center;
  overflow: hidden;
}
.hero::before {
  /* faint horizon line */
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 54px;
  width: 56px;
  height: 3px;
  border-radius: 2px;
  background: var(--gold);
}
.hero::after {
  /* shoreline wave into the page background */
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 64px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 64' preserveAspectRatio='none'%3E%3Cpath fill='%23F7F5EF' d='M0,34 C240,66 480,2 720,18 C960,34 1200,64 1440,26 L1440,64 L0,64 Z'/%3E%3C/svg%3E") no-repeat bottom / 100% 64px;
  pointer-events: none;
}

.hero h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2rem, 4.4vw, 3.1rem);
  line-height: 1.16;
  letter-spacing: -0.01em;
  margin: 0 auto 18px;
  max-width: 820px;
}
.hero p.lead {
  font-size: 1.12rem;
  font-weight: 400;
  color: #CBD4E4;
  max-width: 640px;
  margin: 0 auto 32px;
  line-height: 1.7;
}
.hero p.lead a { color: var(--gold-light); }

/* ------------------------------------------------------------
   Buttons
   ------------------------------------------------------------ */
.btn {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.2px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn-primary {
  background: var(--gold);
  color: var(--navy);
  box-shadow: 0 3px 12px rgba(201, 162, 39, 0.35);
}
.btn-primary:hover {
  background: var(--gold-light);
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(201, 162, 39, 0.45);
}
.btn-outline {
  background: rgba(255, 255, 255, 0.04);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.45);
  margin-left: 12px;
}
.btn-outline:hover {
  border-color: var(--gold-light);
  color: var(--gold-light);
  text-decoration: none;
  transform: translateY(-2px);
}

/* ------------------------------------------------------------
   Main content & headings
   ------------------------------------------------------------ */
main {
  max-width: 1140px;
  margin: 0 auto;
  padding: 56px 24px 64px;
}

section { margin-bottom: 64px; }

h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.85rem;
  line-height: 1.25;
  color: var(--navy);
  margin: 0 0 14px;
  padding-top: 16px;
  position: relative;
}
h2::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 34px;
  height: 3px;
  border-radius: 2px;
  background: var(--gold);
}

h3 {
  font-family: var(--serif);
  font-weight: 600;
  color: var(--navy);
  font-size: 1.18rem;
  line-height: 1.35;
}

p { margin-top: 0; }

/* ------------------------------------------------------------
   Grids & cards
   ------------------------------------------------------------ */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 26px;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
  margin-top: 26px;
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 26px;
  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 h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }
.card p { color: #3A4152; font-size: 0.95rem; }

.stat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 4px solid var(--gold);
  border-radius: 8px;
  padding: 22px 24px;
  box-shadow: var(--shadow-sm);
}
.stat-card .value {
  font-family: var(--serif);
  font-size: 1.9rem;
  font-weight: 600;
  color: var(--navy);
  display: block;
  line-height: 1.2;
  margin-bottom: 4px;
}
.stat-card .label {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

/* ------------------------------------------------------------
   Callouts & disclosures
   ------------------------------------------------------------ */
.callout {
  background: linear-gradient(0deg, rgba(29, 53, 96, 0.05), rgba(29, 53, 96, 0.05)), var(--white);
  border: 1px solid #D8DEEA;
  border-left: 4px solid var(--navy-light);
  padding: 20px 24px;
  border-radius: 8px;
  margin: 28px 0;
  box-shadow: var(--shadow-sm);
}

.disclosure {
  background: #FBF6E6;
  border: 1px solid #E8D99A;
  padding: 18px 22px;
  border-radius: 8px;
  font-size: 0.88rem;
  line-height: 1.6;
  color: #5C4E15;
}

ol.steps li, ul.checklist li { margin-bottom: 12px; }
ol.steps li::marker { font-weight: 700; color: var(--gold); }
ul.checklist { list-style: none; padding-left: 0; }
ul.checklist li {
  padding-left: 26px;
  position: relative;
}
ul.checklist li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 9px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
}

/* ------------------------------------------------------------
   Tables
   ------------------------------------------------------------ */
table.source-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 18px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
table.source-table th, table.source-table td {
  text-align: left;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
}
table.source-table th {
  color: var(--white);
  background: var(--navy);
  font-weight: 600;
  letter-spacing: 0.4px;
  font-size: 0.84rem;
  text-transform: uppercase;
}
table.source-table tr:last-child td { border-bottom: none; }
table.source-table tr:nth-child(even) td { background: #FBFAF6; }

/* ------------------------------------------------------------
   Trust bar — elevated card overlapping the hero wave
   ------------------------------------------------------------ */
.trust-bar {
  background: transparent;
  padding: 0 24px;
  position: relative;
  z-index: 5;
}
.trust-inner {
  max-width: 1140px;
  margin: -40px auto 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
  padding: 22px 28px;
}
/* second trust bar on a page (e.g., testimonial strip) sits in normal flow */
.trust-bar + .trust-bar .trust-inner,
main ~ .trust-bar .trust-inner { margin-top: 20px; }

.trust-photo {
  width: 66px; height: 66px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gold);
  flex-shrink: 0;
}
.trust-initials {
  width: 66px; height: 66px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--gold-light);
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.5rem;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--gold);
  flex-shrink: 0;
}
.trust-name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.08rem;
  color: var(--navy);
}
.trust-bio { color: var(--muted); font-size: 0.9rem; margin: 2px 0 0; max-width: 420px; }
.trust-points {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-left: auto;
}
.trust-badge {
  display: inline-block;
  background: #EEF2F8;
  border: 1px solid #D5DEEC;
  color: var(--navy);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.2px;
  padding: 7px 14px;
  border-radius: 999px;
}
.trust-badge.license { background: #FBF6E6; border-color: #E8D99A; color: #5C4E15; }

/* ------------------------------------------------------------
   Guide opt-in box
   ------------------------------------------------------------ */
.optin-box {
  position: relative;
  background:
    radial-gradient(500px 220px at 100% 0%, rgba(201, 162, 39, 0.2), transparent 60%),
    linear-gradient(140deg, var(--navy) 0%, var(--navy-light) 100%);
  color: var(--white);
  border-radius: 14px;
  padding: 30px 32px;
  margin: 40px 0;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(201, 162, 39, 0.3);
}
.optin-box h3 {
  color: var(--gold-light);
  font-size: 1.3rem;
  margin: 0 0 6px;
}
.optin-box p { color: #CBD4E4; font-size: 0.95rem; margin: 0 0 16px; }
.optin-box form { display: flex; gap: 10px; flex-wrap: wrap; }
.optin-box input[type="email"] {
  flex: 1 1 240px;
  padding: 13px 15px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 6px;
  font-size: 0.95rem;
  font-family: inherit;
  background: rgba(255, 255, 255, 0.96);
}
.optin-box button { border: none; cursor: pointer; font-family: inherit; }
.optin-fineprint { font-size: 0.76rem !important; color: #92A0B8 !important; margin-top: 12px !important; }
.optin-status { display: none; margin-top: 14px; font-size: 0.92rem; padding: 12px 16px; border-radius: 8px; }
.optin-status.success { display: block; background: rgba(201, 162, 39, 0.18); border: 1px solid rgba(201, 162, 39, 0.5); color: #F0E3B2; }
.optin-status.error { display: block; background: rgba(220, 80, 60, 0.18); border: 1px solid rgba(220, 80, 60, 0.5); color: #F5C9C0; }
.optin-status a { color: var(--gold-light); text-decoration: underline; }

/* ------------------------------------------------------------
   Contact form
   ------------------------------------------------------------ */
.step-tag {
  display: inline-block;
  background: var(--gold);
  color: var(--navy);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 10px;
  box-shadow: 0 2px 8px rgba(201, 162, 39, 0.3);
}
.consent-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 20px;
  font-size: 0.84rem;
  line-height: 1.55;
  color: var(--muted);
}
.consent-row input[type="checkbox"] {
  width: auto;
  margin-top: 4px;
  flex-shrink: 0;
  accent-color: var(--gold);
}

/* ------------------------------------------------------------
   Footer
   ------------------------------------------------------------ */
footer.site-footer {
  background: var(--navy);
  color: #C7CEDE;
  padding: 48px 24px 40px;
  margin-top: 72px;
  border-top: 3px solid var(--gold);
}
.footer-inner {
  max-width: 1140px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 28px;
}
.footer-inner strong {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: 0.2px;
}
.footer-inner a { color: var(--gold-light); }
.footer-inner p { margin: 0 0 8px; font-size: 0.92rem; }
.footer-note { font-size: 0.8rem; color: #8F98AB; max-width: 560px; margin-top: 14px !important; line-height: 1.6; }

/* ------------------------------------------------------------
   Responsive
   ------------------------------------------------------------ */
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 800px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .header-inner { flex-direction: column; gap: 12px; padding: 14px 18px; }
  nav.main-nav ul { gap: 14px 18px; flex-wrap: wrap; justify-content: center; }
  .hero { padding: 64px 20px 104px; }
  .hero::before { top: 36px; }
  .hero h1 { font-size: 1.9rem; }
  .hero p.lead { font-size: 1.02rem; }
  .btn { display: block; margin: 0 auto 12px; max-width: 320px; }
  .btn-outline { margin-left: auto; }
  .trust-inner { margin-top: -30px; padding: 20px; }
  .trust-points { margin-left: 0; }
  main { padding: 40px 20px 48px; }
  section { margin-bottom: 48px; }
}

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

/* ------------------------------------------------------------
   Nav dropdown (Tools menu)
   ------------------------------------------------------------ */
.nav-dropdown { position: relative; }
.nav-dropdown > a::after { display: none; }
nav.main-nav ul.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  left: -8px;
  background: var(--navy);
  border: 1px solid rgba(201, 162, 39, 0.45);
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  padding: 8px 0;
  min-width: 230px;
  list-style: none;
  margin: 0;
  gap: 0;
  z-index: 200;
}
/* invisible hover bridge so the menu doesn't close crossing the gap */
.nav-dropdown::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  top: 100%;
  height: 12px;
}
nav.main-nav .nav-dropdown:hover ul.dropdown-menu,
nav.main-nav .nav-dropdown:focus-within ul.dropdown-menu { display: block; }
.dropdown-menu li { display: block; }
.dropdown-menu a {
  display: block;
  padding: 10px 18px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.86rem;
}
.dropdown-menu a::after { display: none; }
.dropdown-menu a:hover { color: var(--gold-light); background: rgba(255, 255, 255, 0.05); text-decoration: none; }
.dropdown-menu .dropdown-section {
  margin-top: 5px;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
}
.dropdown-menu .dropdown-section a {
  padding: 9px 18px 4px;
  font-size: 0.66rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.42);
  font-weight: 600;
}
.dropdown-menu .dropdown-section a:hover { color: var(--gold-light); background: transparent; }
.dropdown-caret { font-size: 0.7em; opacity: 0.8; }

@media (max-width: 800px) {
  /* On phones, show the tools as regular nav items instead of a dropdown */
  .nav-dropdown > a { display: none; }
  .nav-dropdown::after { display: none; }
  nav.main-nav ul.dropdown-menu {
    display: flex !important;
    position: static;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    min-width: 0;
    gap: 14px 18px;
    flex-wrap: wrap;
    justify-content: center;
  }
  .dropdown-menu a { padding: 0 0 5px; }
  .dropdown-menu .dropdown-section {
    flex-basis: 100%;
    text-align: center;
    margin-top: 2px;
    border-top: none;
  }
  .dropdown-menu .dropdown-section a { padding: 6px 0 0; }
}
