/* ==========================================================================
   NMRS Medical Practice — Design System
   A restrained "chambers" aesthetic: ledger navy, warm paper, muted brass.
   Built for a solicitor-facing medico-legal practice — precise, unhurried,
   never sales-y. Every flourish is a hairline rule, not a gradient.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,400;0,9..144,500;0,9..144,600;1,9..144,400;1,9..144,500&family=Libre+Franklin:wght@300;400;500;600;700&display=swap');

:root{
  /* palette */
  --ink:        #101d2e;   /* primary deep navy */
  --ink-2:      #16283f;   /* panel navy, slightly lifted */
  --ink-3:      #1e3450;   /* hover navy */
  --paper:      #f6f2e8;   /* warm ivory ground */
  --paper-2:    #eee7d6;   /* deeper paper for cards */
  --paper-3:    #e6dcc4;   /* card border tone */
  --brass:      #a5793a;   /* muted brass accent */
  --brass-deep: #8a6329;
  --teal:       #2c534f;   /* deep muted teal, secondary accent */
  --teal-deep:  #1e3c39;
  --ink-soft:   #3a4553;   /* body text on paper */
  --ink-mute:   #6b7382;   /* secondary text on paper */
  --white:      #fbf9f3;
  --rule:       rgba(16,29,46,0.14);
  --rule-dark:  rgba(251,249,243,0.18);
  --shadow:     0 1px 2px rgba(16,29,46,0.06), 0 8px 24px rgba(16,29,46,0.05);

  /* type */
  --display: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --body:    'Libre Franklin', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --container: 1120px;
}

/* ---------- reset ---------- */
*, *::before, *::after{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{
  margin:0;
  background:var(--paper);
  color:var(--ink-soft);
  font-family:var(--body);
  font-size:16.5px;
  line-height:1.65;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}
img{ max-width:100%; display:block; }
a{ color:inherit; text-decoration:none; }
ul{ margin:0; padding:0; list-style:none; }
h1,h2,h3,h4,h5{ font-family:var(--display); font-weight:500; line-height:1.15; margin:0 0 .5em; color:var(--ink); }
p{ margin:0 0 1em; }
.container{ max-width:var(--container); margin:0 auto; padding:0 28px; }
main{ display:block; }

.sr-only{
  position:absolute; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0;
}
.skip-link{
  position:absolute; left:-999px; top:0; background:var(--ink); color:var(--white);
  padding:10px 18px; z-index:200; font-size:.85rem;
}
.skip-link:focus{ left:16px; top:16px; }

/* ---------- eyebrow / section labels ---------- */
.eyebrow{
  display:inline-flex; align-items:center; gap:8px;
  font-family:var(--body); font-weight:600; font-size:.72rem;
  letter-spacing:.16em; text-transform:uppercase; color:var(--brass-deep);
  margin-bottom:14px;
}
.eyebrow::before{ content:''; width:22px; height:1px; background:var(--brass-deep); display:inline-block; }
.on-dark .eyebrow{ color:#d8b877; }
.on-dark .eyebrow::before{ background:#d8b877; }

/* ---------- buttons ---------- */
.btn{
  display:inline-flex; align-items:center; gap:10px;
  font-family:var(--body); font-weight:600; font-size:.82rem;
  letter-spacing:.05em; text-transform:uppercase;
  padding:14px 26px; border:1px solid transparent; cursor:pointer;
  transition:background .2s ease, color .2s ease, border-color .2s ease, transform .15s ease;
  white-space:nowrap;
}
.btn:active{ transform:translateY(1px); }
.btn-primary{ background:var(--ink); color:var(--white); border-color:var(--ink); }
.btn-primary:hover{ background:var(--ink-3); border-color:var(--ink-3); }
.btn-brass{ background:var(--brass); color:var(--white); border-color:var(--brass); }
.btn-brass:hover{ background:var(--brass-deep); border-color:var(--brass-deep); }
.btn-outline{ background:transparent; color:var(--ink); border-color:var(--ink); }
.btn-outline:hover{ background:var(--ink); color:var(--white); }
.btn-outline-light{ background:transparent; color:var(--white); border-color:rgba(251,249,243,.5); }
.btn-outline-light:hover{ background:var(--white); color:var(--ink); border-color:var(--white); }
.btn-row{ display:flex; flex-wrap:wrap; gap:14px; }

/* ==========================================================================
   HEADER / NAV
   ========================================================================== */
.site-header{
  position:sticky; top:0; z-index:100;
  background:var(--paper); border-bottom:1px solid var(--rule);
}
.header-bar{
  max-width:var(--container); margin:0 auto; padding:16px 28px;
  display:flex; align-items:center; justify-content:space-between; gap:24px;
}
.crest{ display:flex; align-items:center; gap:12px; flex-shrink:0; }
.crest-mark{ width:40px; height:40px; object-fit:contain; flex-shrink:0; }
.crest-mark-chip{
  display:inline-flex; align-items:center; justify-content:center;
  width:40px; height:40px; padding:4px; border-radius:50%;
  background:var(--white); flex-shrink:0;
}
.crest-mark-chip .crest-mark{ width:30px; height:30px; }
.crest-text{ display:flex; flex-direction:column; line-height:1.1; }
.crest-word{ font-family:var(--display); font-weight:600; font-size:1.28rem; color:var(--ink); letter-spacing:.02em; }
.crest-sub{ font-size:.62rem; letter-spacing:.14em; text-transform:uppercase; color:var(--ink-mute); margin-top:3px; }

.primary-nav{ display:flex; align-items:center; }
.nav-list{ display:flex; align-items:center; gap:2px; }
.nav-list > li > a{
  display:block; padding:10px 14px; font-size:.86rem; font-weight:500;
  color:var(--ink-soft); position:relative;
}
.nav-list > li > a:not(.nav-cta)::after{
  content:''; position:absolute; left:14px; right:14px; bottom:6px; height:1px;
  background:var(--brass); transform:scaleX(0); transform-origin:left;
  transition:transform .25s ease;
}
.nav-list > li > a:not(.nav-cta):hover::after,
.nav-list > li > a.active::after{ transform:scaleX(1); }
.nav-cta{
  margin-left:8px; background:var(--ink); color:var(--white) !important;
  padding:10px 20px !important; font-size:.8rem; font-weight:600;
  letter-spacing:.04em; text-transform:uppercase;
  transition:background .2s ease;
}
.nav-cta:hover{ background:var(--brass); }

.has-dropdown{ position:relative; }
.dropdown{
  position:absolute; top:100%; left:0; min-width:220px;
  background:var(--white); border:1px solid var(--rule); box-shadow:var(--shadow);
  padding:6px; opacity:0; visibility:hidden; transform:translateY(4px);
  transition:opacity .18s ease, transform .18s ease, visibility .18s ease;
}
.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown{ opacity:1; visibility:visible; transform:translateY(0); }
.dropdown a{ display:block; padding:10px 14px; font-size:.85rem; color:var(--ink-soft); }
.dropdown a:hover{ background:var(--paper-2); color:var(--ink); }

.nav-toggle{
  display:none; flex-direction:column; justify-content:center; gap:5px;
  width:38px; height:38px; background:none; border:1px solid var(--rule); cursor:pointer;
}
.nav-toggle span{ width:16px; height:1px; background:var(--ink); margin:0 auto; transition:transform .2s ease, opacity .2s ease; }

@media (max-width: 960px){
  .nav-toggle{ display:flex; }
  .primary-nav{ position:absolute; top:100%; left:0; right:0; background:var(--paper); border-bottom:1px solid var(--rule); }
  .nav-list{
    flex-direction:column; align-items:stretch; max-height:0; overflow:hidden;
    transition:max-height .3s ease;
  }
  .nav-list.open{ max-height:600px; }
  .nav-list > li > a{ padding:16px 28px; border-bottom:1px solid var(--rule); }
  .nav-cta{ margin:12px 28px; text-align:center; }
  .has-dropdown .dropdown{
    position:static; opacity:1; visibility:visible; transform:none; box-shadow:none;
    border:none; border-top:1px dashed var(--rule); display:none; background:var(--paper-2);
  }
  .has-dropdown.open .dropdown{ display:block; }
}

/* ==========================================================================
   HERO
   ========================================================================== */
.hero{
  background:var(--ink); color:var(--white); position:relative; overflow:hidden;
}
.hero::before{
  content:''; position:absolute; inset:0;
  background-image:
    linear-gradient(rgba(251,249,243,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(251,249,243,.05) 1px, transparent 1px);
  background-size:64px 64px;
  mask-image:radial-gradient(ellipse 70% 60% at 30% 20%, black, transparent);
}
.hero-inner{
  position:relative; max-width:var(--container); margin:0 auto; padding:96px 28px 90px;
  display:grid; grid-template-columns:1.15fr .85fr; gap:56px; align-items:center;
}
.hero h1{ color:var(--white); font-size:clamp(2.2rem, 4vw, 3.2rem); font-weight:500; }
.hero h1 em{ font-style:italic; color:#d8b877; font-weight:400; }
.hero .lead{ font-size:1.08rem; color:rgba(251,249,243,.82); max-width:46ch; margin-bottom:32px; }
.hero-badges{ display:flex; flex-wrap:wrap; gap:10px 28px; margin-top:40px; }
.hero-badge{ display:flex; align-items:center; gap:9px; font-size:.8rem; color:rgba(251,249,243,.75); }
.hero-badge .tick{ color:#d8b877; font-size:.9rem; }
.hero-panel{
  border:1px solid var(--rule-dark); padding:34px 30px; background:rgba(251,249,243,.03);
  position:relative;
}
.hero-panel::before, .hero-panel::after{
  content:''; position:absolute; width:16px; height:16px; border:1px solid #d8b877;
}
.hero-panel::before{ top:-1px; left:-1px; border-right:none; border-bottom:none; }
.hero-panel::after{ bottom:-1px; right:-1px; border-left:none; border-top:none; }
.hero-panel h3{ color:var(--white); font-size:1.05rem; margin-bottom:14px; }
.hero-panel p{ color:rgba(251,249,243,.72); font-size:.9rem; }
.hero-panel .stat-line{ display:flex; justify-content:space-between; padding:11px 0; border-top:1px solid var(--rule-dark); font-size:.86rem; }
.hero-panel .stat-line:first-of-type{ border-top:none; }
.hero-panel .stat-line b{ color:var(--white); font-weight:500; font-family:var(--display); }

@media (max-width: 860px){
  .hero-inner{ grid-template-columns:1fr; padding:64px 24px 56px; }
}

/* ==========================================================================
   SECTIONS / GRID / CARDS
   ========================================================================== */
.section{ padding:88px 0; }
.section-tight{ padding:56px 0; }
.bg-paper2{ background:var(--paper-2); }
.bg-ink{ background:var(--ink); color:var(--white); }
.bg-white{ background:var(--white); }
.section-head{ max-width:640px; margin-bottom:48px; }
.section-head.center{ margin-left:auto; margin-right:auto; text-align:center; }
.section-head h2{ font-size:clamp(1.6rem, 2.6vw, 2.15rem); }
.section-head p{ color:var(--ink-mute); font-size:1.02rem; }
.on-dark h2, .on-dark h3, .on-dark h4{ color:var(--white); }
.on-dark p{ color:rgba(251,249,243,.78); }

.grid{ display:grid; gap:28px; }
.grid-2{ grid-template-columns:1fr 1fr; }
.grid-3{ grid-template-columns:repeat(3,1fr); }
.grid-4{ grid-template-columns:repeat(4,1fr); }
@media (max-width: 860px){ .grid-2,.grid-3,.grid-4{ grid-template-columns:1fr; } }
@media (min-width:861px) and (max-width:1080px){ .grid-4{ grid-template-columns:repeat(2,1fr); } }

.clinician-sidebar{ position:sticky; top:100px; }
@media (max-width:860px){ .clinician-sidebar{ position:static; top:auto; } }

.card{
  background:var(--white); border:1px solid var(--rule); padding:30px 28px;
  transition:border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.card:hover{ border-color:var(--brass); box-shadow:var(--shadow); transform:translateY(-2px); }
.card .num{ font-family:var(--display); font-style:italic; color:var(--brass); font-size:1rem; margin-bottom:10px; display:block; }
.card h3{ font-size:1.08rem; margin-bottom:10px; }
.card p{ color:var(--ink-mute); font-size:.92rem; margin-bottom:0; }
.card-link{ display:inline-block; margin-top:14px; font-size:.8rem; font-weight:600; letter-spacing:.04em; text-transform:uppercase; color:var(--teal); }
.card-link::after{ content:'→'; margin-left:6px; transition:margin-left .2s ease; }
.card:hover .card-link::after{ margin-left:10px; }

.service-fee{
  margin-top:14px; padding-top:14px; border-top:1px dashed var(--rule);
  font-size:.82rem; color:var(--ink-mute); font-weight:600; letter-spacing:.02em;
}

/* ---------- clinician cards ---------- */
.clinician-card{
  display:grid; grid-template-columns:120px 1fr; gap:22px; align-items:start;
  background:var(--white); border:1px solid var(--rule); padding:28px; transition:border-color .2s ease;
}
.clinician-card:hover{ border-color:var(--brass); }
.clinician-avatar{
  width:120px; height:120px; background:var(--ink); color:var(--white);
  display:flex; align-items:center; justify-content:center; font-family:var(--display);
  font-size:2.1rem; font-weight:500; border:1px solid var(--brass); overflow:hidden;
}
.clinician-avatar.photo{ padding:0; }
.clinician-avatar img{ width:100%; height:100%; object-fit:cover; display:block; }
.clinician-card h3{ margin-bottom:2px; }
.clinician-role{ color:var(--teal); font-size:.85rem; font-weight:600; margin-bottom:10px; }
.clinician-tags{ display:flex; flex-wrap:wrap; gap:6px; margin-top:12px; }
.tag{ font-size:.72rem; letter-spacing:.03em; padding:4px 10px; border:1px solid var(--rule); color:var(--ink-mute); }
@media (max-width:560px){ .clinician-card{ grid-template-columns:1fr; } .clinician-avatar{ width:64px; height:64px; font-size:1.3rem; } }

/* ---------- info / disclaimer boxes ---------- */
.info-box{ border-left:2px solid var(--brass); padding:6px 0 6px 20px; margin-bottom:16px; }
.info-box h4{ font-size:.95rem; margin-bottom:6px; }
.info-box p{ font-size:.88rem; color:var(--ink-mute); margin-bottom:0; }

.notice{
  background:var(--paper-2); border:1px solid var(--paper-3); padding:22px 26px;
  font-size:.92rem; color:var(--ink-soft);
}
.notice strong{ color:var(--ink); }
.notice-warn{ border-left:3px solid var(--brass-deep); }

.pullquote{
  font-family:var(--display); font-style:italic; font-size:1.3rem; color:var(--ink);
  border-left:2px solid var(--brass); padding-left:24px; margin:0;
}
.pullquote cite{ display:block; font-style:normal; font-family:var(--body); font-size:.78rem;
  letter-spacing:.06em; text-transform:uppercase; color:var(--ink-mute); margin-top:14px; }

/* ---------- checklists ---------- */
.check-list{ display:flex; flex-direction:column; gap:12px; }
.check-list li{ display:flex; gap:12px; align-items:flex-start; font-size:.94rem; }
.check-list li::before{ content:'—'; color:var(--brass); flex-shrink:0; font-weight:600; }

.cross-list li{ display:flex; gap:12px; align-items:flex-start; font-size:.94rem; color:var(--ink-mute); }
.cross-list li::before{ content:'×'; color:#a35a4a; flex-shrink:0; font-weight:700; }

/* ---------- fee table ---------- */
.fee-table{ width:100%; border-collapse:collapse; background:var(--white); border:1px solid var(--rule); }
.fee-table th{
  text-align:left; font-family:var(--body); font-size:.72rem; letter-spacing:.1em; text-transform:uppercase;
  color:var(--ink-mute); font-weight:600; padding:16px 22px; border-bottom:1px solid var(--rule);
}
.fee-table td{ padding:18px 22px; border-bottom:1px solid var(--rule); font-size:.95rem; }
.fee-table tr:last-child td{ border-bottom:none; }
.fee-table td.fee-amount{ font-family:var(--display); font-size:1.05rem; color:var(--ink); text-align:right; white-space:nowrap; }
.table-scroll{ overflow-x:auto; }

/* ---------- process steps ---------- */
.steps{ counter-reset:step; display:grid; grid-template-columns:repeat(4,1fr); gap:1px; background:var(--rule); border:1px solid var(--rule); }
.step{ background:var(--white); padding:32px 26px; }
.step::before{
  counter-increment:step; content:counter(step,decimal-leading-zero);
  font-family:var(--display); font-style:italic; font-size:1.6rem; color:var(--brass); display:block; margin-bottom:12px;
}
.step h4{ font-size:.95rem; margin-bottom:8px; }
.step p{ font-size:.85rem; color:var(--ink-mute); margin-bottom:0; }
@media (max-width:860px){ .steps{ grid-template-columns:1fr 1fr; } }
@media (max-width:560px){ .steps{ grid-template-columns:1fr; } }

/* ---------- stat strip ---------- */
.stat-strip{ display:grid; grid-template-columns:repeat(4,1fr); border-top:1px solid var(--rule-dark); border-bottom:1px solid var(--rule-dark); }
.stat-strip .stat{ padding:26px 22px; border-left:1px solid var(--rule-dark); }
.stat-strip .stat:first-child{ border-left:none; }
.stat b{ display:block; font-family:var(--display); font-size:1.5rem; color:var(--white); font-weight:500; }
.stat span{ font-size:.78rem; color:rgba(251,249,243,.68); }
@media (max-width:760px){ .stat-strip{ grid-template-columns:1fr 1fr; } .stat-strip .stat:nth-child(2n+1){ border-left:none; } .stat-strip .stat:nth-child(n+3){ border-top:1px solid var(--rule-dark); } }

/* ---------- breadcrumb / page header ---------- */
.page-header{ background:var(--ink); color:var(--white); padding:64px 0 48px; }
.page-header .eyebrow{ color:#d8b877; }
.page-header .eyebrow::before{ background:#d8b877; }
.page-header h1{ color:var(--white); font-size:clamp(1.9rem,3.4vw,2.6rem); max-width:26ch; }
.page-header p{ color:rgba(251,249,243,.78); max-width:56ch; font-size:1rem; margin-top:14px; }

/* ---------- forms ---------- */
.form-grid{ display:grid; grid-template-columns:1fr 1fr; gap:20px; }
.field{ display:flex; flex-direction:column; gap:8px; }
.field.full{ grid-column:1/-1; }
.field label{ font-size:.78rem; font-weight:600; letter-spacing:.04em; text-transform:uppercase; color:var(--ink-mute); }
.field input, .field select, .field textarea{
  font-family:var(--body); font-size:.95rem; padding:13px 14px; border:1px solid var(--rule);
  background:var(--white); color:var(--ink-soft);
}
.field textarea{ resize:vertical; min-height:120px; }
.field input:focus, .field select:focus, .field textarea:focus{ outline:none; border-color:var(--brass); }
@media (max-width:640px){ .form-grid{ grid-template-columns:1fr; } }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer{ background:var(--ink); color:rgba(251,249,243,.75); }
.footer-top{ padding-top:72px; padding-bottom:40px; }
.footer-grid{ display:grid; grid-template-columns:1.6fr 1fr 1fr 1fr; gap:40px; }
.footer-brand-row{ display:flex; align-items:center; gap:10px; margin-bottom:16px; }
.footer-brand-row .crest-word{ color:var(--white); font-size:1.1rem; }
.footer-brand-row .crest-sub{ color:rgba(251,249,243,.55); }
.footer-tagline{ font-size:.88rem; color:rgba(251,249,243,.6); max-width:32ch; margin-bottom:16px; }
.footer-addr{ font-size:.85rem; color:rgba(251,249,243,.7); line-height:1.7; }
.footer-addr a{ color:#d8b877; }
.footer-col h4{ color:var(--white); font-size:.72rem; letter-spacing:.1em; text-transform:uppercase; font-weight:600; margin-bottom:16px; }
.footer-col a{ display:block; font-size:.87rem; color:rgba(251,249,243,.68); padding:6px 0; transition:color .15s ease; }
.footer-col a:hover{ color:#d8b877; }
.footer-disclaimer{
  border-top:1px solid var(--rule-dark); padding-top:26px; padding-bottom:26px; font-size:.78rem;
  color:rgba(251,249,243,.55); line-height:1.7;
}
.footer-bottom{
  border-top:1px solid var(--rule-dark); padding-top:20px; padding-bottom:20px; display:flex; justify-content:space-between;
  flex-wrap:wrap; gap:10px; font-size:.76rem; color:rgba(251,249,243,.45);
}
.footer-bottom a{ color:rgba(251,249,243,.45); }
.footer-bottom a:hover{ color:#d8b877; }
@media (max-width:900px){ .footer-grid{ grid-template-columns:1fr 1fr; } }
@media (max-width:560px){ .footer-grid{ grid-template-columns:1fr; } }

/* ==========================================================================
   SCROLL REVEAL
   ========================================================================== */
.reveal{ opacity:0; transform:translateY(18px); transition:opacity .7s ease, transform .7s ease; }
.reveal.in{ opacity:1; transform:translateY(0); }
.hero h1, .hero .lead, .hero .btn-row, .hero-badges{
  opacity:0; animation:rise .7s ease forwards;
}
.hero h1{ animation-delay:.05s; }
.hero .lead{ animation-delay:.18s; }
.hero .btn-row{ animation-delay:.3s; }
.hero-badges{ animation-delay:.42s; }
@keyframes rise{ from{ opacity:0; transform:translateY(14px);} to{ opacity:1; transform:translateY(0);} }

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior:auto; }
  .reveal{ opacity:1; transform:none; transition:none; }
  .hero h1,.hero .lead,.hero .btn-row,.hero-badges{ opacity:1; animation:none; }
}
