/* Diagnostic Imaging Centers of Texas
   Single-page site styles. Colors and spacing live in the custom
   properties below so they can be changed in one place. */

:root {
  --teal: #48c2c5;
  --navy: #00527c;
  --ink: #000;
  --muted: #6b7280;
  --page-max: 1280px;
  --gutter: 1rem;
  --font: "Niramit", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

/* ---- Base ---- */

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-weight: 400;
  line-height: 1.4;
  color: var(--ink);
  background: #fff;
}

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

a {
  color: inherit;
}

a:hover,
a:focus-visible {
  color: var(--teal);
}

a:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
}

h1,
h2 {
  margin: 0;
}

.container {
  max-width: var(--page-max);
  padding: var(--gutter);
  margin: 0 auto;
}

/* ---- Masthead ---- */

.masthead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.masthead__logo {
  display: block;
  width: 400px;
  max-width: 55%;
}

.masthead__contact {
  font-style: normal;
  text-align: right;
}

.masthead__contact a {
  display: block;
  text-decoration: none;
  font-weight: 300;
  font-size: 1.25rem;
  line-height: 1.75rem;
}

/* ---- Hero ---- */

.hero {
  display: flex;
}

.hero__text,
.hero__image {
  flex: 0 0 50%;
  max-width: 50%;
}

.hero__text {
  display: flex;
  flex-direction: column;
  padding: 1rem 3rem;
  background: var(--teal);
}

.hero__text h1 {
  color: var(--navy);
  font-size: 2.5rem;
  line-height: 3rem;
  margin: 1.5rem 0;
}

.hero__text h2 {
  margin-top: auto;
  padding-bottom: 1.5rem;
  color: #fff;
  font-size: 2rem;
}

.hero__image {
  background: var(--navy);
  text-align: center;
}

.hero__image img {
  width: 450px;
  max-width: 100%;
  margin: 0 auto;
  transform: scale(1.1);
  transform-origin: center top;
}

/* ---- Brand logos ---- */

.brands__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem 1rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

.brands__list li {
  flex: 0 1 18%;
  max-width: 18%;
}

.brands__list a {
  display: block;
}

.brands__list img {
  margin: 0 auto;
  transition: opacity 0.15s ease;
}

.brands__list a:hover img,
.brands__list a:focus-visible img {
  opacity: 0.8;
}

/* ---- Footer ---- */

.footer {
  margin-top: 2rem;
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 300;
  text-align: center;
}

.footer p {
  margin: 0;
}

/* ---- Not-found page ---- */

.notfound {
  text-align: center;
  padding-top: 3rem;
  padding-bottom: 4rem;
}

.notfound h1 {
  color: var(--navy);
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.notfound a.button {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--navy);
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  font-weight: 600;
}

.notfound a.button:hover,
.notfound a.button:focus-visible {
  background: var(--teal);
  color: #fff;
}

/* ---- Small screens ---- */

@media (max-width: 797px) {
  .masthead__logo {
    width: 160px;
    max-width: 50%;
  }

  .masthead__contact a {
    font-size: 0.8rem;
    line-height: 1rem;
  }

  .hero {
    flex-direction: column;
  }

  .hero__text,
  .hero__image {
    flex-basis: 100%;
    max-width: 100%;
  }

  .hero__text {
    padding: 1.5rem 2rem;
  }

  .hero__text h1 {
    font-size: 1.75rem;
    line-height: 1.5;
    margin: 0 0 1.5rem;
  }

  .hero__text h2 {
    font-size: 1.25rem;
    padding-bottom: 0;
  }

  .hero__image {
    padding: 1.5rem 0 0;
    overflow: hidden;
  }

  .hero__image img {
    width: 70%;
    transform: none;
  }

  .brands__list li {
    flex-basis: 45%;
    max-width: 45%;
  }
}
