/* ==========================================================================
   Video Walrus — Stylesheet
   Aesthetic: Dark broadcast control room. Technical. Precise.
   ========================================================================== */

:root {
    --bg-primary: #0a0a0c;
    --bg-secondary: #111114;
    --bg-card: #16161a;
    --bg-card-hover: #1c1c21;
    --text-primary: #e8e6e3;
    --text-secondary: #8a8a8e;
    --text-muted: #55555a;
    --accent: #c8f03e;
    --accent-dim: #a5c832;
    --border: #222228;
    --border-light: #2a2a30;

    --font-body: 'DM Sans', -apple-system, sans-serif;
    --font-mono: 'Space Mono', 'SF Mono', monospace;

    --container: 1200px;
    --gap: clamp(1rem, 3vw, 2rem);
}

/* Reset & Base
   ========================================================================== */

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
}

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

img {
    max-width: 100%;
    display: block;
}

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

/* Header
   ========================================================================== */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(10, 10, 12, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo {
    font-family: var(--font-mono);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

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

.logo-mark {
    color: var(--accent);
    font-size: 1.1em;
}

.logo-img {
    height: 40px;
    width: auto;
    max-height: 40px;
}

.footer-logo-img {
    height: 48px;
    max-height: 48px;
    margin-bottom: 0.3rem;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.main-nav a {
    font-size: 0.875rem;
    color: var(--text-secondary);
    transition: color 0.2s;
    letter-spacing: 0.01em;
}

.main-nav a:hover {
    color: var(--text-primary);
}

.nav-cta {
    padding: 0.5rem 1.25rem;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    color: var(--text-primary) !important;
    transition: border-color 0.2s, background 0.2s !important;
}

.nav-cta:hover {
    border-color: var(--accent);
    background: rgba(200, 240, 62, 0.05);
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.mobile-menu-btn span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    transition: transform 0.3s, opacity 0.3s;
}

/* Hero
   ========================================================================== */

.hero {
    padding: 10rem 0 5rem;
    min-height: 90vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    background: url('../img/bg-blur.png') no-repeat right center / cover;
    opacity: 0.4;
    pointer-events: none;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    background:
        radial-gradient(ellipse 60% 50% at 20% 50%, rgba(200, 240, 62, 0.03) 0%, transparent 70%),
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(200, 240, 62, 0.008) 2px,
            rgba(200, 240, 62, 0.008) 4px
        );
    pointer-events: none;
}

.hero-content {
    max-width: 800px;
    position: relative;
    z-index: 2;
}

.hero-tag {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--accent);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    opacity: 0;
    animation: fadeUp 0.6s ease forwards;
}

.hero h1 {
    font-size: clamp(2.2rem, 5.5vw, 4rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    opacity: 0;
    animation: fadeUp 0.6s ease 0.1s forwards;
}

.hero-sub {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--text-secondary);
    max-width: 550px;
    line-height: 1.7;
    margin-bottom: 2.5rem;
    opacity: 0;
    animation: fadeUp 0.6s ease 0.2s forwards;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    opacity: 0;
    animation: fadeUp 0.6s ease 0.3s forwards;
}

.hero-details {
    display: flex;
    gap: 3rem;
    margin-top: 5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    opacity: 0;
    animation: fadeUp 0.6s ease 0.4s forwards;
    position: relative;
    z-index: 2;
}

.detail-label {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.3rem;
}

.detail-value {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

/* Buttons
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    padding: 0.8rem 1.75rem;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 6px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.25s ease;
}

.btn-primary {
    background: var(--accent);
    color: var(--bg-primary);
    border-color: var(--accent);
}

.btn-primary:hover {
    background: var(--accent-dim);
    border-color: var(--accent-dim);
    transform: translateY(-1px);
}

.btn-download {
    background: rgba(100, 180, 255, 0.15);
    color: #7ec8f0;
    border-color: rgba(100, 180, 255, 0.3);
}

.btn-download:hover {
    background: rgba(100, 180, 255, 0.25);
    border-color: rgba(100, 180, 255, 0.5);
    transform: translateY(-1px);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border-color: var(--border-light);
}

.btn-ghost:hover {
    color: var(--text-primary);
    border-color: var(--text-muted);
}

.btn-full {
    width: 100%;
    justify-content: center;
}

/* Services
   ========================================================================== */

.services {
    padding: 5rem 0;
    border-top: 1px solid var(--border);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.service-card {
    padding: 2.5rem 2rem;
    background: var(--bg-secondary);
    transition: background 0.3s;
}

.service-card:hover {
    background: var(--bg-card-hover);
}

.service-num {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent);
    display: block;
    margin-bottom: 1rem;
}

.service-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    letter-spacing: -0.01em;
}

.service-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.65;
}

/* Projects
   ========================================================================== */

.projects {
    padding: 6rem 0;
    border-top: 1px solid var(--border);
}

.section-header {
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 0.5rem;
}

.section-sub {
    color: var(--text-secondary);
    font-size: 1.05rem;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.25rem;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 2rem;
    transition: border-color 0.3s, transform 0.3s;
}

.project-card:hover {
    border-color: var(--border-light);
    transform: translateY(-2px);
}

.project-type {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    display: block;
    margin-bottom: 0.75rem;
}

.project-card h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    letter-spacing: -0.01em;
}

.project-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.65;
    margin-bottom: 0.75rem;
}

.project-link {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--accent);
    transition: opacity 0.2s;
}

.project-link:hover {
    opacity: 0.7;
}

/* Project Detail
   ========================================================================== */

.project-detail-hero {
    padding: 8rem 0 3rem;
    border-bottom: 1px solid var(--border);
}

.back-link {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    display: inline-block;
    margin-bottom: 2rem;
    transition: color 0.2s;
}

.back-link:hover {
    color: var(--accent);
}

.project-detail-hero .project-type {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    display: block;
    margin-bottom: 0.75rem;
}

.project-detail-hero h1 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin-bottom: 1rem;
}

.project-detail-hero .lead {
    font-size: clamp(1rem, 2vw, 1.15rem);
    color: var(--text-secondary);
    max-width: 640px;
    line-height: 1.7;
}

.project-detail-body {
    padding: 4rem 0;
}

.project-detail-body .content {
    max-width: 720px;
}

.project-detail-body h2 {
    font-size: 1.3rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-bottom: 1rem;
    margin-top: 2.5rem;
}

.project-detail-body h2:first-child {
    margin-top: 0;
}

.project-detail-body p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.75;
    margin-bottom: 1rem;
}

.project-detail-body ul {
    list-style: none;
    margin-bottom: 1.5rem;
}

.project-detail-body ul li {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.75;
    padding-left: 1.25rem;
    position: relative;
}

.project-detail-body ul li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--accent);
}

.project-detail-body .price {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    color: var(--text-primary);
    margin: 1.5rem 0;
}

.project-detail-body .btn-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.screenshot-gallery {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin: 2rem 0;
    max-width: none;
}

.screenshot-gallery .screenshot {
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.screenshot-gallery .screenshot img {
    width: 100%;
    display: block;
}

.screenshot-gallery .screenshot figcaption {
    font-size: 0.8rem;
    color: var(--text-muted);
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
}

/* Contact
   ========================================================================== */

.contact {
    padding: 6rem 0;
    border-top: 1px solid var(--border);
}

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

.contact-info h2 {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 1rem;
}

.contact-info > p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 2.5rem;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.contact-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: block;
    margin-bottom: 0.2rem;
}

.contact-item a {
    font-size: 1rem;
    color: var(--text-secondary);
    transition: color 0.2s;
}

.contact-item a:hover {
    color: var(--accent);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
}

.required {
    color: var(--accent);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: border-color 0.2s;
    outline: none;
}

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

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

/* Footer
   ========================================================================== */

.site-footer {
    padding: 2.5rem 0;
    border-top: 1px solid var(--border);
}

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

.footer-left .logo {
    display: block;
    margin-bottom: 0.3rem;
}

.footer-left p,
.footer-right p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Animations
   ========================================================================== */

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

/* Responsive
   ========================================================================== */

@media (max-width: 768px) {
    .main-nav {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--bg-primary);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        padding: 1.5rem var(--gap);
        gap: 1rem;
    }

    .main-nav.active {
        display: flex;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .nav-cta {
        text-align: center;
    }

    .hero {
        padding: 8rem 0 3rem;
        min-height: auto;
    }

    .hero-details {
        flex-direction: column;
        gap: 1.25rem;
        margin-top: 3rem;
    }

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

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

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.8rem;
    }

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

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