/* ============================================================
   ATPLM.Go Studios · Hub General / Holding (index.css)
   ============================================================ */
:root {
  --atplm-red: #ff4136;
  --atplm-celeste: #4a90e2;
  --apple-green: #6aa84f;
  --apple-yellow: #f1c232;
  --purple: #8b5cf6;
  --orange: #f97316;
  --pink: #ec4899;
  --teal: #0d9488;
  --bg: #fdfdff;
  --bg-soft: #f4f6fb;
  --card: #ffffff;
  --border: #e7eaf2;
  --text: #334155;
  --text-soft: #64748b;
  --heading: #0f172a;
  --shadow: 0 10px 32px rgba(15, 23, 42, 0.07);
}

[data-theme="dark"] {
  --bg: #0b0f19;
  --bg-soft: #121829;
  --card: #151b2c;
  --border: rgba(255, 255, 255, 0.07);
  --text: #cbd5e1;
  --text-soft: #8b96a8;
  --heading: #f1f5f9;
  --shadow: 0 10px 32px rgba(0, 0, 0, 0.35);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg); color: var(--text); min-height: 100vh;
  display: flex; flex-direction: column; transition: background 0.3s, color 0.3s;
}
h1, h2, h3, h4 { color: var(--heading); }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: var(--atplm-celeste); border-radius: 99px; }

/* ---------- Utilidades ---------- */
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { width: 42px; height: 42px; border-radius: 12px; }
.brand-name { font-family: 'Fredoka One', cursive; font-size: 1.4rem; line-height: 1; letter-spacing: -0.5px; }
.brand-name .r { color: var(--atplm-red); }
.brand-name .c { color: var(--atplm-celeste); }
.brand-sub { display: block; font-family: 'Inter'; font-size: 8px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.22em; color: var(--text-soft); margin-top: 3px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 12px; font-weight: 700; font-size: 0.9rem; padding: 13px 24px;
  border: none; cursor: pointer; text-decoration: none; transition: all 0.25s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--atplm-celeste); color: #fff; box-shadow: 0 8px 22px rgba(74, 144, 226, 0.35); }
.btn-primary:hover { background: #3a7fd6; transform: translateY(-2px); }
.btn-red { background: var(--atplm-red); color: #fff; box-shadow: 0 8px 22px rgba(255, 65, 54, 0.32); }
.btn-red:hover { background: #e63a30; transform: translateY(-2px); }
.btn-dark { background: var(--heading); color: var(--bg); }
[data-theme="dark"] .btn-dark { background: #fff; color: #0b0f19; }
.btn-dark:hover { opacity: 0.9; transform: translateY(-2px); }
.btn-sm { padding: 9px 16px; font-size: 0.78rem; border-radius: 10px; }

.section-tag {
  display: inline-flex; align-items: center; gap: 8px; font-size: 0.7rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--atplm-celeste);
  background: rgba(74, 144, 226, 0.1); border: 1px solid rgba(74, 144, 226, 0.22);
  padding: 6px 14px; border-radius: 999px; margin-bottom: 14px;
}
.section-title { font-size: clamp(1.7rem, 3.4vw, 2.6rem); font-weight: 900; letter-spacing: -0.5px; color: var(--heading); }
.section-desc { color: var(--text-soft); margin-top: 10px; max-width: 640px; line-height: 1.6; }
.section-head { text-align: center; margin-bottom: 40px; }

.badge {
  display: inline-flex; align-items: center; gap: 5px; font-size: 0.62rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.04em; padding: 4px 10px; border-radius: 999px;
}
.badge-green { background: rgba(106, 168, 79, 0.1); color: #5a9443; border: 1px solid rgba(106, 168, 79, 0.25); }
.badge-warn { background: rgba(241, 194, 50, 0.12); color: #c99c12; border: 1px solid rgba(241, 194, 50, 0.3); }
.badge-purple { background: rgba(139, 92, 246, 0.1); color: #7c3aed; border: 1px solid rgba(139, 92, 246, 0.28); }
[data-theme="dark"] .badge-green { color: #8fd976; }
[data-theme="dark"] .badge-warn { color: #ffd75e; }
[data-theme="dark"] .badge-purple { color: #b29bff; }

.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s cubic-bezier(0.16,1,0.3,1), transform 0.7s cubic-bezier(0.16,1,0.3,1); }
.reveal.active { opacity: 1; transform: none; }

/* ============ ANIMACIONES ============ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(26px); }
  to { opacity: 1; transform: none; }
}
@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-16px); }
}
@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50% { transform: translateY(-13px) rotate(5deg); }
}
@keyframes shimmer {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(120%); }
}
@keyframes wiggle {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(-8deg); }
  75% { transform: rotate(8deg); }
}
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 65, 54, 0.35); }
  50% { box-shadow: 0 0 0 10px rgba(255, 65, 54, 0); }
}

/* Entrada del hero escalonada */
.hero > .container > * { animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) both; }
.hero > .container > :nth-child(1) { animation-delay: 0.05s; }
.hero > .container > :nth-child(2) { animation-delay: 0.15s; }
.hero > .container > :nth-child(3) { animation-delay: 0.25s; }
.hero > .container > :nth-child(4) { animation-delay: 0.35s; }
.hero > .container > :nth-child(5) { animation-delay: 0.45s; }
.hero > .container > :nth-child(n+6) { animation-delay: 0.55s; }

.hero > .container > .hero-badge { animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) both, pulseGlow 3s ease-in-out infinite 1.2s; }

/* Manzanas flotantes en el hero */
.hero::before, .hero::after {
  content: '🍎'; position: absolute; font-size: 3.2rem; opacity: 0.14;
  animation: bob 6s ease-in-out infinite; pointer-events: none; user-select: none;
}
.hero::before { left: 5%; top: 26%; }
.hero::after { content: '🍏'; right: 5%; top: 32%; font-size: 3.8rem; animation-delay: 1.6s; }

/* Botones con brillo */
.btn { position: relative; overflow: hidden; }
.btn::after {
  content: ''; position: absolute; top: 0; bottom: 0; left: 0; width: 60%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: translateX(-120%); pointer-events: none;
}
.btn:hover::after { animation: shimmer 0.8s ease; }
.btn:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(15, 23, 42, 0.16); }
.btn-red:hover { box-shadow: 0 14px 30px rgba(255, 65, 54, 0.34); }
.btn-primary:hover { box-shadow: 0 14px 30px rgba(74, 144, 226, 0.34); }

/* Logo que se mece en hover */
.brand:hover img { animation: wiggle 0.5s ease; }

/* Emojis que se mueven en tarjetas */
.div-card .div-emoji, .f-card .f-emoji, .app-row .a-icon { display: inline-block; transition: transform 0.3s ease; }
.div-card:hover .div-emoji, .f-card:hover .f-emoji, .app-row:hover .a-icon { animation: wiggle 0.5s ease; }
.app-row { transition: transform 0.25s ease, box-shadow 0.25s ease; }
.app-row:hover { transform: translateX(5px); box-shadow: 0 18px 38px rgba(15, 23, 42, 0.13); }

/* Stats vivas */
.stat { transition: transform 0.28s ease, box-shadow 0.28s ease; }
.stat:hover { transform: translateY(-5px) scale(1.02); box-shadow: 0 20px 40px rgba(15, 23, 42, 0.14); }
.stat:hover .n { color: var(--atplm-celeste); }
.stat .n { transition: color 0.3s; }
.stat .l { transition: color 0.3s; }
.stat:hover .l { color: var(--atplm-red); }

/* Equipo con rebote suave */
.team-card { transition: transform 0.25s ease, box-shadow 0.25s ease; }
.team-card:hover { transform: translateY(-3px); box-shadow: 0 16px 30px rgba(15, 23, 42, 0.12); }
.team-avatar { transition: transform 0.3s ease; }
.team-card:hover .team-avatar { animation: wiggle 0.5s ease; }

/* ---------- Navbar ---------- */
.topbar { position: sticky; top: 0; z-index: 60; background: rgba(255,255,255,0.85); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--border); }
[data-theme="dark"] .topbar { background: rgba(11,15,25,0.85); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.nav { display: flex; align-items: center; gap: 4px; list-style: none; }
.nav a { text-decoration: none; color: var(--text); font-weight: 600; font-size: 0.88rem; padding: 9px 14px; border-radius: 10px; transition: all 0.2s; }
.nav a:hover { background: var(--bg-soft); color: var(--heading); }
.nav a.active { background: rgba(74, 144, 226, 0.12); color: var(--atplm-celeste); }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; border: 1px solid var(--border); background: transparent; color: var(--text); cursor: pointer; font-size: 1rem; transition: all 0.2s; }
.icon-btn:hover { background: var(--bg-soft); color: var(--heading); }
#menu-btn { display: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; padding: 92px 0 100px; text-align: center;
  background:
    radial-gradient(720px 440px at 12% -80px, rgba(255, 65, 54, 0.14), transparent 60%),
    radial-gradient(720px 440px at 88% -80px, rgba(74, 144, 226, 0.16), transparent 60%),
    linear-gradient(180deg, var(--bg-soft), var(--bg));
  border-bottom: 1px solid var(--border);
}
.hero-badge {
  display: inline-flex; gap: 8px; align-items: center; font-size: 0.7rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-soft);
  background: var(--card); border: 1px solid var(--border); padding: 7px 16px; border-radius: 999px; box-shadow: var(--shadow);
}
.hero h1 { font-size: clamp(2.4rem, 6.5vw, 4.4rem); font-weight: 900; letter-spacing: -1.5px; margin: 22px auto 0; line-height: 1.05; }
.hero h1 .r { color: var(--atplm-red); }
.hero h1 .c { color: var(--atplm-celeste); }
.hero h1 .g { color: var(--apple-green); }
.hero .motto { font-size: clamp(1.05rem, 2.2vw, 1.35rem); font-weight: 600; color: var(--text-soft); margin-top: 18px; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 34px; }
.hero-note { margin-top: 14px; font-size: 0.78rem; color: var(--text-soft); font-weight: 600; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 54px; }
.stat { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 20px 14px; box-shadow: var(--shadow); }
.stat .n { font-size: 1.7rem; font-weight: 900; color: var(--heading); letter-spacing: -0.8px; }
.stat .l { font-size: 0.74rem; font-weight: 700; color: var(--text-soft); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.08em; }

/* ---------- Secciones generales ---------- */
.section { padding: 78px 0; }
.section-alt { background: var(--bg-soft); }

/* ---------- Divisiones ---------- */
.div-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.div-card {
  position: relative; display: flex; flex-direction: column; gap: 14px; text-decoration: none;
  background: var(--card); border: 1px solid var(--border); border-radius: 22px; padding: 28px 22px;
  box-shadow: var(--shadow); overflow: hidden; transition: transform 0.28s ease, box-shadow 0.28s ease;
  border-top: 7px solid var(--dc, var(--atplm-celeste));
}
.div-card:hover { transform: translateY(-7px); box-shadow: 0 26px 52px rgba(15,23,42,0.15); }
.div-card::after {
  content: '→'; position: absolute; right: 16px; bottom: 14px; font-size: 1.3rem; font-weight: 900;
  color: var(--dc, var(--atplm-celeste)); opacity: 0.35; transition: all 0.25s;
}
.div-card:hover::after { opacity: 1; transform: translateX(4px); }
.div-emoji { font-size: 2.6rem; }
.div-card h3 { font-size: 1.18rem; font-weight: 900; color: var(--heading); }
.div-card p { font-size: 0.83rem; color: var(--text-soft); line-height: 1.6; flex: 1; }
.div-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.div-chips span { font-size: 0.63rem; font-weight: 700; color: var(--text-soft); background: var(--bg-soft); border: 1px solid var(--border); padding: 3px 9px; border-radius: 999px; }
.div-more { font-size: 0.78rem; font-weight: 800; color: var(--dc, var(--atplm-celeste)); }

/* ---------- Destacados ---------- */
.featured-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.f-card {
  display: flex; flex-direction: column; gap: 12px; text-decoration: none;
  background: var(--card); border: 1px solid var(--border); border-radius: 18px; padding: 20px;
  box-shadow: var(--shadow); border-top: 6px solid var(--accent, var(--atplm-celeste)); transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.f-card:hover { transform: translateY(-5px); box-shadow: 0 20px 44px rgba(15,23,42,0.14); }
.f-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.f-emoji { font-size: 1.9rem; }
.f-card h3 { font-size: 1.02rem; font-weight: 800; }
.f-card .divtag { font-size: 0.66rem; font-weight: 800; color: var(--text-soft); margin-top: 5px; display: flex; gap: 5px; align-items: center; }
.f-card p { font-size: 0.82rem; color: var(--text-soft); line-height: 1.55; flex: 1; }
.f-cta { font-size: 0.8rem; font-weight: 800; color: var(--atplm-celeste); }
.f-card:hover .f-cta { text-decoration: underline; }

/* ---------- Apps ---------- */
.app-grid { display: flex; flex-direction: column; gap: 14px; }
.app-row {
  display: flex; align-items: center; gap: 18px; background: var(--card);
  border: 1px solid var(--border); border-radius: 16px; padding: 18px 20px; box-shadow: var(--shadow);
}
.app-row .a-icon { font-size: 1.8rem; flex-shrink: 0; }
.app-row h4 { font-size: 1rem; font-weight: 800; }
.app-row p { font-size: 0.82rem; color: var(--text-soft); margin-top: 3px; }
.app-row .chip { margin-left: auto; font-size: 0.66rem; font-weight: 700; color: var(--text-soft); background: var(--bg-soft); border: 1px solid var(--border); padding: 3px 10px; border-radius: 999px; white-space: nowrap; }

/* ---------- Equipo / Nosotros ---------- */
.about-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; }
.about-img { width: 100%; border-radius: 22px; box-shadow: var(--shadow); border: 1px solid var(--border); }
.team-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 8px; }
.team-card { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; box-shadow: var(--shadow); }
.team-avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--bg-soft); border: 1px solid var(--border); font-size: 1.3rem; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.team-card .t-name { font-size: 0.85rem; font-weight: 800; color: var(--heading); }
.team-card .t-role { font-size: 0.7rem; color: var(--text-soft); font-weight: 600; }

/* ---------- Footer ---------- */
.footer { background: #0b0f19; color: #94a3b8; padding: 44px 0 26px; }
.footer a { color: #94a3b8; text-decoration: none; transition: color 0.2s; }
.footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 32px; padding-bottom: 26px; border-bottom: 1px solid rgba(255,255,255,0.07); }
.footer h4 { color: #fff; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.14em; margin-bottom: 14px; }
.footer ul { list-style: none; display: grid; gap: 9px; font-size: 0.85rem; font-weight: 600; }
.footer .brand-name { color: #fff; }
.footer-desc { font-size: 0.8rem; line-height: 1.6; margin-top: 12px; max-width: 380px; }
.socials { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.socials a { width: 36px; height: 36px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.07); font-size: 0.95rem; transition: all 0.2s; text-decoration: none; }
.socials a:hover { background: var(--atplm-red); color: #fff; transform: translateY(-3px); }
.footer-bottom { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding-top: 20px; font-size: 0.74rem; font-weight: 600; color: #64748b; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  #menu-btn { display: inline-flex; }
  .nav { position: fixed; inset: 0 0 auto 0; flex-direction: column; align-items: stretch; background: var(--bg); padding: 16px; gap: 6px; border-bottom: 1px solid var(--border); box-shadow: var(--shadow); transform: translateY(-110%); transition: transform 0.3s ease; z-index: -1; }
  .nav.open { transform: translateY(0); }
  .nav a { padding: 13px 14px; font-size: 1rem; }
  .div-grid { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .div-grid { grid-template-columns: 1fr; }
  .app-row { flex-wrap: wrap; }
  .app-row .chip { margin-left: 0; }
  .footer-bottom { flex-direction: column; }
}