/* Downtown Medical — static rebuild. Tokens derived from the live theme
   (raw/site.css): measured, not eyeballed. See docs/DESIGN.md. */

:root {
  /* Palette (live theme HSL tokens converted to hex) */
  --ink: #1d2524;          /* black-hsl 180,15.94%,13.53%  — body text, pills */
  --paper: #d8e1df;        /* white-hsl 180,16.22%,85.49%  — page background */
  --accent-light: #b1502f; /* lightAccent-hsl 10.99,58.74%,43.73% */
  --block: rgba(20, 26, 25, 0.80); /* hero contact blocks — contrast-verified */

  /* Type. Headings: EB Garamond (the live heading face — open source, OFL).
     Body: Open Sans (the live body face — open source, Apache 2.0).
     Meta/CTA: the live face (halyard-display) is commercial; substituted with
     a system grotesque stack (see docs/DESIGN.md for the rationale). */
  --font-heading: "EB Garamond", Georgia, "Times New Roman", serif;
  --font-body: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --font-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

@font-face {
  font-family: "EB Garamond";
  src: url("fonts/68fd4b24.EBGaramond-var.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Open Sans";
  src: url("fonts/ce39fe93.OpenSans-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem; /* 17px — matches the airy live body */
  line-height: 1.65;
}

/* --- accessibility ------------------------------------------------- */

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -4rem;
  z-index: 10;
  background: var(--ink);
  color: #fff;
  font-family: var(--font-ui);
  padding: 0.6rem 1rem;
  border-radius: 0 0 0.5rem 0.5rem;
  text-decoration: none;
  transition: top 0.15s ease-in;
}
.skip-link:focus { top: 0; }

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

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

.hero {
  position: relative;
  min-height: max(560px, 86vh);
  display: grid;
  overflow: hidden;
}

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Scrim: alpha >= 0.80 behind the wordmark zone (top 30%) — worst measured
   hero pixel p95=231 gives white text 9.9:1. Fades below the wordmark. */
.hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(20, 26, 25, 0.85) 0%,
    rgba(20, 26, 25, 0.80) 30%,
    rgba(20, 26, 25, 0.25) 62%,
    rgba(20, 26, 25, 0.45) 100%
  );
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-rows: 1fr auto;
  align-items: start;
  width: min(100% - 3rem, 74rem);
  margin-inline: auto;
  padding-block: clamp(1.5rem, 4vw, 3.5rem) clamp(1.5rem, 3.5vw, 3rem);
  min-height: inherit;
}

.wordmark {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: clamp(2.6rem, 6.2vw, 5.2rem);
  line-height: 1.04;
  color: #fff;
  letter-spacing: 0.005em;
  text-wrap: balance;
  max-width: 12ch;
}

/* White pill CTA, top-right of the hero (system grotesque = halyard stand-in) */
.cta-pill {
  position: absolute;
  top: clamp(1.5rem, 4vw, 3.5rem);
  right: 0;
  display: inline-block;
  background: #fff;
  color: var(--ink);
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1;
  text-decoration: none;
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  box-shadow: 0 2px 10px rgba(20, 26, 25, 0.35);
}
.cta-pill:hover { background: var(--paper); }

.hero-contacts {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Two semi-transparent contact blocks pinned bottom-left / bottom-right.
   rgba(20,26,25,.80): worst measured pixel under either block (p95=235)
   still yields white text 9.9:1 — see docs/DESIGN.md. */
.contact-block {
  margin: 0;
  padding: 1rem 1.35rem;
  background: var(--block);
  color: #fff;
  font-size: 1rem;
  line-height: 1.55;
  border-radius: 4px;
  max-width: 22rem;
}
.contact-block a { color: #fff; }

/* --- content --------------------------------------------------------- */

.content {
  width: min(100% - 3rem, 53rem);
  margin-inline: auto;
  padding-block: clamp(2.5rem, 6vw, 4.5rem) 0.5rem;
}

h2 {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  line-height: 1.15;
  margin: 0 0 1.1rem;
}

.images {
  display: flex;
  gap: clamp(1rem, 3vw, 2rem);
  align-items: flex-start;
  justify-content: center;
}
.images img {
  width: min(100%, 24rem);
  height: auto;
  border-radius: 4px;
}

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

.site-footer {
  margin-top: clamp(3rem, 7vw, 5rem);
  background: var(--ink);
  color: var(--paper);
  padding: clamp(2.5rem, 5vw, 4rem) 1.5rem 3rem;
  text-align: center;
}
.site-footer a { color: #fff; }
.footer-wordmark {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.8rem;
  margin: 0 0 0.75rem;
}
.site-footer address { font-style: normal; margin: 0 0 1.25rem; }
.cta-footer { position: static; box-shadow: none; }
.site-footer .cta-pill,
.site-footer .cta-pill:hover { color: var(--ink); }

/* --- small screens ----------------------------------------------------- */

@media (max-width: 640px) {
  .cta-pill {
    position: static;
    justify-self: end;
    margin-bottom: 1.25rem;
  }
  .hero-inner { grid-template-rows: auto 1fr; }
  .hero-contacts { flex-direction: column; align-items: stretch; }
  .contact-block { max-width: none; }
  .images { flex-direction: column; align-items: center; }
  .images img { width: 100%; }
}

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