*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 0;
    scroll-snap-type: y mandatory;
}

.redesign-page {
    margin: 0;
    overflow-x: hidden;
    color: var(--ds-color-ink);
    background: var(--ds-color-paper);
    font-family: var(--ds-font-body);
    line-height: 1.55;
}

.redesign-page a {
    color: inherit;
}

.redesign-page :focus-visible {
    outline: 3px solid var(--ds-color-accent);
    outline-offset: 3px;
}

.redesign-page img {
    display: block;
    height: auto;
    max-width: 100%;
}

.redesign-page h1,
.redesign-page h2,
.redesign-page h3,
.redesign-page p {
    margin-top: 0;
}

.redesign-page h1,
.redesign-page h2,
.redesign-page h3,
.rd-main-nav,
.rd-phone,
.rd-next,
.rd-footer {
    font-family: var(--ds-font-display);
}

.redesign-page h1 {
    max-width: 720px;
    margin-bottom: var(--ds-space-4);
    font-size: var(--ds-text-h1);
    font-weight: 500;
    letter-spacing: -0.045em;
    line-height: 0.98;
}

.redesign-page h2 {
    max-width: 720px;
    margin-bottom: var(--ds-space-3);
    font-size: var(--ds-text-h2);
    font-weight: 500;
    letter-spacing: -0.035em;
    line-height: 1.05;
}

.redesign-page h3 {
    margin-bottom: var(--ds-space-2);
    font-size: var(--ds-text-h3);
    font-weight: 500;
}

.rd-container {
    width: var(--ds-container);
    margin-inline: auto;
}

.rd-skip-link {
    position: fixed;
    top: var(--ds-space-1);
    left: var(--ds-space-1);
    z-index: 100;
    padding: var(--ds-space-2) var(--ds-space-3);
    transform: translateY(-160%);
    background: var(--ds-color-white);
}

.rd-skip-link:focus {
    transform: none;
}

#rd-main:focus {
    outline: 0;
}

.rd-header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 30;
    display: grid;
    grid-template-columns: minmax(190px, 1fr) auto auto auto;
    min-height: 76px;
    align-items: center;
    gap: clamp(18px, 2.3vw, 30px);
    padding: 10px max(32px, calc((100% - 1180px) / 2));
    border-bottom: 1px solid transparent;
    transition: background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.rd-header.is-scrolled {
    border-color: var(--ds-color-line);
    background: rgba(248, 247, 242, 0.94);
    box-shadow: 0 12px 30px rgba(23, 36, 61, 0.05);
    backdrop-filter: blur(12px);
}

.rd-brand {
    width: 190px;
    text-decoration: none;
}

.rd-brand-image {
    display: block;
    width: 100%;
    height: 52px;
    object-fit: contain;
    object-position: left center;
}

.rd-mobile-menu {
    display: none;
}

.rd-main-nav {
    display: flex;
    gap: var(--ds-space-4);
}

.rd-main-nav a,
.rd-phone {
    color: var(--ds-color-ink);
    font-size: var(--ds-text-sm);
    text-decoration: none;
}

.rd-main-nav a:hover,
.rd-main-nav a:focus-visible,
.rd-phone:hover,
.rd-phone:focus-visible {
    color: var(--ds-color-brand);
    text-decoration: underline;
    text-underline-offset: 5px;
}

.rd-phone {
    white-space: nowrap;
}

.rd-header-button {
    min-height: 44px;
    padding-inline: 18px;
}

.rd-chapter {
    position: relative;
    display: grid;
    min-height: 100svh;
    align-items: center;
    padding: 120px 0 76px;
    scroll-snap-align: start;
    scroll-snap-stop: normal;
    border-bottom: 1px solid var(--ds-color-line);
}

.rd-help {
    background: var(--ds-color-paper-blue);
}

.rd-specialist {
    background: var(--ds-color-paper-warm);
}

.rd-process {
    background: var(--ds-color-paper);
}

.rd-reviews-chapter {
    background: var(--ds-color-paper-warm);
}

.rd-contact {
    align-content: center;
    padding-bottom: 100px;
    background: var(--ds-color-paper-blue);
}

.rd-chapter-content {
    display: grid;
    gap: clamp(28px, 4vw, 42px);
}

.rd-section-heading {
    display: grid;
    grid-template-columns: minmax(140px, 2fr) 5fr 4fr;
    align-items: end;
    gap: var(--ds-space-5);
}

.rd-section-heading .ui-kicker,
.rd-section-heading h2,
.rd-section-heading > p:last-child {
    margin-bottom: 0;
}

.rd-section-heading > p:last-child {
    color: var(--ds-color-muted);
}

.rd-next {
    position: absolute;
    bottom: 22px;
    left: 50%;
    display: flex;
    align-items: center;
    gap: var(--ds-space-2);
    color: var(--ds-color-muted);
    font-size: var(--ds-text-sm);
    text-decoration: none;
    transform: translateX(-50%);
}

.rd-next span {
    color: var(--ds-color-brand);
    font-size: 1.25rem;
}

.rd-hero-layout {
    display: grid;
    grid-template-columns: 5fr 7fr;
    align-items: center;
    gap: clamp(36px, 7vw, 96px);
}

.rd-hero-copy {
    min-width: 0;
}

.rd-lead {
    max-width: 640px;
    color: var(--ds-color-muted);
    font-size: var(--ds-text-lead);
}

.rd-hero-actions {
    display: flex;
    align-items: center;
    gap: var(--ds-space-4);
    margin: var(--ds-space-5) 0;
}

.rd-hero-facts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--ds-space-4);
    color: var(--ds-color-muted);
}

.rd-hero-facts span {
    display: grid;
    padding-top: var(--ds-space-2);
    border-top: 1px solid var(--ds-color-line);
}

.rd-hero-facts b {
    color: var(--ds-color-ink);
}

.rd-hero-photo,
.rd-route-card {
    display: grid;
    min-height: min(68svh, 650px);
    place-items: center;
    align-content: center;
    border-radius: 48% 22px 22px 48%;
    background: rgba(0, 75, 145, 0.07);
    color: var(--ds-color-muted);
    text-align: center;
}

.rd-hero-photo {
    margin: 0;
    overflow: hidden;
}

.rd-hero-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 58% center;
}

.rd-route-card {
    padding: var(--ds-space-5);
}

.rd-hero-photo strong,
.rd-route-card strong {
    margin: var(--ds-space-1) 0;
    color: var(--ds-color-ink);
    font-family: var(--ds-font-display);
    font-size: 1.25rem;
    font-weight: 500;
}

.rd-services-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--ds-space-4);
}

.rd-services-grid article,
.rd-steps li {
    padding-top: var(--ds-space-3);
    border-top: 2px solid var(--ds-color-brand);
}

.rd-services-grid article > span,
.rd-steps li > span {
    color: var(--ds-color-brand);
    font-family: var(--ds-font-display);
    font-size: var(--ds-text-xs);
}

.rd-services-grid p,
.rd-steps p {
    margin-bottom: 0;
    color: var(--ds-color-muted);
}

.rd-trust-line {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--ds-space-4);
    padding-top: var(--ds-space-4);
    border-top: 1px solid var(--ds-color-line);
}

.rd-trust-line span {
    display: grid;
    color: var(--ds-color-muted);
}

.rd-trust-line b {
    color: var(--ds-color-ink);
}

.rd-price-link {
    justify-self: start;
}

.rd-specialist-layout,
.rd-contact-layout {
    display: grid;
    grid-template-columns: 5fr 7fr;
    align-items: center;
    gap: clamp(40px, 8vw, 110px);
}

.rd-specialist-photo {
    min-height: min(66svh, 620px);
    margin: 0;
    overflow: hidden;
    border-radius: var(--ds-radius-photo);
    background: var(--ds-color-paper-blue);
    box-shadow: var(--ds-shadow-soft);
}

.rd-specialist-photo img {
    width: 100%;
    height: min(66svh, 620px);
    object-fit: cover;
    object-position: center 30%;
}

.rd-specialist-copy {
    display: grid;
    align-content: center;
}

.rd-heading-aside {
    margin: -8px 0 var(--ds-space-4) clamp(24px, 8vw, 118px);
    color: var(--ds-color-brand);
    font-size: var(--ds-text-sm);
}

.rd-specialist-story {
    display: grid;
    max-width: 62ch;
    gap: 10px;
}

.rd-specialist-story p {
    margin: 0;
    color: var(--ds-color-muted);
    line-height: 1.52;
}

.rd-specialist-story p:first-child {
    color: var(--ds-color-ink);
}

.rd-fact-list {
    display: grid;
    margin-top: var(--ds-space-3);
}

.rd-fact-list span {
    padding: 10px 0;
    border-bottom: 1px solid rgba(23, 36, 61, 0.16);
}

.rd-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--ds-space-4);
    margin: 0;
    padding: 0;
    list-style: none;
}

.rd-reviews {
    display: grid;
    gap: var(--ds-space-4);
    padding-top: var(--ds-space-4);
    border-top: 1px solid var(--ds-color-line);
}

.rd-reviews-chapter .rd-reviews {
    padding-top: 0;
    border-top: 0;
}

.rd-reviews-heading,
.rd-reviews-footer,
.rd-review-card-heading,
.rd-review-actions,
.rd-reviews-footer > div {
    display: flex;
    align-items: center;
}

.rd-reviews-heading,
.rd-reviews-footer {
    justify-content: space-between;
    gap: var(--ds-space-4);
}

.rd-reviews-heading h3,
.rd-reviews-heading p,
.rd-review-card p {
    margin-bottom: 0;
}

.rd-reviews-heading > div:first-child > p:last-child {
    margin-top: 4px;
    color: var(--ds-color-muted);
}

.rd-review-actions,
.rd-reviews-footer > div {
    gap: var(--ds-space-2);
}

.rd-review-arrow {
    display: inline-grid;
    width: 44px;
    height: 44px;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(0, 75, 145, 0.28);
    border-radius: 50%;
    color: var(--ds-color-brand);
    background: transparent;
    font: 600 1.15rem/1 var(--ds-font-body);
    cursor: pointer;
    transition: color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.rd-review-arrow:hover,
.rd-review-arrow:focus-visible {
    color: var(--ds-color-white);
    background: var(--ds-color-brand);
    transform: translateY(-2px);
}

.rd-review-viewport {
    width: 100%;
    overflow: hidden;
    cursor: grab;
    touch-action: pan-y;
    user-select: none;
}

.rd-review-viewport.is-dragging {
    cursor: grabbing;
}

.rd-review-track {
    display: flex;
    width: max-content;
    gap: var(--ds-space-3);
    padding: 2px;
}

.rd-review-card {
    display: grid;
    width: clamp(280px, 38vw, 430px);
    min-height: 164px;
    align-content: space-between;
    gap: var(--ds-space-3);
    padding: var(--ds-space-4);
    border: 1px solid rgba(23, 36, 61, 0.12);
    border-radius: var(--ds-radius-card);
    background: var(--ds-color-white);
    box-shadow: 0 12px 34px rgba(23, 36, 61, 0.06);
}

.rd-review-card-heading {
    justify-content: space-between;
    gap: var(--ds-space-3);
}

.rd-review-card-heading strong {
    font-family: var(--ds-font-display);
    font-weight: 500;
}

.rd-review-card-heading span {
    color: var(--ds-color-accent);
    letter-spacing: 0.08em;
    white-space: nowrap;
}

.rd-review-card p {
    display: -webkit-box;
    overflow: hidden;
    font-size: var(--ds-text-lead);
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 7;
}

.rd-review-card small,
.rd-reviews-footer > span {
    color: var(--ds-color-muted);
    font-size: var(--ds-text-xs);
}

.rd-reviews-footer {
    padding-top: var(--ds-space-1);
}

.rd-contact-list {
    display: grid;
    margin: var(--ds-space-4) 0 var(--ds-space-5);
}

.rd-contact-list p {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: var(--ds-space-3);
    margin: 0;
    padding: 10px 0;
    border-bottom: 1px solid rgba(23, 36, 61, 0.15);
}

.rd-contact-list a {
    color: var(--ds-color-brand);
    text-underline-offset: 4px;
}

.rd-route-card {
    min-height: min(58svh, 540px);
    border-radius: 48% 22px 22px 22px;
    text-decoration: none;
    transition: background-color 160ms ease, transform 160ms ease;
}

.rd-route-card:hover,
.rd-route-card:focus-visible {
    background: rgba(0, 75, 145, 0.11);
    transform: translateY(-3px);
}

.rd-footer {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: var(--ds-space-3);
    padding: 20px 0;
    color: var(--ds-color-muted);
    font-size: var(--ds-text-xs);
}

.rd-footer :last-child {
    text-align: right;
}

.rd-chapter-nav {
    position: fixed;
    top: 50%;
    right: 24px;
    z-index: 25;
    display: grid;
    gap: var(--ds-space-1);
    transform: translateY(-50%);
}

.rd-chapter-nav a {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 1px solid transparent;
    border-radius: 50%;
    color: var(--ds-color-muted);
    font-family: var(--ds-font-display);
    font-size: 0.68rem;
    text-decoration: none;
}

.rd-chapter-nav a.is-active {
    background: var(--ds-color-brand);
    color: var(--ds-color-white);
}

.rd-chapter-nav a:hover,
.rd-chapter-nav a:focus-visible {
    border-color: var(--ds-color-brand);
}

@media screen and (max-width: 980px) {
    html {
        scroll-padding-top: 64px;
        scroll-snap-type: none;
    }

    .rd-header {
        grid-template-columns: auto 1fr auto auto;
        min-height: 64px;
        padding: 8px 20px;
        gap: var(--ds-space-2);
    }

    .rd-brand {
        width: 50px;
    }

    .rd-main-nav,
    .rd-phone {
        display: none;
    }

    .rd-brand-image {
        display: block;
        width: 48px;
        height: 48px;
    }

    .rd-mobile-menu {
        position: relative;
        display: block;
        grid-column: 3;
    }

    .rd-mobile-menu summary {
        display: grid;
        min-width: 52px;
        min-height: 44px;
        place-items: center;
        border: 1px solid var(--ds-color-line);
        border-radius: var(--ds-radius-pill);
        background: var(--ds-color-white);
        color: var(--ds-color-ink);
        cursor: pointer;
        font-family: var(--ds-font-display);
        font-size: var(--ds-text-sm);
        list-style: none;
    }

    .rd-mobile-menu summary::-webkit-details-marker {
        display: none;
    }

    .rd-mobile-menu[open] summary {
        border-color: var(--ds-color-brand);
        color: var(--ds-color-brand);
    }

    .rd-mobile-menu nav {
        position: fixed;
        top: 72px;
        right: 16px;
        display: grid;
        width: min(300px, calc(100% - 32px));
        padding: var(--ds-space-2);
        border: 1px solid var(--ds-color-line);
        border-radius: var(--ds-radius-card);
        background: var(--ds-color-white);
        box-shadow: var(--ds-shadow-lifted);
    }

    .rd-mobile-menu nav a {
        min-height: 48px;
        padding: 12px 14px;
        border-radius: var(--ds-radius-small);
        font-family: var(--ds-font-display);
        text-decoration: none;
    }

    .rd-mobile-menu nav a:hover,
    .rd-mobile-menu nav a:focus-visible,
    .rd-mobile-menu nav a[aria-current="page"] {
        background: var(--ds-color-paper-blue);
        color: var(--ds-color-brand);
    }

    .rd-header-button {
        grid-column: 4;
        justify-self: end;
    }

    .rd-chapter {
        min-height: auto;
        padding: 104px 0 70px;
        scroll-snap-align: none;
    }

    .rd-chapter:first-of-type {
        min-height: 100svh;
    }

    .rd-chapter-nav,
    .rd-next {
        display: none;
    }

    .rd-hero-layout,
    .rd-specialist-layout,
    .rd-contact-layout,
    .rd-section-heading {
        grid-template-columns: 1fr;
    }

    .rd-hero-photo {
        min-height: 380px;
        border-radius: 50% 50% 22px 22px;
    }

    .rd-section-heading {
        gap: var(--ds-space-2);
    }

    .rd-services-grid {
        grid-template-columns: 1fr 1fr;
    }

    .rd-trust-line,
    .rd-steps {
        grid-template-columns: 1fr;
    }

    .rd-specialist-photo {
        width: min(100%, 540px);
        min-height: 420px;
    }

    .rd-specialist-photo img {
        height: 520px;
    }

    .rd-route-card {
        min-height: 360px;
        border-radius: 50% 50% 22px 22px;
    }

    .rd-footer {
        position: static;
        grid-template-columns: 1fr;
        margin-top: var(--ds-space-6);
    }

    .rd-footer :last-child {
        text-align: left;
    }
}

@media screen and (max-width: 560px) {
    .redesign-page h1 {
        font-size: clamp(2.35rem, 13vw, 3.5rem);
    }

    .redesign-page h2 {
        font-size: clamp(2rem, 10vw, 3rem);
    }

    .rd-header-button {
        min-height: 42px;
        padding-inline: 12px;
        font-size: 0.78rem;
    }

    .rd-hero-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .rd-hero-actions .ui-button {
        width: 100%;
    }

    .rd-hero-facts,
    .rd-services-grid {
        grid-template-columns: 1fr;
    }

    .rd-hero-photo,
    .rd-specialist-photo,
    .rd-route-card {
        min-height: 310px;
    }

    .rd-specialist-photo img {
        height: 420px;
    }

    .rd-heading-aside {
        margin-left: 16px;
    }

    .rd-reviews-heading,
    .rd-reviews-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .rd-review-actions {
        align-self: flex-end;
        margin-top: 0;
    }

    .rd-review-card {
        width: min(82vw, 360px);
        min-height: 184px;
    }

    .rd-reviews-footer > div {
        width: 100%;
        align-items: stretch;
        flex-direction: column;
    }

    .rd-reviews-footer .ui-button {
        width: 100%;
    }

    .rd-contact-list p {
        grid-template-columns: 1fr;
        gap: 2px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
        scroll-snap-type: none;
    }

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
    }

    .rd-review-viewport {
        scroll-behavior: auto;
    }
}
