/* ============================================================
   BridgeTech Design System — Custom Styles
   Technical Precision / Architectural Intelligence
   ============================================================ */

/* --- Google Fonts are loaded via HTML --- */

/* --- Material Symbols Configuration --- */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24;
    display: inline-block;
    line-height: 1;
    vertical-align: middle;
}

/* ============================================================
   BACKGROUND PATTERNS
   ============================================================ */
.bg-bridge-motif {
    background-image: radial-gradient(circle at 2px 2px, rgba(62, 72, 79, 0.2) 1px, transparent 0);
    background-size: 40px 40px;
}

.bg-grid-lines {
    background-image:
        linear-gradient(to right, rgba(62, 72, 79, 0.08) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(62, 72, 79, 0.08) 1px, transparent 1px);
    background-size: 40px 40px;
}

.bg-dot-dense {
    background-image: radial-gradient(circle at 1px 1px, rgba(62, 72, 79, 0.15) 1px, transparent 0);
    background-size: 24px 24px;
}

/* ============================================================
   PAGE LOAD — BODY FADE IN
   ============================================================ */
body {
    opacity: 0;
    transition: opacity 0.5s ease;
}
body.loaded {
    opacity: 1;
}

/* ============================================================
   HERO CANVAS + BRIDGE ARC
   ============================================================ */
#hero-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    display: block;
}

.bridge-arc-svg {
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: auto;
    z-index: 1;
    pointer-events: none;
    opacity: 0.06;
}

/* Hero entrance animation (page-load, not scroll) */
.hero-enter {
    opacity: 0;
    transform: translateY(30px);
    animation: heroEnter 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.hero-enter-delay-1 { animation-delay: 0.1s; }
.hero-enter-delay-2 { animation-delay: 0.25s; }
.hero-enter-delay-3 { animation-delay: 0.4s; }
.hero-enter-delay-4 { animation-delay: 0.55s; }
.hero-enter-delay-5 { animation-delay: 0.7s; }

@keyframes heroEnter {
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   SCROLL REVEAL SYSTEM
   ============================================================ */
[data-reveal] {
    will-change: opacity, transform;
}

/* Initial states */
[data-reveal="fade-up"] {
    opacity: 0;
    transform: translateY(48px);
    transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1), transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
}
[data-reveal="fade-down"] {
    opacity: 0;
    transform: translateY(-36px);
    transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1), transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
}
[data-reveal="fade-left"] {
    opacity: 0;
    transform: translateX(60px);
    transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1), transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
}
[data-reveal="fade-right"] {
    opacity: 0;
    transform: translateX(-60px);
    transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1), transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
}
[data-reveal="scale"] {
    opacity: 0;
    transform: scale(0.88);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
[data-reveal="scale-up"] {
    opacity: 0;
    transform: scale(0.92) translateY(24px);
    transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1), transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
}
[data-reveal="flip-x"] {
    opacity: 0;
    transform: perspective(800px) rotateX(18deg);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
[data-reveal="clip"] {
    clip-path: inset(0 0 100% 0);
    opacity: 1;
    transition: clip-path 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
[data-reveal="blur-in"] {
    opacity: 0;
    filter: blur(12px);
    transform: scale(0.95);
    transition: opacity 0.8s ease, filter 0.8s ease, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Stagger container */
[data-reveal="stagger"] > * {
    opacity: 0;
    transform: translateY(36px);
    transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1), transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}
[data-reveal="stagger-left"] > * {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1), transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Revealed states */
[data-reveal="fade-up"].revealed,
[data-reveal="fade-down"].revealed,
[data-reveal="fade-left"].revealed,
[data-reveal="fade-right"].revealed,
[data-reveal="scale"].revealed,
[data-reveal="scale-up"].revealed,
[data-reveal="flip-x"].revealed,
[data-reveal="blur-in"].revealed {
    opacity: 1;
    transform: none;
    filter: none;
}
[data-reveal="clip"].revealed {
    clip-path: inset(0 0 0% 0);
}

/* Stagger children delays */
[data-reveal="stagger"].revealed > *,
[data-reveal="stagger-left"].revealed > * {
    opacity: 1;
    transform: none;
}
[data-reveal="stagger"].revealed > *:nth-child(1),
[data-reveal="stagger-left"].revealed > *:nth-child(1) { transition-delay: 0ms; }
[data-reveal="stagger"].revealed > *:nth-child(2),
[data-reveal="stagger-left"].revealed > *:nth-child(2) { transition-delay: 120ms; }
[data-reveal="stagger"].revealed > *:nth-child(3),
[data-reveal="stagger-left"].revealed > *:nth-child(3) { transition-delay: 240ms; }
[data-reveal="stagger"].revealed > *:nth-child(4),
[data-reveal="stagger-left"].revealed > *:nth-child(4) { transition-delay: 360ms; }
[data-reveal="stagger"].revealed > *:nth-child(5),
[data-reveal="stagger-left"].revealed > *:nth-child(5) { transition-delay: 480ms; }
[data-reveal="stagger"].revealed > *:nth-child(6),
[data-reveal="stagger-left"].revealed > *:nth-child(6) { transition-delay: 600ms; }
[data-reveal="stagger"].revealed > *:nth-child(n+7),
[data-reveal="stagger-left"].revealed > *:nth-child(n+7) { transition-delay: 720ms; }

/* Manual delay overrides */
[data-delay="100"] { transition-delay: 100ms !important; }
[data-delay="200"] { transition-delay: 200ms !important; }
[data-delay="300"] { transition-delay: 300ms !important; }
[data-delay="400"] { transition-delay: 400ms !important; }
[data-delay="500"] { transition-delay: 500ms !important; }
[data-delay="600"] { transition-delay: 600ms !important; }

/* ============================================================
   NAVIGATION
   ============================================================ */
.nav-services-item {
    position: relative;
}

.nav-dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-4px);
    min-width: 230px;
    padding-top: 12px; /* replaces the gap — cursor stays inside the element */
    background: transparent;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 200;
}

/* The visible card lives inside a child so the padding-top gap is invisible */
.nav-dropdown::before {
    content: '';
    display: block;
    position: absolute;
    inset: 12px 0 0 0;
    background: rgba(6, 20, 35, 0.96);
    backdrop-filter: blur(24px);
    border: 1px solid rgba(62, 72, 79, 0.4);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 1px rgba(123, 208, 255, 0.15);
    z-index: -1;
}

.nav-services-item:hover .nav-dropdown,
.nav-services-item:focus-within .nav-dropdown {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

/* Mobile menu overlay */
#mobile-menu {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(2, 15, 30, 0.98);
    backdrop-filter: blur(24px);
    z-index: 9000;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
}
#mobile-menu.open {
    display: flex;
}

/* ============================================================
   GRADIENT UTILITIES
   ============================================================ */
.gradient-text {
    background: linear-gradient(135deg, #7bd0ff 0%, #24ddd1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.gradient-text-warm {
    background: linear-gradient(135deg, #7bd0ff 0%, #F4A31B 80%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.gradient-text-cyber {
    background: linear-gradient(135deg, #ffb4ab 0%, #7bd0ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================================
   DIVIDERS
   ============================================================ */
.divider-gradient {
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(123, 208, 255, 0.3), transparent);
}
.divider-top {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(123, 208, 255, 0.25), transparent);
}

/* ============================================================
   STAT CARDS
   ============================================================ */
.stat-glow {
    text-shadow: 0 0 20px rgba(123, 208, 255, 0.4);
}
.stat-glow-tertiary {
    text-shadow: 0 0 20px rgba(36, 221, 209, 0.4);
}
.stat-glow-amber {
    text-shadow: 0 0 20px rgba(244, 163, 27, 0.4);
}

/* ============================================================
   IMAGE PLACEHOLDERS (no broken external imgs)
   ============================================================ */
.img-placeholder {
    position: relative;
    overflow: hidden;
    background: #0f1c2c;
}
.img-placeholder::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(0deg, transparent, transparent 30px, rgba(123,208,255,0.03) 30px, rgba(123,208,255,0.03) 31px),
        repeating-linear-gradient(90deg, transparent, transparent 30px, rgba(123,208,255,0.03) 30px, rgba(123,208,255,0.03) 31px);
}
.img-placeholder-hero {
    background: radial-gradient(ellipse at 60% 40%, rgba(41,171,226,0.15) 0%, rgba(6,20,35,0) 70%);
}
.img-placeholder-cyber {
    background: radial-gradient(ellipse at 40% 60%, rgba(255,180,171,0.1) 0%, rgba(6,20,35,0) 70%);
}

/* ============================================================
   FLOATING ANIMATION (hero side cards)
   ============================================================ */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}
.animate-float {
    animation: float 4s ease-in-out infinite;
}
.animate-float-delay {
    animation: float 4s ease-in-out infinite 1.5s;
}

/* ============================================================
   PULSE DOT
   ============================================================ */
@keyframes pulseDot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.3); }
}
.animate-pulse-dot {
    animation: pulseDot 2s ease-in-out infinite;
}

/* ============================================================
   HOVER ARROW ANIMATION
   ============================================================ */
.hover-arrow {
    display: inline-block;
    transition: transform 0.2s cubic-bezier(0, 0, 0.2, 1);
}
a:hover .hover-arrow,
button:hover .hover-arrow {
    transform: translateX(5px);
}

/* ============================================================
   FORM INPUTS
   ============================================================ */
.input-group {
    position: relative;
}
.input-group::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #24ddd1;
    transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}
.input-group:focus-within::after {
    width: 100%;
}

/* ============================================================
   PROCESS STEP LINE DRAW
   ============================================================ */
.process-line {
    width: 0;
    transition: width 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.process-line.revealed {
    width: 100%;
}

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: #061423; }
::-webkit-scrollbar-thumb { background: #1e2b3b; }
::-webkit-scrollbar-thumb:hover { background: #29abe2; }

/* ============================================================
   MISC
   ============================================================ */
::selection { background: rgba(123, 208, 255, 0.25); }

.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

:focus-visible {
    outline: 2px solid #7bd0ff;
    outline-offset: 2px;
}

/* Color accent left borders */
.border-amber { border-color: #F4A31B; }
.text-amber { color: #F4A31B; }
.bg-amber { background-color: #F4A31B; }

/* Blog category chip */
.chip {
    display: inline-block;
    padding: 2px 10px;
    font-size: 0.6rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    font-weight: 700;
}

/* Blog list item hover */
.blog-list-item {
    transition: background-color 0.15s ease;
}
.blog-list-item:hover {
    background-color: #1e2b3b;
}

/* ============================================================
   BLOG ARTICLE PAGE
   ============================================================ */
.prose-bridgetech {
    color: #bdc8d0;
    line-height: 1.8;
}
.prose-bridgetech h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.75rem;
    color: #d6e4f9;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}
.prose-bridgetech p {
    margin-bottom: 1.25rem;
}
.prose-bridgetech ul {
    list-style: none;
    padding: 0;
}
.prose-bridgetech ul li {
    padding-left: 1.25rem;
    position: relative;
    margin-bottom: 0.5rem;
}
.prose-bridgetech ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.6em;
    width: 6px;
    height: 6px;
    background: #24ddd1;
}
