:root {
  --bg: #f5f0e8;
  --bg-alt: #ede6dd;
  --surface: rgba(255, 255, 255, 0.48);
  --text: #1f1a17;
  --muted: #6d6258;
  --line: rgba(31, 26, 23, 0.12);
  --accent: #b89568;
  --accent-deep: #6e5538;
  --shadow: 0 24px 60px rgba(31, 26, 23, 0.08);
  --radius: 24px;
  --max-width: 1200px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(184, 149, 104, 0.25), transparent 28%),
    linear-gradient(180deg, #f7f2eb 0%, #efe7dc 46%, #f9f4ed 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
  background-size: 120px 120px;
  mask-image: radial-gradient(circle at center, black 35%, transparent 85%);
  opacity: 0.25;
}

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

.panel-inner,
.site-footer {
  width: min(calc(100% - 2rem), var(--max-width));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.5rem;
  padding: 1rem 2rem;
  border-bottom: 1px solid rgba(31, 26, 23, 0.08);
  background: #f7f2eb;
  box-shadow: 0 10px 30px rgba(31, 26, 23, 0.05);
}

.logo-mark {
  display: flex;
  align-items: center;
  min-width: 0;
  flex-shrink: 0;
}

.logo-image {
  display: block;
  width: clamp(100px, 22vw, 190px);
  height: auto;
  transform: translateY(-2px);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
  min-width: 0;
}

.nav-link {
  padding: 0.7rem 1rem;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.92rem;
  transition:
    background-color 180ms ease,
    color 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease;
}

.nav-link:hover,
.nav-link:focus-visible {
  background: rgba(31, 26, 23, 0.06);
  color: var(--text);
  transform: translateY(-1px);
}

.nav-link.is-active,
.nav-link[aria-current="true"] {
  color: var(--text);
  background: rgba(31, 26, 23, 0.08);
  box-shadow: inset 0 0 0 1px rgba(31, 26, 23, 0.08);
}

.header-cta {
  min-width: 146px;
  padding: 0 1.5rem;
  white-space: nowrap;
}

main {
  padding: 0 0 4rem;
}

.panel {
  padding: 4rem 0;
  scroll-margin-top: 8rem;
}

.hero-panel {
  position: relative;
  display: flex;
  align-items: center;
  min-height: calc(100svh - 5.5rem);
  padding: clamp(6rem, 10vw, 9rem) 0 clamp(4rem, 7vw, 6rem);
  background:
    linear-gradient(90deg, rgba(18, 15, 12, 0.62) 0%, rgba(18, 15, 12, 0.3) 42%, rgba(18, 15, 12, 0.18) 100%),
    linear-gradient(180deg, rgba(18, 15, 12, 0.18) 0%, rgba(18, 15, 12, 0.38) 100%),
    url("assets/images/services/home-hero-temp.jpg");
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
}

.panel-inner {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(calc(100% - 2rem), var(--max-width));
  margin: 0 auto;
  padding: 0;
}

.content-panel .panel-inner {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}

.content-panel .panel-inner {
  padding: clamp(2rem, 4vw, 4rem);
}

.eyebrow {
  margin: 0 0 1rem;
  color: var(--accent-deep);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  font-family: "Manrope", sans-serif;
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.03em;
}

h1 {
  max-width: 10ch;
  font-size: clamp(3.2rem, 7vw, 5.6rem);
}

h2 {
  max-width: 18ch;
  font-size: clamp(1.65rem, 3.3vw, 2.7rem);
}

.intro,
.content-panel p,
.site-footer p {
  max-width: 62ch;
  color: var(--muted);
  line-height: 1.75;
  font-size: 1rem;
}

.hero-eyebrow {
  font-family: "Manrope", sans-serif;
  color: rgba(255, 248, 240, 0.82);
}

.hero-panel h1 {
  max-width: none;
  font-family: "Manrope", sans-serif;
  font-weight: 500;
  line-height: 1.02;
  color: #fffaf4;
  text-shadow: 0 14px 32px rgba(0, 0, 0, 0.28);
}

.hero-line {
  display: block;
  white-space: nowrap;
}

.hero-intro {
  max-width: 56ch;
  color: rgba(255, 247, 238, 0.82);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

.hero-panel .button-solid {
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background: #f4ece0;
}

.hero-panel .button-outline {
  font-family: "Manrope", sans-serif;
  border-color: rgba(255, 248, 240, 0.34);
  background: rgba(255, 255, 255, 0.12);
  color: #fffaf4;
  backdrop-filter: blur(8px);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 1.3rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.96rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  transition: transform 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
}

.button-solid {
  color: #fff;
  background: var(--text);
}

.button-outline {
  border-color: rgba(31, 26, 23, 0.18);
  background: rgba(255, 255, 255, 0.45);
}

.alt-panel .panel-inner {
  background: rgba(237, 230, 221, 0.82);
}

.service-split {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  width: 100%;
  align-items: center;
}

.service-split-reverse {
  grid-template-columns: minmax(280px, 0.85fr) minmax(0, 1.15fr);
}

.service-copy {
  min-width: 0;
}

.section-rich-copy {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

.section-rich-copy p {
  margin: 0;
}

.section-rich-copy ul {
  display: grid;
  gap: 0.8rem;
  margin: 0;
  padding-left: 1.2rem;
  color: var(--muted);
}

.section-rich-copy li {
  padding-left: 0.2rem;
  line-height: 1.7;
}

.service-media {
  overflow: hidden;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.5);
  box-shadow: 0 18px 48px rgba(31, 26, 23, 0.08);
}

.service-image {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 420px;
  object-fit: cover;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}

.portfolio-card {
  min-width: 0;
}

.portfolio-card-button {
  position: relative;
  display: flex;
  align-items: flex-end;
  width: 100%;
  min-height: 420px;
  padding: 1.35rem;
  border: 1px solid rgba(31, 26, 23, 0.08);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(18, 15, 12, 0.02) 0%, rgba(18, 15, 12, 0.15) 54%, rgba(18, 15, 12, 0.7) 100%),
    var(--portfolio-card-image);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  box-shadow: var(--shadow);
  color: #fffaf4;
  cursor: pointer;
  font: inherit;
  overflow: hidden;
  text-align: left;
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.portfolio-card-button:hover,
.portfolio-card-button:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 28px 70px rgba(31, 26, 23, 0.16);
}

.portfolio-card-copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.55rem;
  width: 100%;
}

.portfolio-card-title {
  margin: 0;
  max-width: 16ch;
  color: #fffaf4;
  font-size: 1.4rem;
  font-weight: 500;
  line-height: 1.08;
}

.portfolio-card .portfolio-card-blurb {
  margin: 0;
  max-width: 34ch;
  color: #fffaf4;
  font-size: 0.98rem;
  line-height: 1.6;
}

.portfolio-actions {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
}

.portfolio-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
}

.portfolio-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 10, 8, 0.62);
  backdrop-filter: blur(10px);
}

.portfolio-modal-dialog {
  position: relative;
  display: grid;
  gap: 2rem;
  width: min(calc(100% - 2rem), 1080px);
  max-height: calc(100svh - 2rem);
  margin: 1rem auto;
  padding: clamp(1.5rem, 3vw, 2.5rem);
  overflow: auto;
  border: 1px solid rgba(31, 26, 23, 0.1);
  border-radius: 28px;
  background: #f7f2eb;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.16);
}

.portfolio-modal-close {
  justify-self: end;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.portfolio-modal-copy {
  display: grid;
  gap: 0.85rem;
}

.portfolio-modal-copy h3 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.03em;
}

.portfolio-modal-blurb {
  margin: 0;
  max-width: 58ch;
  color: var(--muted);
}

.portfolio-modal-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.portfolio-modal-figure {
  margin: 0;
  overflow: hidden;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.45);
}

.portfolio-modal-image {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 260px;
  object-fit: cover;
}

.before-after {
  display: grid;
  gap: 1rem;
}

.before-after-title {
  margin: 0;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.before-after-comparison {
  --comparison-position: 50%;
  position: relative;
  overflow: hidden;
  min-height: 420px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.45);
}

.before-after-image {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 420px;
  object-fit: cover;
}

.before-after-after-layer {
  position: absolute;
  inset: 0;
  clip-path: inset(0 calc(100% - var(--comparison-position)) 0 0);
}

.before-after-after-layer .before-after-image {
  position: absolute;
  inset: 0;
}

.before-after-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--comparison-position);
  width: 2px;
  background: rgba(255, 250, 244, 0.95);
  transform: translateX(-50%);
  box-shadow: 0 0 0 999px rgba(255, 255, 255, 0);
}

.before-after-divider::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fffaf4;
  box-shadow: 0 10px 24px rgba(31, 26, 23, 0.16);
  transform: translate(-50%, -50%);
}

.before-after-label {
  position: absolute;
  top: 1rem;
  z-index: 1;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  background: rgba(18, 15, 12, 0.42);
  color: #fffaf4;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.before-after-label-before {
  left: 1rem;
}

.before-after-label-after {
  right: 1rem;
}

.before-after-slider {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
}

body.modal-open {
  overflow: hidden;
}

.contact-panel .panel-inner {
  align-items: flex-start;
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  width: 100%;
}

.contact-copy h2 {
  max-width: none;
}

.contact-copy p {
  max-width: 42ch;
}

.contact-details {
  display: grid;
  gap: 0.9rem;
  margin-top: 2rem;
}

.contact-details p {
  margin: 0;
  color: var(--text);
}

.contact-details span {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.contact-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  width: 100%;
}

.form-field {
  display: grid;
  gap: 0.55rem;
}

.form-field span {
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 600;
}

.form-field input,
.form-field textarea {
  width: 100%;
  padding: 0.95rem 1rem;
  border: 1px solid rgba(31, 26, 23, 0.14);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--text);
  font: inherit;
  transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.form-field textarea {
  resize: vertical;
  min-height: 160px;
}

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: rgba(31, 26, 23, 0.3);
  box-shadow: 0 0 0 4px rgba(31, 26, 23, 0.06);
  background: rgba(255, 255, 255, 0.88);
}

.form-field-full,
.form-submit {
  grid-column: 1 / -1;
}

.form-status {
  grid-column: 1 / -1;
  min-height: 1.6rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.6;
}

.form-status[data-state="success"] {
  color: #2e5f47;
}

.form-status[data-state="error"] {
  color: #8b3a2a;
}

.form-submit {
  justify-self: start;
  margin-top: 0.5rem;
}

.form-submit:disabled {
  cursor: wait;
  opacity: 0.82;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 0 2rem;
}

.footer-socials {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(31, 26, 23, 0.12);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  color: var(--text);
  transition: transform 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

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

.social-link:hover,
.social-link:focus-visible {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(31, 26, 23, 0.2);
}

.social-link.is-placeholder {
  opacity: 0.72;
}

@media (max-width: 960px) {
  .site-header {
    gap: 1rem;
    padding: 0.9rem 1.25rem;
  }

  .hero-panel {
    min-height: 78svh;
    background-position: center center;
  }

  .portfolio-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .service-split {
    grid-template-columns: 1fr;
  }

  .contact-grid,
  .contact-form {
    grid-template-columns: 1fr;
  }

  .portfolio-modal-gallery {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .site-header {
    align-items: flex-start;
    grid-template-columns: auto auto;
    padding: 1rem;
  }

  .site-nav {
    grid-column: 1 / -1;
    order: 3;
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0.2rem;
    scrollbar-width: none;
  }

  .site-nav::-webkit-scrollbar {
    display: none;
  }

  .site-nav a {
    padding: 0.55rem 0.85rem;
  }

  .logo-image {
    width: min(240px, 62vw);
  }

  .header-cta {
    justify-self: end;
    min-width: auto;
    padding: 0 1.1rem;
  }

  .portfolio-grid {
    grid-template-columns: 1fr;
  }

  .service-image {
    min-height: 280px;
  }

  .portfolio-card-button {
    min-height: 360px;
  }

  .portfolio-card-title {
    font-size: 1.35rem;
  }

  .portfolio-modal-dialog {
    max-height: calc(100svh - 1rem);
    width: min(calc(100% - 1rem), 1080px);
    margin: 0.5rem auto;
    border-radius: 22px;
  }

  .before-after-comparison,
  .before-after-image {
    min-height: 280px;
  }

  .hero-panel {
    min-height: 70svh;
    align-items: center;
    padding-top: 5.5rem;
  }

  .hero-panel h1 {
    font-size: clamp(2.7rem, 12vw, 4.2rem);
  }

  .hero-line {
    white-space: normal;
  }

  .form-submit {
    width: 100%;
    justify-self: stretch;
  }

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