/* Blueprint Architecture Website - Technical Drawing Aesthetic */

:root {
    --blueprint-dark: #0a1929;
    --blueprint-medium: #1e3a5f;
    --blueprint-light: #64b5f6;
    --blueprint-accent: #4fc3f7;
    --accent-orange: #ff6b35;
    --text-white: #ffffff;
    --text-light: #e3f2fd;
    --bg-light: #f5f5f5;
}

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

html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
    background: var(--blueprint-dark);
}

section[id] {
    scroll-margin-top: 110px;
}

.content-wide {
    max-width: 1400px;
}

@media (min-width: 1600px) {
    .content-wide {
        max-width: 1500px;
    }
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid var(--accent-orange);
    outline-offset: 3px;
}

/* Blueprint Grid Background - Technical Drawing */
.blueprint-grid {
    position: absolute;
    inset: 0;
    background-color: var(--blueprint-dark);
    background-image: 
        /* Main grid */
        linear-gradient(var(--blueprint-light) 1px, transparent 1px),
        linear-gradient(90deg, var(--blueprint-light) 1px, transparent 1px),
        /* Fine grid */
        linear-gradient(rgba(100, 181, 246, 0.2) 0.5px, transparent 0.5px),
        linear-gradient(90deg, rgba(100, 181, 246, 0.2) 0.5px, transparent 0.5px);
    background-size: 
        100px 100px,
        100px 100px,
        20px 20px,
        20px 20px;
    background-position: -1px -1px, -1px -1px, -1px -1px, -1px -1px;
    opacity: 0.22;
    animation: gridFloat 120s linear infinite;
}

@keyframes gridFloat {
    0% { transform: translate(0, 0); }
    100% { transform: translate(100px, 100px); }
}

/* Blueprint Plans Overlay - Construction Lines */
.blueprint-plans {
    position: absolute;
    inset: 0;
    background-image: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 200px,
            rgba(79, 195, 247, 0.035) 200px,
            rgba(79, 195, 247, 0.035) 201px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 200px,
            rgba(79, 195, 247, 0.035) 200px,
            rgba(79, 195, 247, 0.035) 201px
        ),
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 50px,
            rgba(100, 181, 246, 0.015) 50px,
            rgba(100, 181, 246, 0.015) 51px
        );
    pointer-events: none;
}

/* Blueprint Lines */
.blueprint-lines {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.blueprint-line {
    --line-rotate: 0deg;
    position: absolute;
    height: 2px;
    width: 220px;
    background: linear-gradient(90deg, transparent, rgba(100, 181, 246, 0.7), transparent);
    opacity: 0.25;
    filter: drop-shadow(0 0 10px rgba(79, 195, 247, 0.5));
    transform: rotate(var(--line-rotate));
    animation: lineDrift 26s ease-in-out infinite;
}

.blueprint-line.line-b,
.blueprint-line.line-d {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 107, 53, 0.7), transparent);
    opacity: 0.22;
}

.blueprint-line.line-a {
    top: 12%;
    left: 8%;
    --line-rotate: 12deg;
    animation-duration: 28s;
}

.blueprint-line.line-b {
    top: 32%;
    right: 12%;
    width: 180px;
    --line-rotate: -8deg;
    animation-duration: 30s;
}

.blueprint-line.line-c {
    top: 58%;
    left: 15%;
    width: 260px;
    --line-rotate: 5deg;
    animation-duration: 34s;
}

.blueprint-line.line-d {
    bottom: 22%;
    right: 18%;
    width: 240px;
    --line-rotate: -14deg;
    animation-duration: 29s;
}

.blueprint-line.line-e {
    bottom: 12%;
    left: 42%;
    width: 200px;
    --line-rotate: 18deg;
    animation-duration: 32s;
}

@keyframes lineDrift {
    0%, 100% {
        transform: translate3d(0, 0, 0) rotate(var(--line-rotate));
    }
    50% {
        transform: translate3d(40px, -30px, 0) rotate(var(--line-rotate));
    }
}

/* Section Blueprint Overlays */
.blueprint-section {
    position: relative;
    isolation: isolate;
}

.blueprint-section::before {
    content: '';
    position: absolute;
    inset: -15%;
    background-image:
        radial-gradient(circle at 12% 18%, rgba(79, 195, 247, 0.25), transparent 50%),
        radial-gradient(circle at 88% 22%, rgba(255, 107, 53, 0.18), transparent 45%),
        repeating-linear-gradient(120deg, rgba(100, 181, 246, 0.08) 0 2px, transparent 2px 90px),
        repeating-linear-gradient(30deg, rgba(79, 195, 247, 0.06) 0 1px, transparent 1px 70px);
    opacity: 0.55;
    animation: sectionDrift 80s linear infinite;
    mix-blend-mode: screen;
    pointer-events: none;
    z-index: 0;
}

.blueprint-section::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(100, 181, 246, 0.3) 1px, transparent 1px);
    background-size: 140px 140px;
    opacity: 0.22;
    animation: dotsDrift 120s linear infinite;
    mix-blend-mode: screen;
    pointer-events: none;
    z-index: 0;
}

.blueprint-section > * {
    position: relative;
    z-index: 1;
}

@keyframes sectionDrift {
    0% {
        transform: translate3d(0, 0, 0);
    }
    100% {
        transform: translate3d(140px, 90px, 0);
    }
}

@keyframes dotsDrift {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 260px 200px;
    }
}

/* Floating Tool Animations */
.floating-tool {
    animation: floatBlueprint 10s ease-in-out infinite;
    filter: drop-shadow(0 0 10px rgba(79, 195, 247, 0.3));
}

.rotating-tool {
    animation: rotateBlueprint 25s linear infinite;
    filter: drop-shadow(0 0 15px rgba(79, 195, 247, 0.4));
}

@keyframes floatBlueprint {
    0%, 100% {
        transform: translateY(0) translateX(0) rotate(0deg);
    }
    25% {
        transform: translateY(-40px) translateX(20px) rotate(5deg);
    }
    50% {
        transform: translateY(-20px) translateX(-10px) rotate(-3deg);
    }
    75% {
        transform: translateY(-50px) translateX(15px) rotate(4deg);
    }
}

@keyframes rotateBlueprint {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Section Dividers - Technical Drawing Lines */
.section-divider {
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        var(--blueprint-accent) 10%, 
        var(--accent-orange) 50%, 
        var(--blueprint-accent) 90%, 
        transparent 100%
    );
    opacity: 0.6;
    box-shadow: 0 0 20px rgba(79, 195, 247, 0.5);
    z-index: 1;
}

.section-divider.top {
    top: 0;
}

.section-divider::before,
.section-divider::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    border: 2px solid var(--blueprint-accent);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    background: var(--blueprint-dark);
    box-shadow: 0 0 10px var(--blueprint-accent);
}

.section-divider::before {
    left: 10%;
}

.section-divider::after {
    right: 10%;
}

/* Navigation */
#navbar {
    transition: all 0.3s ease;
    background: rgba(10, 25, 41, 0.9);
    border-bottom: 1px solid rgba(79, 195, 247, 0.2);
}

#navbar.scrolled {
    background: rgba(10, 25, 41, 0.98);
    box-shadow: 0 4px 30px rgba(79, 195, 247, 0.2);
    border-bottom-color: var(--blueprint-accent);
}

.nav-link {
    position: relative;
    font-size: 0.9rem;
    letter-spacing: 1px;
    color: var(--text-light);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--accent-orange);
    transition: width 0.3s ease;
    box-shadow: 0 0 10px var(--accent-orange);
}

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

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

/* Hero Canvas */
#hero-canvas {
    mix-blend-mode: screen;
}

/* Hero Content */
.hero-content {
    opacity: 1;
    transform: none;
}

.hero-code {
    text-transform: uppercase;
    color: var(--blueprint-accent);
    text-shadow: 0 0 20px rgba(79, 195, 247, 0.6);
}

.hero-title,
.hero-subtitle {
    text-shadow:
        0 10px 30px rgba(10, 25, 41, 0.6),
        0 0 30px rgba(100, 181, 246, 0.35);
}

.hero-chip {
    padding: 1rem 1.25rem;
    border-radius: 0.75rem;
    background: rgba(30, 58, 95, 0.35);
    border: 1px solid rgba(79, 195, 247, 0.25);
    text-align: left;
    backdrop-filter: blur(8px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-chip:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(10, 25, 41, 0.35);
}

.btn-outline {
    border: 2px solid currentColor;
    background: transparent;
    box-shadow: 0 6px 20px rgba(10, 25, 41, 0.2);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

/* Portrait */
.portrait-ring {
    position: relative;
    width: 10.5rem;
    height: 10.5rem;
    margin: 0.5rem auto 0;
    padding: 6px;
    border-radius: 9999px;
    background: linear-gradient(135deg, var(--accent-orange), var(--blueprint-accent));
    box-shadow:
        0 18px 40px rgba(10, 25, 41, 0.25),
        0 0 30px rgba(255, 107, 53, 0.35);
}

.portrait-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-white);
    z-index: 0;
}

.portrait-image {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    border-radius: 9999px;
    object-fit: cover;
    display: block;
    background: var(--blueprint-medium);
    border: 3px solid rgba(10, 25, 41, 0.5);
}

/* Scroll Indicator */
.scroll-indicator {
    animation: floatIndicator 3s ease-in-out infinite;
}

.scroll-indicator .border-accent {
    border-color: var(--blueprint-accent);
    box-shadow: 0 0 15px rgba(79, 195, 247, 0.5);
}

.scroll-indicator .bg-accent {
    background: var(--blueprint-accent);
    box-shadow: 0 0 10px rgba(79, 195, 247, 0.8);
}

@keyframes floatIndicator {
    0%, 100% {
        transform: translate(-50%, 0);
    }
    50% {
        transform: translate(-50%, -15px);
    }
}

/* Philosophy Cards */
.philosophy-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.philosophy-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(255, 107, 53, 0.2);
}

/* Trust Cards */
.trust-card {
    padding: 1.5rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 107, 53, 0.2);
    box-shadow: 0 12px 24px rgba(10, 25, 41, 0.12);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.trust-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 35px rgba(10, 25, 41, 0.18);
}

/* Service Cards - Blueprint Style */
.service-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    background: rgba(30, 58, 95, 0.4) !important;
    border-color: rgba(79, 195, 247, 0.3) !important;
    backdrop-filter: blur(10px);
}

.service-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        circle,
        rgba(79, 195, 247, 0.15) 0%,
        transparent 70%
    );
    opacity: 0;
    transition: opacity 0.4s ease;
}

.service-card:hover::before {
    opacity: 1;
}

.service-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--accent-orange) !important;
    box-shadow: 
        0 20px 40px rgba(10, 25, 41, 0.6),
        0 0 30px rgba(255, 107, 53, 0.4),
        inset 0 0 20px rgba(79, 195, 247, 0.1);
}

/* Process Steps - Technical Drawing Style */
.process-step {
    transition: all 0.3s ease;
    position: relative;
    background: rgba(30, 58, 95, 0.3) !important;
    border-color: rgba(79, 195, 247, 0.3) !important;
}

.process-step::before {
    content: '';
    position: absolute;
    left: 32px;
    top: 80px;
    bottom: -40px;
    width: 2px;
    background: linear-gradient(
        to bottom,
        var(--blueprint-accent),
        transparent
    );
    box-shadow: 0 0 10px rgba(79, 195, 247, 0.5);
}

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

.process-step:hover {
    background: rgba(30, 58, 95, 0.6) !important;
    border-color: var(--accent-orange) !important;
    box-shadow: 0 10px 30px rgba(79, 195, 247, 0.3);
}

.process-step .bg-accent {
    background: linear-gradient(135deg, var(--accent-orange), #ff8c5f) !important;
    box-shadow: 0 0 20px rgba(255, 107, 53, 0.6);
}

/* Project Cards - Blueprint Enhanced */
.project-card {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.project-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 2px solid transparent;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, var(--blueprint-accent), var(--accent-orange)) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card:hover::after {
    opacity: 1;
}

.project-card:hover {
    transform: translateY(-15px) scale(1.03);
    box-shadow: 
        0 30px 60px rgba(10, 25, 41, 0.8),
        0 0 40px rgba(79, 195, 247, 0.4),
        0 0 20px rgba(255, 107, 53, 0.3);
}

/* Contact Form */
input,
textarea,
select {
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.95);
}

input:focus,
textarea:focus,
select:focus {
    transform: translateY(-2px);
    box-shadow: 
        0 10px 30px rgba(79, 195, 247, 0.3),
        0 0 20px rgba(255, 107, 53, 0.2);
    border-color: var(--blueprint-accent) !important;
}

/* Buttons */
button,
.hero-cta {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--accent-orange), #ff8c5f);
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
}

button:hover,
.hero-cta:hover {
    box-shadow: 0 6px 25px rgba(255, 107, 53, 0.6);
}

button::before,
.hero-cta::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.8s, height 0.8s;
}

button:hover::before,
.hero-cta:hover::before {
    width: 400px;
    height: 400px;
}

/* Custom Scrollbar - Blueprint Style */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--blueprint-dark);
    border-left: 1px solid rgba(79, 195, 247, 0.2);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(
        to bottom,
        var(--blueprint-accent),
        var(--accent-orange)
    );
    border-radius: 6px;
    border: 2px solid var(--blueprint-dark);
    box-shadow: 0 0 10px rgba(79, 195, 247, 0.5);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(
        to bottom,
        var(--accent-orange),
        var(--blueprint-accent)
    );
}

/* Selection */
::selection {
    background: var(--accent-orange);
    color: white;
    text-shadow: 0 0 10px rgba(255, 107, 53, 0.8);
}

/* Technical Measurement Lines */
.technical-measure {
    position: relative;
}

.technical-measure::before {
    content: '';
    position: absolute;
    top: 0;
    left: -20px;
    width: 1px;
    height: 100%;
    background: var(--blueprint-light);
    opacity: 0.3;
}

.technical-measure::after {
    content: '';
    position: absolute;
    top: 0;
    right: -20px;
    width: 1px;
    height: 100%;
    background: var(--blueprint-light);
    opacity: 0.3;
}

/* Glow Effects */
.glow-blue {
    text-shadow: 0 0 10px rgba(79, 195, 247, 0.8),
                 0 0 20px rgba(79, 195, 247, 0.5);
}

.glow-orange {
    text-shadow: 0 0 10px rgba(255, 107, 53, 0.8),
                 0 0 20px rgba(255, 107, 53, 0.5);
}


@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    #hero-canvas {
        display: none;
    }

    .blueprint-grid,
    .floating-tool,
    .rotating-tool,
    .scroll-indicator,
    .blueprint-plans,
    .blueprint-line,
    .blueprint-section::before,
    .blueprint-section::after {
        animation: none !important;
    }

    .nav-link::after,
    .service-card,
    .project-card,
    .philosophy-card,
    .process-step,
    #navbar,
    button,
    .hero-cta {
        transition: none !important;
    }

    button::before,
    .hero-cta::before {
        transition: none !important;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .blueprint-grid {
        background-size: 50px 50px, 50px 50px, 10px 10px, 10px 10px;
    }

    .floating-tool,
    .rotating-tool {
        display: none;
    }

    .nav-link::after {
        display: none;
    }

    .service-card:hover,
    .project-card:hover,
    .philosophy-card:hover {
        transform: none;
    }

    .process-step::before {
        display: none;
    }
}

/* Performance */
.will-change-transform {
    will-change: transform;
}

.gpu-accelerated {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Print */
@media print {
    .floating-tool,
    .rotating-tool,
    .blueprint-grid,
    .blueprint-plans,
    nav,
    footer,
    .scroll-indicator,
    .section-divider {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }
}
