/* ─── Local Fonts ─────────────────────────────────────────────────────────── */

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('assets/fonts/Inter/Inter-VariableFont_opsz,wght.ttf') format('truetype');
}

@font-face {
    font-family: 'Inter';
    font-style: italic;
    font-weight: 100 900;
    font-display: swap;
    src: url('assets/fonts/Inter/Inter-Italic-VariableFont_opsz,wght.ttf') format('truetype');
}

@font-face {
    font-family: 'Manrope';
    font-style: normal;
    font-weight: 200 800;
    font-display: swap;
    src: url('assets/fonts/Manrope/Manrope-VariableFont_wght.ttf') format('truetype');
}

@font-face {
    font-family: 'Material Symbols Rounded';
    font-style: normal;
    font-weight: 100 700;
    font-display: block;
    src: url('assets/icons/Material_Symbols_Rounded/MaterialSymbolsRounded-VariableFont_FILL,GRAD,opsz,wght.ttf') format('truetype');
}

/* ─────────────────────────────────────────────────────────────────────────── */

:root {
    --primary: #003fb1;
    --primary-container: #1a56db;
    --surface: #f8f9ff;
    --on-surface: #121c28;
    --glass-bg: rgba(255, 255, 255, 0.6);
    --glass-border: rgba(255, 255, 255, 0.4);
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --surface: #121c28;
        --on-surface: #f8f9ff;
        --glass-bg: rgba(18, 28, 40, 0.6);
        --glass-border: rgba(255, 255, 255, 0.1);
    }
}

.material-symbols-rounded {
    font-family: 'Material Symbols Rounded';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* Glassmorphism 3.0 */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.05);
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
}

/* Animation Engine */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Glowing Border Animation */
@keyframes breathing-gradient {
    0% { border-color: var(--primary); box-shadow: 0 0 5px var(--primary); }
    50% { border-color: var(--primary-container); box-shadow: 0 0 20px var(--primary-container); }
    100% { border-color: var(--primary); box-shadow: 0 0 5px var(--primary); }
}

.animate-glow {
    animation: breathing-gradient 4s infinite ease-in-out;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--surface);
}
::-webkit-scrollbar-thumb {
    background: #c3c5d7;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Glow Card Effect */
.glow-card {
    position: relative;
    overflow: hidden;
}

.glow-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: radial-gradient(circle at center, rgba(0, 63, 177, 0.05) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

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

/* Cyan glow — matches logo accent */
.text-logo-cyan {
    text-shadow:
        0 0 15px rgba(0, 212, 232, 0.3),
        0 0 40px rgba(0, 212, 232, 0.1);
}

/* Modern Typography Tweaks */
.font-headline {
    letter-spacing: -0.02em;
}

.site-logo-link {
    display: inline-flex;
    align-items: center;
}

.site-logo {
    display: block;
    height: 4rem;
    width: auto;
    object-fit: contain;
}

.site-logo.site-logo-footer {
    height: 4rem;
}

@media (min-width: 640px) {
    .site-logo {
        height: 5.5rem;
    }

    .site-logo.site-logo-footer {
        height: 5.5rem;
    }
}

/* Back to Top Button */
#back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3.5rem;
    height: 3.5rem;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0, 63, 177, 0.3);
    cursor: pointer;
    z-index: 100;
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
}

#back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#back-to-top:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 15px 40px rgba(0, 63, 177, 0.4);
}

/* Global Form Select Reset */
select {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white' opacity='0.3'%3e%3cpath d='M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 1.5rem center !important;
    background-size: 1.25rem !important;
}

select::-ms-expand {
    display: none !important;
}

/* Email & long-string overflow protection */
a[href^="mailto:"] {
    word-break: break-all;
    overflow-wrap: break-word;
}

/* Legacy Device Support (320px - 360px) */
@media (max-width: 360px) {
    :root {
        --section-spacing: 4rem;
    }
    
    .px-4 {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    h1 {
        font-size: 2.5rem !important;
        line-height: 1 !important;
    }

    h2 {
        font-size: 2rem !important;
    }

    .rounded-3xl {
        border-radius: 1.5rem !important;
    }

    .rounded-\[4rem\] {
        border-radius: 2rem !important;
    }
}

/* Sticky Call Button */
#sticky-call {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    width: 3.5rem;
    height: 3.5rem;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0, 63, 177, 0.4);
    z-index: 100;
    transition: all 0.3s ease;
}

#sticky-call:active {
    transform: scale(0.9);
}

@media (min-width: 768px) {
    #sticky-call {
        display: none;
    }
}

@keyframes pulse-primary {
    0% { box-shadow: 0 0 0 0 rgba(0, 63, 177, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(0, 63, 177, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 63, 177, 0); }
}

.animate-pulse-primary {
    animation: pulse-primary 2s infinite;
}

/* Border Glow Effect */
.border-glow {
    position: relative;
    z-index: 1;
}

.border-glow::before {
    content: "";
    position: absolute;
    inset: -1px;
    padding: 1.5px; /* Border thickness */
    border-radius: inherit;
    background: radial-gradient(
        80px circle at var(--x, 50%) var(--y, 50%),
        #c084fc 0%,
        #f472b6 50%,
        #38bdf8 100%
    );
    -webkit-mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: -1;
}

.border-glow:hover::before {
    opacity: 1;
}
