/* Sac Bites & Nights :: public/css/home-things.css (T3) — event cards (home + things to do), /things-to-do/ and the event page.
   Class prefix: ttd-. Explicit text colors on every element. */

/* ---------------------------------------------------------------- event category colors (category, not status) */
.ttd-cat { --c: var(--cat-other); }
.ttd-cat[data-cat="truck_event"]    { --c: var(--teal); }
.ttd-cat[data-cat="night_market"]   { --c: var(--violet); }
.ttd-cat[data-cat="brewery_night"]  { --c: var(--blue); }
.ttd-cat[data-cat="farmers_market"] { --c: var(--cat-med); }
.ttd-cat[data-cat="weekend_pick"]   { --c: var(--pink); }
.ttd-cat[data-cat="music"]          { --c: var(--cat-dessert); }
.ttd-cat[data-cat="family"]         { --c: var(--cat-drinks); }
.ttd-cat[data-cat="arts"]           { --c: var(--cat-pizza); }
.ttd-cat[data-cat="sports"]         { --c: var(--blue-2); }
.ttd-tag { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: var(--fs-small); font-weight: 700; color: var(--text); }
.ttd-tag::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--c); box-shadow: 0 0 10px var(--c); flex: none; }

/* ---------------------------------------------------------------- event card */
.ttd-card { position: relative; display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: var(--s-4); padding: var(--s-5);
  border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); color: var(--text); min-width: 0;
  transition: border-color var(--dur-2), transform var(--dur-2) var(--ease-out); }
.ttd-card:hover { border-color: var(--border-2); transform: translateY(-2px); }
.ttd-card:focus-within { border-color: var(--teal); }
.ttd-card.is-featured { border-color: rgba(167, 139, 250, .55); box-shadow: var(--glow-violet); }
.ttd-card__img { grid-column: 1 / -1; margin: calc(var(--s-5) * -1) calc(var(--s-5) * -1) 0; border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; background: var(--surface-2); }
.ttd-card__img img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.ttd-date { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; height: 86px; border-radius: var(--radius-sm);
  background: var(--surface-3); border: 1px solid var(--border-2); color: var(--text); text-align: center; line-height: 1; }
.ttd-date__dow { font-size: var(--fs-small); font-weight: 700; letter-spacing: .08em; color: var(--teal); text-transform: uppercase; }
.ttd-date__day { font-family: var(--font-display); font-size: 2.1rem; font-weight: 700; color: var(--text); }
.ttd-date__mon { font-size: var(--fs-small); font-weight: 700; letter-spacing: .08em; color: var(--text-2); text-transform: uppercase; }
.ttd-card__body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ttd-card__title { margin: 2px 0 0; font-family: var(--font-display); font-size: clamp(1.4rem, 1.2rem + .8vw, 1.75rem); line-height: 1.15; color: var(--text); overflow-wrap: anywhere; }
.ttd-card__title a { color: var(--text); text-decoration: none; }
.ttd-card__title a::after { content: ''; position: absolute; inset: 0; border-radius: inherit; } /* whole card clickable */
.ttd-card__title a:hover { color: var(--teal); }
.ttd-card__title a:focus-visible { box-shadow: none; }
.ttd-card__title a:focus-visible::after { box-shadow: var(--focus); }
.ttd-card__when { margin: 0; font-size: var(--fs-key); font-weight: 700; color: var(--text); }
.ttd-card__where { margin: 0; color: var(--text-2); overflow-wrap: anywhere; }
.ttd-card__meta { margin: 0; color: var(--text-3); font-size: var(--fs-small); display: flex; flex-wrap: wrap; gap: 4px 14px; }
.ttd-card__meta span { color: var(--text-2); }
.ttd-card__row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.ttd-star { display: inline-flex; padding: 3px 10px; border-radius: var(--radius-pill); background: var(--violet-soft); border: 1px solid var(--violet);
  color: var(--text); font-size: var(--fs-small); font-weight: 700; white-space: nowrap; } /* fix r3.1: 19px floor */

/* ---------------------------------------------------------------- /things-to-do/ page */
.ttd-hero { padding-block: var(--s-7) var(--s-5); background-image: var(--grad-night); border-bottom: 1px solid var(--border); }
.ttd-hero h1 { font-size: var(--fs-h1); color: var(--text); margin-bottom: var(--s-3); }
.ttd-hero p { font-size: var(--fs-key); color: var(--text-2); max-width: 44ch; }
.ttd-hero__ctas { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-5); }
@media (max-width: 599px) { .ttd-hero__ctas .sb-btn { flex: 1 1 100%; } }

.ttd-filters { position: sticky; top: 68px; z-index: 20; background: rgba(11, 17, 32, .92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border); padding-block: var(--s-3); }
.ttd-chiprow { display: flex; gap: var(--s-2); overflow-x: auto; scrollbar-width: none; padding: 4px 2px; margin: 0; -webkit-overflow-scrolling: touch; }
.ttd-chiprow::-webkit-scrollbar { display: none; }
.ttd-chiprow + .ttd-chiprow { margin-top: var(--s-2); }
.ttd-chiprow .sb-chip { flex: none; min-height: 44px; font-size: var(--fs-key); color: var(--text); } /* fix r3.2: key text */
.ttd-chiprow__label { flex: none; align-self: center; margin-right: 4px; color: var(--text-3); font-size: var(--fs-small); font-weight: 700; }
.ttd-chip-cat[aria-pressed="true"] { background: var(--violet-soft); border-color: var(--violet); color: var(--text); }

.ttd-status { margin: var(--s-5) 0 0; color: var(--text-2); font-size: var(--fs-body); }
.ttd-picks { margin-top: var(--s-6); padding: var(--s-5); border-radius: var(--radius-lg); border: 1px solid rgba(167, 139, 250, .45);
  background: linear-gradient(135deg, rgba(139, 92, 246, .14), rgba(45, 212, 191, .08)), var(--surface); }
.ttd-picks h2 { font-size: var(--fs-h3); color: var(--text); margin-bottom: var(--s-4); }
.ttd-group { margin-top: var(--s-7); }
.ttd-group__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin-bottom: var(--s-4); }
.ttd-group__head h2 { margin: 0; font-size: var(--fs-h3); color: var(--text); }
.ttd-group__head p { margin: 0; color: var(--text-3); font-size: var(--fs-small); }
.ttd-grid { display: grid; gap: var(--s-4); grid-template-columns: 1fr; }
@media (min-width: 760px) { .ttd-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .ttd-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.ttd-empty { margin-top: var(--s-6); display: grid; gap: var(--s-3); justify-items: center; text-align: center; padding: var(--s-7) var(--s-5);
  border: 1px dashed var(--border-2); border-radius: var(--radius-lg); background: var(--surface); }
.ttd-empty p { margin: 0; color: var(--text-2); max-width: 42ch; }
.ttd-empty strong { color: var(--text); font-size: var(--fs-key); }
.ttd-skel { height: 170px; border-radius: var(--radius); border: 1px solid var(--border);
  background: linear-gradient(100deg, var(--surface) 30%, var(--surface-2) 50%, var(--surface) 70%); background-size: 300% 100%; animation: ttd-shimmer 1.4s linear infinite; }
@keyframes ttd-shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }
.ttd-more { margin-top: var(--s-6); display: flex; justify-content: center; }
.ttd-bottom { margin-top: var(--s-8); display: grid; gap: var(--s-5); grid-template-columns: 1fr; }
@media (min-width: 900px) { .ttd-bottom { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); } }
.ttd-panel { padding: var(--s-6); border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border-2); }
.ttd-panel h2 { font-size: var(--fs-h3); color: var(--text); margin-bottom: var(--s-3); }
.ttd-panel p { color: var(--text-2); }

/* ---------------------------------------------------------------- event page */
.ttd-event { padding-block: var(--s-6) var(--s-8); }
.ttd-back { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: var(--fs-key); font-weight: 600; color: var(--teal); text-decoration: none; }
.ttd-back:hover { color: var(--blue); }
.ttd-event__head { margin-top: var(--s-4); }
.ttd-event__head h1 { font-size: var(--fs-h1); color: var(--text); margin: var(--s-3) 0 var(--s-4); overflow-wrap: anywhere; }
.ttd-event__media { margin: var(--s-5) 0; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border-2); background: var(--surface-2); }
.ttd-event__media img { width: 100%; max-height: 520px; object-fit: cover; aspect-ratio: 16 / 9; }
.ttd-event__layout { display: grid; gap: var(--s-6); grid-template-columns: 1fr; margin-top: var(--s-5); }
@media (min-width: 960px) { .ttd-event__layout { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: start; } }
.ttd-facts { display: grid; gap: var(--s-3); margin: 0; padding: var(--s-5); border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border-2); }
.ttd-facts div { display: grid; gap: 2px; }
.ttd-facts dt { color: var(--text-3); font-size: var(--fs-small); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.ttd-facts dd { margin: 0; color: var(--text); font-size: var(--fs-key); font-weight: 600; overflow-wrap: anywhere; }
.ttd-actions { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-4); }
.ttd-actions .sb-btn { min-height: 52px; }
@media (max-width: 599px) { .ttd-actions .sb-btn { flex: 1 1 100%; } }
.ttd-desc { color: var(--text-2); font-size: var(--fs-body); white-space: pre-line; overflow-wrap: anywhere; max-width: 68ch; }
.ttd-lineup { display: flex; flex-wrap: wrap; gap: var(--s-2); margin: 0; padding: 0; list-style: none; }
.ttd-lineup a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 16px; border-radius: var(--radius-pill); background: var(--surface-3);
  border: 1px solid var(--border-2); color: var(--text); text-decoration: none; font-weight: 600; }
.ttd-lineup a:hover { border-color: var(--teal); color: var(--text); }
.ttd-section-title { font-size: var(--fs-h3); color: var(--text); margin: var(--s-6) 0 var(--s-4); }
.ttd-aside { display: grid; gap: var(--s-5); }
.ttd-past { margin-top: var(--s-4); padding: 12px 16px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--border-2); color: var(--text-2); }
.ttd-grid--pad { margin-top: var(--s-5); }
.ttd-span-all { grid-column: 1 / -1; }

/* blindside r3: /things-to-do/ header photo (night market). Text sits on a dark left-to-right veil. */
.ttd-hero--photo { position: relative; isolation: isolate; overflow: hidden; padding-block: var(--s-8) var(--s-7); }
.ttd-hero__photo { position: absolute; inset: 0; z-index: -2; display: block; }
.ttd-hero__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 60% 45%; opacity: .7; }
.ttd-hero--photo::before { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(90deg, rgba(11, 17, 32, .95) 0%, rgba(11, 17, 32, .78) 45%, rgba(11, 17, 32, .35) 100%),
              linear-gradient(180deg, rgba(11, 17, 32, 0) 60%, rgba(11, 17, 32, .9) 100%); }
.ttd-hero--photo h1, .ttd-hero--photo p { color: var(--text); text-shadow: 0 2px 18px rgba(11, 17, 32, .8); }
@media (max-width: 599px) { .ttd-hero--photo::before { background: linear-gradient(180deg, rgba(11, 17, 32, .6) 0%, rgba(11, 17, 32, .92) 70%); } }
