* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--color-paper);
  color: var(--color-ink);
  font-family: var(--font-sans);
  line-height: 1.6;
}

body.nav-open {
  overflow: hidden;
}

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

a {
  color: inherit;
}

a:hover {
  color: var(--color-blue);
}

:focus-visible {
  outline: 3px solid rgba(213, 166, 66, 0.75);
  outline-offset: 4px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  color: var(--color-ink);
  line-height: 1.08;
}

h1 {
  font-size: clamp(2.55rem, 7vw, 5.6rem);
  margin-bottom: 20px;
  max-width: 11ch;
}

h2 {
  font-size: clamp(1.9rem, 4vw, 3.25rem);
  margin-bottom: 18px;
}

h3 {
  font-size: 1.22rem;
  margin-bottom: 10px;
}

p {
  margin-bottom: 16px;
}

ul {
  margin: 0;
  padding-left: 1.2rem;
}

li + li {
  margin-top: 8px;
}

input,
select,
textarea,
button {
  font: inherit;
}

input,
select,
textarea {
  border: 1px solid var(--color-line);
  border-radius: 6px;
  color: var(--color-ink);
  min-height: 48px;
  padding: 10px 12px;
  width: 100%;
}

textarea {
  resize: vertical;
}

label {
  color: var(--color-blue-dark);
  font-weight: 800;
}

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

.skip-link {
  background: var(--color-blue-dark);
  color: var(--color-white);
  font-weight: 800;
  left: 16px;
  padding: 10px 14px;
  position: fixed;
  top: 12px;
  transform: translateY(-140%);
  z-index: 100;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  align-items: center;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--color-line);
  display: flex;
  gap: 20px;
  justify-content: space-between;
  min-height: 74px;
  padding: 12px clamp(18px, 5vw, 56px);
  position: sticky;
  top: 0;
  z-index: 30;
}

.brand {
  align-items: center;
  display: inline-flex;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  align-items: center;
  background: var(--color-blue);
  border-radius: 50%;
  color: var(--color-white);
  display: inline-flex;
  font-weight: 900;
  height: 44px;
  justify-content: center;
  width: 44px;
}

.brand-text strong,
.brand-text small {
  display: block;
}

.brand-text strong {
  color: var(--color-ink);
  line-height: 1.1;
}

.brand-text small {
  color: var(--color-red-dark);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.site-nav {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: clamp(12px, 2.5vw, 28px);
  justify-content: flex-end;
}

.site-nav a {
  color: var(--color-muted);
  font-size: 0.95rem;
  font-weight: 800;
  text-decoration: none;
}

.site-nav a[aria-current="page"],
.site-nav a:hover {
  color: var(--color-blue-dark);
}

.nav-toggle {
  background: var(--color-white);
  border: 1px solid var(--color-line);
  border-radius: 6px;
  color: var(--color-blue-dark);
  display: none;
  height: 44px;
  padding: 0;
  width: 44px;
}

.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  background: currentColor;
  display: block;
  height: 2px;
  margin: auto;
  position: relative;
  width: 20px;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
}

.nav-toggle-bars::before {
  top: -6px;
}

.nav-toggle-bars::after {
  top: 6px;
}

.container {
  margin: 0 auto;
  max-width: var(--container);
  width: min(calc(100% - 36px), var(--container));
}

.narrow {
  max-width: 820px;
}

.section {
  padding: clamp(58px, 8vw, 104px) 0;
}

.section-light {
  background: var(--color-white);
}

.section-blue {
  background: var(--color-blue-dark);
  color: rgba(255, 255, 255, 0.86);
}

.section-blue h1,
.section-blue h2,
.section-blue h3 {
  color: var(--color-white);
}

.section-heading {
  max-width: 760px;
}

.eyebrow {
  color: var(--color-red-dark);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  margin-bottom: 14px;
  text-transform: uppercase;
}

.section-blue .eyebrow,
.hero .eyebrow {
  color: #f1c66e;
}

.prose {
  color: var(--color-muted);
  font-size: 1.08rem;
}

.split,
.feature,
.contact-layout {
  align-items: center;
  display: grid;
  gap: clamp(28px, 7vw, 76px);
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.9fr);
}

.feature.reverse {
  grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1fr);
}

.hero {
  min-height: calc(100svh - 74px);
  overflow: hidden;
  position: relative;
}

.hero-photo,
.hero-shade {
  inset: 0;
  position: absolute;
}

.hero-photo {
  background:
    url("/assets/images/hero/welcome-to-mason-hero.jpg") center / cover no-repeat,
    linear-gradient(135deg, #d6b37b, #315c86);
}

.hero-shade {
  background:
    linear-gradient(90deg, rgba(19, 52, 95, 0.9), rgba(19, 52, 95, 0.58) 48%, rgba(19, 52, 95, 0.08) 82%),
    linear-gradient(0deg, rgba(27, 36, 48, 0.28), rgba(27, 36, 48, 0.08));
}

.hero-content {
  color: var(--color-white);
  margin: 0 auto;
  max-width: var(--container);
  padding: clamp(86px, 15vw, 160px) 0 clamp(58px, 10vw, 96px);
  position: relative;
  width: min(calc(100% - 36px), var(--container));
  z-index: 1;
}

.hero-content h1,
.hero-content h2 {
  color: var(--color-white);
}

.hero-lede,
.page-lede {
  font-size: clamp(1.14rem, 2vw, 1.45rem);
  max-width: 680px;
}

.hero-lede {
  color: rgba(255, 255, 255, 0.9);
  max-width: 720px;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  align-items: center;
  border: 2px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  font-weight: 900;
  justify-content: center;
  min-height: 48px;
  padding: 11px 18px;
  text-decoration: none;
}

.button-primary {
  background: var(--color-red);
  color: var(--color-white);
}

.button-primary:hover {
  background: var(--color-red-dark);
  color: var(--color-white);
}

.button-secondary {
  border-color: rgba(255, 255, 255, 0.78);
  color: var(--color-white);
}

.button-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--color-white);
}

.card-grid {
  display: grid;
  gap: 18px;
  margin-top: 34px;
}

.card-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card-grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.priority-preview {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.card {
  background: var(--color-white);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: clamp(22px, 3vw, 30px);
}

.card p {
  color: var(--color-muted);
  margin-bottom: 0;
}

.priority-card {
  border-top: 5px solid var(--color-blue);
}

.photo-frame,
.gallery-grid figure,
.photo-strip figure {
  background: #dfe4e8;
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
}

.photo-frame {
  aspect-ratio: 4 / 3;
  min-height: 260px;
}

.portrait-frame {
  aspect-ratio: 4 / 5;
}

.photo-frame img,
.gallery-grid img,
.photo-strip img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.photo-contain {
  background: #e8edf1;
}

.photo-contain img {
  object-fit: contain;
}

.photo-frame.is-missing img,
.gallery-grid figure.is-missing img,
.photo-strip figure.is-missing img {
  display: none;
}

.photo-frame.is-missing::before,
.gallery-grid figure.is-missing::before,
.photo-strip figure.is-missing::before {
  align-items: center;
  color: var(--color-blue-dark);
  content: attr(data-placeholder);
  display: flex;
  font-weight: 900;
  inset: 0;
  justify-content: center;
  min-height: 220px;
  padding: 24px;
  position: absolute;
  text-align: center;
}

.photo-strip figure.is-missing::before,
.gallery-grid figure.is-missing::before {
  bottom: 48px;
}

.text-link {
  color: var(--color-blue-dark);
  display: inline-flex;
  font-weight: 900;
  margin-top: 8px;
  text-decoration-color: var(--color-gold);
  text-decoration-thickness: 3px;
  text-underline-offset: 5px;
}

.text-link.light {
  color: var(--color-white);
}

.photo-strip {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 32px;
}

figure {
  margin: 0;
}

.photo-strip figure,
.gallery-grid figure {
  display: grid;
  grid-template-rows: 1fr auto;
}

.photo-strip img {
  aspect-ratio: 4 / 3;
}

figcaption {
  background: var(--color-white);
  color: var(--color-blue-dark);
  font-weight: 900;
  padding: 12px 14px;
}

.cta {
  background: var(--color-soft);
}

.cta-inner {
  align-items: center;
  display: flex;
  gap: 24px;
  justify-content: space-between;
}

.cta-inner p {
  color: var(--color-muted);
  max-width: 680px;
}

.page-hero {
  background: var(--color-soft);
  padding: clamp(58px, 9vw, 112px) 0;
}

.page-hero-image {
  background:
    linear-gradient(90deg, rgba(19, 52, 95, 0.92), rgba(19, 52, 95, 0.68)),
    url("/assets/images/hero/welcome-to-mason-hero.jpg") center / cover no-repeat;
  color: rgba(255, 255, 255, 0.88);
}

.page-hero-image h1,
.page-hero-image .page-lede {
  color: var(--color-white);
}

.page-hero .split {
  align-items: center;
}

.priority-list {
  display: grid;
  gap: 20px;
}

.priority-detail {
  background: var(--color-paper);
  border-left: 5px solid var(--color-blue);
  border-radius: var(--radius);
  padding: clamp(22px, 4vw, 34px);
}

.priority-detail h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.priority-detail h3 {
  color: var(--color-red-dark);
  font-size: 1rem;
  margin-top: 20px;
  text-transform: uppercase;
}

.gallery-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 34px;
}

.gallery-grid img {
  aspect-ratio: 16 / 10;
}

.contact-layout {
  align-items: start;
  grid-template-columns: minmax(240px, 0.65fr) minmax(300px, 1fr);
}

.contact-panel,
.contact-form {
  background: var(--color-white);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: clamp(22px, 4vw, 34px);
}

.contact-panel p {
  color: var(--color-muted);
}

.contact-panel a {
  color: var(--color-blue-dark);
  font-weight: 800;
}

.contact-form {
  display: grid;
  gap: 12px;
}

.contact-form button {
  justify-self: start;
  margin-top: 10px;
}

.site-footer {
  background: #111927;
  color: rgba(255, 255, 255, 0.76);
  display: flex;
  gap: 24px;
  justify-content: space-between;
  padding: 30px clamp(18px, 5vw, 56px);
}

.site-footer div,
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
}

.site-footer div {
  flex-direction: column;
  gap: 3px;
}

.site-footer strong,
.site-footer a {
  color: var(--color-white);
}

.site-footer a {
  font-weight: 800;
  text-decoration: none;
}

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

@media (max-width: 980px) {
  .card-grid.four,
  .priority-preview,
  .card-grid.three {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .site-header {
    align-items: center;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    align-content: start;
    background: var(--color-white);
    border-top: 1px solid var(--color-line);
    bottom: 0;
    display: none;
    flex-direction: column;
    gap: 0;
    justify-content: start;
    left: 0;
    padding: 20px;
    position: fixed;
    right: 0;
    top: 74px;
  }

  body.nav-open .site-nav {
    display: flex;
  }

  .site-nav a {
    border-bottom: 1px solid var(--color-line);
    font-size: 1.15rem;
    padding: 15px 0;
    width: 100%;
  }

  .split,
  .feature,
  .feature.reverse,
  .contact-layout,
  .card-grid.four,
  .priority-preview,
  .card-grid.three,
  .photo-strip,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-shade {
    background: linear-gradient(90deg, rgba(19, 52, 95, 0.92), rgba(19, 52, 95, 0.62));
  }

  .cta-inner,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .button,
  .contact-form button {
    width: 100%;
  }
}
