:root {
    --color-bg-primary: #0f070b;
    --color-bg-secondary: #1a0d14;
    --color-bg-tertiary: #261320;
    --color-surface: rgba(38, 19, 32, 0.62);
    --color-surface-hover: rgba(58, 26, 43, 0.82);
    
    --color-accent-gold: #7a1f3d;
    --color-accent-gold-light: #a83a63;
    --color-accent-copper: #531127;
    --color-accent-warm: #c15a80;
    
    --color-text-primary: #FFFFFF;
    --color-text-secondary: #baabb4;
    --color-text-muted: #8c7682;
    --color-text-inverse: #0A0A0F;
    --color-logo-surface: #f3eee8;
    --color-logo-surface-border: rgba(255, 255, 255, 0.45);
    
    --gradient-hero: linear-gradient(180deg, #0f070b 0%, #1a0d14 52%, #29101f 100%);
    --gradient-card: linear-gradient(145deg, rgba(38, 19, 32, 0.74) 0%, rgba(22, 10, 17, 0.92) 100%);
    --gradient-gold: linear-gradient(135deg, #6b1835 0%, #a83a63 52%, #6b1835 100%);
    --gradient-glow: radial-gradient(ellipse at center, rgba(122, 31, 61, 0.26) 0%, transparent 70%);
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
    --shadow-gold: 0 0 40px rgba(122, 31, 61, 0.28);
    --shadow-inner: inset 0 1px 1px rgba(255, 255, 255, 0.05);
    
    --font-family-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;
    --font-size-5xl: 3rem;
    
    --font-weight-light: 300;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    
    --line-height-tight: 1.2;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.6;
    
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-2xl: 32px;
    --radius-full: 9999px;
    
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-spring: 400ms cubic-bezier(0.34, 1.56, 0.64, 1);
    --transition-smooth: 500ms cubic-bezier(0.16, 1, 0.3, 1);
    
    --z-base: 0;
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-fixed: 300;
    --z-modal-backdrop: 400;
    --z-modal: 500;
    --z-popover: 600;
    --z-tooltip: 700;
    --z-loader: 9999;
}

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    scroll-behavior: smooth;
}

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

body {
    font-family: var(--font-family-primary);
    font-size: var(--font-size-base);
    line-height: var(--line-height-relaxed);
    color: var(--color-text-primary);
    background-color: var(--color-bg-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

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

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

.loader {
    position: fixed;
    inset: 0;
    background: var(--color-bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-loader);
    transition: opacity 500ms ease, visibility 500ms ease;
}

.loader--hidden {
    opacity: 0;
    visibility: hidden;
}

.loader__content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-6);
}

.loader__logo {
    width: 120px;
    height: 80px;
}

.loader__logo-svg {
    width: 100%;
    height: 100%;
}

.loader__house {
    fill: none;
    stroke: var(--color-accent-gold);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    animation: drawHouse 600ms ease forwards;
}

.loader__house--foundation { animation-delay: 0ms; }
.loader__house--wall-left { animation-delay: 100ms; }
.loader__house--wall-right { animation-delay: 200ms; }
.loader__house--roof { animation-delay: 300ms; animation-duration: 800ms; }
.loader__house--door { animation-delay: 500ms; fill: var(--color-accent-copper); stroke: none; }
.loader__house--window-left { animation-delay: 600ms; fill: var(--color-accent-gold-light); stroke: none; opacity: 0; animation: fadeWindow 400ms ease 600ms forwards; }
.loader__house--window-right { animation-delay: 700ms; fill: var(--color-accent-gold-light); stroke: none; opacity: 0; animation: fadeWindow 400ms ease 700ms forwards; }

@keyframes drawHouse {
    to { stroke-dashoffset: 0; }
}

@keyframes fadeWindow {
    to { opacity: 0.6; }
}

.loader__text {
    display: flex;
    gap: 2px;
}

.loader__word {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-primary);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 400ms var(--transition-smooth) forwards;
}

.loader__word:nth-child(1) { animation-delay: 400ms; }
.loader__word:nth-child(2) { animation-delay: 480ms; }
.loader__word:nth-child(3) { animation-delay: 560ms; }
.loader__word:nth-child(4) { animation-delay: 640ms; }
.loader__word:nth-child(5) { animation-delay: 720ms; }
.loader__word:nth-child(6) { animation-delay: 800ms; }

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.loader__progress {
    width: 200px;
    height: 3px;
    background: var(--color-bg-tertiary);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.loader__progress-bar {
    height: 100%;
    width: 0;
    background: var(--gradient-gold);
    border-radius: var(--radius-full);
    animation: progressLoad 1500ms ease-out forwards;
}

@keyframes progressLoad {
    0% { width: 0; }
    50% { width: 60%; }
    100% { width: 100%; }
}

.ambient {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.ambient__gradient {
    position: absolute;
    inset: 0;
    background: var(--gradient-hero);
}

.ambient__gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 800px;
    height: 60vh;
    background: var(--gradient-glow);
    filter: blur(80px);
    opacity: 0.5;
}

.ambient__noise {
    position: absolute;
    inset: 0;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

.app {
    position: relative;
    min-height: 100vh;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 600ms ease, transform 600ms ease;
}

body.app--loaded .app {
    opacity: 1;
    transform: translateY(0);
}

.hero {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-6);
    position: relative;
}

.hero__content {
    max-width: 600px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-6);
}

.hero__brand {
    margin-bottom: var(--space-4);
}

.hero__logo-wrapper {
    display: inline-flex;
    padding: var(--space-4);
    background: var(--color-logo-surface);
    border-radius: var(--radius-xl);
    border: 1px solid var(--color-logo-surface-border);
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

.hero__logo {
    width: 88px;
    height: auto;
    filter: none;
}

.hero__title {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.hero__title-line {
    display: block;
    font-size: var(--font-size-3xl);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    letter-spacing: -0.02em;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 800ms var(--transition-smooth), transform 800ms var(--transition-smooth);
}

.hero__title-line.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.hero__title-line--1 {
    color: var(--color-text-primary);
}

.hero__title-line--2 {
    color: var(--color-text-secondary);
}

.hero__title-accent {
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero__subtitle {
    font-size: var(--font-size-lg);
    color: var(--color-text-secondary);
    max-width: 400px;
    line-height: var(--line-height-relaxed);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 800ms var(--transition-smooth) 200ms, transform 800ms var(--transition-smooth) 200ms;
}

.hero__subtitle.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.hero__scroll-hint {
    position: absolute;
    bottom: var(--space-8);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-3);
    opacity: 0;
    animation: fadeIn 600ms ease 1500ms forwards;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

.scroll-hint__mouse {
    width: 26px;
    height: 40px;
    border: 2px solid var(--color-text-muted);
    border-radius: var(--radius-full);
    position: relative;
}

.scroll-hint__wheel {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: var(--color-accent-gold);
    border-radius: var(--radius-full);
    animation: scrollWheel 1.5s ease-in-out infinite;
}

@keyframes scrollWheel {
    0%, 100% { 
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    50% { 
        opacity: 0.3;
        transform: translateX(-50%) translateY(12px);
    }
}

.scroll-hint__text {
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.platforms {
    padding: var(--space-16) var(--space-6);
    position: relative;
}

.platforms__container {
    max-width: 640px;
    margin: 0 auto;
}

.platforms__header {
    text-align: center;
    margin-bottom: var(--space-10);
}

.platforms__title {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-semibold);
    color: var(--color-text-primary);
    margin-bottom: var(--space-3);
}

.platforms__subtitle {
    font-size: var(--font-size-base);
    color: var(--color-text-muted);
}

.platforms__grid {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.platform-card {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-5);
    background: var(--gradient-card);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-xl);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-sm), var(--shadow-inner);
    overflow: hidden;
    transition: transform var(--transition-spring), box-shadow var(--transition-base), border-color var(--transition-fast);
    cursor: pointer;
    
    opacity: 0;
    transform: translateY(30px) scale(0.95);
}

.platform-card.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    transition: opacity 600ms var(--transition-smooth), transform 600ms var(--transition-spring);
}

.platform-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.platform-card__glow {
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, var(--color-accent-gold) 0%, transparent 50%, var(--color-accent-copper) 100%);
    border-radius: inherit;
    opacity: 0;
    z-index: -1;
    filter: blur(12px);
    transition: opacity var(--transition-base);
}

@media (hover: hover) {
    .platform-card:hover {
        transform: translateY(-4px) scale(1.02);
        box-shadow: var(--shadow-md), var(--shadow-gold);
        border-color: rgba(212, 175, 55, 0.3);
    }
    
    .platform-card:hover::before {
        opacity: 1;
    }
    
    .platform-card:hover .platform-card__glow {
        opacity: 0.4;
    }
    
    .platform-card:hover .platform-card__arrow {
        transform: translateX(4px);
        color: var(--color-accent-gold);
    }
    
    .platform-card:hover .platform-card__icon-wrapper {
        transform: scale(1.1);
    }
}

.platform-card:active,
.platform-card.is-pressed {
    transform: scale(0.96);
    transition: transform 100ms ease;
}

.platform-card__content {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    flex: 1;
}

.platform-card__icon-wrapper {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform var(--transition-spring), background var(--transition-fast);
    flex-shrink: 0;
}

.platform-card__icon-wrapper--yandex { background: rgba(252, 210, 27, 0.1); }
.platform-card__icon-wrapper--2gis { background: rgba(39, 174, 96, 0.1); }
.platform-card__icon-wrapper--otzovik { background: rgba(231, 76, 60, 0.1); }
.platform-card__icon-wrapper--domclick { background: rgba(0, 150, 136, 0.1); }
.platform-card__icon-wrapper--flamp { background: rgba(52, 152, 219, 0.1); }
.platform-card__icon-wrapper--vk { background: rgba(39, 135, 245, 0.1); }
.platform-card__icon-wrapper--google { background: rgba(66, 133, 244, 0.1); }

.platform-card__icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.platform-card__icon--flamp {
    width: 44px;
    height: auto;
}

.platform-card__name {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
    color: var(--color-text-primary);
    display: block;
}

.platform-card__action {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    display: block;
    margin-top: 2px;
}

.platform-card__arrow {
    width: 24px;
    height: 24px;
    color: var(--color-text-muted);
    transition: transform var(--transition-base), color var(--transition-fast);
    flex-shrink: 0;
}

.platform-card__arrow svg {
    width: 100%;
    height: 100%;
}

.footer {
    padding: var(--space-12) var(--space-6) var(--space-8);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer__content {
    max-width: 640px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-4);
    text-align: center;
}

.footer__brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
}

.footer__logo {
    width: 64px;
    height: auto;
    opacity: 1;
    padding: var(--space-2);
    border-radius: var(--radius-md);
    background: var(--color-logo-surface);
    border: 1px solid var(--color-logo-surface-border);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.28);
}

.footer__tagline {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    font-weight: var(--font-weight-medium);
}

.footer__copyright {
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
    opacity: 0.6;
}

@media (min-width: 640px) {
    :root {
        --space-6: 1.75rem;
        --space-8: 2.5rem;
        --space-10: 3rem;
        --space-12: 4rem;
        --space-16: 6rem;
        --space-20: 8rem;
    }
    
    .hero__content {
        gap: var(--space-8);
    }
    
    .hero__logo-wrapper {
        padding: var(--space-5);
    }
    
    .hero__logo {
        width: 110px;
    }
    
    .hero__title-line {
        font-size: var(--font-size-4xl);
    }
    
    .hero__subtitle {
        font-size: var(--font-size-xl);
    }
    
    .platforms {
        padding: var(--space-20) var(--space-8);
    }
    
    .platforms__title {
        font-size: var(--font-size-2xl);
    }
    
    .platforms__subtitle {
        font-size: var(--font-size-lg);
    }
    
    .platform-card {
        padding: var(--space-6);
    }
    
    .platform-card__icon-wrapper {
        width: 64px;
        height: 64px;
    }
    
    .platform-card__icon {
        width: 36px;
        height: 36px;
    }
    
    .platform-card__name {
        font-size: var(--font-size-lg);
    }
    
    .platform-card__action {
        font-size: var(--font-size-base);
    }
}

@media (min-width: 1024px) {
    .hero__title-line {
        font-size: var(--font-size-5xl);
    }
    
    .platforms__container {
        max-width: 720px;
    }
    
    .platforms__grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-5);
    }
    
    .platform-card:nth-child(7) {
        grid-column: 1 / -1;
        max-width: 50%;
        margin: 0 auto;
    }
}

@media (hover: none) and (pointer: coarse) {
    .platform-card {
        padding: var(--space-5);
        min-height: 88px;
    }
    
    .platform-card__icon-wrapper {
        width: 52px;
        height: 52px;
    }
    
    .platform-card:hover {
        transform: none;
        box-shadow: var(--shadow-sm), var(--shadow-inner);
        border-color: rgba(255, 255, 255, 0.06);
    }
    
    .platform-card:active {
        transform: scale(0.96);
        background: var(--color-surface-hover);
    }
}

.platform-card:focus-visible {
    outline: 2px solid var(--color-accent-gold);
    outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
    .loader__house,
    .loader__word,
    .loader__progress-bar,
    .hero__title-line,
    .hero__subtitle,
    .hero__scroll-hint,
    .scroll-hint__wheel,
    .platform-card {
        animation: none;
        transition: none;
    }
    
    .loader__house {
        stroke-dashoffset: 0;
    }
    
    .loader__word {
        opacity: 1;
        transform: none;
    }
    
    .loader__progress-bar {
        width: 100%;
    }
    
    .hero__scroll-hint {
        opacity: 1;
    }
}

@media (prefers-contrast: high) {
    .platform-card {
        border-width: 2px;
        border-color: rgba(255, 255, 255, 0.3);
    }
    
    .platform-card__name {
        color: #FFFFFF;
    }
    
    .platform-card__action {
        color: #CCCCCC;
    }
}

@media print {
    .loader,
    .ambient,
    .hero__scroll-hint {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .platform-card {
        break-inside: avoid;
        border: 1px solid #ccc;
        box-shadow: none;
    }
}
