/* Locally hosted typefaces. Licenses are in fonts/. */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 300;
  font-stretch: normal;
  font-display: swap;
  src: url(../fonts/ibm-plex-sans-300.ttf) format('truetype');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400;
  font-stretch: normal;
  font-display: swap;
  src: url(../fonts/ibm-plex-sans-400.ttf) format('truetype');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 500;
  font-stretch: normal;
  font-display: swap;
  src: url(../fonts/ibm-plex-sans-500.ttf) format('truetype');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 600;
  font-stretch: normal;
  font-display: swap;
  src: url(../fonts/ibm-plex-sans-600.ttf) format('truetype');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 700;
  font-stretch: normal;
  font-display: swap;
  src: url(../fonts/ibm-plex-sans-700.ttf) format('truetype');
}
@font-face {
  font-family: 'Oswald';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../fonts/oswald-600.ttf) format('truetype');
}
@font-face {
  font-family: 'Roboto Condensed';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/roboto-condensed-400.ttf) format('truetype');
}
@font-face {
  font-family: 'Roboto Condensed';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../fonts/roboto-condensed-600.ttf) format('truetype');
}

/* Colors and spacing used throughout the page. */
:root {
  --background: #1f2437;
  --text: #fdfdfd;
  --accent: #80c6cd;
  --button-text: #10355e;
  --section-space: 7rem;
  --heading-gap: 1.5rem;
  --intro-gap: 5rem;
}

/* Base elements */
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: "IBM Plex Sans", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, p { margin: 0; }
h1, h2 {
  margin-bottom: var(--heading-gap);
  font-family: "Roboto Condensed", Arial, sans-serif;
  font-weight: 600;
  line-height: 1.2;
}
h1 { font-size: 3.5rem; }
h2 { font-size: 2.5rem; }
p { font-weight: 300; }
a { color: inherit; }
img { display: block; max-width: 100%; }
svg { display: block; }
a:focus-visible { outline: 3px solid var(--accent); outline-offset: 5px; }
.lead { font-size: 1.125rem; }
.container { width: 100%; max-width: 80rem; margin-inline: auto; }
.section { padding: calc(5vw + var(--section-space)) 5%; }
.intro, .section-intro { max-width: 48rem; }
.section-intro { margin-bottom: var(--intro-gap); }

/* Header and keyboard navigation */
.site-header {
  display: flex;
  align-items: center;
  min-height: 4.5rem;
  padding: 0 5%;
  border-top: 1px solid #000;
  border-bottom: 1px solid var(--background);
  background: var(--text);
  color: #000;
}
.brand {
  font-family: "Oswald", Arial, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.1;
  text-transform: uppercase;
  text-decoration: none;
}
.skip-link {
  position: absolute;
  z-index: 1;
  top: 0;
  left: 1rem;
  padding: .75rem 1rem;
  transform: translateY(-150%);
  background: var(--accent);
  color: var(--background);
}
.skip-link:focus { transform: translateY(0); }

/* Calls to action */
.button {
  display: inline-block;
  border: 1px solid #000;
  padding: .75rem 1.5rem;
  background: var(--accent);
  color: var(--button-text);
  text-align: center;
  text-decoration: none;
}
.button:hover { background: #9ed4da; }
.intro-button { margin-top: 2rem; }
.services-button { margin-top: var(--intro-gap); }

/* Three services; stacked on smaller screens. */
.services-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4rem 3rem; }
.service { padding-top: calc(var(--heading-gap) + 1.5rem); }
.service h3 {
  margin-bottom: var(--heading-gap);
  font-family: "Roboto Condensed", Arial, sans-serif;
  font-size: 2rem;
  font-weight: 400;
  line-height: 1.3;
}

/* Biography and portrait */
.about-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: center; gap: 4rem 5rem; }
.biography { padding-bottom: 2rem; }
.portrait { width: 100%; aspect-ratio: 1; object-fit: cover; }

/* Clinic contact information */
.contact-grid { display: grid; grid-template-columns: minmax(0, .5fr) minmax(0, 1fr); gap: 4rem 5rem; }
.contact-details { display: grid; gap: 2.5rem; }
.contact-icon { width: 2rem; height: 2rem; margin-bottom: 1rem; }
.contact-item h3 { margin-bottom: .5rem; font-size: 1.25rem; font-weight: 700; line-height: 1.4; }
.contact-item > p { margin-bottom: .5rem; }
.contact-item a { color: #fefefd; }
address { font-style: normal; font-weight: 300; }
address span { display: block; }
.building { font-weight: 500; }
.directions {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin-top: var(--heading-gap);
  padding-block: .25rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
}
.directions svg { width: 1rem; height: 1rem; color: var(--accent); }
.clinic-photo { width: 100%; height: 100%; aspect-ratio: 3 / 2; object-fit: cover; }

/* Footer; includes the original closing section's spacing. */
.site-footer { padding: 15vw 5% 5vw; font-size: 1.2rem; overflow-wrap: anywhere; }
.footer-group { display: flex; flex-direction: column; align-items: flex-start; gap: .5rem; }
.footer-group + .footer-group { margin-top: 2.5rem; }
.footer-group p { font-weight: 400; }
.footer-group a { text-decoration: none; }
.footer-group strong, .footer-group .footer-name { font-weight: 600; }
.footer-name { font-size: 1.125rem; }

/* Tablet */
@media (max-width: 991px) {
  :root { --section-space: 6rem; --intro-gap: 4.5rem; }
  h1 { font-size: 3.25rem; }
  h2 { font-size: 2.75rem; }
  .service h3 { font-size: 1.75rem; }
  .services-grid { column-gap: 2rem; }
  .about-grid, .contact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 3rem; }
}

/* Mobile */
@media (max-width: 767px) {
  :root { --section-space: 4rem; --heading-gap: 1.25rem; --intro-gap: 3rem; }
  .site-header { min-height: 4rem; }
  h1 { font-size: 2.5rem; }
  h2 { font-size: 2.25rem; }
  .lead, .footer-name { font-size: 1rem; }
  .intro-button { margin-top: 1.5rem; }
  .services-grid, .about-grid, .contact-grid { grid-template-columns: minmax(0, 1fr); gap: 3rem; }
  .service h3 { font-size: 1.5rem; line-height: 1.4; }
  .biography { padding-bottom: 1.5rem; }
  .contact-icon { margin-bottom: .75rem; }
  .contact-item h3 { font-size: 1.125rem; }
  .clinic-photo { height: auto; }
}
