/* ==========================================================================
   Viraglobal - Premium Corporate Website
   Design System & Base Styles
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Inter:wght@400;500;600;700&display=swap');

:root {
  /* Color Palette */
  --bg-primary: #FAFAFA;
  --text-main: #111827;
  --text-muted: #4B5563;
  --accent-primary: #0F172A;
  --accent-secondary: #0D9488;
  --accent-secondary-hover: #0F766E;
  --surface-card: #FFFFFF;
  --border-light: #E5E7EB;

  /* Typography */
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: 'Instrument Serif', Georgia, serif;

  /* Spacing Grid (8pt system) */
  --space-1: 0.5rem;   /* 8px  */
  --space-2: 1rem;     /* 16px */
  --space-3: 1.5rem;   /* 24px */
  --space-4: 2rem;     /* 32px */
  --space-6: 3rem;     /* 48px */
  --space-8: 4rem;     /* 64px */
  --space-12: 6rem;    /* 96px */
  --space-16: 8rem;    /* 128px */

  /* Shadows - Layered & Diffuse */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025);
  --shadow-card-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.02);

  /* Transitions */
  --transition-bezier: cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: 150ms var(--transition-bezier);
  --transition-normal: 300ms var(--transition-bezier);
}

/* Base Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, video {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

/* Layout Utilities */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-3);
}

@media (min-width: 768px) {
  .container {
    padding: 0 var(--space-6);
  }
}

.section {
  padding: var(--space-12) 0;
}

/* Typography Scales */
h1, h2, h3, h4, h5, h6 {
  font-weight: 500;
  line-height: 1.1;
  color: var(--accent-primary);
}

.display-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 5vw + 1rem, 5.5rem);
  letter-spacing: -0.02em;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3vw + 1rem, 3.5rem);
  margin-bottom: var(--space-4);
}

.kicker {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  color: var(--accent-secondary);
  display: block;
  margin-bottom: var(--space-1);
}

.body-large {
  font-size: clamp(1.125rem, 1vw + 0.5rem, 1.375rem);
  color: var(--text-muted);
  max-width: 60ch;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 1.75rem;
  font-weight: 500;
  font-size: 1rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all var(--transition-normal);
  border: none;
}

.btn-primary {
  background-color: var(--accent-secondary);
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  background-color: var(--accent-secondary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background-color: transparent;
  color: var(--accent-primary);
  border: 1px solid var(--border-light);
}

.btn-secondary:hover {
  background-color: var(--surface-card);
  border-color: var(--accent-primary);
  transform: translateY(-2px);
}

.text-link {
  font-weight: 500;
  color: var(--accent-primary);
  position: relative;
  display: inline-block;
}

.text-link::after {
  content: '';
  position: absolute;
  width: 100%;
  transform: scaleX(0);
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--accent-secondary);
  transform-origin: bottom right;
  transition: transform 0.25s ease-out;
}

.text-link:hover::after {
  transform: scaleX(1);
  transform-origin: bottom left;
}

/* Navigation - Glassmorphism */
.site-nav {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  background-color: rgba(250, 250, 250, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(229, 231, 235, 0.5);
  transition: padding var(--transition-normal);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}

.logo-container {
  display: flex;
  align-items: center;
}

.logo-container img {
  height: 48px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: var(--space-4);
  align-items: center;
}

.nav-link {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-main);
  transition: color var(--transition-fast);
}

.nav-link:hover {
  color: var(--accent-secondary);
}

@media (max-width: 768px) {
  .nav-links {
    display: none; /* Add mobile menu later */
  }
}

/* Hero Section */
.hero {
  padding-top: calc(80px + var(--space-8));
  padding-bottom: var(--space-8);
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  align-items: center;
}

@media (min-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1.1fr 0.9fr;
    gap: var(--space-8);
  }
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  z-index: 2;
}

.hero-actions {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-2);
  flex-wrap: wrap;
}

/* Organic Video Container */
.hero-media {
  position: relative;
  width: 100%;
  aspect-ratio: 4/5;
  border-radius: 12rem 4rem 14rem 6rem; /* Architectural Squircle */
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background-color: var(--accent-primary);
  transform: translateZ(0); /* Force hardware accel for smooth edges */
}

@media (min-width: 1024px) {
  .hero-media {
    height: 600px;
  }
}

.hero-media video,
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.9;
}

.hero-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top right, rgba(15, 23, 42, 0.4), transparent);
  pointer-events: none;
}

/* Horizontal Scroll Section */
.horizontal-scroll-trigger {
  height: 300vh; /* Creates scrollable space */
  position: relative;
  background-color: var(--bg-primary);
}

.sticky-viewport {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.horizontal-track {
  display: flex;
  height: 100%;
  align-items: center;
  padding-left: var(--space-6);
  padding-right: 50vw; /* buffer at end */
  gap: var(--space-6);
  /* JS will translate this */
  will-change: transform;
}

@media (max-width: 1024px) {
  /* On mobile, fallback to vertical stack */
  .horizontal-scroll-trigger { height: auto; padding: var(--space-8) 0; }
  .sticky-viewport { position: relative; height: auto; overflow: visible; display: block; }
  .horizontal-track { flex-direction: column; transform: none !important; padding: 0 var(--space-3); width: 100%; }
}

.h-card {
  flex-shrink: 0;
  width: 85vw;
  max-width: 500px;
}

@media (max-width: 1024px) {
  .h-card { width: 100%; max-width: 100%; }
}

.text-card {
  padding-right: var(--space-4);
}

.service-card {
  background: var(--surface-card);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-normal), transform var(--transition-normal);
  display: flex;
  flex-direction: column;
  height: 480px;
}

@media (max-width: 1024px) {
  .service-card { height: auto; }
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}

.service-kicker {
  font-family: var(--font-display);
  font-size: 3rem;
  color: var(--border-light);
  line-height: 1;
  margin-bottom: var(--space-2);
}

.check-list {
  margin-top: auto;
  padding-top: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.check-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.check-list svg {
  flex-shrink: 0;
  margin-top: 2px;
}

.scroll-instruction {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--accent-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
}

@media (max-width: 1024px) {
  .scroll-instruction { display: none; }
}

/* EdTech Section */
.bg-dark { background-color: var(--accent-primary); }
.text-light { color: #F8FAFC; }
.text-gray-400 { color: #94A3B8; }

.edtech-section {
  padding-top: var(--space-12);
  padding-bottom: var(--space-12);
}

.edtech-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto var(--space-8);
}

.saas-ui-container {
  display: grid;
  grid-template-columns: 280px 1fr;
  background: #1E293B; /* Slightly lighter than accent-primary */
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.1);
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  min-height: 600px;
}

@media (max-width: 1024px) {
  .saas-ui-container { grid-template-columns: 1fr; }
  .saas-sidebar { display: none; }
}

.saas-sidebar {
  background: #0F172A;
  border-right: 1px solid rgba(255,255,255,0.05);
  display: flex;
  flex-direction: column;
}

.saas-logo {
  padding: var(--space-4);
  color: white;
  font-weight: 700;
  font-size: 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.saas-logo span { color: var(--accent-secondary); }

.saas-nav {
  padding: var(--space-4) 0;
  flex-grow: 1;
}

.saas-nav-item {
  padding: var(--space-2) var(--space-4);
  color: #94A3B8;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  border-left: 3px solid transparent;
}

.saas-nav-item:hover {
  color: white;
  background: rgba(255,255,255,0.02);
}

.saas-nav-item.active {
  color: white;
  background: rgba(13, 148, 136, 0.1);
  border-left-color: var(--accent-secondary);
}

.saas-upgrade {
  padding: var(--space-4);
  border-top: 1px solid rgba(255,255,255,0.05);
  color: #94A3B8;
  font-size: 0.75rem;
}

.progress-bar {
  height: 4px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  margin-top: var(--space-1);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 85%;
  background: var(--accent-secondary);
}

.saas-main { display: flex; flex-direction: column; }

.saas-topbar {
  height: 70px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 var(--space-4);
}

.saas-search {
  color: #64748B;
  font-size: 0.875rem;
  background: rgba(255,255,255,0.03);
  padding: 0.5rem 1rem;
  border-radius: 4px;
  width: 300px;
}

.saas-profile {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--accent-secondary);
}

.saas-content {
  padding: var(--space-4);
  color: white;
}

.saas-content h3 { color: white; margin-bottom: var(--space-3); }

.saas-video-placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  background: #334155;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-4);
}

.saas-modules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-3);
}

.saas-module-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px;
  padding: var(--space-3);
}

.saas-module-card h4 { color: white; font-size: 0.875rem; margin-bottom: 0.25rem; }
.saas-module-card span { color: var(--accent-secondary); font-size: 0.75rem; }
.saas-module-card.disabled span { color: #64748B; }

/* CTA Section */
.cta-section {
  background-color: var(--bg-primary);
  text-align: center;
  padding: var(--space-12) var(--space-4);
}
.cta-container { max-width: 800px; margin: 0 auto; }

/* Footer */
.site-footer {
  background-color: var(--bg-primary);
  border-top: 1px solid var(--border-light);
  padding: var(--space-8) 0 var(--space-4);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-6);
  margin-bottom: var(--space-8);
}

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr; }
}

.footer-brand img {
  height: 60px; /* Increased for new logo */
  width: auto;
  margin-bottom: var(--space-2);
}

.footer-brand p {
  color: var(--text-muted);
  max-width: 300px;
}

.footer-links h4, .footer-contact h4 {
  margin-bottom: var(--space-3);
  color: var(--text-main);
  font-weight: 600;
}

.footer-links { display: flex; flex-direction: column; gap: var(--space-2); }
.footer-contact p { color: var(--text-muted); margin-bottom: var(--space-1); }

.footer-bottom {
  border-top: 1px solid var(--border-light);
  padding-top: var(--space-4);
  display: flex;
  justify-content: space-between;
  color: #9CA3AF;
  font-size: 0.875rem;
}

/* ==========================================================================
   NEW COMPONENTS: DNA, PORTFOLIO, PACKAGES, MODAL
   ========================================================================== */

/* Founder's DNA Section */
.about {
    padding: var(--space-16) 0;
    background: linear-gradient(160deg, #F8FAFC 0%, var(--bg-primary) 100%);
    position: relative;
    overflow: hidden;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
    align-items: center;
}

@media (max-width: 992px) {
    .about-grid { grid-template-columns: 1fr; }
}

.about-text h2 {
    margin-bottom: var(--space-4);
}

.about-lead {
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: var(--space-2);
}

.about-lead strong { color: var(--accent-secondary); }

.about-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: var(--space-4) 0;
}

.tag {
    background: rgba(13, 148, 136, 0.08);
    color: var(--accent-secondary);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid rgba(13, 148, 136, 0.2);
}

.biocard {
    background: white;
    padding: var(--space-6);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    text-align: center;
    border: 1px solid var(--border-light);
}

.biocard-avatar {
    width: 100px;
    height: 100px;
    background: var(--accent-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 2rem;
    margin: 0 auto var(--space-4);
}

.biocard-credentials {
    text-align: left;
    margin: var(--space-4) 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.credential {
    display: flex;
    gap: var(--space-2);
    font-size: 0.9rem;
}

.biocard-link {
    display: inline-block;
    margin-top: var(--space-4);
    color: var(--accent-secondary);
    font-weight: 600;
    text-decoration: underline;
}

/* Portfolio Masonry */
.portfolio {
    padding: var(--space-16) 0;
}

.portfolio-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: var(--space-8);
}

.filter-btn {
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    border: 1px solid var(--border-light);
    background: white;
    cursor: pointer;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.filter-btn.active, .filter-btn:hover {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--space-4);
}

.portfolio-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 4/3;
    box-shadow: var(--shadow-md);
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.portfolio-item:hover img {
    transform: scale(1.05);
}

.portfolio-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.9), transparent);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: var(--space-4);
    opacity: 0;
    transition: opacity 0.3s ease;
    color: white;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

/* Consultation Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: var(--space-8);
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    position: relative;
    box-shadow: var(--shadow-lg);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1.25rem;
    font-size: 1.5rem;
    cursor: pointer;
    background: none;
    border: none;
}

.modal-content h3 {
    font-family: var(--font-display);
    font-size: 2rem;
    margin-bottom: var(--space-2);
}

.modal-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    margin-top: var(--space-4);
}

.modal-form input, .modal-form select, .modal-form textarea {
    padding: 0.75rem;
    border: 1px solid var(--border-light);
    border-radius: 4px;
    font-family: inherit;
}

/* Animations */
[data-reveal] {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

[data-reveal].revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Industry Section */
.bg-light { background-color: #F1F5F9; }
.industry-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; margin-top: 3rem; }
.industry-tag { padding: 0.75rem 1.5rem; background: white; border: 1px solid var(--border-light); border-radius: 50px; font-weight: 500; color: var(--accent-primary); transition: all 0.3s ease; }
.industry-tag:hover { border-color: var(--accent-secondary); color: var(--accent-secondary); transform: translateY(-2px); box-shadow: var(--shadow-md); }

/* What We Do Cards */
.wwd-card { background: white; padding: var(--space-8); border-radius: 12px; border: 1px solid var(--border-light); transition: transform 0.3s ease; }
.wwd-card:hover { transform: translateY(-5px); }

/* Package Enhancements */
.popular-tag { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--accent-secondary); color: white; padding: 0.25rem 1rem; border-radius: 20px; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }

/* EdTech Dashboard */
.edtech-dashboard { background: #1E293B; border-radius: 16px; border: 1px solid rgba(255,255,255,0.1); overflow: hidden; margin-top: 4rem; box-shadow: var(--shadow-lg); }
.dashboard-header { padding: 2rem; border-bottom: 1px solid rgba(255,255,255,0.05); text-align: center; }
.dashboard-header h3 { color: white; margin-bottom: 0.5rem; }
.dashboard-header p { color: #94A3B8; font-size: 0.9rem; }
.dashboard-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 2rem; padding: 2rem; }
@media (max-width: 992px) { .dashboard-grid { grid-template-columns: 1fr; } }
.control-group { margin-bottom: 2rem; }
.control-group label { display: block; color: #64748B; font-size: 0.8rem; text-transform: uppercase; font-weight: 600; margin-bottom: 1rem; }
.toggle-group { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.toggle-btn { padding: 0.6rem 1.2rem; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.1); color: #94A3B8; border-radius: 8px; cursor: pointer; transition: all 0.2s ease; font-size: 0.875rem; }
.toggle-btn:hover { border-color: var(--accent-secondary); color: white; }
.toggle-btn.active { background: var(--accent-secondary); color: white; border-color: var(--accent-secondary); box-shadow: 0 0 15px rgba(13, 148, 136, 0.4); }
.summary-card { background: rgba(15, 23, 42, 0.5); padding: 2rem; border-radius: 12px; border: 1px solid rgba(255,255,255,0.05); height: 100%; }
.summary-card h4 { color: white; margin-bottom: 1.5rem; text-align: center; }
.estimate-bar { height: 8px; background: rgba(255,255,255,0.1); border-radius: 4px; margin: 1rem 0; position: relative; overflow: hidden; }
.estimate-bar::after { content: ''; position: absolute; left: 0; top: 0; height: 100%; width: 60%; background: var(--accent-secondary); transition: width 0.5s ease; }
.estimate-note { font-size: 0.75rem; color: #64748B; text-align: center; }
.edtech-bottom-overlay { height: 100px; background: #0F172A; margin-top: -50px; position: relative; z-index: 1; }

/* Client Grid */
.client-grid { display: flex; justify-content: center; align-items: center; gap: 4rem; padding: 2rem 0; opacity: 0.7; filter: grayscale(1); transition: all 0.3s ease; }
.client-grid:hover { filter: grayscale(0); opacity: 1; }
.client-logo img { height: 60px; width: auto; object-fit: contain; }

/* Lightbox Modal */
.lightbox-overlay { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.95); backdrop-filter: blur(8px); z-index: 2000; display: none; align-items: center; justify-content: center; }
.lightbox-content { width: 70%; max-height: 85vh; border-radius: 12px; overflow: hidden; box-shadow: 0 0 50px rgba(0,0,0,0.5); }
.lightbox-content img { width: 100%; height: 100%; object-fit: contain; }
.lightbox-close { position: absolute; top: 2rem; right: 2rem; font-size: 3rem; color: white; background: none; border: none; cursor: pointer; transition: transform 0.2s ease; }
.lightbox-close:hover { transform: scale(1.1); }

/* Final Refinements & Engagement */

/* Global Hammer Cursor */
html, body, a, button, .portfolio-item-slide {
  cursor: url('../images/hammer_cursor.svg') 16 16, auto !important;
}

/* Portfolio Slider */
.portfolio-slider-container {
  width: 100%;
  overflow-x: auto;
  padding: 2rem 0;
  scroll-snap-type: x mandatory;
  scrollbar-width: none; /* Firefox */
}
.portfolio-slider-container::-webkit-scrollbar { display: none; }

.portfolio-slider {
  display: flex;
  gap: 2rem;
  padding: 0 2rem;
}

.portfolio-item-slide {
  flex: 0 0 400px;
  height: 300px;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  scroll-snap-align: center;
  transition: transform 0.3s ease, filter 0.3s ease;
  box-shadow: var(--shadow-lg);
}

.portfolio-item-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.portfolio-item-slide:hover {
  transform: scale(1.05);
  z-index: 10;
}

/* Lightbox Dimming Effect */
body.lightbox-active .portfolio-slider-container,
body.lightbox-active main > section:not(.lightbox-overlay) {
  filter: blur(5px) grayscale(0.5);
  opacity: 0.5;
  transition: all 0.5s ease;
}

/* Package Symmetry Fixes */
.saas-modules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  align-items: stretch;
}

.service-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 550px;
  justify-content: space-between;
}

.service-card .btn {
  margin-top: auto;
  width: 100%;
}

/* Digital Mole Game */
#moleGameArea {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0;
  pointer-events: none;
  z-index: 9999;
}

.mole-hole {
  position: absolute;
  width: 80px;
  height: 20px;
  background: rgba(0,0,0,0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.digital-mole {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) translateY(100%);
  width: 60px;
  height: 60px;
  background: url('../images/mole_digital.svg') no-repeat center;
  background-size: contain;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  pointer-events: auto;
  cursor: inherit;
}

.digital-mole.up {
  transform: translateX(-50%) translateY(-40px);
}

.digital-mole.squashed {
  transform: translateX(-50%) translateY(0) scaleY(0.1);
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s ease-out;
}

/* Mole Game Refinement */
.digital-mole { background: url('../images/cartoon_mole.svg') no-repeat center; background-size: contain; }

.mole-bubble { 
  position: absolute; 
  top: -120px !important; /* High above the head */
  left: 50%; 
  transform: translateX(-50%); 
  background: white; 
  color: var(--accent-primary); 
  padding: 0.4rem 1rem; 
  border-radius: 20px; 
  font-size: 0.85rem; 
  font-weight: 700; 
  border: 1px solid var(--border-light); 
  white-space: nowrap; 
  pointer-events: none; 
  opacity: 0; 
  transition: opacity 0.3s ease; 
}
.digital-mole.up + .mole-bubble { opacity: 1; }

.hit-word { position: absolute; top: -20px; left: 50%; transform: translateX(-50%); color: var(--accent-secondary); font-weight: 700; font-size: 1rem; pointer-events: none; animation: floatUp 1.5s forwards ease-out; }

@keyframes floatUp {
  0% { transform: translate(-50%, 0); opacity: 1; }
  100% { transform: translate(-50%, -100px); opacity: 0; }
}

/* Hammer Hit Animation */
body.hammer-hit, body.hammer-hit * {
  cursor: url('../images/hammer_whack.svg') 16 28, auto !important;
  transition: transform 0.1s ease-in;
}

/* Phase 3 Gallery Slider - Cover Flow & Engagement */

.portfolio-slider-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 600px;
  perspective: 1000px;
  overflow: visible;
}

.portfolio-slider {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  transform-style: preserve-3d;
}

.portfolio-item-slide {
  position: absolute;
  width: 450px;
  height: 300px;
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 0;
  pointer-events: none;
  z-index: 0;
}

.portfolio-item-slide.active {
  opacity: 1;
  transform: translate3d(0, 0, 150px);
  z-index: 100;
  pointer-events: auto;
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.portfolio-item-slide.prev-1 {
  opacity: 0.6;
  transform: translate3d(-350px, 0, 0) scale(0.85);
  z-index: 50;
  filter: blur(2px) grayscale(0.3);
  pointer-events: auto;
}

.portfolio-item-slide.next-1 {
  opacity: 0.6;
  transform: translate3d(350px, 0, 0) scale(0.85);
  z-index: 50;
  filter: blur(2px) grayscale(0.3);
  pointer-events: auto;
}

.portfolio-item-slide.prev-2 {
  opacity: 0.3;
  transform: translate3d(-600px, 0, -100px) scale(0.7);
  z-index: 20;
  filter: blur(4px) grayscale(0.6);
}

.portfolio-item-slide.next-2 {
  opacity: 0.3;
  transform: translate3d(600px, 0, -100px) scale(0.7);
  z-index: 20;
  filter: blur(4px) grayscale(0.6);
}

/* Slider Arrows */
.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 200;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  border-radius: 50%;
  width: 60px;
  height: 60px;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer !important;
  transition: all 0.3s ease;
}

.slider-arrow:hover {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  box-shadow: 0 0 20px rgba(13, 148, 136, 0.4);
}

.slider-arrow.prev { left: 5%; }
.slider-arrow.next { right: 5%; }

/* Mole Safe Area */
.mole-game-safe-zone {
  position: fixed;
  top: 15vh;
  bottom: 15vh;
  left: 10vw;
  right: 10vw;
  pointer-events: none;
  z-index: 999;
  background: rgba(0,0,0,0.02); /* Very subtle to help user see boundaries if needed, or keeping it plain as requested */
  border-radius: 40px;
}
