:root {
/* Paleta negros (variaciones) */
--black-pure: #000000;
--black-950: #0a0a0a;
--black-900: #0f0f0f;
--black-800: #141414;
--black-700: #1a1a1a;
--black-600: #262626;
--black-500: #333333;
--black-400: #404040;

/* Base dark */
--bg: #0a0a0a;
--bg-elevated: #111111;
--bg-card: #141414;
--bg-card-hover: #1a1a1a;
--text: #fafafa;
--text-muted: #a3a3a3;
--text-subtle: #737373;
--accent: #f97316;
--accent-hover: #fb923c;
--accent-strong: #ea580c;
--accent-glow: rgba(249, 115, 22, 0.35);
--accent-glow-strong: rgba(249, 115, 22, 0.5);
--border: #262626;
--border-focus: rgba(249, 115, 22, 0.5);

/* Espaciado */
--space-xs: 0.25rem;
--space-sm: 0.5rem;
--space-md: 1rem;
--space-lg: 1.5rem;
--space-xl: 2rem;
--space-2xl: 3rem;
--space-3xl: 4rem;

/* Radio */
--radius-sm: 6px;
--radius-md: 12px;
--radius-lg: 16px;
--radius-xl: 24px;
--radius-full: 9999px;

/* Sombras */
--shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
--shadow-md: 0 4px 20px rgba(0, 0, 0, 0.5);
--shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.6);
--shadow-glow: 0 0 24px var(--accent-glow);
--shadow-glow-strong: 0 0 32px var(--accent-glow-strong);

/* Transiciones */
--ease: cubic-bezier(0.4, 0, 0.2, 1);
--duration: 0.2s;
}

/* Reset */
*, *::before, *::after {
box-sizing: border-box;
}

html {
scroll-behavior: smooth;
}

body {
font-family: "DM Sans", -apple-system, BlinkMacSystemFont, sans-serif;
margin: 0;
min-height: 100vh;
background: var(--bg);
color: var(--text);
line-height: 1.6;
-webkit-font-smoothing: antialiased;
position: relative;
}

/* ========== Fondo ingenioso: grid + formas geométricas ========== */
.bg-canvas {
position: fixed;
inset: 0;
z-index: 0;
pointer-events: none;
overflow: hidden;
}

.bg-grid {
position: absolute;
inset: 0;
background-image:
  linear-gradient(rgba(249, 115, 22, 0.03) 1px, transparent 1px),
  linear-gradient(90deg, rgba(249, 115, 22, 0.03) 1px, transparent 1px);
background-size: 48px 48px;
opacity: 0;
animation: fadeIn 0.8s var(--ease) 0.05s forwards;
}

@media (max-width: 480px) {
.bg-grid {
  background-size: 32px 32px;
}
}

.bg-shape {
position: absolute;
border-radius: 50%;
filter: blur(60px);
opacity: 0;
animation: shapeFadeIn 1.2s var(--ease) forwards;
}

.bg-shape--1 {
width: 420px;
height: 420px;
top: -120px;
right: -80px;
background: rgba(249, 115, 22, 0.18);
animation-delay: 0.1s;
}

.bg-shape--2 {
width: 320px;
height: 320px;
bottom: -100px;
left: -80px;
background: rgba(249, 115, 22, 0.12);
animation-delay: 0.2s;
}

.bg-shape--3 {
width: 180px;
height: 180px;
top: 40%;
left: 15%;
background: rgba(249, 115, 22, 0.08);
animation-delay: 0.3s;
}

.bg-shape--4 {
width: 240px;
height: 240px;
bottom: 20%;
right: 10%;
background: rgba(249, 115, 22, 0.06);
animation-delay: 0.4s;
}

.bg-angular {
position: absolute;
height: 1px;
background: linear-gradient(90deg, transparent 0%, rgba(249, 115, 22, 0.2) 50%, transparent 100%);
transform-origin: left center;
opacity: 0;
animation: shapeFadeIn 1s var(--ease) 0.5s forwards;
}

.bg-angular--1 {
width: 50%;
top: 20%;
left: -5%;
transform: rotate(-15deg);
}

.bg-angular--2 {
width: 45%;
bottom: 25%;
right: -5%;
transform: rotate(10deg);
background: linear-gradient(90deg, transparent 0%, rgba(249, 115, 22, 0.15) 50%, transparent 100%);
}

@keyframes shapeFadeIn {
to { opacity: 1; }
}

/* ========== Layout ========== */
.page-wrapper {
position: relative;
z-index: 1;
width: 100%;
max-width: 1200px;
margin: 0 auto;
padding: var(--space-md);
padding-left: max(var(--space-lg), env(safe-area-inset-left));
padding-right: max(var(--space-lg), env(safe-area-inset-right));
padding-bottom: max(var(--space-2xl), env(safe-area-inset-bottom));
min-height: 100vh;
min-height: 100dvh;
display: flex;
flex-direction: column;
}

/* ========== Header ========== */
.header {
display: flex;
align-items: center;
justify-content: space-between;
gap: var(--space-md);
padding: var(--space-lg) 0;
opacity: 0;
animation: fadeInDown 0.6s var(--ease) 0.1s forwards;
flex-wrap: wrap;
border-bottom: 1px solid var(--border);
background: linear-gradient(180deg, rgba(249, 115, 22, 0.05) 0%, transparent 100%);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.logo {
display: inline-flex;
align-items: center;
gap: var(--space-sm);
font-size: 1.125rem;
font-weight: 600;
color: var(--text);
text-decoration: none;
letter-spacing: -0.02em;
flex-shrink: 0;
}

.logo:hover {
color: var(--accent);
}

.logo-mark {
width: 32px;
height: 32px;
display: block;
border-radius: var(--radius-md);
box-shadow: 0 0 16px var(--accent-glow);
transition: box-shadow var(--duration) var(--ease),
            transform var(--duration) var(--ease);
}

.logo:hover .logo-mark {
box-shadow: 0 0 24px var(--accent-glow-strong);
transform: scale(1.05);
}

.nav {
display: flex;
align-items: center;
gap: var(--space-sm);
flex-wrap: wrap;
justify-content: flex-end;
min-width: 0;
}

/* ========== Botones ========== */
.btn {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 0.5rem;
font-family: inherit;
font-size: 0.875rem;
font-weight: 500;
padding: 0.625rem 1.25rem;
border-radius: var(--radius-md);
border: none;
cursor: pointer;
touch-action: manipulation;
-webkit-tap-highlight-color: transparent;
user-select: none;
-webkit-user-select: none;
transition: background var(--duration) var(--ease),
            color var(--duration) var(--ease),
            transform var(--duration) var(--ease);
}

.btn:focus-visible {
outline: 2px solid var(--accent);
outline-offset: 2px;
}

.btn-primary {
font-size: 1rem;
padding: 0.875rem 1.75rem;
background: linear-gradient(135deg, var(--accent), var(--accent-strong));
color: white;
box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-primary:hover {
background: linear-gradient(135deg, var(--accent-hover), var(--accent));
transform: translateY(-2px) scale(1.02);
box-shadow: 0 8px 24px var(--accent-glow-strong),
            0 0 20px var(--accent-glow);
}

.btn-primary:active {
transform: translateY(0) scale(1);
}

.hero .btn-primary {
opacity: 0;
animation: fadeInUp 0.6s var(--ease) 0.85s forwards;
}

.btn-ghost {
background: transparent;
color: var(--text-muted);
border: 1px solid var(--border);
}

.btn-ghost:hover {
background: var(--bg-card);
color: var(--accent);
border-color: rgba(249, 115, 22, 0.4);
box-shadow: 0 0 12px var(--accent-glow);
}

a.btn {
text-decoration: none;
}

/* ========== Main · Hero ========== */
.main {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
padding: var(--space-xl) 0;
}

.hero {
width: 100%;
max-width: 1100px;
text-align: center;
display: flex;
flex-direction: column;
align-items: center;
gap: var(--space-lg);
}

.hero-badge {
opacity: 0;
animation: fadeInUp 0.6s var(--ease) 0.2s forwards;
display: inline-flex;
align-items: center;
gap: 0.5rem;
font-size: 0.9375rem;
color: var(--text-muted);
padding: 0.5rem 1.125rem;
background: var(--bg-card);
border: 1px solid var(--border);
border-radius: var(--radius-full);
}

.hero-badge-flag {
width: 1.5rem;
height: 1rem;
flex-shrink: 0;
border-radius: 2px;
}

.hero-title {
font-size: 3.5rem;
font-weight: 800;
letter-spacing: -0.04em;
margin: 0;
line-height: 1.1;
color: #ffffff;
text-shadow: 0 0 40px rgba(249, 115, 22, 0.15);
opacity: 0;
animation: fadeInUp 0.6s var(--ease) 0.35s forwards;
}

.hero-desc {
font-size: 1.25rem;
color: var(--text-muted);
margin: 0;
line-height: 1.5;
opacity: 0;
animation: fadeInUp 0.6s var(--ease) 0.5s forwards;
}

/* Stat card — Dopamina: glow al hover */
.stat-card {
width: 100%;
padding: var(--space-2xl) var(--space-xl);
background: var(--bg-card);
border: 1px solid var(--border);
border-radius: var(--radius-lg);
box-shadow: var(--shadow-sm);
transition: box-shadow var(--duration) var(--ease),
            transform var(--duration) var(--ease),
            border-color var(--duration) var(--ease);
opacity: 0;
animation: fadeInUp 0.6s var(--ease) 0.65s forwards;
}

.stat-card:hover {
border-color: rgba(249, 115, 22, 0.3);
box-shadow: var(--shadow-md),
            0 0 24px var(--accent-glow);
transform: translateY(-2px);
}

.stat-label {
font-size: 1rem;
font-weight: 500;
color: var(--text-muted);
text-transform: uppercase;
letter-spacing: 0.08em;
margin: 0 0 var(--space-md);
}

.stat-value {
font-size: 5rem;
font-weight: 700;
color: var(--accent);
margin: 0;
font-variant-numeric: tabular-nums;
line-height: 1;
text-shadow: 0 0 60px var(--accent-glow),
              0 0 30px var(--accent-glow-strong);
}

.stat-value--loading {
opacity: 0.7;
animation: statPulse 1.2s var(--ease) infinite;
}

@keyframes statPulse {
0%, 100% { opacity: 0.6; }
50% { opacity: 1; }
}

/* ========== Animaciones de carga ========== */
@keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
}

@keyframes fadeInDown {
from {
  opacity: 0;
  transform: translateY(-12px);
}
to {
  opacity: 1;
  transform: translateY(0);
}
}

@keyframes fadeInUp {
from {
  opacity: 0;
  transform: translateY(20px);
}
to {
  opacity: 1;
  transform: translateY(0);
}
}

@keyframes countPop {
0% { transform: scale(0.95); }
50% { transform: scale(1.02); }
100% { transform: scale(1); }
}

.stat-value.updated {
animation: countPop 0.4s var(--ease);
}

/* ========== Utilidades de texto ========== */
.text-accent {
color: var(--accent);
}

/* ========== Hero Actions ========== */
.hero-actions {
display: flex;
flex-direction: column;
align-items: center;
gap: var(--space-md);
width: 100%;
opacity: 0;
animation: fadeInUp 0.6s var(--ease) 0.85s forwards;
}

.link-secondary {
font-size: 0.9375rem;
font-weight: 500;
color: var(--accent);
text-decoration: none;
border-bottom: 1px solid transparent;
transition: border-color var(--duration) var(--ease),
            color var(--duration) var(--ease);
cursor: pointer;
}

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

/* ========== Features Grid ========== */
.features-grid {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 1.5rem;
width: 100%;
max-width: 1200px;
margin: 2.5rem auto 0;
opacity: 0;
animation: fadeInUp 0.6s var(--ease) 1s forwards;
padding: 0 var(--space-lg);
}

.feature-card {
display: flex;
flex-direction: row;
align-items: center;
gap: 1rem;
padding: 1rem;
background: linear-gradient(135deg, rgba(249, 115, 22, 0.03) 0%, rgba(249, 115, 22, 0.01) 50%, transparent 100%);
border: none;
border-radius: 0;
box-shadow: none;
transition: all 0.3s var(--ease);
position: relative;
overflow: hidden;
}

.feature-card::before {
content: '';
position: absolute;
top: 0;
right: -100%;
width: 100%;
height: 100%;
background: linear-gradient(90deg, transparent, rgba(249, 115, 22, 0.05), transparent);
animation: shimmer 3s infinite;
z-index: 0;
}

.feature-card > * {
position: relative;
z-index: 1;
}

.feature-card:hover {
background: linear-gradient(135deg, rgba(249, 115, 22, 0.06) 0%, rgba(249, 115, 22, 0.02) 50%, transparent 100%);
border-color: transparent;
box-shadow: 0 4px 12px rgba(249, 115, 22, 0.1);
transform: none;
}

.feature-icon {
width: 40px;
height: 40px;
display: flex;
align-items: center;
justify-content: center;
background: rgba(249, 115, 22, 0.12);
border: 1.5px solid rgba(249, 115, 22, 0.3);
border-radius: 0.75rem;
color: var(--accent);
flex-shrink: 0;
transition: all 0.3s var(--ease);
}

.feature-card:hover .feature-icon {
background: rgba(249, 115, 22, 0.18);
box-shadow: 0 0 16px rgba(249, 115, 22, 0.2);
border-color: rgba(249, 115, 22, 0.5);
}

.feature-icon svg {
width: 22px;
height: 22px;
stroke: var(--accent);
stroke-linecap: round;
stroke-linejoin: round;
}

.feature-content {
display: flex;
flex-direction: column;
gap: 0.15rem;
flex: 1;
}

.feature-title {
font-size: 0.9rem;
font-weight: 700;
color: var(--text);
margin: 0;
line-height: 1.25;
letter-spacing: -0.005em;
}

.feature-desc {
font-size: 0.8rem;
color: var(--text-muted);
margin: 0;
line-height: 1.25;
letter-spacing: 0px;
}

/* ========== Dashboard ========== */
.dashboard-content {
width: 100%;
max-width: 900px;
margin: 0 auto;
padding: var(--space-xl) 0;
}

.dashboard-grid {
display: grid;
grid-template-columns: repeat(1, 1fr);
gap: var(--space-md);
}

.dashboard-card {
background: var(--bg-card);
border: 1px solid var(--border);
border-radius: var(--radius-lg);
padding: var(--space-xl);
text-align: center;
cursor: pointer;
transition: border-color var(--duration) var(--ease),
            box-shadow var(--duration) var(--ease),
            transform var(--duration) var(--ease),
            background var(--duration) var(--ease);
}

.dashboard-card:hover {
background: var(--bg-card-hover);
border-color: rgba(249, 115, 22, 0.4);
box-shadow: var(--shadow-md),
            0 0 20px var(--accent-glow);
transform: translateY(-3px);
}

.dashboard-card:active {
transform: translateY(0);
}

.card-title {
font-size: 1.125rem;
font-weight: 600;
color: var(--text);
margin: 0;
}

.card-value {
font-size: 1.5rem;
font-weight: 700;
color: var(--accent);
}

/* Utilidades dashboard (generadas por JS) */
.year-button {
width: 100%;
padding: var(--space-lg);
font-family: inherit;
font-size: 1rem;
font-weight: 600;
background: var(--accent);
color: white;
border: none;
border-radius: var(--radius-md);
cursor: pointer;
transition: background var(--duration) var(--ease),
            transform var(--duration) var(--ease);
margin-bottom: var(--space-md);
}

.year-button:hover {
background: var(--accent-hover);
transform: translateY(-2px);
}

@keyframes shimmer {
0% {
right: -100%;
opacity: 0;
}
50% {
opacity: 1;
}
100% {
right: 100%;
opacity: 0;
}
}

/* ========== Responsive · Mobile ========== */
@media (max-width: 480px) {
.page-wrapper {
  padding: var(--space-lg);
  min-height: 100vh;
  min-height: 100dvh;
}

.header {
  padding: var(--space-md) 0 var(--space-md);
  border-bottom: 1px solid var(--border);
}

.logo {
  font-size: 1.25rem;
}

.logo-mark {
  width: 36px;
  height: 36px;
  font-size: 1.125rem;
}

.btn {
  padding: 0.75rem 1.25rem;
  font-size: 0.9375rem;
  min-height: 44px;
}

.hero {
  padding: var(--space-md) 0;
  gap: var(--space-xl);
  width: 100%;
}

.hero-title {
  font-size: 2.5rem;
  line-height: 1.15;
}

.hero-desc {
  font-size: 1.0625rem;
  line-height: 1.5;
}

.hero-badge {
  font-size: 0.875rem;
  padding: 0.625rem 1.25rem;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.375rem;
}

.hero-badge-flag {
  width: 1.75rem;
  height: 1.125rem;
}

.stat-card {
  padding: var(--space-3xl) var(--space-2xl);
}

.stat-label {
  font-size: 1.125rem;
}

.stat-value {
  font-size: 6rem;
}

.hero .btn-primary {
  width: 100%;
  min-height: 48px;
  padding: 0.875rem 1.5rem;
  font-size: 1rem;
}

.nav {
  gap: var(--space-sm);
  justify-content: flex-end;
}

.header .nav .btn-ghost {
  padding: 0.5rem 0.875rem;
  font-size: 0.8125rem;
  min-height: 40px;
  white-space: nowrap;
}

.dashboard-content {
  padding: var(--space-md) 0;
}

.dashboard-grid {
  gap: var(--space-md);
}

.dashboard-card {
  padding: var(--space-xl);
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-title {
  font-size: 1rem;
}

.features-grid {
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  max-width: 100%;
  margin: 1.5rem auto 0;
  padding: 0 var(--space-lg);
}

.feature-card {
  padding: 0.9rem;
  flex-direction: row;
  align-items: center;
  gap: 0.8rem;
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.03) 0%, rgba(249, 115, 22, 0.01) 50%, transparent 100%);
}

.feature-card::before {
  animation: shimmer 3s infinite;
}

.feature-icon {
  width: 36px;
  height: 36px;
}

.feature-icon svg {
  width: 20px;
  height: 20px;
}

.feature-title {
  font-size: 0.87rem;
}

.feature-desc {
  font-size: 0.77rem;
}


}

/* Mobile muy estrecho */
@media (max-width: 360px) {
.page-wrapper {
  padding: var(--space-md);
}

.header {
  gap: var(--space-sm);
}

.header .nav .btn-ghost {
  padding: 0.4rem 0.7rem;
  font-size: 0.75rem;
}

.logo {
  font-size: 1.125rem;
}

.logo-mark {
  width: 32px;
  height: 32px;
  font-size: 1rem;
}

.hero-title {
  font-size: 2.25rem;
}

.hero-badge {
  font-size: 0.8125rem;
}

.stat-value {
  font-size: 5rem;
}
}

/* Mobile muy estrecho */
@media (max-width: 360px) {
.page-wrapper {
  padding: var(--space-md);
}

.header {
  gap: var(--space-sm);
}

.header .nav .btn-ghost {
  padding: 0.4rem 0.7rem;
  font-size: 0.75rem;
}

.logo {
  font-size: 1.125rem;
}

.logo-mark {
  width: 32px;
  height: 32px;
  font-size: 1rem;
}

.hero-title {
  font-size: 2.25rem;
}

.hero-badge {
  font-size: 0.8125rem;
}

.stat-value {
  font-size: 5rem;
}

.features-grid {
  grid-template-columns: repeat(2, 1fr);
  gap: 0.8rem;
  max-width: 100%;
  padding: 0 var(--space-md);
}

.feature-card {
  padding: 0.7rem;
  gap: 0.6rem;
  flex-direction: row;
  align-items: center;
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.03) 0%, rgba(249, 115, 22, 0.01) 50%, transparent 100%);
}

.feature-card::before {
  animation: shimmer 3s infinite;
}

.feature-icon {
  width: 32px;
  height: 32px;
}

.feature-icon svg {
  width: 18px;
  height: 18px;
}

.feature-title {
  font-size: 0.78rem;
}

.feature-desc {
  font-size: 0.68rem;
}
}

/* ========== Responsive · Tablet ========== */
@media (min-width: 481px) and (max-width: 1024px) {
.features-grid {
  grid-template-columns: repeat(2, 1fr);
  gap: 1.2rem;
  max-width: 100%;
  margin: 1.5rem auto 0;
  padding: 0 var(--space-lg);
}

.feature-card {
  padding: 1rem;
  flex-direction: row;
  align-items: center;
  gap: 0.9rem;
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.03) 0%, rgba(249, 115, 22, 0.01) 50%, transparent 100%);
}

.feature-card::before {
  animation: shimmer 3s infinite;
}

.feature-icon {
  width: 38px;
  height: 38px;
}

.feature-icon svg {
  width: 21px;
  height: 21px;
}

.feature-title {
  font-size: 0.88rem;
}

.feature-desc {
  font-size: 0.78rem;
}
}

/* ========== Responsive · Tablet ========== */
@media (min-width: 641px) and (max-width: 1024px) {
.features-grid {
  grid-template-columns: repeat(2, 1fr);
}
}

@media (min-width: 641px) {
.hero-title {
  font-size: 3.25rem;
}

.hero-desc {
  font-size: 1.125rem;
}

.stat-value {
  font-size: 8rem;
}

.dashboard-grid {
  grid-template-columns: repeat(2, 1fr);
}
}

/* ========== Responsive · Desktop ========== */
@media (min-width: 1024px) {
.page-wrapper {
  padding: var(--space-xl) var(--space-2xl);
}

.hero {
  max-width: 640px;
}

.hero-title {
  font-size: 4rem;
}

.hero-desc {
  font-size: 1.25rem;
}

.stat-value {
  font-size: 10rem;
}

.dashboard-grid {
  grid-template-columns: repeat(3, 1fr);
}

.dashboard-card:nth-child(2n) {
  grid-column: span 1;
}
}

/* ========== Overrides para Tailwind en dashboard (JS) ========== */
.dashboard-content .bg-gray-200,
.dashboard-content .bg-gray-300,
.dashboard-content .bg-white {
background: var(--bg-card) !important;
border: 1px solid var(--border);
border-radius: var(--radius-md);
color: var(--text);
}

.dashboard-content button.bg-gray-300 {
background: var(--bg-elevated) !important;
color: var(--text);
border: 1px solid var(--border);
}

.dashboard-content button.bg-gray-300:hover {
border-color: rgba(249, 115, 22, 0.4);
color: var(--accent);
}

.dashboard-content button.bg-blue-500,
.dashboard-content button.bg-green-500 {
background: linear-gradient(135deg, var(--accent), var(--accent-strong)) !important;
box-shadow: 0 4px 16px var(--accent-glow);
}

.dashboard-content button.bg-blue-500:hover,
.dashboard-content button.bg-green-500:hover {
background: linear-gradient(135deg, var(--accent-hover), var(--accent)) !important;
box-shadow: 0 8px 24px var(--accent-glow-strong);
}

}
