/* =====================================================================
   The Reunion Show · public cars grid + enquiry popup
   Everything is scoped to .trs-cars so it can't clash with the site.
   Fonts are inherited from the page.
   ===================================================================== */

.trs-cars {
  --trs-bg: #000;
  --trs-surface: #0d0d0f;
  --trs-surface-2: #151518;
  --trs-field: #1d1d21;
  --trs-hairline: rgba(255, 255, 255, .08);
  --trs-hairline-strong: rgba(255, 255, 255, .14);
  --trs-text: #f5f5f7;
  --trs-text-2: #a1a1a6;
  --trs-text-3: #6e6e73;
  --trs-cyan: #20ffff;
  --trs-cyan-hover: #8cffff;
  --trs-orange: #f16d15;
  --trs-red: #ff6b61;
  --trs-ring: 0 0 0 3px rgba(32, 255, 255, .35);
  --trs-ease: cubic-bezier(.2, .8, .2, 1);
  --trs-r: 14px;
  color: var(--trs-text);
  font-family: inherit;
}
.trs-cars *, .trs-cars *::before, .trs-cars *::after { box-sizing: border-box; }

/* ---------------------------------------------------------------- grid */
.trs-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 24px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
}
.trs-item { margin: 0; padding: 0; animation: trs-rise .4s var(--trs-ease) backwards; }

/* Override the site's list styles (bullets, markers, ::before icons, indents) */
.trs-cars ul.trs-grid,
.trs-cars ul.trs-grid > li.trs-item { list-style: none !important; list-style-type: none !important; background-image: none !important; }
.trs-cars ul.trs-grid { margin: 0 !important; padding: 0 !important; }
.trs-cars ul.trs-grid > li.trs-item { margin: 0 !important; padding: 0 !important; }
.trs-cars ul.trs-grid > li.trs-item::before,
.trs-cars ul.trs-grid > li.trs-item::after { content: none !important; display: none !important; }
.trs-cars ul.trs-grid > li.trs-item::marker { content: "" !important; font-size: 0 !important; color: transparent !important; }
.trs-item:nth-child(2) { animation-delay: .04s; } .trs-item:nth-child(3) { animation-delay: .08s; }
.trs-item:nth-child(4) { animation-delay: .12s; } .trs-item:nth-child(n+5) { animation-delay: .16s; }

.trs-card {
  position: relative; display: block; aspect-ratio: 4 / 5; overflow: hidden;
  border-radius: var(--trs-r); background: var(--trs-surface-2);
  box-shadow: 0 0 0 1px var(--trs-hairline);
  transition: transform .25s var(--trs-ease), box-shadow .25s var(--trs-ease);
  text-decoration: none; color: inherit; cursor: zoom-in;
}
.trs-card img { display: block; width: 100%; height: 100%; object-fit: cover; }
.trs-card:hover { transform: translateY(-4px); box-shadow: 0 0 0 1px var(--trs-hairline-strong), 0 20px 44px rgba(0, 0, 0, .6), 0 0 40px rgba(32, 255, 255, .08); }
.trs-card:focus-visible { outline: none; box-shadow: var(--trs-ring); }
.trs-card-cta {
  position: absolute; left: 50%; bottom: 16px; transform: translate(-50%, 8px);
  padding: 10px 18px; border-radius: 999px; white-space: nowrap;
  background: rgba(0, 0, 0, .72); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 0 0 1px var(--trs-hairline-strong);
  font-size: 13px; font-weight: 600; letter-spacing: .02em; color: var(--trs-text);
  opacity: 0; transition: opacity .2s var(--trs-ease), transform .2s var(--trs-ease);
}
.trs-card:hover .trs-card-cta, .trs-card:focus-visible .trs-card-cta { opacity: 1; transform: translate(-50%, 0); }
@media (hover: none) { .trs-card-cta { opacity: 1; transform: translate(-50%, 0); } }

.trs-empty { margin: 0; padding: 48px 16px; text-align: center; color: var(--trs-text-2); }

/* ---------------------------------------------------------------- popup */
.trs-modal {
  width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0; inset: 0;
  background: transparent; color: var(--trs-text); overflow: hidden;
}
.trs-modal::backdrop { background: rgba(0, 0, 0, .88); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.trs-modal[open] { animation: trs-fade .25s var(--trs-ease); }
.trs-modal[open]::backdrop { animation: trs-fade .25s var(--trs-ease); }
html.trs-locked { overflow: hidden; }

.trs-modal-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 440px); height: 100%; }

.trs-modal-media {
  position: relative; margin: 0; min-width: 0; height: 100%;
  display: grid; place-items: center;
  background: radial-gradient(70% 60% at 50% 50%, rgba(32, 255, 255, .06), transparent 70%);
}
.trs-modal-img {
  display: block; width: auto; max-width: 100%; object-fit: contain;
  height: 100vh; height: 100dvh;   /* full height; contain keeps the whole image visible on narrow windows */
  animation: trs-zoom .35s var(--trs-ease);
}
.trs-modal-img.is-loading { opacity: .35; }

.trs-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  display: grid; place-items: center; width: 48px; height: 48px; padding: 0;
  border: 0; border-radius: 999px; cursor: pointer;
  background: rgba(20, 20, 24, .7); color: var(--trs-text);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 0 0 1px var(--trs-hairline-strong);
  transition: background .15s, transform .1s, opacity .15s;
}
.trs-nav:hover { background: rgba(40, 40, 46, .85); }
.trs-nav:active { transform: translateY(-50%) scale(.94); }
.trs-nav:focus-visible { outline: none; box-shadow: var(--trs-ring); }
.trs-prev { left: 20px; }
.trs-next { right: 20px; }
.trs-modal.is-single .trs-nav { display: none; }

.trs-panel {
  position: relative; height: 100%; overflow-y: auto; overscroll-behavior: contain;
  padding: 72px 40px 40px;
  background: var(--trs-surface); box-shadow: -1px 0 0 var(--trs-hairline);
  scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .14) transparent;
}
.trs-close {
  position: absolute; top: 20px; right: 20px;
  display: grid; place-items: center; width: 40px; height: 40px; padding: 0;
  border: 0; border-radius: 999px; cursor: pointer;
  background: var(--trs-surface-2); color: var(--trs-text-2);
  transition: background .15s, color .15s;
}
.trs-close:hover { background: var(--trs-field); color: var(--trs-text); }
.trs-close:focus-visible { outline: none; box-shadow: var(--trs-ring); }

.trs-eyebrow { margin: 0 0 8px; font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--trs-orange); }
.trs-car-title { margin: 0 0 8px; font-size: 26px; font-weight: 700; line-height: 1.2; letter-spacing: -.01em; color: var(--trs-text); }
.trs-lede { margin: 0 0 32px; font-size: 15px; line-height: 1.5; color: var(--trs-text-2); }

/* ---------------------------------------------------------------- form */
.trs-form { margin: 0; }
.trs-field { margin: 0 0 16px; }
.trs-field label { display: block; margin: 0 0 6px; font-size: 13px; font-weight: 500; color: var(--trs-text-2); }
.trs-optional { font-weight: 400; color: var(--trs-text-3); }
.trs-field input, .trs-field textarea {
  display: block; width: 100%; margin: 0; padding: 0 14px; height: 48px;
  border-radius: 10px; border: 1px solid var(--trs-hairline-strong);
  background: var(--trs-surface-2); color: var(--trs-text);
  font: inherit; font-size: 16px; line-height: 1.4;   /* 16px stops iOS zooming in */
  transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none; appearance: none;
}
.trs-field textarea { height: auto; min-height: 132px; padding: 12px 14px; resize: vertical; }
.trs-field input:hover, .trs-field textarea:hover { border-color: rgba(255, 255, 255, .22); }
.trs-field input:focus, .trs-field textarea:focus { outline: none; border-color: var(--trs-cyan); box-shadow: var(--trs-ring); }
.trs-field.has-error input, .trs-field.has-error textarea { border-color: var(--trs-red); }
.trs-error { margin: 6px 0 0; font-size: 13px; line-height: 1.4; color: var(--trs-red); }
.trs-error:empty { display: none; }
.trs-form-error { margin: 0 0 16px; padding: 12px 14px; border-radius: 10px; background: rgba(255, 69, 58, .12); }

.trs-hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.trs-submit, .trs-again {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; height: 52px; margin: 8px 0 0; padding: 0 24px;
  border: 0; border-radius: 999px; cursor: pointer;
  background: var(--trs-cyan); color: #001314;
  font: inherit; font-size: 15px; font-weight: 700; letter-spacing: .01em;
  box-shadow: 0 0 24px rgba(32, 255, 255, .25);
  transition: background .15s, transform .1s, box-shadow .2s;
}
.trs-submit:hover, .trs-again:hover { background: var(--trs-cyan-hover); box-shadow: 0 0 32px rgba(32, 255, 255, .4); }
.trs-submit:active, .trs-again:active { transform: scale(.98); }
.trs-submit:focus-visible, .trs-again:focus-visible { outline: none; box-shadow: var(--trs-ring); }
.trs-submit[disabled] { opacity: .6; cursor: progress; transform: none; }
.trs-submit[disabled] span::after { content: "…"; }
.trs-small { margin: 16px 0 0; font-size: 12px; line-height: 1.5; color: var(--trs-text-3); }

.trs-sent { padding-top: 8px; animation: trs-rise .35s var(--trs-ease); }
.trs-sent[hidden] { display: none; }
.trs-sent-icon {
  display: grid; place-items: center; width: 56px; height: 56px; margin: 0 0 20px;
  border-radius: 999px; background: rgba(48, 209, 88, .14); color: #30d158;
}
.trs-sent h3 { margin: 0 0 8px; font-size: 22px; font-weight: 700; }
.trs-sent p { margin: 0 0 24px; font-size: 15px; line-height: 1.5; color: var(--trs-text-2); }
.trs-again { background: var(--trs-surface-2); color: var(--trs-text); box-shadow: 0 0 0 1px var(--trs-hairline-strong); }
.trs-again:hover { background: var(--trs-field); box-shadow: 0 0 0 1px var(--trs-hairline-strong); }

/* ---------------------------------------------------------------- small screens: stack */
@media (max-width: 900px) {
  .trs-modal { overflow-y: auto; overscroll-behavior: contain; }
  .trs-modal-inner { display: block; height: auto; min-height: 100%; }
  .trs-modal-media { height: auto; padding: 64px 16px 16px; }
  .trs-modal-img { width: 100%; height: auto; max-height: 80vh; max-height: 80dvh; border-radius: 12px; }
  .trs-nav { width: 40px; height: 40px; }
  .trs-prev { left: 24px; } .trs-next { right: 24px; }
  .trs-panel { height: auto; overflow: visible; padding: 32px 16px 48px; box-shadow: 0 -1px 0 var(--trs-hairline); }
  .trs-close { position: fixed; top: 12px; right: 12px; z-index: 2; background: rgba(20, 20, 24, .8); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
  .trs-car-title { font-size: 22px; }
  .trs-grid { gap: 16px; }
}

@keyframes trs-rise { from { opacity: 0; transform: translateY(10px); } }
@keyframes trs-fade { from { opacity: 0; } }
@keyframes trs-zoom { from { opacity: 0; transform: scale(.97); } }

@media (prefers-reduced-motion: reduce) {
  .trs-cars *, .trs-modal, .trs-modal::backdrop { animation: none !important; transition: none !important; }
}
