/* ============================================
   MAIN.CSS — Francisco Robledo Personal Site
   Behavioral classes + transitions + mobile
   ============================================ */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
a { color: inherit; text-decoration: none; }
img { display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--accent); color: var(--bg-primary); }

/* ---------- Animations ---------- */
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@keyframes scrollBob {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(6px); }
}

/* ---------- Reveal system ---------- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.85s cubic-bezier(0.16,1,0.3,1),
              transform 0.85s cubic-bezier(0.16,1,0.3,1);
}
.reveal.vis { opacity: 1; transform: none; }
.d1 { transition-delay: 0.10s; }
.d2 { transition-delay: 0.20s; }
.d3 { transition-delay: 0.30s; }
.d4 { transition-delay: 0.40s; }
.dh1 { transition-delay: 0.12s; }
.dh2 { transition-delay: 0.24s; }
.dh3 { transition-delay: 0.36s; }
.dh4 { transition-delay: 0.50s; }
.dh5 { transition-delay: 0.65s; }

/* ---------- Nav ---------- */
.nav-link {
  font-size: 11px; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--text-muted);
  transition: color var(--t-fast); position: relative; padding-bottom: 4px;
}
.nav-link:hover { color: var(--text-primary); }
.nav-link::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 1px;
  background: var(--accent); transform: scaleX(0);
  transition: transform 0.3s ease; transform-origin: left;
}
.nav-link:hover::after { transform: scaleX(1); }

/* ---------- Buttons ---------- */
.btn-gold {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 28px; background: var(--accent); color: var(--bg-primary);
  font-family: var(--font); font-weight: 700;
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  transition: background var(--t-fast), transform var(--t-fast);
}
.btn-gold:hover { background: var(--accent-hover); transform: translateY(-2px); }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 28px; border: 1px solid var(--border); color: var(--text-muted);
  font-family: var(--font); font-weight: 500;
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  transition: border-color var(--t-fast), color var(--t-fast);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Social / footer links ---------- */
.soc-link {
  font-size: 11px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--text-muted);
  transition: color var(--t-fast), transform var(--t-fast); display: inline-block;
}
.soc-link:hover { color: var(--accent); transform: translateY(-2px); }

.footer-link {
  font-size: 11px; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--text-muted); transition: color var(--t-fast);
}
.footer-link:hover { color: var(--text-secondary); }

/* ---------- Service cards ---------- */
.svc-card {
  transition: border-color 0.3s, transform var(--t-smooth);
}
.svc-card:hover { border-color: rgba(84,76,154,0.55) !important; transform: translateY(-5px); }

/* ---------- Resource cards ---------- */
.res-card { transition: border-color 0.3s; }
.res-card:hover { border-color: rgba(84,76,154,0.5) !important; }

/* ---------- Metrics counter ---------- */
.ctr-wrap:hover .cnum { color: var(--accent) !important; }

/* ---------- Tools marquee ---------- */
.tool-item {
  display: inline-flex; align-items: center; gap: 28px;
  white-space: nowrap; padding: 0 16px;
  font-size: 10px; font-weight: 700; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--text-muted);
}
.tool-item::after { content: '◆'; font-size: 5px; color: var(--accent); }

/* ---------- WhatsApp widget ---------- */
#wa-widget {
  position: fixed; bottom: 28px; right: 28px; z-index: 8000;
  width: 56px; height: 56px; background: #25d366; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 24px rgba(37,211,102,0.35);
  transition: transform var(--t-smooth), box-shadow var(--t-smooth);
}
#wa-widget:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 36px rgba(37,211,102,0.55);
}

/* ---------- Calendar modal ---------- */
#cal-modal {
  display: none; position: fixed; inset: 0; z-index: 9000;
  align-items: center; justify-content: center;
}
#cal-modal.open { display: flex; }

/* ---------- Scroll indicator ---------- */
.scroll-bob { animation: scrollBob 2s ease-in-out infinite; }

/* ============================================================
   MOBILE  ≤ 860px
   ============================================================ */
@media (max-width: 860px) {
  /* NAV */
  #nav-inner { padding: 14px 20px !important; }
  .nav-link { display: none !important; }

  /* HERO */
  #hero { min-height: auto !important; }
  .hero-grid { grid-template-columns: 1fr !important; padding: 0 20px !important; }
  .hero-photo { display: none !important; }
  .hero-left { padding: 100px 0 56px !important; gap: 24px !important; }
  .hero-scroll { display: none !important; }
  .hero-rule { display: none !important; }

  /* METRICS */
  .metrics-row { grid-template-columns: repeat(2, 1fr) !important; }
  .metrics-row > div { border-right: none !important; border-bottom: 1px solid var(--border) !important; }
  .metrics-row > div:nth-child(odd) { border-right: 1px solid var(--border) !important; }
  .cnum { font-size: 52px !important; }

  /* SECTION PADDINGS */
  #sobre, #servicios, #agencia, #recursos, #contacto {
    padding: 64px 20px !important;
  }
  .metrics-section { padding-left: 20px !important; padding-right: 20px !important; }

  /* GRIDS → SINGLE COLUMN */
  .about-grid { grid-template-columns: 1fr !important; gap: 40px !important; }
  .svc-grid { grid-template-columns: 1fr !important; }
  .svc-card { border-right: none !important; border-bottom: 1px solid var(--border) !important; }
  .agencia-grid { grid-template-columns: 1fr !important; gap: 40px !important; }
  .agencia-stats { grid-template-columns: repeat(2, 1fr) !important; }
  .res-grid { grid-template-columns: 1fr !important; }

  /* HEADINGS */
  h1 { font-size: clamp(40px, 10vw, 68px) !important; }
  h2 { font-size: clamp(28px, 7.5vw, 48px) !important; }

  /* CONTACT */
  .contact-btns { flex-direction: column !important; align-items: center !important; }

  /* FOOTER */
  footer.site-footer {
    flex-direction: column !important; gap: 24px !important;
    padding: 36px 20px !important; text-align: center !important;
  }
  footer.site-footer > div:nth-child(2) {
    justify-content: center !important; flex-wrap: wrap !important; gap: 16px !important;
  }

  /* ── COLORES: texto blanco en mobile ───────────────────────── */
  /* Labels de sección en violeta (10px/9px) → blanco visible */
  [style*="color:#544c9a"][style*="font-size:10px"],
  [style*="color:#544c9a"][style*="font-size:9px"] {
    color: rgba(255,255,255,0.55) !important;
  }
  /* Links sociales y footer → más visibles */
  .soc-link   { color: rgba(255,255,255,0.65) !important; }
  .footer-link { color: rgba(255,255,255,0.55) !important; }
  /* Tool marquee */
  .tool-item  { color: rgba(255,255,255,0.45) !important; }

  /* Quote card: ocultar sombra decorativa para evitar overflow */
  .about-grid .reveal.d1 > div[style*="bottom:-14px"] { display: none !important; }

  /* About section quote card: padding reducido en mobile */
  .about-grid .reveal.d1 > div:first-child {
    padding: 36px 28px !important;
  }

  /* Service cards: padding reducido */
  .svc-card { padding: 36px 24px !important; }

  /* Agencia stats: padding reducido en mobile */
  .agencia-stats > div { padding: 28px 20px !important; }

  /* Recursos cards: padding reducido */
  .res-card { padding: 40px 28px !important; }

  /* Modal: ancho completo en mobile */
  #cal-modal > div:last-child { width: 95% !important; max-height: 95vh !important; }
}
