/* ============================================
   ANI PETRINCHIK — anipers.com
   Pearl / Lilac — Dark Hybrid
   ============================================ */

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

:root {
    --dark: #0A0A0F;
    --dark-warm: #0D0C14;
    --light: #F5F3F8;
    --light-muted: #EDEBF2;
    --pearl: #E8E0F0;
    --lilac: #9B8EC4;
    --lilac-soft: #B8AED6;
    --lilac-glow: rgba(155, 142, 196, 0.15);
    --text-light: #FFFFFF;
    --text-dark: #111111;
    --muted: #6B6680;
    --muted-light: rgba(255, 255, 255, 0.4);
    --border-dark: rgba(155, 142, 196, 0.12);
    --border-light: rgba(107, 102, 128, 0.15);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

body {
    font-family: var(--font);
    background: var(--dark);
    color: var(--text-light);
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
    cursor: none;
}

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

::selection {
    background: var(--lilac);
    color: var(--dark);
}

/* --- Loader --- */
.loader {
    position: fixed;
    inset: 0;
    background: var(--dark);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 32px;
}

.loader-line {
    width: 0;
    height: 1px;
    background: var(--lilac);
    transition: none;
}

.loader-text {
    font-size: 13px;
    letter-spacing: 0.2em;
    font-weight: 300;
    color: var(--pearl);
    opacity: 0;
}

.loader.done {
    pointer-events: none;
}

/* --- Cursor --- */
.cursor {
    position: fixed;
    width: 10px;
    height: 10px;
    background: var(--lilac);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
    transition: width 0.3s cubic-bezier(0.23, 1, 0.32, 1),
                height 0.3s cubic-bezier(0.23, 1, 0.32, 1),
                opacity 0.3s ease;
    mix-blend-mode: screen;
    opacity: 0.8;
}

.cursor.hover {
    width: 48px;
    height: 48px;
    opacity: 0.3;
}

@media (pointer: coarse) {
    .cursor { display: none; }
    body, a { cursor: auto; }
}

/* --- Nav --- */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 32px 48px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.5s ease, padding 0.5s ease;
}

.nav.scrolled {
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    padding: 20px 48px;
}

.nav-logo {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.15em;
    color: var(--pearl);
}

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

.nav-links a {
    font-size: 13px;
    font-weight: 300;
    letter-spacing: 0.1em;
    color: var(--muted-light);
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--pearl);
}

/* --- Hero --- */
.hero {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 700px;
    overflow: hidden;
    background: var(--dark);
}

#sphereCanvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-photo-wrap {
    position: absolute;
    right: 0;
    top: 0;
    width: 55%;
    height: 100%;
    z-index: 2;
    overflow: hidden;
}

.hero-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 70% 30%;
    opacity: 0;
    transform: scale(1.05);
    mask-image:
        linear-gradient(to right, transparent 0%, rgba(0,0,0,0.4) 15%, rgba(0,0,0,0.8) 40%, rgba(0,0,0,0.9) 70%, rgba(0,0,0,0.5) 100%),
        linear-gradient(to bottom, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.9) 60%, transparent 100%);
    -webkit-mask-image:
        linear-gradient(to right, transparent 0%, rgba(0,0,0,0.4) 15%, rgba(0,0,0,0.8) 40%, rgba(0,0,0,0.9) 70%, rgba(0,0,0,0.5) 100%),
        linear-gradient(to bottom, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.9) 60%, transparent 100%);
    mask-composite: intersect;
    -webkit-mask-composite: source-in;
}

.hero-content {
    position: relative;
    z-index: 3;
    padding: 0 48px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.hero-name {
    margin-bottom: 32px;
}

.hero-name-line {
    display: block;
    overflow: hidden;
}

.hero-name-line .word {
    display: block;
    font-size: clamp(52px, 9vw, 120px);
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 0.95;
    color: var(--pearl);
    transform: translateY(120%);
}

.hero-taglines {
    margin-bottom: 40px;
    overflow: hidden;
}

.tagline {
    font-size: clamp(16px, 1.8vw, 20px);
    font-weight: 300;
    letter-spacing: 0.08em;
    color: var(--lilac-soft);
    opacity: 0;
    transform: translateY(20px);
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.08em;
    color: var(--lilac);
    transition: color 0.3s ease, gap 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
}

.hero-cta:hover {
    color: var(--pearl);
    gap: 20px;
}

.cta-arrow {
    font-size: 18px;
    transition: transform 0.3s ease;
}

.hero-cta:hover .cta-arrow {
    transform: translateX(4px);
}

.hero-bottom {
    position: absolute;
    bottom: 40px;
    left: 48px;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 12px;
    font-weight: 300;
    letter-spacing: 0.12em;
    color: var(--muted-light);
    opacity: 0;
}

.hero-divider {
    width: 24px;
    height: 1px;
    background: var(--muted-light);
}

/* --- Section common --- */
.section-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 48px;
}

.section-label {
    font-size: 12px;
    font-weight: 300;
    letter-spacing: 0.15em;
    color: var(--lilac);
    margin-bottom: 64px;
}

/* Dark section on light bg gets dark label */
.work .section-label {
    color: var(--lilac);
}

/* --- About (light) --- */
.about {
    background: var(--light);
    color: var(--text-dark);
    padding: 160px 0;
}

.about .section-label {
    color: var(--lilac);
}

.about-content {
    max-width: 1000px;
}

.about-lead {
    font-size: clamp(24px, 3.2vw, 40px);
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.02em;
    margin-bottom: 64px;
    color: var(--text-dark);
}

.about-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
}

.about-col p {
    font-size: 15px;
    font-weight: 400;
    line-height: 1.7;
    color: var(--muted);
    margin-bottom: 16px;
}

.about-col p:last-child {
    margin-bottom: 0;
}

/* --- Services (dark) --- */
.services {
    background: var(--dark-warm);
    padding: 160px 0;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
}

.service-card {
    padding: 56px 40px;
    background: rgba(155, 142, 196, 0.04);
    border: 1px solid var(--border-dark);
    transition: background 0.4s ease;
}

.service-card:hover {
    background: rgba(155, 142, 196, 0.08);
}

.service-num {
    font-size: 12px;
    font-weight: 300;
    letter-spacing: 0.1em;
    color: var(--lilac);
    margin-bottom: 32px;
}

.service-title {
    font-size: clamp(22px, 2.4vw, 28px);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.01em;
    color: var(--pearl);
    margin-bottom: 24px;
}

.service-desc {
    font-size: 14px;
    font-weight: 300;
    line-height: 1.7;
    color: var(--muted-light);
}

/* --- Work (light) --- */
.work {
    background: var(--light);
    color: var(--text-dark);
    padding: 160px 0;
}

.work-list {
    display: flex;
    flex-direction: column;
}

.work-item {
    display: grid;
    grid-template-columns: 48px 1fr 1.2fr auto;
    align-items: center;
    gap: 32px;
    padding: 36px 0;
    border-bottom: 1px solid var(--border-light);
    transition: padding-left 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    cursor: default;
}

.work-item:first-child {
    border-top: 1px solid var(--border-light);
}

.work-item:hover {
    padding-left: 16px;
}

.work-num {
    font-size: 12px;
    font-weight: 300;
    letter-spacing: 0.1em;
    color: var(--lilac);
}

.work-info h4 {
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--text-dark);
}

.work-info p {
    font-size: 13px;
    font-weight: 300;
    color: var(--muted);
    margin-top: 2px;
}

.work-result {
    font-size: 14px;
    font-weight: 300;
    color: var(--muted);
}

.work-arrow {
    font-size: 18px;
    color: var(--lilac);
    transition: transform 0.3s ease;
}

.work-item:hover .work-arrow {
    transform: translateX(6px);
}

/* --- Connect (dark) --- */
.connect {
    background: var(--dark);
    padding: 160px 0;
}

.connect-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 120px;
}

.connect-heading {
    font-size: clamp(48px, 7vw, 96px);
    font-weight: 900;
    line-height: 0.95;
    letter-spacing: -0.03em;
    color: var(--pearl);
    margin-bottom: 40px;
}

.connect-sub {
    font-size: 16px;
    font-weight: 300;
    line-height: 1.7;
    color: var(--muted-light);
}

.connect-links {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 56px;
}

.connect-links a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid var(--border-dark);
    transition: padding-left 0.3s ease;
}

.connect-links a:first-child {
    border-top: 1px solid var(--border-dark);
}

.connect-links a:hover {
    padding-left: 12px;
}

.link-label {
    font-size: 12px;
    font-weight: 300;
    letter-spacing: 0.12em;
    color: var(--muted-light);
    text-transform: uppercase;
}

.link-value {
    font-size: 15px;
    font-weight: 400;
    color: var(--pearl);
    transition: color 0.3s ease;
}

.connect-links a:hover .link-value {
    color: var(--lilac);
}

.connect-note {
    font-size: 13px;
    font-weight: 300;
    line-height: 1.8;
    color: var(--muted);
}

/* --- Footer --- */
.footer {
    background: var(--dark);
    padding: 40px 48px;
    display: flex;
    justify-content: center;
    gap: 32px;
    border-top: 1px solid var(--border-dark);
}

.footer span {
    font-size: 12px;
    font-weight: 300;
    letter-spacing: 0.1em;
    color: var(--muted);
}

/* --- Reveal animation state --- */
[data-reveal] {
    opacity: 0;
    transform: translateY(32px);
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .hero-photo-wrap {
        width: 65%;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .work-item {
        grid-template-columns: 40px 1fr auto;
    }

    .work-result {
        display: none;
    }

    .connect-grid {
        grid-template-columns: 1fr;
        gap: 64px;
    }
}

@media (max-width: 768px) {
    .nav {
        padding: 24px 24px;
    }

    .nav.scrolled {
        padding: 16px 24px;
    }

    .nav-links {
        gap: 24px;
    }

    .hero-content {
        padding: 0 24px;
    }

    .hero-photo-wrap {
        width: 100%;
        opacity: 0.3;
    }

    .hero-photo {
        mask-image:
            linear-gradient(to bottom, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.3) 60%, transparent 100%);
        -webkit-mask-image:
            linear-gradient(to bottom, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.3) 60%, transparent 100%);
    }

    .hero-name-line .word {
        font-size: 48px;
    }

    .hero-bottom {
        left: 24px;
        bottom: 32px;
        gap: 12px;
        font-size: 10px;
    }

    .section-inner {
        padding: 0 24px;
    }

    .about, .services, .work, .connect {
        padding: 100px 0;
    }

    .about-lead {
        font-size: 24px;
        margin-bottom: 40px;
    }

    .about-columns {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .service-card {
        padding: 40px 24px;
    }

    .work-item {
        grid-template-columns: 32px 1fr auto;
        gap: 16px;
        padding: 28px 0;
    }

    .connect-heading {
        font-size: 48px;
    }

    .footer {
        padding: 32px 24px;
        gap: 20px;
    }
}
