:root {
    --gold: #C9A96E;
    --gold-light: #DBC594;
    --gold-dark: #A8864A;
    --dark: #1A1A1A;
    --dark-soft: #2A2622;
    --cream: #F5F2ED;
    --cream-warm: #EDE8E0;
    --white: #FAFAF8;
    --text: #2C2C2C;
    --text-light: #6B635A;
    --text-muted: #8A8278;
    --border-subtle: rgba(0, 0, 0, 0.06);
    --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 30px 80px rgba(0, 0, 0, 0.14);
    --radius: 3px;
    --transition-smooth: 0.45s cubic-bezier(0.22, 0.61, 0.36, 1);
    --transition-bounce: 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
    --transition-fast: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --card-bg: #ffffff;
    --footer-bg: var(--dark);
    --footer-text: #999;
    --cta-bg: var(--dark-soft);
    --hero-overlay: linear-gradient(160deg, rgba(26, 26, 26, 0.35) 0%, rgba(26, 26, 26, 0.15) 40%, rgba(26, 26, 26, 0.28) 100%);
}

body.dark-theme {
    --gold: #D4AF6A;
    --gold-light: #E4C48A;
    --gold-dark: #B68B40;
    --dark: #EAEAEA;
    --dark-soft: #1F1E1C;
    --cream: #121212;
    --cream-warm: #1A1A1A;
    --white: #0F0F0F;
    --text: #E4E4E4;
    --text-light: #B0A89E;
    --text-muted: #9A9288;
    --border-subtle: rgba(255, 255, 255, 0.08);
    --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.6);
    --shadow-xl: 0 30px 80px rgba(0, 0, 0, 0.8);
    --card-bg: #1E1E1E;
    --footer-bg: #0A0A0A;
    --footer-text: #A0A0A0;
    --cta-bg: #1F1E1C;
    --hero-overlay: linear-gradient(160deg, rgba(0, 0, 0, 0.65) 0%, rgba(0, 0, 0, 0.4) 40%, rgba(0, 0, 0, 0.55) 100%);
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    height: 100%;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--cream);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background 0.5s ease, color 0.4s ease;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Основной контент занимает всё свободное место, футер прижимается вниз */
main {
    flex: 1 0 auto;
}

footer {
    flex-shrink: 0;
    margin-top: 0;
}

::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: var(--cream-warm);
}
::-webkit-scrollbar-thumb {
    background: #C4B8A8;
    border-radius: 20px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--gold);
}

h1, h2, h3, .serif {
    font-family: 'Playfair Display', 'Cormorant Garamond', serif;
    font-weight: 600;
    letter-spacing: -0.015em;
}

.container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 48px;
}
@media (max-width: 768px) {
    .container {
        padding: 0 24px;
    }
}

/* ========== НАВИГАЦИЯ ========== */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(245, 242, 237, 0.78);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border-bottom: 1px solid transparent;
    transition: all 0.4s ease;
    flex-shrink: 0;
}
body.dark-theme header {
    background: rgba(18, 18, 18, 0.85);
    backdrop-filter: blur(28px);
}
header.scrolled {
    border-bottom-color: var(--border-subtle);
    background: rgba(245, 242, 237, 0.92);
    box-shadow: var(--shadow-sm);
}
body.dark-theme header.scrolled {
    background: rgba(18, 18, 18, 0.94);
}
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 48px;
    max-width: 1440px;
    margin: 0 auto;
    transition: padding 0.4s ease;
}
header.scrolled .nav-container {
    padding: 12px 48px;
}
.logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.55rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--dark);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: color 0.3s;
    z-index: 1001;
}
.logo .logo-mark {
    width: 10px;
    height: 10px;
    background: var(--gold);
    border-radius: 50%;
    display: inline-block;
    position: relative;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.logo:hover .logo-mark {
    transform: scale(1.5);
    box-shadow: 0 0 20px rgba(201, 169, 110, 0.5);
}
.nav-links {
    display: flex;
    list-style: none;
    gap: 3rem;
    align-items: center;
}
.nav-links a {
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    position: relative;
    padding: 6px 0;
    transition: color 0.35s;
    cursor: pointer;
}
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1.5px;
    background: var(--gold);
    transition: width 0.4s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.nav-links a:hover,
.nav-links a.active {
    color: var(--dark);
}
.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}
.nav-cta {
    background: var(--gold-dark);
    color: #fff !important;
    padding: 10px 22px !important;
    border-radius: 30px;
    font-size: 0.75rem !important;
    letter-spacing: 0.09em !important;
    transition: all 0.4s ease !important;
}
.nav-cta:hover {
    background: var(--gold-dark) !important;
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(168, 134, 74, 0.35);
}
.nav-cta::after {
    display: none !important;
}
.theme-toggle {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--text);
    transition: transform 0.3s ease, color 0.3s;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    width: 38px;
    height: 38px;
}
.theme-toggle:hover {
    transform: rotate(15deg);
    color: var(--gold);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
    z-index: 1001;
    padding: 8px;
}
.menu-toggle span {
    width: 24px;
    height: 1.5px;
    background: var(--dark);
    transition: 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    border-radius: 2px;
}
.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ========== ГЛАВНАЯ: HERO ========== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    background: var(--hero-overlay),
        url('main.jpeg?auto=format&fit=crop&w=1800&q=85') center/cover no-repeat;
    background-attachment: fixed;
    overflow: hidden;
}
@media (max-width: 768px) {
    .hero {
        background-attachment: scroll;
        min-height: 90vh;
    }
}
.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 180px;
    background: linear-gradient(to top, var(--cream) 0%, transparent 100%);
    pointer-events: none;
    z-index: 1;
}
.hero-content {
    position: relative;
    z-index: 2;
    max-width: 750px;
    margin-left: 9%;
    padding-top: 40px;
}
.hero-badge {
    display: inline-block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: var(--gold-light);
    border: 1px solid rgba(201, 169, 110, 0.5);
    padding: 8px 18px;
    border-radius: 30px;
    margin-bottom: 28px;
    backdrop-filter: blur(10px);
    background: rgba(0, 0, 0, 0.2);
    animation: fadeInUp 1s 0.3s both;
}
.hero h1 {
    font-size: clamp(2.8rem, 6vw, 5.2rem);
    line-height: 1.08;
    color: #fff;
    font-weight: 600;
    margin-bottom: 1.4rem;
    text-shadow: 0 4px 30px rgba(0, 0, 0, 0.35);
    animation: fadeInUp 1s 0.5s both;
}
.hero h1 em {
    font-style: italic;
    font-weight: 400;
    color: var(--gold-light);
}
.hero p {
    font-size: 1.15rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.88);
    margin-bottom: 2.8rem;
    max-width: 480px;
    letter-spacing: 0.03em;
    line-height: 1.7;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
    animation: fadeInUp 1s 0.7s both;
}
.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    animation: fadeInUp 1s 0.9s both;
}
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 34px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    font-size: 0.78rem;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-smooth);
    border-radius: 30px;
    border: none;
    font-family: 'Inter', sans-serif;
    position: relative;
    overflow: hidden;
}
.btn-primary {
    background: var(--gold);
    color: #fff;
    box-shadow: 0 8px 28px rgba(201, 169, 110, 0.35);
}
.btn-primary:hover {
    background: #B8944A;
    transform: translateY(-3px);
    box-shadow: 0 14px 36px rgba(201, 169, 110, 0.45);
}
.btn-outline {
    background: transparent;
    border: 1.5px solid rgba(255, 255, 255, 0.7);
    color: #fff;
    backdrop-filter: blur(8px);
}
.btn-outline:hover {
    background: #fff;
    color: var(--dark);
    border-color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
}
.btn-dark {
    background: var(--dark);
    color: #fff;
}
.btn-dark:hover {
    background: #333;
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}
.btn-gold-ghost {
    background: transparent;
    border: 1.5px solid var(--gold);
    color: var(--gold-dark);
}
.btn-gold-ghost:hover {
    background: var(--gold);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(201, 169, 110, 0.3);
}

.scroll-indicator {
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    animation: float 2.5s ease-in-out infinite;
    cursor: pointer;
}
.scroll-indicator span {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: rgba(255, 255, 255, 0.75);
}
.scroll-line {
    width: 1px;
    height: 40px;
    background: rgba(255, 255, 255, 0.5);
    position: relative;
    overflow: hidden;
}
.scroll-line::after {
    content: '';
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    animation: scrollDown 2s ease-in-out infinite;
}
@keyframes scrollDown {
    0% { top: -100%; }
    50% { top: 100%; }
    100% { top: 100%; }
}
@keyframes float {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-10px); }
}

/* ========== СЕКЦИИ ========== */
section {
    padding: 100px 0;
}
@media (max-width: 768px) {
    section { padding: 60px 0; }
}
.section-tag {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--gold-dark);
    margin-bottom: 12px;
    font-weight: 500;
}
.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 1rem;
    font-weight: 600;
    color: var(--dark);
}
.section-line {
    width: 50px;
    height: 2px;
    background: var(--gold);
    margin-bottom: 2rem;
    border-radius: 2px;
}
.section-subtitle {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 3rem;
    max-width: 500px;
    line-height: 1.7;
}

/* Статистика */
.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    text-align: center;
}
@media (max-width: 768px) {
    .stats-row { grid-template-columns: repeat(2, 1fr); gap: 24px; }
}
.stat-item {
    padding: 30px 20px;
    transition: transform 0.4s ease;
}
.stat-item:hover { transform: translateY(-6px); }
.stat-number {
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem;
    font-weight: 600;
    color: var(--dark);
    display: block;
    line-height: 1;
    margin-bottom: 8px;
}
.stat-number .plus { color: var(--gold); }
.stat-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    font-weight: 500;
}
.stat-divider {
    width: 30px;
    height: 1px;
    background: var(--gold);
    margin: 12px auto 0;
    opacity: 0.5;
}

/* Избранные проекты */
.featured-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    margin-top: 20px;
}
@media (max-width: 900px) { .featured-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .featured-grid { grid-template-columns: 1fr; } }
.featured-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    cursor: pointer;
    height: 420px;
    background: #d9d2c7;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-smooth);
}
.featured-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}
.featured-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.featured-card:hover img { transform: scale(1.06); }
.featured-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 30px 28px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.1) 70%, transparent 100%);
    color: #fff;
    transition: all 0.4s ease;
}
.featured-card:hover .featured-card-overlay { padding-bottom: 38px; }
.featured-card-tag {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--gold-light);
    margin-bottom: 6px;
}
.featured-card h3 {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 4px;
}
.featured-card-arrow {
    display: inline-block;
    margin-top: 8px;
    font-size: 0.9rem;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.4s ease;
    color: var(--gold-light);
}
.featured-card:hover .featured-card-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* Философия */
.philosophy-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 70px;
    align-items: center;
}
@media (max-width: 768px) {
    .philosophy-grid { grid-template-columns: 1fr; gap: 40px; }
}
.philosophy-image {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    height: 500px;
}
.philosophy-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}
.philosophy-image:hover img { transform: scale(1.03); }
.philosophy-image::before {
    content: '';
    position: absolute;
    top: 20px;
    left: -20px;
    width: 100%;
    height: 100%;
    border: 1.5px solid var(--gold);
    border-radius: var(--radius);
    z-index: -1;
    opacity: 0.5;
    transition: all 0.5s ease;
}
.philosophy-image:hover::before {
    top: 14px;
    left: -14px;
    opacity: 0.7;
}
.philosophy-quote {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    font-style: italic;
    color: var(--text-light);
    line-height: 1.7;
    margin: 20px 0;
    padding-left: 20px;
    border-left: 2px solid var(--gold);
}

/* Отзывы */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}
@media (max-width: 768px) { .testimonials-grid { grid-template-columns: 1fr; } }
.testimonial-card {
    background: var(--card-bg);
    padding: 35px 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-smooth);
    position: relative;
}
.testimonial-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
}
.testimonial-card .quote-icon {
    font-size: 2.5rem;
    color: var(--gold);
    opacity: 0.4;
    font-family: 'Playfair Display', serif;
    line-height: 1;
    margin-bottom: 10px;
}
.testimonial-card p {
    font-size: 0.95rem;
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 18px;
    font-style: italic;
}
.testimonial-author {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--dark);
}
.testimonial-role {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* CTA секция */
.cta-section {
    background: var(--cta-bg);
    color: #fff;
    text-align: center;
    padding: 90px 30px;
    position: relative;
    overflow: hidden;
}
.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(201, 169, 110, 0.06) 0%, transparent 50%);
    pointer-events: none;
}
.cta-section h2 {
    color: #fff;
    font-size: 2.5rem;
    margin-bottom: 16px;
    position: relative;
}
.cta-section p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 30px;
    position: relative;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}
.cta-section .btn { position: relative; }

/* ========== ПОРТФОЛИО СТРАНИЦА ========== */
.portfolio-filter {
    display: flex;
    gap: 2.2rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}
.filter-btn {
    background: none;
    border: none;
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    color: var(--text-muted);
    font-weight: 500;
    padding: 6px 0;
    border-bottom: 2px solid transparent;
    transition: all 0.35s ease;
}
.filter-btn.active,
.filter-btn:hover {
    color: var(--dark);
    border-bottom-color: var(--gold);
}
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 26px;
}
@media (max-width: 600px) { .portfolio-grid { grid-template-columns: 1fr; } }
.portfolio-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    border-radius: var(--radius);
    height: 370px;
    background: #d9d2c7;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-smooth);
}
.portfolio-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}
.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}
.portfolio-item:hover img { transform: scale(1.05); }
.portfolio-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 24px 24px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    color: #fff;
}
.portfolio-overlay h3 {
    font-size: 1.4rem;
    margin-bottom: 4px;
}
.portfolio-overlay .cat-tag {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    opacity: 0.8;
    color: var(--gold-light);
}

/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 10, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal.active { display: flex; }
.modal-content {
    background: var(--card-bg);
    max-width: 820px;
    width: 100%;
    max-height: 88vh;
    overflow-y: auto;
    border-radius: var(--radius);
    position: relative;
    animation: modalIn 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: var(--shadow-xl);
}
@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.94) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}
.modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    font-size: 2rem;
    cursor: pointer;
    color: #555;
    background: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.3s;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
.modal-close:hover {
    background: #f0f0f0;
    color: #000;
    transform: rotate(90deg);
}
.modal img {
    width: 100%;
    height: 380px;
    object-fit: cover;
    display: block;
}
.modal-body {
    padding: 30px 35px 35px;
}
.modal-body h2 {
    font-size: 2rem;
    margin-bottom: 6px;
}
.modal-body .meta {
    color: var(--gold-dark);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.75rem;
    margin-bottom: 16px;
    font-weight: 500;
}
.modal-body p {
    color: var(--text-light);
    line-height: 1.7;
}

/* ========== СТРАНИЦА О СТУДИИ ========== */
.about-hero-img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: var(--radius);
    margin-bottom: 40px;
    box-shadow: var(--shadow-md);
}
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}
@media (max-width: 768px) { .about-grid { grid-template-columns: 1fr; } }
.about-values {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 30px;
}
.value-item {
    padding: 20px;
    border-left: 2px solid var(--gold);
    transition: all 0.3s;
    background: transparent;
}
.value-item:hover {
    background: var(--card-bg);
    box-shadow: var(--shadow-sm);
}
.value-item h4 {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    margin-bottom: 4px;
}
.value-item p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ========== СТРАНИЦА КОНТАКТОВ ========== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}
@media (max-width: 768px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-info-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 28px;
}
.contact-info-item .icon-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(201, 169, 110, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--gold-dark);
    font-size: 1rem;
    transition: all 0.3s;
}
.contact-info-item:hover .icon-circle {
    background: var(--gold);
    color: #fff;
}
.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 15px 18px;
    margin-bottom: 16px;
    border: 1px solid var(--border-subtle);
    font-family: 'Inter', sans-serif;
    background: var(--card-bg);
    color: var(--text);
    border-radius: var(--radius);
    transition: all 0.3s;
    font-size: 0.9rem;
}
.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(201, 169, 110, 0.08);
}
.contact-form button {
    width: 100%;
    padding: 15px;
    font-size: 0.8rem;
    cursor: pointer;
}

/* ========== FOOTER ========== */
footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    padding: 45px 0;
    text-align: center;
    font-size: 0.8rem;
    letter-spacing: 0.03em;
    width: 100%;
}
footer .footer-gold {
    color: var(--gold-light);
}

/* ========== АНИМАЦИИ ПОЯВЛЕНИЯ ПРИ СКРОЛЛЕ ========== */
.reveal {
    opacity: 0;
    transform: translateY(36px);
    transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1), transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ========== МОБИЛЬНОЕ МЕНЮ ========== */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(245, 242, 237, 0.98);
        backdrop-filter: blur(30px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2.5rem;
        z-index: 1000;
    }
    body.dark-theme .nav-links {
        background: rgba(18, 18, 18, 0.98);
    }
    .nav-links.open { display: flex; }
    .nav-links a { font-size: 1.2rem; letter-spacing: 0.12em; }
    .menu-toggle { display: flex; }
    .hero-content { margin-left: 5%; padding-right: 5%; }
    .hero h1 { font-size: 2.4rem; }
    .hero p { font-size: 1rem; }
    .stats-row { grid-template-columns: repeat(2, 1fr); }
    .featured-grid { grid-template-columns: 1fr; }
    .philosophy-grid { grid-template-columns: 1fr; }
    .testimonials-grid { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
    .about-grid { grid-template-columns: 1fr; }
    .portfolio-grid { grid-template-columns: 1fr; }
}
/* ========== МОДАЛЬНОЕ ОКНО (ПРОСТОЕ И НАДЁЖНОЕ) ========== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(10px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}
.modal.active {
    display: flex;
}
.modal-content {
    max-width: 1000px;
    width: 100%;
    background: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
}
/* Карусель — фиксированная высота, изображение вписывается */
.modal-carousel {
    position: relative;
    background: #0a0a0a;
    width: 100%;
    height: 500px;         /* фиксированная высота, не прыгает */
}
.carousel-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.carousel-slide {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;   /* показывает всё изображение, пропорции сохранены */
    display: block;
}
/* Кнопки навигации */
.carousel-prev, .carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.6);
    color: white;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 30px;
    transition: 0.2s;
    z-index: 10;
}
.carousel-prev { left: 16px; }
.carousel-next { right: 16px; }
.carousel-prev:hover, .carousel-next:hover {
    background: rgba(0,0,0,0.9);
}
/* Точки */
.carousel-dots {
    position: absolute;
    bottom: 16px;
    left: 0;
    right: 0;
    text-align: center;
    z-index: 10;
}
.dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    background: rgba(255,255,255,0.5);
    border-radius: 50%;
    margin: 0 5px;
    cursor: pointer;
}
.dot.active {
    background: var(--gold);
    transform: scale(1.2);
}
/* Описание */
.modal-body {
    padding: 24px 28px;
    max-height: 300px;
    overflow-y: auto;
}
.modal-body h2 {
    font-size: 1.6rem;
    margin-bottom: 8px;
}
.modal-body .meta {
    font-size: 0.75rem;
    color: var(--gold-dark);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}
.modal-body p {
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--text-light);
}
.project-details {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}
.detail-row {
    display: flex;
    gap: 8px;
    font-size: 0.85rem;
}
.detail-label {
    font-weight: 600;
    color: var(--gold-dark);
}
.detail-value {
    color: var(--text-light);
}
/* Закрытие */
.modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: white;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.modal-close:hover {
    background: #f0f0f0;
    transform: rotate(90deg);
}
/* Адаптация для мобильных */
@media (max-width: 768px) {
    .modal-carousel {
        height: 320px;
    }
    .modal-body {
        padding: 18px 20px;
        max-height: 250px;
    }
    .carousel-prev, .carousel-next {
        font-size: 1.5rem;
        padding: 4px 12px;
    }
    .modal-content {
        max-width: 95%;
    }
}
/* ========== КОМАНДА ДЛЯ СТРАНИЦЫ "О СТУДИИ" ========== */
.team-grid-about {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 колонки в первом ряду */
    gap: 30px;
    margin-top: 40px;
    justify-items: center;
}
/* Стили для карточек (общие) */
.team-card {
    text-align: center;
    background: var(--card-bg);
    padding: 28px 20px 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-smooth);
    width: 100%;
    max-width: 260px;
}
.team-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
}
.team-photo {
    width: 140px;
    height: 140px;
    margin: 0 auto 20px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--gold);
    transition: transform 0.3s ease;
}
.team-card:hover .team-photo {
    transform: scale(1.02);
}
.team-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.team-card h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    margin-bottom: 6px;
    color: var(--dark);
}
.team-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
    letter-spacing: 0.03em;
}
/* Элементы второго ряда — центрируем */
.team-card-center {
    grid-column: span 1; /* каждый занимает одну колонку, но центрирование через родителя */
}
/* Чтобы последние две карточки оказались по центру, используем дополнительный контейнер или явное размещение */
.team-grid-about {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}
/* Указываем, что элементы с 5 по 6 должны начинаться со 2-й колонки (центр) */
.team-card-center:first-of-type {
    grid-column: 2 / 3;
}
.team-card-center:last-of-type {
    grid-column: 3 / 4;
}
/* Адаптация для планшетов */
@media (max-width: 900px) {
    .team-grid-about {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    .team-card-center:first-of-type,
    .team-card-center:last-of-type {
        grid-column: auto;
    }
}
/* Адаптация для телефонов */
@media (max-width: 600px) {
    .team-grid-about {
        grid-template-columns: 1fr;
        justify-items: center;
    }
    .team-card {
        max-width: 280px;
    }
}
/* ========== НОВЫЙ ДИЗАЙН СТРАНИЦЫ "О СТУДИИ" ========== */

/* HERO */
.about-hero {
    position: relative;
    min-height: 60vh;
    display: flex;
    align-items: center;
    background: url('main.jpeg?auto=format&fit=crop&w=1600&q=85') center/cover no-repeat;
    margin-top: 0;
}
.about-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.2) 100%);
}
.about-hero-content {
    position: relative;
    z-index: 2;
    color: white;
    max-width: 700px;
    padding: 100px 0;
}
.about-badge {
    border-color: rgba(255,255,255,0.5);
    background: rgba(0,0,0,0.3);
    color: var(--gold-light);
    margin-bottom: 24px;
}
.about-hero-content h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 20px;
    color: white;
}
.about-hero-content p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Секция истории */
.about-story-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}
.about-story-text p {
    color: var(--text-light);
    margin-bottom: 20px;
    line-height: 1.7;
}
.about-quote {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    font-style: italic;
    color: var(--gold-dark);
    border-left: 3px solid var(--gold);
    padding-left: 24px;
    margin: 30px 0 10px;
}
.about-quote span {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 8px;
    font-style: normal;
}
.about-story-image img {
    width: 100%;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    transition: transform 0.4s;
}
.about-story-image img:hover {
    transform: scale(1.01);
}
@media (max-width: 768px) {
    .about-story-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}
/* Ценности (карточки с иконками) */
.values-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-top: 40px;
}
.value-card {
    background: var(--card-bg);
    padding: 30px 24px;
    text-align: center;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-smooth);
}
.value-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
}
.value-icon {
    font-size: 2.5rem;
    color: var(--gold);
    margin-bottom: 20px;
}
.value-card h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    margin-bottom: 12px;
    color: var(--dark);
}
.value-card p {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.5;
}
@media (max-width: 900px) {
    .values-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 600px) {
    .values-grid {
        grid-template-columns: 1fr;
    }
}

/* Достижения (красивые цифры) */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    text-align: center;
    margin: 40px 0;
}
.achievement-item {
    background: transparent;
    padding: 20px;
    border-bottom: 2px solid var(--gold);
}
.achievement-number {
    display: block;
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    font-weight: 700;
    color: var(--gold);
    line-height: 1.2;
    margin-bottom: 8px;
}
.achievement-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
}
@media (max-width: 768px) {
    .achievements-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

/* ========== КОМАНДА ДЛЯ СТРАНИЦЫ "О СТУДИИ" (ИСПРАВЛЕННАЯ) ========== */
.team-grid-about {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin-top: 40px;
}
.team-card {
    flex: 0 1 auto;
    width: 240px;          /* фиксированная ширина для всех карточек */
    text-align: center;
    background: var(--card-bg);
    padding: 28px 20px 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-smooth);
}
.team-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
}
.team-photo {
    width: 140px;
    height: 140px;
    margin: 0 auto 20px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--gold);
    transition: transform 0.3s;
}
.team-card:hover .team-photo {
    transform: scale(1.02);
}
.team-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.team-card h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    margin-bottom: 6px;
    color: var(--dark);
}
.team-card p {
    font-size: 0.8rem;
    color: var(--text-muted);
    letter-spacing: 0.03em;
}

/* Адаптивность */
@media (max-width: 1050px) {
    .team-grid-about {
        gap: 25px;
    }
}
@media (max-width: 800px) {
    .team-card {
        width: 220px;
    }
}
@media (max-width: 600px) {
    .team-grid-about {
        gap: 20px;
    }
    .team-card {
        width: 260px;
    }
}