/* Richard Brouwer — colorectal & general surgeon
   Single stylesheet. No frameworks, no JavaScript. */

:root {
  --ink:        #1a2430;
  --ink-soft:   #505b69;
  --accent:     #1f5e62;
  --accent-dk:  #164648;
  --paper:      #ffffff;
  --paper-alt:  #f6f4f1;
  --line:       #e3dfd9;
  --measure:    64rem;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans:  -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 0.6em;
}

h1 { font-size: clamp(2rem, 1.3rem + 2.6vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.1vw, 2rem); }
h3 { font-size: 1.125rem; font-family: var(--sans); font-weight: 650; letter-spacing: 0; }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-dk); }

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

.wrap {
  width: 100%;
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: 24px;
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 12px; top: 12px;
  z-index: 100;
  background: var(--paper);
  padding: 10px 16px;
  border: 1px solid var(--line);
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(160%) blur(8px);
  -webkit-backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 24px;
  padding-block: 14px;
}

.brand {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}
.brand-name {
  font-family: var(--serif);
  font-size: 1.22rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.brand-role {
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 22px;
  font-size: 0.94rem;
}
.site-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  padding-block: 2px;
  border-bottom: 1px solid transparent;
}
.site-nav a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ---------- hero ---------- */

.hero {
  padding-block: clamp(3rem, 1.5rem + 6vw, 6rem);
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1em;
}

.hero h1 { max-width: 18ch; }

.lede {
  font-size: clamp(1.05rem, 1rem + 0.35vw, 1.2rem);
  color: var(--ink-soft);
  max-width: 62ch;
}

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

.btn {
  display: inline-block;
  padding: 13px 22px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--paper);
  color: var(--ink);
  font-size: 0.97rem;
  font-weight: 550;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  background: var(--accent-dk);
  border-color: var(--accent-dk);
  color: #fff;
}

/* ---------- bands ---------- */

.band {
  padding-block: clamp(2.75rem, 1.5rem + 5vw, 5rem);
  border-bottom: 1px solid var(--line);
}
.band-alt { background: var(--paper-alt); }

.prose > * { max-width: 68ch; }
.prose > .facts,
.prose > .badges,
.prose > .channels { max-width: none; }
.prose p { color: var(--ink-soft); }

.section-intro {
  color: var(--ink-soft);
  max-width: 62ch;
  margin-bottom: 2rem;
}

.note {
  font-size: 0.9rem;
  color: var(--ink-soft);
}

/* ---------- facts ---------- */

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px 32px;
  margin: 2.5rem 0 0;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}
.facts div { margin: 0; }
.facts dt {
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 4px;
}
.facts dd {
  margin: 0;
  font-size: 0.97rem;
}

/* ---------- procedure cards ---------- */

.cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(265px, 1fr));
  gap: 14px;
}
.cards li {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 24px 22px;
}
.cards h3 { margin-bottom: 0.45em; }
.cards p {
  color: var(--ink-soft);
  font-size: 0.95rem;
  margin: 0;
}

/* ---------- contact ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 32px;
  margin-top: 2rem;
}

.contact-block h3 {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.9em;
}
.contact-block p { color: var(--ink-soft); }

.contact-block address {
  font-style: normal;
  line-height: 1.7;
  margin-bottom: 0.8em;
}

.contact-line {
  font-size: 1.08rem;
  margin-bottom: 0.4em;
}
.contact-line a { font-weight: 550; }

.link-arrow { font-size: 0.94rem; }
.link-arrow::after { content: " \2192"; }

/* ---------- footer ---------- */

.site-footer {
  padding-block: 2.5rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
}
.footer-fine {
  font-size: 0.82rem;
  max-width: 60ch;
  margin-top: 0.5em;
}

/* ---------- mobile call bar ---------- */

.callbar { display: none; }

@media (max-width: 640px) {
  body { padding-bottom: 64px; }

  .callbar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    position: fixed;
    inset: auto 0 0 0;
    z-index: 60;
    background: var(--paper);
    border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .callbar a {
    padding: 17px 8px;
    text-align: center;
    font-weight: 600;
    font-size: 0.97rem;
    text-decoration: none;
    color: var(--accent);
  }
  .callbar a + a { border-left: 1px solid var(--line); }

  .site-header { position: static; }
  .header-inner { padding-block: 16px; }
  .site-nav { font-size: 0.9rem; gap: 4px 18px; }
  .hero h1 { max-width: none; }
}

@media (max-width: 380px) {
  .wrap { padding-inline: 18px; }
  .hero-actions .btn { width: 100%; text-align: center; }
}

/* ---------- print ---------- */

@media print {
  .site-header, .callbar, .hero-actions { display: none; }
  body { font-size: 11pt; }
  .band { border: 0; padding-block: 1rem; }
  a { color: inherit; text-decoration: none; }
}


/* ---------- hero portrait ---------- */

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 0.85fr);
  gap: 48px;
  align-items: center;
}

.portrait {
  margin: 0;
}
.portrait img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 20%;
  border-radius: 6px;
  background: var(--paper-alt);
}

@media (max-width: 820px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .portrait img {
    max-width: 320px;
    aspect-ratio: 1 / 1;
  }
}

/* ---------- credential badges ---------- */

.badges {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 32px;
  margin: 2.5rem 0 0;
  padding: 2rem 0 0;
  border-top: 1px solid var(--line);
}
.badges img {
  display: block;
  height: 56px;
  width: auto;
  /* white-background logo files sit flat on the page ground */
  mix-blend-mode: multiply;
}

@media (max-width: 420px) {
  .badges { gap: 22px; }
  .badges img { height: 46px; }
}

/* ---------- referral channels ---------- */

.channels {
  list-style: none;
  margin: 2rem 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.channels li {
  display: grid;
  grid-template-columns: 9.5rem minmax(0, 1fr) auto;
  gap: 4px 20px;
  align-items: baseline;
  padding-block: 16px;
  border-bottom: 1px solid var(--line);
}
.channel-label {
  font-weight: 600;
  font-size: 0.97rem;
}
.channel-value {
  color: var(--ink-soft);
  font-size: 0.97rem;
}
.channel-value code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 1.02rem;
  letter-spacing: 0.02em;
  background: var(--paper-alt);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 3px 9px;
  color: var(--ink);
  user-select: all;
}
.channel-note {
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  white-space: nowrap;
}

@media (max-width: 560px) {
  .channels li {
    grid-template-columns: 1fr auto;
  }
  .channel-value {
    grid-column: 1 / -1;
  }
}

/* ---------- footer: practice affiliation ---------- */

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px 40px;
}

.practice {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--ink);
  order: 2;
}
.practice img {
  width: 46px;
  height: 46px;
  flex: none;
  mix-blend-mode: multiply;
}
.practice span {
  display: flex;
  flex-direction: column;
  line-height: 1.35;
}
.practice strong {
  font-size: 0.92rem;
  font-weight: 600;
}
.practice-note {
  font-size: 0.8rem;
  color: var(--ink-soft);
}
.practice:hover strong { color: var(--accent); }

.footer-legal { order: 1; }

@media (max-width: 700px) {
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .practice { order: 1; }
  .footer-legal { order: 2; }
}

/* ---------- outbound links on badges and credentials ---------- */

.badges a {
  display: block;
  border-radius: 3px;
  transition: opacity 0.15s ease;
}
.badges a:hover { opacity: 0.72; }
.badges a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 5px;
}

.facts dd a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.facts dd a:hover {
  color: var(--accent);
  text-decoration-color: currentColor;
}
