/* ==========================================================
   MetaOffice — portada (/metaoffice/) dentro de la web.
   Usa las variables y la tipografía de /assets/css/style.css, como MetaPDF.
   ========================================================== */

.mo-body { background: var(--bg); }
.mo-portada { min-height: 70vh; }

/* ---------- Cabecera ---------- */
.mo-hero { text-align: center; padding: 118px 22px 40px; }
.mo-hero-ico { width: 84px; height: 84px; margin: 0 auto 22px; border-radius: 20px; box-shadow: 0 18px 36px -16px rgba(0, 0, 0, .5); animation: mo-p-rise .9s var(--ease) both; }
.mo-hero h1 { font-size: clamp(38px, 6.4vw, 68px); line-height: 1.05; letter-spacing: -0.045em; font-weight: 700; margin: 0 auto; max-width: 920px; animation: mo-p-rise .9s .06s var(--ease) both; }
.mo-hero h1 span { background: linear-gradient(90deg, #2f8cff 0%, #34c759 35%, #ff8a00 68%, #b25cf0 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mo-hero > p { font-size: clamp(18px, 2.2vw, 22px); color: var(--ink-2); max-width: 680px; margin: 18px auto 0; line-height: 1.4; animation: mo-p-rise .9s .12s var(--ease) both; }
.mo-hero-ctas { display: flex; align-items: center; justify-content: center; gap: 24px; flex-wrap: wrap; margin-top: 30px; animation: mo-p-rise .9s .18s var(--ease) both; }
.mo-hero-ctas .btn { border: 0; cursor: pointer; font-family: inherit; }
.mo-soltar-tip { font-size: 14px !important; color: var(--ink-3) !important; margin-top: 16px !important; }

/* ---------- Secciones ---------- */
.mo-sec-head { max-width: 1120px; margin: 0 auto; padding: 0 22px 16px; display: flex; align-items: baseline; gap: 12px; }
.mo-sec-head h2 { font-size: 28px; font-weight: 700; letter-spacing: -0.03em; }
.mo-sec-sub { font-size: 15px; color: var(--ink-3); }
.mo-recientes { padding: 10px 0 34px; }
.mo-apps { padding: 10px 0 20px; scroll-margin-top: 60px; }

/* ---------- Tarjetas de app ---------- */
.mo-grid { max-width: 1120px; margin: 0 auto; padding: 0 22px 40px; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.mo-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding: 24px 22px;
  background: #fff;
  border-radius: 22px;
  color: var(--ink);
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .04), inset 0 0 0 1px rgba(0, 0, 0, .04);
  transition: transform .45s var(--ease), box-shadow .45s var(--ease);
  animation: mo-p-rise .8s var(--ease) both;
}
.mo-card:nth-child(2) { animation-delay: .04s; } .mo-card:nth-child(3) { animation-delay: .08s; }
.mo-card:nth-child(4) { animation-delay: .12s; } .mo-card:nth-child(5) { animation-delay: .16s; } .mo-card:nth-child(6) { animation-delay: .2s; }
.mo-card:hover { transform: translateY(-4px); box-shadow: 0 24px 46px -26px rgba(0, 0, 0, .32), inset 0 0 0 1px rgba(0, 0, 0, .03); }
.mo-card-ico img { width: 64px; height: 64px; border-radius: 15px; box-shadow: 0 12px 24px -14px rgba(0, 0, 0, .45); transition: transform .5s cubic-bezier(.34, 1.4, .64, 1); }
.mo-card:hover .mo-card-ico img { transform: scale(1.07) rotate(-2deg); }
.mo-card-tx { display: grid; gap: 4px; flex: 1; min-width: 0; }
.mo-card-tx strong { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; }
.mo-card-tx span { font-size: 15px; line-height: 1.4; color: var(--ink-2); }
.mo-card-tx small { font-size: 13px; color: var(--ink-3); margin-top: 4px; }
.mo-card-nuevo { align-self: center; font-size: 14px; font-weight: 600; color: var(--link); padding: 6px 14px; border-radius: 99px; background: var(--bg-alt); transition: background .2s, color .2s; white-space: nowrap; }
.mo-card:hover .mo-card-nuevo { background: var(--blue); color: #fff; }

/* ---------- Documentos recientes ---------- */
.mo-docs { max-width: 1120px; margin: 0 auto; padding: 0 22px; display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 18px; }
.mo-doc { position: relative; display: grid; gap: 8px; text-align: left; border: 0; background: transparent; padding: 0; font: inherit; color: var(--ink); cursor: pointer; animation: mo-p-rise .7s var(--ease) both; }
.mo-doc-thumb { position: relative; aspect-ratio: 4 / 3; border-radius: 14px; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .05), inset 0 0 0 1px rgba(0, 0, 0, .06); overflow: hidden; display: grid; place-items: center; transition: transform .45s var(--ease), box-shadow .45s var(--ease); }
.mo-doc-thumb img.mini { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.mo-doc-thumb img.app { width: 48px; height: 48px; border-radius: 11px; opacity: .95; }
.mo-doc-thumb .chip { position: absolute; left: 8px; bottom: 8px; width: 22px; height: 22px; border-radius: 6px; box-shadow: 0 2px 6px rgba(0, 0, 0, .2); }
.mo-doc:hover .mo-doc-thumb { transform: translateY(-3px); box-shadow: 0 18px 36px -22px rgba(0, 0, 0, .35), inset 0 0 0 1px rgba(0, 0, 0, .04); }
.mo-doc b { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 30px; }
.mo-doc small { font-size: 13px; color: var(--ink-3); margin-top: -6px; }
.mo-doc-mas { position: absolute; right: -4px; bottom: 14px; width: 30px; height: 30px; border: 0; border-radius: 50%; background: transparent; color: var(--ink-2); display: grid; place-items: center; cursor: pointer; transition: background .2s; }
.mo-doc-mas:hover { background: var(--bg-alt); color: var(--ink); }
.mo-doc-mas svg { width: 18px; height: 18px; }
.mo-ver-todos { display: block; margin: 22px auto 0; border: 0; background: none; font: inherit; cursor: pointer; }
.mo-ver-todos[hidden] { display: none; }
.mo-doc.fuera { animation: mo-p-out .35s var(--ease) forwards; }

/* ---------- Ventajas ---------- */
.mo-ventajas { max-width: 1120px; margin: 10px auto 0; padding: 0 22px 100px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.mo-ventaja { background: var(--bg-alt); border-radius: 22px; padding: 26px 24px; }
.mo-ventaja svg { width: 28px; height: 28px; color: var(--blue); margin-bottom: 12px; }
.mo-ventaja h3 { font-size: 19px; font-weight: 600; letter-spacing: -0.02em; margin: 0 0 6px; }
.mo-ventaja p { font-size: 15px; color: var(--ink-2); margin: 0; line-height: 1.45; }

/* ---------- Soltar archivos ---------- */
.mo-drop { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; background: rgba(251, 251, 253, .82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); opacity: 0; visibility: hidden; transition: opacity .3s var(--ease), visibility .3s; }
.mo-drop.on { opacity: 1; visibility: visible; }
.mo-drop > div { display: grid; justify-items: center; gap: 16px; padding: 48px 60px; border-radius: 28px; border: 2px dashed rgba(0, 0, 0, .18); transform: scale(.94); transition: transform .45s cubic-bezier(.34, 1.4, .64, 1); }
.mo-drop.on > div { transform: none; }
.mo-drop img { border-radius: 17px; }
.mo-drop strong { font-size: 22px; letter-spacing: -0.02em; }

/* ---------- Menú y diálogos de shared/meta.js (con los colores de la web) ---------- */
.mo-menu { position: fixed; z-index: 1000; min-width: 200px; padding: 5px; border-radius: 12px; background: rgba(255, 255, 255, .92); backdrop-filter: saturate(180%) blur(24px); -webkit-backdrop-filter: saturate(180%) blur(24px); box-shadow: 0 18px 50px -12px rgba(0, 0, 0, .28), 0 0 0 .5px rgba(0, 0, 0, .1); animation: mo-p-pop .28s cubic-bezier(.34, 1.4, .64, 1); transform-origin: top left; }
.mo-menu.closing { animation: mo-p-fade .14s forwards; }
.mo-menu-item { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 30px; padding: 4px 10px 4px 8px; border: 0; border-radius: 7px; background: transparent; font: inherit; font-size: 14px; text-align: left; color: var(--ink); cursor: default; letter-spacing: -0.01em; }
.mo-menu-item .ic { width: 16px; height: 16px; display: grid; place-items: center; color: var(--ink-2); }
.mo-menu-item .ic svg { width: 15px; height: 15px; }
.mo-menu-item .tx { flex: 1; }
.mo-menu-item:hover { background: var(--blue); color: #fff; }
.mo-menu-item:hover .ic { color: #fff; }
.mo-menu-item.danger { color: #d70015; }
.mo-menu-item.danger:hover { background: #d70015; color: #fff; }
.mo-menu-sep { height: 1px; margin: 5px 8px; background: var(--line); }
.mo-backdrop { position: fixed; inset: 0; z-index: 900; display: grid; place-items: center; padding: 16px; background: rgba(0, 0, 0, .28); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); animation: mo-p-fade-in .28s var(--ease); }
.mo-backdrop.closing { animation: mo-p-fade .28s forwards; }
.mo-dialog { width: min(var(--w, 440px), 100%); border-radius: 20px; background: #fff; box-shadow: 0 30px 70px -20px rgba(0, 0, 0, .4); animation: mo-p-sheet .5s cubic-bezier(.34, 1.4, .64, 1); overflow: hidden; }
.mo-dialog-head { display: flex; align-items: center; gap: 10px; padding: 20px 22px 4px; }
.mo-dialog-head h2 { flex: 1; font-size: 19px; font-weight: 600; letter-spacing: -0.02em; }
.mo-dialog-body { padding: 10px 22px 6px; font-size: 15px; }
.mo-dialog-body p { color: var(--ink-2); margin: 0 0 10px; }
.mo-dialog-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 22px 20px; }
.mo-field { display: grid; gap: 6px; margin-bottom: 10px; }
.mo-field > span { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.mo-input { height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; font-size: 16px; outline: none; transition: box-shadow .2s, border-color .2s; }
.mo-input:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(225, 6, 0, .12); }
.mo-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 16px; border: 0; border-radius: 99px; background: var(--bg-alt); color: var(--ink); font: inherit; font-size: 15px; font-weight: 500; cursor: pointer; transition: background .2s, transform .2s var(--ease); }
.mo-btn:hover { background: #e8e8ed; }
.mo-btn:active { transform: scale(.97); }
.mo-btn.primary { background: var(--blue); color: #fff; }
.mo-btn.primary:hover { background: var(--blue-hover); }
.mo-btn.danger { background: #d70015; color: #fff; }
.mo-btn.ghost { background: transparent; }
.mo-btn.icon { width: 32px; height: 32px; padding: 0; }
.mo-btn svg { width: 16px; height: 16px; }
.mo-toasts { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 1100; display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.mo-toast { display: flex; align-items: center; gap: 9px; padding: 11px 18px; border-radius: 99px; background: rgba(29, 29, 31, .9); color: #fff; font-size: 14px; font-weight: 500; box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .45); animation: mo-p-sheet .5s cubic-bezier(.34, 1.4, .64, 1); }
.mo-toast.out { animation: mo-p-fade .3s forwards; }
.mo-toast svg { width: 16px; height: 16px; }

@keyframes mo-p-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes mo-p-out { to { opacity: 0; transform: scale(.9); } }
@keyframes mo-p-pop { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }
@keyframes mo-p-fade { to { opacity: 0; } }
@keyframes mo-p-fade-in { from { opacity: 0; } }
@keyframes mo-p-sheet { from { opacity: 0; transform: translateY(16px) scale(.97); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .mo-portada *, .mo-hero-ico { animation: none !important; transition: none !important; } }

@media (max-width: 760px) {
  .mo-hero { padding: 96px 20px 28px; }
  .mo-hero-ico { width: 72px; height: 72px; border-radius: 17px; }
  .mo-grid { grid-template-columns: 1fr; gap: 12px; padding: 0 16px 30px; }
  .mo-card { padding: 18px 16px; gap: 14px; }
  .mo-card-ico img { width: 54px; height: 54px; border-radius: 13px; }
  .mo-card-tx strong { font-size: 18px; }
  .mo-card-nuevo { display: none; }
  .mo-docs { grid-template-columns: repeat(2, 1fr); gap: 14px; padding: 0 16px; }
  .mo-sec-head { padding: 0 16px 12px; }
  .mo-ventajas { grid-template-columns: 1fr; padding: 0 16px 70px; }
  .mo-soltar-tip { display: none; }
  .mo-backdrop { align-items: end; padding: 8px; }
}
