/* ============ Forgix Design Tokens — Light Mode ============ */
:root {
  --bg-0: #f8fafc;
  --bg-1: #f1f5f9;
  --bg-2: #e2e8f0;
  --bg-card: rgba(255, 255, 255, 0.95);
  --bg-card-hover: #ffffff;
  --border: rgba(15, 23, 42, 0.1);
  --border-strong: rgba(30, 64, 175, 0.25);
  --text-1: #0f172a;
  --text-2: #334155;
  --text-3: #64748b;
  --brand-deep: #1e3a8a;
  --brand: #1e40af;
  --brand-light: #3b82f6;
  --brand-glow: #2563eb;
  --accent: #06b6d4;
  --accent-soft: #22d3ee;
  --success: #10b981;
  --warning: #f59e0b;
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.05), 0 4px 16px rgba(15, 23, 42, 0.07);
  --shadow-glow: 0 4px 24px rgba(30, 64, 175, 0.2);
}

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

html, body {
  background: var(--bg-0);
  color: var(--text-1);
  font-family: 'Inter', 'Inter Tight', system-ui, sans-serif;
  font-feature-settings: "cv11";
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body {
  background: #f8fafc;
  min-height: 100vh;
}

/* Typography */
h1, h2, h3, h4 { letter-spacing: -0.025em; line-height: 1.1; }
.hero-title {
  font-size: clamp(34px, 5.5vw, 66px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.05;
  color: var(--text-1);
}
.section-title {
  font-size: clamp(28px, 4vw, 50px);
  font-weight: 700;
  letter-spacing: -0.03em;
  text-align: center;
  color: var(--text-1);
}
.eyebrow {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand);
}
.lead { color: var(--text-2); font-size: 17px; line-height: 1.65; }

/* Pill badge */
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(30, 64, 175, 0.07);
  border: 1px solid rgba(30, 64, 175, 0.18);
  font-size: 13px;
  color: var(--brand);
  font-weight: 600;
}
.pill .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 22px;
  font-family: inherit; font-weight: 600; font-size: 15px;
  border-radius: 999px;
  border: none; cursor: pointer;
  text-decoration: none;
  transition: transform .2s ease, box-shadow .25s ease, background .2s ease;
  white-space: nowrap;
}
.btn-primary {
  color: white;
  background: var(--brand);
  box-shadow: 0 2px 8px rgba(30, 64, 175, 0.3);
}
.btn-primary:hover {
  transform: translateY(-1px);
  background: var(--brand-deep);
  box-shadow: 0 4px 18px rgba(30, 64, 175, 0.4);
}
.btn-ghost {
  background: white;
  color: var(--text-1);
  border: 1.5px solid var(--border-strong);
}
.btn-ghost:hover { background: var(--bg-1); border-color: var(--brand); }
.btn-white {
  background: white;
  color: var(--brand-deep);
  border: 1.5px solid var(--border-strong);
}
.btn-white:hover { background: var(--bg-1); transform: translateY(-1px); }
.btn-sm { height: 38px; padding: 0 16px; font-size: 13.5px; }

/* Cards */
.card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow-card);
  transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease;
}
.card:hover {
  border-color: var(--border-strong);
  box-shadow: 0 2px 8px rgba(0,0,0,0.05), 0 8px 28px rgba(15,23,42,0.1);
}
.card-glow { position: relative; overflow: hidden; }
.card-glow::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  opacity: 0;
  transition: opacity .3s ease;
}
.card-glow:hover::before { opacity: 1; }

/* Layout */
.container {
  max-width: 1240px; margin: 0 auto; padding: 0 32px; position: relative; z-index: 1;
}
.section { padding: 100px 0; position: relative; }
@media (max-width: 768px) {
  .section { padding: 64px 0; }
  .container { padding: 0 20px; }
}

/* Marquee */
.marquee {
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}
.marquee-track {
  display: flex; gap: 64px;
  animation: scroll 30s linear infinite;
  width: max-content;
}
@keyframes scroll { to { transform: translateX(-50%); } }

/* Animations */
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes fadeUp {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}
.fade-up { opacity: 1; animation: fadeUp .7s cubic-bezier(.2,.6,.2,1); }
@media (prefers-reduced-motion: reduce) { .fade-up { animation: none; } }

/* Chat message animation */
@keyframes msgIn {
  from { opacity: 0; transform: translateY(8px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Gradient text — brand palette on white */
.gradient-text {
  background: linear-gradient(135deg, #1e40af 0%, #06b6d4 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Divider */
.divider {
  height: 1px;
  background: linear-gradient(to right, transparent, var(--border-strong), transparent);
}

/* Scroll Reveal */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity .85s cubic-bezier(.22,.61,.36,1), transform .85s cubic-bezier(.22,.61,.36,1);
  will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal-left { transform: translateX(-40px); }
.reveal-left.is-visible { transform: translateX(0); }
.reveal-right { transform: translateX(40px); }
.reveal-right.is-visible { transform: translateX(0); }
.reveal-scale { transform: scale(0.93); }
.reveal-scale.is-visible { transform: scale(1); }

.reveal-stagger > * {
  opacity: 0; transform: translateY(20px);
  transition: opacity .7s cubic-bezier(.22,.61,.36,1), transform .7s cubic-bezier(.22,.61,.36,1);
}
.reveal-stagger.is-visible > * { opacity: 1; transform: translateY(0); }
.reveal-stagger.is-visible > *:nth-child(1) { transition-delay: 0.05s; }
.reveal-stagger.is-visible > *:nth-child(2) { transition-delay: 0.15s; }
.reveal-stagger.is-visible > *:nth-child(3) { transition-delay: 0.25s; }
.reveal-stagger.is-visible > *:nth-child(4) { transition-delay: 0.35s; }
.reveal-stagger.is-visible > *:nth-child(5) { transition-delay: 0.45s; }
.reveal-stagger.is-visible > *:nth-child(6) { transition-delay: 0.55s; }
.reveal-stagger.is-visible > *:nth-child(7) { transition-delay: 0.65s; }
.reveal-stagger.is-visible > *:nth-child(8) { transition-delay: 0.75s; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-stagger > * {
    transition: none !important; opacity: 1 !important; transform: none !important;
  }
}

/* TextRotate */
.tr-root { display: inline-flex; flex-wrap: wrap; align-items: baseline; vertical-align: baseline; }
.tr-track { display: inline-flex; flex-wrap: wrap; }
.tr-word { display: inline-flex; }
.tr-space { white-space: pre; }
.tr-char { display: inline-block; will-change: transform, opacity; }
.hero-rotate-wrap {
  display: inline-flex; align-items: baseline; overflow: hidden;
  padding-bottom: 0.2em; margin-bottom: -0.2em; vertical-align: baseline;
}
.hero-rotate-text { color: var(--accent); }
.hero-rotate-text .tr-char { color: inherit; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.tr-enter { animation: tr-spring-in 0.85s cubic-bezier(.22,1.4,.36,1) both; }
.tr-exit { animation: tr-spring-out 0.55s cubic-bezier(.55,0,.78,.36) both; }
@keyframes tr-spring-in { from { transform: translateY(100%); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes tr-spring-out { from { transform: translateY(0); opacity: 1; } to { transform: translateY(-120%); opacity: 0; } }

/* HeroGeometric fade-up */
.hg-fadeup {
  transition: opacity 1s cubic-bezier(.25,.4,.25,1), transform 1s cubic-bezier(.25,.4,.25,1);
}

/* Focus */
*:focus-visible { outline: 2px solid var(--brand-light); outline-offset: 2px; border-radius: 8px; }

/* ====== Extra animations ====== */

/* Shimmer sweep — used on featured pricing card */
@keyframes shimmer {
  0%   { background-position: -600px 0; }
  100% { background-position: 600px 0; }
}
.shimmer-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    105deg,
    transparent 30%,
    rgba(255, 255, 255, 0.18) 50%,
    transparent 70%
  );
  background-size: 600px 100%;
  animation: shimmer 3.5s linear infinite;
  pointer-events: none;
}

/* Lift on hover — combines with .card's existing transition */
.card-lift:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(15,23,42,0.12); }

/* Reveal: scale variant kept in sync */
.reveal-scale { transform: scale(0.93); }
.reveal-scale.is-visible { transform: scale(1); }

/* Footer grid responsive */
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr !important; gap: 32px 24px !important; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
}

/* Showcase grid responsive */
@media (max-width: 900px) {
  .showcase-grid { grid-template-columns: 1fr !important; gap: 24px !important; }
}

/* Mobile: hero top padding so CTAs appear above fold */
@media (max-width: 480px) {
  section#inicio { padding-top: 110px !important; padding-bottom: 48px !important; }
}

/* Mobile: marquee font and gap reduction */
@media (max-width: 480px) {
  .marquee-track { gap: 40px !important; }
}

/* Mobile: annotation labels hidden below 1280px (already in Hero.jsx, ensure CSS override) */
@media (max-width: 1280px) {
  .annotation-left, .annotation-right { display: none !important; }
}
