/* ==========================================================================
   Physicians Finance Corp — site stylesheet
   Palette: navy (from deck theme) + teal (from logo)
   ========================================================================== */

:root {
  --navy-950: #0a1f30;
  --navy-900: #0e2841;
  --navy-800: #123350;
  --navy-700: #1a4266;
  --teal-700: #1f5f6b;
  --teal-600: #2f7c8c;
  --teal-500: #3e93a3;
  --teal-100: #e4f2f4;
  --ink: #1c2733;
  --ink-soft: #4a5a6a;
  --paper: #ffffff;
  --paper-soft: #f5f8fa;
  --line: #e2e8ee;
  --gold: #c9a34e;
  --radius: 14px;
  --shadow-sm: 0 1px 2px rgba(14, 40, 65, 0.06), 0 1px 1px rgba(14, 40, 65, 0.04);
  --shadow-md: 0 8px 24px rgba(14, 40, 65, 0.10);
  --shadow-lg: 0 20px 48px rgba(14, 40, 65, 0.16);
  --maxw: 1160px;
}

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

body {
  margin: 0;
  font-family: "Source Sans 3", "Segoe UI", Roboto, -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  color: var(--navy-900);
  line-height: 1.15;
  margin: 0 0 0.5em;
  font-weight: 600;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.1rem, 4.2vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 2.6vw, 2.3rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; color: var(--ink-soft); }
a { color: var(--teal-700); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

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

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal-600);
  margin-bottom: 12px;
}

.lede {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 62ch;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--teal-600); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--teal-700); box-shadow: var(--shadow-md); }
.btn-ghost { background: transparent; color: var(--navy-900); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--teal-600); color: var(--teal-700); }
.btn-on-dark { background: rgba(255,255,255,0.08); color: #fff; border-color: rgba(255,255,255,0.35); }
.btn-on-dark:hover { background: rgba(255,255,255,0.16); border-color: #fff; }
.btn-gold { background: var(--gold); color: var(--navy-950); }
.btn-gold:hover { background: #d9b768; }
.btn-lg { padding: 15px 32px; font-size: 1.02rem; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background: rgba(14, 40, 65, 0.97);
  backdrop-filter: saturate(140%) blur(6px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  max-width: var(--maxw);
  margin: 0 auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-family: "Fraunces", serif;
  font-weight: 600;
  font-size: 1.08rem;
}
.brand .mark {
  width: 40px; height: 40px;
  background: #fff;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  padding: 5px;
  box-shadow: var(--shadow-sm);
}
.brand .mark img { width: 100%; height: 100%; object-fit: contain; }
.brand small { display: block; font-family: "Source Sans 3", sans-serif; font-weight: 500; font-size: 0.62rem; letter-spacing: 0.14em; color: var(--teal-500); text-transform: uppercase; }
.brand:hover { text-decoration: none; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-links a {
  color: rgba(255,255,255,0.82);
  font-weight: 600;
  font-size: 0.94rem;
  padding: 9px 14px;
  border-radius: 8px;
}
.nav-links a:hover { color: #fff; background: rgba(255,255,255,0.08); text-decoration: none; }
.nav-links a.is-active { color: #fff; background: rgba(255,255,255,0.12); }
.nav-cta { margin-left: 8px; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 8px;
  width: 42px; height: 38px;
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
}

@media (max-width: 880px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--navy-900);
    flex-direction: column;
    align-items: stretch;
    padding: 10px 20px 18px;
    display: none;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 8px; }
  .nav-cta { margin-left: 0; margin-top: 8px; }
}

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(62,147,163,0.35), transparent 60%),
    linear-gradient(180deg, var(--navy-950) 0%, var(--navy-900) 60%, var(--navy-800) 100%);
  color: #fff;
  padding: 92px 0 96px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto -10% -40% auto;
  width: 560px; height: 560px;
  background: radial-gradient(circle, rgba(255,255,255,0.06), transparent 70%);
  border-radius: 50%;
}
.hero .container { position: relative; z-index: 1; }
.hero h1 { color: #fff; max-width: 15ch; }
.hero .lede { color: rgba(255,255,255,0.82); font-size: 1.2rem; }
.hero .eyebrow { color: var(--teal-500); }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }
.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,0.14);
}
.hero-stats .stat b { display: block; font-family: "Fraunces", serif; font-size: 1.8rem; color: #fff; }
.hero-stats .stat span { font-size: 0.86rem; color: rgba(255,255,255,0.65); }

.page-hero {
  background: linear-gradient(180deg, var(--navy-950), var(--navy-800));
  color: #fff;
  padding: 68px 0 64px;
}
.page-hero h1 { color: #fff; }
.page-hero .lede { color: rgba(255,255,255,0.82); }

/* ---------- Sections ---------- */
section { padding: 84px 0; }
section.tight { padding: 56px 0; }
.section-head { max-width: 68ch; margin-bottom: 44px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.bg-soft { background: var(--paper-soft); }
.bg-navy { background: var(--navy-900); color: #fff; }
.bg-navy h2, .bg-navy h3 { color: #fff; }
.bg-navy p { color: rgba(255,255,255,0.78); }

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

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card .icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  background: var(--teal-100);
  color: var(--teal-700);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.card .icon svg { width: 24px; height: 24px; }
.card h3 { margin-bottom: 8px; }
.card p { margin-bottom: 0; font-size: 0.96rem; }

.list-check { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.list-check li { display: flex; gap: 12px; align-items: flex-start; color: var(--ink-soft); }
.list-check li svg { flex: none; width: 20px; height: 20px; color: var(--teal-600); margin-top: 2px; }

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
@media (max-width: 820px) { .two-col { grid-template-columns: 1fr; } }

.pillbox {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 28px;
}
.pillbox h4 {
  font-family: "Source Sans 3", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  color: var(--teal-700);
  margin-bottom: 14px;
}

/* Steps */
.steps { display: grid; gap: 0; counter-reset: step; }
.step {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 20px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.step:last-child { border-bottom: none; }
.step .num {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--navy-900);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: "Fraunces", serif;
  font-weight: 600;
}

/* Quote / philosophy banner */
.banner {
  background: linear-gradient(135deg, var(--navy-900), var(--teal-700));
  color: #fff;
  border-radius: 20px;
  padding: 48px;
  text-align: center;
}
.banner p.quote {
  font-family: "Fraunces", serif;
  font-size: clamp(1.3rem, 2.4vw, 1.7rem);
  color: #fff;
  max-width: 46ch;
  margin: 0 auto;
  font-weight: 500;
}

/* Team */
.person {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.avatar {
  width: 58px; height: 58px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal-600), var(--navy-800));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: "Fraunces", serif;
  font-weight: 600;
  font-size: 1.05rem;
  flex: none;
}
.person h4 { margin: 0 0 2px; color: var(--navy-900); font-family: "Fraunces", serif; font-size: 1.05rem; }
.person .role { color: var(--teal-700); font-weight: 600; font-size: 0.86rem; margin-bottom: 6px; display: block; }
.person p { font-size: 0.92rem; margin-bottom: 0; }

/* Tables */
.compare {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.compare th, .compare td {
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.compare th { color: var(--navy-900); font-family: "Fraunces", serif; font-weight: 600; }

/* Callout / disclaimer */
.callout {
  border: 1px solid var(--line);
  background: var(--paper-soft);
  border-left: 4px solid var(--teal-600);
  border-radius: 10px;
  padding: 18px 22px;
  font-size: 0.9rem;
  color: var(--ink-soft);
}
.callout.warn { border-left-color: var(--gold); }

/* CTA band */
.cta-band {
  background: var(--navy-900);
  color: #fff;
  border-radius: 22px;
  padding: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
}
.cta-band h2 { color: #fff; margin-bottom: 6px; }
.cta-band p { color: rgba(255,255,255,0.78); margin-bottom: 0; }

/* Forms */
.form-grid { display: grid; gap: 18px; }
.form-row { display: grid; gap: 18px; grid-template-columns: 1fr 1fr; }
@media (max-width: 620px) { .form-row { grid-template-columns: 1fr; } }
label { display: block; font-weight: 600; font-size: 0.88rem; color: var(--navy-900); margin-bottom: 6px; }
input, select, textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 0.98rem;
  font-family: inherit;
  color: var(--ink);
  background: #fff;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--teal-600);
  box-shadow: 0 0 0 3px rgba(62,147,163,0.18);
}
textarea { resize: vertical; min-height: 130px; }
.form-note { font-size: 0.84rem; color: var(--ink-soft); }
#formStatus { font-size: 0.92rem; margin-top: 10px; }

/* Footer */
.site-footer {
  background: var(--navy-950);
  color: rgba(255,255,255,0.7);
  padding: 56px 0 28px;
  font-size: 0.92rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 500px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid h5 { color: #fff; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 14px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.footer-grid a { color: rgba(255,255,255,0.68); }
.footer-grid a:hover { color: #fff; }
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.footer-brand .mark { width: 34px; height: 34px; background: #fff; border-radius: 8px; padding: 4px; }
.footer-brand span { color: #fff; font-family: "Fraunces", serif; font-weight: 600; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 22px;
  font-size: 0.82rem;
}

/* ---------- Chat widget ---------- */
#pfc-chat-launcher {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 900;
  width: 60px; height: 60px;
  border-radius: 50%;
  background: var(--teal-600);
  color: #fff;
  border: none;
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.15s ease, background 0.15s ease;
}
#pfc-chat-launcher:hover { transform: scale(1.06); background: var(--teal-700); }
#pfc-chat-launcher svg { width: 26px; height: 26px; }

#pfc-chat-panel {
  position: fixed;
  right: 22px;
  bottom: 96px;
  z-index: 900;
  width: 360px;
  max-width: calc(100vw - 32px);
  height: 500px;
  max-height: calc(100vh - 140px);
  background: #fff;
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  display: none;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
}
#pfc-chat-panel.open { display: flex; }

.chat-head {
  background: var(--navy-900);
  color: #fff;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.chat-head .dot { width: 9px; height: 9px; border-radius: 50%; background: #59d19a; box-shadow: 0 0 0 3px rgba(89,209,154,0.25); }
.chat-head strong { display: block; font-size: 0.95rem; }
.chat-head span { display: block; font-size: 0.74rem; color: rgba(255,255,255,0.65); }
.chat-head button { margin-left: auto; background: none; border: none; color: rgba(255,255,255,0.7); cursor: pointer; font-size: 1.1rem; line-height: 1; padding: 4px; }
.chat-head button:hover { color: #fff; }

.chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--paper-soft);
}
.msg { max-width: 86%; padding: 10px 14px; border-radius: 14px; font-size: 0.9rem; line-height: 1.45; }
.msg.bot { background: #fff; border: 1px solid var(--line); color: var(--ink); align-self: flex-start; border-bottom-left-radius: 4px; }
.msg.user { background: var(--teal-600); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.msg.typing { color: var(--ink-soft); font-style: italic; }
.chat-suggest { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 12px; background: var(--paper-soft); }
.chip {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.78rem;
  cursor: pointer;
  color: var(--navy-900);
}
.chip:hover { border-color: var(--teal-600); color: var(--teal-700); }

.chat-input {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--line);
  background: #fff;
}
.chat-input input {
  flex: 1;
  border-radius: 999px;
  padding: 10px 16px;
}
.chat-input button {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--navy-900);
  color: #fff;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex: none;
}
.chat-input button:hover { background: var(--navy-800); }
.chat-input button:disabled { opacity: 0.5; cursor: default; }
.chat-foot { font-size: 0.68rem; color: var(--ink-soft); text-align: center; padding: 8px 12px 12px; }

@media (max-width: 480px) {
  #pfc-chat-panel { right: 16px; left: 16px; width: auto; bottom: 88px; }
  #pfc-chat-launcher { right: 16px; }
}
