/* ==================================================================
   PHILLIPS BROTHERS CONSTRUCTION, LLC
   ================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
    --primary: #1C1C1E;
    --secondary: #FFFFFF;
    --text-color: #555555;
    --accent-color: #F61B28;
    --accent-color-2: #C9141F;
    --accent-color-3: #FFE9EB;
    --accent-color-4: #F5F5F5;
    --accent-color-5: #F61B2800;
    --accent-color-6: #1C1C1E;
    --accent-color-8: #F3F3F3;

    --border: #E4E4E4;
    --border-dark: #35353A;

    --font-family-global: "Inter Tight", sans-serif;
    --font-family-label: "Montserrat", sans-serif;

    --container: 1320px;
    --gutter: 24px;
    --header-h: 148px;

    --ease: cubic-bezier(.22, .61, .36, 1);
    --dur: .45s;
}

/* ---------- 2. Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: 120px;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--secondary);
    color: var(--text-color);
    font-family: var(--font-family-global);
    font-size: 17px;
    line-height: 1.7;
    font-weight: 400;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

body.is-locked { overflow: hidden; }

h1, h2, h3, h4 {
    margin: 0;
    color: var(--primary);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -.02em;
}

p { margin: 0 0 18px; }
p:last-child { margin-bottom: 0; }

a { color: var(--accent-color); text-decoration: none; transition: color .25s var(--ease); }
a:hover { color: var(--accent-color-2); }

img {
    display: block;
    max-width: 100%;
    height: auto;
}

ul, ol { margin: 0; padding: 0; list-style: none; }

button, input, select, textarea {
    font: inherit;
    color: inherit;
    border-radius: 0;
}

button { cursor: pointer; }

:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 3px;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 999;
    padding: 12px 20px;
    background: var(--primary);
    color: #fff;
}
.skip-link:focus { left: 0; color: #fff; }

/* ---------- 3. Layout helpers ---------- */
.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.section { padding: 110px 0; }

.label {
    margin: 0 0 18px;
    font-family: var(--font-family-label);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--accent-color);
}
.label--light { color: #fff; opacity: .85; }

.section__title {
    font-size: clamp(30px, 3.6vw, 50px);
    text-transform: none;
}

.section__head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 480px);
    gap: 40px;
    align-items: end;
    margin-bottom: 56px;
}

.section__lead {
    margin: 0;
    font-size: 17px;
    color: var(--text-color);
}

/* ---------- 4. Buttons ---------- */
.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 17px 34px;
    border: 1px solid transparent;
    font-family: var(--font-family-label);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    text-align: center;
    transition: background-color .3s var(--ease), color .3s var(--ease),
                border-color .3s var(--ease), transform .3s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--accent { background: var(--accent-color); color: #fff; }
.btn--accent:hover { background: var(--accent-color-2); color: #fff; }

.btn--dark { background: var(--primary); color: #fff; }
.btn--dark:hover { background: var(--accent-color); color: #fff; }

.btn--outline { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .45); }
.btn--outline:hover { background: #fff; color: var(--primary); border-color: #fff; }

.btn--ghost { background: transparent; color: var(--primary); border-color: var(--border); }
.btn--ghost:hover { background: var(--accent-color-4); color: var(--primary); }

.btn--block { width: 100%; }
.btn[hidden] { display: none; }

/* ---------- 5. Header ---------- */
.header {
    position: sticky;
    top: 0;
    z-index: 200;
    background: var(--secondary);
    box-shadow: 0 1px 0 var(--border);
    transition: box-shadow .3s var(--ease);
}
.header.is-scrolled { box-shadow: 0 8px 30px rgba(28, 28, 30, .09); }

.header__top-inner {
    display: flex;
    align-items: center;
    gap: 32px;
    min-height: 92px;
    transition: min-height .35s var(--ease);
}
.header.is-scrolled .header__top-inner { min-height: 76px; }

/* Logo */
.logo {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    flex: 0 0 auto;
    color: var(--primary);
}
.logo:hover { color: var(--primary); }

.logo__mark {
    flex: 0 0 auto;
    width: auto;
    height: 46px;
    transition: height .35s var(--ease), transform .45s var(--ease);
}
.logo:hover .logo__mark { transform: rotate(18deg); }
.header.is-scrolled .logo__mark { height: 40px; }

.logo__text { display: flex; flex-direction: column; line-height: 1.05; }
.logo__line-1 {
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -.01em;
    text-transform: uppercase;
}
.logo__line-2 {
    font-family: var(--font-family-label);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--accent-color);
}

.logo--light { color: #fff; }
.logo--light:hover { color: #fff; }
.logo--light .logo__mark { height: 52px; }

/* Contact strip */
.header__contacts {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-left: auto;
}
.header__contact {
    display: flex;
    flex-direction: column;
    color: var(--primary);
    line-height: 1.3;
}
.header__contact-label {
    font-family: var(--font-family-label);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--text-color);
    transition: opacity .3s var(--ease), max-height .3s var(--ease);
}
.header__contact-value {
    font-size: 15px;
    font-weight: 600;
    transition: color .25s var(--ease);
}
a.header__contact:hover .header__contact-value { color: var(--accent-color); }
.header.is-scrolled .header__contact-label { opacity: 0; max-height: 0; overflow: hidden; }

.header__top { position: relative; }
/* Extends the dark quote block from the container edge to the screen edge. */
.header__top::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: max(var(--gutter), calc(50% - var(--container) / 2 + var(--gutter)));
    background: var(--primary);
    transition: background-color .3s var(--ease);
    pointer-events: none;
}
.header__top:has(.header__quote:hover)::after { background: var(--accent-color); }

.header__quote {
    flex: 0 0 auto;
    align-self: stretch;
    display: inline-flex;
    align-items: center;
    padding: 0 34px;
    background: var(--primary);
    color: #fff;
    font-family: var(--font-family-label);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    transition: background-color .3s var(--ease);
}
.header__quote:hover { background: var(--accent-color); color: #fff; }

/* Angled nav bar: full-bleed red with a white wedge under the logo */
.header__bar {
    position: relative;
    background: var(--accent-color);
}
.header__bar::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: max(272px, calc(50% - var(--container) / 2 + 272px));
    background: var(--secondary);
    clip-path: polygon(0 0, 100% 0, calc(100% - 48px) 100%, 0 100%);
}
.header__bar-inner { position: relative; z-index: 1; }

.header__bar-red {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 56px;
    padding: 0 0 0 248px;
    transition: min-height .35s var(--ease);
}
.header.is-scrolled .header__bar-red { min-height: 50px; }

.nav__list { display: flex; align-items: center; gap: 6px; }

.nav__link {
    position: relative;
    display: block;
    padding: 8px 16px;
    color: #fff;
    font-family: var(--font-family-label);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    transition: color .25s var(--ease);
}
.nav__link::after {
    content: "";
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 4px;
    height: 2px;
    background: #fff;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .35s var(--ease);
}
.nav__link:hover { color: #fff; }
.nav__link:hover::after,
.nav__link.is-active::after { transform: scaleX(1); }

.header__bar-phone {
    font-family: var(--font-family-label);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .06em;
    color: #fff;
    white-space: nowrap;
}
.header__bar-phone:hover { color: var(--accent-color-3); }

.nav__mobile-only { display: none; }

/* Burger */
.burger {
    display: none;
    width: 46px;
    height: 46px;
    padding: 0;
    border: 1px solid var(--border);
    background: transparent;
    position: relative;
}
.burger span {
    position: absolute;
    left: 13px;
    width: 18px;
    height: 2px;
    background: var(--primary);
    transition: transform .3s var(--ease), opacity .2s var(--ease), top .3s var(--ease);
}
.burger span:nth-child(1) { top: 16px; }
.burger span:nth-child(2) { top: 22px; }
.burger span:nth-child(3) { top: 28px; }
.burger.is-active span:nth-child(1) { top: 22px; transform: rotate(45deg); }
.burger.is-active span:nth-child(2) { opacity: 0; }
.burger.is-active span:nth-child(3) { top: 22px; transform: rotate(-45deg); }

/* ---------- 6. Hero ---------- */
.hero {
    position: relative;
    display: flex;
    align-items: center;
    padding: 96px 0 104px;
    background: var(--primary);
    overflow: hidden;
}
.hero__bg { position: absolute; inset: 0; }
.hero__bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 60%;
}
.hero__bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(100deg, rgba(28, 28, 30, .94) 0%, rgba(28, 28, 30, .82) 46%, rgba(28, 28, 30, .55) 100%);
}

.hero__inner {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 500px);
    gap: 64px;
    align-items: center;
}

.hero__title {
    margin: 0 0 24px;
    color: #fff;
    font-size: clamp(34px, 4.6vw, 62px);
    font-weight: 800;
    line-height: 1.06;
}
.hero__text {
    max-width: 620px;
    margin-bottom: 30px;
    color: rgba(255, 255, 255, .78);
    font-size: 17px;
}

.hero__points {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 12px;
    margin-bottom: 34px;
}
.hero__points li {
    padding: 9px 18px;
    border: 1px solid rgba(255, 255, 255, .25);
    color: #fff;
    font-family: var(--font-family-label);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    transition: border-color .3s var(--ease), background-color .3s var(--ease);
}
.hero__points li:hover { border-color: var(--accent-color); background: rgba(246, 27, 40, .16); }

.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- 7. Quote form ---------- */
.quote {
    background: var(--secondary);
    padding: 36px;
    border-top: 4px solid var(--accent-color);
    box-shadow: 0 30px 70px rgba(0, 0, 0, .3);
}

.quote__head { margin-bottom: 24px; }
.quote__title { font-size: 25px; margin-bottom: 8px; }
.quote__subtitle { margin: 0; font-size: 14.5px; line-height: 1.6; }

.form__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.field { margin-bottom: 14px; }

.field__label {
    display: block;
    margin-bottom: 7px;
    font-family: var(--font-family-label);
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--primary);
}
.field__label span { color: var(--accent-color); }

.field__input {
    width: 100%;
    padding: 13px 15px;
    background: var(--accent-color-4);
    border: 1px solid var(--accent-color-4);
    color: var(--primary);
    font-size: 15px;
    transition: border-color .25s var(--ease), background-color .25s var(--ease);
}
.field__input::placeholder { color: #9A9A9A; }
.field__input:focus {
    outline: none;
    background: var(--secondary);
    border-color: var(--accent-color);
}
.field__input--area { resize: vertical; min-height: 92px; line-height: 1.6; }

.field__input--select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 42px;
    background-image: linear-gradient(45deg, transparent 50%, var(--primary) 50%),
                      linear-gradient(135deg, var(--primary) 50%, transparent 50%);
    background-position: calc(100% - 22px) 22px, calc(100% - 16px) 22px;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
}

.field.has-error .field__input { border-color: var(--accent-color); background: var(--accent-color-3); }

.field__error {
    display: none;
    margin-top: 5px;
    font-size: 12.5px;
    line-height: 1.4;
    color: var(--accent-color-2);
}
.field__error.is-visible { display: block; }

/* Consent checkbox */
.consent {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    margin: 6px 0 4px;
    cursor: pointer;
}
.consent input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}
.consent__box {
    flex: 0 0 auto;
    position: relative;
    width: 19px;
    height: 19px;
    margin-top: 3px;
    border: 1px solid #C8C8C8;
    background: var(--secondary);
    transition: background-color .25s var(--ease), border-color .25s var(--ease);
}
.consent__box::after {
    content: "";
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) scale(0);
    transition: transform .2s var(--ease);
}
.consent input:checked + .consent__box { background: var(--accent-color); border-color: var(--accent-color); }
.consent input:checked + .consent__box::after { transform: rotate(45deg) scale(1); }
.consent input:focus-visible + .consent__box { outline: 2px solid var(--accent-color); outline-offset: 2px; }
.consent__text { font-size: 13.5px; line-height: 1.55; }

.form__submit { margin-top: 18px; min-height: 56px; }
.form__submit[disabled] { opacity: .75; cursor: progress; transform: none; }

.spinner {
    display: none;
    width: 19px;
    height: 19px;
    border: 2px solid rgba(255, 255, 255, .35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .7s linear infinite;
}
.form__submit.is-loading .form__submit-label { display: none; }
.form__submit.is-loading .spinner { display: block; }

@keyframes spin { to { transform: rotate(360deg); } }

.form__note {
    margin: 12px 0 0;
    font-size: 12.5px;
    line-height: 1.5;
    color: #8A8A8A;
    text-align: center;
}

.form__result {
    margin-top: 18px;
    padding: 18px 20px;
    border-left: 3px solid var(--accent-color);
    background: var(--accent-color-3);
    font-size: 14.5px;
    line-height: 1.6;
    animation: fadeUp .4s var(--ease) both;
}
.form__result strong { display: block; margin-bottom: 4px; color: var(--primary); font-size: 16px; }
.form__result.is-error { border-left-color: var(--primary); background: var(--accent-color-4); }

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: none; }
}

/* ---------- 8. Services: hover-expanding image cards ---------- */
.services { background: var(--secondary); }

.services__list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.svc {
    position: relative;
    isolation: isolate;
    min-height: 210px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    background: var(--primary);
    transition: min-height .6s var(--ease);
}

/* Extra veil that fades in as the card opens, so the long text stays readable. */
.svc::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: rgba(28, 28, 30, .45);
    opacity: 0;
    transition: opacity .6s var(--ease);
    pointer-events: none;
}

.svc__bg { position: absolute; inset: 0; z-index: -2; }
.svc__bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
    transition: transform 1.1s var(--ease);
}
.svc__bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(28, 28, 30, .94) 0%, rgba(28, 28, 30, .78) 48%, rgba(28, 28, 30, .38) 100%),
        linear-gradient(0deg, rgba(28, 28, 30, .5) 0%, var(--accent-color-5) 60%);
    transition: opacity .6s var(--ease);
}

.svc__inner {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 880px;
    padding: 34px 38px 34px;
}

.svc__head { position: relative; padding-left: 62px; }

.svc__no {
    position: absolute;
    left: 0;
    top: 2px;
    font-family: var(--font-family-label);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .1em;
    color: var(--accent-color);
}

.svc__title {
    margin: 0 0 8px;
    color: #fff;
    font-size: clamp(21px, 2.1vw, 30px);
    font-weight: 700;
    line-height: 1.16;
}
.svc__short {
    max-width: 560px;
    margin: 0;
    color: rgba(255, 255, 255, .74);
    font-size: 15.5px;
    line-height: 1.55;
}

.svc__more {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows .6s var(--ease);
}
.svc__more-inner {
    overflow: hidden;
    min-height: 0;
    opacity: 0;
    transform: translateY(14px);
    transition: opacity .45s var(--ease), transform .55s var(--ease);
}

.svc__par {
    margin: 22px 0 0;
    padding-left: 62px;
    color: rgba(255, 255, 255, .8);
    font-size: 15.5px;
    line-height: 1.7;
}
.svc__par + .svc__par { margin-top: 12px; }

.svc__list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px 28px;
    margin-top: 22px;
    padding-left: 62px;
}
.svc__list li {
    position: relative;
    padding-left: 18px;
    color: rgba(255, 255, 255, .88);
    font-size: 14.5px;
    line-height: 1.5;
}
.svc__list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 10px;
    width: 8px;
    height: 2px;
    background: var(--accent-color);
}

.svc__cta {
    position: relative;
    z-index: 2;
    display: inline-block;
    margin: 26px 0 4px 62px;
    padding: 12px 26px;
    background: var(--accent-color);
    color: #fff;
    font-family: var(--font-family-label);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    transition: background-color .3s var(--ease);
}
.svc__cta:hover { background: var(--accent-color-2); color: #fff; }

/* Pointer devices: collapsed until hovered or keyboard-focused. */
@media (hover: hover) {
    .svc:hover,
    .svc:focus-within { min-height: 400px; }

    .svc:hover .svc__more,
    .svc:focus-within .svc__more { grid-template-rows: 1fr; }

    .svc:hover .svc__more-inner,
    .svc:focus-within .svc__more-inner {
        opacity: 1;
        transform: none;
        transition-delay: .12s;
    }

    .svc:hover .svc__bg img,
    .svc:focus-within .svc__bg img { transform: scale(1); }

    .svc:hover::after,
    .svc:focus-within::after { opacity: 1; }

    .svc:hover .svc__cta,
    .svc:focus-within .svc__cta { background: var(--accent-color-2); }
}

/* Touch devices have no hover: show everything straight away. */
@media (hover: none) {
    .svc { min-height: 0; }
    .svc::after { opacity: 1; }
    .svc__more { grid-template-rows: 1fr; }
    .svc__more-inner { opacity: 1; transform: none; }
}

/* ---------- 9. About ---------- */
.about { background: var(--accent-color-4); }

.about__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 70px;
    align-items: center;
}

.about__media { position: relative; padding-bottom: 70px; }
.about__img { overflow: hidden; }
.about__img img { width: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.about__img:hover img { transform: scale(1.04); }

.about__img--main img { aspect-ratio: 4 / 3; }

.about__img--sub {
    position: absolute;
    right: -10px;
    bottom: 0;
    width: 52%;
    border: 8px solid var(--accent-color-4);
}
.about__img--sub img { aspect-ratio: 16 / 10; }

.about__badge {
    position: absolute;
    left: 0;
    bottom: 34px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 20px 26px;
    background: var(--accent-color);
    color: #fff;
}
.about__badge-value { font-size: 30px; font-weight: 800; line-height: 1; }
.about__badge-label {
    font-family: var(--font-family-label);
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.about__lead {
    margin: 22px 0 20px;
    color: var(--primary);
    font-size: 19px;
    font-weight: 500;
    line-height: 1.6;
}
.about__par { font-size: 16px; }
.about .btn { margin-top: 14px; }

.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    margin-top: 80px;
    border: 1px solid var(--border);
    background: var(--secondary);
}
.stats__item {
    padding: 34px 30px;
    border-right: 1px solid var(--border);
    transition: background-color .35s var(--ease);
}
.stats__item:last-child { border-right: 0; }
.stats__item:hover { background: var(--accent-color-3); }

.stats__value {
    display: block;
    margin-bottom: 6px;
    color: var(--accent-color);
    font-size: 36px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -.02em;
}
.stats__label {
    display: block;
    font-size: 14.5px;
    line-height: 1.5;
}

/* ---------- 10. Process ---------- */
.process { background: var(--secondary); padding-bottom: 130px; }

.process__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 430px);
    gap: 70px;
    align-items: start;
}

.process__steps {
    position: relative;
    padding: 20px 0 20px 0;
}

.process__rail {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--accent-color-3);
    transform: translateX(-50%);
}
.process__rail-fill {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 0;
    background: var(--accent-color);
    transition: height .3s linear;
}

.pstep {
    position: relative;
    width: 46%;
    padding: 30px 0 60px;
    opacity: .38;
    transform: translateY(14px);
    transition: opacity .55s var(--ease), transform .55s var(--ease);
}
.pstep--offset { margin-left: 54%; }
.pstep.is-active { opacity: 1; transform: none; }

.pstep__ghost {
    position: absolute;
    right: 0;
    top: 6px;
    font-size: 110px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -.04em;
    color: var(--accent-color-3);
    z-index: 0;
    transition: color .55s var(--ease), transform .55s var(--ease);
}
.pstep--offset .pstep__ghost { right: auto; left: 0; }
.pstep.is-active .pstep__ghost { transform: translateY(-6px); }

.pstep__no,
.pstep__title,
.pstep__text { position: relative; z-index: 1; }

.pstep__no {
    display: inline-block;
    margin-bottom: 12px;
    padding: 5px 12px;
    background: var(--primary);
    color: #fff;
    font-family: var(--font-family-label);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .12em;
    transition: background-color .45s var(--ease);
}
.pstep.is-active .pstep__no { background: var(--accent-color); }

.pstep__title { margin-bottom: 10px; font-size: clamp(20px, 2vw, 26px); }
.pstep__text { margin: 0; font-size: 15.5px; }

.process__panel {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    align-items: center;
}
.process__sticky { width: 100%; max-height: 100%; }
.process__title { margin-bottom: 20px; font-size: clamp(30px, 3.4vw, 47px); }
.process__text { margin-bottom: 28px; font-size: 16.5px; }

.process__progress { margin-top: 36px; }
.process__progress-count {
    display: block;
    margin-bottom: 10px;
    font-family: var(--font-family-label);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .14em;
    color: var(--primary);
}
.process__progress-bar {
    display: block;
    height: 3px;
    background: var(--accent-color-3);
}
.process__progress-bar span {
    display: block;
    width: 0;
    height: 100%;
    background: var(--accent-color);
    transition: width .35s var(--ease);
}

/* ---------- 11. Closing CTA ---------- */
.cta {
    position: relative;
    padding: 120px 0;
    background: var(--primary);
    overflow: hidden;
}
/* The frame is 125% of the section and anchored to the top, so the bottom
   fifth of the source clip (which carries a burnt-in logo) is always cut off
   by the section's own overflow, whatever the viewport aspect ratio is. */
.cta__bg {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 125%;
    background: var(--primary);
}
.cta__video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 38%;
}
.cta__bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(28, 28, 30, .88), rgba(28, 28, 30, .78));
}

.cta__inner {
    position: relative;
    z-index: 2;
    max-width: 780px;
    text-align: center;
}
.cta__title {
    margin-bottom: 20px;
    color: #fff;
    font-size: clamp(30px, 3.8vw, 52px);
    font-weight: 800;
}
.cta__text {
    margin-bottom: 34px;
    color: rgba(255, 255, 255, .78);
    font-size: 17px;
}
.cta__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: center;
}

/* ---------- 12. Footer ---------- */
.footer {
    padding: 84px 0 0;
    background: var(--primary);
    color: rgba(255, 255, 255, .68);
    font-size: 15px;
}

.footer__grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 60px;
}

.footer__about { margin: 22px 0 18px; line-height: 1.65; }

.footer__area span {
    display: block;
    margin-bottom: 4px;
    font-family: var(--font-family-label);
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--accent-color);
}

.footer__title {
    margin-bottom: 20px;
    color: #fff;
    font-size: 13px;
    font-family: var(--font-family-label);
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
}
.footer__title--spaced { margin-top: 30px; }

.footer__contacts li { margin-bottom: 16px; line-height: 1.6; }
.footer__label {
    display: block;
    margin-bottom: 2px;
    font-family: var(--font-family-label);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .42);
}
.footer__contacts a { color: #fff; }
.footer__contacts a:hover { color: var(--accent-color); }

.footer__links li { margin-bottom: 9px; }
.footer__links a { color: rgba(255, 255, 255, .68); }
.footer__links a:hover { color: var(--accent-color); }

.footer__hours li {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-dark);
    font-size: 14px;
}
.footer__hours li span:last-child { color: #fff; white-space: nowrap; }

.footer__bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 24px 0;
    border-top: 1px solid var(--border-dark);
}
.footer__copy { margin: 0; font-size: 14px; }

.footer__legal { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer__legal a,
.footer__legal-btn { color: rgba(255, 255, 255, .68); font-size: 14px; }
.footer__legal a:hover,
.footer__legal-btn:hover { color: var(--accent-color); }
.footer__legal-btn {
    padding: 0;
    background: none;
    border: 0;
    font-family: inherit;
    transition: color .25s var(--ease);
}

/* ---------- 13. Back to top ---------- */
.to-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 150;
    width: 48px;
    height: 48px;
    padding: 0;
    background: var(--accent-color);
    border: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity .35s var(--ease), transform .35s var(--ease),
                background-color .3s var(--ease), visibility .35s;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--accent-color-2); }
.to-top span {
    position: absolute;
    left: 50%;
    top: 54%;
    width: 10px;
    height: 10px;
    border: solid #fff;
    border-width: 2px 2px 0 0;
    transform: translate(-50%, -50%) rotate(-45deg);
}

/* ---------- 14. Cookie consent ---------- */
.cookie {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 300;
    background: var(--secondary);
    border-top: 3px solid var(--accent-color);
    box-shadow: 0 -16px 50px rgba(0, 0, 0, .18);
    transform: translateY(102%);
    transition: transform .5s var(--ease);
}
.cookie.is-visible { transform: none; }
.cookie[hidden] { display: none; }

.cookie__inner {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 26px var(--gutter);
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 20px 40px;
    align-items: center;
    max-height: 84vh;
    overflow-y: auto;
}

.cookie__title { margin-bottom: 7px; font-size: 19px; }
.cookie__text { margin: 0; font-size: 14.5px; line-height: 1.6; }

.cookie__options {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    padding-top: 6px;
    border-top: 1px solid var(--border);
}
.cookie__options[hidden] { display: none; }

.cookie__option {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 12px;
    padding-top: 18px;
    cursor: pointer;
}
.cookie__option.is-locked { cursor: default; }
.cookie__option input { position: absolute; opacity: 0; width: 1px; height: 1px; }

.cookie__switch {
    position: relative;
    width: 38px;
    height: 20px;
    margin-top: 3px;
    background: #D6D6D6;
    transition: background-color .3s var(--ease);
}
.cookie__switch::after {
    content: "";
    position: absolute;
    left: 2px;
    top: 2px;
    width: 16px;
    height: 16px;
    background: #fff;
    transition: transform .3s var(--ease);
}
.cookie__option input:checked + .cookie__switch { background: var(--accent-color); }
.cookie__option input:checked + .cookie__switch::after { transform: translateX(18px); }
.cookie__option.is-locked .cookie__switch { background: #9C9C9C; }
.cookie__option input:focus-visible + .cookie__switch { outline: 2px solid var(--primary); outline-offset: 2px; }

.cookie__option-title {
    display: block;
    margin-bottom: 4px;
    color: var(--primary);
    font-family: var(--font-family-label);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
}
.cookie__option-text { display: block; font-size: 13.5px; line-height: 1.55; }

.cookie__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}
.cookie__actions .btn { padding: 14px 24px; font-size: 12px; }

/* ---------- 15. Legal pages ---------- */
.page-hero {
    position: relative;
    padding: 84px 0;
    background: var(--primary);
}
.page-hero__title {
    max-width: 900px;
    color: #fff;
    font-size: clamp(30px, 4vw, 50px);
    font-weight: 800;
}
.page-hero__meta {
    margin: 18px 0 0;
    color: rgba(255, 255, 255, .6);
    font-family: var(--font-family-label);
    font-size: 12px;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.legal { padding: 80px 0 100px; }
.legal__inner {
    display: grid;
    grid-template-columns: minmax(0, 250px) minmax(0, 1fr);
    gap: 60px;
    align-items: start;
}

.legal__aside { position: sticky; top: 170px; }
.legal__aside-title {
    margin-bottom: 16px;
    font-family: var(--font-family-label);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--primary);
}
.legal__aside ul li { margin-bottom: 9px; }
.legal__aside a { color: var(--text-color); font-size: 14.5px; }
.legal__aside a:hover { color: var(--accent-color); }
.legal__aside a.is-current { color: var(--accent-color); font-weight: 600; }

.prose { max-width: 820px; }
.prose h2 {
    margin: 42px 0 14px;
    font-size: 24px;
}
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin: 26px 0 10px; font-size: 18px; }
.prose p { font-size: 16px; }
.prose ul { margin: 0 0 18px; }
.prose ul li {
    position: relative;
    margin-bottom: 8px;
    padding-left: 20px;
    font-size: 16px;
}
.prose ul li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 12px;
    width: 8px;
    height: 2px;
    background: var(--accent-color);
}
.prose__note {
    margin: 30px 0;
    padding: 22px 26px;
    background: var(--accent-color-4);
    border-left: 3px solid var(--accent-color);
    font-size: 15.5px;
}
.prose a { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- 16. Reveal animation ---------- */
.reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- 17. Responsive ---------- */
@media (max-width: 1180px) {
    .header__contact--plain { display: none; }
    .header__bar::before { width: 234px; }
    .header__bar-red { padding-left: 214px; }
    .process__inner { gap: 44px; }
    .footer__grid { grid-template-columns: 1fr 1fr; gap: 40px; }
}

@media (max-width: 1024px) {
    .section { padding: 84px 0; }
    html { scroll-padding-top: 96px; }

    .hero__inner { grid-template-columns: 1fr; gap: 46px; }
    .hero__content { max-width: 720px; }
    .quote { max-width: 620px; }

    .section__head { grid-template-columns: 1fr; gap: 20px; align-items: start; }

    .svc__inner { max-width: none; padding: 30px 30px; }
    .svc:hover, .svc:focus-within { min-height: 0; }

    .about__inner { grid-template-columns: 1fr; gap: 52px; }
    .about__media { max-width: 620px; }

    .process__inner { grid-template-columns: 1fr; gap: 40px; }
    .process__panel { order: -1; }
    .process__sticky { position: static; }
    .process__rail { left: 7px; transform: none; }
    .pstep { width: 100%; padding-left: 40px; }
    .pstep--offset { margin-left: 0; }
    .pstep__ghost { right: 0; left: auto; font-size: 86px; }
    .pstep--offset .pstep__ghost { right: 0; left: auto; }

    .cookie__inner { grid-template-columns: 1fr; }
    .cookie__actions { justify-content: flex-start; }
    .cookie__options { grid-template-columns: 1fr; gap: 0; }

    .legal__inner { grid-template-columns: 1fr; gap: 36px; }
    .legal__aside { position: static; }
    .legal__aside ul { display: flex; flex-wrap: wrap; gap: 8px 22px; }
}

@media (max-width: 900px) {
    :root { --gutter: 20px; }

    .burger { display: block; margin-left: auto; }
    .header__contacts,
    .header__quote { display: none; }
    .header__top-inner { min-height: 74px; gap: 16px; }

    .header__bar {
        position: absolute;
        left: 0;
        right: 0;
        top: 100%;
        background: var(--accent-color);
        max-height: 0;
        overflow: hidden;
        transition: max-height .45s var(--ease);
        box-shadow: 0 18px 40px rgba(0, 0, 0, .18);
    }
    .header__bar.is-open { max-height: 80vh; overflow-y: auto; }

    .header__bar::before { display: none; }
    .header__bar-red {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 14px 20px 20px;
        clip-path: none;
    }
    .nav__list { flex-direction: column; align-items: stretch; gap: 0; }
    .nav__link { padding: 13px 0; border-bottom: 1px solid rgba(255, 255, 255, .22); font-size: 14px; }
    .nav__link::after { display: none; }
    .nav__link--cta {
        margin-top: 14px;
        border: 0;
        background: var(--primary);
        text-align: center;
    }
    .nav__mobile-only { display: block; }
    .header__bar-phone { display: none; }

    .stats { grid-template-columns: 1fr 1fr; }
    .stats__item:nth-child(2n) { border-right: 0; }
    .stats__item:nth-child(-n+2) { border-bottom: 1px solid var(--border); }

    .footer__grid { grid-template-columns: 1fr; gap: 34px; padding-bottom: 42px; }
    .footer { padding-top: 62px; }
}

@media (max-width: 680px) {
    body { font-size: 16px; }
    .section { padding: 64px 0; }

    .hero { padding: 62px 0 70px; }
    .hero__bg::after { background: linear-gradient(180deg, rgba(28, 28, 30, .9), rgba(28, 28, 30, .86)); }
    .hero__actions .btn,
    .cta__actions .btn { width: 100%; }

    .quote { padding: 26px 20px; }
    .form__row { grid-template-columns: 1fr; gap: 0; }

    .services__list { gap: 10px; }
    .svc { min-height: 0; }
    .svc__inner { padding: 24px 20px; }
    .svc__head { padding-left: 0; }
    .svc__no { position: static; display: block; margin-bottom: 8px; }
    .svc__title { font-size: 21px; }
    .svc__par, .svc__list, .svc__cta { padding-left: 0; }
    .svc__cta { margin-left: 0; width: 100%; text-align: center; }
    .svc__list { grid-template-columns: 1fr; }

    .about__media { padding-bottom: 0; }
    .about__img--sub { position: static; width: 100%; margin-top: 14px; border: 0; }
    .about__badge { position: static; display: inline-flex; margin-top: 14px; }

    .stats { grid-template-columns: 1fr; margin-top: 46px; }
    .stats__item { border-right: 0; border-bottom: 1px solid var(--border); }
    .stats__item:last-child { border-bottom: 0; }
    .stats__item:nth-child(-n+2) { border-bottom: 1px solid var(--border); }

    .pstep { padding: 20px 0 44px 34px; }
    .pstep__ghost { font-size: 64px; top: 0; opacity: .8; }

    .cta { padding: 74px 0; }
    .cookie__actions .btn { width: 100%; }
    .to-top { right: 16px; bottom: 16px; width: 44px; height: 44px; }
}

/* ---------- 18. 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;
    }
    .reveal { opacity: 1; transform: none; }
    .pstep { opacity: 1; transform: none; }
    .svc__more-inner { opacity: 1; transform: none; }
}

/* ---------- 19. Print ---------- */
@media print {
    .header, .footer, .cookie, .to-top, .quote, .cta { display: none !important; }
    body { color: #000; }
}
