/* ====================================================
   TRUEWEST TECHNOLOGIES — Global Stylesheet
   Tailwind CDN + Custom CSS
   ==================================================== */

/* ── Reset & Base ─────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Cause:wght@100..900&display=swap');
*,
*::before,
*::after {
    font-family: "Cause", cursive;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    /* font-family: "Akt", ui-sans-serif, system-ui, sans-serif; */
    background-color: #f8fafc;
    color: #1e293b;
    overflow-x: hidden;
    min-height: 100vh;
    line-height: 1.6;
}

img {
    max-width: 100%;
    display: block;
}
a {
    text-decoration: none;
    color: inherit;
}
input,
textarea,
select,
button {
    font-family: inherit;
}
button {
    cursor: pointer;
    border: none;
    background: none;
}

/* ── Root Variables ───────────────────────────────── */
:root {
    --primary: #38bdf8;
    --primary-dark: #0284c7;
    --turquoise: #2dd4bf;
    --navy-dark: #1e293b;
    --navy-light: #334155;
    --surface: #f8fafc;
    --white: #ffffff;
    --text-dark: #0f172a;
}

/* ── Custom Scrollbar ─────────────────────────────── */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #0f172a;
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #38bdf8, #2dd4bf);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #0ea5e9, #14b8a6);
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: #38bdf8 #0f172a;
}

/* ── Glass Morphism ───────────────────────────────── */
.glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}
.glass-dark {
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    color: white;
}
.glass-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 1rem;
}

/* ── Gradients ────────────────────────────────────── */
.text-gradient,
span.text-gradient,
h1 .text-gradient,
h2 .text-gradient,
h3 .text-gradient {
    background: linear-gradient(135deg, #2dd4bf, #38bdf8, #818cf8) !important;
    background-size: 200% 200% !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    color: transparent !important;
    animation: gradient-shift 8s ease infinite;
    display: inline;
}
.bg-gradient-brand {
    background: linear-gradient(135deg, #2dd4bf 0%, #38bdf8 100%);
}

/* ── Input Glow ───────────────────────────────────── */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.25);
}

/* ── Keyframes ────────────────────────────────────── */
@keyframes fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}
@keyframes slide-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@keyframes float {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-12px);
    }
}
@keyframes pulse-slow {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}
@keyframes shimmer {
    0% {
        background-position: -200% center;
    }
    100% {
        background-position: 200% center;
    }
}
@keyframes slide-in-left {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}
@keyframes slide-in-right {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}
@keyframes scale-in {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}
@keyframes rotate-pulse {
    0% {
        transform: rotate(0deg) scale(1);
    }
    25% {
        transform: rotate(90deg) scale(1.1);
    }
    50% {
        transform: rotate(180deg) scale(1);
    }
    75% {
        transform: rotate(270deg) scale(1.1);
    }
    100% {
        transform: rotate(360deg) scale(1);
    }
}
@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}
@keyframes count-up {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@keyframes scroll-reveal {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
@keyframes typing {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}
@keyframes blink-caret {
    from,
    to {
        border-color: transparent;
    }
    50% {
        border-color: currentColor;
    }
}
@keyframes gradient-text {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}
@keyframes marquee {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-50%);
    }
}
@keyframes loading {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}
@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(3);
        opacity: 0;
    }
}
@keyframes orbit {
    from {
        transform: rotate(0deg) translateX(500px) rotate(0deg);
    }
    to {
        transform: rotate(360deg) translateX(500px) rotate(-360deg);
    }
}
@keyframes fade-up {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@keyframes slide-diagonal {
    0% {
        transform: translate(-100px, -100px) rotate(-5deg);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 1;
    }
}

/* ── Splash / Preloader ───────────────────────────── */
.splash-screen {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0f172a;
    transition:
        opacity 0.6s ease,
        visibility 0.6s ease;
}
.splash-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.splash-screen img {
    width: 120px;
    height: 120px;
    border-radius: 24px;
    animation: pulse-slow 1.5s ease-in-out infinite;
    object-fit: contain;
}
.splash-progress {
    width: 200px;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    margin-top: 24px;
    overflow: hidden;
}
.splash-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #2dd4bf, #38bdf8);
    border-radius: 2px;
    animation: loading 1.5s ease-in-out forwards;
}

/* ── Nav Link Indicator ────────────────────────────── */
.nav-link-indicator {
    position: relative;
}
.nav-link-indicator::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #38bdf8, #2dd4bf);
    transition: width 0.3s ease;
    border-radius: 1px;
}
.nav-link-indicator:hover::after,
.nav-link-indicator.active::after {
    width: 100%;
}

/* ── Company Dropdown ─────────────────────────────── */
.company-dropdown:hover .company-dropdown-menu,
.company-dropdown.active .company-dropdown-menu,
.company-dropdown-menu:hover {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* ── Mobile Nav ───────────────────────────────────── */
.mobile-nav.transition-open {
    animation: slide-up 0.3s ease-out forwards;
}

/* ── Back to Top ──────────────────────────────────── */
.back-to-top {
    width: 48px;
    height: 48px;
}

/* ── Reveal on Scroll ─────────────────────────────── */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition:
        opacity 0.7s ease,
        transform 0.7s ease;
}
.reveal-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── × for ×dropdown & social hover ────────────────── */
.close-dismiss:hover {
    opacity: 1;
}

/* ── Hover Lift ───────────────────────────────────── */
.hover-lift {
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}
.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* ── Animate Utility ──────────────────────────────── */
.animate-shimmer {
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.4) 50%,
        transparent 100%
    );
    background-size: 200% 100%;
    animation: shimmer 2s ease-in-out infinite;
}

/* ── Noise Texture ────────────────────────────────── */
.noise-texture {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.02'/%3E%3C/svg%3E");
    background-repeat: repeat;
}

/* ── Section Divider ──────────────────────────────── */
.section-divider {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}
.section-divider::before {
    content: "";
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #38bdf8, #2dd4bf);
    border-radius: 2px;
}

/* ── Gradient Glow ─────────────────────────────────── */
.glow-primary {
    box-shadow:
        0 0 30px rgba(56, 189, 248, 0.4),
        0 0 60px rgba(56, 189, 248, 0.2);
}
.glow-secondary {
    box-shadow:
        0 0 30px rgba(45, 212, 191, 0.4),
        0 0 60px rgba(45, 212, 191, 0.2);
}
.glow-accent {
    box-shadow:
        0 0 30px rgba(139, 92, 246, 0.4),
        0 0 60px rgba(139, 92, 246, 0.2);
}

/* ── Text Glow ─────────────────────────────────────── */
.text-glow {
    text-shadow: 0 0 20px rgba(56, 189, 248, 0.3);
}

/* ── Responsive Hero Text ─────────────────────────── */
.text-hero {
    font-size: clamp(2rem, 5vw, 3.75rem);
    line-height: 1.15;
}

/* ── Marquee Animation ─────────────────────────────── */
.animate-marquee {
    animation: marquee 25s linear infinite;
}

/* ── Misc Effects ─────────────────────────────────── */
.gradient-border {
    position: relative;
}
.gradient-border::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, #38bdf8, #2dd4bf);
    -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;
}

/* ── Typing Cursor ────────────────────────────────── */
.animate-typing {
    overflow: hidden;
    border-right: 3px solid currentColor;
    white-space: nowrap;
    animation: typing 3s steps(40, end) infinite;
}

/* ── Focus Visible ────────────────────────────────── */
:focus-visible {
    outline: 2px solid #38bdf8;
    outline-offset: 2px;
}

/* ── Selection ────────────────────────────────────── */
::selection {
    background: #38bdf8;
    color: white;
}

/* ── Card Spotlight ───────────────────────────────── */
.card-spotlight {
    position: relative;
    overflow: hidden;
}
.card-spotlight::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.06),
        transparent
    );
    transition: left 0.6s ease;
}
.card-spotlight:hover::after {
    left: 120%;
}

/* ── Custom Counter ───────────────────────────────── */
.counter-badge {
    background: linear-gradient(135deg, #2dd4bf, #38bdf8);
}
