:root {
  color-scheme: dark;
  --background: #100d14;
  --text: #fff0e5;
  --muted: #d2c3ca;
  --accent: #ffc392;
  --line: rgb(255 233 218 / 22%);
  --display: Impact, 'Arial Narrow', 'Arial Black', sans-serif;
  --gutter: clamp(1.25rem, 5vw, 5.5rem);
  font-family: 'Segoe UI', Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--background); color: var(--text); }
a { color: inherit; text-underline-offset: .22em; }
img { display: block; max-width: 100%; }
h1, h2, p, figure { margin: 0; }
::selection { color: var(--background); background: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
.shell { width: min(calc(100% - 2 * var(--gutter)), 87.5rem); margin-inline: auto; }
.section { padding-block: clamp(4.25rem, 9vw, 9rem); scroll-margin-top: 3.25rem; }

.skip-link { position: fixed; z-index: 5; left: 1rem; top: 1rem; translate: 0 -160%; background: var(--background); padding: .75rem 1rem; }
.skip-link:focus { translate: 0; }

.site-header { position: fixed; z-index: 2; top: 0; width: 100%; transition: background .25s ease; }
.site-header.is-scrolled { background: rgb(16 13 20 / 82%); backdrop-filter: blur(14px); }
.header-inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 5.25rem; gap: 1.25rem; border-bottom: 1px solid var(--line); transition: min-height .25s ease; }
.is-scrolled .header-inner { min-height: 4.25rem; }
.header-inner > .button { justify-self: end; }
.brand { width: max-content; display: inline-flex; align-items: center; gap: .52rem; text-decoration: none; font-size: clamp(1.7rem, 4.25vw, 2rem); font-weight: 750; letter-spacing: -.06em; }
.brand img { width: clamp(4.75rem, 13vw, 7rem); height: auto; }
nav { display: flex; gap: clamp(1.2rem, 3vw, 3.1rem); font-size: .92rem; font-weight: 600; }
nav a { text-decoration: none; }
nav a:hover { text-decoration: underline; }

.button { display: inline-flex; justify-content: center; align-items: center; min-height: 3.25rem; width: fit-content; padding: .75rem 1.35rem; border: 1px solid transparent; border-radius: .2rem; font-size: .94rem; font-weight: 750; line-height: 1.2; text-align: center; text-decoration: none; transition: color .2s, background .2s, border-color .2s; }
.button-outline { min-height: 2.7rem; border-color: rgb(255 235 217 / 55%); background: rgb(16 13 20 / 42%); }
.button-outline:hover { border-color: var(--text); background: var(--text); color: #21151d; }
.button-primary { background: var(--accent); color: #26151c; box-shadow: 0 .5rem 2rem rgb(12 6 14 / 23%); }
.button-primary:hover { background: #ffe2c9; }

.hero { position: relative; isolation: isolate; overflow: hidden; background: #211421; }
.hero-media, .hero::after { position: absolute; z-index: -1; inset: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 64% 48%; }
.hero::after { content: ''; background: linear-gradient(90deg, rgb(15 9 19 / 71%), rgb(19 10 24 / 42%) 44%, transparent 77%), linear-gradient(0deg, #100d14 0%, rgb(16 13 20 / 52%) 12%, transparent 35%, transparent 82%, rgb(13 9 16 / 42%) 100%); }
.hero-inner { min-height: max(100svh, 40rem); display: grid; grid-template-rows: 1fr auto; padding-top: 6.9rem; }
.hero-copy { align-self: center; padding-block: 1.75rem 3rem; }
.eyebrow { width: fit-content; color: var(--accent); font-size: .77rem; font-weight: 720; letter-spacing: .13em; line-height: 1.5; text-transform: uppercase; }
.hero .eyebrow { display: flex; align-items: center; gap: .65rem; }
.hero .eyebrow::before { content: ''; flex: 0 0 1.35rem; height: 1px; background: currentColor; }
h1, h2 { font-family: var(--display); font-weight: 400; text-transform: uppercase; }
h1 { margin-block: .75rem 1.3rem; font-size: clamp(4.3rem, 9.7vw, 10rem); line-height: .94; letter-spacing: -.018em; }
h1 span, h2 span { color: var(--accent); }
h1 span { display: block; }
.hero-lead { color: #fff1e9; font-size: clamp(1rem, 1.57vw, 1.22rem); line-height: 1.55; max-width: 27rem; text-wrap: pretty; }
.hero-copy .button { margin-top: 1.65rem; }
.hero-foot { display: flex; justify-content: space-between; align-items: center; gap: .8rem 1.25rem; padding-block: 1.35rem 1.5rem; border-top: 1px solid var(--line); color: #e5d6db; font-size: .86rem; font-weight: 600; }
.scroll-link { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; }
.scroll-link:hover { color: var(--accent); }
.scroll-link span { width: 1px; height: 1rem; background: var(--accent); }

.story { position: relative; --story-step: 94svh; --story-hold: 36svh; }
.story-marker, .story-progress { display: none; }
.story-active .story { height: calc(100svh + var(--story-duration) * var(--story-step) + var(--story-hold)); }
.story-active .story-marker { display: block; position: absolute; inset: var(--story-step) 0 auto; pointer-events: none; }
.story-active .story-screen { position: sticky; top: 0; height: 100svh; isolation: isolate; overflow: hidden; background: var(--background); }
.story-active .story-screen::after { content: ''; position: absolute; z-index: 1; inset: 0; background: #100d14; opacity: var(--shutter, 0); pointer-events: none; }
.story-active [data-scene] { position: absolute; inset: 0; opacity: var(--scene-opacity, 0); }
.story-active [data-scene]:not(.is-visible) { visibility: hidden; }
.story-active .hero-inner, .story-active .chapter-inner { min-height: 100%; }
.story-active .hero-media img { transform: scale(var(--camera, 1)); transform-origin: 70% 54%; }
.story-active .hero-copy, .story-active .hero-foot { opacity: var(--copy-opacity, 1); transform: translateY(var(--copy-lift, 0px)); }
.story-active .story-progress { position: absolute; z-index: 2; display: block; bottom: 0; inset-inline: 0; height: 2px; pointer-events: none; }
.story-progress span { display: block; height: 100%; background: linear-gradient(90deg, #ffb276, #a0f2ee); transform: scaleX(var(--story-progress, 0)); transform-origin: left; }

.chapter { position: relative; isolation: isolate; overflow: hidden; background: var(--background); }
.chapter-diagnosis { --accent: #a9e9fb; --image-x: 38%; --mobile-x: 30%; --origin: 31% 52%; --shadow: 12 19 36; }
.chapter-repair { --accent: #ffb18e; --image-x: 61%; --mobile-x: 72%; --origin: 69% 58%; --shadow: 32 14 22; }
.chapter-renew { --accent: #b8f2d7; --image-x: 42%; --mobile-x: 39%; --origin: 36% 34%; --shadow: 9 25 24; }
.chapter-media, .chapter::before { position: absolute; inset: 0; z-index: -1; }
.chapter-media img { width: 100%; height: 100%; object-fit: cover; object-position: var(--image-x) center; transform: scale(var(--camera, 1)); transform-origin: var(--origin); }
.chapter::before { content: ''; --shade-direction: 90deg; background: linear-gradient(var(--shade-direction), rgb(var(--shadow) / 95%), rgb(var(--shadow) / 68%) 40%, transparent 73%), linear-gradient(0deg, rgb(12 10 16 / 90%), transparent 24%, transparent 80%, rgb(12 10 16 / 48%)); }
.chapter-right::before { --shade-direction: 270deg; }
.chapter-inner { display: grid; grid-template-rows: 1fr auto; align-items: center; min-height: 100svh; padding-top: 5.25rem; }
.chapter-copy { width: min(100%, 54%); padding-block: 2rem; opacity: var(--copy-opacity, 1); transform: translateY(var(--copy-lift, 0px)); }
.chapter-right .chapter-copy { justify-self: end; width: min(100%, 51%); }
.chapter h2 { font-size: clamp(3rem, 6.15vw, 7.65rem); line-height: 1; margin-block: .66rem 1.05rem; }
.chapter h2 .title-line:first-child { color: var(--text); }
.title-line { overflow: clip; padding-bottom: .16em; margin-bottom: -.16em; }
.title-line > span { color: inherit; transform: translateY(var(--title-shift, 0%)); }
.title-line + .title-line > span { transform: translateY(var(--title-shift-late, 0%)); }
.chapter-lead { max-width: 29rem; color: #fff2e9; line-height: 1.55; font-size: clamp(1rem, 1.6vw, 1.25rem); text-wrap: pretty; }
.chapter .eyebrow, .chapter-lead { opacity: var(--detail-opacity, 1); transform: translateY(var(--detail-lift, 0px)); }
.chapter-foot { display: flex; align-items: center; border-top: 1px solid var(--line); padding-block: 1.35rem 1.5rem; color: var(--text); font-size: .9rem; font-weight: 650; opacity: calc(var(--copy-opacity, 1) * var(--detail-opacity, 1)); }
.chapter-right .chapter-foot { justify-content: end; }
.chapter-foot a { text-decoration-color: var(--accent); }
.chapter-foot a:hover { color: var(--accent); }

h2 { font-size: clamp(2.8rem, 6.2vw, 6.5rem); line-height: .99; letter-spacing: -.014em; }
h2 span { display: block; }
.section p:not(.eyebrow), .steps { color: var(--muted); font-size: 1.04rem; line-height: 1.6; }
.section-heading { display: grid; grid-template-columns: 1.6fr 1fr; gap: clamp(1rem, 5vw, 5rem); align-items: end; margin-bottom: clamp(1.8rem, 4vw, 4rem); }
.section-heading p { max-width: 24rem; padding-bottom: .18rem; }
.service-layout { display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(1.5rem, 4vw, 4.5rem); }
.equipment, .approach-image {
  position: relative;
  overflow: hidden;
  border-radius: clamp(1rem, 2.35vw, 2.25rem);
  background: #2c232f;
  mask-image: linear-gradient(#000 77%, rgb(0 0 0 / 93%) 83%, rgb(0 0 0 / 58%) 91%, rgb(0 0 0 / 18%) 97%, transparent);
}
.equipment img, .approach-image img { width: 100%; height: 100%; object-fit: cover; }
.equipment { aspect-ratio: 1.56; }
.equipment::after, .approach-image::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(155deg, rgb(72 34 84 / 20%), transparent 70%); }
.service-list { border-top: 1px solid var(--line); }
.service-list details { border-bottom: 1px solid var(--line); }
.service-list summary { cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 1rem; list-style: none; padding-block: 1rem; font-size: clamp(1.15rem, 2.1vw, 1.55rem); font-weight: 700; }
.service-list summary::-webkit-details-marker { display: none; }
.service-list summary::after { content: ''; flex: 0 0 1rem; width: 1rem; height: 1rem; background: linear-gradient(currentColor,currentColor) center/100% 1px no-repeat, linear-gradient(currentColor,currentColor) center/1px 100% no-repeat; }
.service-list details[open] summary { color: var(--accent); }
.service-list details[open] summary::after { background-size: 100% 1px, 0; }
.service-list p { max-width: 29rem; padding: 0 1.5rem 1rem 0; }

.approach { background: radial-gradient(ellipse at 95% 15%, #433046, transparent 54%), #201622; border-block: 1px solid var(--line); }
.approach-layout { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: clamp(1.75rem, 6vw, 6.4rem); }
.approach h2 { margin-block: .75rem 1.2rem; font-size: clamp(2.8rem, 5.4vw, 5.7rem); }
.approach-image { aspect-ratio: .95; }
.approach-image img { object-position: 58% center; }
.steps { display: grid; gap: .9rem; margin-block: 1.5rem 0; padding-left: 1.45rem; }
.steps li { padding-left: .35rem; }
.steps li::marker { color: var(--accent); font-weight: 750; }
.steps strong { color: var(--text); }

.symptoms { background: radial-gradient(ellipse at 0% 55%, #241b2b, transparent 64%); border-bottom: 1px solid var(--line); }
.symptoms-layout { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.85rem, 6vw, 6.4rem); }
.symptoms h2 { font-size: clamp(2.8rem, 5.55vw, 5.9rem); }
.symptoms h2 + p { max-width: 24rem; margin-top: 1.15rem; }
.symptom-link { display: inline-block; margin-bottom: 1.1rem; color: var(--accent); }

.request { background: radial-gradient(ellipse at 0% 135%, #482a33, transparent 62%); }
.request-layout { display: grid; grid-template: 'intro form' auto 'contacts form' 1fr / minmax(0, .85fr) minmax(0, 1.2fr); gap: 1.8rem clamp(1.5rem, 4.6vw, 4.5rem); align-items: start; }
.request-intro { grid-area: intro; }
.request h2 { font-size: clamp(2.65rem, 5vw, 5.6rem); }
.request h2 + p { margin-top: 1.2rem; max-width: 31rem; }
.contact { grid-area: contacts; border-top: 1px solid var(--line); padding-top: 1.4rem; display: grid; justify-items: start; gap: .8rem; font-style: normal; }
.contact-phone { display: flex; align-items: center; gap: .62rem; white-space: nowrap; }
.contact .messenger { display: grid; place-items: center; min-height: 2.2rem; min-width: 2.2rem; border: 1px solid var(--line); border-radius: .2rem; }
.contact .messenger:hover { border-color: var(--accent); }
.messenger img { filter: brightness(0) invert(1); }

.request-panel { grid-area: form; min-width: 0; padding: clamp(1.15rem, 3.1vw, 2.65rem); border: 1px solid var(--line); border-radius: .85rem; background: #201922; }
.request-panel [hidden] { display: none !important; }
.request-panel h3 { margin: 0 0 .65rem; font-size: clamp(1.35rem, 2.5vw, 1.95rem); line-height: 1.2; }
.request .form-note { color: var(--muted); font-size: .9rem; line-height: 1.48; overflow-wrap: anywhere; }
.request-panel button { font-family: inherit; cursor: pointer; }
.request-panel button:disabled { cursor: default; opacity: .55; }
#request-form, #draft-title { scroll-margin-top: 5rem; }
#visit-location { scroll-margin-top: 7rem; }
.form-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .92rem 1rem; margin-block: 1.4rem 1.1rem; }
.form-fields .full { grid-column: 1 / -1; }
.form-fields label, .draft > label { display: block; min-width: 0; font-size: .92rem; font-weight: 650; }
.optional { color: var(--muted); font-size: .87rem; font-weight: 400; }
.request-panel :is(input:not([type='file']), select, textarea) { display: block; min-width: 0; width: 100%; min-height: 2.8rem; margin-top: .4rem; padding: .64rem .74rem; border: 1px solid rgb(255 233 218 / 34%); border-radius: .28rem; color: var(--text); background-color: #151218; font: inherit; font-size: 1rem; font-weight: 400; }
.request-panel select { appearance: none; padding-inline-end: 2rem; background-image: linear-gradient(45deg, transparent 50%, var(--accent) 50%), linear-gradient(135deg, var(--accent) 50%, transparent 50%); background-position: right 1.2rem center, right .95rem center; background-size: .25rem .25rem; background-repeat: no-repeat; }
.request-panel textarea { resize: vertical; }
.request-panel :is(input, textarea)::placeholder { color: #b6a6b1; }
.media-box { min-inline-size: 0; margin: 1rem 0 0; padding: .85rem 1rem 1rem; border: 1px solid var(--line); border-radius: .45rem; background: #19141d; }
.media-box legend { padding-inline: .3rem; font-size: .95rem; font-weight: 700; }
.location-fields { margin-block: 0 .85rem; }
.location-button { min-height: 2.45rem; padding: .55rem .8rem; margin-bottom: .6rem; }
#location-status:not(:empty) { margin-top: .5rem; color: var(--text); }
.media-controls { display: flex; flex-wrap: wrap; gap: .6rem; }
.media-box > .media-picker, .media-controls { margin-block: .65rem; }
.media-picker { position: relative; width: fit-content; max-width: 100%; }
.media-picker .button { min-height: 2.45rem; padding: .55rem .8rem; }
.media-picker input[type='file'] { position: absolute; z-index: 1; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.media-picker input:hover + .button { color: #21151d; background: var(--text); }
.media-picker input:focus-visible + .button { outline: 2px solid var(--accent); outline-offset: 3px; }
.camera-picker { display: none; }
.media-box [data-error='true'] { margin-top: .5rem; color: #ffaca8; font-weight: 650; }
.photo-list { display: grid; gap: .4rem; margin: .65rem 0 0; padding: 0; list-style: none; }
.photo-list li { display: flex; align-items: center; gap: .55rem; min-height: 2.4rem; padding: .24rem .5rem; border: 1px solid var(--line); border-radius: .28rem; overflow-wrap: anywhere; font-size: .88rem; }
.photo-list img { flex: none; width: 2.7rem; height: 1.85rem; border-radius: .16rem; object-fit: cover; }
.photo-list span, .video-selection > span { min-width: 0; }
.video-selection { display: flex; flex-wrap: wrap; align-items: baseline; gap: .35rem .65rem; margin-top: .55rem; font-size: .9rem; overflow-wrap: anywhere; }
.text-link { color: var(--accent); }
.video-selection .text-link { border: 0; padding: 0; background: transparent; font-size: inherit; text-decoration: underline; text-underline-offset: .2em; }
.review-button { margin-top: 1.2rem; }
.draft { border-top: 1px solid var(--line); margin-top: 1.65rem; padding-top: 1.5rem; }
.draft-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem .8rem; margin-block: .9rem; }
.draft-actions .button { min-height: 2.65rem; padding: .55rem .85rem; }
.draft .form-note { margin-top: .68rem; }
.draft [role='status']:empty { margin: 0; }

.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 5rem; border-top: 1px solid var(--line); color: var(--muted); }

@media (prefers-reduced-motion: no-preference) {
  .has-motion [data-reveal] { transition: opacity .65s ease, transform .75s cubic-bezier(.2,.7,.2,1); }
  .has-motion [data-reveal]:not(.is-in-view):not(:focus-within) { opacity: .42; transform: translateY(1.6rem); }
}

@media (max-width: 48rem) {
  .header-inner { grid-template-columns: 1fr auto; min-height: 4.35rem; gap: .75rem; }
  .header-inner > .button { padding: .55rem .75rem; }
  .is-scrolled .header-inner { min-height: 3.8rem; }
  .header-inner nav { display: none; }
  .hero-inner { min-height: max(100svh, 42rem); padding-top: clamp(15.75rem, 41svh, 23rem); }
  .hero-media { bottom: auto; height: clamp(23.5rem, 61svh, 44rem); mask-image: linear-gradient(#000 70%, transparent); }
  .hero-media img { object-position: 72% 40%; }
  .hero { background: var(--background); }
  .hero::after { background: linear-gradient(0deg, #100d14 20%, rgb(16 13 20 / 78%) 41%, transparent 76%), linear-gradient(90deg, rgb(15 9 19 / 40%), transparent 80%); }
  .hero-copy { padding-block: 1.2rem 1.8rem; }
  h1 { font-size: clamp(3.65rem, 11.8vw, 6.35rem); }
  .hero .eyebrow { font-size: .7rem; }
  .hero-lead { max-width: 22rem; }
  .hero-foot { padding-block: 1rem; font-size: .8rem; }
  .chapter-inner { align-items: end; padding-top: max(15rem, 39svh); }
  .chapter-copy, .chapter-right .chapter-copy { width: 100%; padding-block: 1.4rem 1.8rem; }
  .chapter h2 { font-size: clamp(2.65rem, 9.3vw, 4.9rem); }
  .chapter-media img { object-position: var(--mobile-x) 43%; }
  .chapter::before { background: linear-gradient(0deg, rgb(var(--shadow)) 6%, rgb(var(--shadow) / 88%) 34%, rgb(var(--shadow) / 60%) 48%, transparent 79%), linear-gradient(180deg, rgb(var(--shadow) / 40%), transparent 30%); }
  .chapter-foot { padding-block: 1rem; }
  .chapter-right .chapter-foot { justify-content: start; }
  .section-heading, .service-layout, .approach-layout, .symptoms-layout { grid-template-columns: 1fr; }
  .approach-image { aspect-ratio: 1.24; }
}

@media (max-width: 53rem) {
  .request-layout { grid-template: 'intro' 'form' 'contacts' / minmax(0, 1fr); }
}

@media (max-width: 34rem) {
  .form-fields { grid-template-columns: minmax(0, 1fr); }
}

@media (any-pointer: coarse) {
  .camera-picker { display: block; }
}

@media (min-width: 48.01rem) and (max-height: 46rem) {
  h1 { font-size: clamp(4.3rem, min(9.7vw, 17svh), 10rem); }
  .story-active .hero-copy { padding-block: 1.3rem 2rem; }
}

@media (max-width: 48rem) and (max-height: 44rem) {
  .story-active .hero-inner { padding-top: 33svh; }
  .story-active .hero-copy { padding-block: .9rem 1.25rem; }
}

@media (max-width: 23rem) {
  .brand { font-size: 1.5rem; }
  .header-inner { column-gap: .5rem; }
  .header-inner > .button { padding-inline: .45rem; font-size: .875rem; }
  .button-outline { padding-inline: .75rem; }
  h1 { font-size: 3.13rem; }
  .hero .eyebrow::before { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
