<script lang="ts">
	import { onMount } from 'svelte';
	import { isAuthenticated, currentUser, logout } from '$lib/auth';
	import { api } from '$lib/api';
	import faviconUrl from '$lib/assets/favicon.svg';

	let licenseInfo: any = $state(null);
	let loadingLicense = $state(false);
	let menuOpen = $state(false);
	let scrolled = $state(false);
	let visibleSections = $state<Set<string>>(new Set());

	// Contact form state
	let contactForm = $state({ name: '', email: '', company: '', message: '', role: '' });
	let contactSending = $state(false);
	let contactSent = $state(false);

	onMount(() => {
		if ($isAuthenticated && $currentUser?.tenantId) {
			loadLicenseInfo();
		}

		const onScroll = () => { scrolled = window.scrollY > 40; };
		window.addEventListener('scroll', onScroll, { passive: true });

		const observer = new IntersectionObserver(
			(entries) => {
				entries.forEach((entry) => {
					if (entry.isIntersecting && entry.target.id) {
						visibleSections = new Set([...visibleSections, entry.target.id]);
					}
				});
			},
			{ threshold: 0.12 }
		);
		document.querySelectorAll('[data-reveal]').forEach((el) => observer.observe(el));

		return () => {
			window.removeEventListener('scroll', onScroll);
			observer.disconnect();
		};
	});

	async function loadLicenseInfo() {
		loadingLicense = true;
		const response = await api.licenses.myLicense();
		if (response.data) licenseInfo = response.data;
		loadingLicense = false;
	}

	async function handleContactSubmit(e: Event) {
		e.preventDefault();
		contactSending = true;
		await new Promise((r) => setTimeout(r, 1400));
		contactSending = false;
		contactSent = true;
	}

	function revealed(id: string) {
		return visibleSections.has(id);
	}
</script>

<!-- AUTHENTICATED VIEW -->
{#if $isAuthenticated}
	<div class="min-h-screen bg-gray-50">
		<header class="bg-white shadow">
			<div class="mx-auto max-w-7xl px-4 py-6 sm:px-6 lg:px-8 flex items-center justify-between">
				<div class="flex items-center gap-3">
					<img src={faviconUrl} alt="Anexo 76" class="w-10 h-10 rounded-xl" />
					<div>
						<h1 class="text-2xl font-bold tracking-tight text-gray-900">Anexo 76</h1>
						<p class="text-xs text-gray-500">Gestión de Comercio Exterior</p>
					</div>
				</div>
				<div class="flex items-center gap-4">
					<div class="text-right">
						<p class="text-sm font-medium text-gray-900">{$currentUser?.name || $currentUser?.username}</p>
						<p class="text-xs text-gray-500">{$currentUser?.email}</p>
					</div>
					<button
						onclick={() => logout()}
						class="rounded-md bg-red-600 px-4 py-2 text-sm font-semibold text-white shadow-sm hover:bg-red-500"
					>Cerrar Sesión</button>
				</div>
			</div>
		</header>
		<main class="mx-auto max-w-7xl px-4 py-8 sm:px-6 lg:px-8">
			<div class="text-center py-16">
				<h2 class="text-3xl font-bold text-gray-900">Bienvenido de vuelta</h2>
				<p class="mt-4 text-gray-600">Accede al panel desde el menú principal.</p>
				<a href="/dashboard" class="mt-8 inline-block rounded-md bg-blue-600 px-6 py-3 text-sm font-semibold text-white hover:bg-blue-500">
					Ir al Dashboard →
				</a>
			</div>
		</main>
	</div>

{:else}
<!-- LANDING PAGE -->
<div class="landing-root">

	<!-- STICKY NAV -->
	<nav class="landing-nav {scrolled ? 'nav-scrolled' : ''}">
		<div class="nav-inner">
			<a href="/" class="nav-brand">
				<img src={faviconUrl} alt="Anexo 76" class="nav-logo" />
				<span class="nav-title">Anexo <span class="nav-accent">76</span></span>
			</a>
			<ul class="nav-links">
				<li><a href="#features">Características</a></li>
				<li><a href="#industry">Para tu industria</a></li>
				<li><a href="#compliance">Cumplimiento SAT</a></li>
				<li><a href="#contact">Contacto</a></li>
			</ul>
			<div class="nav-cta">
				<a href="/login" class="btn-ghost">Iniciar sesión</a>
				<a href="#contact" class="btn-primary-sm">Solicitar demo</a>
				<button class="hamburger" onclick={() => (menuOpen = !menuOpen)} aria-label="Menú">
					<span class="bar {menuOpen ? 'bar-1-open' : ''}"></span>
					<span class="bar {menuOpen ? 'bar-2-open' : ''}"></span>
					<span class="bar {menuOpen ? 'bar-3-open' : ''}"></span>
				</button>
			</div>
		</div>
		{#if menuOpen}
			<div class="mobile-menu">
				<a href="#features" onclick={() => (menuOpen = false)}>Características</a>
				<a href="#industry" onclick={() => (menuOpen = false)}>Para tu industria</a>
				<a href="#compliance" onclick={() => (menuOpen = false)}>Cumplimiento SAT</a>
				<a href="#contact" onclick={() => (menuOpen = false)}>Contacto</a>
				<a href="/login" class="mobile-login-btn">Iniciar sesión</a>
			</div>
		{/if}
	</nav>

	<!-- HERO -->
	<section class="hero">
		<div class="blob blob-1"></div>
		<div class="blob blob-2"></div>
		<div class="blob blob-3"></div>
		<div class="hero-grid"></div>

		<div class="hero-content">
			<div class="hero-badge">
				<span class="badge-dot"></span>
				Plataforma SaaS · Comercio Exterior Mexicano
			</div>

			<div class="hero-logo-wrap">
				<div class="hero-logo-ring"></div>
				<div class="hero-logo-ring ring-2"></div>
				<img src={faviconUrl} alt="Anexo 76" class="hero-logo-img" />
			</div>

			<h1 class="hero-title">
				Cumplimiento fiscal y aduanal<br />
				<span class="hero-title-accent">sin complicaciones</span>
			</h1>
			<p class="hero-subtitle">
				<strong>Anexo 76</strong> es la solución SaaS para maquilas, empresas IMMEX y agentes aduanales
				que necesitan gestionar sus inventarios y reportes conforme a los Anexos 22, 24 y 30 del SAT.
			</p>

			<div class="hero-actions">
				<a href="#contact" class="btn-primary">
					Solicitar una demo
					<svg xmlns="http://www.w3.org/2000/svg" class="btn-icon" viewBox="0 0 20 20" fill="currentColor">
						<path fill-rule="evenodd" d="M10.293 3.293a1 1 0 011.414 0l6 6a1 1 0 010 1.414l-6 6a1 1 0 01-1.414-1.414L14.586 11H3a1 1 0 110-2h11.586l-4.293-4.293a1 1 0 010-1.414z" clip-rule="evenodd"/>
					</svg>
				</a>
				<a href="/login" class="btn-outline">Iniciar sesión</a>
			</div>

			<div class="trust-bar">
				<div class="trust-item">
					<svg class="trust-icon" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z"/></svg>
					<span>Normativa SAT</span>
				</div>
				<div class="trust-sep"></div>
				<div class="trust-item">
					<svg class="trust-icon" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M3 15a4 4 0 004 4h9a5 5 0 10-.1-9.999 5.002 5.002 0 10-9.78 2.096A4.001 4.001 0 003 15z"/></svg>
					<span>100% en la nube</span>
				</div>
				<div class="trust-sep"></div>
				<div class="trust-item">
					<svg class="trust-icon" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"/></svg>
					<span>Seguridad empresarial</span>
				</div>
				<div class="trust-sep"></div>
				<div class="trust-item">
					<svg class="trust-icon" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M13 10V3L4 14h7v7l9-11h-7z"/></svg>
					<span>Actualizaciones automáticas</span>
				</div>
			</div>
		</div>

		<div class="scroll-hint">
			<div class="scroll-mouse"><div class="scroll-wheel"></div></div>
			<span>Desplaza hacia abajo</span>
		</div>
	</section>

	<!-- STATS BAR -->
	<section class="stats-bar" id="stats" data-reveal>
		<div class="stats-inner {revealed('stats') ? 'revealed' : ''}">
			<div class="stat-item">
				<span class="stat-num">24<span class="stat-suffix">/30/22</span></span>
				<span class="stat-label">Anexos SAT cubiertos</span>
			</div>
			<div class="stat-divider"></div>
			<div class="stat-item">
				<span class="stat-num">100<span class="stat-suffix">%</span></span>
				<span class="stat-label">En la nube, sin instalación</span>
			</div>
			<div class="stat-divider"></div>
			<div class="stat-item">
				<span class="stat-num">Multi<span class="stat-suffix">-tenant</span></span>
				<span class="stat-label">Arquitectura escalable</span>
			</div>
			<div class="stat-divider"></div>
			<div class="stat-item">
				<span class="stat-num">SSO</span>
				<span class="stat-label">Google & Microsoft</span>
			</div>
		</div>
	</section>

	<!-- FEATURES -->
	<section class="section features-section" id="features">
		<div class="section-inner">
			<div class="section-badge" id="feat-badge" data-reveal>
				<span class={revealed('feat-badge') ? 'revealed' : ''}>Características</span>
			</div>
			<h2 class="section-title" id="feat-title" data-reveal>
				<span class={revealed('feat-title') ? 'revealed' : ''}>
					Todo lo que necesitas para cumplir con el SAT
				</span>
			</h2>
			<p class="section-subtitle" id="feat-sub" data-reveal>
				<span class={revealed('feat-sub') ? 'revealed' : ''}>
					Diseñado específicamente para la industria de comercio exterior en México.
				</span>
			</p>

			<div class="features-grid" id="feat-grid" data-reveal>
				{#each [
					{
						icon: `<path stroke-linecap="round" stroke-linejoin="round" d="M9 17V7m0 10a2 2 0 01-2 2H5a2 2 0 01-2-2V7a2 2 0 012-2h2a2 2 0 012 2m0 10a2 2 0 002 2h2a2 2 0 002-2M9 7a2 2 0 012-2h2a2 2 0 012 2m0 10V7m0 10a2 2 0 002 2h2a2 2 0 002-2V7a2 2 0 00-2-2h-2a2 2 0 00-2 2"/>`,
						title: 'Control de Inventarios',
						desc: 'Registro y seguimiento en tiempo real de materias primas, productos en proceso y productos terminados bajo régimen IMMEX.'
					},
					{
						icon: `<path stroke-linecap="round" stroke-linejoin="round" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"/>`,
						title: 'Reportes Automatizados',
						desc: 'Generación automática de reportes para el Anexo 24 y Anexo 30, y uso de los catálogos del Anexo 22 (instructivo de llenado y claves de pedimentos) conforme a los requisitos del SAT y VUCEM.'
					},
					{
						icon: `<path stroke-linecap="round" stroke-linejoin="round" d="M19 21V5a2 2 0 00-2-2H7a2 2 0 00-2 2v16m14 0h2m-2 0h-5m-9 0H3m2 0h5M9 7h1m-1 4h1m4-4h1m-1 4h1m-2 10v-5a1 1 0 011-1h2a1 1 0 011 1v5m-4 0h4"/>`,
						title: 'Multi-empresa',
						desc: 'Gestiona múltiples empresas desde una sola plataforma. Arquitectura multi-tenant con base de datos compartida o dedicada.'
					},
					{
						icon: `<path stroke-linecap="round" stroke-linejoin="round" d="M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"/>`,
						title: 'Seguridad Empresarial',
						desc: 'Autenticación con Keycloak, SSO con Google y Microsoft, control de acceso por roles y auditoría completa de operaciones.'
					},
					{
						icon: `<path stroke-linecap="round" stroke-linejoin="round" d="M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"/>`,
						title: 'Importación Masiva',
						desc: 'Importa operaciones, pedimentos y movimientos de inventario desde archivos Excel o XML de manera rápida y validada.'
					},
					{
						icon: `<path stroke-linecap="round" stroke-linejoin="round" d="M13 10V3L4 14h7v7l9-11h-7z"/>`,
						title: 'Actualizaciones Continuas',
						desc: 'La plataforma se actualiza automáticamente con los cambios normativos del SAT, sin interrupciones ni costos adicionales.'
					}
				] as feat, i}
					<div class="feat-card {revealed('feat-grid') ? 'revealed' : ''}" style="animation-delay: {i * 80}ms">
						<div class="feat-icon-wrap">
							<svg class="feat-icon" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.7">
								{@html feat.icon}
							</svg>
						</div>
						<h3 class="feat-title">{feat.title}</h3>
						<p class="feat-desc">{feat.desc}</p>
					</div>
				{/each}
			</div>
		</div>
	</section>

	<!-- FOR WHOM -->
	<section class="section industry-section" id="industry">
		<div class="section-inner">
			<div class="section-badge" id="ind-badge" data-reveal>
				<span class={revealed('ind-badge') ? 'revealed' : ''}>Para tu industria</span>
			</div>
			<h2 class="section-title" id="ind-title" data-reveal>
				<span class={revealed('ind-title') ? 'revealed' : ''}>
					Diseñado para los actores del comercio exterior
				</span>
			</h2>

			<div class="industry-grid" id="ind-grid" data-reveal>
				{#each [
					{
						emoji: '🏭',
						title: 'Maquiladoras',
						desc: 'Lleva el control preciso de tu programa de maquila: entradas, salidas, mermas y productos terminados con trazabilidad completa.',
						tags: ['Anexo 24', 'Inventarios', 'Mermas']
					},
					{
						emoji: '🌐',
						title: 'Empresas IMMEX',
						desc: 'Cumple con las obligaciones del programa IMMEX: reportes al SAT, control de temporalidad y recuperación de impuestos.',
						tags: ['Anexo 30', 'IMMEX', 'SAT']
					},
					{
						emoji: '🛃',
						title: 'Agentes Aduanales',
						desc: 'Gestiona múltiples clientes desde una sola plataforma. Crea organizaciones independientes con usuarios y permisos propios.',
						tags: ['Multi-cliente', 'Pedimentos', 'Roles']
					},
					{
						emoji: '📦',
						title: 'Importadores y Exportadores',
						desc: 'Controla tus operaciones de importación y exportación, vinculando pedimentos con movimientos de inventario automáticamente.',
						tags: ['Anexo 7226', 'Pedimentos', 'Exportación']
					}
				] as ind, i}
					<div class="ind-card {revealed('ind-grid') ? 'revealed' : ''}" style="animation-delay: {i * 100}ms">
						<div class="ind-emoji">{ind.emoji}</div>
						<h3 class="ind-title">{ind.title}</h3>
						<p class="ind-desc">{ind.desc}</p>
						<div class="ind-tags">
							{#each ind.tags as tag}
								<span class="ind-tag">{tag}</span>
							{/each}
						</div>
					</div>
				{/each}
			</div>
		</div>
	</section>

	<!-- COMPLIANCE -->
	<section class="section compliance-section" id="compliance">
		<div class="compliance-bg-blob"></div>
		<div class="section-inner compliance-inner">
			<div class="compliance-text {revealed('comp-text') ? 'revealed' : ''}" id="comp-text" data-reveal>
				<div class="section-badge" style="justify-content:flex-start;margin-bottom:1rem">
					<span style="background:rgba(255,255,255,0.1);color:#bfdbfe;border-color:rgba(255,255,255,0.2)" class={revealed('comp-text') ? 'revealed' : ''}>Normativa SAT</span>
				</div>
				<h2 class="section-title compliance-title {revealed('comp-text') ? 'visible' : ''}">
					Cumplimiento total con la regulación aduanal mexicana
				</h2>
				<p class="compliance-subtitle {revealed('comp-text') ? 'visible' : ''}">
					Nuestra plataforma fue construida desde cero para cumplir con las reglas generales de comercio
					exterior y los anexos de declaración del SAT.
				</p>
				<ul class="compliance-list {revealed('comp-text') ? 'visible' : ''}">
					{#each [
						'Anexo 24 – Inventarios de empresas con Programa IMMEX',
						'Anexo 30 – Sistema de Control de Inventarios',
						'Anexo 22 – Instructivo de llenado del pedimento y catálogos de claves aduanales',
						'Declaración Anual de Manufactura (DAM)',
						'Integración con pedimentos electrónicos',
						'Generación automática de archivos para presentación al SAT'
					] as item}
						<li class="compliance-item">
							<svg class="check-icon" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5">
								<path stroke-linecap="round" stroke-linejoin="round" d="M5 13l4 4L19 7"/>
							</svg>
							{item}
						</li>
					{/each}
				</ul>
				<a href="#contact" class="btn-primary btn-white">
					Conocer más
					<svg xmlns="http://www.w3.org/2000/svg" class="btn-icon" viewBox="0 0 20 20" fill="currentColor">
						<path fill-rule="evenodd" d="M10.293 3.293a1 1 0 011.414 0l6 6a1 1 0 010 1.414l-6 6a1 1 0 01-1.414-1.414L14.586 11H3a1 1 0 110-2h11.586l-4.293-4.293a1 1 0 010-1.414z" clip-rule="evenodd"/>
					</svg>
				</a>
			</div>

			<div class="compliance-cards" id="comp-cards" data-reveal>
				{#each [
					{ num: '24', label: 'Inventarios IMMEX', color: '#3b82f6' },
					{ num: '30', label: 'Control de Inventarios', color: '#6366f1' },
					{ num: '22', label: 'Llenado y claves de pedimentos', color: '#0ea5e9' }
				] as anexo, i}
					<div class="anexo-card {revealed('comp-cards') ? 'revealed' : ''}" style="animation-delay: {i * 130}ms; --card-color: {anexo.color}">
						<div class="anexo-label-small">Anexo</div>
						<div class="anexo-num">{anexo.num}</div>
						<div class="anexo-desc">{anexo.label}</div>
					</div>
				{/each}
			</div>
		</div>
	</section>

	<!-- HOW IT WORKS -->
	<section class="section how-section" id="how">
		<div class="section-inner">
			<div class="section-badge" id="how-badge" data-reveal>
				<span class={revealed('how-badge') ? 'revealed' : ''}>¿Cómo funciona?</span>
			</div>
			<h2 class="section-title" id="how-title" data-reveal>
				<span class={revealed('how-title') ? 'revealed' : ''}>Empieza en minutos, no en días</span>
			</h2>

			<div class="steps-grid" id="steps-grid" data-reveal>
				{#each [
					{ step: '01', title: 'Solicita tu acceso', desc: 'Contáctanos y en menos de 24 horas tendrás tu cuenta configurada con el nombre de tu empresa.' },
					{ step: '02', title: 'Configura tu organización', desc: 'Carga tu catálogo de insumos, productos y pedimentos. La plataforma te guía en cada paso.' },
					{ step: '03', title: 'Opera y controla', desc: 'Registra tus movimientos diarios y genera reportes automáticamente cuando el SAT lo requiera.' },
					{ step: '04', title: 'Siempre actualizado', desc: 'Las actualizaciones normativas se aplican automáticamente. Sin instalaciones ni interrupciones.' }
				] as s, i}
					<div class="step-item {revealed('steps-grid') ? 'revealed' : ''}" style="animation-delay: {i * 100}ms">
						<div class="step-num">{s.step}</div>
						<h3 class="step-title">{s.title}</h3>
						<p class="step-desc">{s.desc}</p>
					</div>
				{/each}
			</div>
		</div>
	</section>

	<!-- CONTACT / CTA -->
	<section class="section contact-section" id="contact">
		<div class="contact-bg-blob"></div>
		<div class="section-inner contact-inner">
			<div class="contact-info {revealed('contact-info') ? 'revealed' : ''}" id="contact-info" data-reveal>
				<div class="section-badge" style="justify-content:flex-start;margin-bottom:1rem">
					<span style="background:rgba(255,255,255,0.1);color:#bfdbfe;border-color:rgba(255,255,255,0.2)" class={revealed('contact-info') ? 'revealed' : ''}>Contratar</span>
				</div>
				<h2 class="section-title compliance-title {revealed('contact-info') ? 'visible' : ''}">
					¿Listo para transformar tu cumplimiento aduanal?
				</h2>
				<p class="compliance-subtitle {revealed('contact-info') ? 'visible' : ''}">
					Habla con nuestro equipo. Te mostraremos cómo Anexo 76 puede adaptarse a las necesidades
					de tu empresa o despacho.
				</p>
				<div class="contact-features {revealed('contact-info') ? 'visible' : ''}">
					{#each [
						'Demo personalizada sin compromiso',
						'Migración de datos existentes',
						'Capacitación incluida',
						'Soporte técnico dedicado'
					] as cf}
						<div class="cf-item">
							<div class="cf-dot"></div>
							<span>{cf}</span>
						</div>
					{/each}
				</div>
				<div class="made-by">
					<span>Desarrollado por</span>
					<strong> AduanaSoft</strong>
					<span> · México</span>
				</div>
			</div>

			<div class="contact-form-wrap {revealed('contact-form') ? 'revealed' : ''}" id="contact-form" data-reveal>
				<div class="contact-card">
					{#if contactSent}
						<div class="contact-success">
							<div class="success-icon-wrap">
								<svg fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5" class="success-icon">
									<path stroke-linecap="round" stroke-linejoin="round" d="M5 13l4 4L19 7"/>
								</svg>
							</div>
							<h3 class="success-title">¡Recibimos tu mensaje!</h3>
							<p class="success-desc">Un asesor de AduanaSoft se pondrá en contacto contigo en las próximas 24 horas.</p>
						</div>
					{:else}
						<h3 class="form-title">Solicita información</h3>
						<p class="form-subtitle">Sin compromiso. Respuesta en menos de 24 h.</p>
						<form class="cform" onsubmit={handleContactSubmit}>
							<div class="form-row">
								<div class="form-group">
									<label class="form-label" for="cf-name">Nombre completo <span class="req">*</span></label>
									<input id="cf-name" class="form-input" type="text" placeholder="Juan García" required bind:value={contactForm.name} />
								</div>
								<div class="form-group">
									<label class="form-label" for="cf-email">Correo electrónico <span class="req">*</span></label>
									<input id="cf-email" class="form-input" type="email" placeholder="juan@empresa.com" required bind:value={contactForm.email} />
								</div>
							</div>
							<div class="form-row">
								<div class="form-group">
									<label class="form-label" for="cf-company">Empresa <span class="req">*</span></label>
									<input id="cf-company" class="form-input" type="text" placeholder="Mi Empresa S.A. de C.V." required bind:value={contactForm.company} />
								</div>
								<div class="form-group">
									<label class="form-label" for="cf-role">Tu rol</label>
									<select id="cf-role" class="form-input" bind:value={contactForm.role}>
										<option value="">Selecciona...</option>
										<option>Director / Gerente</option>
										<option>Encargado de cumplimiento</option>
										<option>Agente Aduanal</option>
										<option>Contador / Fiscal</option>
										<option>TI / Sistemas</option>
										<option>Otro</option>
									</select>
								</div>
							</div>
							<div class="form-group">
								<label class="form-label" for="cf-message">¿Qué necesitas?</label>
								<textarea id="cf-message" class="form-input form-textarea" placeholder="Cuéntanos sobre tu empresa: número de empleados, volumen de operaciones, qué necesitas mejorar..." bind:value={contactForm.message} rows="3"></textarea>
							</div>
							<button class="form-submit" type="submit" disabled={contactSending}>
								{#if contactSending}
									<svg class="spin-icon" fill="none" viewBox="0 0 24 24">
										<circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"/>
										<path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"/>
									</svg>
									Enviando...
								{:else}
									Enviar solicitud
									<svg xmlns="http://www.w3.org/2000/svg" class="btn-icon" viewBox="0 0 20 20" fill="currentColor">
										<path fill-rule="evenodd" d="M10.293 3.293a1 1 0 011.414 0l6 6a1 1 0 010 1.414l-6 6a1 1 0 01-1.414-1.414L14.586 11H3a1 1 0 110-2h11.586l-4.293-4.293a1 1 0 010-1.414z" clip-rule="evenodd"/>
									</svg>
								{/if}
							</button>
							<p class="form-legal">
								Al enviar, aceptas nuestra
								<a href="/##">Política de Privacidad</a> y nuestros
								<a href="/##">Términos de Servicio</a>.
							</p>
						</form>
					{/if}
				</div>
			</div>
		</div>
	</section>

	<!-- FOOTER -->
	<footer class="site-footer">
		<div class="footer-inner">
			<div class="footer-brand">
				<img src={faviconUrl} alt="Anexo 76" class="footer-logo" />
				<div>
					<div class="footer-name">Anexo <span class="nav-accent">76</span></div>
					<div class="footer-byline">by <strong>AduanaSoft</strong></div>
				</div>
			</div>
			<div class="footer-links">
				<a href="#features">Características</a>
				<a href="#industry">Industrias</a>
				<a href="#compliance">Cumplimiento SAT</a>
				<a href="#contact">Contacto</a>
				<a href="/login">Iniciar sesión</a>
			</div>
			<div class="footer-copy">
				© {new Date().getFullYear()} AduanaSoft · Todos los derechos reservados · México
			</div>
		</div>
	</footer>

</div>
{/if}

<style>
/* ROOT */
.landing-root {
	font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
	color: #0f172a;
	overflow-x: hidden;
	background: #fff;
}
.nav-accent { color: #60a5fa; }

/* NAV */
.landing-nav {
	position: fixed;
	top: 0; left: 0; right: 0;
	z-index: 100;
	padding: 0 1.5rem;
	transition: background 0.3s, box-shadow 0.3s, backdrop-filter 0.3s;
}
.nav-scrolled {
	background: rgba(255,255,255,0.92);
	backdrop-filter: blur(16px);
	box-shadow: 0 1px 0 rgba(0,0,0,0.08), 0 4px 24px rgba(0,0,0,0.06);
}
.nav-inner {
	max-width: 1200px;
	margin: 0 auto;
	height: 68px;
	display: flex;
	align-items: center;
	gap: 2rem;
}
.nav-brand {
	display: flex; align-items: center; gap: 0.65rem;
	text-decoration: none; flex-shrink: 0;
}
.nav-logo {
	width: 36px; height: 36px; border-radius: 10px;
	filter: drop-shadow(0 2px 8px rgba(59,130,246,0.4));
}
.nav-title {
	font-size: 1.125rem; font-weight: 700;
	letter-spacing: -0.02em; color: #0f172a;
	transition: color 0.3s;
}
.landing-nav:not(.nav-scrolled) .nav-title { color: #f8fafc; }
.nav-links {
	display: flex; list-style: none; padding: 0; margin: 0;
	gap: 0.25rem; flex: 1;
}
.nav-links a {
	display: block; padding: 0.4rem 0.85rem;
	font-size: 0.9rem; color: #475569;
	text-decoration: none; border-radius: 8px;
	transition: color 0.2s, background 0.2s; font-weight: 500;
}
.nav-links a:hover { color: #2563eb; background: rgba(37,99,235,0.06); }
.nav-cta {
	display: flex; align-items: center;
	gap: 0.75rem; margin-left: auto;
}
.btn-ghost {
	padding: 0.45rem 1rem; font-size: 0.875rem; color: #475569;
	text-decoration: none; border-radius: 8px; font-weight: 600;
	transition: color 0.2s;
}
.btn-ghost:hover { color: #1d4ed8; }
.btn-primary-sm {
	padding: 0.45rem 1.1rem; font-size: 0.875rem;
	background: linear-gradient(135deg, #2563eb, #1d4ed8);
	color: #fff; text-decoration: none; border-radius: 8px;
	font-weight: 600; box-shadow: 0 2px 12px rgba(37,99,235,0.35);
	transition: opacity 0.2s, transform 0.15s;
}
.btn-primary-sm:hover { opacity: 0.9; transform: translateY(-1px); }
.hamburger {
	display: none; flex-direction: column; gap: 5px;
	background: none; border: none; cursor: pointer; padding: 6px;
}
.bar {
	display: block; width: 24px; height: 2.5px;
	background: #334155; border-radius: 4px;
	transition: transform 0.25s, opacity 0.25s;
}
.bar-1-open { transform: translateY(7.5px) rotate(45deg); }
.bar-2-open { opacity: 0; }
.bar-3-open { transform: translateY(-7.5px) rotate(-45deg); }
.mobile-menu {
	background: #fff; border-top: 1px solid #e2e8f0;
	padding: 1rem 0; display: flex; flex-direction: column;
}
.mobile-menu a {
	display: block; padding: 0.75rem 1.5rem;
	color: #334155; text-decoration: none;
	font-size: 0.95rem; font-weight: 500; transition: background 0.15s;
}
.mobile-menu a:hover { background: #f1f5f9; }
.mobile-login-btn {
	margin: 0.5rem 1.5rem 0;
	text-align: center !important;
	background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
	color: #fff !important;
	border-radius: 10px; padding: 0.75rem !important; font-weight: 600 !important;
}

/* HERO */
.hero {
	position: relative; min-height: 100vh;
	display: flex; flex-direction: column;
	align-items: center; justify-content: center;
	background: linear-gradient(145deg, #020817 0%, #0c1a3a 40%, #0f2460 70%, #1e3a8a 100%);
	overflow: hidden; padding: 120px 1.5rem 80px;
}
.blob {
	position: absolute; border-radius: 50%;
	filter: blur(80px); opacity: 0.18;
	animation: blobFloat 12s ease-in-out infinite alternate;
}
.blob-1 { width: 600px; height: 600px; background: #3b82f6; top: -150px; left: -150px; animation-delay: 0s; }
.blob-2 { width: 500px; height: 500px; background: #6366f1; bottom: -100px; right: -100px; animation-delay: -4s; }
.blob-3 { width: 350px; height: 350px; background: #0ea5e9; top: 50%; left: 50%; transform: translate(-50%,-50%); animation: blobFloat3 16s ease-in-out infinite alternate; }
@keyframes blobFloat {
	0% { transform: translate(0,0) scale(1); }
	100% { transform: translate(40px,30px) scale(1.1); }
}
@keyframes blobFloat3 {
	0% { transform: translate(-50%,-50%) scale(1); }
	100% { transform: translate(calc(-50% + 30px),calc(-50% + 20px)) scale(1.08); }
}
.hero-grid {
	position: absolute; inset: 0;
	background-image: linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
	background-size: 60px 60px;
}
.hero-content {
	position: relative; z-index: 10;
	display: flex; flex-direction: column;
	align-items: center; text-align: center;
	max-width: 820px; width: 100%;
}
.hero-badge {
	display: inline-flex; align-items: center; gap: 0.6rem;
	background: rgba(59,130,246,0.15); border: 1px solid rgba(59,130,246,0.3);
	color: #93c5fd; font-size: 0.8125rem; font-weight: 600;
	letter-spacing: 0.04em; padding: 0.4rem 1rem; border-radius: 100px;
	margin-bottom: 2rem; animation: fadeInDown 0.7s ease both;
}
.badge-dot {
	width: 7px; height: 7px; background: #60a5fa;
	border-radius: 50%; animation: pulseDot 2s ease-in-out infinite;
}
@keyframes pulseDot {
	0%,100% { opacity: 1; transform: scale(1); }
	50% { opacity: 0.4; transform: scale(0.8); }
}
.hero-logo-wrap {
	position: relative; width: 96px; height: 96px;
	display: flex; align-items: center; justify-content: center;
	margin-bottom: 2rem; animation: fadeInDown 0.7s 0.1s ease both;
}
.hero-logo-ring {
	position: absolute; inset: -12px; border-radius: 50%;
	border: 1.5px solid rgba(59,130,246,0.25);
	animation: spinRing 12s linear infinite;
}
.ring-2 { inset: -22px; border-color: rgba(99,102,241,0.15); animation-duration: 20s; animation-direction: reverse; }
@keyframes spinRing { from { transform: rotate(0); } to { transform: rotate(360deg); } }
.hero-logo-img {
	width: 80px; height: 80px; border-radius: 22px;
	box-shadow: 0 0 0 1px rgba(255,255,255,0.08), 0 8px 32px rgba(37,99,235,0.5), 0 0 60px rgba(59,130,246,0.25);
	animation: floatLogo 5s ease-in-out infinite;
}
@keyframes floatLogo {
	0%,100% { transform: translateY(0); }
	50% { transform: translateY(-8px); }
}
.hero-title {
	font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 800;
	line-height: 1.12; letter-spacing: -0.03em; color: #f8fafc;
	margin: 0 0 1.25rem; animation: fadeInUp 0.7s 0.2s ease both;
}
.hero-title-accent {
	background: linear-gradient(135deg, #60a5fa, #818cf8, #38bdf8);
	-webkit-background-clip: text; -webkit-text-fill-color: transparent;
	background-clip: text;
}
.hero-subtitle {
	font-size: clamp(1rem, 2vw, 1.2rem); color: #94a3b8; line-height: 1.7;
	max-width: 640px; margin: 0 auto 2.5rem;
	animation: fadeInUp 0.7s 0.3s ease both;
}
.hero-subtitle strong { color: #cbd5e1; }
.hero-actions {
	display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center;
	margin-bottom: 3rem; animation: fadeInUp 0.7s 0.4s ease both;
}
.btn-primary {
	display: inline-flex; align-items: center; gap: 0.5rem;
	padding: 0.875rem 1.75rem;
	background: linear-gradient(135deg, #2563eb, #1d4ed8);
	color: #fff; text-decoration: none; border-radius: 12px;
	font-weight: 700; font-size: 1rem;
	box-shadow: 0 4px 24px rgba(37,99,235,0.45), 0 0 0 1px rgba(255,255,255,0.06) inset;
	transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(37,99,235,0.55); }
.btn-primary.btn-white { background: #fff; color: #1d4ed8; box-shadow: 0 4px 24px rgba(0,0,0,0.15); }
.btn-primary.btn-white:hover { box-shadow: 0 8px 32px rgba(0,0,0,0.2); }
.btn-outline {
	display: inline-flex; align-items: center; gap: 0.5rem;
	padding: 0.875rem 1.75rem;
	background: rgba(255,255,255,0.06); color: #e2e8f0;
	text-decoration: none; border-radius: 12px; font-weight: 700; font-size: 1rem;
	border: 1.5px solid rgba(255,255,255,0.15);
	transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
.btn-outline:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.3); transform: translateY(-2px); }
.btn-icon { width: 18px; height: 18px; flex-shrink: 0; }
.trust-bar {
	display: flex; align-items: center; flex-wrap: wrap;
	justify-content: center; gap: 1.25rem;
	animation: fadeInUp 0.7s 0.55s ease both;
}
.trust-item { display: flex; align-items: center; gap: 0.5rem; font-size: 0.8125rem; color: #64748b; font-weight: 500; }
.trust-icon { width: 15px; height: 15px; color: #3b82f6; flex-shrink: 0; }
.trust-sep { width: 1px; height: 18px; background: rgba(255,255,255,0.1); }
.scroll-hint {
	position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
	display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
	opacity: 0.4; color: #94a3b8; font-size: 0.75rem;
	animation: fadeInUp 1s 1.2s ease both;
}
.scroll-mouse { width: 24px; height: 36px; border: 1.5px solid currentColor; border-radius: 12px; display: flex; justify-content: center; padding-top: 5px; }
.scroll-wheel { width: 4px; height: 8px; border-radius: 2px; background: currentColor; animation: scrollWheel 2s ease-in-out infinite; }
@keyframes scrollWheel {
	0% { opacity: 1; transform: translateY(0); }
	80% { opacity: 0; transform: translateY(10px); }
	100% { opacity: 0; transform: translateY(0); }
}

/* STATS BAR */
.stats-bar { background: linear-gradient(135deg, #1e3a8a, #1d4ed8); padding: 2.5rem 1.5rem; }
.stats-inner {
	max-width: 900px; margin: 0 auto;
	display: flex; align-items: center; justify-content: space-around;
	flex-wrap: wrap; gap: 1.5rem;
	opacity: 0; transform: translateY(24px);
	transition: opacity 0.7s, transform 0.7s;
}
.stats-inner.revealed { opacity: 1; transform: none; }
.stat-item { display: flex; flex-direction: column; align-items: center; gap: 0.25rem; }
.stat-num { font-size: 2rem; font-weight: 800; color: #fff; letter-spacing: -0.03em; line-height: 1; }
.stat-suffix { font-size: 1.1rem; font-weight: 700; color: #93c5fd; }
.stat-label { font-size: 0.8125rem; color: #bfdbfe; font-weight: 500; text-align: center; }
.stat-divider { width: 1px; height: 40px; background: rgba(255,255,255,0.15); }

/* GENERIC SECTION */
.section { padding: 6rem 1.5rem; }
.section-inner { max-width: 1160px; margin: 0 auto; }
.section-badge { display: flex; justify-content: center; margin-bottom: 1rem; }
.section-badge span {
	display: inline-block;
	background: rgba(37,99,235,0.08); color: #2563eb;
	border: 1px solid rgba(37,99,235,0.2);
	font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.06em;
	text-transform: uppercase; padding: 0.35rem 1rem; border-radius: 100px;
	opacity: 0; transform: translateY(12px);
	transition: opacity 0.5s, transform 0.5s;
}
.section-badge span.revealed { opacity: 1; transform: none; }
.section-title {
	font-size: clamp(1.6rem, 4vw, 2.5rem); font-weight: 800;
	letter-spacing: -0.03em; color: #0f172a;
	text-align: center; margin: 0 0 1rem; line-height: 1.15;
}
.section-title span {
	display: block; opacity: 0; transform: translateY(20px);
	transition: opacity 0.6s 0.1s, transform 0.6s 0.1s;
}
.section-title span.revealed { opacity: 1; transform: none; }
.section-subtitle {
	font-size: 1.0625rem; color: #64748b;
	text-align: center; max-width: 600px; margin: 0 auto 3.5rem; line-height: 1.7;
}
.section-subtitle span {
	display: block; opacity: 0; transform: translateY(16px);
	transition: opacity 0.6s 0.2s, transform 0.6s 0.2s;
}
.section-subtitle span.revealed { opacity: 1; transform: none; }

/* COMPLIANCE */
.compliance-title {
	color: #f8fafc; text-align: left; margin-bottom: 0.75rem;
	opacity: 0; transform: translateY(20px);
	transition: opacity 0.6s 0.15s, transform 0.6s 0.15s;
}
.compliance-title.visible { opacity: 1; transform: none; }
.compliance-subtitle {
	color: #94a3b8; font-size: 1.0625rem; line-height: 1.7; margin-bottom: 1.5rem;
	opacity: 0; transform: translateY(16px);
	transition: opacity 0.6s 0.25s, transform 0.6s 0.25s;
}
.compliance-subtitle.visible { opacity: 1; transform: none; }

/* FEATURES GRID */
.features-section { background: #f8fafc; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.5rem; }
.feat-card {
	background: #fff; border-radius: 16px; padding: 1.75rem;
	border: 1px solid #e2e8f0;
	transition: box-shadow 0.25s, transform 0.25s, border-color 0.25s;
	opacity: 0; transform: translateY(28px);
}
.feat-card.revealed { animation: cardReveal 0.55s ease both; }
@keyframes cardReveal {
	from { opacity: 0; transform: translateY(28px); }
	to { opacity: 1; transform: none; }
}
.feat-card:hover { box-shadow: 0 8px 32px rgba(37,99,235,0.12); transform: translateY(-3px); border-color: #bfdbfe; }
.feat-icon-wrap { width: 48px; height: 48px; background: linear-gradient(135deg, #eff6ff, #dbeafe); border-radius: 12px; display: flex; align-items: center; justify-content: center; margin-bottom: 1.25rem; }
.feat-icon { width: 24px; height: 24px; color: #2563eb; }
.feat-title { font-size: 1.0625rem; font-weight: 700; color: #0f172a; margin: 0 0 0.5rem; }
.feat-desc { font-size: 0.9rem; color: #64748b; line-height: 1.65; margin: 0; }

/* INDUSTRY */
.industry-section { background: #fff; }
.industry-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.5rem; }
.ind-card {
	background: linear-gradient(145deg, #f8fafc, #fff);
	border: 1px solid #e2e8f0; border-radius: 18px; padding: 2rem 1.5rem;
	transition: box-shadow 0.25s, transform 0.25s, border-color 0.25s;
	opacity: 0; transform: translateY(28px);
}
.ind-card.revealed { animation: cardReveal 0.55s ease both; }
.ind-card:hover { box-shadow: 0 10px 36px rgba(37,99,235,0.1); transform: translateY(-4px); border-color: #bfdbfe; }
.ind-emoji { font-size: 2.5rem; margin-bottom: 1rem; line-height: 1; }
.ind-title { font-size: 1.125rem; font-weight: 700; color: #0f172a; margin: 0 0 0.6rem; }
.ind-desc { font-size: 0.9rem; color: #64748b; line-height: 1.65; margin: 0 0 1.25rem; }
.ind-tags { display: flex; gap: 0.45rem; flex-wrap: wrap; }
.ind-tag { background: #eff6ff; color: #2563eb; font-size: 0.75rem; font-weight: 600; padding: 0.25rem 0.65rem; border-radius: 100px; border: 1px solid #bfdbfe; }

/* COMPLIANCE SECTION */
.compliance-section {
	background: linear-gradient(145deg, #020817 0%, #0c1a3a 50%, #1e3a8a 100%);
	position: relative; overflow: hidden;
}
.compliance-bg-blob {
	position: absolute; width: 800px; height: 800px;
	background: radial-gradient(circle, rgba(59,130,246,0.12) 0%, transparent 70%);
	top: 50%; left: 50%; transform: translate(-50%,-50%);
	pointer-events: none;
}
.compliance-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; align-items: center; }
.compliance-text {
	opacity: 0; transform: translateX(-32px);
	transition: opacity 0.7s, transform 0.7s;
}
.compliance-text.revealed { opacity: 1; transform: none; }
.compliance-list {
	list-style: none; padding: 0; margin: 0 0 2rem;
	display: flex; flex-direction: column; gap: 0.75rem;
	opacity: 0; transform: translateY(12px);
	transition: opacity 0.6s 0.3s, transform 0.6s 0.3s;
}
.compliance-list.visible { opacity: 1; transform: none; }
.compliance-item { display: flex; align-items: center; gap: 0.75rem; font-size: 0.9375rem; color: #cbd5e1; }
.check-icon { width: 18px; height: 18px; color: #60a5fa; flex-shrink: 0; }
.compliance-cards { display: flex; flex-direction: column; gap: 1.25rem; }
.anexo-card {
	background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08);
	backdrop-filter: blur(8px); border-radius: 16px;
	padding: 1.5rem 1.75rem; display: flex; align-items: center; gap: 1.25rem;
	transition: background 0.25s, border-color 0.25s, transform 0.25s;
	opacity: 0; transform: translateX(32px);
}
.anexo-card.revealed { animation: slideInRight 0.6s ease both; }
@keyframes slideInRight {
	from { opacity: 0; transform: translateX(32px); }
	to { opacity: 1; transform: none; }
}
.anexo-card:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.18); transform: translateX(-4px); }
.anexo-label-small { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: #64748b; }
.anexo-num { font-size: 2.5rem; font-weight: 900; color: var(--card-color, #3b82f6); line-height: 1; letter-spacing: -0.04em; min-width: 64px; text-align: center; }
.anexo-desc { font-size: 0.9375rem; color: #e2e8f0; font-weight: 600; }

/* HOW IT WORKS */
.how-section { background: #f8fafc; }
.steps-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 2rem; margin-top: 1rem; }
.step-item { display: flex; flex-direction: column; align-items: center; text-align: center; opacity: 0; transform: translateY(24px); }
.step-item.revealed { animation: cardReveal 0.55s ease both; }
.step-num { width: 64px; height: 64px; background: linear-gradient(135deg, #2563eb, #3b82f6); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.25rem; font-weight: 800; letter-spacing: -0.04em; margin-bottom: 1.25rem; box-shadow: 0 4px 20px rgba(37,99,235,0.35); flex-shrink: 0; }
.step-title { font-size: 1.0625rem; font-weight: 700; color: #0f172a; margin: 0 0 0.5rem; }
.step-desc { font-size: 0.9rem; color: #64748b; line-height: 1.65; margin: 0; }

/* CONTACT */
.contact-section {
	background: linear-gradient(145deg, #020817 0%, #0c1a3a 50%, #1e3a8a 100%);
	position: relative; overflow: hidden;
}
.contact-bg-blob {
	position: absolute; width: 700px; height: 700px;
	background: radial-gradient(circle, rgba(99,102,241,0.15) 0%, transparent 70%);
	bottom: -200px; right: -100px; pointer-events: none;
}
.contact-inner { display: grid; grid-template-columns: 1fr 1.1fr; gap: 4rem; align-items: start; }
.contact-info {
	padding-top: 1rem; opacity: 0; transform: translateX(-32px);
	transition: opacity 0.7s, transform 0.7s;
}
.contact-info.revealed { opacity: 1; transform: none; }
.contact-features {
	display: flex; flex-direction: column; gap: 0.75rem;
	margin: 1.5rem 0 2rem;
	opacity: 0; transform: translateY(12px);
	transition: opacity 0.6s 0.3s, transform 0.6s 0.3s;
}
.contact-features.visible { opacity: 1; transform: none; }
.cf-item { display: flex; align-items: center; gap: 0.75rem; color: #cbd5e1; font-size: 0.9375rem; }
.cf-dot { width: 8px; height: 8px; background: #3b82f6; border-radius: 50%; flex-shrink: 0; }
.made-by { font-size: 0.875rem; color: #475569; margin-top: 0.5rem; }
.made-by strong { color: #60a5fa; }
.contact-form-wrap {
	opacity: 0; transform: translateX(32px);
	transition: opacity 0.7s 0.2s, transform 0.7s 0.2s;
}
.contact-form-wrap.revealed { opacity: 1; transform: none; }
.contact-card { background: #fff; border-radius: 20px; padding: 2rem; box-shadow: 0 24px 64px rgba(0,0,0,0.3); }
.contact-success { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; padding: 2rem 0; }
.success-icon-wrap { width: 64px; height: 64px; background: linear-gradient(135deg, #22c55e, #16a34a); border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 20px rgba(34,197,94,0.35); }
.success-icon { width: 32px; height: 32px; color: #fff; }
.success-title { font-size: 1.25rem; font-weight: 700; color: #0f172a; margin: 0; }
.success-desc { color: #64748b; font-size: 0.9375rem; text-align: center; margin: 0; }
.form-title { font-size: 1.25rem; font-weight: 700; color: #0f172a; margin: 0 0 0.25rem; }
.form-subtitle { font-size: 0.875rem; color: #64748b; margin: 0 0 1.5rem; }
.cform { display: flex; flex-direction: column; gap: 1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { display: flex; flex-direction: column; gap: 0.35rem; }
.form-label { font-size: 0.8125rem; font-weight: 600; color: #374151; }
.req { color: #ef4444; }
.form-input {
	padding: 0.65rem 0.875rem; border: 1.5px solid #e5e7eb;
	border-radius: 10px; font-size: 0.9375rem; color: #111827;
	background: #f9fafb; transition: border-color 0.2s, box-shadow 0.2s;
	outline: none; font-family: inherit; width: 100%; box-sizing: border-box;
}
.form-input:focus { border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,0.12); background: #fff; }
.form-textarea { resize: none; }
.form-submit {
	display: flex; align-items: center; justify-content: center; gap: 0.5rem;
	padding: 0.875rem; background: linear-gradient(135deg, #2563eb, #1d4ed8);
	color: #fff; border: none; border-radius: 12px; font-size: 1rem; font-weight: 700;
	cursor: pointer; box-shadow: 0 4px 20px rgba(37,99,235,0.35);
	transition: opacity 0.2s, transform 0.15s; font-family: inherit; margin-top: 0.25rem;
}
.form-submit:hover:not(:disabled) { opacity: 0.9; transform: translateY(-1px); }
.form-submit:disabled { opacity: 0.7; cursor: not-allowed; }
.spin-icon { width: 18px; height: 18px; animation: spin 1s linear infinite; }
@keyframes spin { from { transform: rotate(0); } to { transform: rotate(360deg); } }
.form-legal { font-size: 0.75rem; color: #9ca3af; text-align: center; margin: 0; }
.form-legal a { color: #2563eb; text-decoration: none; }
.form-legal a:hover { text-decoration: underline; }

/* FOOTER */
.site-footer { background: #020817; border-top: 1px solid rgba(255,255,255,0.06); padding: 2.5rem 1.5rem; }
.footer-inner { max-width: 1160px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1.5rem; }
.footer-brand { display: flex; align-items: center; gap: 0.75rem; }
.footer-logo { width: 36px; height: 36px; border-radius: 10px; }
.footer-name { font-size: 1rem; font-weight: 700; color: #e2e8f0; }
.footer-byline { font-size: 0.75rem; color: #475569; }
.footer-byline strong { color: #60a5fa; }
.footer-links { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.footer-links a { font-size: 0.875rem; color: #64748b; text-decoration: none; transition: color 0.2s; }
.footer-links a:hover { color: #94a3b8; }
.footer-copy { font-size: 0.8125rem; color: #334155; }

/* KEYFRAMES */
@keyframes fadeInDown {
	from { opacity: 0; transform: translateY(-20px); }
	to { opacity: 1; transform: none; }
}
@keyframes fadeInUp {
	from { opacity: 0; transform: translateY(24px); }
	to { opacity: 1; transform: none; }
}

/* RESPONSIVE */
@media (max-width: 900px) {
	.compliance-inner, .contact-inner { grid-template-columns: 1fr; gap: 3rem; }
	.compliance-title, .compliance-subtitle { text-align: center; }
	.compliance-list { margin: 0 auto 2rem; }
	.nav-links { display: none; }
	.hamburger { display: flex; }
	.btn-ghost, .btn-primary-sm { display: none; }
}
@media (max-width: 640px) {
	.form-row { grid-template-columns: 1fr; }
	.stat-divider { display: none; }
	.hero-actions { flex-direction: column; align-items: stretch; }
	.btn-primary, .btn-outline { text-align: center; justify-content: center; }
	.trust-sep { display: none; }
	.trust-bar { gap: 1rem; }
	.footer-inner { flex-direction: column; align-items: flex-start; }
	.footer-links { gap: 1rem; }
}
</style>
