/* ============================================
   VIRTUAL MERLIN - BRAND STYLESHEET
   Aligned to logo identity: authoritative, technical, precise
   ============================================ */

/* CSS Variables - Brand Colors from Logo */
:root {
    /* Primary Brand Colors */
    --brand-black: #000000;
    --brand-red: #C41E3A;
    --brand-red-dark: #8B1528;
    --brand-red-light: #E82C4C;
    --brand-silver: #E8E8E8;
    --brand-white: #FFFFFF;

    /* Grays */
    --brand-gray-dark: #1A1A1A;
    --brand-gray-medium: #4A4A4A;
    --brand-gray-light: #6A6A6A;

    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Space Grotesk', var(--font-primary);

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;

    /* Layout */
    --container-max: 1200px;
    --border-radius: 2px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
}

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

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    font-size: 16px;
    line-height: 1.6;
    color: var(--brand-silver);
    background-color: var(--brand-black);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   BINARY BACKGROUND
   ============================================ */

.binary-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.03;
    overflow: hidden;
    pointer-events: none;
    background-image:
        linear-gradient(90deg, var(--brand-gray-dark) 1px, transparent 1px),
        linear-gradient(180deg, var(--brand-gray-dark) 1px, transparent 1px);
    background-size: 50px 50px;
}

.binary-background::before {
    content: "1010101001110101010101001110101010101001110101010101001110101010101001110101010101001110101010101001110101010101001110101010101001110101010101001110101010101001110101010101001110101010101001110101010101001110101010101001110101010101001110101010101001110101010101001110101010101001110101010101001110101010101001110101";
    position: absolute;
    top: -10%;
    left: -10%;
    font-family: monospace;
    font-size: 14px;
    color: var(--brand-red);
    opacity: 0.4;
    line-height: 1.8;
    word-wrap: break-word;
    width: 120%;
    animation: binary-drift 120s linear infinite;
}

@keyframes binary-drift {
    0% {
        transform: translateY(0) translateX(0);
    }
    100% {
        transform: translateY(10%) translateX(5%);
    }
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
    color: var(--brand-white);
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    letter-spacing: -0.02em;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    letter-spacing: -0.01em;
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

a {
    color: var(--brand-silver);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--brand-white);
}

/* ============================================
   LAYOUT UTILITIES
   ============================================ */

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

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

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--brand-gray-dark);
    z-index: 1000;
    overflow: visible;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    height: 80px;
    position: relative;
    padding-left: 200px;
}

.logo-link {
    display: flex;
    align-items: flex-start;
    position: absolute;
    top: 10px;
    left: 2rem;
    z-index: 1001;
}

.logo {
    height: 180px;
    width: auto;
    transition: transform var(--transition-base);
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.8));
}

.logo:hover {
    transform: scale(1.02);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--spacing-xs);
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--brand-silver);
    transition: all var(--transition-base);
}

.nav-menu {
    display: flex;
    gap: var(--spacing-md);
    list-style: none;
    align-items: center;
    margin-left: auto;
    padding-right: var(--spacing-md);
}

.nav-menu a {
    font-weight: 500;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-bottom: 2px solid transparent;
    transition: all var(--transition-fast);
}

.nav-menu a:hover {
    border-bottom-color: var(--brand-red);
}

.nav-cta {
    background: var(--brand-red);
    color: var(--brand-white) !important;
    padding: var(--spacing-xs) var(--spacing-md) !important;
    border-radius: var(--border-radius);
    border: none !important;
}

.nav-cta:hover {
    background: var(--brand-red-light);
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 2px solid transparent;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all var(--transition-base);
    text-align: center;
}

.btn-primary {
    background: var(--brand-red);
    color: var(--brand-white);
    border-color: var(--brand-red);
}

.btn-primary:hover {
    background: var(--brand-red-light);
    border-color: var(--brand-red-light);
    color: var(--brand-white);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(196, 30, 58, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--brand-silver);
    border-color: var(--brand-silver);
}

.btn-secondary:hover {
    background: var(--brand-silver);
    color: var(--brand-black);
}

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

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    position: relative;
    background: linear-gradient(180deg, var(--brand-black) 0%, var(--brand-gray-dark) 100%);
    overflow: visible;
}

.hero::before {
    content: "";
    position: absolute;
    top: -10%;
    right: -5%;
    width: 60%;
    height: 120%;
    background-image: url('images/logo-vmerlin.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center right;
    opacity: 0.15;
    pointer-events: none;
    z-index: 0;
}

.hero::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 20%, rgba(196, 30, 58, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.hero-container {
    position: relative;
    z-index: 1;
}

.hero-content {
    max-width: 800px;
    margin-bottom: var(--spacing-lg);
}

.hero-title {
    margin-bottom: var(--spacing-md);
    background: linear-gradient(135deg, var(--brand-white) 0%, var(--brand-silver) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(1.125rem, 2vw, 1.375rem);
    color: var(--brand-silver);
    margin-bottom: var(--spacing-lg);
    line-height: 1.7;
    max-width: 700px;
}

.hero-cta {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--brand-gray-medium);
}

.stat {
    text-align: center;
    padding: var(--spacing-md);
}

.stat-number {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    font-weight: 700;
    color: var(--brand-red);
    line-height: 1;
    margin-bottom: var(--spacing-xs);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--brand-gray-light);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* ============================================
   SECTIONS
   ============================================ */

section {
    padding: var(--spacing-xl) 0;
    position: relative;
}

.section-title {
    margin-bottom: var(--spacing-md);
    text-align: center;
}

.section-subtitle {
    text-align: center;
    font-size: 1.125rem;
    color: var(--brand-gray-light);
    max-width: 700px;
    margin: 0 auto var(--spacing-lg);
}

/* ============================================
   SERVICES SECTION
   ============================================ */

.services {
    background: var(--brand-black);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.service-card {
    background: var(--brand-gray-dark);
    border: 1px solid var(--brand-gray-medium);
    padding: var(--spacing-md);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: "010101";
    position: absolute;
    top: 10px;
    right: 10px;
    font-family: monospace;
    font-size: 10px;
    color: var(--brand-red);
    opacity: 0.2;
    letter-spacing: 2px;
}

.service-card:hover {
    border-color: var(--brand-red);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(196, 30, 58, 0.2);
}

.service-icon {
    color: var(--brand-red);
    margin-bottom: var(--spacing-md);
}

.service-title {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-sm);
}

.service-description {
    color: var(--brand-gray-light);
    line-height: 1.7;
}

/* ============================================
   WEBSITES & APPS SECTION
   ============================================ */

.websites {
    background: var(--brand-gray-dark);
}

.websites-content {
    margin-top: var(--spacing-lg);
}

.websites-intro {
    text-align: center;
    max-width: 900px;
    margin: 0 auto var(--spacing-xl);
}

.websites-description {
    font-size: 1.125rem;
    color: var(--brand-silver);
    line-height: 1.7;
}

.websites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
}

.website-card {
    background: var(--brand-black);
    border: 1px solid var(--brand-gray-medium);
    padding: var(--spacing-lg);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.website-card::before {
    content: "110011";
    position: absolute;
    top: 10px;
    right: 10px;
    font-family: monospace;
    font-size: 10px;
    color: var(--brand-red);
    opacity: 0.2;
    letter-spacing: 2px;
}

.website-card:hover {
    border-color: var(--brand-red);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(196, 30, 58, 0.2);
}

.website-icon {
    color: var(--brand-red);
    margin-bottom: var(--spacing-md);
}

.website-title {
    font-size: 1.375rem;
    margin-bottom: var(--spacing-md);
    color: var(--brand-white);
}

.website-description {
    color: var(--brand-silver);
    line-height: 1.7;
    margin-bottom: var(--spacing-md);
}

.website-features {
    list-style: none;
    padding: 0;
    margin: 0;
}

.website-features li {
    color: var(--brand-gray-light);
    font-size: 0.875rem;
    padding: var(--spacing-xs) 0;
    padding-left: 1.5rem;
    position: relative;
}

.website-features li::before {
    content: "▸";
    position: absolute;
    left: 0;
    color: var(--brand-red);
    font-weight: bold;
}

.websites-approach {
    background: var(--brand-black);
    border: 1px solid var(--brand-gray-medium);
    padding: var(--spacing-lg);
    margin-top: var(--spacing-xl);
}

.approach-title {
    font-size: 1.75rem;
    margin-bottom: var(--spacing-lg);
    text-align: center;
    color: var(--brand-white);
}

.approach-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
}

.approach-item {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.approach-item strong {
    font-family: var(--font-display);
    font-size: 1.125rem;
    color: var(--brand-red);
    display: block;
    margin-bottom: var(--spacing-xs);
}

.approach-item p {
    color: var(--brand-gray-light);
    line-height: 1.6;
    font-size: 0.9375rem;
}

/* ============================================
   PROCESS SECTION
   ============================================ */

.process {
    background: var(--brand-gray-dark);
}

.process-timeline {
    margin-top: var(--spacing-lg);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.process-step {
    display: flex;
    gap: var(--spacing-md);
    align-items: flex-start;
    padding: var(--spacing-md);
    background: var(--brand-black);
    border: 1px solid var(--brand-gray-medium);
    transition: all var(--transition-base);
    position: relative;
}

.process-step::after {
    content: "";
    position: absolute;
    left: 50px;
    bottom: -2rem;
    width: 2px;
    height: 2rem;
    background: var(--brand-gray-medium);
}

.process-step:last-child::after {
    display: none;
}

.process-step:hover {
    border-color: var(--brand-red);
    background: var(--brand-gray-dark);
}

.step-number {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--brand-red);
    line-height: 1;
    min-width: 80px;
    text-align: center;
    padding-top: var(--spacing-xs);
}

.step-content {
    flex: 1;
}

.step-title {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
}

.step-description {
    color: var(--brand-gray-light);
    line-height: 1.7;
}

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

.about {
    background: var(--brand-black);
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--spacing-xl);
    align-items: center;
}

.about-text {
    max-width: 700px;
}

.about-text .section-title {
    text-align: left;
}

.about-description {
    font-size: 1.125rem;
    color: var(--brand-silver);
    margin-bottom: var(--spacing-md);
    line-height: 1.7;
}

.about-values {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--brand-gray-medium);
}

.value-item {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.value-item strong {
    font-family: var(--font-display);
    font-size: 1.25rem;
    color: var(--brand-red);
}

.value-item span {
    color: var(--brand-gray-light);
}

.about-logo {
    display: flex;
    justify-content: center;
    align-items: center;
}

.about-logo-image {
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 0 40px rgba(196, 30, 58, 0.3));
}

/* ============================================
   CONTACT SECTION
   ============================================ */

.contact {
    background: var(--brand-gray-dark);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
    align-items: start;
}

.contact-info .section-title {
    text-align: left;
}

.contact-description {
    font-size: 1.125rem;
    color: var(--brand-silver);
    margin-bottom: var(--spacing-lg);
    line-height: 1.7;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.contact-method {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    color: var(--brand-silver);
}

.contact-method svg {
    color: var(--brand-red);
    flex-shrink: 0;
}

.contact-method a {
    font-size: 1.125rem;
}

.contact-form {
    background: var(--brand-black);
    border: 1px solid var(--brand-gray-medium);
    padding: var(--spacing-lg);
}

.form-group {
    margin-bottom: var(--spacing-md);
}

.form-group label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-weight: 600;
    color: var(--brand-silver);
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.05em;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: var(--spacing-sm);
    background: var(--brand-gray-dark);
    border: 1px solid var(--brand-gray-medium);
    color: var(--brand-white);
    font-family: var(--font-primary);
    font-size: 1rem;
    border-radius: var(--border-radius);
    transition: all var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--brand-red);
    box-shadow: 0 0 0 3px rgba(196, 30, 58, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

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

.footer {
    background: var(--brand-black);
    border-top: 1px solid var(--brand-gray-medium);
    padding: var(--spacing-lg) 0 var(--spacing-md);
}

.footer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-md);
    text-align: center;
}

.footer-logo-image {
    height: 80px;
    width: auto;
    opacity: 0.8;
}

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

.footer-text {
    color: var(--brand-gray-light);
    font-size: 0.875rem;
}

.footer-tagline {
    color: var(--brand-silver);
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-size: 0.75rem;
}

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

@media (max-width: 768px) {
    .logo {
        height: 100px;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: rgba(0, 0, 0, 0.98);
        flex-direction: column;
        padding: var(--spacing-lg);
        transition: left var(--transition-base);
        border-top: 1px solid var(--brand-gray-medium);
    }

    .nav-menu.active {
        left: 0;
    }

    .hero {
        padding-top: 100px;
    }

    .hero::before {
        width: 100%;
        opacity: 0.08;
    }

    .hero-cta {
        flex-direction: column;
    }

    .hero-cta .btn {
        width: 100%;
    }

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

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

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

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

    .about-logo {
        order: -1;
    }

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

    .process-step {
        flex-direction: column;
        text-align: center;
    }

    .process-step::after {
        left: 50%;
        transform: translateX(-50%);
    }
}

@media (max-width: 480px) {
    :root {
        --spacing-lg: 3rem;
        --spacing-xl: 4rem;
    }

    .hero-stats {
        grid-template-columns: 1fr;
    }
}
