/* ========================================
   RIESGO CONTROLADO — Global Stylesheet
   ======================================== */

/* === RESET & FOUNDATIONS === */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Playfair+Display:ital,wght@0,500;0,600;0,700;0,800;1,500&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --ink: #0C1222;
  --ink-soft: #2A3352;
  --ink-muted: #6B7394;
  --surface: #FAFBFE;
  --surface-warm: #F4F1ED;
  --card: #FFFFFF;
  --accent: #1746A2;
  --accent-light: #E8EEFB;
  --accent-glow: #3B6CE7;
  --gold: #C8962E;
  --gold-light: #FBF5EA;
  --green: #0E8A5F;
  --green-light: #E6F7F0;
  --red: #C83232;
  --red-light: #FEE2E2;
  --border: #E2E5EF;
  --border-strong: #CBD0E0;
  --shadow-sm: 0 1px 3px rgba(12,18,34,0.04);
  --shadow-md: 0 4px 20px rgba(12,18,34,0.06);
  --shadow-lg: 0 12px 48px rgba(12,18,34,0.08);
  --shadow-xl: 0 24px 64px rgba(12,18,34,0.12);
  --radius: 12px;
  --radius-lg: 20px;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'DM Sans', sans-serif;
  color: var(--ink);
  background: var(--surface);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* === UTILITY === */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 800px; margin: 0 auto; padding: 0 24px; }
.text-center { text-align: center; }
.text-accent { color: var(--accent); }
.text-gold { color: var(--gold); }
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.text-muted { color: var(--ink-muted); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* === TYPOGRAPHY === */
h1, h2, h3 { font-family: 'Playfair Display', serif; font-weight: 700; line-height: 1.2; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); letter-spacing: -0.015em; }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }
h4 { font-family: 'DM Sans', sans-serif; font-weight: 600; font-size: 1.1rem; }
p { font-size: 1.05rem; color: var(--ink-soft); }
.lead { font-size: 1.2rem; line-height: 1.8; }
.label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase;
}
a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-glow); }

/* === BUTTONS === */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 32px; border-radius: 10px;
  font-family: 'DM Sans', sans-serif; font-weight: 600; font-size: 1rem;
  text-decoration: none; transition: all 0.25s cubic-bezier(0.4,0,0.2,1);
  cursor: pointer; border: none; line-height: 1.4;
}
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 4px 16px rgba(23,70,162,0.3); }
.btn-primary:hover { background: var(--accent-glow); box-shadow: 0 8px 32px rgba(23,70,162,0.4); transform: translateY(-2px); color: #fff; }
.btn-outline { background: transparent; color: var(--accent); border: 2px solid var(--border-strong); }
.btn-outline:hover { border-color: var(--accent); background: var(--accent-light); }
.btn-gold { background: var(--gold); color: #fff; box-shadow: 0 4px 16px rgba(200,150,46,0.3); }
.btn-gold:hover { background: #b8872a; box-shadow: 0 8px 32px rgba(200,150,46,0.4); transform: translateY(-2px); color: #fff; }
.btn-sm { padding: 10px 24px; font-size: 0.9rem; }

/* === ANIMATIONS === */
@keyframes fadeUp { from { opacity:0; transform:translateY(30px); } to { opacity:1; transform:translateY(0); } }
@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }
@keyframes ticker { from { transform:translateX(0); } to { transform:translateX(-50%); } }
@keyframes pulse { 0%,100% { opacity:1; } 50% { opacity:0.6; } }
.animate-fade-up { animation: fadeUp 0.8s ease-out forwards; opacity: 0; }
.delay-1 { animation-delay:.1s } .delay-2 { animation-delay:.2s }
.delay-3 { animation-delay:.3s } .delay-4 { animation-delay:.4s }

/* === NAVBAR === */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(250,251,254,0.88); backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
nav .container { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.nav-logo {
  font-family: 'Playfair Display', serif; font-weight: 800;
  font-size: 1.25rem; color: var(--ink); text-decoration: none;
  display: flex; align-items: center; gap: 8px;
}
.nav-logo .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); display: inline-block; }
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a { font-size: 0.9rem; font-weight: 500; color: var(--ink-muted); text-decoration: none; }
.nav-links a:hover { color: var(--accent); }
.nav-links a.active { color: var(--accent); font-weight: 600; }
.nav-cta { padding: 10px 24px !important; font-size: 0.86rem !important; }
.mobile-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.mobile-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; transition: 0.3s; border-radius: 2px; }
.mobile-menu {
  display: none; position: fixed; top: 72px; left: 0; right: 0;
  background: var(--card); border-bottom: 1px solid var(--border);
  padding: 24px; flex-direction: column; gap: 16px; box-shadow: var(--shadow-lg);
}
.mobile-menu.open { display: flex; }
.mobile-menu a { font-size: 1rem; font-weight: 500; color: var(--ink-soft); padding: 8px 0; }

/* === TICKER === */
.ticker-bar {
  margin-top: 72px; background: var(--ink); overflow: hidden;
  height: 40px; display: flex; align-items: center;
}
.ticker-track { display: flex; animation: ticker 40s linear infinite; white-space: nowrap; }
.ticker-item {
  display: inline-flex; align-items: center; gap: 6px; padding: 0 28px;
  font-family: 'JetBrains Mono', monospace; font-size: 0.78rem; color: rgba(255,255,255,0.7);
}
.ticker-item .symbol { color: #fff; font-weight: 500; }
.ticker-item .up { color: #34D399; }
.ticker-item .down { color: #FB7185; }

/* === SECTION COMMON === */
section { padding: 80px 0; }
.section-header { text-align: center; max-width: 680px; margin: 0 auto 56px; }
.section-header .label { color: var(--accent); margin-bottom: 12px; display: block; }
.section-header h2 { margin-bottom: 16px; }
.section-header p { color: var(--ink-muted); font-size: 1.1rem; }

/* === PAGE HERO (subpages) === */
.page-hero {
  padding: 120px 0 60px; margin-top: 72px;
  background: linear-gradient(165deg, var(--surface) 0%, #EEF1F8 100%);
  border-bottom: 1px solid var(--border);
}
.page-hero .label { color: var(--accent); margin-bottom: 12px; display: block; }
.page-hero h1 { margin-bottom: 16px; }
.page-hero p { max-width: 640px; }
.breadcrumb { font-size: 0.85rem; color: var(--ink-muted); margin-bottom: 20px; }
.breadcrumb a { color: var(--ink-muted); }
.breadcrumb a:hover { color: var(--accent); }

/* === CARDS === */
.card {
  background: var(--card); border-radius: var(--radius-lg);
  border: 1px solid var(--border); padding: 32px;
  transition: all 0.3s ease;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 24px; }
.card-icon {
  width: 52px; height: 52px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; margin-bottom: 20px;
}

/* === CONTENT PROSE === */
.prose { max-width: 740px; }
.prose h2 { margin: 48px 0 16px; }
.prose h3 { margin: 32px 0 12px; }
.prose p { margin-bottom: 16px; }
.prose ul, .prose ol { margin: 16px 0; padding-left: 24px; }
.prose li { margin-bottom: 8px; color: var(--ink-soft); font-size: 1.05rem; }
.prose strong { color: var(--ink); }

/* === FOOTER === */
footer {
  background: var(--ink); padding: 60px 0 30px; color: rgba(255,255,255,0.5);
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px; margin-bottom: 48px;
}
.footer-brand p { font-size: 0.88rem; margin-top: 12px; line-height: 1.8; }
.footer-col h4 {
  font-family: 'DM Sans', sans-serif; font-weight: 600; color: #fff;
  font-size: 0.85rem; margin-bottom: 16px;
  letter-spacing: 0.05em; text-transform: uppercase;
}
.footer-col a {
  display: block; color: rgba(255,255,255,0.5); text-decoration: none;
  font-size: 0.88rem; padding: 4px 0; transition: color 0.2s;
}
.footer-col a:hover { color: var(--gold); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 24px; display: flex; justify-content: space-between;
  font-size: 0.8rem; flex-wrap: wrap; gap: 12px;
}
.footer-disclaimer {
  margin-top: 24px; padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.05);
  font-size: 0.72rem; line-height: 1.7; color: rgba(255,255,255,0.3);
}

/* === FORMS === */
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block; font-weight: 600; font-size: 0.9rem;
  color: var(--ink); margin-bottom: 6px;
}
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 12px 16px; border: 1px solid var(--border-strong);
  border-radius: 10px; font-family: 'DM Sans', sans-serif; font-size: 1rem;
  color: var(--ink); background: var(--card); transition: border-color 0.2s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light);
}
.form-group textarea { resize: vertical; min-height: 140px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-success {
  background: var(--green-light); border: 1px solid var(--green);
  border-radius: var(--radius); padding: 16px 20px; margin-bottom: 20px;
  color: var(--green); font-weight: 600;
}
.form-error {
  background: var(--red-light); border: 1px solid var(--red);
  border-radius: var(--radius); padding: 16px 20px; margin-bottom: 20px;
  color: var(--red); font-weight: 600;
}

/* === PRICING (shared) === */
.pricing-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; align-items: start; }
.price-card {
  background: var(--card); border-radius: var(--radius-lg);
  border: 1px solid var(--border); overflow: hidden; transition: all 0.3s ease;
}
.price-card:hover { box-shadow: var(--shadow-lg); }
.price-card.featured { border-color: var(--accent); box-shadow: var(--shadow-lg); position: relative; transform: scale(1.04); }
.price-card.featured .price-header { background: var(--accent); color: #fff; }
.price-card.featured .price-header .price-amount { color: #fff; }
.price-card.featured .price-header .price-period { color: rgba(255,255,255,0.7); }
.price-card.featured .popular-tag {
  position: absolute; top: 16px; right: 16px;
  background: var(--gold); color: #fff; padding: 4px 12px; border-radius: 100px;
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase;
}
.price-header { padding: 32px 28px; background: var(--surface); text-align: center; }
.price-name {
  font-family: 'JetBrains Mono', monospace; font-size: 0.78rem; font-weight: 500;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 8px;
}
.price-card.featured .price-name { color: rgba(255,255,255,0.7); }
.price-amount {
  font-family: 'Playfair Display', serif; font-size: 2.8rem; font-weight: 700;
  color: var(--ink); line-height: 1;
}
.price-amount .currency { font-size: 1.2rem; vertical-align: top; margin-right: 2px; }
.price-period { font-size: 0.85rem; color: var(--ink-muted); margin-top: 4px; }
.price-body { padding: 28px; }
.price-features { list-style: none; margin-bottom: 28px; }
.price-features li { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; font-size: 0.9rem; color: var(--ink-soft); }
.price-features li::before { content: '✓'; color: var(--green); font-weight: 700; flex-shrink: 0; margin-top: 1px; }
.price-cta { width: 100%; text-align: center; justify-content: center; }

/* === FAQ === */
.faq-list { max-width: 740px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-question {
  width: 100%; text-align: left; padding: 22px 0; background: none; border: none;
  font-family: 'DM Sans', sans-serif; font-size: 1.05rem; font-weight: 600;
  color: var(--ink); cursor: pointer; display: flex; justify-content: space-between;
  align-items: center; transition: color 0.2s;
}
.faq-question:hover { color: var(--accent); }
.faq-question .arrow { font-size: 1.2rem; color: var(--ink-muted); transition: transform 0.3s; flex-shrink: 0; margin-left: 16px; }
.faq-item.open .faq-question .arrow { transform: rotate(180deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.4s ease; }
.faq-item.open .faq-answer { max-height: 400px; }
.faq-answer p { padding-bottom: 22px; font-size: 0.95rem; color: var(--ink-muted); line-height: 1.8; }

/* === DARK SECTION === */
.dark-section {
  background: linear-gradient(170deg, var(--ink) 0%, #152040 100%);
  color: #fff; position: relative; overflow: hidden;
}
.dark-section::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.dark-section .section-header h2 { color: #fff; }
.dark-section .section-header p { color: rgba(255,255,255,0.6); }
.dark-section .section-header .label { color: var(--gold); }

/* === FINAL CTA === */
.final-cta { padding: 100px 0; text-align: center; }
.final-cta h2 { color: #fff; margin-bottom: 16px; position: relative; z-index: 1; }
.final-cta p { color: rgba(255,255,255,0.6); margin-bottom: 36px; font-size: 1.1rem; position: relative; z-index: 1; }
.final-cta .btn { position: relative; z-index: 1; }

/* === RESPONSIVE === */
@media (max-width: 968px) {
  .features-grid, .pricing-grid, .card-grid { grid-template-columns: 1fr; max-width: 500px; margin-left: auto; margin-right: auto; }
  .price-card.featured { transform: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; }
  .mobile-toggle { display: block; }
  .form-row { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  section { padding: 56px 0; }
  .btn { width: 100%; justify-content: center; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; }
  .page-hero { padding: 100px 0 40px; }
}
