/* Brutalist Engineer — Global Overrides */

/* Base body styling */
html, body {
    background-color: #131313;
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================================
   Site Navigation (pure CSS/JS — no SignalR)
   ============================================================ */

.site-appbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    display: flex; align-items: center; padding: 8px 16px;
    background: rgba(42,42,42,0.8);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(42,42,42,0.3);
}

/* Desktop dropdown */
.nav-dropdown { position: relative; }

.nav-dropdown-trigger {
    background: none; border: none; cursor: pointer;
    color: #ffffff; font-weight: 600; letter-spacing: 0.05em;
    padding: 6px 8px; font-size: 14px; font-family: inherit;
    display: inline-flex; align-items: center; gap: 2px;
}

.nav-dropdown-content {
    display: none; position: absolute; top: 100%; left: 0;
    background: #2a2a2a; border: 1px solid rgba(42,42,42,0.3);
    min-width: 240px; padding: 8px 0; z-index: 1001;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.nav-dropdown:hover .nav-dropdown-content,
.nav-dropdown-content:hover { display: block; }

.nav-dropdown-content a {
    display: block; padding: 8px 16px; color: #ffffff;
    text-decoration: none; font-size: 14px;
}
.nav-dropdown-content a:hover { background: rgba(255,107,0,0.1); }

/* CTA button */
.nav-cta-btn {
    display: inline-block; padding: 8px 16px;
    background: #ff6b00; color: #ffffff !important;
    font-size: 12px; font-weight: 700; letter-spacing: 0.1em;
    text-decoration: none; text-transform: uppercase; border: none;
    cursor: pointer; border-radius: 4px;
    margin-left: 16px;
}
.nav-cta-btn:hover { background: #e55f00; }

/* Mobile backdrop */
.mobile-backdrop {
    display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5); z-index: 1001;
}
.mobile-backdrop.open { display: block; }

/* Mobile drawer */
.mobile-drawer {
    position: fixed; top: 0; right: 0; bottom: 0; width: 280px;
    background: #1a1a1a; z-index: 1002;
    transform: translateX(100%); transition: transform 200ms ease-out;
    overflow-y: auto;
}
.mobile-drawer.open { transform: translateX(0); }

.mobile-nav-links { padding: 0 16px; }
.mobile-nav-links > a {
    display: block; padding: 12px 8px; color: #ffffff;
    text-decoration: none; font-size: 16px; font-weight: 500;
    border-bottom: 1px solid rgba(42,42,42,0.3);
}

/* Mobile services accordion */
.mobile-services-group { border-bottom: 1px solid rgba(42,42,42,0.3); }
.mobile-services-group summary {
    padding: 12px 8px; color: #ffffff; font-size: 16px; font-weight: 500;
    cursor: pointer; list-style: none;
}
.mobile-services-group summary::-webkit-details-marker { display: none; }
.mobile-services-group summary::after {
    content: ''; float: right; margin-top: 6px;
    border: solid #888; border-width: 0 2px 2px 0;
    padding: 3px; transform: rotate(45deg); transition: transform 200ms;
}
.mobile-services-group[open] summary::after { transform: rotate(-135deg); }

.mobile-services-list a {
    display: block; padding: 8px 16px; color: #cccccc;
    text-decoration: none; font-size: 14px;
}
.mobile-services-list a:hover { color: #ffffff; }

/* Hairline borders — 1px at outline variant opacity */
.brutalist-hairline {
    border: 1px solid rgba(42, 42, 42, 0.3);
}

/* Dot grid texture overlay for large background sections */
.brutalist-dotgrid {
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
}

/* Surface stacking depth classes */
.surface-dim { background-color: #131313; }
.surface-low { background-color: #1a1a1a; }
.surface-high { background-color: #2a2a2a; }

/* Override MudBlazor elevation to use surface stacking instead of shadows */
.mud-elevation-1, .mud-elevation-2, .mud-elevation-3,
.mud-elevation-4, .mud-elevation-8 {
    box-shadow: none !important;
}

/* Scrollbar styling for dark theme */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #131313;
}
::-webkit-scrollbar-thumb {
    background: #2a2a2a;
}
::-webkit-scrollbar-thumb:hover {
    background: #444444;
}

/* Focus styles — orange outline for accessibility */
*:focus-visible {
    outline: 2px solid #ff6b00;
    outline-offset: 2px;
}

/* Selection colour */
::selection {
    background-color: rgba(255, 107, 0, 0.3);
    color: #ffffff;
}

/* Dot grid texture for large sections */
.dot-grid-bg {
    background-image: radial-gradient(circle, rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 40px 40px;
}

/* Nav active link indicator */
.nav-active { border-bottom: 2px solid #ff6b00; }

/* Nav link button style reset */
.nav-link-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
}

/* Coming soon badge */
.coming-soon-badge {
    font-size: 8px;
    font-weight: 700;
    text-transform: uppercase;
    color: #ff6b00;
    margin-left: 4px;
    vertical-align: super;
}

/* Service dropdown group header */
.service-group-header {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: #888888;
    letter-spacing: 0.3em;
    padding: 8px 16px 4px;
    pointer-events: none;
}

/* Cookie consent bar */
.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999;
    background: #2a2a2a;
    border-top: 1px solid rgba(42,42,42,0.3);
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

/* Square chips — override MudBlazor pill shape */
.chip-square, .chip-square .mud-chip { border-radius: 4px !important; }

/* Cookie consent buttons */
.cookie-accept-btn {
    padding: 8px 16px; background: #ff6b00; color: #ffffff;
    border: none; cursor: pointer; font-size: 12px; font-weight: 700;
    letter-spacing: 0.1em; text-transform: uppercase; border-radius: 4px;
}
.cookie-accept-btn:hover { background: #e55f00; }

.cookie-dismiss-btn {
    background: none; border: none; cursor: pointer;
    color: #888888; font-size: 14px; text-decoration: underline;
    font-family: inherit;
}
.cookie-dismiss-btn:hover { color: #ffffff; }

/* Footer */
.site-footer {
    background: #131313;
    border-top: 1px solid rgba(42,42,42,0.3);
    padding: 48px 24px;
}
.footer-bottom {
    border-top: 1px solid rgba(42,42,42,0.2);
    padding-top: 24px;
    margin-top: 48px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

/* Footer link hover effect */
.footer-link:hover {
    color: #ffffff !important;
    transition: color 0.2s ease;
}

/* ============================================================
   Hero Carousel (JS-driven with CSS transitions)
   ============================================================ */

.hero-carousel { width: 100vw; height: 500px; position: relative; overflow: hidden; }

.hero-slides { position: relative; width: 100%; height: 100%; }

.hero-slide {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    opacity: 0; transition: opacity 800ms ease-in-out;
}
.hero-slide.active { opacity: 1; }

.hero-overlay {
    position: absolute; bottom: 0; left: 0; right: 0;
    padding: 48px; background: linear-gradient(transparent, rgba(0,0,0,0.7));
    z-index: 1;
}

.hero-headline {
    color: #ffffff; font-family: 'Space Grotesk', sans-serif;
    font-size: 2.5rem; font-style: italic; text-transform: uppercase;
    margin: 0 0 24px 0; line-height: 1.2;
}

.hero-cta-btn {
    display: inline-block; padding: 12px 24px;
    background: #ff6b00; color: #ffffff; text-decoration: none;
    font-size: 14px; font-weight: 700; letter-spacing: 0.1em;
    text-transform: uppercase; border-radius: 4px;
}
.hero-cta-btn:hover { background: #e55f00; }

/* Carousel arrows */
.hero-arrow {
    position: absolute; top: 50%; transform: translateY(-50%);
    z-index: 2; background: rgba(0,0,0,0.4); border: none;
    color: #ffffff; cursor: pointer; padding: 8px;
    opacity: 0; transition: opacity 200ms;
}
.hero-carousel:hover .hero-arrow { opacity: 1; }
.hero-arrow:hover { background: rgba(0,0,0,0.7); }
.hero-arrow-left { left: 16px; }
.hero-arrow-right { right: 16px; }

/* Carousel bullets */
.hero-bullets {
    position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%);
    z-index: 2; display: flex; gap: 8px;
}
.hero-bullet {
    width: 10px; height: 10px; border-radius: 50%; border: none;
    background: rgba(255,255,255,0.4); cursor: pointer;
    transition: background 200ms;
}
.hero-bullet.active { background: #ff6b00; }
.hero-bullet:hover { background: rgba(255,255,255,0.8); }

/* Audience cards */
.audience-card {
    position: relative; overflow: hidden; border-radius: 12px;
    aspect-ratio: 4/3; background-size: cover; background-position: center;
    cursor: pointer;
}
.audience-card::before {
    content: ''; position: absolute; inset: 0;
    background: rgba(0,0,0, var(--card-alpha, 0.3));
    z-index: 1; pointer-events: none;
}
.audience-card-title {
    position: absolute; bottom: 0; left: 0; right: 0;
    padding: 16px; background: linear-gradient(transparent, rgba(0,0,0,0.6));
    z-index: 2; transition: opacity 200ms ease-out;
}
.audience-card-overlay {
    position: absolute; bottom: 0; left: 0; right: 0;
    padding: 24px; background: rgba(0,0,0,0.85);
    transform: translateY(100%); transition: transform 200ms ease-out;
    display: flex; flex-direction: column; gap: 16px; z-index: 3;
}
.audience-card:hover .audience-card-overlay { transform: translateY(0); }
.audience-card:hover .audience-card-title { opacity: 0; }
@media (max-width: 768px) {
    .audience-card {
        aspect-ratio: auto; overflow: visible;
        padding-top: 56.25%; /* 16:9 image area */
    }
    .audience-card-title { display: none; }
    .audience-card-overlay {
        position: relative; transform: none;
        background: #1e1e1e; border-radius: 0 0 12px 12px;
        padding: 16px;
    }
}

/* Service grid */
.service-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px;
}
.service-tile {
    display: block; position: relative; aspect-ratio: 4/3; overflow: hidden;
    background: #2a2a2a; border: 1px solid transparent;
    transition: border-color 200ms ease-out; cursor: pointer;
}
.service-tile-cta {
    display: inline-block; margin-top: 12px; padding: 6px 16px;
    background: #ff6b00; color: #ffffff; font-size: 12px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.05em;
}
.service-tile:hover { border-color: #ff6b00; }
.service-tile::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 107, 0, var(--tile-tint, 0));
    z-index: 1;
    pointer-events: none;
}
.service-tile-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -60%);
    z-index: 2;
    pointer-events: none;
    user-select: none;
}
.service-tile-icon svg {
    width: 72px;
    height: 72px;
    fill: currentColor;
    color: rgba(255, 255, 255, 0.45);
}
.service-tile-title {
    position: absolute; bottom: 0; left: 0; right: 0;
    padding: 16px; background: linear-gradient(transparent, rgba(0,0,0,0.6));
    z-index: 3; transition: opacity 200ms ease-out;
}
.service-tile-overlay {
    position: absolute; bottom: 0; left: 0; right: 0;
    padding: 24px; background: rgba(0,0,0,0.85);
    transform: translateY(100%); transition: transform 200ms ease-out;
    display: flex; flex-direction: column; justify-content: flex-end; gap: 12px;
    z-index: 3;
}
.service-tile:hover .service-tile-overlay { transform: translateY(0); }
.service-tile:hover .service-tile-title { opacity: 0; }

/* CTA Banner */
.cta-banner {
    padding: 64px 24px; text-align: center;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .hero-bullets { display: none; }
    .hero-overlay { padding: 24px; }
    .service-grid {
        display: flex; flex-direction: column;
        gap: 16px; padding: 0 16px;
    }
    .service-tile {
        width: 100%; aspect-ratio: 3/2;
    }
}
@media (min-width: 769px) and (max-width: 1024px) {
    .service-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Nav visibility defaults — mobile-first */
.mobile-menu-btn {
    display: none; background: none; border: none; cursor: pointer; padding: 8px;
}

@media (max-width: 768px) {
    .desktop-nav { display: none !important; }
    .mobile-menu-btn { display: inline-flex !important; }
    .hero-carousel { height: 350px !important; }
    .hero-headline { font-size: 1.5rem; }
    .footer-columns { flex-direction: column !important; gap: 32px !important; }
    .footer-bottom { flex-direction: column !important; text-align: center !important; }
}

/* Service page banner */
.service-banner {
    width: 100%; position: relative; overflow: hidden;
    display: flex; align-items: flex-end; padding: 48px;
}
.service-banner-heavy { min-height: 200px; }
.service-banner-light { min-height: 200px; }
.service-banner-bg {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
    background-image: url('../images/hero_banner_0.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.18;
}
.service-banner-overlay {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(transparent 40%, rgba(0,0,0,0.7));
}

/* Portfolio cards */
.portfolio-card {
    background: rgba(255,255,255,0.03);
    border-radius: 8px;
    overflow: hidden;
    height: 100%;
    transition: transform 0.2s ease;
}
.portfolio-card:hover { transform: translateY(-2px); }

/* Capability cards */
.capability-card {
    background: #2a2a2a; border: 1px solid rgba(42,42,42,0.3);
    padding: 24px; transition: border-color 200ms ease-out;
    height: 100%;
}
.capability-card:hover { border-color: #ff6b00; }

/* Service page sections */
.service-section { padding: 64px 0; }
.section-overline { color: #888888; letter-spacing: 0.3em; display: block; margin-bottom: 8px; }
.section-heading { text-transform: uppercase; margin-bottom: 32px; }

/* Spec table header */
.spec-header {
    color: #888888; text-transform: uppercase; letter-spacing: 0.1em;
    font-size: 0.75rem; padding: 16px;
}

/* Service CTA section */
.service-cta {
    padding: 64px 24px; text-align: center;
}

/* Spec table rows */
.spec-row td {
    padding: 12px 16px; border-bottom: 1px solid rgba(42,42,42,0.3);
}
.spec-row td:last-child { color: #888888; }
.spec-row:nth-child(odd) { background: #2a2a2a; }
.spec-row:nth-child(even) { background: #242424; }
.spec-row:last-child td { border-bottom: none; }

/* FAQ items */
.faq-item {
    background: #2a2a2a; border: 1px solid rgba(42,42,42,0.3);
    margin-bottom: 8px;
}
.faq-item summary {
    padding: 16px; cursor: pointer; list-style: none;
    font-size: 1rem; font-weight: 500; color: #ffffff;
    display: flex; justify-content: space-between; align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: ''; flex-shrink: 0; margin-left: 16px;
    border: solid #888; border-width: 0 2px 2px 0;
    padding: 4px; transform: rotate(45deg); transition: transform 200ms;
}
.faq-item[open] summary::after { transform: rotate(-135deg); }
.faq-answer {
    padding: 0 16px 16px; color: #888888; font-size: 0.875rem; line-height: 1.6;
}

@media (max-width: 768px) {
    .service-banner-heavy { min-height: 120px; }
    .service-banner-light { min-height: 120px; }
    .service-banner { padding: 24px; padding-top: 32px; }
}

/* ============================================================
   Quote Wizard Layout
   ============================================================ */

.quote-wizard { display: flex; max-width: 900px; margin: 0 auto; padding: 64px 16px; gap: 32px; }
.wizard-sidebar { width: 240px; flex-shrink: 0; }
.wizard-content { flex: 1; min-width: 0; }

/* Stepper */
.wizard-step-item { padding: 12px 16px; border-left: 2px solid transparent; }
.wizard-step-item.active { border-left-color: #ff6b00; }
.wizard-step-item.active .step-label { color: #ff6b00; }
.wizard-step-item.completed .step-label { color: #ff6b00; }
.wizard-step-item.future .step-label { color: #444444; }
.step-label {
    font-size: 12px; font-weight: 700; text-transform: uppercase;
    font-family: 'Inter', sans-serif; letter-spacing: 0.1em;
}

/* Step transitions */
.step-container { position: relative; overflow: hidden; }
.step-enter-right { animation: slideInRight 300ms ease-in-out; }
.step-enter-left { animation: slideInLeft 300ms ease-in-out; }
@keyframes slideInRight { from { transform: translateX(30px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes slideInLeft { from { transform: translateX(-30px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* Wizard bottom nav */
.wizard-nav { display: flex; justify-content: space-between; padding-top: 32px; margin-top: 32px; border-top: 1px solid rgba(42,42,42,0.3); }

/* State conditional animation */
.state-fade-in { animation: fadeIn 200ms ease-out; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Mobile wizard */
@media (max-width: 768px) {
    .quote-wizard { flex-direction: column; padding: 32px 16px; }
    .wizard-sidebar { width: 100%; display: flex; gap: 8px; overflow-x: auto; border-left: none; }
    .wizard-step-item { border-left: none; border-bottom: 2px solid transparent; white-space: nowrap; }
    .wizard-step-item.active { border-bottom-color: #ff6b00; }
}

/* ============================================================
   File Upload Step
   ============================================================ */

.file-drop-zone {
    border: 1px dashed rgba(42,42,42,0.4); min-height: 200px;
    display: flex; flex-direction: column; align-items: center;
    justify-content: center; padding: 32px; background: #1a1a1a;
    cursor: pointer; transition: border-color 200ms ease-out;
}
.file-drop-zone.drag-over { border-color: #ff6b00; }
.file-drop-zone input[type="file"] { position: absolute; opacity: 0; width: 100%; height: 100%; cursor: pointer; }

.file-item {
    display: flex; align-items: center; gap: 16px; padding: 12px 16px;
    background: #2a2a2a; border: 1px solid rgba(42,42,42,0.3);
    margin-top: 8px;
}
.file-item .file-size { color: #888888; font-size: 14px; white-space: nowrap; }

/* ============================================================
   Review Step
   ============================================================ */

.review-section { padding: 24px; background: #1a1a1a; margin-bottom: 16px; }
.review-section-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 16px; padding-bottom: 8px;
    border-bottom: 1px solid rgba(42,42,42,0.3);
}
.edit-btn { color: #ff6b00 !important; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; }
