/* ==========================================================
   Tably — portada (/tably/) dentro de la web.
   Usa las variables y la tipografía de /assets/css/style.css, como MetaOffice y MetaPDF.
   ========================================================== */
.tb-body { background: var(--bg); }
.tb-portada { min-height: 70vh; padding-bottom: 40px; }

/* ---------- cabecera ---------- */
.tb-hero { text-align: center; padding: 118px 22px 46px; }
.tb-hero-ico { width: 84px; height: 84px; margin: 0 auto 22px; border-radius: 20px; box-shadow: 0 18px 36px -16px rgba(150, 60, 0, .6); animation: tb-p-rise .9s var(--ease) both; }
.tb-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: tb-p-rise .9s .06s var(--ease) both; }
.tb-hero h1 span { background: linear-gradient(90deg, #ff9f0a 0%, #ff6a13 40%, #e10600 75%, #bf1a5c 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tb-hero > p { font-size: clamp(18px, 2.2vw, 22px); color: var(--ink-2); max-width: 700px; margin: 18px auto 0; line-height: 1.4; animation: tb-p-rise .9s .12s var(--ease) both; }
.tb-hero-ctas { display: flex; align-items: center; justify-content: center; gap: 24px; flex-wrap: wrap; margin-top: 30px; animation: tb-p-rise .9s .18s var(--ease) both; }

/* ---------- secciones ---------- */
.tb-sec { max-width: 1120px; margin: 0 auto; padding: 14px 22px 34px; scroll-margin-top: 60px; }
.tb-sec[hidden] { display: none; }
.tb-sec-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding-bottom: 16px; }
.tb-sec-head h2 { font-size: 28px; font-weight: 700; letter-spacing: -0.03em; margin-right: auto; }
.tb-sec-sub { font-size: 15px; color: var(--ink-3); }
.btn-equipo { display: inline-flex; align-items: center; gap: 7px; border: 0; background: #fff; color: var(--ink); font: 500 15px var(--font); padding: 9px 16px; border-radius: 99px; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08); transition: background .2s; }
.btn-equipo:hover { background: var(--bg-alt); }
.tb-pills { display: flex; gap: 8px; flex-wrap: wrap; margin: -4px 0 18px; }
.tb-pill { padding: 7px 15px; border-radius: 99px; background: #fff; color: var(--ink); font-size: 14px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08); }
.tb-pill.activo { background: var(--ink); color: #fff; box-shadow: none; }

/* ---------- pizarras ---------- */
.tb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
.tb-card { position: relative; display: grid; gap: 6px; color: var(--ink); text-decoration: none; animation: tb-p-rise .7s var(--ease) both; }
.tb-card-a { display: grid; gap: 6px; color: inherit; text-decoration: none; }
.tb-card-thumb { position: relative; aspect-ratio: 16 / 10; border-radius: 16px; 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); color: var(--ink-3); }
.tb-card:hover .tb-card-thumb { transform: translateY(-3px); box-shadow: 0 22px 40px -26px rgba(0, 0, 0, .4), inset 0 0 0 1px rgba(0, 0, 0, .05); }
.tb-card-thumb img.mini { width: 100%; height: 100%; object-fit: cover; }
.tb-card-thumb img.vacia { width: 44px; height: 44px; border-radius: 11px; opacity: .9; }
.tb-card strong { font-size: 16px; font-weight: 600; letter-spacing: -0.015em; padding: 4px 40px 0 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-card small { font-size: 13px; color: var(--ink-3); padding: 0 2px; }
.tb-card-nueva .tb-card-thumb { background: transparent; box-shadow: inset 0 0 0 2px var(--line); border: 0; color: var(--link); }
.tb-card-nueva:hover .tb-card-thumb { box-shadow: inset 0 0 0 2px var(--link); }
.tb-chip { position: absolute; left: 10px; bottom: 10px; width: 26px; height: 26px; border-radius: 8px; background: rgba(255, 255, 255, .92); color: var(--ink); display: grid; place-items: center; box-shadow: 0 2px 6px rgba(0, 0, 0, .15); }
.tb-chip-2 { left: 42px; }
.tb-card-menu { position: absolute; right: 0; bottom: 18px; border: 0; background: transparent; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; color: var(--ink-2); }
.tb-card-menu:hover { background: var(--bg-alt); color: var(--ink); }
.tb-cmenu { position: absolute; z-index: 30; right: 0; bottom: 54px; background: #fff; border-radius: 14px; box-shadow: 0 18px 50px -14px rgba(0, 0, 0, .35), 0 0 0 .5px rgba(0, 0, 0, .1); padding: 6px; min-width: 180px; display: grid; animation: tb-p-rise .2s var(--ease) both; }
.tb-cmenu button, .tb-cmenu a { border: 0; background: transparent; text-align: left; padding: 9px 12px; border-radius: 8px; font: 15px var(--font); color: var(--ink); cursor: pointer; text-decoration: none; }
.tb-cmenu button:hover, .tb-cmenu a:hover { background: var(--bg-alt); }
.tb-cmenu .peligro { color: #d70015; }

/* ---------- cuenta ---------- */
.tb-cuenta { display: flex; align-items: center; gap: 28px; justify-content: space-between; flex-wrap: wrap; background: #fff; border-radius: 24px; padding: 30px 32px; box-shadow: 0 1px 2px rgba(0, 0, 0, .04), inset 0 0 0 1px rgba(0, 0, 0, .04); }
.tb-cuenta h2 { font-size: 24px; letter-spacing: -0.025em; }
.tb-cuenta p { color: var(--ink-2); margin-top: 6px; max-width: 560px; }
.tb-cuenta-btns { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }

/* ---------- plantillas ---------- */
.tb-plants { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.tb-plant { display: grid; gap: 4px; color: var(--ink); text-decoration: none; padding: 12px 12px 16px; background: #fff; border-radius: 20px; 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: tb-p-rise .8s var(--ease) both; }
.tb-plant: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); }
.tb-plant-mini img { width: 100%; height: auto; border-radius: 12px; margin-bottom: 8px; }
.tb-plant strong { font-size: 17px; font-weight: 600; letter-spacing: -0.02em; padding: 0 4px; }
.tb-plant > span:last-child { font-size: 14px; color: var(--ink-2); line-height: 1.4; padding: 0 4px; }

/* ---------- ventajas ---------- */
.tb-ventajas { max-width: 1120px; margin: 20px auto 0; padding: 30px 22px 40px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px; }
.tb-ventaja svg { color: #ff6a13; margin-bottom: 12px; }
.tb-ventaja h3 { font-size: 19px; letter-spacing: -0.02em; margin-bottom: 6px; }
.tb-ventaja p { color: var(--ink-2); font-size: 15.5px; }

/* ---------- equipo ---------- */
.tb-pfondo { position: fixed; inset: 0; z-index: 2000; background: rgba(0, 0, 0, .32); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 16px; }
.tb-pdlg { position: relative; background: #fff; border-radius: 22px; width: min(480px, 100%); max-height: calc(100vh - 32px); overflow: auto; padding: 26px 24px 22px; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .45); animation: tb-p-rise .3s var(--ease) both; }
.tb-pdlg h2 { font-size: 22px; letter-spacing: -0.025em; margin: 0 34px 6px 0; }
.tb-pdlg > p { color: var(--ink-2); font-size: 14.5px; margin-bottom: 16px; }
.tb-pdlg-x { position: absolute; right: 14px; top: 14px; border: 0; background: var(--bg-alt); width: 32px; height: 32px; border-radius: 50%; cursor: pointer; font-size: 18px; line-height: 1; color: var(--ink-2); }
.tb-ppers { display: grid; gap: 10px; margin-bottom: 14px; }
.tb-pper { display: flex; align-items: center; gap: 10px; }
.tb-pper i { width: 34px; height: 34px; border-radius: 50%; background: var(--c); color: #fff; display: grid; place-items: center; font-style: normal; font-weight: 700; font-size: 14px; flex: 0 0 auto; }
.tb-pper span { flex: 1; min-width: 0; display: grid; }
.tb-pper b { font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-pper small { font-size: 13px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-pper button { border: 0; background: transparent; color: var(--ink-3); cursor: pointer; font-size: 13px; padding: 6px 10px; border-radius: 99px; }
.tb-pper button:hover { background: var(--bg-alt); color: #d70015; }
.tb-pinv { display: flex; gap: 8px; }
.tb-pinv input { flex: 1; min-width: 0; font: inherit; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); }
.tb-pinv input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(225, 6, 0, .12); }
.tb-pinv .btn { border: 0; cursor: pointer; font-family: inherit; }
.tb-pnota { font-size: 13px; color: var(--ink-3); margin-top: 12px; }

@keyframes tb-p-rise { from { opacity: 0; transform: translateY(14px); } }
@media (max-width: 760px) {
  .tb-hero { padding: 92px 20px 30px; }
  .tb-ventajas { grid-template-columns: 1fr; gap: 24px; }
  .tb-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .tb-card strong { font-size: 15px; }
  .tb-cuenta { padding: 24px 22px; }
}
@media (prefers-reduced-motion: reduce) { .tb-portada * { animation: none !important; transition: none !important; } }
