/* ============================================
   MOTAVI HOLDINGS - "Quiet Power" Aesthetic
   Dark, refined, editorial with warm accents
   ============================================ */

:root {
    /* Colors - Deep & Warm */
    --color-bg: #0a0a0a;
    --color-bg-elevated: #111111;
    --color-bg-subtle: #161616;
    --color-accent: #c9a962;
    --color-accent-dim: rgba(201, 169, 98, 0.15);
    --color-text: #e8e8e8;
    --color-text-muted: #888888;
    --color-text-subtle: #555555;
    --color-border: rgba(255, 255, 255, 0.08);

    /* Typography */
    --font-display: 'Cormorant', Georgia, serif;
    --font-body: 'Inter', -apple-system, sans-serif;

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 4rem;
    --space-xl: 8rem;
    --space-2xl: 12rem;

    /* Transitions */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

/* ============================================
   RESET & BASE
   ============================================ */

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

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

body {
    font-family: var(--font-body);
    font-weight: 300;
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Grain Overlay */
.grain {
    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.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

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

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

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

/* ============================================
   NAVIGATION
   ============================================ */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: var(--space-md) var(--space-lg);
    background: linear-gradient(to bottom, var(--color-bg) 0%, transparent 100%);
}

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

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

.logo-text {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    color: var(--color-text);
}

.nav-links {
    display: flex;
    gap: var(--space-lg);
}

.nav-link {
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    transition: color 0.4s var(--ease-out);
    position: relative;
}

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

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

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

/* ============================================
   HERO
   ============================================ */

.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: var(--space-2xl) var(--space-lg);
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: radial-gradient(ellipse at 70% 30%, var(--color-accent-dim) 0%, transparent 60%);
    pointer-events: none;
}

.hero-content {
    max-width: 1000px;
    position: relative;
    z-index: 1;
}

.hero-label {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
    opacity: 0;
    animation: fadeSlideUp 1s var(--ease-out) 0.2s forwards;
}

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

.label-text {
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--color-accent);
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 10vw, 7rem);
    font-weight: 300;
    line-height: 1.05;
    letter-spacing: -0.02em;
    margin-bottom: var(--space-lg);
}

.title-line {
    display: block;
    opacity: 0;
    animation: fadeSlideUp 1s var(--ease-out) forwards;
}

.title-line:nth-child(1) { animation-delay: 0.3s; }
.title-line:nth-child(2) { animation-delay: 0.4s; }
.title-line:nth-child(3) { animation-delay: 0.5s; }

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

.hero-subtitle {
    max-width: 500px;
    font-size: 1.1rem;
    color: var(--color-text-muted);
    opacity: 0;
    animation: fadeSlideUp 1s var(--ease-out) 0.7s forwards;
}

.hero-scroll {
    position: absolute;
    bottom: var(--space-lg);
    left: var(--space-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    opacity: 0;
    animation: fadeIn 1s var(--ease-out) 1.2s forwards;
}

.scroll-text {
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-text-subtle);
    writing-mode: vertical-rl;
}

.scroll-line {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, var(--color-text-subtle), transparent);
    animation: scrollPulse 2s var(--ease-in-out) infinite;
}

@keyframes scrollPulse {
    0%, 100% { transform: scaleY(1); opacity: 1; }
    50% { transform: scaleY(0.5); opacity: 0.5; }
}

/* ============================================
   SECTION COMMON
   ============================================ */

.section-grid {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: var(--space-xl);
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.section-number {
    font-family: var(--font-display);
    font-size: 0.9rem;
    color: var(--color-accent);
    display: block;
    margin-bottom: var(--space-xs);
}

.section-name {
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-text-subtle);
}

/* ============================================
   ABOUT
   ============================================ */

.about {
    padding: var(--space-2xl) 0;
    border-top: 1px solid var(--color-border);
}

.about-title {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 300;
    line-height: 1.3;
    margin-bottom: var(--space-lg);
    max-width: 800px;
}

.about-text {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
    max-width: 900px;
}

.about-text p {
    font-size: 1rem;
    color: var(--color-text-muted);
}

/* ============================================
   SECTORS
   ============================================ */

.sectors {
    padding: var(--space-2xl) 0;
    background: var(--color-bg-elevated);
    border-top: 1px solid var(--color-border);
}

.sectors-content {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
}

.sector-card {
    padding: var(--space-lg);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    transition: all 0.5s var(--ease-out);
    position: relative;
    overflow: hidden;
}

.sector-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--color-accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s var(--ease-out);
}

.sector-card:hover {
    border-color: var(--color-accent-dim);
    transform: translateY(-4px);
}

.sector-card:hover::before {
    transform: scaleX(1);
}

.sector-icon {
    width: 32px;
    height: 32px;
    color: var(--color-accent);
    margin-bottom: var(--space-md);
}

.sector-icon svg {
    width: 100%;
    height: 100%;
}

.sector-title {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 400;
    margin-bottom: var(--space-sm);
}

.sector-desc {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    line-height: 1.6;
}

/* ============================================
   STATS
   ============================================ */

.stats {
    padding: var(--space-xl) 0;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    background: var(--color-bg);
}

.stats-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-xl);
}

.stat {
    text-align: center;
}

.stat-number {
    font-family: var(--font-display);
    font-size: 4rem;
    font-weight: 300;
    color: var(--color-accent);
    display: block;
    line-height: 1;
}

.stat-text {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 300;
    font-style: italic;
    color: var(--color-text);
    display: block;
}

.stat-label {
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-text-subtle);
    margin-top: var(--space-sm);
    display: block;
}

.stat-divider {
    width: 1px;
    height: 60px;
    background: var(--color-border);
}

/* ============================================
   CLIENTS
   ============================================ */

.clients {
    padding: var(--space-2xl) 0;
    background: var(--color-bg);
}

.clients-intro {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-style: italic;
    color: var(--color-text-muted);
    margin-bottom: var(--space-xl);
}

.clients-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: var(--space-sm);
}

.client-logo {
    aspect-ratio: 16/9;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-md);
    background: var(--color-bg-subtle);
    border: 1px solid var(--color-border);
    transition: all 0.4s var(--ease-out);
    position: relative;
    overflow: hidden;
}

.client-logo::after {
    content: attr(data-name);
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--space-xs);
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-align: center;
    color: var(--color-text-muted);
    background: var(--color-bg);
    transform: translateY(100%);
    transition: transform 0.4s var(--ease-out);
}

.client-logo:hover {
    border-color: var(--color-accent-dim);
    background: var(--color-bg-elevated);
}

.client-logo:hover::after {
    transform: translateY(0);
}

.client-logo img {
    max-width: 80%;
    max-height: 50px;
    object-fit: contain;
    filter: grayscale(100%) brightness(1.2) invert(1);
    opacity: 0.7;
    transition: all 0.4s var(--ease-out);
}

.client-logo:hover img {
    filter: grayscale(0%) brightness(1) invert(0);
    opacity: 1;
}

/* SVG logo styling (from Simple Icons CDN) */
.client-logo .logo-svg {
    max-width: 80%;
    max-height: 50px;
    fill: currentColor;
    color: var(--color-text-muted);
    filter: grayscale(100%) brightness(1.2) invert(1);
    opacity: 0.7;
    transition: all 0.4s var(--ease-out);
}

.client-logo:hover .logo-svg {
    filter: grayscale(0%) brightness(1) invert(0);
    opacity: 1;
}

/* Fallback initials for missing logos */
.client-logo.fallback {
    background: var(--color-bg-elevated);
}

.logo-initials {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    color: var(--color-text-subtle);
    transition: color 0.4s var(--ease-out);
}

.client-logo.fallback:hover .logo-initials {
    color: var(--color-accent);
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
    padding: var(--space-xl) var(--space-lg);
    background: var(--color-bg-elevated);
    border-top: 1px solid var(--color-border);
}

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

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.footer-logo {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 400;
    letter-spacing: 0.05em;
}

.footer-tagline {
    font-size: 0.85rem;
    font-style: italic;
    color: var(--color-text-subtle);
}

.footer-meta {
    display: flex;
    gap: var(--space-lg);
    font-size: 0.75rem;
    color: var(--color-text-subtle);
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Reveal on scroll */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s var(--ease-out);
}

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

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1200px) {
    .section-grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }

    .sectors-content {
        grid-template-columns: 1fr;
    }

    .clients-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    :root {
        --space-lg: 2rem;
        --space-xl: 4rem;
        --space-2xl: 6rem;
    }

    .nav {
        padding: var(--space-sm) var(--space-md);
    }

    .nav-links {
        gap: var(--space-md);
    }

    .hero {
        padding: var(--space-xl) var(--space-md);
    }

    .hero-scroll {
        display: none;
    }

    .about-text {
        grid-template-columns: 1fr;
    }

    .stats-inner {
        flex-direction: column;
        gap: var(--space-lg);
    }

    .stat-divider {
        width: 60px;
        height: 1px;
    }

    .clients-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-lg);
    }
}

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

    .clients-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
