/* ===== Agency – Minimal black/white + native smooth scroll ===== */
/* Z-index scale: hero 0–1, content default, nav-overlay 100, header 200, nav-toggle 210, cursor 9999 */
:root {
    --bg: #0a0a0a;
    --bg-alt: #111;
    --text: #f5f5f5;
    --text-muted: #888;
    --accent: #fff;
    --border: #222;
    --font: 'DM Sans', system-ui, sans-serif;
    --container: min(1200px, 92vw);
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
    --z-hero-bg: 0;
    --z-hero-inner: 1;
    --z-overlay: 100;
    --z-header: 500;
    --z-nav-toggle: 210;
    --z-cursor: 9999;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
    font-family: var(--font);
    background: #0a0a0a;
    background: var(--bg);
    color: #f5f5f5;
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}
body.has-locomotive { overflow: hidden; }
.main-content { color: #f5f5f5; color: var(--text); min-height: 100vh; }
.site-header { color: #f5f5f5; color: var(--text); }
.site-footer { color: #f5f5f5; color: var(--text); }

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: color 0.2s, opacity 0.2s; }
ul, ol { list-style: none; }

.container { width: 100%; max-width: none; margin: 0 auto; padding: 0 5vw; }

/* ----- Header ----- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--z-header);
    padding: 1.5rem 0;
    transition: background-color 0.4s var(--ease-out), padding 0.4s var(--ease-out);
    background-color: transparent;
}
.site-header.scrolled {
    background-color: #0a0a0a;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; position: relative; z-index: var(--z-header); }
.logo {
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: 0.2em;
}
.logo-img { display: block; max-height: 36px; width: auto; }
.nav-main ul { display: flex; gap: 2.5rem; }
.nav-main a {
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    opacity: 0.85;
}
.nav-main a:hover { opacity: 1; color: var(--accent); }

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 12px;
    position: relative;
    z-index: var(--z-nav-toggle);
}
.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text);
    transition: transform 0.3s var(--ease-out), opacity 0.3s;
    display: block;
}
body.nav-open,
html:has(body.nav-open) { overflow: hidden; height: 100%; }
body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; transform: scaleX(0); }
body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Mobile nav overlay (below header so header + hamburger stay clickable) */
.nav-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg);
    z-index: var(--z-overlay);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s var(--ease-out), visibility 0.4s;
}
.nav-overlay.is-open { opacity: 1; visibility: visible; }
.nav-mobile ul { text-align: center; }
.nav-mobile li { margin: 1rem 0; }
.nav-mobile a {
    font-size: 1.5rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.nav-mobile a:hover { color: var(--accent); }

@media (max-width: 900px) {
    .nav-main { display: none; }
    .nav-toggle { display: flex; }
}

/* ----- Cursor (desktop) ----- */
.cursor-dot, .cursor-outline {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: var(--z-cursor);
    mix-blend-mode: difference;
}
.cursor-dot {
    width: 8px;
    height: 8px;
    background: var(--text);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}
.cursor-outline {
    width: 40px;
    height: 40px;
    border: 1px solid var(--text);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.2s, height 0.2s, border-color 0.2s;
}
@media (hover: none) {
    .cursor-dot, .cursor-outline { display: none !important; }
}

/* ----- Typography ----- */
h1, h2, h3 {
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: #f5f5f5;
    color: var(--text);
}
p, .package-card, .project-card-overlay { color: #e5e5e5; color: var(--text); }
.section-label {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

/* ----- Buttons ----- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    font-family: var(--font);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text);
    cursor: pointer;
    transition: background 0.3s var(--ease-out), color 0.3s, border-color 0.3s;
}
.btn:hover {
    background: var(--text);
    color: var(--bg);
    border-color: var(--text);
}
.btn-primary {
    background: var(--text);
    color: var(--bg);
    border-color: var(--text);
}
.btn-primary:hover {
    background: transparent;
    color: var(--text);
}

/* ----- Hero (Home) ----- */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 8rem 0 4rem;
    position: relative;
    overflow: hidden;
}
.hero-bg {
    position: absolute;
    inset: 0;
    z-index: var(--z-hero-bg);
}
.hero-bg video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.4;
}
.hero-bg .hero-3d {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 80% 60% at 50% 50%, rgba(255,255,255,0.06) 0%, transparent 60%);
}
.hero-3d canvas { width: 100% !important; height: 100% !important; }
.hero-inner { position: relative; z-index: var(--z-hero-inner); }
.hero h1 {
    font-size: clamp(3rem, 10vw, 7rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
    line-height: 0.95;
}
.hero p {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 480px;
    margin-bottom: 2.5rem;
}
.hero .btn { margin-right: 1rem; }

@media (max-width: 768px) {
    .hero-bg .hero-3d {
        opacity: 0.65;
        transform: scale(1);
    }
    .hero-bg::after {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient(to bottom, rgba(10,10,10,0.25) 0%, rgba(10,10,10,0.7) 100%);
        pointer-events: none;
    }
    .hero-inner {
        background: rgba(10,10,10,0.75);
        padding: 1.5rem 0;
        margin: 0 -5vw;
        padding-left: 5vw;
        padding-right: 5vw;
    }
    .hero { padding: 6rem 0 3rem; }
    .hero h1 { font-size: clamp(2.25rem, 10vw, 3.5rem); }
    .hero p { font-size: 1rem; }
}

/* ----- 3D / Video block (home) ----- */
.media-block {
    padding: 4rem 0;
    min-height: 80vh;
    display: flex;
    align-items: center;
}
.media-block-inner { width: 100%; }
.media-block h2 {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 2rem;
}
.media-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    max-height: 70vh;
    border: 1px solid var(--border);
    overflow: hidden;
    margin-top: 2rem;
}
.media-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.media-wrapper .scene-3d {
    position: absolute;
    inset: 0;
}
.media-wrapper .scene-3d canvas { width: 100% !important; height: 100% !important; display: block; }

/* ----- Section common ----- */
section {
    padding: 6rem 0;
    border-top: 1px solid var(--border);
}
.section-head {
    margin-bottom: 4rem;
}
.section-head h2 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 0.75rem;
}
.section-head p { color: var(--text-muted); max-width: 520px; }

/* ----- About / Text sections (title left, content center) ----- */
.text-section .container { max-width: 100%; }
.text-section .text-section-inner {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 3rem 4rem;
    align-items: start;
    max-width: 900px;
    margin: 0 auto;
}
@media (max-width: 700px) {
    .text-section .text-section-inner { grid-template-columns: 1fr; gap: 1.5rem; }
}
.text-section .text-section-side {
    position: sticky;
    top: 7rem;
}
@media (max-width: 700px) {
    .text-section .text-section-side { position: static; }
}
.text-section .text-section-side .section-label { margin-bottom: 0.5rem; }
.text-section .text-section-side h1 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    margin-bottom: 0;
    line-height: 1.2;
}
.text-section .text-section-content {
    max-width: 560px;
    margin-left: 0;
    margin-top: 3rem;
}
@media (max-width: 700px) {
    .text-section .text-section-content { margin-top: 0; }
}
.text-section .text-section-content p,
.text-section .text-section-content div { color: var(--text-muted); margin-bottom: 1.25rem; font-size: 1.05rem; line-height: 1.75; }
.text-section .text-section-content .btn { margin-top: 0.5rem; }

/* ----- Packages ----- */
.packages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}
.package-card {
    border: 1px solid var(--border);
    padding: 2.5rem;
    transition: border-color 0.3s, transform 0.3s var(--ease-out);
}
.package-card:hover {
    border-color: var(--text-muted);
    transform: translateY(-4px);
}
.package-card h3 { font-size: 1.5rem; margin-bottom: 0.75rem; }
.package-card .price {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}
.package-card .price span { font-size: 0.9rem; font-weight: 400; color: var(--text-muted); }
.package-card ul { margin-bottom: 1.5rem; }
.package-card li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.95rem;
    color: var(--text-muted);
}
.package-card li:last-child { border-bottom: none; }
.package-card .package-desc { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 1rem; }
.section-cta { margin-top: 2.5rem; text-align: center; }
.empty-state { color: var(--text-muted); padding: 2rem 0; margin: 0; }
.empty-state a { color: var(--text); text-decoration: underline; }
.empty-state a:hover { opacity: 0.9; }

/* ----- Projects ----- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}
.project-card {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    border: 1px solid var(--border);
}
.project-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease-out);
}
.project-card:hover img { transform: scale(1.05); }
.project-card-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(to top, rgba(10,10,10,0.95) 0%, transparent 50%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem;
    opacity: 0;
    transition: opacity 0.3s;
}
.project-card:hover .project-card-overlay { opacity: 1; }
.project-card img { position: relative; z-index: 0; }
.project-card h3 { font-size: 1.25rem; margin-bottom: 0.25rem; }
.project-card .category { font-size: 0.8rem; color: var(--text-muted); }
.project-card a.project-card-link { position: absolute; inset: 0; z-index: 2; }

/* ----- Project detail page ----- */
.project-detail-inner { max-width: 900px; }
.back-link {
    display: inline-block;
    font-size: 0.9rem;
}

/* Device showcase: desktop, tablet, mobile */
.project-device-showcase {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: flex-end;
    justify-content: center;
    gap: 1.5rem 2rem;
    margin-bottom: 2.5rem;
}
.device-mockup {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.device-mockup .device-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 0.5rem;
}
.device-mockup .device-frame {
    background: #111;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.06);
    overflow: hidden;
    position: relative;
}
.device-mockup .device-screen {
    background: #0a0a0a;
    overflow: hidden;
    position: relative;
}
.device-mockup .device-screen img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}

/* Desktop: largest */
.device-desktop .device-frame {
    width: 520px;
    max-width: 100%;
    padding: 14px 14px 12px;
}
.device-desktop .device-screen {
    aspect-ratio: 16/10;
    border-radius: 8px;
}
.device-desktop .device-frame::before {
    content: '';
    display: block;
    height: 10px;
    margin-bottom: 10px;
    background: linear-gradient(180deg, #1a1a1a 0%, #111 100%);
    border-radius: 5px;
}

/* Tablet: medium */
.device-tablet .device-frame {
    width: 320px;
    padding: 16px 14px;
}
.device-tablet .device-screen {
    width: 292px;
    aspect-ratio: 4/3;
    border-radius: 10px;
}

/* Mobile: smallest */
.device-mobile .device-frame {
    width: 130px;
    padding: 22px 8px 18px;
}
.device-mobile .device-screen {
    width: 114px;
    aspect-ratio: 9/19;
    border-radius: 18px;
}
.device-mobile .device-frame::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 32px;
    height: 5px;
    background: #222;
    border-radius: 3px;
    z-index: 1;
}

@media (max-width: 1100px) {
    .project-device-showcase { gap: 1rem; }
    .device-desktop .device-frame { width: 420px; }
    .device-tablet .device-frame { width: 260px; }
    .device-tablet .device-screen { width: 232px; }
    .device-mobile .device-frame { width: 115px; }
    .device-mobile .device-screen { width: 99px; }
}

@media (max-width: 700px) {
    .project-device-showcase {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
        margin-bottom: 2rem;
    }
    .device-desktop .device-frame { width: 100%; max-width: 400px; }
    .device-tablet .device-frame { width: 260px; }
    .device-tablet .device-screen { width: 232px; }
    .device-mobile .device-frame { width: 120px; padding: 20px 8px 16px; }
    .device-mobile .device-screen { width: 104px; aspect-ratio: 9/19; }
}
.back-link {
    color: var(--text-muted);
    margin-bottom: 2rem;
}
.back-link:hover { color: var(--text); }
.project-detail-image {
    margin-bottom: 2.5rem;
    border: 1px solid var(--border);
    overflow: hidden;
    aspect-ratio: 16/9;
}
.project-detail-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.project-detail-content .category {
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}
.project-detail-content h1 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 0.5rem; }
.project-date { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 1.5rem; }
.project-description {
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 2rem;
}
.project-detail-content .btn { margin-top: 0.5rem; }

/* ----- Contact ----- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}
@media (max-width: 768px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-info p { color: var(--text-muted); margin-bottom: 0.5rem; }
.contact-form { max-width: 480px; }
.form-group { margin-bottom: 1.5rem; }
.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    color: var(--text);
    font-family: var(--font);
    font-size: 1rem;
    transition: border-color 0.2s;
}
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--text-muted);
}
.form-group textarea { min-height: 140px; resize: vertical; }
.alert { padding: 1rem; margin-bottom: 1rem; border: 1px solid var(--border); }
.alert.success { border-color: #333; background: rgba(255,255,255,0.03); }
.alert.error { border-color: #444; background: rgba(255,50,50,0.1); }

/* ----- Footer ----- */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 0;
    margin-top: 4rem;
    background: var(--bg-alt);
}
.footer-cta {
    padding: 4rem 0;
    border-bottom: 1px solid var(--border);
}
.footer-cta-inner {
    text-align: center;
    max-width: 560px;
    margin: 0 auto;
}
.footer-cta-title {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    margin-bottom: 0.5rem;
}
.footer-cta-text {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-size: 1rem;
}
.footer-cta .btn { margin-top: 0; }

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 3rem;
    padding: 4rem 0 3rem;
    border-bottom: 1px solid var(--border);
}
@media (max-width: 900px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
    .footer-cta { padding: 3rem 0; }
    .footer-grid { grid-template-columns: 1fr; gap: 2rem; padding: 3rem 0 2rem; }
}
.footer-brand { max-width: 280px; }
.footer-address { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 0.75rem; line-height: 1.5; }
.footer-logo {
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: 0.2em;
    display: inline-block;
    margin-bottom: 0.5rem;
}
.footer-tagline { color: var(--text-muted); font-size: 0.9rem; }
.footer-links h4,
.footer-contact h4 {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 1rem;
}
.footer-links ul { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-links a,
.footer-contact a { color: var(--text-muted); font-size: 0.9rem; }
.footer-links a:hover,
.footer-contact a:hover { color: var(--text); }
.footer-contact p { margin-bottom: 0.5rem; }
.footer-social {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}
.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    color: var(--text-muted);
    transition: color 0.2s, border-color 0.2s;
}
.footer-social a:hover { color: var(--text); border-color: var(--text-muted); }
.footer-social svg { width: 18px; height: 18px; }
.footer-bottom {
    padding: 1.5rem 0;
    text-align: center;
}
.footer-bottom p { color: var(--text-muted); font-size: 0.85rem; margin: 0; }
.site-footer a:hover { color: var(--text); }

/* ----- Button small (project overlay) ----- */
.btn-small { padding: 0.6rem 1.2rem; font-size: 0.8rem; margin-top: 0.75rem; align-self: flex-start; }

/* ----- Locomotive data attributes ----- */
[data-scroll] { will-change: transform; }
[data-scroll-speed] { display: inline-block; }
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}
.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ----- Page inner (non-home) ----- */
.page-inner { padding-top: 6rem; padding-bottom: 4rem; min-height: 60vh; }

/* ----- 404 ----- */
.page-404-inner { display: flex; align-items: center; justify-content: center; min-height: 70vh; }
.error-404-content { text-align: center; max-width: 420px; margin: 0 auto; }
.error-404-code { font-size: clamp(4rem, 12vw, 8rem); font-weight: 700; line-height: 1; color: var(--text-muted); opacity: 0.4; margin-bottom: 0.5rem; }
.error-404-content h1 { font-size: clamp(1.5rem, 4vw, 2rem); margin-bottom: 0.75rem; }
.error-404-text { color: var(--text-muted); margin-bottom: 1.5rem; }
.error-404-content .btn { margin-top: 0.5rem; }
