:root {
  --color-accent: #00151f;
  --color-highlight: #054a63;
  --logo-primary: #2b3853;
  --background-light-neutral: #f7f8fa;
  --light-neutral: #e4e7ec;
  --secondary-text: #8a93a6;
  --body-text: #1f2430;
  --accent-calm: #01648b;
  --accent-premium: #f07503;
  --accent-fresh: #9fb6d9;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Inter", sans-serif;
  font-weight: 400;
}

html {
  scroll-behavior: smooth;
}

p {
  font-weight: 350;
  font-size: 1.4rem;
  line-height: 1.7rem;
  text-align: center;
  max-width: 800px;
  width: 100%;
  color: var(--body-text);
}
p::selection,
h1::selection,
h2::selection,
h3::selection,
h4::selection,
h5::selection,
h6::selection,
a::selection,
img::selection,
footer::selection {
  background-color: var(--accent-fresh);
  color: var(--logo-primary);
}

body {
  background-color: var(--background-light-neutral);
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 2rem;
  min-height: 100vh;
  grid-template-rows: auto 1fr auto;
  align-items: center;
  padding: 2rem;
}

a:focus {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}
nav button {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 1.5rem;
  color: var(--logo-primary);
}
nav button:focus {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

nav button:hover {
  color: var(--color-accent);
}

nav a img {
  width: 50px;
  height: auto;
}

nav.sticky-nav {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  font-size: 1.5rem;
  gap: 2rem;
  padding: 1rem 2rem;
  color: var(--logo-primary);
  width: 100%;
  max-width: 1000px;
  position: sticky;
  top: 0;
  margin: 0 auto;
  background-color: var(--background-light-neutral);
  z-index: 1000;
}

nav.sticky-nav a,
nav.sticky-nav button {
  display: flex;
  align-items: center;
}

nav.sticky-nav a:last-child {
  margin-left: auto;
}
nav.sticky-nav a {
  text-decoration: none;
  color: inherit;
  font-weight: 300;
  letter-spacing: 0.05rem;
  font-size: larger;
  transition-duration: 200ms;
  gap: 1rem;
}

#book-appointment {
  color: var(--accent-premium);
  border: var(--logo-primary) solid 2px;
  padding: 0.4rem 0.75rem;
  border-radius: 0.8rem;
  font-size: 1.5rem;
}

#book-appointment:hover {
  color: var(--logo-primary);
}

header {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding-top: 2rem;
  padding-bottom: 4rem;
  gap: 2rem;
  font-size: 1.5rem;
  color: var(--accent-calm);
}

nav a:hover,
nav button:hover,
nav.sticky-nav a:hover {
  color: var(--accent-calm);
}

.home-button img:hover {
  opacity: 50%;
}
.logo-header {
  width: 70vw;
  height: auto;
  min-width: 360px;
  max-width: 900px;
}
header h2,
main h2 {
  font-size: 1.5rem;
  font-weight: 400;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.2rem;
  text-decoration: none;
}

main h2 {
  font-weight: 600;
  padding: 1rem;
  border: var(--color-highlight) solid 2px;
  border-radius: 24px;
  align-self: center;
  justify-self: center;
}
main,
.staff {
  display: flex;
  justify-content: center;
  flex-direction: column;
  gap: 4rem;
  align-items: center;
}

main h4 {
  font-size: 1.2rem;
  font-weight: 800;
  text-align: center;
  letter-spacing: 0.2rem;
  color: var(--body-text);
  text-transform: uppercase;
}

main a {
  text-decoration: none;
  color: inherit;
  transition-duration: 200ms;
}

main a:hover {
  color: var(--color-highlight);
}

.anchor-text {
  color: var(--accent-calm);
  text-decoration: none;
  font-weight: 550;
  transition-duration: 200ms;
}

.branches {
  display: flex;
  flex-direction: column;
  margin-top: 0rem;
  gap: 4rem;
  justify-content: center;
  flex-wrap: wrap;
  text-align: center;
}

.branches a {
  font-size: 1.2rem;
  font-weight: 650;
  color: var(--accent-calm);
  text-decoration: none;
  transition-duration: 200ms;
  text-transform: uppercase;
}

.branch-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  justify-content: center;
  align-items: center;
  text-wrap: wrap;
  width: 100%;
}

.branch-container iframe {
  border: none;
  border-radius: 8px;
  max-width: 800px;
  width: 100%;
  height: 400px;
}

.appointments-image,
.glazing-image {
  width: 100%;
  align-self: center;
  max-width: 800px;
  height: auto;
  border-radius: 8px;
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.appointments-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  justify-content: center;
  align-items: center;
  text-align: center;
  max-width: 800px;
  width: 100%;
}
.branch-image {
  width: 100%;
  align-self: center;
  max-width: 800px;
  height: auto;
  border-radius: 8px;
  margin-top: 2rem;
  margin-bottom: 2rem;
  border-radius: 24px;
  border: var(--color-highlight) solid 2px;
}
#optometrists .staff-image,
#dispensing-opticians .staff-image,
.staff-image {
  width: 100%;
  align-self: center;
  max-width: 400px;
  height: auto;
  border-radius: 8px;
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.plan-benefits {
  color: var(--accent-calm);
  margin-right: 0.5rem;
}
.eyecare-plan,
.glazing-info {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  justify-content: left;
  align-items: center;
  width: 100%;
}

.eyecare-plan p,
.glazing-info p {
  text-align: justify;
  max-width: 800px;
  width: 100%;
  font-size: 1.2rem;
}
footer {
  display: flex;
  justify-content: center;
  align-items: center;
}

footer nav {
  text-align: center;
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  margin-top: 4rem;
  gap: 2rem;
  padding: 2rem;
  color: var(--logo-primary);
  text-decoration: none;
  max-width: 1000px;
  width: 100%;
}

footer a {
  text-decoration: none;
  color: inherit;
  font-weight: 600;
  transition-duration: 200ms;
}

footer a:hover {
  color: var(--color-accent);
  text-decoration: underline;
}

@media screen and (min-width: 768px) {
  body {
    padding: 4rem;
  }
}
