/* Ryan Mallory, MD — palette drawn from the Mallory Cardiac Advisors banner */
:root {
  --ink: #12213b;          /* MCA navy: headings, primary buttons */
  --ink-deep: #0b1628;     /* closing panel */
  --canvas: #eceff3;       /* page background, cool porcelain */
  --panel: #ffffff;
  --ivory: #f2ede4;        /* advisory panel, echoes the banner paper */
  --brass: #a8865a;        /* MCA swoosh: rules, marks, tags */
  --brass-text: #7d5f37;   /* brass dark enough for small text */
  --steel: #4b5a6e;        /* secondary text */
  --line: #d8dde4;
  --alert: #9b2c24;
  --alert-bg: #fbf1ef;

  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --gutter: clamp(16px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { margin: 0; font-family: var(--serif); font-weight: 500; line-height: 1.1; text-wrap: balance; }
p { margin: 0; }

a { color: inherit; }
:focus-visible { outline: 3px solid var(--brass); outline-offset: 3px; border-radius: 6px; }

.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: 16px; top: -60px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; text-decoration: none;
}
.skip-link:focus { top: 16px; }

.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 var(--gutter); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 26px; border-radius: 999px;
  font-family: var(--sans); font-weight: 600; font-size: 1rem; text-decoration: none;
  transition: background-color .2s ease, color .2s ease;
}
.btn-sm { min-height: 42px; padding: 0 20px; font-size: .9375rem; }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: #22375c; }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: var(--ivory); }

.text-link {
  display: inline-flex; align-items: center; min-height: 48px;
  font-weight: 600; text-decoration: underline; text-decoration-color: var(--brass);
  text-underline-offset: 5px; text-decoration-thickness: 2px;
}
.text-link:hover { color: var(--brass-text); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(236, 239, 243, .92);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 76px; }

.wordmark { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.wordmark-mark {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--ink); color: #fff;
  font-family: var(--serif); font-size: 1rem; letter-spacing: .04em;
  box-shadow: inset 0 0 0 2px var(--ink), inset 0 0 0 3px var(--brass);
}
.wordmark-name { font-family: var(--serif); font-size: 1.25rem; font-weight: 500; }

.site-nav { display: flex; align-items: center; gap: 8px; }
.site-nav a:not(.btn) {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px;
  font-size: .9375rem; font-weight: 500; text-decoration: none; color: var(--steel);
}
.site-nav a:not(.btn):hover { color: var(--ink); }
.site-nav .btn { margin-left: 10px; }

.menu-toggle {
  display: none; width: 48px; height: 48px; border: 0; border-radius: 50%;
  background: var(--panel); color: var(--ink); cursor: pointer;
  align-items: center; justify-content: center;
}

/* Hero */
.hero {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 20px;
  padding-top: 12px;
}
.hero-photo { position: relative; margin: 0; border-radius: var(--radius-lg); overflow: hidden; min-height: 560px; background: #cfd6de; }
.hero-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 48% 20%; }

.chip {
  position: absolute; display: flex; align-items: center; gap: 12px;
  padding: 12px 18px 12px 12px; border-radius: var(--radius-md);
  background: rgba(255, 255, 255, .96); box-shadow: 0 10px 30px rgba(18, 33, 59, .14);
  max-width: calc(100% - 40px);
}
.chip strong { display: block; font-family: var(--serif); font-size: 1.375rem; font-weight: 600; line-height: 1.1; }
.chip small { display: block; font-size: .8125rem; color: var(--steel); line-height: 1.3; }
.chip-icon { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: #e3cfa9; }
.chip-top { top: 20px; left: 20px; }
.chip-bottom { right: 20px; bottom: 20px; }

.hero-panel {
  display: flex; flex-direction: column; justify-content: center;
  padding: clamp(28px, 5vw, 64px); border-radius: var(--radius-lg); background: var(--panel);
}
.hero-place { font-size: .9375rem; font-weight: 600; color: var(--brass-text); }
.hero h1 {
  margin-top: 14px;
  font-size: clamp(3rem, 7.4vw, 6.25rem); font-weight: 500; letter-spacing: -.02em; line-height: .98;
}
.hero h1::after {
  content: ""; display: block; width: 84px; height: 3px; margin-top: 28px; background: var(--brass);
}
.hero-lead { margin-top: 26px; max-width: 54ch; font-size: 1.1875rem; color: var(--steel); }

.doorways { list-style: none; margin: 34px 0 0; padding: 0; border-top: 1px solid var(--line); }
.doorways li { border-bottom: 1px solid var(--line); }
.doorways a {
  display: grid; grid-template-columns: 11rem 1fr auto; align-items: center; gap: 16px;
  min-height: 60px; padding: 10px 4px; text-decoration: none;
}
.doorways a::after {
  content: ""; width: 10px; height: 10px; margin-right: 6px;
  border-top: 2px solid currentColor; border-right: 2px solid currentColor;
  transform: rotate(45deg); color: var(--brass); transition: transform .2s ease;
}
.doorways a:hover::after { transform: translateX(4px) rotate(45deg); }
.doorway-who { font-family: var(--serif); font-size: 1.25rem; font-weight: 500; }
.doorway-what { color: var(--steel); font-size: .9875rem; }
.doorways a:hover .doorway-what { color: var(--ink); }

/* Statement */
.statement { padding-block: clamp(72px, 11vw, 140px); text-align: center; }
.statement p {
  max-width: 17ch; margin: 0 auto;
  font-family: var(--serif); font-size: clamp(2.25rem, 5.6vw, 4.5rem); line-height: 1.08; letter-spacing: -.015em;
  color: #8a96a6;
}
.statement-strong { color: var(--ink); }

/* Sections */
.section { padding-bottom: clamp(72px, 10vw, 120px); }
.section-tags {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 10px; margin-bottom: 20px; border-radius: var(--radius-md); background: var(--panel);
}
.tag { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 10px; font-size: .9375rem; font-weight: 600; }
.tag-ink { background: var(--ink); color: #fff; }
.tag-brass { background: #efe5d4; color: #5e4626; }

.section h2 { font-size: clamp(2rem, 3.8vw, 3.25rem); letter-spacing: -.01em; }

/* Advisory */
.advisory { border-radius: var(--radius-lg); background: var(--ivory); overflow: hidden; }
.advisory-banner { aspect-ratio: 3 / 1; overflow: hidden; }
.advisory-banner img { width: 100%; height: 100%; object-fit: cover; object-position: left center; }
.advisory-body {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px);
  padding: clamp(28px, 5vw, 64px); padding-top: clamp(20px, 3vw, 32px);
}
.advisory-intro p { margin-top: 20px; color: var(--steel); max-width: 52ch; }
.advisory-intro .btn { margin-top: 32px; }
.advisory-intro .credentials { margin-top: 28px; }
.advisory-intro .credentials li { padding-block: 8px; line-height: 1.4; border-color: #dcd3c4; }
.advisory-intro .credentials li::before { flex: none; }

.offer-list { list-style: none; margin: 0; padding: 0; }
.offer-list li { padding: 20px 0; border-top: 1px solid #dcd3c4; }
.offer-list li:last-child { border-bottom: 1px solid #dcd3c4; }
.offer-list h3 { font-size: 1.375rem; }
.offer-list p { margin-top: 6px; color: var(--steel); font-size: 1rem; }

/* Collaborations */
.collab { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 20px; }
.collab-photo { position: relative; margin: 0; border-radius: var(--radius-lg); overflow: hidden; min-height: 520px; background: #cfd6de; }
.collab-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 30% 40%; }
.collab-photo .chip-bottom { left: 20px; right: auto; }
.collab-body { padding: clamp(28px, 5vw, 64px); border-radius: var(--radius-lg); background: var(--panel); }
.collab-body > p { margin-top: 20px; color: var(--steel); max-width: 58ch; }

.collab-forms { margin: 32px 0 0; display: grid; gap: 12px; }
.collab-forms div { padding: 18px 20px; border-radius: var(--radius-sm); background: var(--canvas); }
.collab-forms dt { font-family: var(--serif); font-size: 1.25rem; font-weight: 500; }
.collab-forms dd { margin: 4px 0 0; color: var(--steel); font-size: 1rem; }

.collab-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; margin-top: 32px; }

/* Patients */
.patients { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 20px; }
.patients-body { padding: clamp(28px, 5vw, 64px); border-radius: var(--radius-lg); background: var(--panel); }
.patients-body p { margin-top: 20px; max-width: 62ch; }
.patients-body h2 + p { margin-top: 28px; }

.credentials { list-style: none; margin: 32px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.credentials li {
  display: inline-flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 16px;
  border: 1px solid var(--line); border-radius: 999px; font-size: .9375rem; font-weight: 500;
}
.credentials li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--brass); }

.patients-photo { margin: 0; border-radius: var(--radius-lg); overflow: hidden; min-height: 420px; position: relative; background: #cfd6de; }
.patients-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }

.care-notes { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 20px; }
.care-note { padding: 28px 32px; border-radius: var(--radius-lg); background: var(--panel); }
.care-note h3 { font-size: 1.375rem; }
.care-note p { margin-top: 10px; color: var(--steel); font-size: 1rem; }
.care-note-alert { display: flex; gap: 18px; background: var(--alert-bg); box-shadow: inset 0 0 0 1px #efd3ce; }
.care-note-alert h3 { color: var(--alert); }
.care-note-alert p { color: #5b3a36; }
.alert-icon { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--alert); color: #fff; }

/* Closing */
.closing { padding-bottom: clamp(56px, 8vw, 96px); }
.closing-panel {
  position: relative; overflow: hidden;
  padding: clamp(40px, 7vw, 88px) clamp(28px, 6vw, 80px);
  border-radius: var(--radius-lg); background: var(--ink-deep); color: #fff; text-align: center;
}
.closing-panel::before {
  content: ""; position: absolute; inset: 0; opacity: .1; pointer-events: none;
  background-image:
    repeating-linear-gradient(60deg, transparent 0 34px, #e3cfa9 34px 35px),
    repeating-linear-gradient(-60deg, transparent 0 34px, #e3cfa9 34px 35px);
  mask-image: radial-gradient(ellipse at 50% 120%, #000 10%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 120%, #000 10%, transparent 70%);
}
.closing-panel > * { position: relative; }
.closing-panel h2 { max-width: 20ch; margin: 0 auto; font-size: clamp(2rem, 4.4vw, 3.5rem); }
.closing-panel p { max-width: 52ch; margin: 20px auto 0; color: #c3ccd8; }
.closing-panel .btn { margin-top: 32px; }
.closing-panel .closing-note { margin-top: 24px; font-size: .9375rem; color: #9aa6b6; }

/* Footer */
.site-footer { padding: 48px 0 40px; background: var(--panel); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; }
.footer-name { font-family: var(--serif); font-size: 1.375rem; }
.footer-inner p:not(.footer-name) { color: var(--steel); font-size: .9375rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 8px; }
.footer-links a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px;
  color: var(--steel); text-decoration: none; font-size: .9375rem; font-weight: 500;
}
.footer-links a:hover { color: var(--ink); }
.footer-legal {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line);
  color: var(--steel); font-size: .875rem;
}

/* Page-load reveal, hero only */
@media (prefers-reduced-motion: no-preference) {
  .hero-photo, .hero-panel { animation: rise .7s cubic-bezier(.2, .7, .2, 1) both; }
  .hero-panel { animation-delay: .08s; }
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
}

/* Tablet */
@media (max-width: 1024px) {
  .hero, .collab, .patients { grid-template-columns: 1fr; }
  .hero-photo { min-height: 0; aspect-ratio: 4 / 3; }
  .hero-panel { order: -1; }
  .collab-photo { min-height: 0; aspect-ratio: 4 / 3; }
  .collab-photo img { object-position: 30% 35%; }
  .patients-photo { min-height: 0; aspect-ratio: 4 / 3; order: -1; }
  .advisory-body { grid-template-columns: 1fr; }
}

/* Mobile */
@media (max-width: 760px) {
  .menu-toggle { display: inline-flex; }
  .site-nav {
    position: absolute; left: var(--gutter); right: var(--gutter); top: 72px;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px; border-radius: var(--radius-md); background: var(--panel);
    box-shadow: 0 16px 40px rgba(18, 33, 59, .16);
    display: none;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a:not(.btn) { min-height: 48px; color: var(--ink); }
  .site-nav .btn { margin: 8px 0 0; }

  .wordmark-name { font-size: 1.125rem; }
  .hero-photo { aspect-ratio: 4 / 5; }
  .chip { padding: 10px 14px 10px 10px; gap: 10px; }
  .chip strong { font-size: 1.125rem; }
  .chip-icon { width: 34px; height: 34px; }
  .chip-top { top: 12px; left: 12px; }
  .chip-bottom { right: 12px; bottom: 12px; }
  .collab-photo .chip-bottom { left: 12px; }

  .doorways a { grid-template-columns: 1fr auto; gap: 2px 12px; }
  .doorway-who { grid-column: 1; }
  .doorway-what { grid-column: 1; grid-row: 2; font-size: .9375rem; }
  .doorways a::after { grid-column: 2; grid-row: 1 / span 2; }

  .advisory-banner { aspect-ratio: 2 / 1; }
  .care-notes { grid-template-columns: 1fr; }
  .care-note { padding: 24px; }
  .care-note-alert { flex-direction: column; gap: 14px; }
}
