@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: local(''), url('../fonts/inter-300.woff2') format('woff2');
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: local(''), url('../fonts/inter-400.woff2') format('woff2');
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: local(''), url('../fonts/inter-500.woff2') format('woff2');
}

@font-face {
    font-family: 'Cormorant Garamond';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: local(''), url('../fonts/cormorant-400.woff2') format('woff2');
}
@font-face {
    font-family: 'Cormorant Garamond';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: local(''), url('../fonts/cormorant-600.woff2') format('woff2');
}
@font-face {
    font-family: 'Cormorant Garamond';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: local(''), url('../fonts/cormorant-700.woff2') format('woff2');
}

:root {
    transition: background-color 0.8s ease, color 0.8s ease;
}

[data-theme="gentleman"] {
    --bg-color: #1B1C17;
    --text-main: #E8E6D9;
    --accent: #E6D9A1;
    --card-bg: #22231D;
    --border-color: rgba(230, 217, 161, 0.15);
    --btn-active: var(--accent);
    --header-bg: rgba(27, 28, 23, 0.8);
}

[data-theme="noir"] {
    --bg-color: #050505;
    --text-main: #ffffff;
    --accent: #d1d5db;
    --card-bg: #111111;
    --border-color: rgba(255, 255, 255, 0.1);
    --btn-active: var(--accent);
    --header-bg: rgba(5, 5, 5, 0.8);
}

[data-theme="pearl"] {
    --bg-color: #F7F5F0;
    --text-main: #1A1C1E;
    --accent: #8C7A6B;
    --card-bg: #FFFFFF;
    --border-color: rgba(0, 0, 0, 0.1);
    --btn-active: var(--accent);
    --header-bg: rgba(247, 245, 240, 0.85);
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
}

h1, h2, h3, .font-serif {
    font-family: 'Cormorant Garamond', serif;
}

html.lenis, html.lenis body {
    height: auto;
}

.lenis.lenis-smooth {
    scroll-behavior: auto !important;
}

/* =========================================
   КАСТОМНЫЙ СКРОЛЛБАР (ПРЕМИУМ)
   ========================================= */
html {
    scrollbar-width: thin;
    scrollbar-color: var(--accent) var(--bg-color);
}

::-webkit-scrollbar {
    width: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-main);
}

/* =========================================
   HEADER GLASS & SMART SCROLL EFFECTS
   ========================================= */
header {
    background-color: transparent;
    border-bottom: 1px solid transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), background-color 0.4s ease, border-color 0.4s ease;
    transform: translateY(0);
}

header.header-scrolled {
    background-color: var(--header-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
}

/* =========================================
   UI ELEMENTS
   ========================================= */
.theme-btn {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-main);
    opacity: 0.3;
    transition: all 0.4s ease;
    background: none;
    position: relative;
}

.theme-btn:hover, .theme-btn.active {
    opacity: 1;
    color: var(--btn-active);
}

.theme-btn.active::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: var(--btn-active);
    transition: background-color 0.4s ease;
}

/* =========================================
   WATCH BEZEL SCROLL INDICATOR
   ========================================= */
.bezel-scroll-wrapper {
    position: absolute;
    bottom: 40px;
    right: 5vw;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    animation: fadeInOnLoad 1.5s ease 1s forwards;
    z-index: 20;
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    transform-origin: center center;
}

.bezel-text-ring {
    width: 120px;
    height: 120px;
    animation: spinRing 20s linear infinite;
}

.bezel-scroll-wrapper:active {
    transform: scale(0.95);
}

.bezel-text-ring svg {
    width: 100%;
    height: 100%;
    fill: var(--text-main);
    opacity: 0.4;
    transition: opacity 0.3s;
}

.bezel-scroll-wrapper:hover .bezel-text-ring svg {
    opacity: 0.8;
}

.bezel-center-dot {
    position: absolute;
    width: 6px;
    height: 6px;
    background-color: var(--btn-active);
    border-radius: 50%;
    transition: transform 0.3s;
}

.bezel-scroll-wrapper:hover .bezel-center-dot {
    transform: scale(1.5);
}

@keyframes spinRing {
    from { transform: rotate(0deg); }
    to { transform: rotate(-360deg); }
}

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

/* =========================================
   УСЛУГИ
   ========================================= */
.split-section {
    display: flex;
    position: relative;
    background-color: var(--bg-color);
}

.split-left {
    width: 50%;
    height: 100vh;
    position: sticky;
    top: 0;
    display: flex;
    align-items: center;
    padding: 0 5%;
}

.split-right {
    width: 50%;
}

.service-text-block {
    position: absolute;
    width: 100%;
    left: 0;
    opacity: 0;
    transform: translateY(calc(-50% + 30px));
    transition: all 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    pointer-events: none;
    cursor: pointer;
}

.service-text-block.active {
    opacity: 1;
    transform: translateY(-50%);
    pointer-events: auto;
}

.service-photo-block {
    height: 100vh;
    width: 100%;
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.service-img-wrapper {
    height: 80vh;
    aspect-ratio: 2 / 3;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
}

.service-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1s ease;
}

.service-photo-block:hover img {
    transform: scale(1.05);
}

.service-text-block h2 {
    word-wrap: break-word;
    -webkit-hyphens: auto;
    hyphens: auto;
}

/* =========================================
   MANIFESTO
   ========================================= */
.reveal-word {
    opacity: 0.15;
    transition: opacity 0.1s ease;
}

/* =========================================
   FORM
   ========================================= */
.elegant-input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
    font-size: 1.25rem;
    padding: 15px 0;
    transition: border-color 0.3s;
    font-family: 'Inter', sans-serif;
    font-weight: 300;
}

.elegant-input:focus {
    outline: none;
    border-color: var(--accent);
}

.elegant-input::placeholder {
    color: var(--text-main);
    opacity: 0.3;
}

.elegant-input option {
    background-color: var(--card-bg) !important;
    background-image: none !important;
    color: var(--text-main) !important;
    font-family: 'Inter', sans-serif;
}

.btn-elegant {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 20px 50px;
    border-radius: 4px;
    font-family: 'Inter', sans-serif;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.4s ease;
}

.btn-elegant:hover {
    background: var(--accent);
    color: var(--bg-color);
}

.elegant-checkbox {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 1px solid var(--border-color);
    background-color: transparent;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    margin-top: 2px;
    transition: all 0.3s ease;
}

.elegant-checkbox:checked {
    background-color: var(--accent);
    border-color: var(--accent);
}

.elegant-checkbox:checked::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 5px;
    height: 9px;
    border: solid var(--bg-color);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.elegant-checkbox:focus {
    outline: none;
    border-color: var(--accent);
}

.consent-link {
    color: var(--accent);
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease;
}

.consent-link:hover {
    border-bottom-color: var(--accent);
}

.btn-elegant:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

/* =========================================
   INTERACTIVE CONTRACT
   ========================================= */
.mad-lib-input, .mad-lib-select, .mad-lib-span {
    background: transparent;
    border: none;
    border-bottom: 2px solid var(--border-color);
    color: var(--btn-active);
    font-family: 'Cormorant Garamond', serif;
    text-align: center;
    border-radius: 0;
    padding: 0 10px;
    margin: 0 5px;
    outline: none;
    transition: border-bottom-color 0.4s ease;
}

.mad-lib-input, .mad-lib-select {
    width: auto;
    min-width: 140px;
    appearance: none;
    cursor: pointer;
}

.mad-lib-span {
    display: inline-block;
    min-width: 140px;
    max-width: 100%;
    cursor: text;
    vertical-align: baseline;
    white-space: pre-wrap;
    word-break: break-word;
}

.mad-lib-span:empty::before {
    content: attr(data-placeholder);
    color: var(--text-main);
    opacity: 0.3;
    font-weight: 300;
    pointer-events: none;
}

.mad-lib-input:focus, .mad-lib-select:focus, .mad-lib-span:focus {
    border-bottom-color: var(--btn-active);
}

.mad-lib-input::placeholder {
    color: var(--text-main);
    opacity: 0.3;
    font-weight: 300;
}

.mad-lib-select {
    padding-right: 25px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23888888'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 5px center;
    background-size: 14px;
}

.mad-lib-select option {
    background-color: var(--card-bg);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
}

.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

#contract-modal .relative.w-full.max-w-5xl {
    overflow-anchor: none;
}

/* =========================================
   УВЕДОМЛЕНИЯ
   ========================================= */
.notification {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 200;
    max-width: 420px;
    padding: 16px 20px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    transform: translateX(120%);
    opacity: 0;
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.4s ease;
    pointer-events: none;
}

.notification.show {
    transform: translateX(0);
    opacity: 1;
}

.notification.hide {
    transform: translateX(120%);
    opacity: 0;
}

.notification-icon {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    margin-top: 1px;
}

.notification-icon.success {
    color: var(--accent);
}

.notification-icon.error {
    color: #d4786e;
}

.notification-body {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-family: 'Inter', sans-serif;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    margin-bottom: 4px;
}

.notification-title.success {
    color: var(--accent);
}

.notification-title.error {
    color: #d4786e;
}

.notification-text {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    line-height: 1.5;
    opacity: 0.7;
    color: var(--text-main);
    letter-spacing: 0.05em;
}

.notification-close {
    flex-shrink: 0;
    background: none;
    border: none;
    color: var(--text-main);
    opacity: 0.3;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    padding: 0;
    margin-top: -2px;
    transition: opacity 0.2s;
}

.notification-close:hover {
    opacity: 0.7;
}

/* =========================================
   HAMBURGER BUTTON & DRAWER MENU
   ========================================= */
.hamburger-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    width: 44px;
    height: 44px;
    padding: 0;
    z-index: 60;
    outline: none;
}

.hamburger-btn .line {
    display: block;
    height: 2px;
    background-color: var(--accent);
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.hamburger-btn .line-1 {
    width: 24px;
}

.hamburger-btn .line-2 {
    width: 16px;
    align-self: flex-end;
}

.hamburger-btn:hover .line-2 {
    width: 24px;
}

header.menu-open .hamburger-btn .line-1 {
    transform: translateY(4px) rotate(45deg);
    width: 24px;
}

header.menu-open .hamburger-btn .line-2 {
    transform: translateY(-4px) rotate(-45deg);
    width: 24px;
    align-self: center;
}

.menu-sub-link {
    color: var(--text-main);
    opacity: 0.5;
    transition: opacity 0.3s ease, color 0.3s ease;
    display: block;
}

.menu-sub-link:hover {
    opacity: 1 !important;
    color: var(--accent) !important;
}

#menu-drawer {
    background-color: var(--bg-color);
    color: var(--text-main);
    transition: opacity 0.5s ease-out, transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    transform: translateY(-20px);
}

#menu-drawer.drawer-active {
    opacity: 1 !important;
    transform: translateY(0) !important;
    pointer-events: auto !important;
}

.menu-divider {
    border-color: var(--border-color);
}

/* =========================================
   (@media 1024px)
   ========================================= */
@media (max-width: 1024px) {
    .bezel-scroll-wrapper {
        bottom: 30px;
        right: 30px;
        transform: scale(0.8);
    }
    .bezel-scroll-wrapper:active {
        transform: scale(0.75);
    }

    .split-section {
        display: block;
        padding: 4rem 1.5rem;
    }
    .split-left {
        width: 100%;
        height: auto;
        position: relative;
    }
    .split-left > div {
        position: relative !important;
        height: auto !important;
    }

    .split-right {
        display: none !important;
    }

    .service-text-block {
        position: relative !important;
        opacity: 1 !important;
        transform: none !important;
        pointer-events: auto !important;
        margin-bottom: 6rem !important;
        width: 100% !important;
    }

    .service-photo-block {
        height: auto !important;
        padding: 2rem 0 !important;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .service-img-wrapper {
        height: auto !important;
        max-height: none !important;
        width: 75vw !important;
        max-width: 280px !important;
        aspect-ratio: 2 / 3 !important;
        margin: 0 auto;
    }

    .btn-elegant {
        padding: 16px 28px !important;
        font-size: 0.75rem !important;
        letter-spacing: 2px !important;
        width: 100% !important;
        justify-content: center;
    }

    #narrative-bridge {
        height: auto !important;
        min-height: 100dvh !important;
        padding: 6rem 1.5rem !important;
    }

    .notification {
        left: 16px;
        right: 16px;
        max-width: none;
        transform: translateY(-120%);
    }
    .notification.show {
        transform: translateY(0);
    }
    .notification.hide {
        transform: translateY(-120%);
    }
}
