/* ═══════════════════════════════════════════════════════════════
   FractAIll · Alba Design System v2
   Empresa seria. Escala Stripe/Linear/Anthropic.
   ─────────────────────────────────────────────────────────────── */

:root {
  /* Marca */
  --accent: #FF7A29;
  --accent-hover: #FF8A40;
  --accent-dim: #C95919;
  --accent-soft: rgba(255, 122, 41, 0.12);
  --accent-border: rgba(255, 122, 41, 0.4);
  --accent-glow: rgba(255, 122, 41, 0.18);

  /* Fondo */
  --bg: #0A0A0D;
  --bg-elev: #101015;
  --bg-elev-2: #15151B;
  --surface: #1A1A22;
  --surface-2: #22222C;
  --surface-3: #2C2C38;

  /* Bordes */
  --border: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.14);
  --border-accent: rgba(255, 122, 41, 0.4);

  /* Texto */
  --text: #FFFFFF;
  --text-soft: #C8CBD2;
  --text-dim: #888C95;
  --text-faint: #5C5F68;

  /* Estado */
  --success: #00C76C;
  --danger: #FF3B30;
  --amber: #FFCC00;

  /* Tipografía */
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Helvetica Neue", sans-serif;
  --font-mono: "SF Mono", "JetBrains Mono", Menlo, monospace;

  /* Layout — anchos generosos */
  --max: 1320px;
  --max-narrow: 920px;
  --max-prose: 720px;
  --pad-x: clamp(20px, 5vw, 64px);

  /* Radios */
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --radius-xl: 28px;
  --radius-2xl: 40px;

  /* Sombras */
  --shadow-sm: 0 4px 16px -4px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 12px 40px -12px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 32px 100px -32px rgba(0, 0, 0, 0.7);
  --shadow-xl: 0 48px 140px -48px rgba(0, 0, 0, 0.8);
  --shadow-glow: 0 24px 80px -24px rgba(255, 122, 41, 0.5);

  /* Transiciones */
  --t-fast: 0.15s ease;
  --t: 0.24s cubic-bezier(0.2, 0.8, 0.2, 1);
  --t-slow: 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-feature-settings: "ss01", "cv11", "ss03";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.55;
  overflow-x: hidden;
  min-height: 100vh;
  letter-spacing: -0.011em;
}

a { color: inherit; text-decoration: none; transition: color var(--t-fast); }
img, svg { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

::selection { background: var(--accent); color: #fff; }

/* ───────── HALOS DE FONDO ───────── */
body::before {
  content: '';
  position: fixed;
  top: -40%; left: 50%;
  transform: translateX(-50%);
  width: 1600px; height: 1100px;
  background: radial-gradient(ellipse, rgba(255, 122, 41, 0.07) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* ───────── CONTENEDOR ───────── */
.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad-x);
  position: relative;
  z-index: 1;
}
.container-narrow { max-width: var(--max-narrow); }
.container-prose { max-width: var(--max-prose); }

/* ───────── NAVBAR ───────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  background: rgba(10, 10, 13, 0.7);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.nav-brand {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text);
  text-decoration: none;
}
/* Wordmark oficial FractAIll: Fract (texto) + AI (naranja) + ll (gris suave) */
.nav-brand .brand-ai { color: var(--accent); }
.nav-brand .brand-ll { color: var(--text); opacity: 0.55; }
/* Compatibilidad con marcado viejo: <span> a secas hereda comportamiento ll */
.nav-brand span:not([class]) { color: var(--text); opacity: 0.55; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
}
.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dim);
  transition: color var(--t-fast);
}
.nav-links a:hover { color: var(--text); }
.nav-cta {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ───────── BOTONES ───────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 24px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: all var(--t);
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 28px -6px rgba(255, 122, 41, 0.45);
}
.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 14px 40px -8px rgba(255, 122, 41, 0.6);
}
.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}
.btn-secondary:hover {
  background: var(--surface-2);
  border-color: var(--border-strong);
  transform: translateY(-1px);
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: transparent;
}
.btn-ghost:hover { background: var(--surface); }
.btn-lg { padding: 20px 36px; font-size: 16px; border-radius: 14px; }
.btn-xl { padding: 24px 44px; font-size: 17px; border-radius: 16px; }
.btn-sm { padding: 9px 16px; font-size: 13px; border-radius: 8px; }

/* ───────── HERO MASIVO ───────── */
.hero {
  padding: clamp(60px, 12vw, 160px) 0 clamp(60px, 8vw, 100px);
  text-align: center;
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-inner { width: 100%; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  border-radius: 100px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  margin-bottom: 32px;
}
.hero h1 {
  font-size: clamp(48px, 9vw, 128px);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 0.96;
  margin-bottom: 32px;
  background: linear-gradient(180deg, #fff 0%, #B0B4BB 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero h1 .accent {
  background: linear-gradient(180deg, var(--accent) 0%, #C95919 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero p.lead {
  font-size: clamp(19px, 1.8vw, 26px);
  color: var(--text-dim);
  max-width: 760px;
  margin: 0 auto 48px;
  line-height: 1.45;
  font-weight: 400;
  letter-spacing: -0.005em;
}
.hero-ctas {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}
.hero-meta {
  margin-top: 24px;
  font-size: 14px;
  color: var(--text-dim);
}
.hero-meta strong { color: var(--accent); font-weight: 600; }

/* ───────── SECCIONES ───────── */
.section {
  padding: clamp(80px, 12vw, 160px) 0;
  position: relative;
}
.section-tight { padding: clamp(48px, 6vw, 80px) 0; }
.section-eyebrow {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 18px;
}
.section-title {
  font-size: clamp(36px, 5.5vw, 80px);
  font-weight: 800;
  letter-spacing: -0.04em;
  text-align: center;
  margin-bottom: 24px;
  line-height: 1.02;
  background: linear-gradient(180deg, #fff 0%, #C8CBD2 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.section-sub {
  font-size: clamp(17px, 1.5vw, 22px);
  color: var(--text-dim);
  text-align: center;
  margin-bottom: 80px;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.5;
  font-weight: 400;
}

/* ───────── CARDS BASE ───────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  transition: all var(--t);
}
.card:hover {
  border-color: var(--border-accent);
  background: var(--surface-2);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.card-icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin-bottom: 24px;
}
.card h3 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  line-height: 1.2;
}
.card p {
  font-size: 15px;
  color: var(--text-dim);
  line-height: 1.6;
}

/* ───────── GRID ───────── */
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-auto { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

/* ───────── PRODUCT CARDS ───────── */
.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px 36px;
  transition: all var(--t);
  display: flex;
  flex-direction: column;
  gap: 18px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  min-height: 320px;
}
.product-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity var(--t);
}
.product-card::after {
  content: '';
  position: absolute;
  bottom: -100%;
  left: 50%;
  transform: translateX(-50%);
  width: 200%;
  height: 100%;
  background: radial-gradient(ellipse at top, var(--accent-glow) 0%, transparent 60%);
  opacity: 0;
  transition: opacity var(--t-slow);
  pointer-events: none;
}
.product-card:hover {
  border-color: var(--border-accent);
  background: var(--surface-2);
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}
.product-card:hover::before { opacity: 1; }
.product-card:hover::after { opacity: 1; }
.product-card .product-icon {
  width: 64px; height: 64px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dim));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  box-shadow: var(--shadow-glow);
  position: relative;
  z-index: 1;
}
.product-card h3 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.025em;
  position: relative;
  z-index: 1;
}
.product-card .tagline {
  font-size: 15px;
  color: var(--text-dim);
  flex-grow: 1;
  line-height: 1.55;
  position: relative;
  z-index: 1;
}
.product-card .product-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  position: relative;
  z-index: 1;
}
.product-card .price {
  font-size: 14px;
  color: var(--accent);
  font-weight: 600;
}
.product-card .arrow {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--surface-3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--t);
  font-size: 16px;
}
.product-card:hover .arrow {
  background: var(--accent);
  transform: translateX(6px);
}

/* ───────── PRICING ───────── */
.price-tier {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 48px 40px;
  transition: all var(--t);
  position: relative;
  display: flex;
  flex-direction: column;
}
.price-tier:hover { transform: translateY(-2px); border-color: var(--border-strong); }
.price-tier.featured {
  border-color: var(--accent);
  background: linear-gradient(180deg, var(--surface) 0%, rgba(255, 122, 41, 0.08) 100%);
  box-shadow: var(--shadow-glow);
  transform: scale(1.02);
}
.price-tier.featured::before {
  content: 'Más popular';
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 100px;
}
.price-tier h3 {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}
.price-tier .price-amount {
  font-size: 64px;
  font-weight: 800;
  letter-spacing: -0.04em;
  margin: 24px 0 8px;
  line-height: 1;
}
.price-tier .price-amount .currency {
  font-size: 28px;
  vertical-align: super;
  margin-right: 4px;
  color: var(--text-dim);
  font-weight: 600;
}
.price-tier .price-period {
  color: var(--text-dim);
  font-size: 14px;
  margin-bottom: 36px;
}
.price-features {
  list-style: none;
  margin: 0 0 40px;
  flex-grow: 1;
}
.price-features li {
  padding: 10px 0;
  font-size: 15px;
  color: var(--text-soft);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border-bottom: 1px solid var(--border);
}
.price-features li:last-child { border-bottom: none; }
.price-features li::before {
  content: '✓';
  color: var(--accent);
  font-weight: 800;
  font-size: 14px;
  margin-top: 2px;
}

/* ───────── FOOTER GRANDE ───────── */
footer {
  border-top: 1px solid var(--border);
  padding: clamp(60px, 8vw, 100px) 0 50px;
  margin-top: clamp(80px, 10vw, 140px);
  background: var(--bg-elev);
  position: relative;
}
footer::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.4;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 56px;
  margin-bottom: 64px;
}
.footer-brand h4 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}
.footer-brand p {
  font-size: 14px;
  color: var(--text-dim);
  max-width: 320px;
  line-height: 1.6;
}
.footer-col h5 {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-bottom: 20px;
}
.footer-col a {
  display: block;
  padding: 6px 0;
  font-size: 14px;
  color: var(--text-soft);
  transition: color var(--t-fast);
}
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  padding-top: 32px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-faint);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-bottom .legal-links {
  display: flex;
  gap: 24px;
}
.footer-bottom .legal-links a { color: var(--text-faint); }
.footer-bottom .legal-links a:hover { color: var(--accent); }

/* ───────── INPUTS ───────── */
.input,
input[type="text"],
input[type="email"],
input[type="password"],
textarea {
  width: 100%;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  transition: border-color var(--t-fast);
  outline: none;
}
.input:focus,
input:focus,
textarea:focus {
  border-color: var(--accent);
  background: var(--surface-2);
}
.input-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-soft);
  margin-bottom: 10px;
  letter-spacing: 0.01em;
}

/* ───────── SPECS BAR GRANDE ───────── */
.specs-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
}
.specs-bar .spec {
  padding: 36px 24px;
  border-right: 1px solid var(--border);
  text-align: center;
  position: relative;
}
.specs-bar .spec:last-child { border-right: none; }
.specs-bar .spec .num {
  font-size: clamp(36px, 4vw, 56px);
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.04em;
  margin-bottom: 8px;
  line-height: 1;
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-dim) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.specs-bar .spec .lbl {
  font-size: 12px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

/* ───────── PREVIEW WINDOW ───────── */
.preview-window {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  margin: 0 auto;
  max-width: 1100px;
}
.preview-bar {
  height: 40px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 18px;
  gap: 8px;
}
.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot.r { background: #FF5F57; }
.dot.y { background: #FEBC2E; }
.dot.g { background: #28C840; }
.preview-content {
  padding: 80px 60px;
  text-align: center;
}

/* ───────── ANIMACIONES ───────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
@keyframes pulse-glow {
  0%, 100% { box-shadow: var(--shadow-glow); }
  50% { box-shadow: 0 32px 100px -16px rgba(255, 122, 41, 0.7); }
}
.fade-in { animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

/* ───────── RESPONSIVE ───────── */
@media (max-width: 1100px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
  .footer-grid > :nth-child(4),
  .footer-grid > :nth-child(5) { grid-column: span 1; }
}
@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
  .nav-links { display: none; }
}
@media (max-width: 640px) {
  .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr !important; }
  .hero { min-height: 60vh; padding: 40px 0 30px; }
  .hero h1 { font-size: clamp(36px, 9vw, 56px) !important; }
  .hero p.lead { font-size: 16px !important; }
  .section { padding: 56px 0; }
  .section-title { font-size: clamp(28px, 7vw, 40px) !important; }
  .section-sub { font-size: 15px !important; margin-bottom: 40px !important; }
  .footer-grid { grid-template-columns: 1fr !important; }
  .footer-bottom { flex-direction: column; text-align: center; gap: 12px; }
  .price-tier.featured { transform: none; }
  .price-tier { padding: 32px 24px !important; }
  .price-tier .price-amount { font-size: 44px !important; }
  .btn-xl, .btn-lg { padding: 14px 24px !important; font-size: 15px !important; }
  .hero-ctas, .hero-ctas .btn { width: 100% !important; justify-content: center; }
  .hero-ctas { flex-direction: column; }
  .product-card { padding: 28px 24px !important; min-height: auto; }
  .product-card h3 { font-size: 20px !important; }
  .specs-bar { grid-template-columns: repeat(2, 1fr) !important; }
  .specs-bar .spec { padding: 22px 16px !important; border-right: none !important; border-bottom: 1px solid var(--border); }
  .specs-bar .spec:nth-last-child(-n+2) { border-bottom: none; }
  .big-cta h2 { font-size: clamp(32px, 9vw, 48px) !important; }
  .quote-text { font-size: clamp(20px, 5vw, 28px) !important; }
  .nav-cta .btn-sm { padding: 8px 14px; font-size: 12px; }
}
/* Imágenes responsive */
img.app-screenshot, .preview-window img, .product-screenshot-wrap img {
  width: 100% !important;
  height: auto !important;
  display: block;
}

/* ───────── UTILIDADES ───────── */
.text-dim { color: var(--text-dim); }
.text-accent { color: var(--accent); }
.text-center { text-align: center; }
.mb-2 { margin-bottom: 16px; }
.mb-4 { margin-bottom: 32px; }
.mb-6 { margin-bottom: 48px; }
.mt-4 { margin-top: 32px; }
.mt-6 { margin-top: 48px; }
