:root {
    --bg: #f3ece2;
    --surface: rgba(255, 251, 245, 0.88);
    --text: #28302d;
    --text-soft: #5d6761;
    --line: rgba(40, 48, 45, 0.12);
    --accent: #8a5c4d;
    --accent-deep: #6f4437;
    --shadow: 0 24px 60px rgba(66, 51, 36, 0.12);
    --radius-xl: 30px;
    --radius-lg: 22px;
    --radius-sm: 12px;
    --content-width: 1180px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Avenir Next", "Segoe UI", sans-serif;
    color: var(--text);
    background:
        radial-gradient(
            circle at top left,
            rgba(220, 192, 174, 0.72),
            transparent 32%
        ),
        radial-gradient(
            circle at top right,
            rgba(138, 92, 77, 0.08),
            transparent 24%
        ),
        linear-gradient(180deg, #f6f0e8 0%, #f1e7da 100%);
}

a {
    color: inherit;
    text-decoration: none;
}

.page-shell {
    width: min(calc(100% - 32px), var(--content-width));
    margin: 0 auto;
    padding: 24px 0 48px;
}

.site-header {
    position: sticky;
    top: 14px;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 16px 20px;
    margin-bottom: 24px;
    background: rgba(255, 250, 244, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 24px;
    box-shadow: 0 12px 40px rgba(69, 53, 33, 0.08);
    backdrop-filter: blur(16px);
}

.site-header__meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.site-header__role,
.eyebrow,
.service-card__tag,
.contact-panel__label,
.diploma-card__type {
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.site-header__role,
.site-nav,
.hero__lead,
.hero__subtitle,
.contact-panel__address,
.service-card p,
.diploma-card p,
.map-noscript,
.site-footer p {
    color: var(--text-soft);
}

.site-header__role {
    font-size: 0.9rem;
    font-weight: 700;
}

.site-header__phone {
    font-size: 1.02rem;
    font-weight: 700;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 22px;
}

.site-nav a {
    transition: color 160ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
    color: var(--accent-deep);
}

h1,
h2,
h3 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 600;
    line-height: 1.05;
}

h1 {
    max-width: 12ch;
    font-size: clamp(3.4rem, 7vw, 5.8rem);
    text-wrap: balance;
}

h2 {
    font-size: clamp(2rem, 3.5vw, 3rem);
    text-wrap: balance;
}

h3 {
    font-size: 1.28rem;
}

p,
li {
    margin: 0;
    line-height: 1.65;
}

.eyebrow,
.service-card__tag,
.contact-panel__label,
.diploma-card__type {
    margin: 0 0 14px;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--accent-deep);
}

.hero,
.section {
    position: relative;
}

.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    position: relative;
    padding: 34px;
    background: linear-gradient(
        180deg,
        rgba(255, 251, 246, 0.9),
        rgba(255, 249, 243, 0.76)
    );
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
    overflow: hidden;
}

.hero__copy {
    position: relative;
    padding: 0;
    padding-right: 34px;
    background: none;
    border: none;
    border-radius: 0;
    box-shadow: none;
    backdrop-filter: none;
}

.map-card {
    position: relative;
    padding: 34px;
    background: linear-gradient(
        180deg,
        rgba(255, 251, 246, 0.9),
        rgba(255, 249, 243, 0.76)
    );
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

.hero__copy::after {
    content: "";
    position: absolute;
    inset: auto -20px -50px auto;
    width: 180px;
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(138, 92, 77, 0.18),
        transparent 70%
    );
    pointer-events: none;
}

.hero__map {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.hero__map .map-card {
    padding: 0;
    min-height: 460px;
    flex: 1;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

#ya-map {
    width: 100%;
    height: 100%;
    min-height: 460px;
}

.map-noscript {
    padding: 28px;
    font-size: 1rem;
}

.map-noscript a {
    color: var(--accent-deep);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.hero__lead {
    max-width: 58ch;
    margin-top: 18px;
    font-size: 1.08rem;
}

.hero__subtitle {
    margin-top: 16px;
    font-size: 1.08rem;
}

.contact-panel {
    margin-top: 26px;
    padding: 18px 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(255, 251, 246, 0.72);
}

.contact-panel__phone {
    display: inline-block;
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    line-height: 1.2;
}

.contact-panel__address {
    margin-top: 10px;
    font-style: normal;
}

.hero__actions,
.footer-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 28px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 54px;
    padding: 0 24px;
    border: 1px solid transparent;
    border-radius: 999px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    transition:
        transform 160ms ease,
        box-shadow 160ms ease,
        background-color 160ms ease,
        color 160ms ease,
        border-color 160ms ease;
}

.button:hover,
.button:focus-visible {
    transform: translateY(-1px);
}

.button--primary {
    background: linear-gradient(
        135deg,
        var(--accent) 0%,
        var(--accent-deep) 100%
    );
    color: #fff8f0;
    box-shadow: 0 16px 30px rgba(111, 68, 55, 0.22);
}

.button--secondary,
.button--ghost {
    background: rgba(255, 251, 246, 0.72);
    color: var(--text);
}

.button--secondary {
    border-color: rgba(40, 48, 45, 0.12);
}

.button--ghost {
    border-color: rgba(138, 92, 77, 0.22);
}

.section {
    margin-top: 26px;
}

.section-heading {
    max-width: 68ch;
    margin-bottom: 26px;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-top: 0;
}

.service-card {
    padding: 22px;
    background: rgba(255, 251, 245, 0.78);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
}

.service-card h3 {
    margin-bottom: 12px;
}

.diploma-group__title {
    margin: 32px 0 18px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
    color: var(--accent-deep);
    font-size: 1.15rem;
}

.diploma-group__title:first-of-type {
    margin-top: 0;
}

.diploma-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.diploma-grid--paired,
.diploma-grid--featured-pair {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.diploma-grid--featured .diploma-card--wide {
    grid-column: 1 / -1;
}

.diploma-card {
    cursor: pointer;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(255, 251, 245, 0.78);
    transition:
        box-shadow 200ms ease,
        transform 200ms ease;
}

.diploma-card:hover,
.diploma-card:focus-visible {
    box-shadow: 0 16px 40px rgba(66, 51, 36, 0.14);
    transform: translateY(-2px);
}

.diploma-card img {
    display: block;
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: contain;
    background: #faf6f0;
    border-bottom: 1px solid var(--line);
}

.diploma-card--wide img {
    aspect-ratio: auto;
    height: clamp(340px, 42vw, 480px);
    object-fit: contain;
}

.diploma-card__body {
    padding: 18px 20px 20px;
}

.diploma-card h3 {
    margin-bottom: 8px;
}

.diploma-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(30, 24, 18, 0.85);
    backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    transition:
        opacity 200ms ease,
        visibility 200ms ease;
}

.diploma-modal.is-open {
    opacity: 1;
    visibility: visible;
}

.diploma-modal__inner {
    position: relative;
    width: min(92vw, 800px);
    max-height: 90vh;
    overflow: auto;
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: 0 32px 80px rgba(30, 24, 18, 0.4);
}

.diploma-modal__inner img {
    display: block;
    width: 100%;
}

.diploma-modal__close {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: rgba(255, 251, 245, 0.9);
    font-size: 1.3rem;
    cursor: pointer;
    transition: background 160ms ease;
}

.diploma-modal__close:hover {
    background: #fff;
}

.site-footer {
    display: flex;
    justify-content: center;
    margin-top: 26px;
    padding: 0 0 8px;
}

@media (max-width: 1024px) {
    .hero {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .hero__copy {
        padding-right: 0;
    }

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

    .site-header {
        align-items: start;
        flex-direction: column;
    }

    .site-nav {
        flex-wrap: wrap;
        gap: 12px 18px;
    }
}

@media (max-width: 720px) {
    .page-shell {
        width: min(calc(100% - 24px), var(--content-width));
        padding-top: 14px;
    }

    .hero {
        padding: 22px 18px;
    }

    .hero__map {
        margin-top: 0;
    }

    .site-header,
    .section {
        padding: 22px 18px;
    }

    h1 {
        font-size: clamp(2.4rem, 13vw, 4rem);
    }

    h2 {
        font-size: clamp(1.8rem, 9vw, 2.5rem);
    }

    .hero__actions,
    .footer-actions {
        display: grid;
    }

    .site-header__cta {
        width: 100%;
    }

    .button {
        width: 100%;
    }

    #ya-map,
    .map-card {
        min-height: 360px;
    }

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

    .diploma-grid--featured .diploma-card--wide {
        grid-column: auto;
    }

    .diploma-card--wide img {
        height: auto;
    }
}
