/* 
 * Современный дизайн в стиле Apple с вау-эффектами
 * Анимации, параллакс, плавные переходы
 */

/* ===== CSS Variables (Apple-inspired) ===== */
:root {
    /* Цветовая палитра Apple */
    --color-black: #000000;
    --color-white: #FFFFFF;
    --color-gray-50: #F5F5F7;
    --color-gray-100: #E8E8ED;
    --color-gray-200: #D2D2D7;
    --color-gray-300: #86868B;
    --color-gray-400: #515154;
    --color-gray-900: #1D1D1F;
    
    /* Акцентные цвета Apple */
    --color-blue: #007AFF;
    --color-blue-dark: #0056CC;
    --color-green: #34C759;
    --color-orange: #FF9500;
    --color-red: #FF3B30;
    --color-purple: #AF52DE;
    
    /* Градиенты Apple */
    --gradient-hero: linear-gradient(135deg, #000000 0%, #1D1D1F 50%, #2C2C2E 100%);
    --gradient-card: linear-gradient(145deg, #FFFFFF 0%, #F5F5F7 100%);
    --gradient-accent: linear-gradient(90deg, #007AFF 0%, #5856D6 100%);
    --gradient-rainbow: linear-gradient(90deg, 
        #FF3B30 0%, 
        #FF9500 25%, 
        #FFCC00 50%, 
        #34C759 75%, 
        #007AFF 100%);
    
    /* Тени Apple */
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 40px 80px rgba(0, 0, 0, 0.2);
    --shadow-neon: 0 0 20px rgba(0, 122, 255, 0.5);
    
    /* Скругления Apple */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-full: 9999px;
    
    /* Анимации */
    --transition-fast: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-medium: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 500ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
    
    /* Размеры */
    --header-height: 72px;
    --section-spacing: 120px;
    --container-max: 1200px;
}

/* ===== Reset & Base Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'SF Pro Display', 'Helvetica Neue', sans-serif;
    font-size: 17px;
    line-height: 1.47059;
    font-weight: 400;
    letter-spacing: -0.022em;
    color: var(--color-gray-900);
    background-color: var(--color-white);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== Typography Apple Style ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    letter-spacing: -0.028em;
    line-height: 1.1;
}

h1 {
    font-size: 80px;
    font-weight: 700;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, #1D1D1F 0%, #000000 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s var(--transition-slow) forwards;
}

h2 {
    font-size: 56px;
    font-weight: 600;
}

h3 {
    font-size: 40px;
    font-weight: 600;
}

h4 {
    font-size: 28px;
    font-weight: 500;
}

p {
    font-size: 21px;
    line-height: 1.47059;
    color: var(--color-gray-400);
    margin-bottom: 24px;
}

.lead {
    font-size: 24px;
    line-height: 1.41667;
    font-weight: 400;
    color: var(--color-gray-400);
}

/* ===== Container ===== */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: var(--section-spacing) 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 80px;
}

/* ===== Header Apple Style ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 1000;
    transition: all var(--transition-medium);
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-sm);
}

.header-content {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: var(--gradient-accent);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-white);
    font-weight: 600;
    font-size: 18px;
    animation: logoPulse 2s ease-in-out infinite;
}

@keyframes logoPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(0, 122, 255, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(0, 122, 255, 0);
    }
}

.logo-text {
    font-size: 24px;
    font-weight: 600;
    color: var(--color-black);
    letter-spacing: -0.02em;
}

.nav {
    display: flex;
    gap: 40px;
}

.nav-link {
    font-size: 17px;
    font-weight: 400;
    color: var(--color-gray-400);
    text-decoration: none;
    position: relative;
    padding: 8px 0;
    transition: color var(--transition-fast);
}

.nav-link:hover {
    color: var(--color-black);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-accent);
    transition: width var(--transition-medium);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link.active {
    color: var(--color-black);
    font-weight: 500;
}

.nav-link.active::after {
    width: 100%;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* ===== Buttons Apple Style ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border-radius: var(--radius-full);
    font-size: 17px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-medium);
    border: none;
    outline: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: currentColor;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.btn:hover::before {
    opacity: 0.1;
}

.btn-primary {
    background: var(--gradient-accent);
    color: var(--color-white);
    box-shadow: 0 4px 20px rgba(0, 122, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 122, 255, 0.4);
    animation: buttonGlow 2s infinite;
}

@keyframes buttonGlow {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(0, 122, 255, 0.3);
    }
    50% {
        box-shadow: 0 4px 30px rgba(0, 122, 255, 0.6);
    }
}

.btn-secondary {
    background: transparent;
    color: var(--color-blue);
    border: 2px solid var(--color-blue);
}

.btn-secondary:hover {
    background: var(--color-blue);
    color: var(--color-white);
    transform: translateY(-2px);
}

.btn-large {
    padding: 18px 36px;
    font-size: 19px;
    font-weight: 600;
}

.btn-icon {
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 50%;
    background: var(--color-gray-50);
    color: var(--color-gray-900);
}

.btn-icon:hover {
    background: var(--color-gray-100);
    transform: scale(1.1);
}

/* ===== Hero Section with Parallax ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: var(--gradient-hero);
    color: var(--color-white);
    position: relative;
    overflow: hidden;
    padding-top: var(--header-height);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(0, 122, 255, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(88, 86, 214, 0.1) 0%, transparent 50%);
    animation: pulse 8s ease-in-out infinite;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.hero-title {
    font-size: 96px;
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.04em;
    margin-bottom: 32px;
    background: linear-gradient(135deg, #FFFFFF 0%, rgba(255, 255, 255, 0.8) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s var(--transition-slow) forwards;
}

.hero-subtitle {
    font-size: 28px;
    line-height: 1.42859;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 48px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s var(--transition-slow) 0.2s forwards;
}

.hero-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    margin-bottom: 48px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s var(--transition-slow) 0.4s forwards;
}

.feature-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all var(--transition-medium);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.feature-card:hover::before {
    left: 100%;
}

.feature-card:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.2);
}

.feature-icon {
    font-size: 32px;
    margin-bottom: 16px;
    display: inline-block;
    animation: float 3s ease-in-out infinite;
}

.feature-text {
    font-size: 18px;
    font-weight: 500;
    color: var(--color-white);
}

.hero-cta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s var(--transition-slow) 0.6s forwards;
}

/* ===== Price Section with 3D Effect ===== */
.price-section {
    background: var(--color-gray-50);
    position: relative;
}

.price-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-gray-200), transparent);
}

.price-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
    perspective: 1000px;
}

.price-card {
    background: var(--color-white);
    border-radius: var(--radius-xl);
    padding: 48px 32px;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-medium);
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
}

.price-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-accent);
}

.price-card:hover {
    transform: translateY(-16px) rotateX(5deg);
    box-shadow: var(--shadow-xl);
}

.price-card.featured {
    transform: scale(1.05);
    border: 2px solid var(--color-blue);
    animation: featuredPulse 2s infinite;
}

@keyframes featuredPulse {
    0%, 100% {
        box-shadow: 0 20px 60px rgba(0, 122, 255, 0.15);
    }
    50% {
        box-shadow: 0 20px 80px rgba(0, 122, 255, 0.3);
    }
}

.price-card.featured:hover {
    transform: scale(1.05) translateY(-16px) rotateX(5deg);
}

.price-header {
    text-align: center;
    margin-bottom: 32px;
}

.price-amount {
    font-size: 64px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--color-gray-900) 0%, var(--color-black) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.price-period {
    font-size: 17px;
    color: var(--color-gray-300);
}

.price-features {
    list-style: none;
    margin-bottom: 48px;
}

.price-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    font-size: 17px;
    color: var(--color-gray-400);
    transition: color var(--transition-fast);
}

.price-features li:hover {
    color: var(--color-gray-900);
}

.price-features li::before {
    content: '✓';
    color: var(--color-green);
    font-weight: 600;
}

/* ===== Gallery with Masonry & Hover Effects ===== */
.gallery-section {
    background: var(--color-white);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    grid-auto-flow: dense;
}

.gallery-item {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 4/3;
    cursor: pointer;
    transform: scale(0.95);
    opacity: 0;
    animation: scaleIn 0.6s var(--transition-medium) forwards;
    transition: all var(--transition-medium);
}

.gallery-item:nth-child(3n) {
    grid-column: span 2;
    aspect-ratio: 16/9;
}

.gallery-item:nth-child(5n) {
    grid-row: span 2;
    aspect-ratio: 3/4;
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.gallery-item:hover .gallery-image {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 32px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: var(--color-white);
    transform: translateY(100%);
    transition: transform var(--transition-medium);
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

/* ===== Contact Form with Floating Labels ===== */
.contact-section {
    background: var(--color-gray-50);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: start;
}

.form-group {
    position: relative;
    margin-bottom: 32px;
}

.form-input {
    width: 100%;
    padding: 24px 20px 12px;
    font-size: 17px;
    background: var(--color-white);
    border: 2px solid var(--color-gray-200);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    outline: none;
}

.form-input:focus {
    border-color: var(--color-blue);
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.1);
    animation: inputShake 0.3s;
}

@keyframes inputShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-2px); }
    75% { transform: translateX(2px); }
}

.form-label {
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 17px;
    color: var(--color-gray-300);
    pointer-events: none;
    transition: all var(--transition-fast);
}

.form-input:focus + .form-label,
.form-input:not(:placeholder-shown) + .form-label {
    top: 8px;
    font-size: 13px;
    color: var(--color-blue);
}

/* ===== Footer Apple Style ===== */
.footer {
    background: var(--color-gray-900);
    color: var(--color-white);
    padding: 80px 0 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 60px;
    margin-bottom: 60px;
}

.footer-title {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 24px;
    color: var(--color-gray-200);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: var(--color-gray-300);
    text-decoration: none;
    font-size: 15px;
    transition: all var(--transition-fast);
    position: relative;
    padding-left: 0;
}

.footer-links a:hover {
    color: var(--color-white);
    padding-left: 8px;
}

.footer-links a::before {
    content: '→';
    position: absolute;
    left: -12px;
    opacity: 0;
    transition: all var(--transition-fast);
}

.footer-links a:hover::before {
    opacity: 1;
    left: -8px;
}

.footer-bottom {
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: var(--color-gray-300);
    font-size: 13px;
}

/* ===== Core Animations ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

/* ===== Utility Classes ===== */
.text-gradient {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shimmer {
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.2) 50%, 
        transparent 100%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

.float {
    animation: float 6s ease-in-out infinite;
}

.reveal {
    opacity: 0;
    transform: translateY(60px);
    transition: all var(--transition-slow);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Scroll Progress ===== */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: var(--gradient-accent);
    z-index: 10001;
    transition: width 0.1s ease;
}

/* ===== Custom Scrollbar ===== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--color-gray-50);
}

::-webkit-scrollbar-thumb {
    background: var(--color-gray-300);
    border-radius: var(--radius-full);
    transition: background var(--transition-fast);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-gray-400);
}

/* ===== Page Loader ===== */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-black);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10002;
    animation: fadeOut 0.5s 1s forwards;
}

.page-loader .spinner {
    width: 60px;
    height: 60px;
    border: 4px solid transparent;
    border-top: 4px solid var(--color-blue);
    border-right: 4px solid var(--color-green);
    border-bottom: 4px solid var(--color-orange);
    border-left: 4px solid var(--color-red);
    animation: spin 1s linear infinite;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== Responsive Design ===== */
@media (max-width: 1024px) {
    h1 {
        font-size: 64px;
    }
    
    h2 {
        font-size: 48px;
    }
    
    .hero-title {
        font-size: 72px;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 60px;
    }
    
    .gallery-item:nth-child(3n),
    .gallery-item:nth-child(5n) {
        grid-column: auto;
        grid-row: auto;
        aspect-ratio: 4/3;
    }
}

@media (max-width: 768px) {
    :root {
        --section-spacing: 80px;
        --header-height: 64px;
    }
    
    h1 {
        font-size: 48px;
    }
    
    h2 {
        font-size: 36px;
    }
    
    h3 {
        font-size: 28px;
    }
    
    .hero-title {
        font-size: 56px;
    }
    
    .hero-subtitle {
        font-size: 20px;
    }
    
    .nav {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
        background: none;
        border: none;
        width: 44px;
        height: 44px;
        cursor: pointer;
        position: relative;
    }
    
    .mobile-menu-btn span {
        display: block;
        width: 24px;
        height: 2px;
        background: var(--color-gray-900);
        margin: 6px auto;
        transition: all var(--transition-fast);
    }
    
    .price-cards {
        grid-template-columns: 1fr;
    }
    
    .price-card.featured {
        transform: none;
    }
    
    .price-card.featured:hover {
        transform: translateY(-16px);
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 40px;
    }
    
    .hero-title {
        font-size: 48px;
    }
    
    .hero-cta {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .feature-card {
        padding: 20px;
    }
}

/* ===== Print Styles ===== */
@media print {
    .header,
    .hero-cta,
    .footer,
    .no-print {
        display: none !important;
    }
    
    body {
        color: black !important;
        background: white !important;
        font-size: 12pt !important;
    }
    
    .container {
        max-width: 100% !important;
        padding: 0 !important;
    }
    
    .section {
        padding: 20pt 0 !important;
        page-break-inside: avoid;
    }
    
    h1, h2, h3 {
        color: black !important;
        page-break-after: avoid;
    }
    
    a {
        color: black !important;
        text-decoration: underline !important;
    }
    
    .price-card {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }
}