/* ============================================================
   Tiempo — "Find your match" widget
   The floating matcher on the homepage. Lived as a second <style>
   block in the middle of index.html's body.
   ============================================================ */


.tam { position: fixed; right: 24px; bottom: 24px; z-index: 900; font-family: var(--font-body); -webkit-font-smoothing: antialiased; }
@media (max-width: 600px) { .tam { right: 12px; bottom: 12px; } }

/* One morphing surface: the closed pill's edges physically grow into the open
   panel (and shrink back), so it reads as a single entity rather than two panels
   swapping. The surface animates size + radius; the panel content is laid out at
   full size inside it and is revealed as the surface clips less of it. */
.tam-surface {
  position: absolute; right: 0; bottom: 0;
  width: 216px; height: 54px; border-radius: 22px;
  /* Slight tinted frosted glass: translucent media-noche over a blurred page */
  background: rgba(var(--media-rgb), 0.80);
  -webkit-backdrop-filter: blur(16px) saturate(1.25);
  backdrop-filter: blur(16px) saturate(1.25);
  overflow: hidden;
  /* Honey stroke lives on the surface itself so it hugs the rounded shape
     cleanly and scales with the pill→panel grow (constant 22px radius). */
  border: 1px solid var(--honey);
  box-shadow: 0 6px 16px rgba(var(--media-rgb), 0.22), 0 18px 40px rgba(var(--media-rgb), 0.30);
  transition: width 0.5s cubic-bezier(0.16,1,0.3,1),
              height 0.5s cubic-bezier(0.16,1,0.3,1),
              box-shadow 0.35s ease;
  will-change: width, height;
}
/* Radius is constant (22px) so the bottom-right corner never shifts; only size grows. */
.tam.is-open .tam-surface {
  width: 384px; max-width: calc(100vw - 24px);
  height: 588px; max-height: calc(100vh - 40px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.28), 0 32px 80px rgba(0,0,0,0.5);
}
@media (max-width: 600px) {
  .tam.is-open .tam-surface { width: calc(100vw - 24px); height: calc(100dvh - 84px); }
}
.tam:not(.is-open) .tam-surface:hover { box-shadow: 0 8px 20px rgba(var(--media-rgb), 0.28), 0 22px 50px rgba(var(--media-rgb), 0.42); }
/* Keep the surface solid where frosted glass is unsupported, so text stays legible */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .tam-surface { background: var(--media); }
}

/* Closed content: the pill. Fills the collapsed surface; fades out fast on open,
   and fades back in only after the surface has shrunk (delay lives on the base rule). */
.tam-launch {
  position: absolute; right: 0; bottom: 0;
  width: 216px; height: 54px;
  display: inline-flex; align-items: center; justify-content: center; gap: 11px;
  background: transparent; color: var(--crema); border: none; padding: 0 6px 0 0;
  font-family: var(--font-body); font-size: 0.92rem; font-weight: 600; letter-spacing: 0.01em;
  cursor: pointer; white-space: nowrap;
  opacity: 1; transition: opacity 0.18s ease 0.16s;
}
.tam.is-open .tam-launch { opacity: 0; pointer-events: none; transition: opacity 0.14s ease; }
.tam-launch__ic { position: relative; width: 28px; height: 28px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: rgba(var(--crema-rgb), 0.15); border-radius: 50%; }
.tam-launch__ic svg { width: 16px; height: 16px; }
.tam-launch__ic::after { content: ''; position: absolute; top: -2px; right: -2px; width: 8px; height: 8px; border-radius: 50%; background: var(--honey); box-shadow: 0 0 0 0 rgba(var(--honey-rgb), 0.6); animation: tamPulse 2.4s infinite; }
@keyframes tamPulse { 0% { box-shadow: 0 0 0 0 rgba(var(--honey-rgb), 0.55); } 70% { box-shadow: 0 0 0 9px rgba(var(--honey-rgb), 0); } 100% { box-shadow: 0 0 0 0 rgba(var(--honey-rgb), 0); } }

/* Open content: the panel, laid out at full size and revealed by the growing surface.
   Fades out fast on close (base rule); fades in a beat after the surface starts growing. */
.tam-panel {
  position: absolute; right: 0; bottom: 0;
  display: flex; flex-direction: column;
  width: 384px; max-width: calc(100vw - 24px);
  height: 588px; max-height: calc(100vh - 40px);
  opacity: 0; pointer-events: none;
  transition: opacity 0.16s ease;
}
.tam.is-open .tam-panel { opacity: 1; pointer-events: auto; transition: opacity 0.3s ease 0.14s; }
@media (max-width: 600px) { .tam-panel { width: calc(100vw - 24px); height: calc(100dvh - 84px); } }

/* Header */
.tam-head { flex-shrink: 0; padding: 17px 18px 15px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(var(--crema-rgb), 0.09); }
.tam-head__title { font-family: var(--font-body); font-weight: 600; font-size: 1.04rem; line-height: 1.15; letter-spacing: -0.01em; color: var(--crema); display: flex; align-items: center; gap: 9px; }
.tam-head__live { width: 8px; height: 8px; border-radius: 50%; background: #58c47a; box-shadow: 0 0 0 3px rgba(88,196,122,0.18); }
.tam-close { flex-shrink: 0; background: rgba(var(--crema-rgb), 0.10); color: var(--crema); border: none; width: 32px; height: 32px; border-radius: 50%; cursor: pointer; font-size: 1.2rem; line-height: 1; display: flex; align-items: center; justify-content: center; padding: 0; transition: background 0.2s ease; }
.tam-close:hover { background: rgba(var(--crema-rgb), 0.2); }
.tam-close:focus-visible { outline: 2px solid var(--honey); outline-offset: 2px; }

/* Progress — honey */
.tam-progress { flex-shrink: 0; height: 3px; background: rgba(var(--crema-rgb), 0.10); }
.tam-progress__bar { height: 100%; width: 0; background: var(--honey); border-radius: 0 3px 3px 0; transition: width 0.45s cubic-bezier(0.22,1,0.36,1); }

/* Stage */
.tam-stage { flex: 1 1 auto; position: relative; overflow: hidden; }
.tam-screen { position: absolute; inset: 0; display: flex; flex-direction: column; padding: 24px 22px 22px; animation: tamScreenIn 0.4s cubic-bezier(0.22,1,0.36,1); }
@keyframes tamScreenIn { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }

/* Question screen */
.tam-step { font-size: 0.76rem; font-weight: 600; color: var(--honey); margin-bottom: 12px; font-variant-numeric: tabular-nums; }
.tam-title { font-family: var(--font-body); font-weight: 600; font-size: 1.32rem; line-height: 1.26; color: var(--crema); letter-spacing: -0.01em; text-wrap: balance; }
.tam-typebox { margin-top: 20px; display: flex; gap: 9px; align-items: center; }
.tam-typebox input { flex: 1 1 auto; min-width: 0; border: 1.5px solid rgba(var(--crema-rgb), 0.20); background: var(--media); border-radius: 14px; padding: 13px 15px; font-size: 0.95rem; font-family: var(--font-body); color: var(--crema); outline: none; transition: border-color 0.2s ease, box-shadow 0.2s ease; }
.tam-typebox input::placeholder { color: rgba(var(--crema-rgb), 0.38); }
.tam-typebox input:focus { border-color: var(--honey); box-shadow: 0 0 0 3px rgba(var(--honey-rgb), 0.18); }
.tam-go { flex-shrink: 0; width: 46px; height: 46px; border-radius: 14px; border: none; cursor: pointer; background: var(--clockwork); color: var(--crema); display: flex; align-items: center; justify-content: center; transition: background 0.2s ease, opacity 0.2s ease, transform 0.12s ease; }
.tam-go:hover:not(:disabled) { background: var(--clockwork-hover); }
.tam-go:active:not(:disabled) { transform: scale(0.94); }
.tam-go:disabled { opacity: 0.35; cursor: default; }
.tam-go svg { width: 18px; height: 18px; }
.tam-orlabel { font-size: 0.75rem; color: rgba(var(--crema-rgb), 0.42); margin: 22px 0 11px; }
.tam-options { display: flex; flex-wrap: wrap; gap: 8px; }
.tam-opt { background: rgba(var(--crema-rgb), 0.06); color: rgba(var(--crema-rgb), 0.9); border: 1.5px solid rgba(var(--crema-rgb), 0.14); border-radius: var(--r-pill); padding: 9px 15px; font-size: 0.85rem; font-weight: 500; cursor: pointer; font-family: var(--font-body); transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.14s ease; }
.tam-opt:hover { background: var(--clockwork); color: var(--crema); border-color: var(--clockwork); transform: translateY(-1px); }
.tam-opt:active { transform: translateY(0); }
.tam-opt:focus-visible { outline: 2px solid var(--honey); outline-offset: 2px; }
.tam-spacer { flex: 1 1 auto; }

/* Loading — hand-picking a shortlist */
.tam-loading { align-items: stretch; justify-content: center; text-align: center; }
.tam-load__title { font-size: 1.12rem; font-weight: 600; color: var(--crema); }
.tam-load__count { font-size: 0.82rem; color: var(--terracotta); margin-top: 7px; min-height: 1.15em; }
.tam-load__count b { color: var(--crema); font-weight: 600; font-variant-numeric: tabular-nums; }

/* Act 1 — the vetted pool, narrowed by filter passes */
.tam-pool { margin-top: 20px; transition: opacity 0.45s ease, transform 0.45s ease; }
.tam-pool.is-gone { opacity: 0; transform: scale(0.96); pointer-events: none; }
.tam-pool__grid { display: grid; grid-template-columns: repeat(9, 1fr); gap: 7px; }
.tam-pool__dot { aspect-ratio: 1; border-radius: 50%; border: 1.5px solid rgba(var(--crema-rgb), 0.5); background: transparent;
  transition: transform 0.55s cubic-bezier(0.22,1,0.36,1), background-color 0.55s ease, opacity 0.55s ease, border-color 0.55s ease; }
.tam-pool__dot.is-live { border-color: rgba(var(--honey-rgb), 0.85); background: rgba(var(--honey-rgb), 0.16); }
.tam-pool__dot.is-out { opacity: 0.22; transform: scale(0.55); border-color: rgba(var(--crema-rgb), 0.28); background: transparent; }
.tam-pool__dot.is-final { border-color: var(--terracotta); background: var(--terracotta); transform: scale(1.2); box-shadow: 0 0 0 3px rgba(196,145,102,0.2); opacity: 1; }

/* Act 2 — the finalists resolve into named rows */
.tam-vet { margin-top: 18px; display: flex; flex-direction: column; gap: 8px; text-align: left; opacity: 1; transition: opacity 0.4s ease; }
.tam-vet.is-enter { opacity: 0; }
.tam-vet__row { position: relative; display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 12px;
  background: rgba(var(--crema-rgb), 0.05); border: 1px solid rgba(var(--crema-rgb), 0.10);
  transition: opacity 0.5s ease, transform 0.45s cubic-bezier(0.22,1,0.36,1), background 0.4s ease, border-color 0.4s ease; }
.tam-vet__nm { font-size: 0.9rem; font-weight: 600; color: rgba(var(--crema-rgb), 0.92); filter: blur(4px); letter-spacing: 0.04em; min-width: 54px; }
.tam-vet__dot { color: rgba(var(--crema-rgb), 0.3); }
.tam-vet__role { font-size: 0.82rem; color: rgba(var(--crema-rgb), 0.62); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1 1 auto; }
.tam-vet__yr { font-size: 0.78rem; color: rgba(var(--crema-rgb), 0.42); flex-shrink: 0; font-variant-numeric: tabular-nums; }
.tam-vet__mark { flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: scale(0.5); transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.22,1.4,0.5,1); }
.tam-vet__mark svg { width: 12px; height: 12px; }
/* currently under review */
.tam-vet__row.is-scan { border-color: rgba(var(--honey-rgb), 0.45); background: rgba(var(--honey-rgb), 0.07); }
/* set aside */
.tam-vet__row.is-out { opacity: 0.3; transform: scale(0.985); }
/* the pick */
.tam-vet__row.is-pick { border-color: rgba(var(--honey-rgb), 0.6); background: rgba(var(--honey-rgb), 0.12); transform: translateX(3px); }
.tam-vet__row.is-pick .tam-vet__nm, .tam-vet__row.is-pick .tam-vet__role { color: var(--crema); }
.tam-vet__row.is-pick .tam-vet__mark { opacity: 1; transform: scale(1); background: var(--clockwork); }

/* Result — directly on media noche, no card */
.tam-result { justify-content: flex-start; }
.tam-r__name { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.tam-r__name b { font-family: var(--font-body); font-weight: 700; font-size: 1.35rem; color: var(--crema); filter: blur(6px); user-select: none; letter-spacing: 0.06em; }
.tam-r__tag { font-size: 0.68rem; color: rgba(var(--crema-rgb), 0.42); display: inline-flex; align-items: center; gap: 5px; }
.tam-r__tag svg { width: 11px; height: 11px; }
.tam-r__role { font-size: 1.02rem; font-weight: 600; color: var(--crema); margin-top: 12px; }
.tam-r__exp { font-size: 0.85rem; color: rgba(var(--crema-rgb), 0.6); margin-top: 3px; }
.tam-r__skills { list-style: none; margin: 15px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.tam-r__skills li { display: flex; align-items: center; gap: 11px; font-size: 0.86rem; color: rgba(var(--crema-rgb), 0.88); line-height: 1.3; }
.tam-r__check { flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; background: var(--clockwork); display: flex; align-items: center; justify-content: center; }
.tam-r__check svg { width: 12px; height: 12px; }
.tam-r__foot { margin-top: auto; padding-top: 20px; }
.tam-r__note { font-size: 0.74rem; color: rgba(var(--crema-rgb), 0.42); line-height: 1.5; margin: 0 0 12px; }
.tam-cta { display: block; text-align: center; background: var(--clockwork); color: var(--crema); text-decoration: none; border-radius: 14px; padding: 14px; font-weight: 600; font-size: 0.92rem; letter-spacing: 0.01em; cursor: pointer; box-shadow: 0 8px 22px rgba(var(--clockwork-rgb), 0.35); transition: background 0.2s ease, transform 0.2s ease; }
.tam-cta:hover { background: var(--clockwork-hover); transform: translateY(-1px); }
.tam-cta:active { transform: translateY(0); }
.tam-cta:focus-visible { outline: 2px solid var(--honey); outline-offset: 2px; }
.tam-restart { display: block; margin: 12px auto 0; background: none; border: none; color: rgba(var(--crema-rgb), 0.45); font-size: 0.76rem; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; font-family: var(--font-body); }
.tam-restart:hover { color: var(--terracotta); }

@media (prefers-reduced-motion: reduce) {
  .tam-screen, .tam-launch__ic::after { animation: none; }
  .tam-surface, .tam.is-open .tam-surface, .tam-panel, .tam.is-open .tam-panel, .tam-launch, .tam.is-open .tam-launch, .tam-opt, .tam-go, .tam-cta { transition: none; }
  .tam-vet__row { transition: none; }
}
  
