/* ═══════════════════════════════════════════════════════════════
   Hypnos Pantheon Anaesthetic — homepage stylesheet
   Palette: soft minimal medical — white, muted blue, soft grey
   Type:    Marcellus (display) · Hanken Grotesk (body) · Spline Sans Mono (vitals)
   ═══════════════════════════════════════════════════════════════ */

:root {
  --white:     #FFFFFF;
  --cloud:     #F5F8FB;   /* tinted section background */
  --paper:     #EAF0F5;   /* deeper tint: footer, image mats */
  --mist:      #DDE6EE;   /* hairlines and borders */
  --steel:     #5E7286;   /* secondary text */
  --ink:       #22313F;   /* headings and body */
  --blue:      #3F6484;   /* primary muted blue */
  --blue-deep: #2F4D68;   /* hover / active */
  --trace:     #8FAEC9;   /* ECG line */

  --font-display: "Marcellus", "Times New Roman", serif;
  --font-body:    "Hanken Grotesk", "Segoe UI", sans-serif;
  --font-mono:    "Spline Sans Mono", "Consolas", monospace;

  --container: 1140px;
  --radius: 10px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: 0.005em;
}

h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); margin-bottom: 0.75rem; }
h3 { font-size: 1.25rem; }

a { color: var(--blue); text-decoration-color: var(--mist); text-underline-offset: 3px; }
a:hover { color: var(--blue-deep); text-decoration-color: currentColor; }

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 2px;
}

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

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

.skip-link {
  position: absolute; left: 24px; top: -48px;
  background: var(--blue); color: var(--white);
  padding: 10px 18px; border-radius: 0 0 8px 8px;
  z-index: 100; transition: top 160ms ease;
}
.skip-link:focus { top: 0; color: var(--white); }

/* ─── Shared elements ─── */

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--steel);
  margin-bottom: 0.9rem;
}

.section { padding-block: 88px; }
.section-tinted { background: var(--cloud); }

/* feint emblem wash behind a section */
.section-watermark { position: relative; overflow: hidden; }
.section-watermark::before {
  content: "";
  position: absolute;
  top: 48px; right: -70px;
  width: 460px; height: 650px;
  background: url("../images/logo-watermark.png") top / contain no-repeat;
  opacity: 0.06;
  pointer-events: none;
}
.section-watermark > .container { position: relative; z-index: 1; }

.section-intro {
  max-width: 46ch;
  color: var(--steel);
  margin-bottom: 2.25rem;
}

.btn {
  display: inline-block;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 12px 26px;
  border-radius: 999px;
  text-decoration: none;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}
.btn-solid { background: var(--blue); color: var(--white); }
.btn-solid:hover { background: var(--blue-deep); color: var(--white); }
.btn-quiet { color: var(--blue); border: 1px solid var(--mist); background: var(--white); }
.btn-quiet:hover { border-color: var(--blue); }

.text-link {
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border-bottom: 1px solid var(--mist);
  padding-bottom: 2px;
}
.text-link:hover { border-color: var(--blue-deep); }

/* ─── Header ─── */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--mist);
}
.site-header .container { max-width: 1360px; }

.header-row {
  display: flex; align-items: center; gap: 28px;
  min-height: 74px;
}

.wordmark {
  text-decoration: none;
  line-height: 1.2;
  margin-right: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}
.wordmark-logo { height: 54px; width: auto; }
.wordmark-name {
  display: block;
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--ink);
}
.wordmark-sub {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--steel);
}

.site-nav {
  display: flex;
  flex: 1 1 auto;
  justify-content: space-evenly;
  gap: 16px;
}
.site-nav a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  padding-block: 6px;
}
.site-nav a:hover { color: var(--blue); }

.header-cta { white-space: nowrap; }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  border: 1px solid var(--mist);
  border-radius: 8px;
  background: var(--white);
  cursor: pointer;
  position: relative;
}
.nav-toggle-bar,
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  content: "";
  position: absolute; left: 12px;
  width: 18px; height: 2px;
  background: var(--ink);
  transition: transform 200ms ease, opacity 200ms ease;
}
.nav-toggle-bar { top: 21px; }
.nav-toggle-bar::before { top: -6px; left: 0; }
.nav-toggle-bar::after  { top: 6px;  left: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after  { transform: translateY(-6px) rotate(-45deg); }

/* ─── Hero ─── */

.hero {
  background:
    radial-gradient(900px 420px at 85% -10%, rgba(143, 174, 201, 0.18), transparent 70%),
    linear-gradient(var(--white), var(--cloud));
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  align-items: center;
  gap: 56px;
  padding-block: 84px 64px;
}

.hero-copy .lede {
  font-size: 1.2rem;
  color: var(--steel);
  max-width: 44ch;
  margin-top: 1.1rem;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 2rem; }

.hero-figure {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 24px 48px -24px rgba(47, 77, 104, 0.35);
}
.hero-figure img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }

/* page-load reveal, hero only */
.hero-copy > * , .hero-figure {
  animation: rise 640ms cubic-bezier(0.2, 0.7, 0.3, 1) both;
}
.hero-copy > :nth-child(2) { animation-delay: 80ms; }
.hero-copy > :nth-child(3) { animation-delay: 160ms; }
.hero-copy > :nth-child(4) { animation-delay: 240ms; }
.hero-figure { animation-delay: 200ms; }

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

/* ─── Signature: monitor trace ─── */

.monitor {
  border-top: 1px solid var(--mist);
  background: var(--cloud);
  padding-bottom: 18px;
}

.trace {
  display: block;
  width: 100%; height: 64px;
}
.trace path {
  fill: none;
  stroke: var(--trace);
  stroke-width: 1.6;
  stroke-linejoin: round;
  stroke-dasharray: 100 100;
  animation: sweep 9s linear infinite;
}

@keyframes sweep {
  0%   { stroke-dashoffset: 100; opacity: 1; }
  70%  { stroke-dashoffset: 0;   opacity: 1; }
  86%  { opacity: 0.25; }
  100% { stroke-dashoffset: 0;   opacity: 0; }
}

.vitals {
  display: flex; flex-wrap: wrap; gap: 26px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  color: var(--steel);
}
.vitals-note { margin-left: auto; font-style: normal; }

/* ─── Who we are ─── */

.who-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 64px;
  align-items: center;
}

.who-copy p { margin-bottom: 1.1rem; }
.who-copy .text-link { display: inline-block; margin-top: 0.4rem; }

.who-figure {
  border-radius: var(--radius);
  overflow: hidden;
  border: 8px solid var(--paper);
  order: -1;
}
.who-figure img { aspect-ratio: 5 / 4; object-fit: cover; width: 100%; }

/* ─── Team ─── */

.team-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 22px;
  margin-top: 2.25rem;
}

.team-card {
  background: var(--white);
  border: 1px solid var(--mist);
  border-radius: var(--radius);
  padding: 16px 16px 20px;
  transition: box-shadow 200ms ease, transform 200ms ease;
}
.team-card:hover {
  box-shadow: 0 16px 32px -20px rgba(47, 77, 104, 0.4);
  transform: translateY(-2px);
}

.team-photo-link { display: block; border-radius: 6px; overflow: hidden; margin-bottom: 14px; }
.team-photo { aspect-ratio: 4 / 5; object-fit: cover; width: 100%; }

.team-card h3 { font-size: 1.1rem; margin-bottom: 6px; }
.team-card h3 a { color: var(--ink); text-decoration: none; }
.team-card h3 a:hover { color: var(--blue); }

.team-quals {
  font-size: 0.8rem;
  color: var(--steel);
  line-height: 1.5;
  margin-bottom: 10px;
}

.team-focus { font-size: 0.88rem; margin-bottom: 14px; }
.team-quals span,
.team-focus span {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--steel);
  margin-bottom: 2px;
}

.team-card .text-link { font-size: 0.85rem; }

/* ─── Surgical network ─── */

.network-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 22px;
}

.network-card {
  border: 1px solid var(--mist);
  border-radius: var(--radius);
  padding: 24px;
  background: linear-gradient(var(--white), var(--cloud));
}

.network-card h3 { margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--mist); }
.network-card h3 a { color: var(--ink); text-decoration: none; }
.network-card h3 a:hover { color: var(--blue); }

.surgeon-list { list-style: none; }
.surgeon-list li {
  padding-block: 9px;
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px;
}
.surgeon-list li + li { border-top: 1px solid var(--mist); }
.surgeon-list a { font-weight: 600; text-decoration: none; }
.surgeon-list a:hover { text-decoration: underline; }
.surgeon-list span { font-size: 0.82rem; color: var(--steel); }
.surgeon-note { font-size: 0.9rem; color: var(--steel); }

/* ─── Scroll reveal (JS adds .reveal / .reveal-in) ─── */

.reveal { opacity: 0; transform: translateY(16px); transition: opacity 560ms ease, transform 560ms cubic-bezier(0.2, 0.7, 0.3, 1); }
.reveal-in { opacity: 1; transform: none; }

/* ─── Footer ─── */

.site-footer {
  background: var(--paper);
  border-top: 1px solid var(--mist);
  padding-block: 64px 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 48px;
}

.footer-logo {
  width: 110px;
  margin-bottom: 14px;
}

.footer-name { font-family: var(--font-display); font-size: 1.2rem; }
.footer-motto {
  font-family: var(--font-display);
  color: var(--steel);
  letter-spacing: 0.06em;
  margin-top: 2px;
}

.footer-block h3 {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--steel);
  margin-bottom: 12px;
}
.footer-block p { margin-bottom: 4px; }
.footer-block a { text-decoration: none; font-weight: 500; }
.footer-block a:hover { text-decoration: underline; }

.footer-emails { list-style: none; }
.footer-emails li { margin-bottom: 3px; }
.footer-emails a { font-size: 0.88rem; font-weight: 400; }

.footer-fine { font-size: 0.8rem; color: var(--steel); }

.footer-legal {
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--mist);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
  font-size: 0.85rem;
  color: var(--steel);
}

.avily-credit {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.avily-credit img { height: 15px; width: auto; display: inline-block; }

/* ─── Responsive ─── */

@media (max-width: 1080px) {
  .site-nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--white);
    border-bottom: 1px solid var(--mist);
    padding: 8px 24px 16px;
    display: none;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding-block: 12px; border-bottom: 1px solid var(--cloud); }
  .nav-toggle { display: block; }
  .header-cta { display: none; }
}

@media (max-width: 860px) {
  .section { padding-block: 64px; }
  .hero-grid { grid-template-columns: 1fr; gap: 36px; padding-block: 56px 44px; }
  .hero-figure { order: -1; }
  .who-grid { grid-template-columns: 1fr; gap: 36px; }
  .who-figure { order: -1; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .vitals-note { display: none; }
}

/* ═══════════════════════════════════════════════════════════════
   Sub-pages
   ═══════════════════════════════════════════════════════════════ */

.site-nav a[aria-current="page"] { color: var(--blue); font-weight: 600; }

/* Page banner */
.page-hero {
  background:
    radial-gradient(700px 320px at 88% -20%, rgba(143, 174, 201, 0.16), transparent 70%),
    linear-gradient(var(--white), var(--cloud));
  border-bottom: 1px solid var(--mist);
  padding-block: 56px 48px;
}
.page-hero { text-align: center; }
.page-hero h1 { font-size: clamp(1.9rem, 3.8vw, 2.7rem); }
.page-hero .lede {
  color: var(--steel);
  max-width: 68ch;
  margin-top: 0.9rem;
  margin-inline: auto;
  font-size: 1.08rem;
}

/* Long-form prose */
.prose { max-width: 760px; }
.prose h2 { margin: 2.6rem 0 0.8rem; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin: 1.9rem 0 0.5rem; }
.prose p { margin-bottom: 1.05rem; }
.prose ul { margin: 0.4rem 0 1.25rem 1.3rem; }
.prose li { margin-bottom: 0.45rem; }

/* Split with an image */
.split-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 56px;
  align-items: center;
}
.split-figure {
  border-radius: var(--radius);
  overflow: hidden;
  border: 8px solid var(--paper);
}
.split-figure img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }

/* Trust cards */
.trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
  margin-top: 2.25rem;
}
.trust-card {
  border: 1px solid var(--mist);
  border-radius: var(--radius);
  background: linear-gradient(var(--white), var(--cloud));
  padding: 28px 24px;
}
.trust-card h3 { margin-bottom: 10px; font-size: 1.15rem; }
.trust-card p { color: var(--steel); font-size: 0.97rem; }
.trust-card p + p { margin-top: 0.7rem; }
.trust-card ul {
  margin: 0.4rem 0 0 1.1rem;
  color: var(--steel);
  font-size: 0.97rem;
}
.trust-card li { margin-bottom: 0.5rem; }
.trust-card .doc-list { margin: 0.8rem 0 0; list-style: none; }
.trust-card--wide { grid-column: 1 / -1; }

/* Keyline variant: bare icon, then hairline rule with a blue accent */
.trust-card--icon {
  border: 0;
  border-radius: 0;
  background: none;
  padding: 8px 0 0;
}
.trust-card--icon h3 {
  border-top: 1px solid var(--mist);
  padding-top: 18px;
  position: relative;
}
.trust-card--icon h3::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 44px;
  height: 2px;
  background: var(--blue);
}
.trust-icon {
  color: var(--blue);
  margin-bottom: 16px;
  display: block;
}
.trust-icon svg {
  width: 34px;
  height: 34px;
  stroke-width: 1.5;
}.section-note { margin-top: 1.75rem; color: var(--steel); }
.section-subhead { margin-bottom: 0.4rem; }
.section-intro--full { max-width: none; }
.trust-grid--2col { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* Practitioner profiles */
.profile {
  display: grid;
  grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
  gap: 48px;
  align-items: start;
  padding-block: 56px;
  scroll-margin-top: 84px;
}
.profile + .profile { border-top: 1px solid var(--mist); }
.profile-photo {
  border-radius: var(--radius);
  overflow: hidden;
  border: 8px solid var(--paper);
}
.profile-photo img { aspect-ratio: 4 / 5; object-fit: cover; width: 100%; }
.profile-body h2 { margin-bottom: 0.9rem; }
.profile-meta {
  font-size: 0.92rem;
  margin-bottom: 0.5rem;
}
.profile-meta span {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--steel);
  margin-bottom: 2px;
}
.profile-bio { margin-top: 1.4rem; }
.profile-bio p { margin-bottom: 1.05rem; }

/* Callout (NB notes) */
.callout {
  border-left: 4px solid var(--blue);
  background: rgba(63, 100, 132, 0.13);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 16px 22px;
  margin-block: 1.4rem;
}
.callout p { margin: 0; }
.callout strong { color: var(--blue-deep); }

/* Document link list (SASA sheets) */
.doc-list { list-style: none; margin: 0.8rem 0 1.4rem; max-width: 640px; }
.doc-list li { border-top: 1px solid var(--mist); padding-block: 10px; }
.doc-list li:last-child { border-bottom: 1px solid var(--mist); }
.doc-list a { font-weight: 600; text-decoration: none; }
.doc-list a:hover { text-decoration: underline; }

/* Q&A accordions */
.qa { max-width: 780px; margin-inline: auto; }
.qa details {
  border: 1px solid var(--mist);
  border-radius: var(--radius);
  background: var(--white);
  margin-bottom: 14px;
}
.qa summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 22px;
  font-weight: 600;
  font-size: 1.02rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after {
  content: "+";
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--blue);
  line-height: 1;
  flex-shrink: 0;
}
.qa details[open] summary::after { content: "−"; }
.qa details[open] summary { border-bottom: 1px solid var(--mist); }
.qa .qa-body { padding: 16px 22px 20px; }
.qa .qa-body p { margin-bottom: 0.9rem; }
.qa .qa-body p:last-child { margin-bottom: 0; }

/* Contact page */
.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 56px;
  align-items: start;
}
.contact-card {
  border: 1px solid var(--mist);
  border-radius: var(--radius);
  background: linear-gradient(var(--white), var(--cloud));
  padding: 28px 26px;
}
.contact-card + .contact-card { margin-top: 22px; }
.contact-card h2 { font-size: 1.35rem; margin-bottom: 12px; }
.contact-card p { margin-bottom: 6px; }
.contact-card a { text-decoration: none; font-weight: 500; }
.contact-card a:hover { text-decoration: underline; }
.contact-card .email-list { list-style: none; }
.contact-card .email-list li { margin-bottom: 4px; }
.contact-card .email-list a { font-size: 0.92rem; font-weight: 400; }
.contact-note { font-size: 0.88rem; color: var(--steel); }

/* Form */
.contact-form {
  border: 1px solid var(--mist);
  border-radius: var(--radius);
  padding: 32px 30px;
  background: var(--white);
}
.contact-form h2 { font-size: 1.35rem; margin-bottom: 18px; }
.form-field { margin-bottom: 18px; }
.form-field label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 6px;
}
.form-field input,
.form-field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--mist);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  background: var(--white);
}
.form-field input:focus-visible,
.form-field textarea:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 0;
  border-color: var(--blue);
}
.form-field textarea { min-height: 140px; resize: vertical; }
.contact-form .btn { border: 0; cursor: pointer; font-family: var(--font-body); }

@media (max-width: 860px) {
  .split-grid { grid-template-columns: 1fr; gap: 32px; }
  .split-figure { order: -1; }
  .trust-grid--2col { grid-template-columns: 1fr; }
  .profile { grid-template-columns: 1fr; gap: 28px; padding-block: 44px; }
  .profile-photo { max-width: 320px; }
  .contact-layout { grid-template-columns: 1fr; gap: 32px; }
}

/* ─── Reduced motion ─── */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-copy > *, .hero-figure { animation: none; }
  .trace path { animation: none; stroke-dasharray: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .team-card, .team-card:hover { transform: none; transition: none; }
}
