:root {
  --color-accent: #f2675c;
  --color-accent-dark: #dc564d;
  --color-text: #222222;
  --color-muted: #5e5e5e;
  --color-soft: #f4f1f0;
  --color-white: #ffffff;
  --shadow-card: 0 14px 30px rgb(0 0 0 / 18%);
  --font-primary: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --font-secondary: "Lato", Arial, sans-serif;
  --container: 1120px;
  --container-narrow: 1040px;
  --section-space: clamp(3.5rem, 5.5vw, 5.25rem);
  --content-space: clamp(1.75rem, 3vw, 3rem);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-primary);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.55;
  color: var(--color-text);
  background: var(--color-white);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img,
picture,
svg {
  display: block;
}

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

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

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

p,
h1,
h2,
h3,
blockquote {
  margin: 0;
}

.container {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
}

.container-narrow {
  width: min(100% - 2rem, var(--container-narrow));
}

.skip-link {
  position: absolute;
  z-index: 99;
  top: 0.75rem;
  left: 0.75rem;
  transform: translateY(-150%);
  padding: 0.75rem 1rem;
  color: var(--color-white);
  background: var(--color-accent);
  border-radius: 0.35rem;
  transition: transform 180ms ease;
}

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

.site-header {
  --header-height: 140px;
  --brand-width: min(230px, 45vw);
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--color-white);
  transition: box-shadow 220ms ease, background-color 220ms ease;
}

.header-inner {
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  transition: min-height 220ms ease;
}

.brand {
  display: inline-flex;
  align-items: center;
  width: var(--brand-width);
  transition: width 220ms ease;
}

.brand img {
  width: 100%;
  height: auto;
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: clamp(1.75rem, 3vw, 3.25rem);
}

.site-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--font-secondary);
  font-size: 0.78rem;
  letter-spacing: 0.01em;
  color: #3f3f3f;
  transition: color 180ms ease;
}

.site-header.is-compact {
  --header-height: 70px;
  --brand-width: min(116px, 26vw);
  box-shadow: 0 10px 30px rgb(0 0 0 / 10%);
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a.is-active {
  color: var(--color-accent);
}

.site-nav a:focus-visible,
.nav-toggle:focus-visible,
.email-link:focus-visible {
  outline: 3px solid rgb(242 103 92 / 35%);
  outline-offset: 4px;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  margin: 6px auto;
  background: var(--color-text);
  transition: transform 180ms ease, opacity 180ms ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.hero {
  min-height: clamp(420px, 45vw, 650px);
  display: grid;
  place-items: center;
  color: var(--color-white);
  background-image:
    linear-gradient(rgb(0 0 0 / 18%), rgb(0 0 0 / 18%)),
    image-set(
      url("../images/hero-bg.webp") type("image/webp"),
      url("../images/hero-bg.png") type("image/png")
    );
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}

.hero-content {
  text-align: center;
}

.hero h1 {
  display: grid;
  gap: 0.15rem;
  font-size: clamp(2.4rem, 6vw, 5.6rem);
  font-weight: 200;
  line-height: 1.05;
  letter-spacing: 0.075em;
}

.hero h1 span:first-child {
  color: var(--color-accent);
}

.hero h1 span:last-child {
  color: #eeeeee;
  font-weight: 100;
}

.section {
  padding-block: var(--section-space);
}

#home,
#services,
#about,
#contact {
  scroll-margin-top: 148px;
}

#about {
  scroll-margin-top: 164px;
}

.section-title {
  width: fit-content;
  margin-inline: auto;
  color: var(--color-accent);
  font-size: clamp(1.75rem, 2.7vw, 2.25rem);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: 0.02em;
  text-transform: lowercase;
  text-align: center;
}

.section-title::after {
  content: "";
  display: block;
  width: 64px;
  height: 2px;
  margin: 0.55rem auto 0;
  background: #333333;
}

.section-title-plain::after {
  display: none;
}

.section-intro {
  max-width: 690px;
  margin: 1.8rem auto 0;
  font-size: 0.98rem;
  line-height: 1.45;
  text-align: center;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4rem clamp(3rem, 8vw, 6.5rem);
  margin-top: var(--content-space);
}

.service-card h3 {
  margin-bottom: 0.25rem;
  color: var(--color-accent);
  font-size: 1.18rem;
  font-weight: 600;
  line-height: 1.25;
}

.service-card p,
.service-card li {
  font-size: 0.94rem;
  line-height: 1.45;
}

.service-card ul {
  margin-top: 0.8rem;
}

.service-card li + li {
  margin-top: 0.28rem;
}

.service-card strong {
  font-weight: 700;
}

.about-section {
  padding-top: 0;
}

.about-copy {
  max-width: 980px;
  margin: 2rem auto 0;
  font-size: 0.96rem;
  line-height: 1.55;
  text-align: center;
}

.expertise {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 365px;
}

.expertise-flipped {
  grid-template-columns: 1fr 1fr;
}

.expertise-flipped > .expertise-panel {
  order: 2;
}

.expertise-flipped > .expertise-media {
  order: 1;
}

.expertise-panel {
  display: grid;
  place-items: center;
  padding: clamp(2rem, 6vw, 5rem);
  color: var(--color-white);
  background: var(--color-accent);
}

.expertise-copy {
  width: min(100%, 500px);
}

.expertise h2 {
  margin-bottom: 1.2rem;
  font-size: clamp(1.35rem, 2.4vw, 1.9rem);
  font-weight: 300;
  letter-spacing: 0.02em;
}

.expertise blockquote {
  font-size: clamp(1rem, 2vw, 1.38rem);
  font-weight: 200;
  line-height: 1.45;
  letter-spacing: 0.03em;
}

.expertise-media,
.expertise-media img,
.contact-image,
.contact-image img {
  width: 100%;
  height: 100%;
}

.expertise-media img,
.contact-image img {
  object-fit: cover;
}

.contact-section {
  padding-bottom: 0;
}

.contact-section-flipped .contact-band {
  grid-template-columns: 1fr 1fr;
}

.contact-section-flipped .contact-image {
  order: 2;
}

.contact-section-flipped .contact-card {
  order: 1;
}

.contact-heading {
  margin-bottom: 3rem;
}

.contact-band {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 380px;
  background: var(--color-soft);
}

.contact-image {
  min-height: 360px;
}

.contact-card {
  align-self: center;
  justify-self: center;
  width: min(86%, 540px);
  min-height: 300px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 1.25rem;
  padding: clamp(2rem, 4vw, 3.2rem);
  text-align: center;
  background: var(--color-white);
  border-radius: 12px;
  box-shadow: var(--shadow-card);
}

.contact-lead {
  font-size: clamp(1.45rem, 2.6vw, 2.1rem);
  font-weight: 300;
  line-height: 1.35;
  letter-spacing: 0.035em;
}

.contact-card address {
  display: grid;
  justify-items: center;
  gap: 0.25rem;
  font-style: normal;
  color: var(--color-muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.email-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-muted);
  transition: color 180ms ease;
}

.email-link svg {
  fill: var(--color-accent);
}

.email-link:hover {
  color: var(--color-accent-dark);
}

.card-logo {
  width: 130px;
  height: auto;
}

.site-footer {
  padding: 1rem;
  color: var(--color-white);
  background: var(--color-accent);
  text-align: center;
}

.site-footer p {
  font-size: 0.82rem;
  letter-spacing: 0.01em;
}

.scroll-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 999;
  width: 48px;
  height: 48px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--color-accent);
  color: var(--color-white);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgb(0 0 0 / 15%);
  transition: all 0.3s ease;
  opacity: 0;
  pointer-events: none;
}

.scroll-to-top:hover {
  background: var(--color-accent-dark);
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgb(0 0 0 / 25%);
}

.scroll-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
}

/* Content entrance animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section .section-title,
.section .section-intro,
.section .about-copy,
.section .service-card,
.section .contact-image,
.section .contact-card,
.section .contact-card address,
.section .card-logo,
.expertise .expertise-copy h2,
.expertise .expertise-copy blockquote,
.expertise .expertise-media {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

.section.reveal .section-title,
.section.reveal .section-intro,
.section.reveal .about-copy,
.section.reveal .service-card,
.section.reveal .contact-image,
.section.reveal .contact-card,
.section.reveal .contact-card address,
.section.reveal .card-logo,
.expertise.reveal .expertise-copy h2,
.expertise.reveal .expertise-copy blockquote,
.expertise.reveal .expertise-media {
  opacity: 1;
  transform: translateY(0);
}

.section.reveal .section-title,
.expertise.reveal .expertise-copy h2 {
  transition-delay: 80ms;
}

.section.reveal .section-intro,
.section.reveal .about-copy,
.expertise.reveal .expertise-copy blockquote,
.section.reveal .contact-image {
  transition-delay: 170ms;
}

.section.reveal .service-card:nth-child(1),
.section.reveal .contact-card,
.expertise.reveal .expertise-media {
  transition-delay: 240ms;
}

.section.reveal .service-card:nth-child(2),
.section.reveal .card-logo {
  transition-delay: 320ms;
}

@media (max-width: 900px) {
  #home,
  #services,
  #about,
  #contact {
    scroll-margin-top: 116px;
  }

  #about {
    scroll-margin-top: 126px;
  }

  .site-header {
    --header-height: 112px;
    --brand-width: 200px;
  }

  .site-header.is-compact {
    --header-height: 56px;
    --brand-width: 100px;
  }

  .header-inner {
    min-height: var(--header-height);
  }

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

  .site-nav {
    position: absolute;
    z-index: 10;
    top: var(--header-height);
    right: 1rem;
    left: 1rem;
    display: none;
    padding: 1rem;
    background: var(--color-white);
    border: 1px solid rgb(0 0 0 / 8%);
    box-shadow: 0 16px 40px rgb(0 0 0 / 12%);
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
  }

  .site-nav a {
    min-height: 48px;
    padding-inline: 0.5rem;
    font-size: 0.9rem;
  }

  .services-grid,
  .expertise,
  .contact-band {
    grid-template-columns: 1fr;
  }

  .expertise {
    min-height: auto;
  }

  .expertise-media,
  .contact-image {
    min-height: 320px;
  }

  .contact-band {
    padding-bottom: 3rem;
  }

  .contact-card {
    margin-top: 3rem;
  }
}

@media (max-width: 560px) {
  .container,
  .container-narrow {
    width: min(100% - 1.4rem, var(--container));
  }

  .brand {
    width: var(--brand-width);
  }

  .site-header {
    --brand-width: 180px;
  }

  .site-header.is-compact {
    --brand-width: 92px;
  }

  .hero {
    min-height: 360px;
  }

  .hero h1 {
    letter-spacing: 0.035em;
  }

  .services-grid {
    gap: 2.5rem;
  }

  .contact-card {
    width: min(92%, 540px);
    min-height: 260px;
  }
}

@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;
  }

  .section .section-title,
  .section .section-intro,
  .section .about-copy,
  .section .service-card,
  .section .contact-image,
  .section .contact-card,
  .section .contact-card address,
  .section .card-logo,
  .expertise .expertise-copy h2,
  .expertise .expertise-copy blockquote,
  .expertise .expertise-media {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
