/* Reset and Base Styles */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { width: 100%; overflow-x: hidden; font-family: system-ui, -apple-system, sans-serif; -webkit-text-size-adjust: 100%; }
body { background: #000; color: #fff; line-height: 1.5; }
h1, h2, h3, h4, h5, h6 { line-height: 1.2; }
a { text-decoration: none; color: inherit; }
button { border: none; cursor: pointer; font-family: inherit; min-height: 44px; }

/* Circuitry Background */
.circuitry-background { position: fixed; top: 0; left: 0; right: 0; bottom: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.gradient-overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: linear-gradient(to bottom, #020617, #0f172a, #000); }
.circuitry-svg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0.5; } /* reduced on mobile for readability */

/* SVG Animations */
.scan-anim-1 { animation: scan 20s linear infinite; }
.scan-anim-2 { animation: scan 25s linear infinite reverse; }
.scan-anim-3 { animation: scan 30s linear infinite; }
@keyframes scan { 0% { transform: translate(0, 0); opacity: 0.6; } 50% { opacity: 1; } 100% { transform: translate(150px, 150px); opacity: 0.6; } }

@media (min-width: 768px) {
    .circuitry-svg { opacity: 0.9; }
}

/* Content Wrapper */
.content-wrapper { position: relative; z-index: 10; width: 100%; min-height: 100%; overflow-y: auto; }

/* Container — mobile-first, scales up */
.container { width: 100%; margin: 0 auto; padding: 0 1rem; }
@media (min-width: 480px) { .container { padding: 0 1.25rem; } }
@media (min-width: 768px) { .container { padding: 0 1.5rem; } }
@media (min-width: 1024px) { .container { max-width: 1280px; padding: 0 2rem; } }

/* ---- HEADER ---- */
.header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 50;
    background: rgba(2, 44, 34, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(16, 185, 129, 0.3);
    box-shadow: 0 10px 15px -3px rgba(16, 185, 129, 0.1);
}
.header-content {
    display: flex; align-items: center; justify-content: space-between;
    height: 4rem; /* shorter on mobile */
}
.logo span { font-size: 1.1rem; letter-spacing: -0.025em; color: #ecfdf5; }

/* Nav: hidden on mobile, shown on tablet+ */
.nav { display: none; align-items: center; gap: 1.5rem; }
.nav a { font-size: 0.875rem; color: #a7f3d0; transition: color 0.2s; min-height: 44px; display: inline-flex; align-items: center; }
.nav a:hover { color: #34d399; }

/* Header CTA: hidden on mobile to save space, shown on md+ */
.header .btn-primary { display: none; }

@media (min-width: 768px) {
    .header-content { height: 5rem; }
    .logo span { font-size: 1.25rem; }
    .nav { display: flex; gap: 2rem; }
    .header .btn-primary { display: inline-flex; }
}

/* Mobile hamburger — shown only on mobile */
.hamburger {
    display: flex; flex-direction: column; gap: 5px;
    padding: 8px; background: none;
    border: 1px solid rgba(16, 185, 129, 0.4);
    cursor: pointer; z-index: 110;
    min-height: 44px; min-width: 44px;
    align-items: center; justify-content: center;
}
.hamburger span { display: block; width: 20px; height: 2px; background: #a7f3d0; transition: all 0.3s; transform-origin: center; }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (min-width: 768px) { .hamburger { display: none; } }

/* Mobile nav overlay */
.mobile-nav {
    display: none; position: fixed; inset: 0;
    background: rgba(2, 44, 34, 0.98);
    flex-direction: column; align-items: center; justify-content: center;
    gap: 2.5rem; z-index: 99;
}
.mobile-nav.open { display: flex; }
.mobile-nav a { font-size: 1.25rem; color: #a7f3d0; letter-spacing: 0.05em; min-height: 44px; display: inline-flex; align-items: center; transition: color 0.2s; }
.mobile-nav a:hover { color: #34d399; }
.mobile-nav .btn-primary { font-size: 1rem; padding: 0.75rem 2rem; }

/* ---- BUTTONS ---- */
.btn-primary {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0.75rem 1.5rem;
    background: #10b981; color: #022c22;
    font-size: 0.875rem; min-height: 44px;
    transition: all 0.2s;
    box-shadow: 0 10px 15px -3px rgba(16, 185, 129, 0.3);
}
.btn-primary:hover { background: #34d399; box-shadow: 0 10px 15px -3px rgba(52, 211, 153, 0.4); }

.btn-secondary {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0.875rem 2rem;
    background: #fff; color: #171717;
    font-size: 1rem; min-height: 44px;
    width: 100%; max-width: 280px; /* full-width feel on mobile */
    transition: background 0.2s;
}
.btn-secondary:hover { background: #f5f5f5; }

@media (min-width: 480px) {
    .btn-secondary { padding: 1rem 2.5rem; font-size: 1.125rem; width: auto; }
}

/* ---- HERO ---- */
.hero {
    position: relative;
    min-height: 100svh; /* safe viewport height for mobile */
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
    padding-top: 4rem; /* offset for fixed header */
}
.hero-bg { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background-size: cover; background-position: center; }
.hero-overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: linear-gradient(to bottom, rgba(0,0,0,0.6), rgba(0,0,0,0.4), rgba(0,0,0,0.7)); }
.hero-content {
    position: relative; z-index: 10;
    width: 100%; padding: 2rem 1rem;
    text-align: center; display: flex; flex-direction: column; align-items: center;
}

/* Hero logo: compact on mobile, grows up */
.hero-logo { width: min(80vw, 18rem); height: auto; margin-bottom: 1.5rem; object-fit: contain; }
@media (min-width: 480px) { .hero-logo { width: min(75vw, 25rem); } }
@media (min-width: 768px) { .hero-logo { width: 39rem; margin-bottom: 2rem; } }
@media (min-width: 1024px) { .hero-logo { width: 46.8rem; } }

.hero-title {
    font-size: clamp(1.5rem, 6vw, 3.75rem);
    color: #fff; margin-bottom: 1.25rem;
    letter-spacing: -0.025em; text-align: center;
    max-width: 56rem;
}
.hero-subtitle {
    font-size: clamp(1rem, 3.5vw, 1.5rem);
    color: rgba(255,255,255,0.9); margin-bottom: 2rem;
    max-width: 48rem; font-weight: 300;
    margin-left: auto; margin-right: auto;
}

@media (min-width: 768px) {
    .hero { padding-top: 5rem; }
    .hero-content { padding: 3rem 1.5rem; }
    .hero-subtitle { margin-bottom: 3rem; }
}

.scroll-indicator {
    position: absolute; bottom: 1.5rem; left: 50%; transform: translateX(-50%);
    color: #fff; animation: bounce 1s infinite;
}
@keyframes bounce { 0%, 100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(-25%); } }

/* ---- ABOUT ---- */
.about { padding: 4rem 0; }
.about-content { max-width: 56rem; margin: 0 auto; text-align: center; }
.about h2 { font-size: clamp(1.75rem, 6vw, 3rem); color: #fff; margin-bottom: 2rem; letter-spacing: -0.025em; }
.about-text { display: flex; flex-direction: column; gap: 1.5rem; font-size: 1rem; line-height: 1.75; color: #fff; }

@media (min-width: 768px) {
    .about { padding: 8rem 0; }
    .about h2 { margin-bottom: 3rem; }
    .about-text { font-size: 1.125rem; gap: 2rem; }
}

/* ---- SERVICES ---- */
.services { padding: 4rem 0; background: rgba(15, 23, 42, 0.8); backdrop-filter: blur(4px); }
.section-header { text-align: center; margin-bottom: 2.5rem; }
.section-header h2 { font-size: clamp(1.75rem, 6vw, 3rem); color: #ecfdf5; margin-bottom: 0.875rem; letter-spacing: -0.025em; }
.section-header p { font-size: 1rem; color: rgba(167, 243, 208, 0.8); max-width: 42rem; margin: 0 auto; }

/* Single column mobile → 2 col tablet → 4 col desktop */
.services-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 480px) { .services-grid { grid-template-columns: repeat(2, 1fr); gap: 1.25rem; } }
@media (min-width: 1024px) { .services-grid { grid-template-columns: repeat(4, 1fr); gap: 2rem; } }

.service-card {
    padding: 1.5rem;
    border: 1px solid rgba(16, 185, 129, 0.2);
    background: rgba(30, 41, 59, 0.5);
    transition: all 0.3s;
}
.service-card:hover { border-color: #34d399; box-shadow: 0 20px 25px -5px rgba(16, 185, 129, 0.2); }
.service-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.service-card h3 { font-size: 1.1rem; color: #ecfdf5; margin-bottom: 0.625rem; }
.service-card p { color: rgba(167, 243, 208, 0.7); line-height: 1.75; font-size: 0.9rem; }

@media (min-width: 768px) {
    .services { padding: 8rem 0; }
    .section-header { margin-bottom: 5rem; }
    .section-header p { font-size: 1.25rem; }
    .service-card { padding: 2rem; }
    .service-icon { font-size: 3rem; margin-bottom: 1.5rem; }
    .service-card h3 { font-size: 1.25rem; margin-bottom: 0.75rem; }
    .service-card p { font-size: 1rem; }
}

/* ---- PHILOSOPHY ---- */
.philosophy { padding: 4rem 0; background: #171717; color: #fff; }
.philosophy-content { max-width: 56rem; margin: 0 auto; text-align: center; }
.philosophy h2 { font-size: clamp(1.75rem, 6vw, 3rem); margin-bottom: 2rem; letter-spacing: -0.025em; }
.philosophy-text { display: flex; flex-direction: column; gap: 1.5rem; font-size: 1rem; line-height: 1.75; color: rgba(255,255,255,0.8); text-align: center; }
.philosophy-quote { padding-top: 2rem; margin-top: 2rem; border-top: 1px solid rgba(255,255,255,0.2); text-align: center; }

.tagline {
    font-size: clamp(1.5rem, 5vw, 3rem);
    color: #991b1b;
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
    line-height: 1.3; margin-bottom: 2rem;
}
.glow-text { display: inline-block; animation: glow 2s ease-in-out infinite; }
.glow-text-delay { animation-delay: 0.5s; }
@keyframes glow { 0%, 100% { text-shadow: 0 0 10px rgba(153,27,27,0.5), 0 0 20px rgba(153,27,27,0.3), 0 0 30px rgba(153,27,27,0.2); } 50% { text-shadow: 0 0 20px rgba(153,27,27,0.8), 0 0 30px rgba(153,27,27,0.5), 0 0 40px rgba(153,27,27,0.3), 0 0 50px rgba(153,27,27,0.2); } }

.wing-image-container { display: flex; justify-content: center; }
.wing-image { width: min(70vw, 14rem); height: auto; object-fit: contain; }
@media (min-width: 768px) { .wing-image { width: 20rem; } }
@media (min-width: 1024px) { .wing-image { width: 24rem; } }

@media (min-width: 768px) {
    .philosophy { padding: 8rem 0; }
    .philosophy h2 { margin-bottom: 3rem; }
    .philosophy-text { font-size: 1.125rem; gap: 2rem; }
    .philosophy-quote { padding-top: 3rem; margin-top: 3rem; }
    .tagline { margin-bottom: 3rem; }
}

/* ---- CONTACT ---- */
.contact { padding: 4rem 0; background: rgba(15, 23, 42, 0.6); backdrop-filter: blur(4px); }
.contact-content { max-width: 48rem; margin: 0 auto; text-align: center; }
.contact h2 { font-size: clamp(1.75rem, 6vw, 3rem); color: #ecfdf5; margin-bottom: 1.25rem; letter-spacing: -0.025em; }
.contact-subtitle { font-size: 1rem; color: rgba(167, 243, 208, 0.8); margin-bottom: 2rem; }

.contact-form-wrapper {
    background: rgba(30, 41, 59, 0.7);
    padding: 1.5rem 1rem; /* compact on mobile */
    border: 1px solid rgba(16, 185, 129, 0.3);
    box-shadow: 0 10px 15px -3px rgba(16, 185, 129, 0.1);
}
.contact-form { display: flex; flex-direction: column; gap: 1.25rem; }

/* Form row: single col on mobile, 2-col on tablet+ */
.form-row { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
@media (min-width: 768px) { .form-row { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; } }

.form-group { text-align: left; }
.form-group label { display: block; font-size: 0.875rem; color: #a7f3d0; margin-bottom: 0.5rem; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 0.875rem 1rem; /* taller for touch */
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #ecfdf5;
    font-size: 1rem; /* prevent iOS zoom */
    font-family: inherit;
    transition: border-color 0.2s; outline: none;
    -webkit-appearance: none; appearance: none;
    border-radius: 0;
    min-height: 48px;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: #34d399; }
.form-group input::placeholder, .form-group textarea::placeholder { color: rgba(167, 243, 208, 0.4); }
.form-group textarea { resize: vertical; min-height: 8rem; }

.btn-submit {
    width: 100%; padding: 1rem;
    background: #10b981; color: #022c22;
    font-size: 1rem; min-height: 52px;
    transition: all 0.2s;
    box-shadow: 0 10px 15px -3px rgba(16, 185, 129, 0.3);
}
.btn-submit:hover { background: #34d399; box-shadow: 0 10px 15px -3px rgba(52, 211, 153, 0.4); }

.contact-direct { margin-top: 2.5rem; padding-top: 2.5rem; border-top: 1px solid rgba(16, 185, 129, 0.2); }
.contact-direct p { color: rgba(167, 243, 208, 0.7); margin-bottom: 0.75rem; }
.contact-direct a {
    font-size: 1.1rem; color: #34d399; transition: color 0.2s;
    min-height: 44px; display: inline-flex; align-items: center;
    word-break: break-all; /* prevent overflow on small screens */
}
.contact-direct a:hover { color: #6ee7b7; }

@media (min-width: 480px) {
    .contact-form-wrapper { padding: 2rem 1.5rem; }
    .btn-submit { font-size: 1.125rem; }
    .contact-direct a { font-size: 1.25rem; word-break: normal; }
}
@media (min-width: 768px) {
    .contact { padding: 8rem 0; }
    .contact-subtitle { font-size: 1.25rem; margin-bottom: 3rem; }
    .contact-form-wrapper { padding: 3rem; }
    .contact-form { gap: 1.5rem; }
    .contact-direct { margin-top: 4rem; padding-top: 4rem; }
}

/* ---- FOOTER ---- */
.footer {
    margin: 3rem auto 0;
    padding: 2rem 1rem 0;
    border-top: 1px solid rgba(16, 185, 129, 0.2);
}
.footer-content {
    display: flex; flex-direction: column;
    align-items: center; gap: 1.25rem;
    font-size: 0.875rem; color: rgba(167, 243, 208, 0.7);
    padding-bottom: 1.5rem;
    text-align: center;
}
.footer-links { display: flex; gap: 1.5rem; flex-wrap: wrap; justify-content: center; }
.footer-links a { transition: color 0.2s; min-height: 44px; display: inline-flex; align-items: center; }
.footer-links a:hover { color: #34d399; }

@media (min-width: 768px) {
    .footer { max-width: 1280px; margin: 8rem auto 0; padding: 3rem 1.5rem 0; }
    .footer-content { flex-direction: row; justify-content: space-between; text-align: left; }
    .footer-links { gap: 2rem; }
}

/* ---- ACCESSIBILITY ---- */
@media (prefers-reduced-motion: reduce) {
    .scan-anim-1, .scan-anim-2, .scan-anim-3 { animation: none; }
    .glow-text, .glow-text-delay { animation: none; }
    .tagline { animation: none; }
    .scroll-indicator { animation: none; }
}
