/* Root */
:root {
  --bg: #F4F6FA;
  --surface: #FFFFFF;
  --text: #111827;
  --muted: #4B5563;
  --accent: #2F5BEA;
  --accentText: #FFFFFF;
  --plate: #111827;
  --plateText: #FFFFFF;
  --line: #D7DDEA;
  --tint: #E8EDF8;
  --fontHeading: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --fontBody: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --radiusCard: 18px;
  --radiusBtn: 10px;
  --shadowSoft: 0 1px 2px rgb(0 0 0 / .06), 0 12px 32px rgb(0 0 0 / .08);
  --padX: clamp(16px, 4vw, 40px);
  --sectionGap: clamp(64px, 9vw, 128px);
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--fontBody);
  font-weight: 400;
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 {
  font-family: var(--fontHeading);
  font-weight: 750;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 16px;
  text-wrap: balance;
}
h1 { font-size: clamp(2.4rem, 4.6vw + 0.6rem, 4.6rem); line-height: 1.06; }
h2 { font-size: clamp(1.8rem, 2.6vw + 0.8rem, 3rem); line-height: 1.15; }
h3 { font-size: clamp(1.2rem, 1.4vw + 0.85rem, 1.5rem); }
p { margin: 0 0 16px; max-width: 68ch; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration: underline; }
ul, ol { padding-left: 1.2em; }
img { max-width: 100%; height: auto; display: block; }
figure { margin: 0; }
.container { max-width: 1200px; margin: 0 auto; padding-inline: var(--padX); }
.section { padding-block: clamp(64px, 8vw, 120px); position: relative; }

/* Background layer */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(640px 360px at 12% 8%, var(--tint), transparent 70%),
    radial-gradient(560px 420px at 88% 42%, #DEE6F5, transparent 72%),
    radial-gradient(720px 380px at 50% 96%, var(--tint), transparent 70%);
}
.section:nth-of-type(even) { background: color-mix(in srgb, var(--surface) 62%, transparent); }
.sectionWave { position: relative; }
.section::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 34px;
  background: radial-gradient(56% 60px at 50% 100%, transparent 98%, var(--bg)) top center / 90px 30px repeat-x;
  pointer-events: none;
}

/* Skip link */
.skipLink {
  position: absolute;
  left: 16px;
  top: -64px;
  z-index: 120;
  background: var(--plate);
  color: var(--plateText);
  padding: 12px 20px;
  border-radius: var(--radiusBtn);
  text-decoration: none;
  transition: top .2s ease;
}
.skipLink:focus { top: 12px; }

/* Header */
.pageHeader {
  position: sticky;
  top: 14px;
  z-index: 90;
  padding: 8px 12px;
}
.pageHeaderInner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 10px 18px;
  min-height: 64px;
  box-shadow: var(--shadowSoft);
  transition: background .3s ease, box-shadow .3s ease;
}
.pageHeader.isScrolled .pageHeaderInner {
  background: var(--surface);
  box-shadow: 0 1px 2px rgb(0 0 0 / .08), 0 16px 40px rgb(0 0 0 / .12);
}
.brandMark {
  font-family: var(--fontHeading);
  font-weight: 750;
  font-size: 1.05rem;
  color: var(--text);
  text-decoration: none;
  text-align: center;
}
.brandMark:hover { text-decoration: none; color: var(--accent); }
.pageHeaderAction { justify-self: end; white-space: nowrap; }

/* Nav toggle */
.navToggle {
  display: grid;
  gap: 5px;
  width: 48px;
  height: 48px;
  padding: 12px 10px;
  align-content: center;
  background: transparent;
  border: 2px solid var(--text);
  border-radius: var(--radiusBtn);
  cursor: pointer;
}
.navToggleBar {
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .3s ease, opacity .3s ease;
}
.navToggle[aria-expanded="true"] .navToggleBar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.navToggle[aria-expanded="true"] .navToggleBar:nth-child(2) { opacity: 0; }
.navToggle[aria-expanded="true"] .navToggleBar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Side nav */
.sideNav {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 110;
  width: min(340px, 86vw);
  background: var(--surface);
  border-right: 1px solid var(--line);
  padding: 28px 26px;
  transform: translateX(-102%);
  transition: transform .35s cubic-bezier(.22,.7,.3,1);
  overflow-y: auto;
  box-shadow: 0 20px 60px rgb(17 24 39 / .18);
}
.navOverlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgb(17 24 39 / .45);
  opacity: 0;
  transition: opacity .35s ease;
}
.isNavOpen .sideNav { transform: translateX(0); }
.isNavOpen .navOverlay { opacity: 1; }
body.isNavOpen { overflow: hidden; }
.sideNavHead { margin-bottom: 28px; }
.sideNavHead .brandMark { text-align: left; display: block; }
.sideNavList { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.menuLink {
  display: block;
  padding: 12px 14px;
  border-radius: 12px;
  color: var(--text);
  text-decoration: none;
  font-size: 1rem;
  transition: background .25s ease, color .25s ease, transform .25s ease;
}
.menuLink:hover { background: var(--tint); color: var(--accent); text-decoration: none; transform: translateX(4px); }
.menuLink:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.menuLink[aria-current="page"] { background: var(--tint); font-weight: 600; color: var(--accent); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 26px;
  font: 600 1rem var(--fontBody);
  color: var(--text);
  background: var(--surface);
  border: 2px solid var(--text);
  border-radius: var(--radiusBtn);
  text-decoration: none;
  cursor: pointer;
  transition: border-radius .3s ease, background .25s ease, color .25s ease, border-color .25s ease;
}
.btn:hover { background: var(--text); color: var(--plateText); border-radius: 22px; text-decoration: none; }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.btn:active { background: #06090F; border-color: #06090F; }
.btnAlt { border-color: var(--accent); color: var(--accent); }
.btnAlt:hover { background: var(--accent); color: var(--accentText); border-color: var(--accent); }
.btnAlt:active { background: #1F3FB0; border-color: #1F3FB0; }
.formButton { width: 100%; }
.leadForm.isSending .formButton { opacity: .55; pointer-events: none; }

/* Hero */
.heroSection { padding-top: clamp(32px, 6vw, 72px); }
.heroInner { text-align: center; display: grid; justify-items: center; min-width: 0; }
.heroHeading { max-width: 14ch; margin-inline: auto; line-height: 1.15; }
.heroLead { color: var(--muted); max-width: 62ch; }
.accentText { color: var(--accent); }
.heroSteps {
  display: grid;
  align-items: stretch;
  gap: 20px;
  list-style: none;
  margin: 32px 0;
  padding: 0;
  width: 100%;
}
.heroStep { padding: 28px; display: grid; align-content: start; }
.heroStep h3 { font-size: 1.15rem; margin-bottom: 8px; text-align: center; }
.heroStep p { margin: 0; color: var(--muted); font-size: 0.95rem; max-width: 32ch; text-align: left; justify-self: center; }
.heroBtn { margin-top: 8px; }
.heroPhotoWrap {
  max-width: 1200px;
  margin: clamp(48px, 6vw, 64px) auto 0;
  overflow: hidden;
  border-radius: 24px;
  box-shadow: var(--shadowSoft);
}
.heroPhoto {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transform: scale(1.04);
  animation: heroSettle .8s ease forwards;
}
@keyframes heroSettle { to { transform: scale(1); } }

/* Cards and plate */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radiusCard);
  padding: 28px;
  box-shadow: var(--shadowSoft);
  transition: transform .3s ease, box-shadow .3s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 1px 2px rgb(0 0 0 / .06), 0 18px 44px rgb(0 0 0 / .12); }
.plate {
  background: var(--plate);
  color: var(--plateText);
  border-radius: var(--radiusCard);
  padding: 28px 32px;
  box-shadow: var(--shadowSoft);
}
.plate p { margin: 0; color: var(--plateText); font-weight: 500; }
.accentText { display: inline; }

/* Big typographic accent */
.bigAccent {
  font-family: var(--fontHeading);
  font-weight: 750;
  font-size: clamp(2.6rem, 6vw + 1rem, 5.4rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--accent);
}

/* Lead form section */
.leadSection { background: var(--tint); }
.leadInner {
  display: grid;
  gap: clamp(28px, 4vw, 64px);
  align-items: start;
}
.leadText h2 { margin-bottom: 12px; }
.leadText p { color: var(--muted); }
.leadFormWrap { display: grid; gap: 12px; }
.leadForm {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radiusCard);
  padding: clamp(24px, 3vw, 36px);
  display: grid;
  gap: 18px;
  box-shadow: var(--shadowSoft);
}
.formField { display: grid; gap: 6px; }
.fieldLabel { font-weight: 600; font-size: 0.95rem; }
.fieldInput {
  font: 400 1rem var(--fontBody);
  color: var(--text);
  background: var(--bg);
  border: 1px solid #D1D5DB;
  border-radius: 10px;
  padding: 12px 14px;
  min-height: 48px;
  width: 100%;
}
.fieldInput::placeholder { color: #52607A; }
.fieldInput:focus { outline: 2px solid var(--accent); outline-offset: 2px; border-color: var(--accent); }
.fieldTextarea { resize: vertical; min-height: 120px; }
.fieldCheck { display: flex; gap: 10px; align-items: flex-start; font-size: 0.92rem; color: var(--muted); }
.fieldCheck input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--accent); flex: none; }
.fieldError { color: #B42318; font-size: 0.88rem; margin: 0; }
.formField:has(.fieldInput:user-invalid) .fieldInput { border-color: #B42318; }
.formNote { color: var(--muted); font-size: 0.875rem; margin: 0; line-height: 1.6; }

/* Tabs */
.tabsWrap {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0 28px;
}
.tabBtn {
  font: 600 0.95rem var(--fontBody);
  color: var(--muted);
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: 999px;
  padding: 10px 20px;
  min-height: 44px;
  cursor: pointer;
  transition: background .25s ease, color .25s ease, border-color .25s ease;
}
.tabBtn:hover { border-color: var(--accent); color: var(--accent); }
.tabBtn:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.tabBtn[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: var(--accentText); }
.tabBtn:active { background: #1F3FB0; border-color: #1F3FB0; }
.numberedRows { display: grid; gap: 16px; }
.numberedRow {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(16px, 3vw, 40px);
  align-items: start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radiusCard);
  padding: clamp(20px, 3vw, 36px);
  transition: transform .3s ease, box-shadow .3s ease;
}
.numberedRow:hover { transform: translateY(-3px); box-shadow: 0 1px 2px rgb(0 0 0 / .06), 0 16px 40px rgb(0 0 0 / .12); }
.rowNumber {
  font-family: var(--fontHeading);
  font-weight: 750;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  color: var(--accent);
  margin: 0;
  line-height: 1;
}
.rowBody h3 { margin-bottom: 10px; }
.rowBody p { margin: 0; color: var(--muted); max-width: 62ch; }
[role="tabpanel"][hidden] { display: none; }
.servicesMore { margin-top: 28px; color: var(--muted); }

/* Steps */
.stepsSection { background: var(--tint); }
.stepsGrid { display: grid; gap: clamp(28px, 4vw, 48px); }
.stepsText { display: grid; gap: 12px; }
.stepsPlate { margin-top: 16px; max-width: 46ch; }
.stepsList {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 20px;
}
.stepCard h3 { margin-bottom: 8px; }
.stepCard p { margin: 0; color: var(--muted); }
.stepCard::before {
  content: "";
  display: block;
  width: 34px;
  height: 4px;
  border-radius: 4px;
  background: var(--accent);
  margin-bottom: 14px;
}

/* Photos with offset backdrop */
.stepsPhoto, .aboutPhoto, .sectionPhoto {
  position: relative;
  display: block;
}
.stepsPhoto img, .aboutPhoto img, .sectionPhoto img {
  position: relative;
  z-index: 1;
  width: 100%;
  object-fit: cover;
  border-radius: var(--radiusCard);
  aspect-ratio: 4 / 3;
}
.photoBackdrop {
  position: absolute;
  inset: 16px -16px -16px 16px;
  background: var(--accent);
  opacity: .28;
  border-radius: var(--radiusCard);
}
.stepsPhoto, .aboutPhoto, .sectionPhoto { margin: 8px 16px 16px 8px; }

/* Prices */
.priceFactors {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 20px;
}
.factorCard h3 { margin-bottom: 8px; }
.factorCard p { margin: 0; color: var(--muted); }
.priceNote { margin-top: 28px; font-weight: 500; }

/* FAQ */
.faqBlock { display: grid; gap: 12px; max-width: 760px; }
.faqItem {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radiusCard);
  padding: 6px 24px;
}
.faqItem summary {
  cursor: pointer;
  font-weight: 600;
  padding: 16px 0;
  list-style: none;
  position: relative;
  padding-right: 34px;
}
.faqItem summary::-webkit-details-marker { display: none; }
.faqItem summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 14px;
  font: 650 1.3rem var(--fontHeading);
  color: var(--accent);
  transition: transform .25s ease;
}
.faqItem[open] summary::after { transform: rotate(45deg); }
.faqItem p { color: var(--muted); margin: 0 0 18px; }
.faqItem summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 8px; }

/* About */
.aboutGrid {
  display: grid;
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
}

/* Footer */
.pageFooter {
  background: var(--plate);
  color: var(--plateText);
  padding: clamp(48px, 6vw, 80px) 0 32px;
  margin-top: var(--sectionGap);
}
.footerGrid {
  display: grid;
  gap: clamp(28px, 4vw, 48px);
  padding-bottom: 32px;
  border-bottom: 1px solid rgb(255 255 255 / .18);
}
.footerCol .brandMark { color: var(--plateText); text-align: left; display: block; margin-bottom: 16px; }
.footerCol .brandMark:hover { color: #C9D4F5; }
.footerTitle {
  color: var(--plateText);
  font-size: 1.05rem;
  margin-bottom: 14px;
}
.footerList { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footerList a { color: #C9D4F5; text-decoration: none; }
.footerList a:hover { text-decoration: underline; }
.pageFooter address { font-style: normal; color: #C9D4F5; font-size: 0.95rem; margin-top: 14px; }
.pageFooter address p { margin: 0 0 6px; }
.pageFooter ul li span {
  display: inline-block;
  min-width: 70px;
  color: #9AA6C2;
  font-size: 0.88rem;
}
.pageFooter ul { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 6px; }
.footerCopy { color: #9AA6C2; font-size: 0.88rem; margin: 24px 0 0; }

/* Inner pages */
.pageIntro { padding-top: clamp(28px, 5vw, 56px); }
.crumbs { margin: 20px 0 8px; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; margin: 0; padding: 0; font-size: 0.9rem; }
.crumbs li { color: var(--muted); }
.crumbs li + li::before { content: "·"; margin: 0 6px 0 2px; color: var(--muted); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); text-decoration: underline; }
.crumbs [aria-current="page"] { color: var(--text); font-weight: 500; }

.prose { max-width: 760px; }
.prose h2 { margin-top: 40px; }
.prose h3 { margin-top: 28px; }
.prose p, .prose li { color: var(--muted); }
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radiusCard);
  overflow: hidden;
}
.prose th, .prose td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); }
.prose th { font-weight: 650; background: var(--tint); color: var(--text); }
.prose tr:last-child td { border-bottom: none; }
.prose strong { color: var(--text); }

.contactsList { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.contactsList li span { display: block; color: var(--muted); font-size: 0.88rem; }

.galleryGrid {
  display: grid;
  gap: clamp(20px, 3vw, 32px);
  list-style: none;
  margin: 0;
  padding: 0;
}
.galleryGrid figure { margin: 8px 16px 16px 8px; }
.photoRow { display: grid; gap: clamp(28px, 4vw, 56px); align-items: center; }

/* Confirmation / 404 */
.confirmSection { text-align: center; display: grid; justify-items: center; padding-block: var(--sectionGap); }
.confirmSection .plate { max-width: 60ch; }
.linkList { list-style: none; margin: 24px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.linkList a { text-decoration: none; }
.linkList a:hover { text-decoration: underline; }

/* Reveal */
html.jsReady .reveal { opacity: 0; transform: translateY(22px); transition: transform .6s ease, box-shadow .3s ease; }
html.jsReady .reveal.isRevealed, html.jsReady .isRevealed .reveal { opacity: 1; transform: none; }

/* Breakpoints */
@media (max-width: 1279px) {
  .stepsGrid { grid-template-columns: 1fr; }
  .aboutGrid { grid-template-columns: 1fr; }
}
@media (min-width: 640px) {
  .heroSteps { grid-template-columns: repeat(2, 1fr); }
  .priceFactors { grid-template-columns: repeat(2, 1fr); }
  .galleryGrid { grid-template-columns: repeat(2, 1fr); }
  .leadInner { grid-template-columns: 1fr 1fr; gap: 64px; }
  .photoRow { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 839px) {
  .pageHeaderAction { display: none; }
  .pageHeader .brandMark { text-align: left; }
  .pageHeaderInner { grid-template-columns: auto 1fr; }
}
@media (min-width: 840px) {
  .stepsGrid { grid-template-columns: 1.1fr 1fr; }
  .aboutGrid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1024px) {
  .heroSteps { grid-template-columns: repeat(3, 1fr); }
  .priceFactors { grid-template-columns: repeat(3, 1fr); }
  .galleryGrid { grid-template-columns: repeat(3, 1fr); }
  .footerGrid { grid-template-columns: 1.4fr 1fr 1fr; }
}
@media (max-width: 479px) {
  .numberedRow { grid-template-columns: 1fr; gap: 10px; }
  .heroHeading { font-size: clamp(2rem, 9vw, 2.6rem); }
  .tabsWrap { display: grid; }
  .tabBtn { width: 100%; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .heroPhoto { transform: none; animation: none; }
  html.jsReady .reveal { opacity: 1; transform: none; }
}

.leadText { max-width: 46ch; }
.leadText p { max-width: 52ch; line-height: 1.7; }
.leadFormWrap > .formNote { margin-top: 24px; text-align: center; }
@media (max-width: 479px) {
  .heroHeading { font-size: clamp(2rem, 8vw, 3.5rem); }
  .heroBtn { width: 100%; min-height: 52px; padding: 14px 24px; font-size: 0.95rem; white-space: nowrap; }
  .fieldInput { font-size: 1rem; }
}

/* Contrast fixes */
.pageFooter ul li a { color: #C9D4F5; text-decoration: none; }
.pageFooter ul li a:hover { color: #FFFFFF; text-decoration: underline; }
.plate p, .plate .prose p, .plate .formNote { color: var(--plateText); }

/* Photo caption clearance */
.stepsPhoto figcaption, .aboutPhoto figcaption, .sectionPhoto figcaption, .galleryGrid figcaption, .photoRow figcaption {
  position: relative;
  z-index: 2;
  margin-top: 24px;
}
.stepsPhoto .photoBackdrop, .aboutPhoto .photoBackdrop, .sectionPhoto .photoBackdrop, .galleryGrid .photoBackdrop, .photoRow .photoBackdrop {
  bottom: 16px;
}

/* Hero text fit */
.heroLead { max-width: 100%; overflow-wrap: break-word; }

/* Overflow guards */
body { overflow-x: clip; }
.heroInner > *, .heroLead { min-width: 0; max-width: 100%; overflow-wrap: break-word; }
.stepsPhoto, .aboutPhoto, .sectionPhoto, .galleryGrid figure, .photoRow figure { overflow: clip; }
.stepsPhoto .photoBackdrop, .aboutPhoto .photoBackdrop, .sectionPhoto .photoBackdrop, .galleryGrid .photoBackdrop, .photoRow .photoBackdrop { max-width: calc(100% - 16px); }
.heroPhotoWrap { max-width: calc(100% - 0px); margin-inline: auto; }
@media (prefers-reduced-motion: reduce) { body { overflow-x: clip; } }

/* Reveal fallback */
@keyframes revealAuto {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    html.jsReady .reveal:not(.isRevealed) {
      animation: revealAuto both ease;
      animation-timeline: view();
      animation-range: entry 0% entry 30%;
    }
  }
}
