/* ================================
   MIRAESOFT - Premium Design
   ================================ */

:root {
    --black: #0a0a0a;
    --white: #ffffff;
    --gray-50: #fafafa;
    --gray-100: #f5f5f5;
    --gray-200: #e5e5e5;
    --gray-300: #d4d4d4;
    --gray-400: #a3a3a3;
    --gray-500: #737373;
    --gray-600: #525252;
    --gray-700: #404040;
    --gray-800: #262626;
    --gray-900: #171717;

    --accent: #34d399;
    --accent-light: #6ee7b7;

    --font-sans: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'Apple SD Gothic Neo', sans-serif;
    --font-mono: 'SF Mono', 'Fira Code', monospace;

    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
}

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

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

body {
    font-family: var(--font-sans);
    background: var(--black);
    color: var(--white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

::selection {
    background: var(--accent);
    color: var(--black);
}

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

button {
    font-family: inherit;
    cursor: pointer;
}

.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 clamp(24px, 5vw, 80px);
}

/* Noise Texture */
.noise {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    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='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* Custom Cursor */
.cursor {
    position: fixed;
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
    transition: transform 0.1s, width 0.3s, height 0.3s, background 0.3s;
    mix-blend-mode: difference;
}

.cursor-follower {
    position: fixed;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: transform 0.15s var(--ease-out-quart), width 0.3s, height 0.3s, border-color 0.3s;
}

.cursor.hover {
    width: 16px;
    height: 16px;
}

.cursor-follower.hover {
    width: 60px;
    height: 60px;
    border-color: var(--accent);
}

@media (hover: none) {
    .cursor, .cursor-follower { display: none; }
}

/* ================================
   Navigation
   ================================ */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 24px 0;
    transition: background 0.4s, padding 0.4s;
}

.nav.scrolled {
    background: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 16px 0;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 clamp(24px, 5vw, 80px);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    transition: opacity 0.3s;
}

.nav-logo:hover {
    opacity: 0.7;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 48px;
    list-style: none;
}

.nav-link {
    font-size: 0.875rem;
    color: var(--gray-400);
    transition: color 0.3s;
    position: relative;
}

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

/* ================================
   Hero Section
   ================================ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding: 120px 0;
    overflow: hidden;
    background: var(--black);
}

/* Aurora Background */
.aurora {
    position: absolute;
    inset: 0;
    overflow: hidden;
    filter: blur(80px);
    opacity: 0.7;
}

.aurora-blob {
    position: absolute;
    border-radius: 50%;
    animation: auroraFloat 20s ease-in-out infinite;
}

.aurora-1 {
    width: max(400px, 60vw);
    height: max(400px, 60vw);
    top: -20%;
    left: -10%;
    background: radial-gradient(circle, rgba(52, 211, 153, 0.5) 0%, transparent 70%);
    animation-delay: 0s;
}

.aurora-2 {
    width: max(350px, 50vw);
    height: max(350px, 50vw);
    top: 20%;
    right: -15%;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.4) 0%, transparent 70%);
    animation-delay: -5s;
    animation-duration: 25s;
}

.aurora-3 {
    width: max(300px, 40vw);
    height: max(300px, 40vw);
    bottom: -10%;
    left: 30%;
    background: radial-gradient(circle, rgba(110, 231, 183, 0.35) 0%, transparent 70%);
    animation-delay: -10s;
    animation-duration: 18s;
}

@keyframes auroraFloat {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(5%, 10%) scale(1.1);
    }
    50% {
        transform: translate(-5%, 5%) scale(0.95);
    }
    75% {
        transform: translate(10%, -5%) scale(1.05);
    }
}

/* Grid Background */
.grid-bg {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 80px 80px;
    mask-image: radial-gradient(ellipse 80% 50% at 50% 50%, black 40%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 80% 50% at 50% 50%, black 40%, transparent 100%);
}

.hero-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 clamp(24px, 5vw, 80px);
    position: relative;
    z-index: 1;
}

.hero-eyebrow {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--gray-500);
}

.hero-eyebrow .line {
    width: 48px;
    height: 1px;
    background: linear-gradient(90deg, var(--accent), transparent);
}

.hero-title {
    font-size: clamp(4rem, 14vw, 11rem);
    font-weight: 600;
    line-height: 0.95;
    letter-spacing: -0.05em;
    margin-bottom: 40px;
}

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

.hero-title .word {
    display: inline-block;
    transform: translateY(100%);
    animation: slideUp 1s var(--ease-out-expo) forwards;
}

.hero-title .word:nth-child(2) { animation-delay: 0.1s; }
.hero-title-line:nth-child(2) .word { animation-delay: 0.2s; }

.hero-title .highlight {
    color: var(--accent);
    text-shadow: 0 0 80px rgba(52, 211, 153, 0.5);
}

@keyframes slideUp {
    to { transform: translateY(0); }
}

.hero-desc {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--gray-400);
    line-height: 1.8;
    max-width: 480px;
    opacity: 0;
    animation: fadeIn 1s 0.5s var(--ease-out-expo) forwards;
}

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

.hero-scroll {
    position: absolute;
    bottom: 48px;
    left: clamp(24px, 5vw, 80px);
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--gray-500);
}

.hero-scroll-line {
    width: 1px;
    height: 64px;
    background: linear-gradient(to bottom, var(--gray-600), transparent);
    position: relative;
    overflow: hidden;
}

.hero-scroll-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 20px;
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
    animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
    0% { transform: translateY(-100%); }
    50% { transform: translateY(320%); }
    100% { transform: translateY(-100%); }
}

.hero-bg-text {
    position: absolute;
    bottom: -5%;
    right: -5%;
    font-size: clamp(15rem, 30vw, 35rem);
    font-weight: 700;
    letter-spacing: -0.05em;
    color: transparent;
    -webkit-text-stroke: 1px rgba(52, 211, 153, 0.15);
    opacity: 0.8;
    user-select: none;
    line-height: 0.8;
}

/* ================================
   About Section
   ================================ */
.about {
    padding: clamp(100px, 15vh, 200px) 0;
    background: var(--gray-900);
    position: relative;
    overflow: hidden;
}

.about::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    top: 0;
    right: -200px;
    background: radial-gradient(circle, rgba(52, 211, 153, 0.05) 0%, transparent 60%);
    pointer-events: none;
}

.about-header {
    margin-bottom: clamp(48px, 8vh, 80px);
}

.section-number {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent);
    margin-bottom: 24px;
    letter-spacing: 0.1em;
}

.about-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -0.03em;
}

.about-title em {
    font-style: normal;
    color: var(--accent);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(48px, 8vw, 120px);
    align-items: start;
}

.about-text p {
    color: var(--gray-400);
    margin-bottom: 24px;
}

.about-text p.large {
    font-size: 1.25rem;
    color: var(--gray-300);
    line-height: 1.7;
}

.about-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: var(--gray-800);
    border-radius: 16px;
    overflow: hidden;
}

.about-list-item {
    display: flex;
    gap: 24px;
    padding: 32px;
    background: var(--gray-900);
    transition: background 0.3s;
}

.about-list-item:hover {
    background: var(--gray-800);
}

.about-list-item:hover .num {
    transform: scale(1.2);
}

.about-list-item .num {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent);
    padding-top: 4px;
    transition: transform 0.3s var(--ease-out-expo);
}

.about-list-item h3 {
    font-size: 1.125rem;
    font-weight: 500;
    margin-bottom: 8px;
}

.about-list-item p {
    font-size: 0.875rem;
    color: var(--gray-500);
}

/* ================================
   Services Section
   ================================ */
.services {
    padding: clamp(100px, 15vh, 200px) 0;
    background: var(--black);
    position: relative;
    overflow: hidden;
}

.services::before {
    content: '';
    position: absolute;
    width: 800px;
    height: 800px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(52, 211, 153, 0.08) 0%, transparent 60%);
    pointer-events: none;
}

.services-header {
    margin-bottom: clamp(48px, 8vh, 80px);
}

.services-title {
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 500;
    letter-spacing: -0.03em;
}

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

.service-item {
    background: var(--gray-900);
    border: 1px solid var(--gray-800);
    border-radius: 24px;
    padding: clamp(32px, 4vw, 48px);
    transition: border-color 0.4s, transform 0.4s var(--ease-out-expo);
    position: relative;
}

.service-item:hover {
    border-color: rgba(52, 211, 153, 0.3);
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(52, 211, 153, 0.1);
}

.service-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 48px;
}

.service-tag {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--gray-500);
    padding: 8px 16px;
    background: var(--gray-800);
    border-radius: 100px;
}

.service-arrow {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--gray-700);
    border-radius: 50%;
    color: var(--gray-500);
    transition: all 0.3s;
}

.service-arrow svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s var(--ease-out-expo);
}

.service-item:hover .service-arrow {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--black);
}

.service-item:hover .service-arrow svg {
    transform: translate(2px, -2px);
}

.service-name {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 500;
    letter-spacing: -0.02em;
    margin-bottom: 24px;
    transition: color 0.3s;
}

.service-item:hover .service-name {
    color: var(--accent);
}

.service-desc {
    font-size: 1rem;
    color: var(--gray-400);
    line-height: 1.8;
    margin-bottom: 32px;
}

.service-features {
    list-style: none;
    margin-bottom: 40px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.service-features li {
    font-size: 0.875rem;
    color: var(--gray-500);
    padding-left: 20px;
    position: relative;
}

.service-features li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
}

.service-link {
    font-size: 0.875rem;
    color: var(--accent);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: gap 0.3s;
}

.service-link:hover {
    gap: 12px;
}

.service-link::after {
    content: '→';
}

/* ================================
   Footer
   ================================ */
.footer {
    padding: 64px 0 32px;
    background: var(--black);
    border-top: 1px solid var(--gray-800);
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 64px;
}

.footer-logo {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    display: block;
    margin-bottom: 16px;
}

.footer-brand p {
    font-size: 0.875rem;
    color: var(--gray-500);
    line-height: 1.7;
}

.footer-email {
    display: inline-block;
    margin-top: 16px;
    font-size: 0.875rem;
    color: var(--accent);
    transition: color 0.3s;
}

.footer-email:hover {
    color: var(--accent-light);
}

.footer-links {
    display: flex;
    gap: 32px;
}

.footer-links a {
    font-size: 0.875rem;
    color: var(--gray-500);
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--white);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 32px;
    border-top: 1px solid var(--gray-800);
}

.footer-legal {
    display: flex;
    gap: 24px;
    font-size: 0.75rem;
    color: var(--gray-600);
}

.copyright {
    font-size: 0.75rem;
    color: var(--gray-600);
}

/* ================================
   Scroll Animations
   ================================ */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s var(--ease-out-expo),
                transform 0.8s var(--ease-out-expo);
}

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

/* ================================
   Responsive
   ================================ */
@media (max-width: 1024px) {
    .about-content {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .services-grid {
        gap: 16px;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }

    .nav-logo {
        font-size: 1.125rem;
    }

    /* Aurora mobile */
    .aurora {
        filter: blur(60px);
        opacity: 0.8;
    }

    .aurora-1 {
        width: 300px;
        height: 300px;
        top: 5%;
        left: -20%;
    }

    .aurora-2 {
        width: 250px;
        height: 250px;
        top: 40%;
        right: -20%;
    }

    .aurora-3 {
        width: 200px;
        height: 200px;
        bottom: 10%;
        left: 20%;
    }

    .grid-bg {
        background-size: 50px 50px;
    }

    .hero-bg-text {
        font-size: 30vw;
        right: -5%;
        bottom: 15%;
        -webkit-text-stroke: 1px rgba(52, 211, 153, 0.1);
    }

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

    .footer-top {
        flex-direction: column;
        gap: 32px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .footer-legal {
        flex-direction: column;
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .hero-scroll {
        display: none;
    }

    .service-item {
        padding: 24px;
    }

    .service-item-header {
        margin-bottom: 32px;
    }

    .service-arrow {
        width: 40px;
        height: 40px;
    }
}

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