/* MiRiS Project - Design System */
/* Colors: #CDCDD8, #5A5A70, #0E0E14, #14141C, #1C1C22, #9B5FFF, #2E2E3A, #7B2FFF, #FF3B5C, #E8E8EC, #2A2A34 */

:root {
    --bg-deep: #0E0E14;
    --bg-panel: #1C1C22;
    --bg-elevated: #2A2A34;
    --bg-mid: #14141C;
    --accent-primary: #9B5FFF;
    --accent-deep: #7B2FFF;
    --accent-danger: #FF3B5C;
    --text-bright: #E8E8EC;
    --text-muted: #CDCDD8;
    --text-dim: #5A5A70;
    --text-secondary: #A0A0B0;
    --border-subtle: #2E2E3A;
    --font-heading: 'Commissioner', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'Space Mono', monospace;
    --font-accent: 'Lora', serif;
}

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

html {
    scroll-snap-type: y proximity;
    scroll-behavior: smooth;
    background: var(--bg-deep);
}

body {
    font-family: var(--font-body);
    background: var(--bg-deep);
    color: var(--text-muted);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Cursor field */
.cursor-field {
    position: fixed;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(155, 95, 255, 0.06) 0%, transparent 70%);
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s ease;
    opacity: 0;
}

.cursor-field.active {
    opacity: 1;
}

/* Background grid */
.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.03;
    background-image:
        linear-gradient(var(--accent-primary) 1px, transparent 1px),
        linear-gradient(90deg, var(--accent-primary) 1px, transparent 1px);
    background-size: 60px 60px;
}

/* Particle canvas */
#particleCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

/* Navigation */
.nav-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 3rem;
    background: linear-gradient(180deg, rgba(14, 14, 20, 0.95) 0%, rgba(14, 14, 20, 0) 100%);
    transition: background 0.4s ease;
}

.nav-bar.scrolled {
    background: rgba(14, 14, 20, 0.97);
    backdrop-filter: blur(12px);
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-text {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.4rem;
    color: var(--text-bright);
    letter-spacing: -0.02em;
}

.logo-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-primary);
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.7); }
}

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-link {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-dim);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    transition: color 0.3s ease, transform 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent-primary);
    transition: width 0.3s ease;
}

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

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

.nav-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #4ADE80;
    box-shadow: 0 0 8px rgba(74, 222, 128, 0.4);
}

.status-text {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Main Content */
main {
    position: relative;
    z-index: 2;
}

/* Section Base */
.section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    scroll-snap-align: start;
    overflow: visible;
}

.section-content {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 6rem 3rem 4rem;
}

.section-header {
    display: flex;
    align-items: baseline;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.section-number {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent-primary);
    opacity: 0.6;
    letter-spacing: 0.05em;
}

.section-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    color: var(--text-bright);
    letter-spacing: -0.02em;
    line-height: 1.05;
    transition: transform 0.3s ease;
}

.section-accent-line {
    position: absolute;
    bottom: 0;
    left: 3rem;
    width: 60px;
    height: 2px;
    background: var(--accent-primary);
    opacity: 0.4;
}

/* Hero Section */
.section-hero {
    min-height: 100vh;
    background: var(--bg-deep);
}

.section-hero .section-content {
    display: flex;
    align-items: center;
    gap: 4rem;
    padding-top: 8rem;
}

.hero-left {
    flex: 0 0 55%;
    max-width: 55%;
}

.hero-right {
    flex: 1;
    position: relative;
}

.hero-label {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.label-line {
    width: 40px;
    height: 1px;
    background: var(--accent-primary);
    opacity: 0.5;
}

.label-text {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.hero-title {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease;
}

.title-line {
    display: block;
    font-size: clamp(3rem, 6vw, 5.5rem);
    color: var(--text-bright);
}

.title-accent {
    color: var(--accent-primary);
    font-style: italic;
    font-family: var(--font-accent);
}

.hero-subtitle {
    font-family: var(--font-body);
    font-size: 1.1rem;
    font-weight: 300;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 480px;
    margin-bottom: 2.5rem;
}

.hero-cta {
    margin-top: 1rem;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 2rem;
    border: 1px solid var(--border-subtle);
    background: transparent;
    color: var(--text-bright);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    transition: border-color 0.3s ease, background 0.3s ease, transform 0.3s ease;
}

.cta-button:hover {
    border-color: var(--accent-primary);
    background: rgba(155, 95, 255, 0.05);
}

.cta-arrow {
    transition: transform 0.3s ease;
}

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

/* Collage */
.collage-cluster {
    position: relative;
    width: 100%;
    height: 450px;
}

.collage-piece {
    position: absolute;
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.collage-svg {
    width: 100%;
    height: 100%;
    display: block;
}

.piece-1 {
    top: 0;
    left: 10%;
    width: 65%;
    transform: rotate(2deg);
    z-index: 2;
}

.piece-2 {
    top: 15%;
    right: 0;
    width: 45%;
    transform: rotate(-3deg);
    z-index: 3;
    opacity: 0.8;
}

.piece-3 {
    bottom: 5%;
    left: 5%;
    width: 35%;
    transform: rotate(1deg);
    z-index: 1;
    opacity: 0.6;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    animation: fade-bounce 2s ease-in-out infinite;
}

@keyframes fade-bounce {
    0%, 100% { opacity: 0.4; transform: translateY(0); }
    50% { opacity: 0.8; transform: translateY(6px); }
}

.scroll-line {
    width: 1px;
    height: 30px;
    background: linear-gradient(180deg, var(--accent-primary), transparent);
}

.scroll-label {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

/* About Section */
.section-about {
    background: var(--bg-mid);
}

.about-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: start;
}

.about-lead {
    font-family: var(--font-body);
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.about-body {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 300;
    color: var(--text-dim);
    line-height: 1.8;
}

.about-sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding-top: 0.5rem;
}

.stat-block {
    padding: 1.5rem;
    border-left: 2px solid var(--border-subtle);
    transition: border-color 0.3s ease, transform 0.3s ease;
}

.stat-block:hover {
    border-color: var(--accent-primary);
}

.stat-number {
    display: block;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 2.5rem;
    color: var(--text-bright);
    line-height: 1;
    margin-bottom: 0.3rem;
}

.stat-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* Works Section */
.section-works {
    background: var(--bg-deep);
    min-height: auto;
    padding: 2rem 0;
}

.works-grid {
    display: grid;
    gap: 3rem;
}

.work-card {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 2.5rem;
    padding: 2rem;
    background: var(--bg-panel);
    border: 1px solid var(--border-subtle);
    transition: border-color 0.4s ease, transform 0.4s ease;
    position: relative;
    overflow: hidden;
}

.work-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(155, 95, 255, 0.02) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.work-card:hover {
    border-color: var(--accent-primary);
}

.work-card:hover::before {
    opacity: 1;
}

.work-visual {
    position: relative;
    overflow: hidden;
}

.work-svg {
    width: 100%;
    height: auto;
    display: block;
}

.work-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1rem 0;
}

.work-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.8rem;
    color: var(--text-bright);
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}

.work-desc {
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 300;
    color: var(--text-dim);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.work-tag {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.7;
}

/* Process Section */
.section-process {
    background: var(--bg-mid);
}

.process-steps {
    display: grid;
    gap: 0;
}

.process-step {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 2.5rem;
    align-items: center;
    padding: 2.5rem 0;
    border-bottom: 1px solid var(--border-subtle);
    transition: transform 0.3s ease;
    position: relative;
}

.process-step:last-child {
    border-bottom: none;
}

.step-number-large {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 3rem;
    color: var(--border-subtle);
    line-height: 1;
    min-width: 80px;
    transition: color 0.3s ease;
}

.process-step:hover .step-number-large {
    color: var(--accent-primary);
}

.step-content {
    max-width: 600px;
}

.step-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.4rem;
    color: var(--text-bright);
    letter-spacing: -0.01em;
    margin-bottom: 0.5rem;
}

.step-desc {
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 300;
    color: var(--text-dim);
    line-height: 1.7;
}

.step-line {
    width: 40px;
    height: 1px;
    background: var(--border-subtle);
    transition: background 0.3s ease, width 0.3s ease;
}

.process-step:hover .step-line {
    background: var(--accent-primary);
    width: 60px;
}

/* Contact Section */
.section-contact {
    background: var(--bg-deep);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 4rem;
    align-items: center;
}

.contact-lead {
    font-family: var(--font-body);
    font-size: 1.15rem;
    font-weight: 300;
    color: var(--text-dim);
    line-height: 1.8;
    margin-bottom: 2.5rem;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.2rem 1.5rem;
    border: 1px solid var(--border-subtle);
    text-decoration: none;
    transition: border-color 0.3s ease, background 0.3s ease, transform 0.3s ease;
}

.contact-link:hover {
    border-color: var(--accent-primary);
    background: rgba(155, 95, 255, 0.03);
}

.contact-link-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    min-width: 60px;
    opacity: 0.7;
}

.contact-link-value {
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text-muted);
    transition: color 0.3s ease;
}

.contact-link:hover .contact-link-value {
    color: var(--text-bright);
}

.contact-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.contact-svg {
    width: 280px;
    height: 280px;
    animation: rotate-slow 30s linear infinite;
}

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

/* Footer */
.site-footer {
    padding: 2rem 3rem;
    background: var(--bg-deep);
    position: relative;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.footer-logo {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-bright);
    letter-spacing: -0.02em;
}

.footer-tagline {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.footer-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.footer-year,
.footer-separator,
.footer-status {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-dim);
    letter-spacing: 0.05em;
}

.footer-line {
    margin-top: 1.5rem;
    height: 1px;
    background: linear-gradient(90deg, var(--accent-primary), transparent);
    opacity: 0.15;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* Scroll reveal animations */
.section-header,
.about-lead,
.about-body,
.about-sidebar,
.work-card,
.process-step,
.contact-lead,
.contact-links,
.contact-visual {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.23, 1, 0.32, 1), transform 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

.revealed {
    opacity: 1;
    transform: translateY(0) !important;
}

/* Magnetic element hover states */
.magnetic-element {
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    will-change: transform;
}

/* Responsive */
@media (max-width: 900px) {
    .nav-bar {
        padding: 1rem 1.5rem;
    }

    .nav-links {
        display: none;
    }

    .section-content {
        padding: 5rem 1.5rem 3rem;
    }

    .section-hero .section-content {
        flex-direction: column;
        padding-top: 6rem;
    }

    .hero-left {
        flex: none;
        max-width: 100%;
    }

    .hero-right {
        display: none;
    }

    .title-line {
        font-size: clamp(2.2rem, 8vw, 3.5rem);
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .about-sidebar {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 1rem;
    }

    .stat-block {
        flex: 1;
        min-width: 100px;
    }

    .work-card {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact-visual {
        display: none;
    }

    .process-step {
        grid-template-columns: auto 1fr;
        gap: 1.5rem;
    }

    .step-line {
        display: none;
    }

    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

@media (max-width: 600px) {
    .section-title {
        font-size: clamp(1.8rem, 7vw, 2.5rem);
    }

    .stat-number {
        font-size: 2rem;
    }

    .step-number-large {
        font-size: 2rem;
        min-width: 50px;
    }
}
