/*
 * Final typography and layout safety layer.
 * Loaded after the visual system so editable content never collides.
 */
:root {
  --font-premium: -apple-system, BlinkMacSystemFont, "SF Pro Display",
    "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
}

body,
button,
input,
textarea,
select {
  font-family: var(--font-premium);
}

.hero {
  min-height: clamp(760px, 100svh, 1080px);
  height: auto;
  padding: clamp(130px, 12vw, 180px) var(--pad) clamp(72px, 8vw, 110px);
}

h1,
h2,
h3,
p,
strong,
a,
button {
  overflow-wrap: break-word;
}

.hero h1,
.intro h2,
.portfolio-head h2,
.services-head h2,
.method-lead h2,
.contact h2 {
  font-family: var(--font-premium);
  text-wrap: balance;
}

.hero h1 {
  line-height: 0.94;
}

.intro h2,
.portfolio-head h2,
.services-head h2,
.contact h2 {
  line-height: 0.92;
}

.portfolio-head h2 em,
.services-head h2 em {
  display: inline-block;
  margin-top: 0.12em;
  font-family: var(--font-premium);
  font-size: 0.72em;
  font-style: normal;
  font-weight: 300;
  line-height: 1.08;
  letter-spacing: -0.055em;
  color: var(--sage);
  -webkit-text-stroke: 0;
  text-shadow: none;
}

.services-head h2 em {
  font-size: 0.68em;
}

.method-lead {
  grid-template-columns: minmax(150px, 0.32fr) minmax(0, 1fr);
  gap: clamp(2rem, 7vw, 8rem);
  align-items: start;
}

.method-lead > p {
  margin: 0.8rem 0 0;
  font-family: var(--font-premium);
  font-size: clamp(0.72rem, 1vw, 0.9rem);
  line-height: 1.45;
}

.method-lead h2 {
  max-width: 100%;
  font-size: clamp(3.8rem, 8vw, 8rem);
  line-height: 0.94;
  letter-spacing: -0.065em;
}

.steps {
  align-items: stretch;
}

.step,
.step:first-child,
.step:nth-child(even) {
  min-width: 0;
  min-height: 360px;
  height: auto;
  display: flex;
  flex-direction: column;
  padding: clamp(1.5rem, 2.5vw, 2.25rem);
  transform: none !important;
}

.step span {
  display: block;
  flex: 0 0 auto;
  line-height: 1;
}

.step h3 {
  margin: clamp(3rem, 6vw, 5rem) 0 1.25rem;
  font-family: var(--font-premium);
  font-size: clamp(1.25rem, 1.7vw, 1.55rem);
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.step p {
  max-width: none;
  margin: 0;
  color: #62645f;
  font-size: clamp(0.9rem, 1.15vw, 1rem);
  line-height: 1.62;
  hyphens: auto;
}

.service-list .service {
  height: auto;
  overflow: hidden;
}

.service-list .service,
.service-list .service:nth-child(3n + 2),
.service-list .service:nth-child(3n),
.service-list .service:nth-child(4n + 1),
.service-list .service:nth-child(4n + 2) {
  grid-column: span 4;
}

.service-list .service h3 {
  font-family: var(--font-premium);
  line-height: 1.02;
  overflow-wrap: anywhere;
}

.service-list .service p {
  height: auto;
  min-height: 0;
  line-height: 1.55;
}

.service-price {
  margin-top: 1rem;
}

.portfolio-item-meta > * {
  min-width: 0;
}

.portfolio-item-meta > p {
  max-width: 42%;
  line-height: 1.45;
  text-align: right;
}

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

.contact-card strong {
  max-width: 100%;
  font-family: var(--font-premium);
  font-size: clamp(1.3rem, 2vw, 2.15rem);
  line-height: 1.12;
  letter-spacing: -0.035em;
  overflow-wrap: anywhere;
}

.contact-footer,
.contact-footer p,
.contact-footer a {
  line-height: 1.5;
}

.quote-banner {
  gap: 2rem;
}

.scroll-cue {
  bottom: 36px;
}

.admin-access-link {
  text-decoration: underline;
  text-decoration-color: var(--sage);
  text-underline-offset: 0.3em;
}

@media (max-width: 1080px) {
  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .step,
  .step:first-child,
  .step:nth-child(even) {
    min-height: 310px;
  }

  .service-list .service h3 {
    font-size: clamp(1.8rem, 4vw, 3rem);
  }

  .service-list .service,
  .service-list .service:nth-child(3n + 2),
  .service-list .service:nth-child(3n),
  .service-list .service:nth-child(4n + 1),
  .service-list .service:nth-child(4n + 2) {
    grid-column: span 6;
  }
}

@media (max-width: 760px) {
  body:has(.booking-modal[open]) {
    overflow: hidden;
    overscroll-behavior: none;
  }

  .booking-modal,
  .booking-modal.quote-modal {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100dvh;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    overflow: hidden;
    background: var(--ink);
  }

  .booking-modal[open],
  .booking-modal.quote-modal[open] {
    display: block;
  }

  .booking-modal::backdrop {
    background: var(--ink);
    backdrop-filter: none;
  }

  .booking-modal form {
    width: 100%;
    height: 100%;
    padding: max(82px, calc(env(safe-area-inset-top) + 66px)) 1.25rem max(32px, calc(env(safe-area-inset-bottom) + 20px));
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .booking-modal label {
    margin-bottom: 1.15rem;
  }

  .booking-modal input,
  .booking-modal textarea,
  .booking-modal select {
    font-size: 16px;
  }

  .modal-close {
    position: fixed;
    z-index: 5;
    top: max(14px, env(safe-area-inset-top));
    right: 14px;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    padding: 0 0 3px;
    border: 1px solid rgba(239, 238, 233, 0.15);
    border-radius: 50%;
    background: rgba(22, 22, 22, 0.92);
    font-size: 1.75rem;
    line-height: 1;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }

  .submit-booking {
    min-height: 52px;
    justify-content: center;
  }

  .site-header {
    top: max(10px, env(safe-area-inset-top));
    left: 10px;
    height: 62px;
    width: calc(100% - 20px);
    transform: none;
    padding: 0 0.65rem 0 1rem;
    border-color: rgba(239, 238, 233, 0.12);
    background: rgba(9, 9, 9, 0.7);
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(22px) saturate(135%);
    -webkit-backdrop-filter: blur(22px) saturate(135%);
  }

  .site-header:has(.main-nav.open) {
    border-color: transparent;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .site-header .brand {
    position: relative;
    z-index: 3;
    font-size: 0.95rem;
  }

  .site-header .brand img {
    width: 31px;
    height: 28px;
  }

  .menu-toggle {
    position: relative;
    z-index: 3;
    width: 46px;
    height: 46px;
    padding: 14px 10px;
    border: 1px solid rgba(239, 238, 233, 0.14);
    border-radius: 50%;
    background: rgba(239, 238, 233, 0.06);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .menu-toggle span:not(.sr-only) {
    width: 100%;
    height: 1.5px;
    border-radius: 2px;
    transform-origin: center;
    transition: transform 0.45s var(--ease-premium), opacity 0.25s ease;
  }

  .menu-toggle[aria-expanded="true"] span:first-child {
    transform: translateY(4.25px) rotate(45deg);
  }

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

  .main-nav {
    position: fixed;
    z-index: 2;
    inset: -10px;
    width: 100vw;
    height: 100dvh;
    min-height: 100dvh;
    padding: max(116px, calc(env(safe-area-inset-top) + 100px)) 1.5rem max(30px, env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    overflow-y: auto;
    background: radial-gradient(circle at 82% 10%, rgba(143, 149, 136, 0.2), transparent 32%), rgba(5, 5, 5, 0.97);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-14px) scale(0.985);
    transform-origin: top center;
    transition: opacity 0.35s ease, transform 0.55s var(--ease-premium), visibility 0.55s;
  }

  .main-nav.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
  }

  .mobile-nav-label {
    display: block;
    margin: 0 0 1.5rem;
    color: var(--sage);
    font-size: 0.67rem;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
  }

  .main-nav a {
    display: grid;
    grid-template-columns: 2.25rem 1fr auto;
    align-items: center;
    min-height: 66px;
    border-bottom: 1px solid rgba(239, 238, 233, 0.13);
    font-size: clamp(1.75rem, 8vw, 2.35rem);
    font-weight: 400;
    line-height: 1;
    letter-spacing: -0.045em;
    text-transform: none;
    opacity: 0;
    transform: translateY(18px);
    transition: color 0.25s ease, opacity 0.5s var(--ease-premium), transform 0.5s var(--ease-premium);
  }

  .main-nav a::before {
    content: attr(data-index);
    color: var(--sage);
    font-size: 0.62rem;
    font-weight: 500;
    letter-spacing: 0.08em;
  }

  .main-nav a::after {
    content: none;
  }

  .main-nav.open a {
    opacity: 1;
    transform: translateY(0);
  }

  .main-nav.open a:nth-of-type(1) { transition-delay: 0.08s; }
  .main-nav.open a:nth-of-type(2) { transition-delay: 0.12s; }
  .main-nav.open a:nth-of-type(3) { transition-delay: 0.16s; }
  .main-nav.open a:nth-of-type(4) { transition-delay: 0.2s; }

  .main-nav .nav-cta {
    width: 100%;
    min-height: 54px;
    margin-top: 1.75rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.015em;
  }

  .mobile-nav-footer {
    display: block;
    margin: auto 0 0;
    padding-top: 2rem;
    color: rgba(239, 238, 233, 0.42);
    font-size: 0.67rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  html,
  body,
  main {
    width: 100%;
    max-width: 100vw;
    overflow-x: clip;
  }

  main > section,
  .section {
    width: 100%;
    max-width: 100vw;
    margin-left: 0;
    margin-right: 0;
    box-sizing: border-box;
  }

  .hero {
    min-height: 760px;
    padding: 110px 1.25rem 72px;
  }

  .hero-logo {
    width: 108px;
    margin-bottom: 2rem;
  }

  .hero h1 {
    width: 100%;
    max-width: 100%;
    font-size: clamp(2.4rem, 10.8vw, 3.2rem);
    line-height: 0.98;
    letter-spacing: -0.07em;
  }

  .intro h2,
  .portfolio-head h2,
    .services-head h2,
  .contact h2 {
    width: 100%;
    max-width: 100%;
    font-size: clamp(2.35rem, 10.8vw, 3.2rem);
    line-height: 0.96;
    letter-spacing: -0.065em;
  }

  .portfolio-head h2 em,
  .services-head h2 em {
    display: block;
    margin-top: 0.2em;
    font-size: 0.62em;
    line-height: 1.12;
    letter-spacing: -0.04em;
  }

  .section {
    max-width: 100vw;
    overflow: hidden;
  }

  .intro-grid,
  .portfolio-head,
  .services-head,
  .portfolio-grid,
  .service-list,
  .steps,
  .contact-options {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .intro-grid > *,
  .portfolio-head > *,
  .services-head > *,
  .portfolio-grid > *,
  .service-list > *,
  .steps > *,
  .contact-options > * {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .intro-copy p,
  .portfolio-head p,
  .services-head p,
  .step p,
  .contact-card strong,
  .contact-footer p,
  .contact-footer a {
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: normal;
  }

  .method-lead {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .method-lead h2 {
    font-size: clamp(3.5rem, 15vw, 5.5rem);
    line-height: 0.96;
  }

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

  .step,
  .step:first-child,
  .step:nth-child(even) {
    min-height: 0;
    padding: 1.75rem;
  }

  .step h3 {
    margin-top: 3rem;
  }

  .portfolio-item-meta {
    flex-direction: column;
  }

  .portfolio-item-meta > p {
    max-width: none;
    text-align: left;
  }

  .portfolio-empty {
    width: 100%;
    min-width: 0;
    padding: 2rem 1.25rem;
  }

  .portfolio-empty span {
    max-width: 100%;
    font-family: var(--font-premium);
    font-size: clamp(1.45rem, 7vw, 2rem);
    line-height: 1.05;
    overflow-wrap: anywhere;
  }

  .contact-card strong {
    font-size: clamp(1.2rem, 5.4vw, 1.65rem);
  }

  .service-list .service,
  .service-list .service:nth-child(3n + 2),
  .service-list .service:nth-child(3n),
  .service-list .service:nth-child(4n + 1),
  .service-list .service:nth-child(4n + 2) {
    width: 100%;
    min-width: 0;
    grid-column: 1 / -1;
    padding: 1.8rem;
  }

  .service-list .service:hover {
    padding-left: 1.8rem;
  }

  .service-list .service h3 {
    font-size: clamp(1.65rem, 8vw, 2.25rem);
  }

  .quote-banner {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.1rem 1.25rem;
    text-align: center;
    line-height: 1.35;
  }

  .quote-banner span,
  .quote-banner b {
    max-width: 100%;
  }
}

@media (max-width: 420px) {
  .hero h1 {
    font-size: clamp(2.25rem, 10.2vw, 2.85rem);
  }

  .intro h2,
  .portfolio-head h2,
  .services-head h2,
  .contact h2 {
    font-size: clamp(2.2rem, 10.2vw, 2.8rem);
  }

  .method-lead h2 {
    font-size: clamp(2.8rem, 12vw, 3.6rem);
  }
}

.faq {
  background: #e7e6e0;
  color: var(--ink);
}

.faq .section-heading { border-color: rgba(5, 5, 5, 0.16); }
.faq-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(320px, 1.2fr);
  gap: clamp(3rem, 9vw, 10rem);
  padding-top: clamp(3rem, 7vw, 7rem);
}
.faq h2 {
  margin: 0;
  font-size: clamp(3.5rem, 7vw, 7rem);
  line-height: 0.92;
  letter-spacing: -0.065em;
}
.faq h2 em {
  color: var(--sage);
  font-size: 0.58em;
  font-style: normal;
  font-weight: 300;
}
.faq-list details { border-bottom: 1px solid rgba(5, 5, 5, 0.17); }
.faq-list summary {
  position: relative;
  padding: 1.6rem 3rem 1.6rem 0;
  list-style: none;
  font-size: clamp(1.05rem, 1.5vw, 1.3rem);
  font-weight: 500;
  line-height: 1.3;
  cursor: pointer;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+";
  position: absolute;
  top: 1.45rem;
  right: 0;
  color: var(--sage);
  font-size: 1.6rem;
  font-weight: 300;
  transition: transform 0.3s ease;
}
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list details p {
  max-width: 62ch;
  margin: -0.25rem 0 1.6rem;
  color: #5f625c;
  line-height: 1.65;
}

@media (max-width: 760px) {
  .faq-layout { grid-template-columns: 1fr; gap: 2.5rem; }
  .faq h2 { font-size: clamp(2.7rem, 12vw, 4rem); }
  .faq-list summary { padding: 1.35rem 2.5rem 1.35rem 0; }
  .faq-list summary::after { top: 1.2rem; }
}
