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

/* ── DARK THEME (default / noche) ──────────────── */
:root {
	--bg:        #000000;
	--bg2:       #05090f;
	--bg3:       #090e1a;
	--border:    rgba(255,255,255,.07);
	--accent:    #2563eb;
	--accent2:   #1d4ed8;
	--green:     #60a5fa;
	--text:      #e2e8f0;
	--muted:     #64748b;
	--radius:    14px;
	--transition: .25s cubic-bezier(.4,0,.2,1);
	--nav-bg:    rgba(8,12,20,.88);
	--nav-open:  rgba(8,12,20,.99);
	--btn-ghost-bg:     rgba(255,255,255,.04);
	--btn-ghost-border: rgba(255,255,255,.1);
	--tag-bg:    rgba(255,255,255,.05);
}

/* ── LIGHT THEME (día) ─────────────────────────── */
[data-theme="light"] {
	--bg:        #f0f4ff;
	--bg2:       #e8eeff;
	--bg3:       #dce4ff;
	--border:    rgba(37,99,235,.13);
	--text:      #0d1a3a;
	--muted:     #4a5878;
	--nav-bg:    rgba(240,244,255,.92);
	--nav-open:  rgba(240,244,255,.99);
	--btn-ghost-bg:     rgba(37,99,235,.06);
	--btn-ghost-border: rgba(37,99,235,.2);
	--tag-bg:    rgba(37,99,235,.08);
}

html {
	scroll-behavior: smooth;
	transition: background-color .6s ease;
}

body {
	font-family: 'Inter', sans-serif;
	background: var(--bg);
	color: var(--text);
	overflow-x: hidden;
	line-height: 1.6;
	transition: background-color .6s ease, color .4s ease;
}

/* ── NOISE OVERLAY ─────────────────────────────── */
body::before {
	content: '';
	position: fixed; inset: 0;
	background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='.04'/%3E%3C/svg%3E");
	pointer-events: none; z-index: 0;
}

/* ── NAV ───────────────────────────────────────── */
nav {
	position: fixed; top: 0; left: 0; right: 0; z-index: 100;
	display: flex; align-items: center; justify-content: space-between;
	padding: 1.1rem 5vw;
	background: var(--nav-bg);
	backdrop-filter: blur(18px) saturate(1.5);
	border-bottom: 1px solid var(--border);
	transition: background-color .6s ease, border-color .4s ease;
}

.nav-logo {
	text-decoration: none;
	display: flex; align-items: center;
}

.logo-img {
	height: 38px;
	width: auto;
	display: block;
	object-fit: contain;
	transition: opacity var(--transition);
}

.nav-logo:hover .logo-img { opacity: .85; }

/* En tema claro el logo puede necesitar inversión si es blanco */
[data-theme="light"] .logo-img {
	filter: brightness(0) saturate(100%) invert(20%) sepia(80%) saturate(700%) hue-rotate(210deg);
}

.nav-links {
	display: flex; gap: 2rem; list-style: none;
}

.nav-links a {
	color: var(--muted); text-decoration: none; font-size: .875rem;
	font-weight: 500; letter-spacing: .01em;
	transition: color var(--transition);
}

.nav-links a:hover { color: var(--text); }

.nav-cta {
	background: linear-gradient(135deg, var(--accent), var(--accent2));
	color: #fff !important; padding: .5rem 1.25rem;
	border-radius: 8px; font-weight: 600 !important;
}

.nav-cta:hover { opacity: .85; color: #fff !important; }

/* hamburger */
.nav-toggle { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 4px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: var(--transition); }

/* ── HERO ──────────────────────────────────────── */
#hero {
	min-height: 100vh;
	display: flex; align-items: center; justify-content: center;
	position: relative; overflow: hidden;
	padding: 8rem 5vw 5rem;
}

#mol-canvas {
	position: absolute; inset: 0;
	width: 100%; height: 100%;
	pointer-events: none; z-index: 0;
}

/* central radial glow behind text */
.hero-core-glow {
	position: absolute; pointer-events: none; z-index: 0;
	width: 900px; height: 900px;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(37,99,235,.13) 0%, rgba(29,78,216,.06) 40%, transparent 70%);
	top: 50%; left: 50%;
	transform: translate(-50%, -50%);
	animation: corePulse 5s ease-in-out infinite;
}

@keyframes corePulse {
	0%,100% { transform: translate(-50%,-50%) scale(1);   opacity: 1; }
	50%      { transform: translate(-50%,-50%) scale(1.1); opacity: .75; }
}

.hero-center {
	position: relative; z-index: 1;
	display: flex; flex-direction: column;
	align-items: center; text-align: center;
	max-width: 860px;
}

.hero-badge {
	display: inline-flex; align-items: center; gap: .5rem;
	background: rgba(37,99,235,.1); border: 1px solid rgba(37,99,235,.3);
	color: var(--accent); padding: .4rem 1rem; border-radius: 100px;
	font-size: .78rem; font-weight: 700; letter-spacing: .06em;
	text-transform: uppercase; margin-bottom: 2rem;
	backdrop-filter: blur(8px);
	animation: fadeUp .6s ease both;
}

.hero-badge::before {
	content: ''; width: 7px; height: 7px; border-radius: 50%;
	background: var(--accent);
	animation: pulse 1.8s ease-in-out infinite;
}

@keyframes pulse   { 0%,100%{opacity:1} 50%{opacity:.3} }
@keyframes fadeUp  { from{opacity:0;transform:translateY(20px)} to{opacity:1;transform:none} }
@keyframes fadeUp2 { from{opacity:0;transform:translateY(28px)} to{opacity:1;transform:none} }
@keyframes fadeUp3 { from{opacity:0;transform:translateY(32px)} to{opacity:1;transform:none} }

h1 {
	font-size: clamp(2.6rem, 5.5vw, 4.4rem);
	font-weight: 900; line-height: 1.08; letter-spacing: -.04em;
	margin-bottom: 1.5rem;
	animation: fadeUp2 .7s .1s ease both;
}

.gradient-text {
	background: linear-gradient(135deg, #60a5fa 0%, var(--accent) 40%, var(--accent2) 100%);
	-webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

.hero-subtitle {
	font-size: 1.12rem; color: var(--muted); max-width: 560px;
	margin-bottom: 2.8rem; line-height: 1.75;
	animation: fadeUp3 .7s .2s ease both;
}

.hero-actions {
	display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center;
	animation: fadeUp3 .7s .35s ease both;
}

.btn-primary {
	display: inline-flex; align-items: center; gap: .5rem;
	background: linear-gradient(135deg, var(--accent), var(--accent2));
	color: #fff; text-decoration: none; padding: .85rem 2rem;
	border-radius: 10px; font-weight: 700; font-size: .95rem;
	transition: var(--transition); box-shadow: 0 8px 32px rgba(37,99,235,.35);
}

.btn-primary:hover {
	transform: translateY(-2px);
	box-shadow: 0 14px 44px rgba(37,99,235,.5);
}

.btn-ghost {
	display: inline-flex; align-items: center; gap: .5rem;
	background: var(--btn-ghost-bg);
	color: var(--text); text-decoration: none; padding: .85rem 2rem;
	border-radius: 10px; font-weight: 600; font-size: .95rem;
	border: 1px solid var(--btn-ghost-border);
	transition: var(--transition); backdrop-filter: blur(6px);
}

.btn-ghost:hover { border-color: var(--accent); color: var(--accent); background: rgba(37,99,235,.08); }

/* hero stats strip */
.hero-stats {
	display: flex; gap: 2.5rem; margin-top: 4rem; flex-wrap: wrap; justify-content: center;
	animation: fadeUp3 .7s .5s ease both;
}

.hero-stat {
	display: flex; flex-direction: column; align-items: center; gap: .2rem;
}

.hero-stat-num {
	font-size: 1.8rem; font-weight: 900; letter-spacing: -.04em;
	background: linear-gradient(135deg, #60a5fa, var(--accent));
	-webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

.hero-stat-label {
	font-size: .75rem; color: var(--muted); font-weight: 500; letter-spacing: .04em;
	text-transform: uppercase;
}

.hero-stat-divider {
	width: 1px; background: var(--border); align-self: stretch; margin: .2rem 0;
}

.token-keyword  { color: var(--accent2); }
.token-fn       { color: var(--accent); }
.token-string   { color: var(--green); }
.token-comment  { color: var(--muted); font-style: italic; }
.token-number   { color: #60a5fa; }

/* ── SECTION COMMONS ───────────────────────────── */
section { padding: 7rem 5vw; }

.section-header { text-align: center; max-width: 700px; margin: 0 auto 4rem; }

.section-tag {
	display: inline-block; font-size: .75rem; font-weight: 700;
	letter-spacing: .1em; text-transform: uppercase;
	color: var(--accent); margin-bottom: 1rem;
}

h2 {
	font-size: clamp(1.8rem, 3.5vw, 2.8rem);
	font-weight: 800; letter-spacing: -.03em; line-height: 1.15;
	margin-bottom: 1rem;
}

.section-desc { color: var(--muted); font-size: 1.05rem; line-height: 1.7; }

.content-max { max-width: 1200px; margin: 0 auto; }

/* ── SERVICES ──────────────────────────────────── */
#services { background: var(--bg2); }

.services-grid {
	display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 1.5rem;
}

.service-card {
	background: var(--bg); border: 1px solid var(--border);
	border-radius: var(--radius); padding: 2rem;
	transition: var(--transition); position: relative; overflow: hidden;
	cursor: default;
}

.service-card::after {
	content: '';
	position: absolute; inset: 0;
	background: linear-gradient(135deg, rgba(37,99,235,.05), rgba(29,78,216,.05));
	opacity: 0; transition: var(--transition);
}

.service-card:hover { border-color: rgba(37,99,235,.35); transform: translateY(-4px); }
.service-card:hover::after { opacity: 1; }

.service-icon {
	width: 52px; height: 52px; border-radius: 12px;
	display: flex; align-items: center; justify-content: center;
	font-size: 1.5rem; margin-bottom: 1.25rem;
}

.ic-blue   { background: rgba(37,99,235,.12); }
.ic-purple { background: rgba(29,78,216,.12); }
.ic-green  { background: rgba(96,165,250,.12); }
.ic-orange { background: rgba(37,99,235,.12); }

.service-card h3 {
	font-size: 1.1rem; font-weight: 700; margin-bottom: .6rem;
}

.service-card p { color: var(--muted); font-size: .9rem; line-height: 1.65; }

.service-tags {
	display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1.25rem;
}

.tag {
	background: var(--tag-bg); border: 1px solid var(--border);
	color: var(--muted); padding: .2rem .65rem; border-radius: 6px;
	font-size: .75rem; font-weight: 500;
}

/* ── PROCESS ───────────────────────────────────── */
#process { background: var(--bg); }

.process-steps {
	display: grid; grid-template-columns: repeat(3, 1fr);
	gap: 2rem; position: relative;
}

.process-steps::before {
	content: '';
	position: absolute; top: 32px; left: calc(16.67% + 32px); right: calc(16.67% + 32px);
	height: 1px;
	background: linear-gradient(90deg, var(--accent), var(--accent2), var(--green));
	opacity: .3;
}

.step {
	text-align: center; padding: 2rem 1.5rem;
	background: var(--bg2); border: 1px solid var(--border);
	border-radius: var(--radius); transition: var(--transition);
}

.step:hover { border-color: rgba(37,99,235,.3); transform: translateY(-4px); }

.step-num {
	width: 64px; height: 64px; border-radius: 50%;
	display: flex; align-items: center; justify-content: center;
	font-size: 1.4rem; font-weight: 900; margin: 0 auto 1.25rem;
	background: linear-gradient(135deg, var(--accent), var(--accent2));
	color: #fff; box-shadow: 0 8px 24px rgba(37,99,235,.3);
}

.step h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: .6rem; }
.step p  { color: var(--muted); font-size: .875rem; line-height: 1.65; }

/* ── PRODUCTS ──────────────────────────────────── */
#products { background: var(--bg2); }

.products-grid {
	display: grid; grid-template-columns: 1fr 1fr;
	gap: 1.5rem;
}

.product-card {
	background: var(--bg); border: 1px solid var(--border);
	border-radius: var(--radius); padding: 2.5rem;
	transition: var(--transition); display: flex; gap: 1.5rem;
	align-items: flex-start;
}

.product-card:hover { border-color: rgba(37,99,235,.3); transform: translateY(-3px); }

.product-icon {
	font-size: 2.2rem; flex-shrink: 0;
	width: 60px; height: 60px;
	display: flex; align-items: center; justify-content: center;
	background: var(--bg2); border-radius: 14px; border: 1px solid var(--border);
}

.product-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: .5rem; }
.product-card p  { color: var(--muted); font-size: .875rem; line-height: 1.65; }

.product-link {
	display: inline-flex; align-items: center; gap: .4rem;
	color: var(--accent); font-size: .85rem; font-weight: 600;
	text-decoration: none; margin-top: .75rem;
	transition: gap var(--transition);
}

.product-link:hover { gap: .7rem; }

/* ── CONTACT ───────────────────────────────────── */
#contact { background: var(--bg2); }

.contact-grid {
	display: grid; grid-template-columns: 1fr 1fr;
	gap: 4rem; align-items: start;
}

.contact-info h2 { text-align: left; }
.contact-info .section-desc { text-align: left; }

.contact-items { display: flex; flex-direction: column; gap: 1.25rem; margin-top: 2rem; }

.contact-item {
	display: flex; align-items: center; gap: 1rem;
	background: var(--bg); border: 1px solid var(--border);
	border-radius: 12px; padding: 1rem 1.25rem;
	text-decoration: none; color: var(--text);
	transition: var(--transition);
}

.contact-item:hover { border-color: rgba(37,99,235,.35); color: var(--accent); transform: translateX(4px); }

.contact-item-icon {
	width: 40px; height: 40px; border-radius: 10px;
	display: flex; align-items: center; justify-content: center;
	font-size: 1.1rem; flex-shrink: 0;
}

.contact-item-text strong { display: block; font-weight: 600; font-size: .9rem; }
.contact-item-text span   { font-size: .82rem; color: var(--muted); }

/* form */
.contact-form { 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: .4rem; }

.form-group label { font-size: .82rem; font-weight: 600; color: var(--muted); }

.form-group input,
.form-group textarea,
.form-group select {
	background: var(--bg); border: 1px solid var(--border);
	color: var(--text); padding: .75rem 1rem;
	border-radius: 10px; font-family: inherit; font-size: .9rem;
	outline: none; transition: border-color var(--transition);
	resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus { border-color: var(--accent); }

.form-group textarea { min-height: 120px; }

.btn-submit {
	background: linear-gradient(135deg, var(--accent), var(--accent2));
	color: #fff; border: none; padding: .9rem;
	border-radius: 10px; font-family: inherit; font-size: .95rem;
	font-weight: 700; cursor: pointer; transition: var(--transition);
	box-shadow: 0 8px 24px rgba(37,99,235,.3);
}

.btn-submit:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(37,99,235,.4); }

/* ── FOOTER ────────────────────────────────────── */
footer {
	background: var(--bg); border-top: 1px solid var(--border);
	padding: 3rem 5vw 2rem;
}

.footer-top {
	display: flex; justify-content: space-between; align-items: flex-start;
	gap: 2rem; flex-wrap: wrap; max-width: 1200px; margin: 0 auto 2rem;
	padding-bottom: 2rem; border-bottom: 1px solid var(--border);
}

.footer-brand p { color: var(--muted); font-size: .875rem; margin-top: .5rem; max-width: 260px; }

.footer-links { display: flex; gap: 4rem; flex-wrap: wrap; }

.footer-col h4 { font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 1rem; }

.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: .6rem; }

.footer-col a { color: var(--muted); text-decoration: none; font-size: .875rem; transition: color var(--transition); }
.footer-col a:hover { color: var(--text); }

.footer-bottom {
	display: flex; justify-content: space-between; align-items: center;
	max-width: 1200px; margin: 0 auto;
	color: var(--muted); font-size: .8rem; gap: 1rem; flex-wrap: wrap;
}

/* ── RESPONSIVE ────────────────────────────────── */
@media (max-width: 900px) {
	.nav-links { display: none; }
	.nav-toggle { display: flex; }

	.nav-links.open {
		display: flex; flex-direction: column;
		position: fixed; top: 60px; left: 0; right: 0;
		background: var(--nav-open); padding: 1.5rem 5vw;
		border-bottom: 1px solid var(--border); gap: 1.25rem;
	}

	.process-steps { grid-template-columns: 1fr; }
	.process-steps::before { display: none; }

	.products-grid  { grid-template-columns: 1fr; }
	.contact-grid   { grid-template-columns: 1fr; }
	.form-row       { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
	.services-grid { grid-template-columns: 1fr; }
	.footer-links  { gap: 2rem; }
}

/* ── WHATSAPP FLOAT ────────────────────────────── */
.wa-float {
	position: fixed; bottom: 1.75rem; right: 1.75rem; z-index: 999;
	display: flex; align-items: center; gap: .75rem;
	text-decoration: none;
	filter: drop-shadow(0 4px 20px rgba(0,0,0,.5));
}

.wa-float:hover .wa-label { opacity: 1; transform: translateX(0); pointer-events: auto; }

.wa-label {
	background: #fff; color: #111;
	padding: .45rem .9rem; border-radius: 8px;
	font-size: .8rem; font-weight: 700; white-space: nowrap;
	opacity: 0; transform: translateX(8px);
	transition: var(--transition); pointer-events: none;
	box-shadow: 0 4px 16px rgba(0,0,0,.3);
}

.wa-btn {
	width: 56px; height: 56px; border-radius: 50%;
	background: #25d366;
	display: flex; align-items: center; justify-content: center;
	flex-shrink: 0;
	transition: transform var(--transition);
}

.wa-float:hover .wa-btn { transform: scale(1.1); }

.wa-btn svg { width: 30px; height: 30px; fill: #fff; }

.wa-pulse {
	position: absolute; inset: 0; border-radius: 50%;
	background: #25d366;
	animation: waPulse 2s ease-out infinite;
	z-index: -1;
}

@keyframes waPulse {
	0%   { transform: scale(1);   opacity: .6; }
	100% { transform: scale(1.7); opacity: 0; }
}

/* ── HERO GREETING ─────────────────────────────── */
.hero-greeting {
	font-size: 1.05rem; font-weight: 700;
	color: var(--accent);
	letter-spacing: .02em;
	margin-bottom: .75rem;
	display: flex; align-items: center; gap: .5rem;
	animation: fadeUp .5s ease both;
	transition: color .4s ease;
}

/* ── THEME TRANSITIONS ─────────────────────────── */
nav, footer, section, .service-card, .step,
.product-card, .contact-item, .form-group input,
.form-group textarea, .form-group select,
.hero-badge, .hero-stat-divider {
	transition: background-color .6s ease,
	            border-color    .4s ease,
	            color           .4s ease;
}

/* ── SCROLL REVEAL ─────────────────────────────── */
.reveal {
	opacity: 0; transform: translateY(24px);
	transition: opacity .6s ease, transform .6s ease;
}

.reveal.visible { opacity: 1; transform: none; }
