:root {
  --color-red: #ff0b1b;
  --color-blue: #0e70f7;
  --color-body: #e4e4e4;
  --color-page: #fffdff;
  --color-black: #0c0c0c;
  --color-text: #242424;
  --color-muted: #868686;
  --color-section: #f7f8fa;
  --color-white: #ffffff;
  --border-soft: 1px solid rgba(136, 136, 136, 0.25);
  --page-max: 1400px;
  --header-height: 90px;
  --header-height-small: 80px;
  --gutter: clamp(12px, 3.6vw, 50px);
  --section-space: 60px;
  --section-space-small: 20px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--color-body);
  color: var(--color-text);
  font-family: "Open Sans", Arial, Helvetica, sans-serif;
}

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

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--color-blue);
  outline-offset: 4px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.page {
  width: 100%;
  max-width: var(--page-max);
  margin: 0 auto;
  background: var(--color-page);
}

.site-header {
  position: fixed;
  top: 0;
  left: 50%;
  z-index: 1000;
  width: 100%;
  max-width: var(--page-max);
  height: var(--header-height);
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.85);
}

.brand {
  position: absolute;
  top: 10px;
  left: 20px;
  z-index: 3;
  display: block;
  width: 150px;
  height: 150px;
  transition: width 180ms ease, height 180ms ease, top 180ms ease, left 180ms ease;
}

.brand-logo {
  width: 150px;
  height: 150px;
  border: 1px solid #000000;
  border-radius: 50%;
  background: var(--color-white);
  transition: width 180ms ease, height 180ms ease;
}

.site-header.is-scrolled .brand {
  top: 5px;
  left: 10px;
  width: 80px;
  height: 80px;
}

.site-header.is-scrolled .brand-logo {
  width: 80px;
  height: 80px;
}

.primary-nav {
  height: 100%;
}

.nav-menu {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 30px;
  height: 100%;
  margin: 0;
  padding: 23px 100px 0 190px;
  list-style: none;
}

.nav-menu a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--color-white);
  font-size: 16px;
  line-height: 1;
}

.nav-menu a:hover,
.nav-menu a:focus-visible {
  color: var(--color-red);
}

.menu-toggle {
  display: none;
  position: absolute;
  top: 0;
  right: 5%;
  z-index: 4;
  width: 64px;
  height: var(--header-height-small);
  border: 0;
  background: transparent;
  color: var(--color-white);
  cursor: pointer;
  font: inherit;
}

.menu-toggle span {
  display: block;
  font-size: 56px;
  line-height: 1;
}

.hero {
  aspect-ratio: 140 / 59;
  background-image: url("../images/im8.jpg");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.section {
  position: relative;
  width: 100%;
  text-align: center;
  scroll-margin-top: calc(var(--header-height) + 12px);
}

.section-about {
  padding: var(--section-space) 0;
  background: var(--color-section);
}

.section-contact {
  padding: var(--section-space) 0;
  background: var(--color-white);
}

.intro-panel {
  width: calc(100% - 100px);
  max-width: 1276px;
  margin: 0 auto;
  padding: 20px;
  border: var(--border-soft);
  background: var(--color-white);
  line-height: 1.5;
  overflow-wrap: break-word;
}

.intro-panel h2 {
  margin: 0 0 20px;
  color: var(--color-black);
  font-size: 1.17em;
  line-height: 1.35;
  font-weight: 700;
  text-align: center;
}

.intro-panel p {
  margin: 0;
  color: var(--color-black);
  font-size: 1em;
  line-height: 1.5;
  font-weight: 700;
  text-align: justify;
  text-justify: inter-word;
}

.staff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 50px;
  width: calc(100% - 100px);
  max-width: 1276px;
  margin: 50px auto 0;
}

.staff-card {
  min-height: 382px;
  padding: 20px;
  border: var(--border-soft);
  background: var(--color-white);
  color: var(--color-muted);
  line-height: 1.5;
  text-align: center;
  overflow-wrap: break-word;
}

.staff-photo {
  width: 240px;
  height: 240px;
  margin: 0 auto 20px;
  border: 1px solid #555555;
  border-radius: 50%;
  object-fit: cover;
}

.staff-card h3 {
  margin: 0;
  color: var(--color-black);
  font-size: 2em;
  line-height: 1.2;
  font-weight: 700;
}

.staff-card p {
  margin: 12px 0 0;
  font-size: 1.17em;
  line-height: 1.35;
  font-weight: 700;
  text-align: center;
}

.staff-card a,
.phone-link {
  color: var(--color-red);
}

.email-link {
  color: var(--color-blue);
}

.staff-card a:hover,
.phone-link:hover,
.email-link:hover,
.staff-card a:focus-visible,
.phone-link:focus-visible,
.email-link:focus-visible {
  text-decoration: underline;
}

.review-card {
  display: none;
  width: calc(100% - 24px);
  max-width: 420px;
  margin: 20px auto 0;
  padding: 0;
  border: var(--border-soft);
  background: var(--color-white);
}

.review-card img {
  width: 100%;
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px;
  width: calc(100% - 120px);
  max-width: 1280px;
  margin: 0 auto;
  align-items: stretch;
}

.contact-details {
  min-height: 450px;
  padding: 96px 24px 32px;
  border: var(--border-soft);
  background: var(--color-section);
  line-height: 1.5;
  text-align: center;
  overflow-wrap: break-word;
}

.contact-details h2 {
  margin: 0 0 20px;
  color: var(--color-black);
  font-size: 2em;
  line-height: 1.2;
  font-weight: 700;
}

.contact-details p,
.contact-details address {
  margin: 0 0 10px;
  color: var(--color-black);
  font-size: 1.17em;
  line-height: 1.5;
  font-style: normal;
  font-weight: 700;
}

.contact-name {
  font-size: 1.5em;
}

.contact-details address span {
  display: block;
}

.contact-details a {
  overflow-wrap: anywhere;
}

.map {
  width: 100%;
  height: 450px;
  border: 0;
}

.site-footer {
  padding: 60px 20px 58px;
  background: #000000;
  color: #555555;
  text-align: center;
}

.red {
  color: var(--color-red);
}

.white {
  color: #fffdff;
}

@media (max-width: 1180px) {
  .staff-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .nav-menu {
    gap: 24px;
    padding-right: 40px;
  }

  .contact-grid {
    width: calc(100% - var(--gutter) - var(--gutter));
    max-width: 900px;
    grid-template-columns: 1fr;
  }

  .contact-details {
    min-height: 0;
    padding-top: 36px;
    padding-bottom: 36px;
  }
}

@media (max-width: 700px) {
  main {
    padding-top: var(--header-height-small);
  }

  .site-header {
    height: var(--header-height-small);
    background: #000000;
  }

  .brand {
    top: 10px;
    left: max(0px, calc(5% - 15px));
    width: 100px;
    height: 100px;
  }

  .brand-logo {
    width: 100px;
    height: 100px;
  }

  .site-header.is-scrolled .brand,
  .site-header.is-menu-open .brand {
    top: 5px;
    left: max(0px, calc(5% - 15px));
    width: 70px;
    height: 70px;
  }

  .site-header.is-scrolled .brand-logo,
  .site-header.is-menu-open .brand-logo {
    width: 70px;
    height: 70px;
  }

  .menu-toggle {
    display: block;
  }

  .primary-nav {
    position: absolute;
    top: var(--header-height-small);
    left: 0;
    width: 100%;
    height: auto;
    overflow: hidden;
    pointer-events: none;
  }

  .nav-menu {
    display: block;
    height: auto;
    max-height: 0;
    padding: 0 5%;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.8);
    opacity: 0;
    transform: translateY(-8px);
    transition: max-height 180ms ease, opacity 180ms ease, transform 180ms ease;
  }

  .site-header.is-menu-open .primary-nav {
    pointer-events: auto;
  }

  .site-header.is-menu-open .nav-menu {
    max-height: 240px;
    opacity: 1;
    transform: translateY(0);
  }

  .nav-menu a {
    justify-content: center;
    width: 100%;
    min-height: 39px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    line-height: 1.35;
  }

  .nav-menu li:last-child a {
    border-bottom: 0;
  }

  .hero {
    height: auto;
    min-height: 0;
    aspect-ratio: 1;
    background-image: url("../images/mobile-im6.jpg");
    background-position: center;
    background-size: cover;
  }

  .section {
    scroll-margin-top: calc(var(--header-height-small) + 12px);
  }

  .section-about,
  .section-contact {
    padding-top: var(--section-space-small);
    padding-bottom: var(--section-space-small);
  }

  .intro-panel {
    width: calc(100% - 24px);
    margin-top: 20px;
    line-height: 1.6;
  }

  .intro-panel p {
    line-height: 1.6;
    text-align: left;
    text-justify: auto;
  }

  .staff-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    width: calc(100% - 24px);
    margin-top: 20px;
  }

  .staff-card {
    min-height: 0;
    line-height: 1.6;
  }

  .staff-card h3 {
    font-size: clamp(1.7rem, 9vw, 2rem);
  }

  .staff-photo {
    width: 72vw;
    max-width: 240px;
    height: auto;
    aspect-ratio: 1;
  }

  .review-card {
    display: block;
  }

  .contact-grid {
    gap: 20px;
  }

  .contact-details {
    padding: 10px 14px 20px;
  }

  .contact-details h2 {
    font-size: clamp(1.7rem, 8vw, 2rem);
  }

  .contact-details p,
  .contact-details address {
    font-size: 1.17em;
  }

  .map {
    height: 400px;
  }

  .site-footer {
    padding: 10% 5%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
