* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --navy: #0c2340;
  --navy-light: #163a63;
  --gold: #c9a227;
  --gold-soft: #f5ecd3;
  --bg: #f7f9fc;
  --surface: #ffffff;
  --text: #1a2b3c;
  --muted: #5c6f82;
  --border: #d8e2ec;
  --radius: 14px;
  --font: "DM Sans", system-ui, sans-serif;
  --serif: "Libre Baskerville", Georgia, serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

.hidden { display: none !important; }

/* Top bar */
.top-bar {
  background: var(--navy);
  color: rgba(255,255,255,0.88);
  font-size: 0.82rem;
}

.top-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.55rem 0;
  gap: 1rem;
  flex-wrap: wrap;
}

.top-bar a { color: #fff; text-decoration: none; font-weight: 600; }

/* Header */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  gap: 1rem;
  flex-wrap: wrap;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: inherit;
}

.logo-mark {
  width: 2.8rem;
  height: 2.8rem;
  display: grid;
  place-items: center;
  background: var(--navy);
  color: var(--gold);
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.35rem;
  border-radius: 10px;
}

.logo-text strong {
  display: block;
  font-size: 1.05rem;
  color: var(--navy);
}

.logo-text small {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
}

.nav {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  flex-wrap: wrap;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
}

.nav a:hover { color: var(--navy); }

.nav-agent-links {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-agent-portal {
  background: var(--navy) !important;
  color: #fff !important;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  font-weight: 600 !important;
  font-size: 0.85rem !important;
}

.nav-agent-portal:hover {
  background: var(--navy-light) !important;
  color: #fff !important;
}

.nav-portal {
  background: var(--gold-soft) !important;
  color: var(--navy) !important;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  font-weight: 600 !important;
  font-size: 0.85rem !important;
}

.nav-portal:hover {
  background: var(--gold) !important;
  color: #fff !important;
}

.nav-cta {
  background: var(--navy) !important;
  color: #fff !important;
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 10px;
  padding: 0.8rem 1.25rem;
  font: inherit;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
}

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

.btn.primary {
  background: var(--navy);
  color: #fff;
}

.btn.primary:hover { box-shadow: 0 8px 20px rgba(12,35,64,0.2); }

.btn.outline {
  background: transparent;
  color: var(--navy);
  border: 2px solid var(--border);
}

.btn.ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

.btn.sm { padding: 0.45rem 0.8rem; font-size: 0.82rem; }
.btn.full { width: 100%; }

/* Hero */
.hero {
  background:
    linear-gradient(135deg, rgba(12,35,64,0.96), rgba(22,58,99,0.92)),
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  color: #fff;
  padding: 4.5rem 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
  align-items: center;
}

.eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.75rem;
}

.hero h1 {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.15;
  margin-bottom: 1rem;
}

.hero-lead {
  color: rgba(255,255,255,0.88);
  font-size: 1.05rem;
  max-width: 52ch;
  margin-bottom: 1.5rem;
}

.hero-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 1.5rem; }

.hero .btn.outline {
  border-color: rgba(255,255,255,0.35);
  color: #fff;
}

.trust-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  color: rgba(255,255,255,0.82);
  font-size: 0.92rem;
}

.trust-list li::before { content: "✓ "; color: var(--gold); font-weight: 700; }

.hero-card {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 18px;
  padding: 1.5rem;
  backdrop-filter: blur(6px);
}

.hero-card h2 { font-size: 1.2rem; margin-bottom: 0.5rem; }
.hero-card p { color: rgba(255,255,255,0.8); font-size: 0.92rem; margin-bottom: 1rem; }

.mini-options { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.mini-options a {
  background: var(--gold);
  color: var(--navy);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
}

/* Sections */
.section { padding: 4rem 0; }
.muted-bg { background: #eef3f8; }

.section-head {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 2.5rem;
}

.section-head h2 {
  font-family: var(--serif);
  font-size: 2rem;
  color: var(--navy);
  margin-bottom: 0.5rem;
}

.section-head p { color: var(--muted); }

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: 0 8px 24px rgba(12,35,64,0.05);
}

.service-icon { font-size: 1.75rem; margin-bottom: 0.75rem; }
.service-card h3 { color: var(--navy); margin-bottom: 0.5rem; }
.service-card p { color: var(--muted); font-size: 0.92rem; margin-bottom: 0.85rem; }

.text-link {
  color: var(--navy-light);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.9rem;
}

.why-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

.why-grid h2 {
  font-family: var(--serif);
  font-size: 1.85rem;
  color: var(--navy);
  margin-bottom: 0.6rem;
}

.why-lead { color: var(--muted); }

.why-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.why-list li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  font-size: 0.95rem;
}

.why-list strong { color: var(--navy); }

/* Quote form */
.quote-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 2rem;
  align-items: start;
}

.quote-intro h2 {
  font-family: var(--serif);
  font-size: 2rem;
  color: var(--navy);
  margin-bottom: 0.6rem;
}

.quote-intro p { color: var(--muted); margin-bottom: 1rem; }

.demo-badge {
  display: inline-block;
  background: var(--gold-soft);
  color: #7a6116;
  border: 1px solid #e6d49a;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
}

.quote-form, .agent-settings, .output-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: 0 8px 24px rgba(12,35,64,0.05);
}

fieldset {
  border: none;
  margin-bottom: 1.25rem;
}

legend {
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.75rem;
  font-size: 0.92rem;
}

label {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

input, select, textarea {
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  font: inherit;
  font-size: 0.92rem;
  color: var(--text);
  background: #fff;
}

input:focus, select:focus, textarea:focus {
  outline: 2px solid rgba(12,35,64,0.2);
  border-color: var(--navy-light);
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.field-grid.four { grid-template-columns: repeat(4, 1fr); }

.form-error {
  margin-top: 0.75rem;
  color: #b42318;
  font-size: 0.88rem;
  min-height: 1.2em;
}

/* Agent output */
.agent-section { background: #eef3f8; }

.agent-settings { margin-bottom: 1.25rem; }

.agent-settings h3 {
  font-size: 1rem;
  color: var(--navy);
  margin-bottom: 0.85rem;
}

.settings-note {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted);
}

.output-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.output-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.output-head h3 {
  font-size: 1rem;
  color: var(--navy);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tone-pill {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--gold-soft);
  color: #7a6116;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
}

.subject-input {
  margin-bottom: 0.65rem;
  font-weight: 600;
  background: #f8fafc;
}

.output-text {
  resize: vertical;
  min-height: 180px;
  background: #f8fafc;
  line-height: 1.55;
}

.char-count, .copy-status {
  margin-top: 0.55rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.copy-status { text-align: center; margin-top: 1rem; font-weight: 600; color: var(--navy); }

.quote-actions {
  margin-top: 1rem;
  text-align: center;
}

/* Quote tracker */
.thankyou-card {
  margin-top: 1.5rem;
  padding: 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(12, 35, 64, 0.06);
}

.thankyou-card h3 {
  font-family: var(--serif);
  color: var(--navy);
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.thankyou-note {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.portal-page .portal-hero { padding-top: 2rem; }

.portal-intro h1 {
  font-family: var(--serif);
  color: var(--navy);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  margin-bottom: 0.5rem;
}

.portal-intro p {
  color: var(--muted);
  max-width: 680px;
}

.portal-export-card {
  margin-top: 1.5rem;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.portal-export-card h2 {
  font-size: 1.1rem;
  color: var(--navy);
  margin-bottom: 0.35rem;
}

.portal-note {
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 1rem;
}

.portal-export-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.portal-status {
  margin-top: 0.85rem;
  min-height: 1.2em;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--navy);
}

.portal-stat {
  text-align: right;
}

.portal-page .header-inner .nav {
  gap: 1rem;
  align-items: center;
}

.portal-stat-label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.portal-stat strong {
  font-size: 1.5rem;
  color: var(--navy);
}

.followup-head {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
  align-items: start;
}

.client-summary-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.client-summary-card h3 {
  font-size: 0.95rem;
  color: var(--navy);
  margin-bottom: 0.75rem;
}

.summary-list {
  list-style: none;
  display: grid;
  gap: 0.55rem;
  font-size: 0.92rem;
}

.summary-list strong {
  display: inline-block;
  min-width: 6.5rem;
  color: var(--muted);
  font-weight: 600;
}

.followup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
  margin-top: 1.25rem;
}

.tracker-section { background: var(--surface); border-top: 1px solid var(--border); }

.tracker-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.filter-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}

.filter-toggle.is-active {
  background: var(--gold-soft) !important;
  color: var(--navy) !important;
  border-color: var(--gold);
}

.filter-icon {
  width: 1.1rem;
  height: 1.1rem;
}

.filter-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.2rem;
  height: 1.2rem;
  padding: 0 0.3rem;
  border-radius: 999px;
  background: var(--navy);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
}

.filter-panel {
  margin-bottom: 1rem;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.filter-panel-head h3 {
  font-size: 0.98rem;
  color: var(--navy);
  margin-bottom: 0.25rem;
}

.filter-panel-head p {
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 1rem;
}

.filter-grid {
  margin-bottom: 0.75rem;
}

.filter-actions {
  display: flex;
  justify-content: flex-end;
}

.filter-summary {
  min-height: 1.2em;
  margin-bottom: 0.75rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--navy);
}

.search-field { flex: 1; min-width: 220px; }

.tracker-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.import-label {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}

.tracker-status {
  min-height: 1.2em;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.75rem;
}

.quote-list {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg);
}

.quote-list.empty-state {
  padding: 2rem;
  text-align: center;
  color: var(--muted);
}

.quote-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.quote-table th,
.quote-table td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.quote-table th {
  background: #f0f4f8;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.quote-table tr:last-child td { border-bottom: none; }

.quote-table tr:hover td { background: rgba(255,255,255,0.7); }

.quote-meta {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.15rem;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.row-actions button {
  font-size: 0.78rem;
  padding: 0.35rem 0.55rem;
}

.status-pill {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: #e8f2ff;
  color: #1d4f91;
}

/* Footer */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,0.82);
  padding: 2.5rem 0 3rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem 2.5rem;
  font-size: 0.88rem;
}

.footer-founder {
  grid-column: 1 / -1;
  padding-top: 1.75rem;
  border-top: 1px solid rgba(255,255,255,0.15);
}

.footer-brand strong,
.footer-founder strong {
  color: #fff;
  display: block;
  margin-bottom: 0.35rem;
  font-family: var(--serif);
  font-size: 1.05rem;
}

.footer-founder strong {
  font-size: 1.15rem;
}

.footer-address {
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

.founder-label {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.founder-contact a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
}

.founder-contact a:hover {
  color: var(--gold-soft);
}

.founder-note {
  margin-top: 0.5rem;
  font-size: 0.82rem;
  max-width: 36rem;
  color: rgba(255,255,255,0.72);
}

.footer-grid a {
  color: rgba(255,255,255,0.82);
  text-decoration: none;
}

.footer-grid a:hover {
  color: var(--gold-soft);
}

/* About page */
.about-hero {
  padding-top: 3rem;
  text-align: center;
}

.about-hero h1 {
  font-family: var(--serif);
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  max-width: 20ch;
  margin: 0 auto 1rem;
  line-height: 1.25;
}

.about-hero h1 em {
  color: var(--navy-light);
  font-style: italic;
}

.about-lead {
  max-width: 42rem;
  margin: 0 auto;
  color: var(--muted);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.about-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
}

.about-card-wide {
  grid-column: 1 / -1;
}

.about-card h2 {
  font-family: var(--serif);
  font-size: 1.2rem;
  color: var(--navy);
  margin-bottom: 0.75rem;
}

.about-card p + p {
  margin-top: 0.85rem;
  color: var(--muted);
}

.founder-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
}

.founder-panel-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 1.75rem;
  align-items: start;
}

.founder-photo {
  margin: 0;
}

.founder-photo img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius);
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center top;
  border: 1px solid var(--border);
  box-shadow: 0 12px 32px rgba(12, 35, 64, 0.12);
}

.founder-panel h2 {
  font-family: var(--serif);
  font-size: 1.6rem;
  margin-bottom: 0.75rem;
  color: var(--navy);
}

.founder-panel-copy p + p {
  margin-top: 0.85rem;
  color: var(--muted);
}

.founder-panel-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.about-cta {
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
}

.about-cta h2 {
  font-family: var(--serif);
  margin-bottom: 0.5rem;
}

.about-cta p {
  color: var(--muted);
  margin-bottom: 1.25rem;
}

.about-cta .hero-actions {
  justify-content: center;
}

@media (max-width: 900px) {
  .footer-grid,
  .about-grid,
  .founder-panel-layout {
    grid-template-columns: 1fr;
  }

  .founder-photo {
    max-width: 220px;
    margin: 0 auto;
  }
  .hero-grid, .quote-layout, .why-grid, .service-grid, .output-grid, .field-grid.four, .followup-head {
    grid-template-columns: 1fr;
  }
  .field-grid { grid-template-columns: 1fr; }
  .nav .hide-mobile { display: none; }
}