/* 
    CrownX Digital - Master Design System V4.0
    Elite Production | Responsive & Premium
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Outfit:wght@700;800;900&display=swap');

:root {
    /* Color Palette */
    --bg-black: #050505;
    --bg-surface: #0a0a0a;
    --bg-card: #121212;
    
    --gold-primary: #C5A059;
    --gold-secondary: #8E6F3E;
    --gold-light: #F4D085;
    --gold-gradient: linear-gradient(135deg, #8E6F3E 0%, #C5A059 50%, #F4D085 100%);
    --gold-glow: rgba(197, 160, 89, 0.15);
    
    --text-white: #FFFFFF;
    --text-dim: #A0A0A0;
    --text-mid: #808080;
    --text-dark: #606060;
    
    /* Layout */
    --container: 1200px;
    --section-padding: clamp(5rem, 10vw, 10rem);
    --header-height: 80px;
    
    /* Effects */
    --transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    --glass: rgba(255, 255, 255, 0.03);
    --border: rgba(255, 255, 255, 0.08);
    --radius-lg: 24px;
    --radius-md: 12px;
}

/* 1. Global Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    list-style: none !important;
    outline: none;
}

html {
    scroll-behavior: smooth;
    background: var(--bg-black);
    font-size: 16px;
    overflow-x: hidden;
}

@media (max-width: 768px) {
    html { font-size: 14px; }
}

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

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

/* 2. Typography */
h1, h2, h3, h4, .logo {
    font-family: 'Outfit', sans-serif !important;
    font-weight: 800 !important;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.gradient-text {
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.section-title {
    font-size: clamp(2.2rem, 5vw, 4rem);
    margin-bottom: 2rem;
}

.section-title.light {
    color: var(--bg-black);
}

.section-subtitle {
    color: var(--gold-primary);
    letter-spacing: 0.2em; /* Reduced from 0.4em */
    text-transform: uppercase;
    font-size: 0.8rem;
    margin-bottom: 1.5rem;
    display: block;
}

@media (min-width: 768px) {
    .section-subtitle {
        letter-spacing: 0.4em;
        font-size: 0.85rem;
    }
}

.section-description {
    color: var(--text-dim);
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    line-height: 1.8;
    max-width: 700px;
    margin-bottom: 3rem;
}

.section-header {
    text-align: center;
    margin-bottom: clamp(4rem, 8vw, 6rem);
}

.section-header .section-description {
    margin-left: auto;
    margin-right: auto;
}

/* 3. Specialized Layout */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 2rem;
}

@media (max-width: 768px) {
    .container { padding: 0 1.5rem; }
}

section {
    padding: var(--section-padding) 0;
}

.bg-surface {
    background: var(--bg-surface);
}

/* 4. Preloader & BG */
#preloader {
    position: fixed;
    inset: 0;
    background: var(--bg-black);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.loader-logo {
    width: clamp(150px, 30vw, 250px);
    height: auto;
    animation: logoPulse 2s infinite ease-in-out;
}

@keyframes logoPulse {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.05); opacity: 1; filter: drop-shadow(0 0 20px rgba(197, 160, 89, 0.3)); }
}

.bg-animated {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.bg-blob {
    position: absolute;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, var(--gold-glow) 0%, transparent 70%);
    filter: blur(80px);
    animation: float 30s infinite alternate ease-in-out;
}

.blob-1 { top: -20%; left: -10%; }
.blob-2 { bottom: -20%; right: -10%; animation-delay: -15s; }

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 50px) scale(1.1); }
}

/* 5. Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 2rem 0;
    transition: var(--transition);
}

header.scrolled {
    padding: 1rem 0;
    background: rgba(5, 5, 5, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    z-index: 1001;
    display: flex;
    align-items: center;
}

.logo img {
    height: 50px; /* Increased from 40px */
    width: auto;
    object-fit: contain;
    transition: var(--transition);
}

@media (max-width: 768px) {
    .logo img { height: 40px; } /* Increased from 32px */
}

.nav-links {
    display: flex;
    gap: 3rem;
    align-items: center;
}

.nav-links a {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    opacity: 0.6;
    transition: var(--transition);
}

.nav-links a:hover, .nav-links a.active {
    opacity: 1;
    color: var(--gold-primary);
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    color: var(--gold-primary);
    cursor: pointer;
    z-index: 1001;
}

@media (max-width: 992px) {
    header { padding: 1.2rem 0; }
    .menu-toggle { 
        display: block; 
        position: relative;
        z-index: 2001;
    }

    .logo {
        z-index: 2001;
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: #050505; /* Deep solid black */
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transform: translateX(100%);
        transition: 0.6s cubic-bezier(0.16, 1, 0.3, 1);
        z-index: 2000;
        gap: 3rem;
        padding: 4rem 2rem;
    }
    
    .nav-links.active { transform: translateX(0); }
    
    .nav-links a { 
        font-size: 1.8rem; 
        font-weight: 800;
        color: var(--text-white);
        opacity: 1; 
        text-transform: uppercase;
        letter-spacing: 4px;
        transition: var(--transition);
    }
    
    .nav-links a:hover {
        color: var(--gold-primary);
    }

    .nav-links li {
        width: 100%;
        text-align: center;
    }
    
    .nav-links .btn { 
        font-size: 1rem; 
        width: 100%; 
        max-width: 280px;
        padding: 1.2rem 2rem;
        margin-top: 1rem;
    }
}

/* 6. Hero */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: var(--header-height);
    position: relative;
}

.hero h1 {
    font-size: clamp(2.5rem, 8vw, 6rem);
    margin-bottom: 2rem;
    max-width: 900px;
}

.hero p {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    color: var(--text-dim);
    max-width: 650px;
    margin-bottom: 3.5rem;
}

.hero-btns {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

@media (max-width: 480px) {
    .hero-btns { flex-direction: column; width: 100%; }
    .hero-btns .btn { width: 100%; text-align: center; }
}

/* 7. Buttons */
.btn {
    padding: 1.2rem 3.5rem;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    border-radius: 4px;
    transition: var(--transition);
    display: inline-block;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--gold-gradient);
    color: var(--bg-black);
}

.btn-primary:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(197, 160, 89, 0.2);
}

.btn-outline {
    background: transparent;
    border: 1.5px solid var(--gold-primary);
    color: var(--gold-primary);
}

.btn-outline:hover {
    background: rgba(197, 160, 89, 0.1);
    transform: translateY(-5px);
}

/* 8. About Section */
.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: clamp(4rem, 10vw, 8rem);
    align-items: center;
}

.features-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.feature-title {
    color: var(--gold-primary);
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

.about-visual {
    padding: 2rem;
    border: 1px solid var(--border);
    background: var(--glass);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(10px);
}

.visual-inner {
    background: var(--bg-surface);
    padding: 6rem 3rem;
    text-align: center;
    border-radius: var(--radius-md);
}

.visual-inner i {
    font-size: 4rem;
    color: var(--gold-primary);
    margin-bottom: 2rem;
}

@media (max-width: 580px) {
    .features-grid { grid-template-columns: 1fr; }
}

/* 9. Services */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
}

.service-card {
    background: var(--glass);
    border: 1px solid var(--border);
    padding: 4rem 3rem;
    border-radius: var(--radius-lg);
    transition: var(--transition);
}

.service-card:hover {
    border-color: var(--gold-primary);
    background: rgba(197, 160, 89, 0.05);
    transform: translateY(-10px);
}

.service-card i {
    font-size: 2.5rem;
    color: var(--gold-primary);
    margin-bottom: 2rem;
    display: block;
}

.service-card h3 {
    font-size: 1.6rem;
    margin-bottom: 1.5rem;
}

.service-card p {
    color: var(--text-dim);
}

/* 10. Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 4rem;
    text-align: center;
}

.stat-item h2 {
    font-size: clamp(3rem, 8vw, 5rem);
    color: var(--gold-primary);
    margin-bottom: 0.5rem;
}

.stat-item p {
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-mid);
}

/* 11. Contact */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.contact-info {
    background: var(--gold-gradient);
    padding: clamp(3rem, 6vw, 6rem);
    color: var(--bg-black);
}

.contact-info .section-description {
    color: rgba(0, 0, 0, 0.8); /* Deep black for better contrast on gold */
}

.contact-info .contact-item i,
.contact-info .contact-item span {
    color: var(--bg-black);
}

.contact-details {
    display: grid;
    gap: 2rem;
    margin-top: 4rem;
}

.contact-item {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.contact-item i { font-size: 1.5rem; }
.contact-item span { font-weight: 700; }

.contact-form-container {
    padding: clamp(3rem, 6vw, 6rem);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
}

.form-group {
    margin-bottom: 3rem;
}

.form-group label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-bottom: 1rem;
    color: var(--text-dark);
    font-weight: 700;
}

.form-group input, .form-group textarea {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    color: white;
    font-size: 1.1rem;
    transition: var(--transition);
}

.form-group input:focus, .form-group textarea:focus {
    border-bottom-color: var(--gold-primary);
}

@media (max-width: 992px) {
    .contact-wrapper { grid-template-columns: 1fr; }
}

/* 12. Reveal & Utilities */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: 1s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.status-message {
    max-width: var(--container);
    margin: 0 auto 5rem;
    padding: 2rem;
    text-align: center;
    border: 1px solid var(--gold-primary);
    background: rgba(197, 160, 89, 0.05);
    color: var(--gold-primary);
    font-weight: 700;
    letter-spacing: 2px;
    font-size: 0.9rem;
    text-transform: uppercase;
}

#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--gold-primary);
    color: var(--bg-black);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 100;
}

#back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

/* 13. Footer */
footer {
    background: var(--bg-surface);
    padding: clamp(4rem, 8vw, 6rem) 0 2rem;
    border-top: 1px solid var(--border);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-desc {
    color: var(--text-dim);
    font-size: 0.95rem;
    line-height: 1.8;
    margin-top: 1.5rem;
}

.footer-desc.sm {
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
}

.footer-title {
    color: var(--gold-primary);
    font-size: 1.1rem;
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.footer-links {
    display: grid;
    gap: 1rem;
}

.footer-links a {
    color: var(--text-mid);
    transition: var(--transition);
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--gold-primary);
    transform: translateX(5px);
}

.footer-form {
    display: flex;
    gap: 0.5rem;
}

.footer-form input {
    flex: 1;
    background: var(--bg-black);
    border: 1px solid var(--border);
    padding: 0.8rem 1rem;
    color: white;
    border-radius: 4px;
}

.footer-form .btn {
    padding: 0.8rem 1.5rem;
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--text-dark);
    font-size: 0.8rem;
}

@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
    }
}

@media (max-width: 580px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
