/* Groups & events (Oct 2026): a bento of three live, playable previews.
   Events is the feature card; Groups and Rooms stack beside it. Each card
   sits on a softly blurred photo behind frosted glass, tilts toward the
   pointer with a glowing edge, and its app panel lifts on hover.
   Behaviour: LandingPage/js/Together.js. Built on the landing tokens. */

.together .together-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; flex-wrap: wrap; margin-bottom: 48px; }

.tb-grid {
  display: grid; gap: 18px; perspective: 1600px;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  grid-template-rows: auto auto;
  grid-template-areas: "events groups" "events rooms";
}
.tb-card--events { grid-area: events; }
.tb-card--groups { grid-area: groups; }
.tb-card--rooms { grid-area: rooms; }

/* ── the card ── */
.tb-card {
  --rx: 0deg; --ry: 0deg; --mx: -999px; --my: -999px; --tint: rgba(107, 26, 48, 0.55);
  position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; gap: 18px;
  padding: 26px; border-radius: 26px; min-width: 0;
  background: rgba(14, 12, 15, 0.55);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07), 0 30px 60px rgba(0, 0, 0, 0.4);
  transform: rotateX(var(--rx)) rotateY(var(--ry)); transform-style: preserve-3d;
  transition: transform .5s cubic-bezier(.2, .7, .2, 1), box-shadow .5s ease;
}
.tb-card[data-tint="forest"] { --tint: rgba(30, 74, 56, 0.6); }
.tb-card[data-tint="plum"] { --tint: rgba(74, 44, 82, 0.6); }
.tb-card:hover { box-shadow: inset 0 0 0 1px rgba(228, 198, 135, 0.22), 0 40px 80px rgba(0, 0, 0, 0.5); }
/* the photo, blurred to colour and mood only, then tinted */
.tb-bg { position: absolute; inset: -30px; z-index: -2; }
.tb-bg img { width: 100%; height: 100%; object-fit: cover; filter: blur(28px) saturate(0.9) brightness(0.55); transform: scale(1.1); }
.tb-card::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse 90% 70% at 0% 0%, var(--tint), transparent 70%), linear-gradient(160deg, rgba(11, 10, 12, 0.35), rgba(11, 10, 12, 0.82) 75%); }
/* the glowing edge that follows the pointer */
.tb-card::after { content: ""; position: absolute; inset: 0; z-index: 3; border-radius: inherit; pointer-events: none; padding: 1px;
  background: radial-gradient(240px circle at var(--mx) var(--my), var(--gold-bright), transparent 60%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); opacity: .85; }

/* the caption, inside the card */
.tb-head { display: flex; flex-direction: column; gap: 8px; }
.tb-pill { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px;
  font-family: var(--font-serif); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--cream);
  background: rgba(11, 10, 12, 0.45); box-shadow: inset 0 0 0 1px rgba(228, 198, 135, 0.28); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.tb-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold-bright); box-shadow: 0 0 8px rgba(228, 198, 135, 0.7); }
.tb-dot--live { background: var(--forest-bright); box-shadow: 0 0 0 0 rgba(78, 156, 121, 0.6); animation: tbLive 2s ease-out infinite; }
@keyframes tbLive { 0% { box-shadow: 0 0 0 0 rgba(78, 156, 121, 0.55); } 70%, 100% { box-shadow: 0 0 0 9px rgba(78, 156, 121, 0); } }
.tb-head h3 { margin: 4px 0 0; font-family: var(--font-serif); font-style: normal; font-weight: 400; font-size: clamp(24px, 2.2vw, 30px); line-height: 1.15; color: var(--cream); }
.tb-head p { margin: 0; max-width: 46ch; font-size: 15.5px; line-height: 1.6; color: var(--smoke); }

/* the app panel: frosted glass that lifts off the card */
.tb-app {
  position: relative; flex: 1; display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 18px;
  background: rgba(11, 10, 12, 0.62); backdrop-filter: blur(14px) saturate(1.1); -webkit-backdrop-filter: blur(14px) saturate(1.1);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 12px 30px rgba(0, 0, 0, 0.35);
  transform: translateZ(0); transition: transform .5s cubic-bezier(.2, .7, .2, 1), box-shadow .5s ease;
}
.tb-card:hover .tb-app { transform: translateY(-6px) translateZ(30px); box-shadow: inset 0 0 0 1px rgba(228, 198, 135, 0.2), 0 26px 50px rgba(0, 0, 0, 0.5); }
:where(.tb-app) button { font: inherit; cursor: pointer; }
.tb-app :focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 2px; }

/* ── Events ── */
.tb-month { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.tb-month b { font-family: var(--font-serif); font-style: italic; font-weight: 300; font-size: 26px; color: var(--cream); }
.tb-nav { font-size: 16px; letter-spacing: .4em; color: var(--smoke); }
.tb-days, .tb-dates { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; }
.tb-days span { padding-bottom: 6px; font-family: var(--font-serif); font-size: 11px; letter-spacing: .12em; color: var(--smoke-dim); }
.tb-dates > * { position: relative; height: 38px; display: grid; place-items: center; font-family: var(--font-serif); font-size: 15px; color: rgba(242, 236, 223, 0.6); }
.tb-dates button { border: 0; background: none; color: var(--cream); border-radius: 10px; transition: background .3s ease, color .3s ease, transform .3s ease; }
.tb-dates button::after { content: ""; position: absolute; left: 50%; bottom: 4px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--forest-bright); }
.tb-dates button:hover { background: rgba(199, 166, 92, 0.12); }
.tb-dates button[aria-pressed="true"] { color: var(--noir); background: var(--gold-fill); transform: scale(1.06); box-shadow: 0 6px 18px rgba(228, 198, 135, 0.3); }
.tb-dates button[aria-pressed="true"]::after { background: var(--noir); }
.tb-dates .today { color: var(--gold-bright); }
.tb-event { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; margin-top: auto; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.tb-event.swap .tb-event-main, .tb-event.swap .tb-date { opacity: 0; transform: translateY(6px); }
.tb-event-main, .tb-date { transition: opacity .35s ease, transform .35s ease; }
.tb-date { width: 52px; height: 58px; border-radius: 12px; display: grid; place-items: center; align-content: center; box-shadow: inset 0 0 0 1px rgba(199, 166, 92, 0.45); }
.tb-date small { font-family: var(--font-serif); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--smoke); }
.tb-date b { font-family: var(--font-serif); font-weight: 400; font-size: 26px; line-height: 1; color: var(--gold-bright); }
.tb-event-group { display: block; font-family: var(--font-serif); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
.tb-event-title { display: block; margin-top: 2px; font-family: var(--font-serif); font-style: italic; font-weight: 400; font-size: 21px; line-height: 1.15; color: var(--cream); }
.tb-event-meta { display: block; margin-top: 2px; font-size: 13px; color: var(--smoke); }
.tb-going { display: flex; align-items: center; margin-top: 8px; }
.tb-going i { width: 20px; height: 20px; border-radius: 50%; margin-right: -6px; box-shadow: 0 0 0 2px #101511; background: radial-gradient(circle at 50% 35%, rgba(242, 236, 223, 0.35), rgba(30, 74, 56, 0.9) 70%); }
.tb-going i:nth-child(2) { background: radial-gradient(circle at 50% 35%, rgba(242, 236, 223, 0.3), rgba(107, 26, 48, 0.85) 70%); }
.tb-going i:nth-child(3) { background: radial-gradient(circle at 50% 35%, rgba(242, 236, 223, 0.3), rgba(199, 166, 92, 0.6) 70%); }
.tb-going i.you { width: 0; margin-right: 0; display: grid; place-items: center; overflow: hidden; font-style: normal; font-family: var(--font-sans); font-size: 11px; color: var(--noir); background: var(--gold-fill); transition: width .4s cubic-bezier(.3, 1.4, .5, 1), margin .4s ease; }
.tb-event.is-going .tb-going i.you { width: 20px; margin-right: -6px; }
.tb-going em { margin-left: 14px; font-style: normal; font-family: var(--font-serif); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--smoke); }
.tb-rsvp { display: flex; padding: 3px; border-radius: 999px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16); }
.tb-rsvp button { padding: 8px 13px; border: 0; border-radius: 999px; background: none; font-family: var(--font-serif); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--smoke); transition: background .3s ease, color .3s ease; }
.tb-rsvp button[data-rsvp="interested"][aria-pressed="true"] { color: var(--noir); background: var(--gold-fill); }
.tb-rsvp button[data-rsvp="going"][aria-pressed="true"] { color: #08100c; background: var(--forest-bright); }

/* ── Groups: a deck ── */
.tb-deck { position: relative; flex: 1; min-height: 196px; }
.tb-group {
  position: absolute; inset: 0; display: flex; flex-direction: column; gap: 8px; padding: 16px; border-radius: 14px;
  background: linear-gradient(165deg, rgba(40, 18, 26, 0.95), rgba(16, 12, 14, 0.96)); box-shadow: inset 0 0 0 1px rgba(199, 166, 92, 0.22), 0 10px 24px rgba(0, 0, 0, 0.35);
  transition: transform .6s cubic-bezier(.2, .8, .2, 1), opacity .5s ease, filter .5s ease;
  transform-origin: 50% 100%;
}
.tb-group[data-pos="0"] { z-index: 3; transform: none; }
.tb-group[data-pos="1"] { z-index: 2; transform: translateY(-10px) scale(0.95); opacity: .7; filter: brightness(.7); }
.tb-group[data-pos="2"] { z-index: 1; transform: translateY(-20px) scale(0.9); opacity: .4; filter: brightness(.5); }
.tb-group.leaving { z-index: 4; transform: translateX(-110%) rotate(-8deg); opacity: 0; }
.tb-group-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.tb-chip { padding: 4px 10px; border-radius: 999px; font-family: var(--font-serif); font-size: 10.5px; letter-spacing: .08em; color: #f2c4d0; background: rgba(107, 26, 48, 0.45); box-shadow: inset 0 0 0 1px rgba(176, 68, 95, 0.5); }
.tb-loc { font-family: var(--font-serif); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--smoke); }
.tb-group-name { margin: 4px 0 0; font-family: var(--font-serif); font-style: italic; font-weight: 400; font-size: 26px; line-height: 1.1; color: var(--cream); }
.tb-group-desc { margin: 0; font-size: 14px; line-height: 1.5; color: var(--smoke); }
.tb-group-row { display: flex; justify-content: space-between; align-items: center; margin-top: auto; }
.tb-faces { display: flex; align-items: center; }
.tb-faces i { width: 26px; height: 26px; border-radius: 50%; margin-right: -8px; box-shadow: 0 0 0 2px #1a1013; background: radial-gradient(circle at 50% 35%, rgba(242, 236, 223, 0.35), rgba(107, 26, 48, 0.85) 70%); }
.tb-faces i:nth-child(2) { background: radial-gradient(circle at 50% 35%, rgba(242, 236, 223, 0.3), rgba(30, 74, 56, 0.85) 70%); }
.tb-faces i:nth-child(3) { background: radial-gradient(circle at 50% 35%, rgba(242, 236, 223, 0.3), rgba(199, 166, 92, 0.6) 70%); }
.tb-faces i.you { width: 0; margin-right: 0; display: grid; place-items: center; overflow: hidden; font-style: normal; font-family: var(--font-sans); font-size: 13px; color: var(--noir); background: var(--gold-fill); transition: width .45s cubic-bezier(.3, 1.4, .5, 1), margin .45s ease; }
.tb-group.joined .tb-faces i.you { width: 26px; margin-right: -8px; }
.tb-join { padding: 9px 16px; border: 0; border-radius: 999px; font-family: var(--font-serif); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--noir); background: var(--gold-fill); transition: background .3s ease, color .3s ease, box-shadow .3s ease; }
.tb-group.joined .tb-join { color: #d6efe2; background: rgba(30, 74, 56, 0.9); box-shadow: inset 0 0 0 1px var(--forest-bright); }
.tb-deck-nav { display: flex; align-items: center; justify-content: center; gap: 14px; }
.tb-arrow { width: 32px; height: 32px; border: 0; border-radius: 50%; color: var(--cream); background: rgba(255, 255, 255, 0.05); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12); font-size: 18px; line-height: 1; transition: background .3s ease, color .3s ease; }
.tb-arrow:hover { color: var(--gold-bright); background: rgba(199, 166, 92, 0.12); }
.tb-deck-dots { display: flex; gap: 6px; }
.tb-deck-dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, 0.2); transition: background .3s ease, width .3s ease; }
.tb-deck-dots i.on { width: 18px; border-radius: 3px; background: var(--gold-bright); }

/* ── Rooms: a live conversation ── */
.tb-roomhead { display: flex; align-items: center; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.tb-av { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-sans); font-size: 17px; color: var(--gold-bright); background: var(--noir); box-shadow: inset 0 0 0 1px rgba(199, 166, 92, 0.5); }
.tb-roomhead b { display: block; font-family: var(--font-serif); font-style: italic; font-weight: 400; font-size: 19px; line-height: 1.1; color: var(--cream); }
.tb-roomhead small { font-family: var(--font-serif); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: #e7a1b4; }
.tb-msgs { flex: 1; min-height: 170px; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; overflow: hidden; -webkit-mask: linear-gradient(transparent, #000 22%); mask: linear-gradient(transparent, #000 22%); }
.tb-msg { display: flex; gap: 8px; align-items: flex-start; animation: tbIn .45s cubic-bezier(.2, .8, .2, 1); }
.tb-msg > i { width: 24px; height: 24px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-family: var(--font-sans); font-size: 12px; color: var(--cream); background: radial-gradient(circle at 50% 35%, rgba(242, 236, 223, 0.25), var(--av, rgba(74, 44, 82, 0.95)) 70%); }
.tb-msg > span { padding: 7px 11px; border-radius: 12px; border-top-left-radius: 4px; font-size: 14px; line-height: 1.45; color: rgba(242, 236, 223, 0.92); background: rgba(255, 255, 255, 0.07); }
.tb-msg b { display: block; font-family: var(--font-serif); font-weight: 500; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: #d6b8e2; }
.tb-msg.mine { flex-direction: row-reverse; }
.tb-msg.mine > i { background: var(--gold-fill); color: var(--noir); }
.tb-msg.mine > span { border-top-left-radius: 12px; border-top-right-radius: 4px; background: linear-gradient(135deg, rgba(107, 26, 48, 0.9), rgba(78, 18, 32, 0.9)); box-shadow: inset 0 0 0 1px rgba(176, 68, 95, 0.45); }
.tb-msg.mine b { color: var(--gold-bright); }
.tb-msg small { display: block; margin-top: 2px; font-size: 11px; color: var(--smoke-dim); }
.tb-msg.mine small::after { content: " \2713"; color: var(--gold-bright); }
.tb-typing { align-self: flex-start; display: flex; gap: 4px; margin-left: 32px; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.07); animation: tbIn .3s ease; }
.tb-typing i { width: 5px; height: 5px; border-radius: 50%; background: var(--smoke); animation: dots 1s ease-in-out infinite; }
.tb-typing i:nth-child(2) { animation-delay: .15s; } .tb-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes tbIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.tb-compose { display: flex; gap: 8px; }
.tb-compose input { flex: 1; min-width: 0; padding: 11px 14px; border: 0; border-radius: 999px; font: inherit; font-size: 14px; color: var(--cream); background: rgba(255, 255, 255, 0.06); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1); outline: none; transition: box-shadow .3s ease; }
.tb-compose input:focus { box-shadow: inset 0 0 0 1px var(--gold); }
.tb-compose input::placeholder { color: var(--smoke-dim); }
.tb-compose button { width: 40px; height: 40px; flex-shrink: 0; border: 0; border-radius: 50%; display: grid; place-items: center; color: var(--noir); background: var(--gold-fill); }
.tb-compose button svg { width: 17px; height: 17px; }

.tb-note { margin: 18px 0 0; text-align: center; font-size: 13px; font-style: italic; color: var(--smoke-dim); }

/* ── entrance: the cards rise in one after another ── */
.tb-rise { opacity: 0; translate: 0 30px; transition: opacity .8s ease, translate .9s cubic-bezier(.2, .8, .2, 1), transform .5s cubic-bezier(.2, .7, .2, 1), box-shadow .5s ease; }
.tb-rise.in { opacity: 1; translate: 0 0; }
.tb-card--groups.tb-rise { transition-delay: .12s; }
.tb-card--rooms.tb-rise { transition-delay: .24s; }

@media (max-width: 1000px) {
  .tb-grid { grid-template-columns: 1fr; grid-template-areas: "events" "groups" "rooms"; max-width: 620px; margin: 0 auto; }
}
@media (max-width: 600px) {
  .tb-card { padding: 20px 16px; border-radius: 22px; }
  .tb-app { padding: 13px; }
  .tb-dates > * { height: 34px; font-size: 14px; }
  .tb-event { grid-template-columns: auto minmax(0, 1fr); }
  .tb-rsvp { grid-column: 1 / -1; justify-self: start; }
  .tb-group-name { font-size: 23px; }
}
@media (hover: none) {
  .tb-card:hover .tb-app { transform: none; }
  .tb-card::after { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .tb-card, .tb-app, .tb-group, .tb-rise, .tb-event-main, .tb-date { transition: none; }
  .tb-rise { opacity: 1; translate: none; }
  .tb-dot--live, .tb-typing i { animation: none; }
  .tb-msg, .tb-typing { animation: none; }
}

/* the feature card is taller: give the calendar room to breathe */
@media (min-width: 1001px) {
  .tb-card--events .tb-dates > * { height: 48px; font-size: 16px; }
  .tb-card--events .tb-month b { font-size: 30px; }
}

/* this month's events, listed under the calendar on wide screens */
.tb-list { display: none; flex-direction: column; gap: 4px; margin-top: 14px; }
.tb-list-label { font-family: var(--font-serif); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--smoke-dim); margin-bottom: 4px; }
.tb-list button { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; border: 0; border-radius: 12px; text-align: left; background: rgba(255, 255, 255, 0.03); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05); transition: background .3s ease, box-shadow .3s ease; }
.tb-list button:hover { background: rgba(199, 166, 92, 0.08); }
.tb-list button[aria-pressed="true"] { background: rgba(199, 166, 92, 0.1); box-shadow: inset 0 0 0 1px rgba(228, 198, 135, 0.45); }
.tb-list .d { font-family: var(--font-serif); font-size: 20px; line-height: 1; color: var(--gold-bright); text-align: center; }
.tb-list .d small { display: block; font-family: var(--font-serif); font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--smoke); }
.tb-list .t { font-family: var(--font-serif); font-size: 15px; color: var(--cream); }
.tb-list .t small { display: block; font-size: 12px; color: var(--smoke); }
.tb-list .s { font-family: var(--font-serif); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--forest-bright); }
@media (min-width: 1001px) { .tb-list { display: flex; } }
