/* Beach Rock Financial — shared styles
   Placeholder brand palette (coastal navy/teal + sand gold).
   Swap these tokens once real brand colors are supplied. */

:root {
  --navy-900: #0a2240;
  --navy-800: #123a63;
  --navy-700: #15467a;
  --teal-700: #0e6670;
  --teal-600: #158a95;
  --teal-500: #1fa8b5;
  --gold-600: #b8863a;
  --gold-500: #d9b163;
  --gold-100: #faf0d9;
  --sand-50: #fbf7ef;
  --ink-900: #16202a;
  --ink-600: #4a5568;
  --ink-300: #b9c2cc;
  --white: #ffffff;
  --border: #e6e1d3;
  --shadow: 0 20px 44px -20px rgba(10, 34, 64, 0.38);
  --shadow-sm: 0 10px 24px -14px rgba(10, 34, 64, 0.28);
  --radius: 16px;
  --max-width: 1120px;
  --gradient-brand: linear-gradient(135deg, var(--navy-900) 0%, var(--teal-600) 100%);
  --gradient-gold: linear-gradient(135deg, #e7c988, var(--gold-500));
}

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

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink-900);
  background: var(--white);
  line-height: 1.6;
}

h1, h2, h3, h4 {
  font-family: "Fraunces", Georgia, serif;
  color: var(--navy-900);
  line-height: 1.15;
  margin: 0 0 0.5em;
}

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

p { margin: 0 0 1em; color: var(--ink-600); }
a { color: var(--teal-600); }
img { max-width: 100%; display: block; }

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

/* ---------- Header ---------- */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--white);
  box-shadow: 0 4px 20px -16px rgba(10, 34, 64, 0.4);
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 40px;
  height: 76px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--navy-900);
  text-decoration: none;
}
.brand .mark {
  display: block;
}
nav.primary-nav {
  display: flex;
  align-items: center;
  flex: 1;
  gap: 28px;
}
nav.primary-nav .btn-primary {
  margin-left: auto;
}
nav.primary-nav .nav-item {
  position: relative;
}
nav.primary-nav a.nav-link {
  display: inline-block;
  padding: 10px 6px;
  color: var(--ink-900);
  text-decoration: none;
  font-size: 1.05rem;
  font-weight: 600;
  border-radius: 8px;
  white-space: nowrap;
  position: relative;
  transition: color 0.15s ease, background 0.15s ease;
}
nav.primary-nav a.nav-link::after {
  content: "";
  position: absolute;
  left: 6px; right: 6px; bottom: 4px;
  height: 2px;
  border-radius: 2px;
  background: var(--gradient-brand);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.18s ease;
}
nav.primary-nav a.nav-link:hover,
nav.primary-nav a.nav-link.active {
  background: var(--sand-50);
  color: var(--navy-900);
}
nav.primary-nav a.nav-link:hover::after,
nav.primary-nav a.nav-link.active::after {
  transform: scaleX(1);
}
.caret {
  display: inline-block;
  width: 0; height: 0;
  margin-left: 4px;
  vertical-align: middle;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  opacity: 0.6;
}
.dropdown-panel {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 240px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 8px;
  display: none;
}
.nav-item:hover .dropdown-panel,
.nav-item:focus-within .dropdown-panel {
  display: block;
}
.dropdown-panel a {
  display: block;
  padding: 9px 10px;
  border-radius: 7px;
  color: var(--ink-900);
  text-decoration: none;
  font-size: 0.92rem;
}
.dropdown-panel a:hover { background: var(--sand-50); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
}
.btn-primary {
  background: var(--gradient-brand);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-outline {
  background: transparent;
  border-color: var(--navy-900);
  color: var(--navy-900);
}
.btn-outline:hover {
  background: var(--navy-900);
  color: var(--white);
  transform: translateY(-2px);
}
.btn-gold {
  background: var(--gradient-gold);
  color: var(--navy-900);
  box-shadow: 0 12px 26px -16px rgba(201, 162, 75, 0.7);
}
.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px -16px rgba(201, 162, 75, 0.8);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--navy-900);
}

/* ---------- Hero / sections ---------- */
.hero {
  background: linear-gradient(165deg, #eef6f7 0%, var(--sand-50) 45%, var(--white) 100%);
  padding: 76px 0 60px;
  position: relative;
  overflow: hidden;
}
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  z-index: 0;
  pointer-events: none;
}
.hero::before {
  width: 460px; height: 460px;
  background: radial-gradient(circle, rgba(31,168,181,0.28), transparent 70%);
  top: -170px; right: -130px;
}
.hero::after {
  width: 380px; height: 380px;
  background: radial-gradient(circle, rgba(217,177,99,0.3), transparent 70%);
  bottom: -190px; left: -110px;
}
.hero .wrap { position: relative; z-index: 1; }
.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal-700);
  background: var(--gold-100);
  border: 1px solid rgba(201,162,75,0.35);
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }

section { padding: 56px 0; }
section.alt { background: linear-gradient(180deg, var(--sand-50), #fff); }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 8px;
}
.stat-card {
  text-align: center;
  padding: 24px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
}
.stat-card .num {
  font-family: "Fraunces", Georgia, serif;
  font-size: 2rem;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 600;
}
.stat-card .label { font-size: 0.85rem; color: var(--ink-600); }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
}
.trust-grid {
  grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 900px) {
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .trust-grid { grid-template-columns: 1fr; }
}
.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--gradient-brand);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--teal-500);
}
.card:hover::before { transform: scaleX(1); }
.icon-badge {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--gradient-brand);
  color: var(--gold-100);
  display: flex; align-items: center; justify-content: center;
  font-family: "Fraunces", Georgia, serif;
  font-weight: 700;
  font-size: 1.2rem;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}
.card .tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--teal-600);
  margin-bottom: 10px;
}
.card ul { margin: 12px 0 0; padding-left: 18px; color: var(--ink-600); }
.card ul li { margin-bottom: 6px; }

.callout {
  border: 1px dashed var(--gold-500);
  background: var(--gold-100);
  border-radius: var(--radius);
  padding: 18px 20px;
  font-size: 0.92rem;
  color: var(--navy-900);
}

.placeholder {
  color: var(--teal-600);
  font-weight: 600;
  background: var(--gold-100);
  padding: 1px 6px;
  border-radius: 4px;
}
.placeholder-footer {
  color: var(--gold-500);
  font-weight: 600;
}

.step-list {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 18px;
}
.step-list li {
  counter-increment: step;
  position: relative;
  padding: 18px 20px 18px 56px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
}
.step-list li::before {
  content: counter(step);
  position: absolute;
  left: 16px; top: 18px;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--gradient-brand);
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: var(--shadow-sm);
}

table.concepts-table { width: 100%; border-collapse: collapse; }
table.concepts-table td, table.concepts-table th {
  border: 1px solid var(--border);
  padding: 10px 12px;
  text-align: left;
}

/* ---------- Forms ---------- */
form.stack { display: grid; gap: 16px; max-width: 640px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
label { font-size: 0.88rem; font-weight: 600; color: var(--navy-900); display: block; margin-bottom: 6px; }
input, select, textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: 9px;
  font-family: inherit;
  font-size: 0.95rem;
  background: var(--white);
  color: var(--ink-900);
}
textarea { min-height: 120px; resize: vertical; }

.calc-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: start;
}
.calc-results {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  background: linear-gradient(165deg, var(--sand-50), #fff);
  box-shadow: var(--shadow-sm);
}
.calc-results .result-row {
  display: flex; justify-content: space-between;
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.calc-results .result-row:last-child { border-bottom: none; }
.calc-results .result-row .val { font-weight: 700; color: var(--navy-900); }

/* ---------- Footer ---------- */
.site-footer {
  background: linear-gradient(165deg, var(--navy-900) 0%, #0c3350 55%, var(--teal-700) 130%);
  color: var(--ink-300);
  padding: 48px 0 24px;
  margin-top: 40px;
}
.site-footer a { color: var(--white); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.footer-grid h4 { color: var(--white); font-family: inherit; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 14px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: 0.9rem; }
.contact-list li { display: flex; align-items: center; gap: 8px; }
.contact-list svg { flex-shrink: 0; opacity: 0.85; }
.footer-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  padding-top: 20px; font-size: 0.82rem;
}
.footer-legal-links a { color: var(--ink-300); }
.footer-legal-links a:hover { color: var(--white); }
.disclosure {
  font-size: 0.78rem;
  color: var(--ink-300);
  max-width: 760px;
  margin-top: 10px;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .calc-panel { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  nav.primary-nav { display: none; }
  .nav-toggle { display: block; }
  .site-header.open nav.primary-nav {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 76px; left: 0; right: 0;
    max-height: calc(100vh - 76px);
    overflow-y: auto;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 12px;
  }
  .site-header.open .nav-item {
    text-align: center;
  }
  .site-header.open .dropdown-panel {
    position: static;
    box-shadow: none;
    display: block;
    border: none;
    padding-left: 0;
    min-width: 0;
    text-align: center;
  }
  .site-header.open nav.primary-nav .btn-primary {
    margin: 8px auto 0;
  }
  .form-row { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
}
