@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');

/* ===== CSS VARIABLES ===== */
:root {
  --midnight: #0A0F2C;
  --midnight-light: #111640;
  --midnight-lighter: #1a1f50;
  --indigo: #4F46E5;
  --indigo-hover: #6366F1;
  --indigo-dark: #3730A3;
  --cyan: #00D4FF;
  --cyan-glow: rgba(0, 212, 255, 0.3);
  --white: #FFFFFF;
  --white-soft: rgba(255, 255, 255, 0.9);
  --white-muted: rgba(255, 255, 255, 0.7);
  --white-faint: rgba(255, 255, 255, 0.5);
  --white-ghost: rgba(255, 255, 255, 0.1);
  --white-ghost-2: rgba(255, 255, 255, 0.05);
  --gradient-hero: linear-gradient(135deg, #0A0F2C 0%, #1a1040 40%, #0d1a3a 70%, #0A0F2C 100%);
  --gradient-indigo: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
  --gradient-card: linear-gradient(145deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.02) 100%);
  --gradient-glow: radial-gradient(ellipse at center, rgba(79, 70, 229, 0.15) 0%, transparent 70%);
  --font-heading: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --section-padding: 120px 0;
  --container-width: 1200px;
  --container-padding: 0 24px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 40px rgba(79, 70, 229, 0.3);
  --shadow-cyan: 0 0 30px rgba(0, 212, 255, 0.15);
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;
  --transition-spring: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ===== RESET ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { font-family: var(--font-body); background: var(--midnight); color: var(--white); line-height: 1.7; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; border: none; outline: none; font-family: inherit; }
input, textarea { font-family: inherit; outline: none; border: none; }

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }
h4 { font-size: 1.125rem; }
p { color: var(--white-muted); line-height: 1.8; }

/* ===== CONTAINER / SECTION ===== */
.container { max-width: var(--container-width); margin: 0 auto; padding: var(--container-padding); }
.section { padding: var(--section-padding); position: relative; }
.section-badge { display: inline-flex; align-items: center; gap: 8px; padding: 8px 20px; border-radius: var(--radius-full); background: rgba(79, 70, 229, 0.12); border: 1px solid rgba(79, 70, 229, 0.25); color: var(--cyan); font-size: 0.85rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 20px; font-family: var(--font-heading); }

/* ===== BUTTONS ===== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 32px; border-radius: var(--radius-full); font-weight: 600; font-size: 0.95rem; transition: all var(--transition-base); font-family: var(--font-heading); letter-spacing: 0.01em; position: relative; overflow: hidden; }
.btn-primary { background: var(--gradient-indigo); color: var(--white); box-shadow: 0 4px 20px rgba(79, 70, 229, 0.4); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(79, 70, 229, 0.6); }
.btn-ghost { background: transparent; color: var(--white); border: 1.5px solid rgba(255, 255, 255, 0.3); }
.btn-ghost:hover { border-color: var(--cyan); color: var(--cyan); background: rgba(0, 212, 255, 0.05); }
.btn-icon { font-size: 1.1em; }

/* ===== GLASS CARD ===== */
.glass-card { background: var(--gradient-card); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: var(--radius-lg); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); transition: all var(--transition-base); }
.glass-card:hover { border-color: rgba(79, 70, 229, 0.3); transform: translateY(-4px); box-shadow: var(--shadow-glow); }

/* Project cards use .pcard — disable the lift so overflow:hidden on the viewport stays stable */
.pcard.glass-card { transition: border-color var(--transition-base), box-shadow var(--transition-base); }
.pcard.glass-card:hover { transform: none; border-color: rgba(79, 70, 229, 0.5); box-shadow: 0 0 60px rgba(79, 70, 229, 0.15); }


/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--midnight); }
::-webkit-scrollbar-thumb { background: var(--midnight-lighter); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--indigo); }

/* ===== STARS ===== */
.stars { display: flex; gap: 2px; color: #facc15; font-size: 1rem; }

/* ===== ACCENT TEXT ===== */
.accent { background: linear-gradient(90deg, #4F46E5, #00D4FF); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

/* ===== ANIMATIONS ===== */
@keyframes float { 0%, 100% { transform: translateY(0px); } 50% { transform: translateY(-10px); } }
@keyframes pulse-glow { 0%, 100% { opacity: 0.4; } 50% { opacity: 0.8; } }
@keyframes gradientShift { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
@keyframes spin-slow { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes scrollAnim { 0% { opacity: 1; top: 6px; } 100% { opacity: 0; top: 22px; } }
@keyframes partnersMarquee { 0% { transform: translateX(0); } 100% { transform: translateX(-33.333%); } }
@keyframes tickerMarquee { 0% { transform: translateX(0); } 100% { transform: translateX(-33.333%); } }

/* ===== PROJECT CARD — HOVER SCROLL MARQUEE ===== */
/*
 * .pcard__strip-wrap  — clips the scrolling strip inside the card viewport
 * .pcard__strip       — the tall column of images that scrolls upward
 * .pcard__shot        — each individual screenshot image
 *
 * The animation runs via CSS @keyframes (hardware-accelerated translate3d).
 * JS toggles .is-hovered on .pcard to set animation-play-state.
 */

/* Vertical infinite scroll keyframe — translate3d for GPU acceleration */
@keyframes pcardScrollUp {
  0%   { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(0, -50%, 0); }
}

/* Strip wrapper: fills the card viewport, clips overflow */
.pcard__strip-wrap {
  position: absolute;
  inset: 0;
  overflow: hidden;
  /* opacity transitions handled by Tailwind group-hover classes */
}

/* The scrolling column — tall enough that -50% lands back at the original seam */
.pcard__strip {
  display: flex;
  flex-direction: column;
  width: 100%;
  /* paused by default; JS sets running on hover */
  animation: pcardScrollUp 8s linear infinite;
  animation-play-state: paused;
  will-change: transform;
}

/* Each screenshot fills the card width with a fixed aspect ratio */
.pcard__shot {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  flex-shrink: 0;
  display: block;
  /* Tiny gap between frames creates a subtle "slide" feel */
  border-bottom: 2px solid rgba(10, 15, 44, 0.4);
}

/* Running state — toggled by JS via .is-hovered on the parent .pcard */
.pcard.is-hovered .pcard__strip {
  animation-play-state: running;
}

/* Cover image: shown by default, fades out on hover (Tailwind handles opacity via group-hover) */
.pcard__cover {
  will-change: opacity;
}

/* Graceful pause: on mouse-leave, strip decelerates smoothly instead of snapping */
.pcard__strip {
  transition: animation-play-state 0s;  /* instant toggle — CSS handles easing via keyframe */
}


/* AOS overrides for scroll reveal */
[data-aos] { transition-duration: 0.8s; }

/* ===== NAVBAR ===== */
.navbar { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; padding: 16px 0; transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); background: transparent; }
.navbar.scrolled { background: rgba(10, 15, 44, 0.92); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-bottom: 1px solid rgba(255, 255, 255, 0.06); padding: 10px 0; box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.nav-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.nav-logo-img { height: 40px; width: auto; object-fit: contain; }
.nav-logo-text { font-family: var(--font-heading); font-size: 1.35rem; font-weight: 700; color: var(--white); letter-spacing: -0.02em; }
.nav-logo-accent { background: linear-gradient(135deg, #4F46E5, #00D4FF); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.desktop-links { display: flex; align-items: center; gap: 32px; }
.nav-link { font-size: 0.9rem; font-weight: 500; color: var(--white-muted); transition: color var(--transition-fast); position: relative; white-space: nowrap; }
.nav-link::after { content: ''; position: absolute; bottom: -4px; left: 0; width: 0; height: 2px; background: var(--gradient-indigo); border-radius: 1px; transition: width var(--transition-base); }
.nav-link:hover, .nav-link.active { color: var(--white); }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }
.nav-cta { padding: 10px 24px; font-size: 0.85rem; flex-shrink: 0; }
.hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: none; padding: 8px; cursor: pointer; z-index: 1001; }
.hamburger span { display: block; width: 24px; height: 2px; background: var(--white); border-radius: 2px; transition: all var(--transition-base); }
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translateY(5px) translateX(5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translateY(-5px) translateX(5px); }
.mobile-menu { position: fixed; inset: 0; background: rgba(10, 15, 44, 0.98); backdrop-filter: blur(20px); display: none; flex-direction: column; align-items: center; justify-content: center; gap: 24px; z-index: 999; padding-top: 80px; }
.mobile-menu.open { display: flex; }
.mobile-link { font-family: var(--font-heading); font-size: 1.5rem; font-weight: 600; color: var(--white-muted); transition: color var(--transition-fast); }
.mobile-link:hover { color: var(--cyan); }

/* ===== FOOTER ===== */
.footer { background: linear-gradient(180deg, var(--midnight) 0%, #060920 100%); border-top: 1px solid rgba(255, 255, 255, 0.06); padding: 80px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 48px; padding-bottom: 60px; }
.footer-brand { display: flex; flex-direction: column; gap: 16px; }
.footer-logo { display: flex; align-items: center; gap: 10px; }
.footer-logo-img { height: 36px; width: auto; object-fit: contain; }
.footer-logo-text { font-family: var(--font-heading); font-size: 1.2rem; font-weight: 700; color: var(--white); }
.footer-logo-accent { background: linear-gradient(135deg, #4F46E5, #00D4FF); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.footer-tagline { color: var(--white-faint); font-size: 0.9rem; line-height: 1.6; }
.footer-socials { display: flex; gap: 12px; margin-top: 8px; }
.social-icon { width: 40px; height: 40px; border-radius: 10px; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.08); display: flex; align-items: center; justify-content: center; color: var(--white-muted); transition: all var(--transition-base); }
.social-icon:hover { background: var(--indigo); border-color: var(--indigo); color: var(--white); transform: translateY(-2px); }
.footer-col-title { font-family: var(--font-heading); font-size: 1rem; font-weight: 600; color: var(--white); margin-bottom: 20px; }
.footer-links { display: flex; flex-direction: column; gap: 12px; }
.footer-link { color: var(--white-faint); font-size: 0.9rem; transition: all var(--transition-fast); }
.footer-link:hover { color: var(--cyan); padding-left: 4px; }
.footer-contact-list { display: flex; flex-direction: column; gap: 16px; }
.footer-contact-list li { display: flex; flex-direction: column; gap: 2px; }
.contact-label { font-size: 0.75rem; color: var(--white-faint); text-transform: uppercase; letter-spacing: 0.05em; }
.contact-value { color: var(--white-muted); font-size: 0.9rem; transition: color var(--transition-fast); }
a.contact-value:hover { color: var(--cyan); }
.newsletter-col { display: flex; flex-direction: column; gap: 12px; }
.newsletter-text { color: var(--white-faint); font-size: 0.85rem; line-height: 1.6; }
.newsletter-form { display: flex; margin-top: 8px; border-radius: var(--radius-md); overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.1); background: rgba(255, 255, 255, 0.04); }
.newsletter-input { flex: 1; padding: 12px 16px; background: transparent; color: var(--white); font-size: 0.85rem; }
.newsletter-input::placeholder { color: var(--white-faint); }
.newsletter-btn { padding: 12px 20px; background: var(--gradient-indigo); color: var(--white); border: none; font-size: 1.1rem; font-weight: 600; cursor: pointer; transition: all var(--transition-fast); }
.newsletter-btn:hover { filter: brightness(1.2); }
.bottom-bar { border-top: 1px solid rgba(255, 255, 255, 0.06); padding: 24px 0; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.bottom-bar p { font-size: 0.8rem; color: var(--white-faint); }
.bottom-links { display: flex; align-items: center; gap: 12px; }
.bottom-links a { font-size: 0.8rem; color: var(--white-faint); transition: color var(--transition-fast); }
.bottom-links a:hover { color: var(--cyan); }
.bottom-divider { color: rgba(255, 255, 255, 0.15); font-size: 0.8rem; }

/* ===== PROJECT FILTER PILLS ===== */

/* Scrollable wrapper strips the native scrollbar */
.filter-pills-wrap { -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.filter-pills-wrap::-webkit-scrollbar { display: none; }

/* Individual pill */
.filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 20px;
    border-radius: 9999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.55);
    transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
    will-change: transform;
}

.filter-pill:hover {
    background: rgba(79, 70, 229, 0.12);
    border-color: rgba(79, 70, 229, 0.35);
    color: #fff;
    transform: translateY(-1px);
}

.filter-pill.active {
    background: linear-gradient(135deg, #4F46E5 0%, #6366F1 100%);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 20px rgba(79, 70, 229, 0.4);
    transform: translateY(-1px);
}

/* Animated dot inside each pill */
.filter-pill__dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.55;
    transition: opacity 0.25s ease, transform 0.25s ease;
    flex-shrink: 0;
}

.filter-pill.active .filter-pill__dot,
.filter-pill:hover .filter-pill__dot {
    opacity: 1;
    transform: scale(1.4);
}

/* Count badge */
.filter-pill__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.12);
    font-size: 0.65rem;
    font-weight: 700;
    color: inherit;
    line-height: 1;
    transition: background 0.25s ease;
}

.filter-pill.active .filter-pill__count {
    background: rgba(255, 255, 255, 0.25);
}

/* Hidden project cards (filtered out) */
.pf-hidden {
    display: none !important;
}

/* Fade-in animation for newly visible cards */
@keyframes pf-fade-in {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ===== PROJECT CARD — IMAGE SCROLL ON HOVER ===== */
/*
 * Container clips at a fixed height. Image is full-width, natural height.
 * On hover, translateY shifts the image up so you see the bottom — like
 * scrolling through a full-page screenshot.
 * calc(-100% + 280px) = moves up by exactly the overflow amount.
 */

.project-card-img-wrap {
    height: 280px;
    overflow: hidden;
    position: relative;
}

.project-card-img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 3s cubic-bezier(0.25, 0.1, 0.25, 1);
    will-change: transform;
}

/* On hover: slide image up so the bottom is visible */
.project-card-item:hover .project-card-img {
    transform: translateY(calc(-100% + 280px));
}

/* Subtle border glow on hover */
.project-card-item:hover {
    border-color: rgba(79, 70, 229, 0.5);
    box-shadow: 0 0 40px rgba(79, 70, 229, 0.1);
}

@media (max-width: 768px) {
    .project-card-img-wrap {
        height: 220px;
    }
    .project-card-item:hover .project-card-img {
        transform: translateY(calc(-100% + 220px));
    }
}

