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

:root {
    --bg: #f4f0ea;
    --bg-soft: #faf7f2;
    --paper: #fffcf8;
    --ink: #1c1b19;
    --ink-soft: #4a4742;
    --muted: #7a756e;
    --line: #dcd4c8;
    --line-strong: #c9bfb0;
    --accent: #8a7355;
    --accent-deep: #6a5740;
    --shadow: 0 18px 40px rgba(28, 27, 25, 0.08);
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html {
    scroll-behavior: smooth;
    scrollbar-width: none;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

html::-webkit-scrollbar {
    display: none;
}

body {
    font-family: "Manrope", system-ui, sans-serif;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.65;
    overflow-x: hidden;
}

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

a {
    color: inherit;
}

button,
input,
textarea {
    font-family: inherit;
}

.skip-link {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
    z-index: 2000;
    background: var(--ink);
    color: var(--paper);
    text-decoration: none;
}

.skip-link:focus {
    width: auto;
    height: auto;
    margin: 0;
    clip: auto;
    clip-path: none;
    left: 16px;
    top: 12px;
    padding: 8px 14px;
}

/* Hero */
.hero {
    padding: calc(48px + env(safe-area-inset-top)) 28px 28px;
}

.hero-inner {
    max-width: 1180px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(280px, 0.92fr) 1.08fr;
    gap: 72px;
    align-items: center;
}

.hero-photo {
    position: relative;
    margin: 0;
}

.hero-photo::before {
    content: "";
    position: absolute;
    inset: 18px -18px -18px 18px;
    border: 1px solid var(--line-strong);
    pointer-events: none;
}

.hero-photo img {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    object-position: center top;
}

.overline {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 18px;
}

.hero-content h1 {
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: clamp(48px, 6vw, 78px);
    font-weight: 500;
    line-height: 0.95;
    letter-spacing: -0.02em;
    margin-bottom: 24px;
}

.hero-lead {
    font-size: 18px;
    color: var(--ink-soft);
    max-width: 34em;
    margin-bottom: 32px;
}

.hero-meta {
    list-style: none;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 40px;
}

.hero-meta li {
    font-size: 13px;
    letter-spacing: 0.04em;
    color: var(--muted);
    position: relative;
    padding-left: 14px;
}

.hero-meta li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 20px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 26px;
    border: 1px solid var(--ink);
    background: transparent;
    color: var(--ink);
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease);
}

.btn-primary {
    background: var(--ink);
    color: var(--paper);
}

.btn-primary:hover {
    background: var(--accent-deep);
    border-color: var(--accent-deep);
}

.btn-ghost:hover {
    background: var(--ink);
    color: var(--paper);
}

.btn-label-short {
    display: none;
}

/* Accordion */
.accordion-section {
    max-width: 1180px;
    margin: 0 auto;
    padding: 12px 28px 80px;
}

.accordion-hint {
    font-size: 13px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 8px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
}

.accordion-item {
    border-bottom: 1px solid var(--line);
    scroll-margin-top: 12px;
}

.accordion-item h2 {
    font-size: inherit;
    font-weight: inherit;
}

.accordion-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 28px 0;
    border: 0;
    background: none;
    cursor: pointer;
    text-align: left;
    color: var(--ink);
}

.accordion-title {
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: clamp(32px, 4.4vw, 48px);
    font-weight: 500;
    line-height: 1.1;
}

.accordion-plus {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    position: relative;
    transition: border-color 0.3s var(--ease), background 0.3s var(--ease), transform 0.3s var(--ease);
}

.accordion-plus::before,
.accordion-plus::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    background: var(--ink);
    transform: translate(-50%, -50%);
}

.accordion-plus::before {
    width: 14px;
    height: 1.5px;
}

.accordion-plus::after {
    width: 1.5px;
    height: 14px;
    transition: transform 0.35s var(--ease), opacity 0.35s var(--ease);
}

.accordion-trigger:hover .accordion-plus,
.accordion-item.is-open .accordion-plus {
    border-color: var(--ink);
}

.accordion-item.is-open .accordion-plus::after {
    transform: translate(-50%, -50%) rotate(90deg);
    opacity: 0;
}

.accordion-panel {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.5s var(--ease);
}

.accordion-item.is-open .accordion-panel {
    grid-template-rows: 1fr;
}

.accordion-panel-inner {
    overflow: hidden;
    min-height: 0;
}

.accordion-panel-inner > * {
    padding-bottom: 40px;
}

/* About */
.about-layout {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 56px;
    align-items: start;
}

.about-copy p {
    color: var(--ink-soft);
    font-size: 17px;
    margin-bottom: 16px;
    max-width: 42em;
}

.about-intro {
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 26px !important;
    line-height: 1.35;
    color: var(--ink) !important;
    font-weight: 500;
}

.about-facts {
    list-style: none;
    margin-top: 28px;
    margin-bottom: 36px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 22px 28px;
    padding-top: 28px;
    border-top: 1px solid var(--line);
}

.about-copy > .about-facts:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.about-fact-label {
    display: block;
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 6px;
}

.about-heading {
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: clamp(26px, 3vw, 32px);
    font-weight: 500;
    line-height: 1.15;
    margin: 0 0 20px;
}

.about-block {
    margin-top: 48px;
    padding-top: 36px;
    border-top: 1px solid var(--line);
}

.about-topics {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.about-topics li {
    background: var(--paper);
    border: 1px solid var(--line);
    padding: 22px 20px;
    font-size: 15px;
    color: var(--ink-soft);
    line-height: 1.55;
}

.about-edu {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    margin-top: 48px;
    padding-top: 36px;
    border-top: 1px solid var(--line);
}

.edu-list {
    list-style: none;
}

.edu-list > li {
    display: grid;
    grid-template-columns: 7.5rem 1fr;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
}

.edu-list > li:last-child {
    border-bottom: 0;
}

.edu-year {
    font-size: 12px;
    letter-spacing: 0.08em;
    color: var(--accent);
    padding-top: 3px;
}

.edu-list p {
    margin: 0;
    font-size: 15px;
    color: var(--ink-soft);
    line-height: 1.55;
    max-width: none;
}

.edu-sublist {
    list-style: none;
    margin-top: 10px;
}

.edu-sublist li {
    position: relative;
    padding: 5px 0 5px 14px;
    font-size: 14px;
    color: var(--muted);
    line-height: 1.5;
}

.edu-sublist li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.85em;
    width: 6px;
    height: 1px;
    background: var(--accent);
}

.about-photo {
    margin: 0;
}

.about-photo img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    object-position: center top;
}

.about-photo figcaption {
    margin-top: 14px;
    color: var(--muted);
    font-style: italic;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 17px;
}

/* Help */
.help-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.help-card {
    background: var(--paper);
    padding: 28px 24px;
    border: 1px solid var(--line);
    min-height: 100%;
}

.help-num {
    display: block;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 20px;
    color: var(--accent);
    margin-bottom: 14px;
}

.help-card h3 {
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 26px;
    font-weight: 500;
    margin-bottom: 10px;
}

.help-card p {
    color: var(--ink-soft);
    font-size: 15px;
}

/* Consultation */
.consult-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 40px;
    row-gap: 28px;
}

.consult-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 22px 8px 0 0;
    border-top: 1px solid var(--ink);
}

.consult-index {
    font-size: 12px;
    letter-spacing: 0.16em;
    color: var(--accent);
    margin-bottom: 10px;
}

.consult-card h3 {
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: clamp(24px, 2.2vw, 28px);
    font-weight: 500;
    line-height: 1.2;
    margin-bottom: 12px;
    min-height: 2.4em;
    text-wrap: balance;
}

.consult-duration {
    font-size: 13px !important;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent) !important;
    margin-bottom: 12px;
}

.consult-card p,
.consult-list {
    color: var(--ink-soft);
    font-size: 16px;
}

@supports (grid-template-rows: subgrid) {
    .consult-grid {
        row-gap: 0;
        align-items: stretch;
    }

    .consult-grid > .consult-card {
        display: grid;
        grid-template-rows: subgrid;
        grid-row: span 4;
    }

    .consult-grid > .consult-card h3 {
        min-height: 0;
    }
}

.consult-list {
    list-style: none;
    margin: 18px 0 0;
}

.consult-list li {
    padding: 6px 0 6px 16px;
    position: relative;
}

.consult-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.85em;
    width: 6px;
    height: 1px;
    background: var(--accent);
}

.consult-onsite {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: 40px;
    align-items: start;
    margin-top: 48px;
}

.consult-address {
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 24px !important;
    color: var(--ink) !important;
    line-height: 1.3;
    margin-bottom: 4px;
}

.consult-map-link {
    display: inline-block;
    margin-top: 22px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink);
    text-decoration: none;
    border-bottom: 1px solid var(--ink);
    padding-bottom: 2px;
}

.consult-map-link:hover {
    color: var(--accent-deep);
    border-bottom-color: var(--accent-deep);
}

.consult-route {
    margin-top: 0;
    min-width: 0;
    border-top: 1px solid var(--ink);
    padding-top: 22px;
}

.consult-route-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.consult-route-label {
    font-size: 11px !important;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent) !important;
    margin: 0;
}

.route-slider-count {
    font-size: 13px;
    color: var(--muted);
    letter-spacing: 0.06em;
}

.route-slider {
    position: relative;
    outline: none;
}

.route-slider-viewport {
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--paper);
}

.route-slider-track {
    display: flex;
    transition: transform 0.45s var(--ease);
}

.route-slide {
    position: relative;
    flex: 0 0 100%;
    width: 100%;
    aspect-ratio: 1684 / 1190;
    background: #ece8e1;
}

.route-slide img,
.route-slide iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.route-slide-map iframe {
    touch-action: pan-x pan-y pinch-zoom;
}

.route-slide img {
    object-fit: cover;
}

.route-slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--line-strong);
    background: var(--paper);
    color: var(--ink);
    cursor: pointer;
    z-index: 2;
    transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}

.route-slider-btn::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    border-top: 1.5px solid var(--ink);
    border-right: 1.5px solid var(--ink);
}

.route-slider-btn.prev {
    left: 12px;
}

.route-slider-btn.prev::before {
    transform: translate(-35%, -50%) rotate(-135deg);
}

.route-slider-btn.next {
    right: 12px;
}

.route-slider-btn.next::before {
    transform: translate(-65%, -50%) rotate(45deg);
}

.route-slider-btn:hover {
    border-color: var(--ink);
}

.consult-cta {
    margin-top: 36px;
}

/* Important & psychoanalysis */
.info-lead {
    font-size: 13px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 28px;
}

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

.rules-grid .help-card h3 {
    font-size: 24px;
}

.psycho-intro {
    max-width: 22em;
    margin-bottom: 28px;
}

.psycho-copy {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px 40px;
    margin-bottom: 36px;
}

.psycho-copy p {
    color: var(--ink-soft);
    font-size: 17px;
    margin: 0;
}

/* Contact */
.contact-layout {
    display: grid;
    grid-template-columns: 0.72fr 1.28fr;
    gap: 48px;
    align-items: start;
}

.contact-intro p {
    font-size: 18px;
    color: var(--ink-soft);
}

.contact-intro a {
    color: var(--ink);
    text-underline-offset: 3px;
}

.contact-note {
    margin-top: 16px;
    font-size: 13px !important;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent) !important;
}

.contact-place {
    margin-top: 32px;
    padding-top: 28px;
    border-top: 1px solid var(--line);
}

.contact-place-label {
    font-size: 11px !important;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent) !important;
    margin-bottom: 8px;
}

.contact-place-address {
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 28px !important;
    color: var(--ink) !important;
    line-height: 1.2;
    margin-bottom: 4px;
}

.contact-place .consult-list {
    margin-top: 12px;
}

.contact-place .consult-map-link {
    margin-top: 16px;
}

.contact-map {
    margin-top: 20px;
    border: 1px solid var(--line);
    background: var(--paper);
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

.contact-map iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    touch-action: pan-x pan-y pinch-zoom;
}

.contact-form {
    background: var(--paper);
    border: 1px solid var(--line);
    padding: 32px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.form-group {
    margin-bottom: 18px;
}

.form-hint {
    margin-top: 8px;
    font-size: 13px;
    color: var(--muted);
}

.form-group label {
    display: block;
    font-size: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 8px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    border: 0;
    border-bottom: 1px solid var(--line-strong);
    background: transparent;
    padding: 10px 0;
    font-size: 16px;
    color: var(--ink);
    outline: none;
    resize: vertical;
    transition: border-color 0.2s var(--ease);
}

.form-group input:focus,
.form-group textarea:focus {
    border-bottom-color: var(--ink);
}

.form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: var(--ink-soft);
    cursor: pointer;
    max-width: 520px;
}

.checkbox-label a {
    color: var(--ink);
    text-underline-offset: 3px;
}

.checkbox-label input {
    margin-top: 3px;
    accent-color: var(--ink);
}

.form-status {
    margin-top: 16px;
    font-size: 14px;
}

.form-status.is-success {
    color: #3d5c45;
}

.form-status.is-error {
    color: #8a3a32;
}

/* Footer */
.footer {
    background: var(--ink);
    color: #e8e2d8;
    padding: 36px 28px;
}

.footer-inner {
    max-width: 1180px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 20px;
}

.footer-name {
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 22px;
    color: var(--paper);
    margin-bottom: 4px;
}

.footer-address {
    font-size: 13px;
    color: #b8b0a4;
    margin-top: 6px;
}

.footer-contacts {
    display: flex;
    gap: 22px;
}

.footer-contacts a {
    color: inherit;
    text-decoration: none;
    font-size: 14px;
    border-bottom: 1px solid transparent;
}

.footer-contacts a:hover {
    border-bottom-color: currentColor;
}

.footer-copy {
    text-align: right;
    font-size: 13px;
    color: #b8b0a4;
}

/* Focus */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

/* Hover only on fine pointers — avoids sticky hover on phones */
@media (hover: hover) and (pointer: fine) {
    .btn:hover {
        transform: translateY(-1px);
    }

    .help-card {
        transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
    }

    .help-card:hover {
        border-color: var(--ink);
        transform: translateY(-2px);
    }
}

/* Responsive */
@media (max-width: 980px) {
    .hero-inner,
    .about-layout,
    .about-edu,
    .contact-layout,
    .help-grid,
    .psycho-copy,
    .consult-grid,
    .consult-onsite,
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .consult-grid {
        row-gap: 28px;
    }

    .consult-grid > .consult-card {
        display: flex;
        grid-row: auto;
    }

    .consult-card h3 {
        min-height: 0;
    }

    .about-topics {
        grid-template-columns: 1fr 1fr;
    }

    .hero-inner {
        gap: 36px;
    }

    .hero-photo {
        max-width: 360px;
    }

    .about-photo {
        order: -1;
        max-width: 360px;
    }

    .footer-contacts,
    .footer-copy {
        text-align: left;
        justify-content: flex-start;
    }
}

@media (max-width: 768px) {
    .hero,
    .accordion-section {
        padding-left: max(16px, env(safe-area-inset-left));
        padding-right: max(16px, env(safe-area-inset-right));
    }

    .hero {
        padding-top: calc(12px + env(safe-area-inset-top));
        padding-bottom: 8px;
        overflow: hidden;
    }

    .hero-inner {
        display: flex;
        flex-direction: column;
        gap: 24px;
        text-align: left;
    }

    .hero-photo {
        width: min(78vw, 340px);
        max-width: none;
        margin: 0 auto;
    }

    .hero-photo::before {
        inset: 8px -8px -8px 8px;
    }

    .overline {
        letter-spacing: 0.12em;
        font-size: 11px;
        margin-bottom: 12px;
        max-width: 22em;
    }

    .hero-content h1 {
        font-size: clamp(36px, 11vw, 48px);
        margin-bottom: 16px;
    }

    .hero-lead {
        font-size: 16px;
        margin-bottom: 20px;
    }

    .hero-meta {
        gap: 6px;
        margin-bottom: 24px;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .hero-actions .btn,
    .consult-cta,
    .form-footer .btn {
        width: 100%;
    }

    .btn-label-full {
        display: none;
    }

    .btn-label-short {
        display: inline;
    }

    .accordion-section {
        padding-top: 8px;
        padding-bottom: max(56px, env(safe-area-inset-bottom));
    }

    .accordion-hint {
        font-size: 12px;
        letter-spacing: 0.08em;
        padding-bottom: 14px;
    }

    .accordion-trigger {
        padding: 18px 0;
        gap: 12px;
        min-height: 56px;
        -webkit-tap-highlight-color: transparent;
    }

    .accordion-title {
        font-size: clamp(24px, 7vw, 32px);
    }

    .accordion-plus {
        width: 40px;
        height: 40px;
    }

    .accordion-panel-inner > * {
        padding-bottom: 28px;
    }

    .about-intro {
        font-size: 22px !important;
    }

    .about-copy p {
        font-size: 16px;
    }

    .about-heading {
        font-size: 24px;
    }

    .about-topics,
    .about-facts,
    .consult-grid,
    .form-row,
    .rules-grid,
    .edu-list > li {
        grid-template-columns: 1fr;
    }

    .about-topics li,
    .help-card {
        padding: 20px 18px;
    }

    .help-card h3,
    .rules-grid .help-card h3 {
        font-size: 22px;
    }

    .edu-list > li {
        gap: 6px;
        padding: 14px 0;
    }

    .consult-card h3 {
        font-size: 26px;
    }

    .consult-onsite {
        gap: 28px;
        margin-top: 28px;
    }

    .route-slider-btn {
        width: 40px;
        height: 40px;
        top: calc(50% - 14px);
    }

    .route-slider-btn.prev {
        left: 6px;
    }

    .route-slider-btn.next {
        right: 6px;
    }

    .contact-form {
        padding: 20px 16px;
    }

    .form-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .checkbox-label {
        max-width: none;
        font-size: 13px;
        line-height: 1.5;
    }

    .footer {
        padding: 28px max(16px, env(safe-area-inset-left)) max(28px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-right));
    }

    .footer-inner {
        gap: 16px;
    }

    .footer-contacts {
        flex-wrap: wrap;
        gap: 12px 18px;
    }
}

@media (max-width: 480px) {
    .hero-photo {
        width: min(86vw, 320px);
    }

    .about-photo {
        max-width: 100%;
    }

    .about-photo img {
        aspect-ratio: 3 / 4;
        max-height: 420px;
    }
}

/* Legal pages */
.legal-page {
    padding: calc(48px + env(safe-area-inset-top)) 28px 80px;
}

.legal-doc {
    max-width: 760px;
    margin: 0 auto;
}

.legal-back {
    margin-bottom: 28px;
}

.legal-back a {
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--ink-soft);
    border-bottom: 1px solid var(--line-strong);
}

.legal-back a:hover {
    color: var(--ink);
    border-bottom-color: var(--ink);
}

.legal-doc h1 {
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: clamp(36px, 5vw, 52px);
    font-weight: 500;
    line-height: 1.1;
    margin-bottom: 16px;
}

.legal-meta {
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 40px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--line);
}

.legal-doc h2 {
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 28px;
    font-weight: 500;
    margin: 36px 0 16px;
}

.legal-doc p,
.legal-doc li {
    color: var(--ink-soft);
    font-size: 16px;
    line-height: 1.7;
}

.legal-doc p {
    margin-bottom: 12px;
}

.legal-doc ul,
.legal-doc ol {
    margin: 0 0 16px 1.2em;
}

.legal-doc li {
    margin-bottom: 8px;
}

.legal-doc a {
    color: var(--ink);
    text-underline-offset: 3px;
}

@media (max-width: 768px) {
    .legal-page {
        padding: calc(28px + env(safe-area-inset-top)) 20px 60px;
    }
}

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

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}
