/* CSS Variables / Design Tokens */
:root {
--bg-primary: #030303;
--accent: #009AFC;
--text-primary: #FFFFFF;
--card-bg: rgba(255, 255, 255, 0.02);
--card-hover: rgba(255, 255, 255, 0.05);
--text-muted: #8A8F98;
--border-color: rgba(255, 255, 255, 0.08);
--font-main: 'Inter', sans-serif;
--nav-height: 72px;
}

/* Reset & Base Styles */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}

html {
scroll-behavior: smooth;
}

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

/* Tech-forward background overlay (Motorflow style subtle grid) */
body::before {
content: '';
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
background-image: 
linear-gradient(to right, rgba(255,255,255,0.03) 1px, transparent 1px),
linear-gradient(to bottom, rgba(255,255,255,0.03) 1px, transparent 1px);
background-size: 64px 64px;
mask-image: radial-gradient(circle at center, black, transparent 80%);
-webkit-mask-image: radial-gradient(circle at center, black, transparent 80%);
z-index: -1;
pointer-events: none;
}

/* Typography */
h1, h2, h3, h4 {
font-weight: 700;
line-height: 1.1;
letter-spacing: -0.03em;
}

h1 { 
font-size: clamp(2.5rem, 8vw, 6rem); /* Smoother scaling for mobile */
font-weight: 800; 
letter-spacing: -0.04em;
background: linear-gradient(180deg, #FFFFFF 0%, #A0A0A0 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
padding-bottom: 0.15em; /* Prevents descender clipping on letters like g, y, p */
}
h2 { font-size: clamp(2.25rem, 5vw, 3.5rem); }
h3 { font-size: 1.5rem; letter-spacing: -0.02em; }

p {
font-weight: 400;
color: var(--text-muted);
}

.section-label {
display: inline-flex;
align-items: center;
gap: 0.6rem;
font-weight: 600;
color: var(--text-primary);
background: rgba(255, 255, 255, 0.05);
border: 1px solid var(--border-color);
padding: 0.5rem 1rem;
border-radius: 99px;
text-transform: uppercase;
letter-spacing: 0.1em;
font-size: 0.75rem;
margin-bottom: 1.5rem;
backdrop-filter: blur(10px);
}

a {
color: var(--text-primary);
text-decoration: none;
transition: color 0.3s ease;
}

/* Layout & Utilities */
.container {
width: 100%;
max-width: 1200px;
margin: 0 auto;
padding: 0 2rem;
}
.text-center { text-align: center; display: flex; flex-direction: column; align-items: center; }

section { padding: 8rem 0; position: relative; }

/* Animations (Framer Spring-like) */
.fade-up {
opacity: 0;
transform: translateY(30px) scale(0.98);
filter: blur(4px);
transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s cubic-bezier(0.22, 1, 0.36, 1), filter 0.8s ease-out;
}

.fade-up.visible {
opacity: 1;
transform: translateY(0) scale(1);
filter: blur(0);
}

/* Initial Load Animations */
@keyframes initial-fade {
from { opacity: 0; }
to { opacity: 1; }
}

@keyframes initial-nav-drop {
from { opacity: 0; transform: translateX(-50%) translateY(-30px); }
to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes initial-hero-up {
from { opacity: 0; transform: translateY(30px); filter: blur(8px); }
to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

/* Pill Buttons */
.btn {
display: inline-flex;
align-items: center;
justify-content: center;
padding: 1rem 2rem;
font-weight: 600;
border-radius: 99px;
font-size: 0.95rem;
cursor: pointer;
transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
border: 1px solid transparent;
text-transform: none;
letter-spacing: 0;
}

.btn-primary {
background-color: var(--text-primary);
color: #000;
}

.btn-primary:hover {
transform: scale(1.05);
box-shadow: 0 10px 30px rgba(255, 255, 255, 0.15);
}

.btn-outline {
background-color: rgba(255, 255, 255, 0.03);
border-color: var(--border-color);
color: var(--text-primary);
backdrop-filter: blur(10px);
}

.btn-outline:hover {
background-color: rgba(255, 255, 255, 0.1);
border-color: rgba(255, 255, 255, 0.2);
transform: scale(1.05);
}

/* Ambient Glow Pulse Nav Button */
@keyframes ambient-nav-glow {
0% { box-shadow: 0 0 10px rgba(0, 154, 252, 0.3); }
50% { box-shadow: 0 0 22px rgba(0, 154, 252, 0.6); }
100% { box-shadow: 0 0 10px rgba(0, 154, 252, 0.3); }
}

.btn-nav-special {
background-color: rgba(255, 255, 255, 0.85);
color: #030303;
font-weight: 600;
border-radius: 99px;
border: none;
backdrop-filter: blur(10px);
-webkit-backdrop-filter: blur(10px);
transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
animation: ambient-nav-glow 2.5s ease-in-out infinite;
z-index: 1;
}

.btn-nav-special:hover {
transform: translateY(-2px);
background-color: rgba(255, 255, 255, 1);
/* Intense, locked glow on hover */
box-shadow: 0 6px 28px rgba(0, 154, 252, 0.8), 0 0 15px rgba(0, 154, 252, 0.4);
animation: none; 
}

/* 1. Navigation - Floating Pill */
header {
position: fixed;
top: 1.5rem;
left: 50%;
transform: translateX(-50%);
width: 90%;
max-width: 1000px;
height: var(--nav-height);
background: rgba(10, 10, 10, 0.6);
backdrop-filter: blur(24px);
-webkit-backdrop-filter: blur(24px);
z-index: 1000;
border: 1px solid var(--border-color);
border-radius: 99px;
display: flex;
align-items: center;
padding: 0 0.75rem 0 2.5rem;

/* Load Animation */
opacity: 0;
animation: initial-nav-drop 1.2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.nav-container {
display: flex;
justify-content: space-between;
align-items: center;
width: 100%;
padding: 0;
}

.logo img { height: 32px; width: auto; filter: brightness(1.2); }

.nav-links {
display: flex;
gap: 2rem;
align-items: center;
}

.nav-links a.nav-item {
font-size: 0.85rem;
font-weight: 500;
color: var(--text-muted);
transition: color 0.3s ease;
}

.nav-links a.nav-item:hover { color: var(--text-primary); }
.nav-links .btn { padding: 0.6rem 1.25rem; font-size: 0.85rem; }

.mobile-menu-btn {
display: none;
background: none;
border: none;
color: var(--text-primary);
cursor: pointer;
font-size: 1.5rem;
padding-right: 1rem;
}

/* 2. Hero Section */
.hero {
min-height: 100vh;
display: flex;
align-items: flex-end;
justify-content: center;
text-align: left;
position: relative;
padding-bottom: 5rem;
padding-top: calc(var(--nav-height) + 4rem);
}

.hero-video-container {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 0;
overflow: hidden;

/* Fade in video on load */
opacity: 0;
animation: initial-fade 1.5s ease-out forwards;
}

.hero-video {
width: 100%;
height: 100%;
object-fit: cover;
object-position: center;
}

.hero-overlay {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 1;
/* Vignette effect blending video into dark background */
background: 
radial-gradient(ellipse at center, transparent 30%, var(--bg-primary) 95%),
linear-gradient(to bottom, transparent 40%, var(--bg-primary) 100%);
pointer-events: none;
}

.hero .container {
position: relative;
z-index: 2;
}

.hero-content {
width: 100%;
max-width: 100%;
display: flex;
justify-content: space-between;
align-items: flex-end;
gap: 2rem;
}

.hero-text-block {
max-width: 700px;
display: flex;
flex-direction: column;
align-items: flex-start;
}

/* Staggered Hero Content Load Animation */
.hero-content .section-label {
opacity: 0;
animation: initial-hero-up 1s cubic-bezier(0.22, 1, 0.36, 1) 0.2s forwards;
}

.hero-content h1 {
opacity: 0;
animation: initial-hero-up 1s cubic-bezier(0.22, 1, 0.36, 1) 0.3s forwards;
}

.hero-content p {
opacity: 0;
animation: initial-hero-up 1s cubic-bezier(0.22, 1, 0.36, 1) 0.4s forwards;
}

.hero-content .hero-action-block {
opacity: 0;
animation: initial-hero-up 1s cubic-bezier(0.22, 1, 0.36, 1) 0.5s forwards;
}

@keyframes morph-dot {
0% { background-position: 0% 50%; box-shadow: 0 0 8px 2px rgba(0, 154, 252, 0.6); }
33% { background-position: 100% 50%; box-shadow: 0 0 12px 4px rgba(176, 38, 255, 0.7); }
66% { background-position: 50% 100%; box-shadow: 0 0 10px 3px rgba(255, 165, 0, 0.6); }
100% { background-position: 0% 50%; box-shadow: 0 0 8px 2px rgba(0, 154, 252, 0.6); }
}

.gradient-dot {
width: 8px;
height: 8px;
border-radius: 50%;
background: linear-gradient(135deg, #009AFC, #B026FF, #FFA500, #00d2ff);
background-size: 300% 300%;
animation: morph-dot 5s ease-in-out infinite;
flex-shrink: 0;
}

.hero h1 {
font-weight: 500; /* Standardized weight */
letter-spacing: -0.04em;
text-align: left;
margin-bottom: 1.5rem;
line-height: 1.2; /* Slightly increased to prevent any inner-line clipping */
}

.hero p {
font-size: 1.15rem;
margin-bottom: 0;
max-width: 500px;
color: var(--text-muted);
line-height: 1.6;
text-align: left;
}

.hero-action-block {
display: flex;
align-items: center;
gap: 2rem;
flex-shrink: 0;
margin-bottom: 0.5rem;
}

.hero-text-link {
font-size: 1rem;
font-weight: 500;
color: var(--text-primary);
text-decoration: none;
position: relative;
padding-bottom: 4px;
display: inline-flex;
align-items: center;
transition: color 0.3s ease;
}

.hero-text-link::after {
content: '';
position: absolute;
bottom: 0;
left: 0;
width: 0;
height: 1px;
background-color: var(--text-primary);
transition: width 0.3s ease-in-out;
}

.hero-text-link:hover::after {
width: 100%;
}

/* Hero & Process Glass Elements */
.hero .section-label,
.hero .btn-outline,
.process-pin-wrap .btn-outline {
background: rgba(255, 255, 255, 0.08);
backdrop-filter: blur(16px);
-webkit-backdrop-filter: blur(16px);
border: 1px solid rgba(255, 255, 255, 0.18);
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.hero .btn-outline:hover,
.process-pin-wrap .btn-outline:hover {
background: rgba(255, 255, 255, 0.15);
border-color: rgba(255, 255, 255, 0.3);
box-shadow: 0 10px 40px rgba(0, 154, 252, 0.15);
}

/* 3. Social Proof Bar */
.social-proof {
background-color: transparent;
padding: 5rem 0;
}

.stats-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 3rem;
text-align: center;
}

.stat-item h4 {
font-size: 3rem !important;
color: var(--text-primary) !important;
margin-bottom: 0.5rem;
font-weight: 700;
letter-spacing: -0.02em !important;
}

.stat-item p {
font-size: 0.875rem;
text-transform: uppercase;
letter-spacing: 0.05em;
color: var(--text-muted);
}

/* 4. Services Section (Bento Grid) */
.services-grid {
display: grid;
grid-template-columns: repeat(12, 1fr);
gap: 1.5rem;
margin-top: 5rem;
}

.services-grid > div:nth-child(1) { grid-column: span 7; }
.services-grid > div:nth-child(2) { grid-column: span 5; }
.services-grid > div:nth-child(3) { grid-column: span 5; }
.services-grid > div:nth-child(4) { grid-column: span 7; }

.service-card {
background-color: var(--card-bg);
border: 1px solid var(--border-color);
padding: 3rem;
border-radius: 24px;
transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
position: relative;
overflow: hidden;
backdrop-filter: blur(20px);
height: 100%;
}

.service-card::before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: radial-gradient(circle at 10% 10%, rgba(255,255,255,0.03) 0%, transparent 50%);
opacity: 0;
transition: opacity 0.4s ease;
}

.service-card:hover {
transform: translateY(-5px) scale(1.01);
border-color: rgba(255,255,255,0.15);
background-color: var(--card-hover);
}

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

.service-icon {
width: 56px;
height: 56px;
background: rgba(255, 255, 255, 0.03);
border: 1px solid var(--border-color);
border-radius: 16px;
display: flex;
align-items: center;
justify-content: center;
color: var(--text-primary);
margin-bottom: 2rem;
transition: transform 0.4s ease, color 0.4s ease;
}

.service-card:hover .service-icon {
transform: scale(1.1);
color: var(--accent);
border-color: var(--accent);
}

.service-card h3 { margin-bottom: 1rem; }

/* Service Icon Animations */
@keyframes spin-clockwise {
from { transform: rotate(0deg); }
to { transform: rotate(360deg); }
}
.icon-light { transform-origin: center; }
.service-card:hover .icon-light { animation: spin-clockwise 8s linear infinite; }

@keyframes lock-pivot {
0%, 100% { transform: rotate(0deg); }
50% { transform: rotate(25deg); } /* Swings the left leg up cleanly */
}
.lock-shackle { transform-origin: 17px 11px; }
.service-card:hover .lock-shackle { animation: lock-pivot 1.5s ease-in-out infinite; }

@keyframes wave-pulse {
0%, 100% { transform: scaleY(1); }
50% { transform: scaleY(1.8); }
}
.wave1 { transform-origin: 4px 12px; }
.wave2 { transform-origin: 9px 12px; }
.wave3 { transform-origin: 14px 12px; }
.wave4 { transform-origin: 19px 12px; }

.service-card:hover .wave1 { animation: wave-pulse 1.2s ease-in-out infinite 0s; }
.service-card:hover .wave2 { animation: wave-pulse 1.2s ease-in-out infinite 0.3s; }
.service-card:hover .wave3 { animation: wave-pulse 1.2s ease-in-out infinite 0.1s; }
.service-card:hover .wave4 { animation: wave-pulse 1.2s ease-in-out infinite 0.4s; }

@keyframes mercury-rise {
0%, 100% { transform: scaleY(1); }
50% { transform: scaleY(0.4); } /* Shrinks down towards the bulb */
}
.mercury { transform-origin: 12px 15px; }
.service-card:hover .mercury { animation: mercury-rise 2s ease-in-out infinite; }

/* 5. Process Section (Scroll-Jacked) */
.process-pin-wrap {
position: relative;
height: 300vh; /* 3 scroll zones */
background-color: var(--bg-primary);
}

.process-sticky {
position: sticky;
top: 0;
height: 100vh;
width: 100%;
overflow: hidden;
}

.process-container {
position: relative;
z-index: 3;
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
justify-content: center;
}

.process-video {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
object-fit: cover;
z-index: 0;
}

.process-overlay {
position: absolute;
inset: 0;
background: rgba(8, 12, 20, 0.78);
z-index: 1;
}

.process-edge-blend {
position: absolute;
inset: 0;
z-index: 2;
/* Maps to the site's dark mode background for a seamless edge blend */
background: 
linear-gradient(to bottom, var(--bg-primary) 0%, transparent 20%, transparent 80%, var(--bg-primary) 100%),
linear-gradient(to right, var(--bg-primary) 0%, transparent 10%, transparent 90%, var(--bg-primary) 100%);
pointer-events: none;
}

.process-grid {
display: grid;
grid-template-columns: 55% 45%;
width: 100%;
align-items: center;
}

.process-left {
padding-right: 4rem;
}

.process-headline {
font-family: 'Inter', sans-serif;
font-weight: 800;
color: #ffffff;
font-size: clamp(2.5rem, 4vw, 3.5rem);
line-height: 1.1;
letter-spacing: -0.03em;
margin-bottom: 3rem;
background: none;
-webkit-text-fill-color: initial;
}

.process-interactive-area {
display: flex;
align-items: center;
gap: 1.5rem;
margin-bottom: 2rem;
}

.process-cards-container {
position: relative;
height: 140px; /* Locks height so content below stays stable */
width: 100%;
max-width: 420px;
}

.process-card {
position: absolute;
top: 0;
left: 0;
width: 100%;
background: rgba(245, 245, 245, 0.85); /* Off-white at 85% opacity */
backdrop-filter: blur(14px);
-webkit-backdrop-filter: blur(14px);
border: 1px solid rgba(255, 255, 255, 0.4);
border-radius: 16px;
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
padding: 20px;
display: flex;
gap: 16px;
opacity: 0;
pointer-events: none;
transition: opacity 300ms cubic-bezier(0.4, 0, 0.2, 1), transform 300ms cubic-bezier(0.4, 0, 0.2, 1), box-shadow 300ms ease, border-color 300ms ease;
}

.process-card.past {
transform: translateY(-20px);
}

.process-card.future {
transform: translateY(28px);
}

.process-card.active {
opacity: 1;
transform: translateY(0);
pointer-events: auto;
}

.process-card.active:hover {
transform: translateY(-4px);
box-shadow: 0 15px 40px rgba(0, 154, 252, 0.25), 0 0 20px rgba(255, 255, 255, 0.4);
border-color: rgba(0, 154, 252, 0.5);
}

.process-card-icon {
color: #009AFC;
flex-shrink: 0;
width: 20px;
height: 20px;
margin-top: 2px;
}

.process-card-content h4 {
font-family: 'Inter', sans-serif;
font-weight: 600;
font-size: 17px;
color: #030303; /* Updated to dark for readability */
margin-bottom: 4px;
letter-spacing: 0;
line-height: 1.2;
}

.process-card-content p {
font-family: 'Inter', sans-serif;
font-weight: 400;
font-size: 14px;
color: #4B5563; /* Updated to medium-dark gray */
line-height: 1.5;
margin: 0;
}

.process-dots {
display: flex;
flex-direction: column;
gap: 12px;
align-items: center;
width: 8px; /* Stable horizontal alignment */
}

.process-dot {
width: 6px;
height: 6px;
border-radius: 50%;
background-color: #1A2A45;
transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

.process-dot.active {
width: 8px;
height: 8px;
background-color: #009AFC;
box-shadow: 0 0 8px rgba(0, 154, 252, 0.4);
}

.process-action-block {
display: flex;
justify-content: flex-start;
align-items: center;
width: 100%;
max-width: 420px;
}

.placeholder-box {
background-color: var(--card-bg);
border: 1px solid var(--border-color);
border-radius: 24px;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
padding: 2rem;
color: var(--text-muted);
min-height: 450px;
font-family: monospace;
backdrop-filter: blur(10px);
}

/* 6. Why NexHome */
.why-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 2rem;
margin-top: 5rem;
}

.why-card {
background-color: var(--card-bg);
border: 1px solid var(--border-color);
padding: 2.5rem;
border-radius: 24px;
}

.why-card h3 {
margin-bottom: 1rem;
display: flex;
align-items: center;
gap: 1rem;
}

.why-card h3 svg { color: var(--text-primary); opacity: 0.8; }

/* 7. Featured Project */
.featured-project {
background-color: transparent;
position: relative;
}

.showcase-block {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 0;
border-radius: 20px;
background: rgba(13, 21, 38, 0.6);
border: 1px solid rgba(0, 154, 252, 0.1);
box-shadow: 0 8px 40px rgba(0,0,0,0.4);
padding: 0;
align-items: stretch;
overflow: hidden;
transition: border-color 0.4s ease;
}

@keyframes showcase-glow-pulse {
0% { box-shadow: 0 8px 40px rgba(0,0,0,0.4), 0 0 10px rgba(0, 154, 252, 0); }
50% { box-shadow: 0 8px 40px rgba(0,0,0,0.4), 0 0 35px rgba(0, 154, 252, 0.35); }
100% { box-shadow: 0 8px 40px rgba(0,0,0,0.4), 0 0 10px rgba(0, 154, 252, 0); }
}

.showcase-block:hover {
border-color: rgba(0, 154, 252, 0.3);
animation: showcase-glow-pulse 2.5s ease-in-out infinite;
}

.showcase-media {
position: relative;
width: 100%;
height: 100%;
min-height: 400px;
}

.showcase-media img {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
object-fit: cover;
z-index: 1;
}

.showcase-media video {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
object-fit: cover;
z-index: 2;
opacity: 0;
transition: opacity 600ms ease;
}

.showcase-vignette {
position: absolute;
inset: 0;
background: 
linear-gradient(to right, transparent 50%, rgba(13, 21, 38, 0.6) 100%),
radial-gradient(ellipse at center, transparent 60%, rgba(8,12,20,0.5) 100%);
z-index: 3;
pointer-events: none;
}

.showcase-block:hover .showcase-media video {
opacity: 1;
}

.showcase-content {
padding: 5rem 4rem;
display: flex;
flex-direction: column;
justify-content: center;
align-items: flex-start;
}

.showcase-content .section-label {
color: #009AFC;
}

.showcase-content h3 {
font-size: 2.5rem;
margin-bottom: 1.5rem;
font-weight: 800;
color: #FFFFFF;
}

.showcase-content p { 
margin-bottom: 2.5rem; 
}

.showcase-link {
font-family: 'Inter', sans-serif;
font-weight: 500;
color: #009AFC;
text-decoration: none;
position: relative;
padding-bottom: 4px;
display: inline-flex;
align-items: center;
transition: color 200ms ease;
}

.showcase-link::after {
content: '';
position: absolute;
bottom: 0;
left: 0;
width: 0;
height: 1px;
background-color: #009AFC;
transition: width 200ms ease;
}

.showcase-link:hover::after {
width: 100%;
}

/* 8. Testimonials (Infinite Marquee) */
.testimonials-section {
padding: 8rem 0;
position: relative;
overflow: hidden;
width: 100%;
}

.marquee-wrapper {
width: 100%; /* Natively full-width, removing margin/transform hacks */
margin-top: 5rem;
overflow: hidden;
position: relative;
/* Sleek edge fade matching the Framer reference */
mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
-webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
}

.marquee-track {
display: flex;
width: max-content;
animation: scroll-marquee 40s linear infinite;
}

.marquee-track:hover {
animation-play-state: paused;
}

.marquee-item {
width: 20vw; /* Shows exactly 5 items across a full desktop screen */
min-width: 320px; /* Ensures they don't crush on smaller screens */
padding: 0 3rem;
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
justify-content: center;
}

.marquee-quote {
font-size: clamp(1.1rem, 1.5vw, 1.4rem);
color: var(--text-muted);
font-weight: 500;
line-height: 1.4;
margin-bottom: 1.5rem;
transition: color 0.4s ease;
}

.marquee-item:hover .marquee-quote {
color: var(--text-primary); /* Lights up slightly when hovered */
}

.marquee-author {
font-size: 0.75rem;
text-transform: uppercase;
letter-spacing: 0.15em;
color: var(--text-muted);
opacity: 0.5;
}

.marquee-author span {
margin-left: 0.5rem;
opacity: 0.5;
}

@keyframes scroll-marquee {
from { transform: translateX(0); }
to { transform: translateX(-50%); } /* Scrolls exactly half the track width for a seamless loop */
}

/* 9. CTA / Contact */
.contact-section {
background: radial-gradient(circle at 50% 100%, rgba(255,255,255,0.05) 0%, transparent 70%), var(--bg-primary);
text-align: center;
padding: 10rem 0;
position: relative;
}

.contact-section::before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 1px;
background: linear-gradient(90deg, transparent 0%, var(--border-color) 50%, transparent 100%);
}

.contact-content {
max-width: 700px;
margin: 0 auto 4rem auto;
}

.contact-content h2 { margin-bottom: 1.5rem; }

.form-wrapper {
max-width: 700px;
margin: 0 auto;
text-align: left;
}

/* Custom Form Styling */
.custom-form-container {
background: rgba(13, 21, 38, 0.7);
backdrop-filter: blur(12px);
-webkit-backdrop-filter: blur(12px);
border-radius: 20px;
border: 1px solid rgba(0, 154, 252, 0.12);
padding: 40px;
box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
position: relative;
min-height: 600px; /* Provides stable height for absolute success state */
}

#nexhome-contact-form {
display: flex;
flex-direction: column;
gap: 24px;
transition: opacity 400ms ease;
}

.form-group {
display: flex;
flex-direction: column;
gap: 8px;
}

.form-group label {
font-family: 'Inter', sans-serif;
font-weight: 500;
font-size: 13px;
color: #7A90B0;
text-transform: uppercase;
letter-spacing: 0.08em;
}

.form-group input,
.form-group select,
.form-group textarea {
background: transparent;
border: none;
border-bottom: 1px solid rgba(255, 255, 255, 0.15);
color: #EAEEED;
font-family: 'Inter', sans-serif;
font-weight: 400;
font-size: 1rem;
padding: 8px 0;
outline: none;
transition: border-bottom-color 200ms ease;
width: 100%;
border-radius: 0; /* Prevents iOS rounding */
}

.form-group select {
appearance: none;
-webkit-appearance: none;
-moz-appearance: none;
background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="%237A90B0" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z"/></svg>');
background-repeat: no-repeat;
background-position: right center;
cursor: pointer;
}

.form-group select option {
background-color: var(--bg-primary);
color: #EAEEED;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
color: #7A90B0;
opacity: 1;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
border-bottom-color: #009AFC;
}

.form-submit-btn {
width: 100%;
background-color: #009AFC;
color: #FFFFFF;
font-family: 'Inter', sans-serif;
font-weight: 600;
font-size: 1rem;
border: none;
border-radius: 10px;
padding: 1rem;
cursor: pointer;
transition: transform 200ms ease, box-shadow 200ms ease;
margin-top: 8px;
}

.form-submit-btn:hover {
transform: translateY(-2px);
box-shadow: 0 0 24px rgba(0, 154, 252, 0.5);
}

/* Success State Prototype */
.form-success-state {
position: absolute;
inset: 0;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
text-align: center;
padding: 40px;
opacity: 0;
pointer-events: none;
transition: opacity 400ms ease;
}

.form-success-state.active {
opacity: 1;
pointer-events: auto;
}

.success-icon {
width: 64px;
height: 64px;
color: #009AFC;
margin-bottom: 24px;
}

.form-success-state h3 {
font-family: 'Inter', sans-serif;
font-weight: 700;
color: #FFFFFF;
font-size: 1.5rem;
margin-bottom: 12px;
}

.form-success-state p {
font-family: 'Inter', sans-serif;
font-weight: 400;
color: #7A90B0;
font-size: 1rem;
margin: 0;
}

/* 10. Footer */
footer {
background-color: #000;
padding: 5rem 0 2rem 0;
border-top: 1px solid var(--border-color);
}

.footer-grid {
display: grid;
grid-template-columns: 2fr 1fr 1fr 1fr;
gap: 4rem;
margin-bottom: 5rem;
}

.footer-brand img {
height: 24px;
margin-bottom: 1.5rem;
filter: brightness(1.2);
}

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

.footer-links h4 {
color: var(--text-primary);
margin-bottom: 1.5rem;
font-size: 0.9rem;
letter-spacing: 0.05em;
}

.footer-links ul { list-style: none; }
.footer-links ul li { margin-bottom: 0.75rem; }
.footer-links ul li a { color: var(--text-muted); font-size: 0.9rem; transition: color 0.2s; }
.footer-links ul li a:hover { color: var(--text-primary); }

.footer-bottom {
display: flex;
justify-content: space-between;
align-items: center;
padding-top: 2rem;
border-top: 1px solid var(--border-color);
color: var(--text-muted);
font-size: 0.85rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
h1 { font-size: 3.5rem; }
.process-grid, .showcase-block { grid-template-columns: 1fr; }
.process-right { display: none; }
.process-left { padding-right: 0; }
.showcase-block { padding: 0; gap: 0; }
.showcase-content { padding: 4rem 3rem; }
.showcase-vignette {
background: 
linear-gradient(to bottom, transparent 50%, rgba(13, 21, 38, 0.6) 100%),
radial-gradient(ellipse at center, transparent 60%, rgba(8,12,20,0.5) 100%);
}
/* Auto-show the video on touch/vertical layouts where hover isn't natural */
.showcase-media video {
opacity: 1;
}
.footer-grid { grid-template-columns: 1fr 1fr; gap: 3rem; }
.services-grid > div:nth-child(n) { grid-column: span 12; }
.hero-action-block { flex-direction: column; align-items: flex-end; gap: 1rem; }
.marquee-wrapper { 
mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent); 
-webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent); 
}
}

@media (max-width: 768px) {
section { padding: 5rem 0; } /* Tightened section padding on mobile */
header { width: 95%; top: 1rem; }
.nav-links {
display: none;
position: absolute;
top: calc(100% + 1rem);
left: 0;
width: 100%;
background-color: rgba(10, 10, 10, 0.95);
backdrop-filter: blur(20px);
border: 1px solid var(--border-color);
border-radius: 24px;
flex-direction: column;
padding: 2rem;
gap: 1.5rem;
text-align: center;
}
.nav-links.active { display: flex; }
.mobile-menu-btn { display: block; }
.footer-grid { grid-template-columns: 1fr; gap: 2.5rem; }
.stats-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
.hero { padding-top: 8rem; }
.hero-overlay {
background: 
radial-gradient(ellipse at top, transparent 10%, rgba(3, 3, 3, 0.6) 80%),
linear-gradient(to bottom, transparent 10%, var(--bg-primary) 95%);
}
.hero h1, .hero p, .section-label {
text-shadow: 0 2px 12px rgba(0, 0, 0, 0.9);
}
.hero { padding-top: 7rem; padding-bottom: 4rem; }
.hero-content { flex-direction: column; align-items: flex-start; gap: 1.5rem; } /* Tightened from 2.5rem */
.hero-action-block { flex-direction: row; width: 100%; justify-content: space-between; align-items: center; }
.marquee-item {
min-width: 280px; /* Better sizing for mobile screens */
padding: 0 1.5rem;
}
.marquee-wrapper { 
mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent); 
-webkit-mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent); 
}
.showcase-block { padding: 0; gap: 0; }
.showcase-content { padding: 3rem 1.5rem; } /* Tighter showcase mobile padding */
}

@media (max-width: 480px) {
h1 { font-size: 2.75rem; }
.stats-grid { grid-template-columns: 1fr; }
.hero-action-block { flex-direction: column; align-items: flex-start; gap: 1rem; }
.hero-action-block .btn { width: 100%; }
.process-action-block { flex-direction: column; align-items: flex-start; gap: 1.5rem; }
.process-action-block .btn { width: 100%; }
.custom-form-container { padding: 30px 20px; min-height: 550px; }
}
