:root {
  --ink: #172633;
  --ink-soft: #405261;
  --navy: #060631;
  --green: #215f37;
  --green-dark: #173f28;
  --timber: #c8944d;
  --paper: #ffffff;
  --paper-warm: #f6f3ee;
  --line: #e3ded5;
  --shadow: 0 18px 48px rgba(23, 38, 51, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.55;
}

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

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--navy);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.header-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 112px;
  padding: 10px 0;
}

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

.brand-logo {
  width: 190px;
  height: 112px;
  object-fit: contain;
  object-position: center;
  background: var(--navy);
}

.brand-copy {
  display: grid;
  gap: 1px;
}

.brand-name {
  color: var(--ink);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.1;
}

.brand-subtitle {
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
}

.header-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.social-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.social-link {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  color: var(--paper);
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 999px;
  text-decoration: none;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease;
}

.social-link:hover {
  transform: translateY(-1px);
  color: var(--navy);
  background: var(--paper);
}

.social-link-muted {
  opacity: 0.72;
}

.social-link svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.primary-nav a {
  padding: 8px 11px;
  color: var(--paper);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  border-radius: 8px;
}

.primary-nav a:hover,
.primary-nav a:focus-visible {
  color: var(--paper);
  background: rgba(255, 255, 255, 0.12);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--paper);
}

.hero {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 650px;
  padding: 86px 18px 96px;
  color: var(--paper);
  text-align: center;
  background-image: linear-gradient(rgba(9, 17, 24, 0.38), rgba(9, 17, 24, 0.48)), url("assets/images/hero-carpentry-joinery.jpg");
  background-position: center;
  background-size: cover;
}

.hero-content {
  width: min(760px, 100%);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--timber);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-size: 56px;
  line-height: 1.05;
}

.hero p:not(.eyebrow) {
  margin: 18px auto 0;
  max-width: 660px;
  font-size: 19px;
}

.hero-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 13px 22px;
  color: var(--paper);
  font-weight: 800;
  text-decoration: none;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  background: var(--green);
}

.button-primary:hover {
  background: var(--green-dark);
}

.button-secondary {
  color: var(--paper);
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.42);
}

.button-secondary-dark {
  color: var(--green);
  background: var(--paper);
  box-shadow: inset 0 0 0 1px rgba(33, 95, 55, 0.24);
}

.section {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 76px 0;
}

.section-muted {
  width: 100%;
  max-width: none;
  padding: 76px 0;
  background: var(--paper-warm);
}

.section-muted > * {
  width: min(1180px, calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
}

.intro-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  padding: 34px 0;
}

.intro-item {
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.intro-item span {
  display: block;
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.intro-item strong {
  display: block;
  margin-top: 5px;
  font-size: 17px;
}

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

.section-heading h2,
.about-copy h2 {
  margin: 0;
  font-size: 36px;
  line-height: 1.16;
}

.section-heading p:not(.eyebrow),
.about-copy p:not(.eyebrow) {
  margin: 12px 0 0;
  color: var(--ink-soft);
  font-size: 17px;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.service-card {
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.service-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.service-content {
  padding: 22px;
}

.service-content h3 {
  margin: 0 0 12px;
  font-size: 22px;
}

.service-content ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 19px;
  color: var(--ink-soft);
}

.service-card-wide {
  grid-column: span 3;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.service-card-wide img {
  height: 100%;
  aspect-ratio: auto;
}

.portfolio-window {
  overflow: hidden;
  border-radius: 8px;
}

.portfolio-track {
  display: flex;
  gap: 18px;
  width: max-content;
  animation: portfolio-scroll 26s linear infinite;
  animation-play-state: paused;
}

.portfolio-window.is-active .portfolio-track {
  animation-play-state: running;
}

.portfolio-slide {
  display: grid;
  place-items: center;
  flex: 0 0 360px;
  height: 230px;
  color: var(--paper);
  background:
    linear-gradient(rgba(23, 38, 51, 0.2), rgba(23, 38, 51, 0.54)),
    linear-gradient(135deg, #173f28, #c8944d);
  border-radius: 8px;
}

.portfolio-slide span {
  font-size: 22px;
  font-weight: 800;
}

@keyframes portfolio-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(calc(-50% - 9px));
  }
}

.about-section {
  display: grid;
  grid-template-columns: 0.75fr 1fr;
  gap: 54px;
  align-items: center;
}

.about-section::before {
  content: "";
  display: block;
  min-height: 360px;
  background-image: url("assets/images/service-interior-carpentry.jpg");
  background-position: center;
  background-size: cover;
  border-radius: 8px;
}

.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 24px;
  align-items: start;
}

.contact-details,
.contact-form {
  padding: 26px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.contact-details h3 {
  margin: 0 0 14px;
  font-size: 24px;
}

.contact-details a,
.contact-details address {
  display: block;
  margin-top: 10px;
  color: var(--ink-soft);
  font-style: normal;
  text-decoration: none;
}

.contact-details a:hover {
  color: var(--green);
}

.map-box {
  overflow: hidden;
  height: 290px;
  margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.map-box iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

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

.contact-form label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-weight: 800;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  min-height: 46px;
  padding: 12px 13px;
  color: var(--ink);
  font: inherit;
  background: #fbfaf7;
  border: 1px solid #d8d2c8;
  border-radius: 8px;
}

.contact-form textarea {
  resize: vertical;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: 3px solid rgba(33, 95, 55, 0.18);
  border-color: var(--green);
}

.hidden-field {
  position: absolute;
  left: -9999px;
}

.site-footer {
  padding: 28px 16px;
  color: var(--paper);
  text-align: center;
  background: var(--ink);
}

.site-footer p {
  margin: 0;
}

.thank-you-section {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 154px);
  padding: 76px 16px;
  background:
    linear-gradient(rgba(246, 243, 238, 0.88), rgba(246, 243, 238, 0.92)),
    url("assets/images/hero-carpentry-joinery.jpg");
  background-position: center;
  background-size: cover;
}

.thank-you-panel {
  width: min(760px, 100%);
  padding: 42px;
  text-align: center;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.thank-you-panel h1 {
  margin: 0;
  font-size: 42px;
  line-height: 1.12;
}

.thank-you-panel p:not(.eyebrow) {
  margin: 16px auto 0;
  max-width: 590px;
  color: var(--ink-soft);
  font-size: 18px;
}

@media (max-width: 980px) {
  .header-shell {
    min-height: 98px;
  }

  .menu-toggle {
    display: block;
  }

  .primary-nav {
    position: absolute;
    top: 98px;
    right: 16px;
    left: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    background: var(--navy);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    box-shadow: var(--shadow);
  }

  .primary-nav.is-open {
    display: flex;
  }

  .primary-nav a {
    padding: 12px;
  }

  .hero {
    min-height: 580px;
  }

  .hero h1 {
    font-size: 42px;
  }

  .intro-strip,
  .services-grid,
  .about-section,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .service-card-wide {
    grid-column: auto;
    grid-template-columns: 1fr;
  }

  .service-card-wide img {
    aspect-ratio: 16 / 10;
  }
}

@media (max-width: 640px) {
  .header-shell {
    width: min(100% - 24px, 1180px);
    gap: 10px;
  }

  .brand-logo {
    width: 136px;
    height: 80px;
  }

  .brand-name {
    font-size: 15px;
  }

  .brand-subtitle {
    font-size: 12px;
  }

  .social-links {
    gap: 6px;
  }

  .social-link {
    width: 24px;
    height: 24px;
  }

  .hero {
    min-height: 520px;
    padding: 68px 18px 78px;
  }

  .hero h1 {
    font-size: 34px;
  }

  .hero p:not(.eyebrow) {
    font-size: 17px;
  }

  .hero-buttons {
    align-items: stretch;
    flex-direction: column;
  }

  .section,
  .section-muted {
    padding: 56px 0;
  }

  .section-heading h2,
  .about-copy h2 {
    font-size: 30px;
  }

  .service-content,
  .contact-details,
  .contact-form {
    padding: 20px;
  }

  .portfolio-slide {
    flex-basis: 280px;
    height: 190px;
  }

  .thank-you-panel {
    padding: 28px 20px;
  }

  .thank-you-panel h1 {
    font-size: 32px;
  }
}
