/**
 * Алтеос — клиника современной косметологии
 * Stylesheet matching design masters (desktop-1440 / tablet-768 / mobile-390)
 *
 * Tokens: Ink #2F1C28 · Paper #FFF8F5 · White #FFF · Blush #F3E4E1
 *         Rose #812947 · Action green #245A4B · Sage #DDE8E2 · Muted #654D58
 *         Divider #D7C5C8 · Inter/Arial · desktop field 72px · mobile field 20px
 */

/* ============================================
   TOKENS & RESET
   ============================================ */
:root {
    --ink:          #2F1C28;
    --paper:        #FFF8F5;
    --white:        #FFFFFF;
    --blush:        #F3E4E1;
    --rose:         #812947;
    --rose-dark:    #631F37;
    --rose-soft:    #F2B9C8;
    --action-green: #245A4B;
    --green-dark:   #19463B;
    --sage:         #DDE8E2;
    --muted:        #654D58;
    --divider:      #D7C5C8;
    --radius-card:  18px;
    --radius-cta:   27px;
    --field-desktop: 72px;
    --field-mobile:  20px;
    --focus-ring:    #812947;
    --focus-offset:  3px;
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: "Inter", Arial, sans-serif;
    background-color: var(--paper);
    color: var(--ink);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
    min-width: 320px;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font-family: inherit; border: none; background: transparent; cursor: pointer; }
strong { font-weight: 700; }

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

.visually-hidden {
    position: absolute; width: 1px; height: 1px; margin: -1px;
    clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ============================================
   LAYOUT UTILITIES
   ============================================ */
.container {
    max-width: 1440px;
    margin-inline: var(--field-desktop);
}

@media (max-width: 768px) {
    .container { max-width: 100%; margin-inline: var(--field-mobile); }
}

/* Section eyebrow label */
.eyebrow {
    font-size: 15px; font-weight: 700; color: var(--rose);
    letter-spacing: 2px; text-transform: uppercase; margin-bottom: 12px;
}
.eyebrow-green { color: var(--action-green); }
.eyebrow-light { color: var(--rose-soft); margin-bottom: 16px; }

.section-title {
    font-size: clamp(26px, 3vw, 42px);
    line-height: 1.15; font-weight: 700; color: var(--ink);
    margin-bottom: 24px;
}
.space-title { font-size: clamp(26px, 3vw, 38px); }

/* ============================================
   HEADER
   ============================================ */
.header {
    position: sticky; top: 0; z-index: 50;
    background-color: var(--white);
    border-bottom: 1px solid transparent;
}
.header-inner {
    display: flex; align-items: center; justify-content: space-between;
    gap: 24px; padding-block: 16px; position: relative;
}

.logo { display: flex; flex-direction: column; gap: 2px; min-height: 44px; }
.logo-name {
    color: var(--rose); font-size: 26px; font-weight: 700;
    letter-spacing: 4px; line-height: 1.1;
}
.logo-sub { font-size: 12px; font-weight: 600; color: var(--muted); line-height: 1.2; }

.nav-desktop { display: flex; align-items: center; gap: 28px; }
.nav-link {
    color: var(--muted); font-size: 16px; font-weight: 600;
    padding: 10px 4px; transition: color 0.2s ease;
    display: inline-flex; align-items: center;
}
.nav-link:hover { color: var(--rose); }

.header-phone {
    color: var(--rose); font-size: 17px; font-weight: 700;
    padding: 10px 4px; white-space: nowrap;
}
.header-phone:hover { color: var(--rose-dark); }

.header-cta {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 44px; padding: 10px 22px;
    background-color: var(--rose); color: var(--white);
    font-size: 15px; font-weight: 700; border-radius: var(--radius-cta);
    transition: background-color 0.2s ease, transform 0.15s ease;
}
.header-cta:hover { background-color: var(--rose-dark); transform: translateY(-1px); }

/* Mobile menu button */
.menu-btn {
    display: none;
    align-items: center; gap: 8px;
    min-width: 44px; min-height: 44px;
    padding: 8px 14px;
    border: 1px solid var(--divider); border-radius: 12px;
    color: var(--ink); font-size: 15px; font-weight: 700;
}
.menu-btn-text { display: inline; }
.menu-btn-icon { display: inline-flex; flex-direction: column; gap: 4px; }
.menu-btn-icon span { display: block; width: 18px; height: 2px; background: var(--ink); border-radius: 2px; }

/* Mobile nav panel */
.nav-mobile {
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--divider);
    box-shadow: 0 16px 40px rgba(47, 28, 40, 0.12);
    display: flex; flex-direction: column; gap: 4px;
    padding: 16px var(--field-mobile) 20px;
    z-index: 60;
}
.nav-mobile[hidden] { display: none; }
.nav-mobile .nav-link { padding: 12px 4px; font-size: 17px; }
.nav-mobile .cta-menu { margin-top: 12px; width: 100%; justify-content: center; }

@media (max-width: 768px) {
    .nav-desktop { display: none; }
    .menu-btn { display: inline-flex; }
    .logo-name { font-size: 22px; letter-spacing: 3px; }
    .logo-sub { font-size: 11px; }
}

/* ============================================
   HERO
   ============================================ */
.hero { background-color: var(--blush); padding: 40px 0 36px; }
.hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 720px);
    grid-template-areas: "content image" "meta meta";
    column-gap: 32px; row-gap: 28px; align-items: center;
}

.hero-content { grid-area: content; display: flex; flex-direction: column; align-items: flex-start; }
.hero-image { grid-area: image; position: relative; }
.hero-meta {
    grid-area: meta;
    display: flex; flex-wrap: wrap; gap: 8px 48px;
    font-size: 18px; color: var(--muted);
}
.hero-meta-line { line-height: 1.4; }

.hero-eyebrow {
    font-size: 15px; font-weight: 700; color: var(--rose);
    letter-spacing: 2px; text-transform: uppercase; margin-bottom: 16px;
}
.hero-title {
    font-size: clamp(40px, 5vw, 72px);
    line-height: 1.05; font-weight: 700; color: var(--ink);
    margin-bottom: 16px;
}
.hero-subtitle {
    font-size: clamp(17px, 1.7vw, 24px);
    line-height: 1.5; color: var(--muted); max-width: 560px;
    margin-bottom: 28px;
}

.hero-image img {
    width: 100%; height: auto; object-fit: cover;
    border-radius: var(--radius-card);
    box-shadow: 0 20px 60px rgba(47, 28, 40, 0.18);
}

.hero-badge {
    position: absolute; right: 20px; bottom: 20px;
    display: flex; flex-direction: column; gap: 2px;
    background: var(--white); border-radius: 14px;
    padding: 14px 20px;
    box-shadow: 0 8px 24px rgba(47, 28, 40, 0.14);
}
.hero-badge-title { font-size: 15px; font-weight: 700; color: var(--ink); }
.hero-badge-sub { font-size: 13px; color: var(--muted); }

@media (max-width: 1024px) {
    .hero-inner {
        grid-template-columns: 1fr;
        grid-template-areas: "content" "image" "meta";
        row-gap: 24px;
    }
    .hero-image { max-width: 720px; }
}

@media (max-width: 768px) {
    .hero { padding: 28px 0 24px; }
    .hero-content { align-items: stretch; text-align: center; }
    .hero-eyebrow { font-size: 13px; letter-spacing: 1px; }
    .hero-title { font-size: clamp(36px, 11vw, 44px); }
    .hero-subtitle { font-size: 17px; max-width: none; margin-bottom: 20px; }
    .hero-meta { flex-direction: column; align-items: flex-start; gap: 6px; font-size: 15px; }
    .hero-badge { right: 12px; bottom: 12px; padding: 10px 14px; }
    .hero-badge-title { font-size: 13px; }
    .hero-badge-sub { font-size: 12px; }
}

/* ============================================
   CTA BUTTONS
   ============================================ */
.cta-button {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 62px; min-width: 190px;
    padding: 17px 39px;
    background-color: var(--action-green); color: var(--white);
    font-size: 18px; font-weight: 700;
    border-radius: var(--radius-cta);
    transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}
.cta-button:hover { background-color: var(--green-dark); transform: translateY(-1px); box-shadow: 0 8px 30px rgba(36, 90, 75, 0.25); }
.cta-button:active { transform: translateY(0); box-shadow: none; }
.cta-button:disabled { background-color: #9CADAA; color: var(--ink); cursor: not-allowed; transform: none; box-shadow: none; }

.cta-rose { background-color: var(--rose); }
.cta-rose:hover { background-color: var(--rose-dark); box-shadow: 0 8px 30px rgba(129, 41, 71, 0.25); }

@media (max-width: 768px) {
    .cta-button {
        width: 100%; min-width: 0; min-height: 58px;
        font-size: 17px; padding: 15px 28px;
    }
}

/* ============================================
   WHY US
   ============================================ */
.why-us { background-color: var(--white); padding: 40px 0; }
.why-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}
.why-card {
    display: flex; align-items: center; gap: 12px;
    background-color: var(--paper);
    border: 1px solid var(--divider);
    border-radius: var(--radius-card);
    padding: 24px 32px;
    min-height: 168px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.why-card:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(47, 28, 40, 0.1); }
.why-number {
    font-size: 15px; font-weight: 700; color: var(--rose);
    letter-spacing: 1px; flex-shrink: 0; width: 28px;
}
.why-title { font-size: 22px; font-weight: 700; line-height: 1.3; color: var(--ink); margin-bottom: 6px; }
.why-desc { font-size: 16px; color: var(--muted); line-height: 1.5; }

@media (max-width: 768px) {
    .why-us { padding: 32px 0; }
    .why-grid { grid-template-columns: 1fr; }
    .why-card { flex-direction: column; align-items: flex-start; gap: 8px; padding: 20px 24px; min-height: auto; }
    .why-title { font-size: 19px; }
}

/* ============================================
   DIRECTIONS
   ============================================ */
.directions { background-color: var(--paper); padding: 40px 0; }
.directions-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}
.direction-card {
    position: relative;
    background-color: var(--white);
    border-radius: var(--radius-card);
    box-shadow: 0 8px 24px rgba(47, 28, 40, 0.08);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex; flex-direction: column;
}
.direction-card:hover { transform: translateY(-3px); box-shadow: 0 16px 40px rgba(47, 28, 40, 0.12); }
.direction-image {
    width: 100%; height: 250px; object-fit: cover;
    pointer-events: none;
}
.direction-content {
    padding: 24px 32px 40px;
    display: flex; flex-direction: column; gap: 8px;
    align-items: flex-start;
}
.direction-title { font-size: 24px; font-weight: 700; line-height: 1.35; color: var(--ink); }
.direction-desc { font-size: 16px; color: var(--muted); line-height: 1.45; }

.direction-arrow {
    position: absolute; right: 28px; bottom: 26px;
    width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    background-color: var(--white); color: var(--rose);
    border-radius: 50%; font-size: 22px; font-weight: 700;
    box-shadow: 0 4px 14px rgba(47, 28, 40, 0.16);
    transition: background-color 0.2s ease, color 0.2s ease;
}
.direction-arrow:hover { background-color: var(--rose); color: var(--white); }

@media (max-width: 768px) {
    .directions { padding: 32px 0; }
    .directions-grid { grid-template-columns: 1fr; gap: 24px; }
    .direction-image { height: 188px; }
    .direction-content { padding: 20px 24px 32px; }
    .direction-title { font-size: 20px; }
    .direction-arrow { right: 20px; bottom: 18px; }
}

/* ============================================
   PROCEDURES
   ============================================ */
.procedures { background-color: var(--sage); padding: 40px 0; }
.procedures-note {
    font-size: 18px; color: var(--muted); max-width: 720px;
    margin-top: -8px; margin-bottom: 24px;
}
.procedures-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}
.procedure-card {
    background-color: var(--white);
    border-radius: 20px;
    box-shadow: 0 4px 16px rgba(47, 28, 40, 0.08);
    padding: 24px 24px 28px;
    display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
    min-height: 186px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.procedure-card:hover { transform: translateY(-3px); box-shadow: 0 12px 36px rgba(47, 28, 40, 0.15); }
.procedure-number { font-size: 14px; font-weight: 700; color: var(--action-green); letter-spacing: 2px; }
.procedure-title { font-size: 17px; font-weight: 700; line-height: 1.35; color: var(--ink); margin-top: 6px; }
.procedure-title strong { color: var(--rose); font-weight: 700; }
.procedure-price {
    font-size: 18px; font-weight: 700; color: var(--rose);
    line-height: 1.35; margin-top: auto; padding-top: 10px;
}

@media (max-width: 1024px) {
    .procedures-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
    .procedures { padding: 32px 0; }
    .procedures-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .procedure-card { padding: 18px 18px 20px; min-height: 146px; }
    .procedure-title { font-size: 14px; }
    .procedure-price { font-size: 16px; }
}

/* ============================================
   TEAM
   ============================================ */
.team { background-color: var(--white); padding: 40px 0; }
.team-inner {
    display: grid;
    grid-template-columns: minmax(0, 508px) minmax(0, 1fr);
    gap: 40px;
    align-items: center;
}
.team-image {
    border-radius: var(--radius-card);
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(47, 28, 40, 0.12);
}
.team-image img { width: 100%; height: auto; object-fit: cover; border-radius: var(--radius-card); }

.team-text { display: flex; flex-direction: column; align-items: flex-start; }
.team-subtitle {
    font-size: clamp(32px, 3.4vw, 48px);
    line-height: 1.05; font-weight: 700; color: var(--ink);
    margin-bottom: 20px;
}
.team-desc {
    font-size: 20px; color: var(--muted); line-height: 1.6;
    max-width: 640px; margin-bottom: 28px;
}
.team-row {
    display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
}
.team-label { display: flex; flex-direction: column; gap: 4px; }
.team-label-title { font-size: 18px; font-weight: 700; color: var(--ink); line-height: 1.35; }
.team-label-desc { font-size: 15px; color: var(--muted); }

@media (max-width: 1024px) {
    .team-inner { grid-template-columns: 1fr; gap: 28px; }
    .team-image { max-width: 720px; }
}
@media (max-width: 768px) {
    .team { padding: 32px 0; }
    .team-subtitle { font-size: clamp(28px, 8vw, 32px); margin-bottom: 14px; }
    .team-desc { font-size: 16px; margin-bottom: 20px; }
    .team-row { flex-direction: column; align-items: stretch; gap: 16px; }
}

/* ============================================
   SPACE
   ============================================ */
.space { background-color: var(--paper); padding: 40px 0; }
.space-gallery {
    display: grid;
    grid-template-columns: minmax(0, 620px) minmax(0, 652px);
    gap: 16px;
}
.space-item {
    position: relative; display: block;
    border-radius: var(--radius-card); overflow: hidden;
    box-shadow: 0 8px 24px rgba(47, 28, 40, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.space-item:hover { transform: translateY(-3px); box-shadow: 0 16px 40px rgba(47, 28, 40, 0.15); }
.space-item img { width: 100%; height: 244px; object-fit: cover; }

@media (max-width: 768px) {
    .space { padding: 32px 0; }
    .space-gallery { grid-template-columns: 1fr; gap: 16px; }
    .space-item img { height: 220px; }
}

/* ============================================
   FOOTER CONTACTS
   ============================================ */
.footer-contacts { background-color: var(--ink); color: var(--white); padding: 40px 0 0; }
.footer-contacts-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr) minmax(0, 1fr);
    gap: 40px;
    align-items: start;
}
.footer-cta-col { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.footer-title {
    font-size: clamp(32px, 3.2vw, 44px);
    line-height: 1.1; font-weight: 700; color: var(--white);
    margin-bottom: 8px; max-width: 480px;
}
.footer-contacts-col { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.footer-contact { font-size: 20px; color: var(--white); line-height: 1.4; }
.footer-phone:hover, .footer-mail:hover { color: var(--rose-soft); }
.footer-contact-hours { font-size: 18px; color: #E7DCE1; line-height: 1.4; }
.footer-logo-col { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; text-align: right; }
.footer-logo { font-size: 34px; font-weight: 700; letter-spacing: 4px; color: var(--rose-soft); line-height: 1.2; }
.footer-logo-tag { font-size: 16px; color: var(--white); font-weight: 600; line-height: 1.4; }

.footer-note {
    margin-top: 28px;
    font-size: 14px; color: #B9A6AE; line-height: 1.5;
    padding-bottom: 28px;
}

@media (max-width: 1024px) {
    .footer-contacts-grid { grid-template-columns: 1fr 1fr; }
    .footer-logo-col { grid-column: 1 / -1; align-items: flex-start; text-align: left; }
}
@media (max-width: 768px) {
    .footer-contacts { padding-top: 32px; }
    .footer-contacts-grid { grid-template-columns: 1fr; gap: 28px; }
    .footer-cta-col, .footer-contacts-col, .footer-logo-col { align-items: flex-start; text-align: left; }
    .footer-title { font-size: clamp(28px, 8.5vw, 34px); max-width: none; }
    .footer-contact { font-size: 18px; }
    .footer-contact-hours { font-size: 16px; }
    .footer-logo { font-size: 24px; }
    .footer-logo-tag { font-size: 14px; }
    .footer-note { font-size: 13px; }
}

/* ============================================
   FOOTER BOTTOM (white bar)
   ============================================ */
.footer-bottom { background-color: var(--white); }
.footer-bottom-inner {
    display: flex; align-items: center; justify-content: space-between;
    gap: 24px; flex-wrap: wrap;
    padding-block: 24px;
}
.footer-brand { display: flex; flex-direction: column; gap: 4px; }
.footer-brand-logo { font-size: 22px; font-weight: 700; letter-spacing: 4px; color: var(--rose); line-height: 1.2; }
.footer-brand-tag { font-size: 13px; color: var(--muted); }
.footer-legal { font-size: 13px; color: var(--muted); line-height: 1.5; max-width: 720px; flex: 1; }
.footer-top-link {
    font-size: 14px; font-weight: 700; color: var(--rose);
    padding: 10px 12px; min-height: 44px; display: inline-flex; align-items: center;
    white-space: nowrap;
}
.footer-top-link:hover { color: var(--rose-dark); }

/* ============================================
   SCROLL TO TOP (desktop only)
   ============================================ */
.scroll-top {
    position: fixed; right: 48px; bottom: 24px;
    width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    background-color: var(--rose); color: var(--white);
    border-radius: 50%; font-size: 18px; font-weight: 700;
    opacity: 0.9;
    box-shadow: 0 4px 16px rgba(129, 41, 71, 0.3);
    transition: opacity 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
    z-index: 40;
}
.scroll-top:hover { opacity: 1; transform: translateY(-2px); background-color: var(--rose-dark); }

@media (max-width: 768px) {
    .scroll-top { display: none; }
}