/* Modern styling for Dataveli - Digital Services Agency */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;1,9..40,400&display=swap');

/* Root variables */
:root { --primary: #3DB39E; --primary-dark: #203A4D; --primary-light: #60a5fa; --secondary: #0ea5e9; --dark: #111827; --light: #f9fafb; --gray: #6b7280; --gray-light: #e5e7eb; --success: #10b981; --warning: #f59e0b; --danger: #ef4444; --gradient: linear-gradient(135deg, var(--primary), var(--secondary)); --accent: #F6C7B6; --bg-custom: #F9F8F5; --gray-custom: #6E7E8B; --font-heading: 'Space Grotesk', system-ui, sans-serif; }

/* Base styles */
*, *::before, *::after { box-sizing: border-box !important; }
html, body { max-width: 100%; overflow-x: hidden !important; height: 100%; margin: 0; width: 100% !important; position: relative; }
html { scroll-padding-top: 100px; scroll-behavior: smooth; }
body { font-family: 'DM Sans', 'Inter', system-ui, -apple-system, sans-serif; line-height: 1.6; margin: 0; padding: 0; color: var(--dark); background: linear-gradient(155deg, #06111b 0%, #0c1d2c 45%, #0f2235 75%, #091820 100%) !important; display: flex; flex-direction: column; }

/* Typography */
h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); font-weight: 700; line-height: 1.05; letter-spacing: -0.025em; margin-bottom: 1rem; }
h1 { font-size: clamp(1.75rem, 3.8vw, 2.8rem); }
h2 { font-size: clamp(1.25rem, 2.2vw, 1.75rem); }
h3 { font-size: clamp(1rem, 1.4vw, 1.2rem); }
p { margin-bottom: 1.5rem; color: var(--gray); }

/* Utility classes */
.container { max-width: 100%; margin: 0 auto; padding: 0 2rem; box-sizing: border-box; }
.text-center { text-align: center; }
.my-4 { margin-top: 1rem; margin-bottom: 1rem; }
.mt-8 { margin-top: 2rem; }
.animate-fade-in { animation: fadeIn 0.5s ease forwards; }
.golden-ratio-margin { margin-top: 1.618em; }

/* Color & Typography Utility Classes */
.text-primary { color: var(--primary); }
.bg-primary { background-color: var(--primary); }
.text-dark { color: var(--primary-dark); }
.bg-dark { background-color: var(--primary-dark); }
.text-accent { color: var(--accent); }
.bg-accent { background-color: var(--accent); }
.text-bg-custom { color: var(--bg-custom); }
.bg-bg-custom { background-color: var(--bg-custom); }
.text-gray-custom { color: var(--gray-custom); }
.bg-gray-custom { background-color: var(--gray-custom); }
.font-heading { font-family: var(--font-heading); }
.font-body    { font-family: 'DM Sans', 'Inter', system-ui, sans-serif; }
.font-poppins { font-family: var(--font-heading); } /* legacy alias */
.font-nunito  { font-family: 'DM Sans', 'Inter', system-ui, sans-serif; } /* legacy alias */

/* Text style classes */
.h1 { font-family: var(--font-heading); font-weight: 700; font-size: clamp(1.75rem, 3.8vw, 2.8rem); line-height: 1.05; letter-spacing: -0.03em; color: var(--primary-dark); }
.h2 { font-family: var(--font-heading); font-weight: 700; font-size: clamp(1.25rem, 2.2vw, 1.75rem); line-height: 1.05; letter-spacing: -0.025em; color: var(--primary-dark); }
.body-text { font-family: 'DM Sans', 'Inter', system-ui, sans-serif; font-size: 1rem; line-height: 1.6; color: var(--gray-custom); }
.label { font-family: 'DM Sans', 'Inter', system-ui, sans-serif; font-size: 1rem; font-weight: 600; color: var(--primary-dark); }

/* Sidebar Navigation */
.site-sidebar { position: fixed; top: 0; left: 0; bottom: 0; width: 240px; background-color: rgba(10, 20, 34, 0.10); backdrop-filter: blur(3px) saturate(120%); -webkit-backdrop-filter: blur(3px) saturate(120%); border-right: 1px solid rgba(255,255,255,0.07); z-index: 100; display: flex; flex-direction: column; }
.sidebar-inner { display: flex; flex-direction: column; height: 100%; padding: 2rem 1.5rem; overflow-y: auto; }
.sidebar-logo { margin-bottom: 2.5rem; flex-shrink: 0; }
.sidebar-logo a { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; color: white; }
.sidebar-logo-img { width: 44px; height: 44px; object-fit: contain; border-radius: 6px; }
.sidebar-logo-text { font-family: var(--font-heading); font-size: 1.4rem; font-weight: 700; color: white; letter-spacing: -0.02em; }
.sidebar-nav { display: flex; flex-direction: column; gap: 0.25rem; flex: 1; }
.sidebar-link { display: flex; align-items: center; gap: 0.75rem; color: rgba(255,255,255,0.62); text-decoration: none; padding: 0.7rem 0.875rem; border-radius: 0.5rem; font-size: 0.95rem; font-weight: 500; transition: all 0.2s ease; }
.sidebar-link:hover, .sidebar-link.active { color: white; background: rgba(255,255,255,0.1); }
.sidebar-link svg { width: 18px; height: 18px; flex-shrink: 0; }
.sidebar-cta { margin-top: 1.75rem; }
.sidebar-cta .btn { display: block; text-align: center; background: var(--primary); font-size: 0.9rem; padding: 0.65rem 1rem; }
.sidebar-cta .btn:hover { background-color: var(--primary-dark); }
.sidebar-footer-info { margin-top: auto; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,0.1); font-size: 0.8rem; }
.sidebar-footer-info p { margin: 0 0 0.25rem; color: rgba(255,255,255,0.38); }
.sidebar-footer-info a { color: rgba(255,255,255,0.55); text-decoration: none; transition: color 0.2s; }
.sidebar-footer-info a:hover { color: var(--primary); }
.sidebar-toggle { display: none; position: fixed; top: 1rem; left: 1rem; z-index: 200; background: rgba(32,58,77,0.92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: none; color: white; padding: 0.6rem; border-radius: 0.5rem; cursor: pointer; align-items: center; justify-content: center; }
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 99; backdrop-filter: blur(2px); }
@media (max-width: 900px) { .site-sidebar { transform: translateX(-100%); transition: transform 0.3s ease; } .site-sidebar.open { transform: translateX(0); } .sidebar-toggle { display: flex; } .sidebar-overlay.visible { display: block; } .main-wrapper { margin-left: 0 !important; } }

/* Main wrapper */
.main-wrapper { margin-left: 240px; min-height: 100vh; display: flex; flex-direction: column; }
main.parallax-section { flex: 1; overflow-y: visible; overflow-x: hidden; scrollbar-width: thin; max-width: 100%; }

/* Full-screen logo scene — inside hero, bleeds left behind frosted sidebar */
.logo-scene { position: absolute; top: 0; left: -240px; right: 0; bottom: 0; pointer-events: none; z-index: 1; overflow: visible; }
.logo-scene__img { position: absolute; bottom: 0; left: 50%; height: 92vh; width: auto; opacity: 0.09; filter: drop-shadow(0 0 80px rgba(61, 179, 158, 0.2)); transform-origin: bottom center; transform: translateX(-42%) perspective(1400px) rotateY(-12deg); animation: logoFloat 9s ease-in-out infinite; will-change: transform, opacity; }
@keyframes logoFloat { 0%, 100% { transform: translateX(-42%) perspective(1400px) rotateY(-12deg) translateY(0); opacity: 0.09; } 50% { transform: translateX(-42%) perspective(1400px) rotateY(-9deg) translateY(-16px); opacity: 0.115; } }
.hero { overflow: visible !important; }
.hero .scene { position: relative; z-index: 2; }

/* Parallax sections */
.parallax-section { background-image: url('assets/img/hero-bg.webp'); background-size: cover; background-position: center; background-attachment: fixed; }
.parallax-section > section.bg-gray-50, .parallax-section > section.bg-primary, .parallax-section > section.bg-bg-custom { position: relative; z-index: 2; }
.parallax-section::after { content: ""; display: block; height: 1px; }
.parallax-layer { position: absolute; top: 0; right: 0; bottom: 0; left: 0; }
.parallax-bg { transform: translateZ(-1px) scale(2); }
.parallax-content { transform: translateZ(0); z-index: 2; }

/* Hero Section */
.hero { position: relative; min-height: 150vh; display: flex; align-items: center; justify-content: center; transform-style: preserve-3d; z-index: 1; overflow: hidden; }
.hero > div { position: relative; z-index: 2; }
.hero .bg-layer { position: absolute; top: 0; right: 0; bottom: 0; left: 0; transform: translateZ(-1px) scale(1.2); z-index: -1; background-position: center; background-size: contain; background-repeat: no-repeat; background-attachment: scroll; width: 100%; height: 100%; }
.hero-content { display: flex; justify-content: center; align-items: center; min-height: 80vh; padding: 3rem 1rem; transform: translateZ(0); z-index: 2; }
.hero-overlay { background-color: rgba(0, 0, 0, 0.5); padding: 2.5rem 3rem; border-radius: 0.75rem; display: inline-block; max-width: 90%; margin: 2rem auto; box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3); }
.hero-overlay h1 { margin-bottom: 1.5rem; line-height: 1.2; text-shadow: 0px 2px 4px rgba(0, 0, 0, 0.5); }
.hero-overlay p { margin-bottom: 2rem; text-shadow: 0px 2px 3px rgba(0, 0, 0, 0.4); }
.hero-overlay .btn { padding: 0.875rem 2rem; font-weight: 600; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); border: 2px solid transparent; transition: all 0.3s ease; }
.hero-overlay .btn:hover { transform: translateY(-2px); box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15); }

/* Card Styling */
.card { background: white; border-radius: 0.75rem; box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1); overflow: hidden; transition: transform 0.3s ease, box-shadow 0.3s ease; }
.card:hover { transform: translateY(-5px); box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); }

/* Buttons */
.btn { display: inline-block; background-color: var(--primary); color: white; padding: 0.75rem 1.5rem; border-radius: 0.375rem; font-weight: 500; text-decoration: none; transition: all 0.3s ease; border: none; cursor: pointer; text-align: center; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); position: relative; overflow: hidden; }
.btn:hover { background-color: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1); }
.btn:active { transform: translateY(1px); }
.btn-secondary { background-color: var(--secondary); }
.btn-secondary:hover { background-color: #0284c7; }
.btn-outline { background-color: transparent; border: 2px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background-color: var(--primary); color: white; }

/* Services Section */
.services { padding: 5rem 0; }
.service-card { padding: 2rem; height: 100%; display: flex; flex-direction: column; justify-content: space-between; }
.service-icon { font-size: 2.5rem; margin-bottom: 1rem; color: var(--primary); }
#services .bg-white { background: linear-gradient(145deg, #ffffff, #f5f7fa); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(61, 179, 158, 0.1); border-radius: 16px; border: 1px solid rgba(255, 255, 255, 0.8); overflow: hidden; position: relative; z-index: 1; transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
#services .grid + .grid { margin-top: 1.618em !important; }
#services .bg-white::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 6px; background: linear-gradient(90deg, var(--primary), var(--secondary)); z-index: 0; opacity: 0.7; transition: height 0.4s ease-out; }
#services .bg-white:hover { transform: translateY(-8px); box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1), 0 5px 10px rgba(61, 179, 158, 0.2); }
#services .bg-white:hover::before { height: 8px; }
#services .bg-primary.bg-opacity-10 { background: radial-gradient(circle, rgba(61, 179, 158, 0.2) 0%, rgba(61, 179, 158, 0.05) 70%); box-shadow: 0 10px 25px -5px rgba(61, 179, 158, 0.25); border: 1px solid rgba(61, 179, 158, 0.1); transition: all 0.5s ease; position: relative; overflow: hidden; }
#services .h-8.w-8.text-primary { filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2)); transition: all 0.5s ease; animation: iconFloat 3s ease-in-out infinite; }
#services .bg-white:hover .bg-primary.bg-opacity-10 { transform: scale(1.05); background: radial-gradient(circle, rgba(61, 179, 158, 0.25) 0%, rgba(61, 179, 158, 0.1) 70%); box-shadow: 0 10px 30px -5px rgba(61, 179, 158, 0.4); }
#services .bg-white:hover .h-8.w-8.text-primary { transform: rotate(10deg) scale(1.1); filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3)); }
#services .h-5.w-5.text-primary { transition: all 0.3s ease; animation: checkmarkPulse 2s ease-in-out infinite; animation-delay: calc(var(--animation-order, 0) * 0.2s); filter: drop-shadow(0 1px 2px rgba(61, 179, 158, 0.3)); }
#services li:nth-child(1) .h-5.w-5 { --animation-order: 1; }
#services li:nth-child(2) .h-5.w-5 { --animation-order: 2; }
#services li:nth-child(3) .h-5.w-5 { --animation-order: 3; }
#services h3 { position: relative; transition: all 0.3s ease; }
#services .bg-white:hover h3 { transform: translateX(3px); color: var(--primary); }
#services ul li { transition: all 0.3s ease; padding: 0.25rem 0; }
#services ul li:hover { transform: translateX(3px); color: var(--dark); }
#services .bg-white::after { content: ''; position: absolute; top: 50%; left: 50%; width: 120%; height: 120%; background: radial-gradient(circle, rgba(61, 179, 158, 0.15) 0%, transparent 70%); transform: translate(-50%, -50%) scale(0); opacity: 0; z-index: -1; transition: transform 1s ease, opacity 1s ease; }
#services .bg-white:hover::after { transform: translate(-50%, -50%) scale(1); opacity: 1; }
#services.bg-bg-custom { background-image: linear-gradient(rgba(249, 248, 245, 0.9), rgba(249, 248, 245, 0.9)), url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%233db39e' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"); }

/* About Section */
#about { background: linear-gradient(135deg, rgba(249, 248, 245, 0.9), rgba(242, 240, 235, 0.95), rgba(61, 179, 158, 0.08)); position: relative; z-index: 1; overflow: hidden; }
#about::before { content: ""; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%233db39e' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"); z-index: -1; opacity: 0.4; pointer-events: none; }
#about .bg-white { box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.02); transition: all 0.3s ease; }
#about .bg-white:hover { transform: translateY(-5px); box-shadow: 0 20px 30px -10px rgba(0, 0, 0, 0.1), 0 10px 20px -8px rgba(0, 0, 0, 0.05); }
#about .bg-primary { background: linear-gradient(135deg, var(--primary), #4ecfb9); box-shadow: 0 8px 20px rgba(61, 179, 158, 0.2); }

/* Testimonials */
.testimonial { font-style: italic; position: relative; padding: 2rem; }
.testimonial::before { content: '"'; font-size: 4rem; position: absolute; left: 0; top: -1rem; color: var(--gray-light); font-family: Georgia, serif; }

/* Parallax Divider Section */
.parallax-divider-section { position: relative; overflow: hidden; z-index: 1; }
.parallax-divider-section .bg-layer { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background-attachment: fixed; transform: translateZ(0); backface-visibility: hidden; will-change: transform; }

/* Back to Top Button */
.back-to-top { position: fixed; bottom: 25px; right: 25px; display: flex; justify-content: center; align-items: center; width: 50px; height: 50px; border-radius: 50%; background-color: var(--primary); color: white; border: none; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3); cursor: pointer; opacity: 0; visibility: hidden; transform: translateY(20px); transition: all 0.3s ease; z-index: 99; }
.back-to-top:hover { background-color: var(--primary-dark); transform: translateY(0) scale(1.1); }
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top svg { width: 20px; height: 20px; }

/* Footer */
footer { background-color: var(--dark); color: white; padding: 1.5rem 0 0.75rem; }
.footer-content { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; max-width: 100%; margin: 0 auto; padding: 0 1.5rem; }
.footer-column h4 { margin-bottom: 0.75rem; color: var(--primary-light); font-size: 1rem; }
.footer-column ul { list-style: none; padding: 0; margin: 0; }
.footer-column ul li { margin-bottom: 0.5rem; line-height: 1.2; }
.copyright { text-align: center; padding-top: 1rem; margin-top: 1rem; border-top: 1px solid rgba(255, 255, 255, 0.1); font-size: 0.75rem; color: var(--gray); }

/* Images and media */
img, video, svg, iframe { max-width: 100%; height: auto; }
svg { overflow: hidden !important; width: 1em; height: 1em; vertical-align: middle; }
[class*="absolute"], [style*="position: absolute"] { max-width: 100%; box-sizing: border-box; }
.absolute { max-width: 100%; box-sizing: border-box; }

/* Scroll offset for sidebar layout */
section[id] { scroll-margin-top: 20px; }

/* Fix for Chrome handling of negative margins */
[class*="-top-"], [class*="-left-"], [class*="-right-"], [class*="-bottom-"] { position: relative; z-index: 1; }

/* Fix for Chrome's handling of transforms */
[style*="transform"], [class*="transform"] { transform-style: flat !important; will-change: transform; }

/* Fix for Chrome grid layout */
.grid { width: 100%; max-width: 100%; }

/* Enhanced Modal Styling with Blur Effect */
#values-modal { position: fixed; top: 0; left: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: center; z-index: 1000; opacity: 0; visibility: hidden; transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1); will-change: opacity, visibility; }
#values-modal.hidden { display: none !important; visibility: hidden !important; pointer-events: none !important; }
#values-modal.modal-active { opacity: 1; visibility: visible; }
.modal-backdrop { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background-color: rgba(0, 0, 0, 0.5); opacity: 0; transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), backdrop-filter 0.4s cubic-bezier(0.16, 1, 0.3, 1); will-change: opacity, backdrop-filter; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
#values-modal.modal-active .modal-backdrop { opacity: 1; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.modal-container { max-width: 61.8vw !important; width: 100%; background: white; border-radius: 16px; padding: 2.5rem; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.05); transform: scale(0.95) translateY(20px); opacity: 0; transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1); will-change: transform, opacity; z-index: 2; position: relative; }
#values-modal.modal-active .modal-container { transform: scale(1) translateY(0); opacity: 1; }
body.modal-open { overflow: hidden !important; position: fixed; width: 100%; height: 100%; touch-action: none; -ms-touch-action: none; }

/* Modal positioning */
#values-modal.modal-active {
  align-items: center !important;
}
.modal-container {
  margin-top: 0;
  max-height: 85vh;
  overflow-y: auto;
}
@media (max-width: 768px) {
  .modal-container {
      max-height: 80vh;
  }
}

/* Modal fixes to prevent jumps */
body.modal-open {
  position: fixed !important;
  width: 100% !important;
  overflow: hidden !important;
}
#values-modal {
  padding-top: 5vh;
}
.modal-container {
  max-height: 85vh;
  overflow-y: auto;
  margin-top: 0 !important;
}

/* Approach Section Styling */
.approach-section { position: relative; overflow: hidden; }
.transform-card { transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease; border: 1px solid rgba(255, 255, 255, 0.8); }
.transform-card:hover { transform: translateY(-5px); box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.3); border: 1px solid rgba(255, 255, 255, 0.5); }
.approach-icon-container { display: flex; justify-content: center; align-items: center; height: 80px; }
.approach-icon { color: var(--primary, #3DB39E); opacity: 0.8; transition: all 0.5s ease; }
.approach-card:hover .approach-icon { color: var(--primary-light, #60a5fa); transform: scale(1.2); }
.svg-stroke { stroke-dasharray: 100; stroke-dashoffset: 100; animation: dash 3s ease-in-out forwards; }
/* Fix transparency in approach cards */
.approach-card { background-color: rgba(255, 255, 255, 1) !important; backdrop-filter: blur(8px) !important; }
.approach-card:hover { background-color: rgba(255, 255, 255, 0.8) !important; backdrop-filter: blur(10px) !important; }
@keyframes dash { to { stroke-dashoffset: 0; } }
.fade-in-up { opacity: 0; transform: translateY(20px); transition: opacity 0.8s cubic-bezier(0.5, 0, 0.3, 1), transform 0.8s cubic-bezier(0.5, 0, 0.3, 1); }
.fade-in-up.animated { opacity: 1; transform: translateY(0); }
.animation-delay-200 { transition-delay: 0.2s; }
.animation-delay-300 { transition-delay: 0.3s; }
.animation-delay-400 { transition-delay: 0.4s; }
.animation-delay-500 { transition-delay: 0.5s; }

/* Form floating labels */
.form-floating { position: relative; }
.form-floating label { position: absolute; top: 0.75rem; left: 1rem; z-index: 1; transition: transform 0.25s, opacity 0.25s ease-in-out; transform-origin: 0 0; pointer-events: none; }
.form-floating input:focus + label { transform: translateY(-0.5rem) scale(0.85); color: var(--primary); opacity: 1; }
.form-floating input:not(:placeholder-shown) + label { transform: translateY(-0.5rem) scale(0.85); color: var(--primary); opacity: 1; }
.form-floating textarea:focus + label { transform: translateY(-0.5rem) scale(0.85); color: var(--primary); opacity: 1; }
.form-floating textarea:not(:placeholder-shown) + label { transform: translateY(-0.5rem) scale(0.85); color: var(--primary); opacity: 1; }
.form-floating select + label { transform: translateY(-0.5rem) scale(0.85); color: var(--primary); opacity: 1; }

/* Contact card animations */
.contact-card { transition: transform 0.3s ease-in-out; }
.contact-card:hover { transform: translateY(-8px); }
.contact-info-card { transition: transform 0.3s ease-in-out; }
.contact-info-card:hover { transform: translateY(-5px); }
.company-details-card { transition: transform 0.3s ease-in-out, box-shadow 0.3s ease; }
.company-details-card:hover { transform: translateY(-5px); box-shadow: 0 20px 25px rgba(0, 0, 0, 0.1); }

/* Pulsing animation for office icon */
.office-icon-pulse { animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4); } 70% { box-shadow: 0 0 0 8px rgba(255, 255, 255, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); } }

/* Contact section details styling */
.contact-section-bg { background-image: linear-gradient(rgba(249, 248, 245, 0.9), rgba(249, 248, 245, 0.95)), url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%233db39e' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"); }
.contact-form-header { border-top-left-radius: 0.75rem; border-top-right-radius: 0.75rem; }
.contact-form-input { transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; }
.contact-form-input:focus { box-shadow: 0 0 0 3px rgba(61, 179, 158, 0.25); }
.contact-link-hover { transition: color 0.2s ease, transform 0.2s ease; }
.contact-link-hover:hover { color: var(--primary-light); transform: translateX(2px); }
.contact-icon-container { background-color: rgba(255, 255, 255, 0.2); border-radius: 50%; padding: 0.5rem; display: inline-flex; align-items: center; justify-content: center; }
.contact-submit-btn { position: relative; overflow: hidden; }
.contact-submit-btn::after { content: ''; position: absolute; top: 50%; left: 50%; width: 120%; height: 0; padding-bottom: 120%; margin-left: -60%; margin-top: -60%; background: rgba(255, 255, 255, 0.2); border-radius: 50%; opacity: 0; transform: scale(0); transition: transform 0.3s ease, opacity 0.3s ease; }
.contact-submit-btn:active::after { transform: scale(1); opacity: 1; transition: 0s; }

/* Contact section text color fix */
#contact h2 { color: var(--primary-dark); }
#contact p { color: var(--gray-custom); }
#contact .text-white { color: white !important; }
#contact .text-gray-500 { color: var(--gray-custom) !important; }
#contact .bg-white { background-color: white !important; }
#contact .bg-gradient-to-r { color: white !important; }
#contact .body-text { color: var(--gray-custom) !important; }
#contact .contact-info-card p { color: rgba(255, 255, 255, 0.9) !important; }
#contact .contact-info-card a { color: var(--primary-light) !important; }
#contact .company-details-card p { color: var(--gray-custom) !important; }
#contact .company-details-card .font-medium { color: var(--primary-dark) !important; }

/* Fix for office card in dark bg */
#contact .bg-primary-dark { background-color: var(--primary-dark) !important; }
#contact .bg-primary-dark * { color: white !important; }
#contact .bg-primary-dark a { color: var(--primary-light) !important; }
#contact .bg-primary-dark a:hover { color: white !important; }
#contact .bg-primary-dark .font-medium { color: white !important; }

/* Enhance form styling */
#contact .form-floating label { color: var(--gray-custom); }
#contact input, #contact select, #contact textarea { color: var(--primary-dark) !important; }
#contact .btn { color: white !important; }
@supports not (backdrop-filter: blur(12px)) { .modal-backdrop { background-color: rgba(0, 0, 0, 0.75); } }
@media (max-width: 1024px) { .modal-container { max-width: 80vw !important; } }
@media (max-width: 768px) { .modal-container { max-width: 90vw !important; padding: 1.5rem; } }

/* Animation keyframes */
@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes flyInFromTop { 0% { opacity: 0; transform: translateY(-50px); } 70% { transform: translateY(15px); } 100% { opacity: 1; transform: translateY(0); } }
@keyframes iconFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes checkmarkPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }

/* Animation classes */
.fly-in-animation { animation: flyInFromTop 1.2s ease-out forwards; transform: translateY(-50px); opacity: 0; }

/* Chrome-specific fixes */
@supports (-webkit-appearance:none) {
  .parallax-divider-section .bg-layer { background-attachment: fixed; background-position: center; background-size: cover; }
  .parallax-spacer .bg-layer { background-attachment: fixed; background-position: center; background-size: cover; }
}

/* Media Queries */
@media (max-width: 768px) {
  /* Navigation styles */
  .nav-links { display: none; position: fixed; top: 60px; left: 0; right: 0; transform: none; flex-direction: column; background-color: rgba(0, 0, 0, 0.85); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); padding: 1.5rem; gap: 1.5rem; width: 100%; text-align: center; z-index: 99; box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2); border-top: 1px solid rgba(255, 255, 255, 0.1); border-bottom: 1px solid rgba(255, 255, 255, 0.1); border-radius: 0; }
  .mobile-menu-btn { display: block !important; padding: 0.5rem; cursor: pointer; position: absolute; right: 1rem; top: 50%; transform: translateY(-50%); }
  
  /* Header and footer adjustments */
  #site-header.site-header { height: 60px !important; min-height: 60px !important; max-height: 60px !important; }
  main.parallax-section { padding-top: 60px; }
  section[id] { padding-top: 100px; margin-top: -100px; }
  .logo-img { height: 2rem !important; }
  .logo { font-size: 1.5rem !important; }
  
  /* Hero adjustments */
  .hero { height: calc(150vh - 60px) !important; min-height: calc(150vh - 60px) !important; }
  .hero-content { min-height: calc(150vh - 60px) !important; padding: 1rem; padding-bottom: 60px; }
  .hero-overlay { margin: 0 auto; max-width: 90%; padding: 1.5rem; }
  
  /* Parallax adjustments */
  .parallax-divider-section { min-height: calc(100% + 100px) !important; padding-top: 40px; padding-bottom: 40px; }
  .parallax-divider-section .parallax-content { padding-top: 40px; padding-bottom: 60px; }
  .parallax-divider-section .grid { gap: 20px; margin-bottom: 20px; }
  .parallax-divider-section .bg-layer, .parallax-spacer .bg-layer { background-attachment: scroll; height: 150vh; background-size: cover; background-position: center; transform: none; }
  
  /* Button and component adjustments */
  #contactForm .btn { width: 100%; }
  .container { padding: 0 1rem; }
  .back-to-top { bottom: 15px; right: 15px; width: 40px; height: 40px; }
  
  /* Footer adjustments */
  footer { padding: 0.75rem 0 0.5rem; }
  .footer-content { gap: 0.5rem; }
  .footer-column h4 { margin-bottom: 0.5rem; font-size: 0.875rem; }
  .footer-column ul li { margin-bottom: 0.25rem; font-size: 0.75rem; }
  .copyright { padding-top: 0.5rem; margin-top: 0.5rem; font-size: 0.7rem; }
}

@media (max-width: 576px) {
  .container { padding: 0 1rem; }
  .hero-overlay h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); }
  .card { margin-bottom: 1.5rem; }
  .footer-content { grid-template-columns: repeat(2, 1fr); padding: 0 0.75rem; }
}

@media (min-width: 768px) {
  .back-to-top { bottom: 16px; right: 10px; width: 60px; height: 50px; }
}

/* Contact section emergency color fix - add this to your CSS */
#contact {
    color: var(--gray-custom) !important;
    background-color: var(--bg-custom) !important;
    position: relative;
    z-index: 1;
}

#contact h2, 
#contact h3,
#contact .text-primary-dark {
    color: var(--primary-dark) !important;
}

#contact p, 
#contact .body-text,
#contact label {
    color: var(--gray-custom) !important;
}

#contact .bg-gradient-to-r {
    background-image: linear-gradient(to right, var(--primary), var(--primary-dark)) !important;
}

#contact .text-white,
#contact .bg-gradient-to-r h3,
#contact .bg-gradient-to-r p,
#contact .contact-info-card h3,
#contact .contact-info-card p,
#contact .contact-info-card .font-medium {
    color: white !important;
}

#contact .text-primary-light {
    color: var(--primary-light) !important;
}

#contact .bg-white {
    background-color: white !important;
}

#contact .bg-primary-dark {
    background-color: var(--primary-dark) !important;
}

/* Fix any potential z-index issues */
#contact > * {
    position: relative;
    z-index: 2;
}

/* Debug white overlay */
#contact::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    z-index: 0;
    pointer-events: none;
}

/* Ensure form inputs have correct text color */
#contact input,
#contact textarea,
#contact select {
    color: var(--primary-dark) !important;
}

/* Make sure SVG icons are visible */
#contact svg {
    color: currentColor !important;
}

/* Override for narrow contact form */
#contact .md\:col-span-5 {
  max-width: 480px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Force narrow input fields */
#contact input, 
#contact select, 
#contact textarea {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

/* Fix grid layout */
#contact .grid {
  display: grid !important;
  width: 100% !important;
}

@media (min-width: 768px) {
  #contact .md\:grid-cols-12 {
      grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
  }
  
  #contact .md\:col-span-5 {
      grid-column: span 5 / span 5 !important;
  }
  
  #contact .md\:col-span-7 {
      grid-column: span 7 / span 7 !important;
  }
}

/* Add golden ratio padding to contact sections */
#contact .md\:col-span-5,
#contact .md\:col-span-7 > div {
  padding: 1.618em !important;
}

/* Adjust spacing between company info sections */
#contact .md\:col-span-7 > div.mb-6 {
  margin-bottom: 1.618em !important;
}

/* Add some breathing room to the heading and description */
#contact .text-center.mb-12 {
  margin-bottom: 1.618em !important;
}

/* Increase vertical spacing between form elements */
#contact form .mb-3 {
  margin-bottom: 0.809em !important; /* half the golden ratio */
}

#contact form .mb-4 {
  margin-bottom: 1.618em !important;
}

/* Increase breathing room around buttons */
#contact .text-center .btn {
  padding: 0.75rem 1.5rem !important;
}

  /* Make sure hero content is always visible */
  .hero-content {
    position: relative !important;
    z-index: 100 !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }
  
  .hero-overlay {
    position: relative !important;
    z-index: 101 !important; 
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }
  
  .layer.content-layer {
    visibility: visible !important;
    opacity: 1 !important;
    transform: translate3d(0, 0, 0) !important;
  }
  
  /* Fix for clickable elements */
  .layer a, 
  .layer button,
  .scene a, 
  .scene button,
  .hero-overlay a,
  .hero-overlay button {
    position: relative !important;
    z-index: 105 !important;
    pointer-events: auto !important;
  }

  /* Fixed positioning for the hero section */
  #hero {
    position: relative;
    z-index: 10;
    overflow: visible;
  }

    /* Add this to your CSS at the end for hero section z-index correction */
  #hero {
    position: relative;
    z-index: 1 !important; /* Lower z-index so it goes behind other sections when scrolling */
    overflow: visible;
  }
  
  /* Ensure content sections have higher z-index to appear above hero when scrolling */
  section#about,
  section#services,
  section#contact,
  section.parallax-spacer {
    position: relative !important;
    z-index: 5 !important; /* Higher than hero */
    background-color: var(--bg-custom);
  }
  
  /* Fix parallax stacking contexts */
  .parallax-section {
    position: relative;
    z-index: auto !important; /* Remove any z-index here to not create a new stacking context */
  }
  
  /* Fix scene/layer positioning */
  .scene {
    overflow: hidden !important; /* Contain the parallax layers */
    height: 100vh !important; /* Limit height to viewport */
    position: absolute !important; /* Take it out of the flow */
    width: 100% !important;
    top: 0 !important;
    left: 0 !important;
  }
  
  /* Hero content should only be visible within hero section */
  .hero-content {
    position: relative !important;
    z-index: 100 !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    max-height: 100vh !important; /* Constrain to viewport height */
  }

  /* Adjust hero content position - move 120px lower */
.layer.content-layer.content-position {
  position: relative !important;
  top: 120px !important; /* Move content down by 120px */
  z-index: 100 !important;
}

/* Make sure hero section has enough height to accommodate the shift */
#hero.hero {
  min-height: calc(150vh + 120px) !important; /* Add extra space for the shifted content */
}

/* Fix mobile-specific adjustments to work with the new position */
@media (max-width: 768px) {
  /* Move hero content lower on mobile (combining with the general 120px) */
  .layer.content-layer.content-position {
    position: relative !important;
    top: 60px !important; /* Reduce top offset on mobile */
    margin-top: 120px !important; /* Keep margin for consistent spacing */
  }
}

/* ── About section — two-column with mascot ───────────────────────────────── */
.section-about__layout {
  display: flex;
  align-items: center;
  gap: 3rem;
}

.section-about__content {
  flex: 1 1 0;
  min-width: 0;
}

.section-about__mascot {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.section-about__mascot img {
  max-height: 320px;
  width: auto;
  filter: drop-shadow(0 8px 24px rgba(0,0,0,0.15));
}

/* ── Contact CTA ─────────────────────────────────────────────────────────── */
.section-cta__content {
  text-align: left;
}

@media (max-width: 900px) {
  .section-about__layout {
    flex-direction: column;
    text-align: center;
  }
  .section-about__mascot img {
    max-height: 200px;
  }
}


/* ═══════════════════════════════════════════════════════════════════════════
   CI4 VIEW STYLES — added for MVC layout
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Button modifiers (BEM supplements) ────────────────────────────────── */
.btn--primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn--primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
.btn--outline { background: transparent; border: 2px solid var(--primary); color: var(--primary); box-shadow: none; }
.btn--outline:hover { background: var(--primary); color: #fff; }

/* ── Language switcher ───────────────────────────────────────────────────── */
.sidebar-lang { display: flex; align-items: center; gap: 0.5rem; margin-top: 1.25rem; padding: 0 0.875rem; }
.lang-btn { font-size: 0.78rem; font-weight: 700; color: rgba(255,255,255,0.42); text-decoration: none; letter-spacing: 0.04em; transition: color 0.2s; padding: 2px 4px; border-radius: 3px; }
.lang-btn:hover, .lang-btn--active { color: #fff; }
.lang-sep { color: rgba(255,255,255,0.2); font-size: 0.75rem; }

/* ── Section scaffold ────────────────────────────────────────────────────── */
.section-inner { max-width: 1000px; margin: 0 auto; padding: 5rem 2.5rem; }
.section-label { display: inline-block; font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.14em; color: var(--primary); margin-bottom: 1rem; }

/* ── Hero CTA row ───────────────────────────────────────────────────────── */
.hero__actions { display: flex; gap: 0.875rem; justify-content: center; flex-wrap: wrap; margin-top: 0.25rem; }
/* btn--outline on dark hero: teal border/text, white on hover */
#hero .btn--outline { border-color: var(--primary); color: var(--primary); }
#hero .btn--outline:hover { background: var(--primary); color: #fff; }

/* ── Hero (CI4 BEM) ─────────────────────────────────────────────────────── */
.hero { position: relative; min-height: 100vh; overflow: visible !important; background: var(--bg-custom); }
.hero__scene { position: relative; z-index: 2; width: 100%; max-width: 1000px; margin: 0 auto; padding: 9rem 2.5rem 5rem; }
.hero__eyebrow { font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.14em; color: var(--primary); margin-bottom: 1.25rem; }
.hero__title { font-family: var(--font-heading); font-size: clamp(1.75rem, 3.8vw, 2.8rem); font-weight: 700; line-height: 1.05; letter-spacing: -0.03em; margin-bottom: 1.25rem; color: var(--dark); max-width: 640px; }
.hero__sub { font-size: 1.1rem; color: var(--gray-custom); margin-bottom: 2rem; max-width: 500px; line-height: 1.65; }

/* ── About ───────────────────────────────────────────────────────────────── */
.section-about { background: #fff; }
.section-about h2 { font-family: var(--font-heading); font-size: clamp(1.25rem, 2.2vw, 1.75rem); font-weight: 700; line-height: 1.05; letter-spacing: -0.025em; margin-bottom: 1rem; color: var(--dark); }
.section-about > .section-inner > p { color: var(--gray-custom); max-width: 680px; margin-bottom: 0; }
.about-pillars { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1.25rem; margin-top: 2.5rem; }
.pillar { padding: 1.5rem; background: var(--bg-custom); border-radius: 0.75rem; border: 1px solid var(--gray-light); }
.pillar h3 { font-size: 0.95rem; font-weight: 700; margin-bottom: 0.5rem; color: var(--dark); }
.pillar p { font-size: 0.875rem; color: var(--gray); line-height: 1.6; margin: 0; }

/* ── Services summary ────────────────────────────────────────────────────── */
.section-services { background: var(--bg-custom); }
.section-services h2 { font-family: var(--font-heading); font-size: clamp(1.25rem, 2.2vw, 1.75rem); font-weight: 700; line-height: 1.05; letter-spacing: -0.025em; margin-bottom: 1rem; color: var(--dark); }
.services-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.25rem; margin: 2rem 0 2.5rem; }
.service-card { background: #fff; border-radius: 0.75rem; padding: 1.75rem; border: 1px solid var(--gray-light); transition: box-shadow 0.2s; }
.service-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.07); }
.service-card h3, .service-card h2 { font-size: 1rem; font-weight: 700; margin-bottom: 0.5rem; color: var(--dark); }
.service-card p { font-size: 0.875rem; color: var(--gray); margin: 0; line-height: 1.6; }

/* ── Portfolio summary ───────────────────────────────────────────────────── */
.section-portfolio { background: #fff; }
.section-portfolio h2 { font-family: var(--font-heading); font-size: clamp(1.25rem, 2.2vw, 1.75rem); font-weight: 700; line-height: 1.05; letter-spacing: -0.025em; margin-bottom: 1rem; color: var(--dark); }
.portfolio-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.25rem; margin: 2rem 0 2.5rem; }
.portfolio-card { background: var(--bg-custom); border-radius: 0.75rem; padding: 1.75rem; border: 1px solid var(--gray-light); transition: box-shadow 0.2s; }
.portfolio-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.07); }
.portfolio-card__badge { display: inline-block; font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--primary); background: rgba(61,179,158,0.1); padding: 0.2rem 0.65rem; border-radius: 2rem; margin-bottom: 0.75rem; }
.portfolio-card h3, .portfolio-card h2 { font-size: 1rem; font-weight: 700; margin-bottom: 0.5rem; color: var(--dark); }
.portfolio-card p { font-size: 0.875rem; color: var(--gray); margin: 0; line-height: 1.6; }

/* ── Contact CTA strip ───────────────────────────────────────────────────── */
.section-contact-cta { background: linear-gradient(135deg, #1a3044 0%, #203a4d 100%); }
.section-contact-cta h2 { font-family: var(--font-heading); font-size: clamp(1.25rem, 2.2vw, 1.75rem); font-weight: 700; line-height: 1.05; letter-spacing: -0.025em; color: #fff; margin-bottom: 1rem; }
.section-contact-cta p { color: rgba(255,255,255,0.7); margin-bottom: 2rem; }
.section-contact-cta .btn--primary { background: var(--primary); border-color: var(--primary); }

/* ── Page hero (inner pages) ─────────────────────────────────────────────── */
.page-hero { background: linear-gradient(135deg, #1a3044 0%, #203a4d 100%); }
.page-hero .section-inner { padding-bottom: 3.5rem; padding-top: 7rem; }
.page-hero .hero__eyebrow { color: var(--primary); }
.page-hero h1 { font-family: var(--font-heading); font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 700; line-height: 1.05; letter-spacing: -0.03em; color: #fff; margin-bottom: 1rem; max-width: 640px; }
.page-hero p { color: rgba(255,255,255,0.7); max-width: 580px; }

/* ── Services full page ──────────────────────────────────────────────────── */
.section-services-full { background: var(--bg-custom); }
.services-grid--full { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.service-card--full h2 { font-size: 1.1rem; }

/* ── Service eyebrow badge (SYS / PLT label above heading) ───────────────── */
.service-eyebrow { display: inline-block; font-size: 0.68rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.12em; color: var(--primary); margin-bottom: 0.5rem; }

/* ── Section eyebrow (section-level label, e.g. "Järjestelmät") ─────────── */
.section-eyebrow { font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.14em; color: var(--primary); margin-bottom: 0.25rem; }

/* ── Service bullets (check-list inside SYS / PLT cards) ────────────────── */
.service-bullets { list-style: none; padding: 0.75rem 0 1rem; margin: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.service-bullets li { font-size: 0.82rem; color: var(--gray-custom); line-height: 1.5; padding-left: 1.375rem; position: relative; }
.service-bullets li::before { content: '→'; position: absolute; left: 0; color: var(--primary); font-weight: 700; font-size: 0.78rem; }

/* ── btn--sm modifier ────────────────────────────────────────────────────── */
.btn--sm { padding: 0.45rem 1.1rem !important; font-size: 0.8rem !important; }

/* ── Systems grid (product cards on services page) ───────────────────────── */
.section-systems { background: #fff; }
.systems-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.25rem; margin: 1.5rem 0 0; }
.system-card { background: var(--bg-custom); border-radius: 0.75rem; padding: 1.5rem; border: 1px solid var(--gray-light); transition: box-shadow 0.2s; }
.system-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.07); }
.system-card h3 { font-size: 0.92rem !important; font-weight: 800 !important; margin-bottom: 0.4rem; color: var(--dark); }
.system-card p { font-size: 0.8rem; color: var(--gray); margin: 0; line-height: 1.6; }

/* ── Portfolio full page ─────────────────────────────────────────────────── */
.section-portfolio-full { background: var(--bg-custom); }
.portfolio-grid--full { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.portfolio-card--full h2 { font-size: 1.1rem; margin-bottom: 0.5rem; }

/* ── Contact form page ───────────────────────────────────────────────────── */
.section-contact-form { background: var(--bg-custom); }
.section-contact-form .section-inner { max-width: 680px; }
.form-field { margin-bottom: 1.25rem; }
.form-field label { display: block; font-size: 0.875rem; font-weight: 600; margin-bottom: 0.375rem; color: var(--dark); }
.form-field input[type="text"],
.form-field input[type="email"],
.form-field input[type="tel"],
.form-field textarea {
  width: 100%; padding: 0.625rem 0.875rem; border: 1px solid var(--gray-light);
  border-radius: 0.5rem; font-size: 0.95rem; color: var(--dark); background: #fff;
  font-family: inherit; transition: border-color 0.15s, box-shadow 0.15s;
}
.form-field input:focus, .form-field textarea:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(61,179,158,0.15);
}
.form-field textarea { resize: vertical; min-height: 130px; }
.contact-status { min-height: 1.4em; font-size: 0.9rem; margin: 0.75rem 0; }
.contact-status--success { color: var(--success); }
.contact-status--error   { color: var(--danger); }

/* ── Footer ──────────────────────────────────────────────────────────────── */
.site-footer { background: #1a3044; color: rgba(255,255,255,0.6); }
.footer-inner { max-width: 1000px; margin: 0 auto; padding: 3rem 2.5rem; display: flex; flex-direction: column; align-items: center; gap: 1.25rem; text-align: center; }
.footer-brand { display: flex; align-items: center; gap: 0.75rem; color: #fff; font-weight: 700; font-size: 1.05rem; }
.footer-brand img { border-radius: 6px; }
.footer-tagline { font-size: 0.875rem; color: rgba(255,255,255,0.45); margin: 0; }
.footer-nav { display: flex; gap: 1.5rem; flex-wrap: wrap; justify-content: center; }
.footer-nav a { color: rgba(255,255,255,0.55); text-decoration: none; font-size: 0.875rem; transition: color 0.2s; }
.footer-nav a:hover { color: var(--primary); }
.footer-copy { font-size: 0.78rem; color: rgba(255,255,255,0.28); margin: 0; }

/* ── Section headings shared ─────────────────────────────────────────────── */
.section-inner h2 { font-family: var(--font-heading); font-size: clamp(1.25rem, 2.2vw, 1.75rem); font-weight: 700; line-height: 1.05; letter-spacing: -0.025em; margin-bottom: 1rem; color: var(--dark); }
.section-inner p { color: var(--gray-custom); line-height: 1.7; }

/* ── Mobile adjustments for sections ─────────────────────────────────────── */
@media (max-width: 900px) {
  .section-inner { padding: 3.5rem 1.25rem; }
  .hero__scene { padding: 7rem 1.25rem 3.5rem; }
  .page-hero .section-inner { padding-top: 5rem; }
  .footer-inner { padding: 2.5rem 1.25rem; }
}

/* ── Hero height override (replaces old static-site parallax sizing) ───────── */
#hero.hero {
  min-height: 100vh !important;
  display: flex !important;
  align-items: center !important;
  overflow: visible !important;
  background: var(--bg-custom) !important;
  transform-style: flat !important;
}

/* ── Sidebar admin link ───────────────────────────────────────────────────── */
.sidebar-admin-link {
  display: inline-block;
  margin-top: 1.25rem;
  padding: 0.3rem 0.875rem;
  color: rgba(255,255,255,0.9);
  font-size: 1rem;
  font-weight: 400;
  text-decoration: none;
  border-radius: 0.25rem;
  transition: color 0.2s, background 0.2s;
  line-height: 1;
}
.sidebar-admin-link:hover { color: #fff; background: rgba(255,255,255,0.08); }


/* ═══════════════════════════════════════════════════════════════════════════
   HERO 3D LOGO SCENE  — full rewrite, overrides old static-site values
   ═══════════════════════════════════════════════════════════════════════════ */

/* Dark gradient hero so the mascot actually pops */
#hero.hero {
  background:
    radial-gradient(ellipse 38% 48% at 4% 96%, rgba(61,179,158,0.10) 0%, transparent 60%),
    linear-gradient(145deg, #0c1b28 0%, #1a3044 60%, #203a4d 100%) !important;
  min-height: 100vh !important;
  display: flex !important;
  align-items: center !important;
  overflow: visible !important;
  transform-style: flat !important;
  position: relative !important;
}

/* Scene container — bleeds left behind the sidebar */
.logo-scene {
  position: absolute !important;
  top: 0 !important;
  bottom: 0 !important;
  left: -240px !important;           /* starts at viewport x:0, behind sidebar */
  width: calc(100% + 240px) !important;
  pointer-events: none;
  z-index: 1;
  overflow: visible !important;
}

/* Mascot: tall portrait (1024×1536), anchored bottom-left, perspective tilt */
.logo-scene__img {
  position: absolute !important;
  bottom: 0 !important;
  left: 0 !important;                 /* flush with sidebar left edge */
  height: 96vh !important;
  width: auto !important;
  opacity: 0.82 !important;
  filter: drop-shadow(0 0 60px rgba(61,179,158,0.22))
          drop-shadow(0 24px 48px rgba(0,0,0,0.45)) !important;
  transform-origin: bottom left !important;
  transform: perspective(1100px) rotateY(14deg) rotateX(2deg);
  animation: logoFloat 11s ease-in-out infinite !important;
  will-change: transform, opacity;
}

@keyframes logoFloat {
  0%, 100% {
    transform: perspective(1100px) rotateY(14deg) rotateX(2deg) translateY(0px) translateX(0px);
    opacity: 0.82;
    filter: drop-shadow(0 0 60px rgba(61,179,158,0.22)) drop-shadow(0 24px 48px rgba(0,0,0,0.45));
  }
  35% {
    transform: perspective(1100px) rotateY(10deg) rotateX(1deg) translateY(-8px) translateX(3px);
    opacity: 0.88;
    filter: drop-shadow(0 0 68px rgba(61,179,158,0.26)) drop-shadow(0 22px 46px rgba(0,0,0,0.42));
  }
  65% {
    transform: perspective(1100px) rotateY(12deg) rotateX(2deg) translateY(-5px) translateX(2px);
    opacity: 0.85;
    filter: drop-shadow(0 0 63px rgba(61,179,158,0.24)) drop-shadow(0 23px 47px rgba(0,0,0,0.43));
  }
}

/* Hero text: white on dark background */
.hero__eyebrow { color: var(--primary) !important; }
.hero__title   { color: #fff !important; }
.hero__sub     { color: rgba(255,255,255,0.72) !important; }

/* Content sits above the logo layer */
.hero__scene { position: relative; z-index: 3; }

/* ── Hero text: right-aligned to center in mascot-free space ────────────────
   Mascot occupies the left ~40% of the content area; push text to the right. */
#hero.hero {
  justify-content: flex-end !important;
}
.hero__scene {
  margin-left: auto !important;
  max-width: 480px !important;
  padding: 8rem 4rem 4rem 2rem !important;
  text-align: center !important;
}

/* ── Hero text: centered at 38.2vw from left, top at 38.2vh (golden ratio) */
#hero.hero { position: relative !important; }

.hero__scene {
  position: absolute !important;
  left: 38.2vw !important;
  top: 38.2vh !important;
  transform: translateX(-50%) !important;
  margin: 0 !important;
  width: min(460px, 48vw) !important;
  padding: 2rem !important;
  text-align: center !important;
}

@media (max-width: 900px) {
  .hero__scene {
    left: 50% !important;
    width: min(460px, 86vw) !important;
  }
}

/* ── Page transitions ────────────────────────────────────────────────────────
   Entry: body fades + rises in on every page load.
   Exit:  JS adds .page-exiting to body; mascot gets .mascot-exit.          */

/* Entry — added to <body> server-side so it runs before JS loads */
.page-entering {
  animation: pageFadeIn 0.45s ease both;
}
@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

/* Exit — page fades out when navigating away */
.page-exiting {
  animation: pageFadeOut 0.55s ease forwards;
  pointer-events: none;
}
@keyframes pageFadeOut {
  to { opacity: 0; transform: translateY(-6px); }
}

/* Mascot exit — slides left + tilts away + fades */
.logo-scene__img.mascot-exit {
  animation: mascotExit 0.58s ease-in forwards !important;
}
@keyframes mascotExit {
  0%   { transform: perspective(1100px) rotateY(14deg) rotateX(2deg) translateX(0px)   translateY(0px);   opacity: 0.82; }
  60%  { transform: perspective(1100px) rotateY(40deg) rotateX(8deg)  translateX(-60px) translateY(10px);  opacity: 0.3;  }
  100% { transform: perspective(1100px) rotateY(65deg) rotateX(12deg) translateX(-160px) translateY(25px); opacity: 0;    }
}

/* ── Card link ("Learn more →") ─────────────────────────────────────────── */
.card-link { display: inline-block; margin-top: 0.75rem; font-size: 0.82rem; font-weight: 700; color: var(--primary); text-decoration: none; letter-spacing: 0.02em; transition: color 0.2s, gap 0.2s; }
.card-link:hover { color: var(--secondary); }
.service-card .card-link,
.service-card--full .card-link { color: var(--primary); }
.portfolio-card .card-link,
.portfolio-card--full .card-link { color: var(--primary); }

/* ── "Ready to start?" — force white on dark CTA strip ──────────────────── */
.section-contact-cta h2 { color: #fff !important; }
.section-contact-cta p  { color: rgba(255,255,255,0.75) !important; }

/* ── Font selector: data-font attribute overrides --font-heading ─────────────
   PHP sets data-font="FontName" on <html>; these rules swap the CSS variable.
   Space Grotesk is the :root default so it needs no rule here.              */
[data-font="Syne"]              { --font-heading: 'Syne', system-ui, sans-serif; }
[data-font="Barlow Condensed"]  { --font-heading: 'Barlow Condensed', system-ui, sans-serif; }
[data-font="Plus Jakarta Sans"] { --font-heading: 'Plus Jakarta Sans', system-ui, sans-serif; }
[data-font="Inter"]             { --font-heading: 'Inter', system-ui, sans-serif; }

/* ── Services section: smaller + heavier card headlines ─────────────────── */
.service-card h3,
.service-card h2      { font-size: 0.92rem !important; font-weight: 800 !important; }
.service-card--full h2 { font-size: 0.95rem !important; font-weight: 800 !important; }
.section-services h2   { font-size: clamp(1.2rem, 1.8vw, 1.6rem) !important; }

/* ── Social icons ────────────────────────────────────────────────────────── */
.footer-social { display: flex; gap: 1rem; justify-content: center; align-items: center; flex-wrap: wrap; margin: 0.25rem 0; }
.social-icon { display: flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; color: rgba(255,255,255,0.5); transition: color 0.2s, transform 0.2s; }
.social-icon:hover { color: var(--primary); transform: translateY(-2px); }
.social-icon svg { width: 1.2rem; height: 1.2rem; flex-shrink: 0; }
.social-icon--lg { width: 2.75rem; height: 2.75rem; color: var(--gray-custom); border: 1px solid var(--gray-light); border-radius: 50%; background: #fff; }
.social-icon--lg:hover { color: var(--primary); border-color: var(--primary); transform: translateY(-2px); }
.social-icon--lg svg { width: 1.4rem; height: 1.4rem; }

/* Contact page social bar */
.section-contact-social { padding: 2.5rem 0; background: var(--bg-custom); border-top: 1px solid var(--gray-light); }
.contact-social__label { text-align: center; font-size: 0.85rem; font-weight: 600; color: var(--gray-custom); margin-bottom: 1.25rem; }
.contact-social__icons { display: flex; gap: 1.25rem; justify-content: center; flex-wrap: wrap; }

/* ── Section image background placeholder system ─────────────────────────── */
.has-img-bg { position: relative; isolation: isolate; }
.section-img-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-size: cover;
  background-repeat: no-repeat;
  pointer-events: none;
}
