:root {
  color-scheme: light;
  --ivory: #f8f5ee;
  --linen: #f0ebe0;
  --navy: #142638;
  --navy-deep: #101e2d;
  --gold: #c6a36a;
  --gold-light: #ddbd83;
  --gold-dark: #80602e;
  --slate: #4b5157;
  --border: #ded5c5;
  --focus: var(--gold-dark);
  --content-width: 72rem;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --wordmark-width: clamp(10rem, 22vw, 13rem);
  --nav-link-height: 2.75rem;
  --header-row-gap: 0.5rem;
  --header-padding-start: 1.125rem;
  --header-padding-end: 0.75rem;
  --header-border: 1px;
  /* Stacked header: SVG aspect ratio, row gap, link height, padding, and border. */
  --header-height: calc(var(--wordmark-width) * 65 / 240 + var(--header-row-gap)
    + var(--nav-link-height) + var(--header-padding-start) + var(--header-padding-end)
    + var(--header-border));
  --section-space: clamp(3.5rem, 8vw, 7rem);
  --font-display: Georgia, "Times New Roman", serif;
  --font-body: Arial, Helvetica, sans-serif;
}

html {
  scroll-padding-block-start: calc(var(--header-height) + 0.75rem);
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--ivory);
  color: var(--navy);
  font: 1rem/1.65 var(--font-body);
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-underline-offset: 0.25em;
}

a:focus-visible {
  outline: 0.1875rem solid var(--focus);
  outline-offset: 0.25rem;
}

.skip-link {
  position: fixed;
  inset-block-start: 1rem;
  inset-inline-start: 1rem;
  z-index: 2;
  padding: 0.75rem 1rem;
  transform: translateY(-200%);
  background: var(--ivory);
  color: var(--navy);
}

.skip-link:focus {
  transform: translateY(0);
}

.layout {
  width: min(100% - 2 * var(--gutter), var(--content-width));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  inset-block-start: 0;
  z-index: 1;
  border-bottom: var(--header-border) solid var(--border);
  background: var(--ivory);
}

.header-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: var(--header-row-gap) 2rem;
  padding-block: var(--header-padding-start) var(--header-padding-end);
}

.wordmark {
  display: inline-block;
  width: var(--wordmark-width);
}

.wordmark img {
  height: auto;
}

.site-header nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 clamp(0.75rem, 4vw, 2.75rem);
}

.site-header nav a {
  display: inline-flex;
  align-items: center;
  min-height: var(--nav-link-height);
  font-size: 0.8125rem;
  letter-spacing: 0.12em;
  text-decoration: none;
  text-transform: uppercase;
}

.site-header nav a:hover {
  color: var(--gold-dark);
  text-decoration: underline;
}

.hero,
.standard-section {
  --focus: var(--gold-light);
  background-color: var(--navy);
  color: var(--ivory);
}

.hero {
  display: grid;
  align-items: center;
  background-image:
    linear-gradient(to bottom,
      transparent 5rem,
      rgb(16 30 45 / 22%) 9rem,
      rgb(16 30 45 / 89%) 15rem,
      var(--navy) 22rem),
    url("../images/hero-residence-mobile.webp");
  background-position: center, 70% -2.5rem;
  background-size: 100% 100%, max(100%, 35.4rem) auto;
  background-repeat: no-repeat;
}

.hero-content {
  /* Keep the illuminated entrance visible above the mobile text. */
  padding-block: 15rem 3.25rem;
}

.eyebrow {
  margin: 0 0 1.25rem;
  color: var(--gold-light);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.12;
  text-wrap: balance;
}

h1 {
  font-size: clamp(1.75rem, 8.8vw, 4.875rem);
}

h1 span {
  display: block;
}

h2 {
  font-size: clamp(2.125rem, 4.6vw, 3.5rem);
}

h2::after {
  display: block;
  width: 2.75rem;
  margin: 1.25rem auto 0;
  border-top: 1px solid var(--gold-dark);
  content: "";
}

.hero-summary {
  max-width: 36rem;
  margin: 1.5rem 0 0;
  font-size: clamp(1rem, 2vw, 1.1875rem);
}

.service-area {
  margin: 0.875rem 0 0;
  font-style: italic;
}

.contact-link {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 0.875rem 1.5rem;
  background: var(--gold);
  color: var(--navy-deep);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-decoration: none;
  text-transform: uppercase;
}

.contact-link:hover {
  background: var(--gold-light);
  text-decoration: underline;
}

.content-section {
  padding-block: var(--section-space);
}

.about-section,
.contact-section {
  text-align: center;
}

.about-section p,
.contact-section p {
  max-width: 42rem;
  margin: 1rem auto 0;
  color: var(--slate);
}

.about-section h2 + p,
.contact-section h2 + p {
  margin-top: 1.5rem;
}

.services-section {
  border-top: 1px solid var(--border);
  background-color: var(--linen);
  text-align: center;
}

.service-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(0.875rem, 2vw, 1.5rem);
  margin: clamp(1.75rem, 4vw, 3rem) 0 0;
  padding: 0;
  list-style: none;
}

.service-list li {
  display: grid;
  align-content: start;
  justify-items: center;
  padding: clamp(1.5rem, 3vw, 2.5rem) clamp(1rem, 2.5vw, 2rem);
  border: 1px solid var(--border);
  background-color: var(--ivory);
}

.service-icon {
  margin-bottom: 0.875rem;
}

.service-list h3 {
  font-size: clamp(1.25rem, 2.1vw, 1.625rem);
}

.service-list p {
  max-width: 28ch;
  margin: 0.625rem 0 0;
  color: var(--slate);
}

.standard-section {
  padding-block: clamp(2.75rem, 6vw, 4.5rem);
  text-align: center;
}

.standard-section h2::after {
  border-color: var(--gold-light);
}

.standard-intro {
  max-width: 38rem;
  margin: 1rem auto 0;
  font-size: clamp(1.0625rem, 2vw, 1.1875rem);
  text-wrap: balance;
}

.standard-list {
  display: grid;
  gap: 1rem;
  max-width: 34rem;
  margin: 1.75rem auto 0;
  padding: 0;
  list-style: none;
  text-align: start;
}

.standard-list li {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  column-gap: 0.875rem;
  row-gap: 0.375rem;
  align-items: start;
  padding-top: 1rem;
  border-top: 1px solid rgb(221 189 131 / 35%);
}

.standard-list img {
  grid-row: span 2;
}

.standard-list h3 {
  font-size: clamp(1.25rem, 1.55vw, 1.375rem);
}

.standard-list p {
  margin: 0;
  line-height: 1.55;
}

@media (min-width: 42rem) {
  .standard-list {
    gap: 1.75rem 1.25rem;
    max-width: none;
    margin-top: 2.25rem;
    text-align: center;
  }

  .standard-list li {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.625rem;
    padding-top: 0;
    border: 0;
  }

  .standard-list p {
    max-width: 27ch;
  }
}

@media (42rem <= width < 58rem) {
  .standard-list {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .standard-list li {
    grid-column: span 2;
  }

  .standard-list li:nth-child(4) {
    grid-column: 2 / span 2;
  }
}

.email-link {
  overflow-wrap: anywhere;
}

.email-link:hover {
  color: var(--gold-dark);
}

.site-footer {
  padding-block: 1.75rem;
  border-top: 1px solid var(--border);
  background: var(--linen);
  color: var(--slate);
  font-size: 0.875rem;
  text-align: center;
}

.site-footer p {
  margin: 0;
}

@media (min-width: 42rem) {
  :root {
    --header-padding-start: 1rem;
    --header-padding-end: 1rem;
    --header-height: calc(6rem + var(--header-border));
  }

  .header-layout {
    min-height: calc(var(--header-height) - var(--header-border));
    flex-direction: row;
  }

  .hero {
    min-height: 36rem;
    background-image:
      linear-gradient(90deg,
        rgb(16 30 45 / 94%) 0%,
        rgb(16 30 45 / 84%) 38%,
        rgb(16 30 45 / 66%) 60%,
        rgb(16 30 45 / 24%) 83%,
        rgb(16 30 45 / 8%) 100%),
      url("../images/hero-residence.webp");
    background-position: center, 30% 48%;
    background-size: 100% 100%, cover;
  }

  .hero-content {
    padding-block: clamp(4.5rem, 10vw, 9rem);
  }

  .hero-summary {
    max-width: min(36rem, 51vw);
  }

  h1 {
    font-size: clamp(3rem, 6.2vw, 4.875rem);
  }

  .service-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 58rem) {
  .hero {
    background-image:
      linear-gradient(90deg,
        rgb(16 30 45 / 95%) 0%,
        rgb(16 30 45 / 84%) 30%,
        rgb(16 30 45 / 70%) 47%,
        rgb(16 30 45 / 46%) 62%,
        rgb(16 30 45 / 12%) 77%,
        transparent 100%),
      url("../images/hero-residence.webp");
    background-position: center, left 48%;
    background-size: 100% 100%, max(100% + 6rem, 36rem * 1590 / 989) auto;
  }

  .service-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .standard-list {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}
