/* From the Rooftop — UGC reel section
   Surge Agency · v1.0 · 2026-06-10
   Relies on CSS variables already defined in homesource.css.
   Section lives between Process and ESP Low-E on the homepage.
*/

/* ── Section shell ───────────────────────────────────────────────────── */
.ftr-section {
  background: var(--hs-surface);
  padding: 88px 28px;
  color: var(--hs-fg);
}

.ftr-container {
  max-width: 1200px;
  margin: 0 auto;
}

.ftr-header {
  text-align: center;
  margin-bottom: 64px;
}

.ftr-eyebrow {
  display: block;
  margin-bottom: 12px;
}

.ftr-h2 {
  font-family: var(--hs-font-display);
  font-weight: 600;
  font-size: clamp(30px, 3.4vw, 44px);
  text-transform: uppercase;
  letter-spacing: .01em;
  line-height: 1.05;
  margin: 0 0 16px 0;
  max-width: 22ch;
  margin-inline: auto;
}

.ftr-sub {
  font-family: var(--hs-font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--hs-fg-muted);
  max-width: 52ch;
  margin: 0 auto;
}

/* ── Grid (desktop 3-col, mobile snap-scroll) ────────────────────────── */
.ftr-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

@media (max-width: 900px) {
  .ftr-grid {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 78%;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding: 28px;
    /* The section already spans full width on mobile (`.page section` zeroes its
       horizontal padding), so the carousel must NOT add a negative-margin bleed —
       a `margin: 0 -28px` overshoots the viewport by 28px and creates a
       horizontal page scroll. Inner padding alone gives the cards their edge inset. */
    padding: 0 28px 20px;
    margin: 0;
    -webkit-overflow-scrolling: touch;
  }
  .ftr-grid > * {
    scroll-snap-align: start;
  }
}

/* ── Card ────────────────────────────────────────────────────────────── */
.ftr-card {
  position: relative;
}

.ftr-card-btn {
  appearance: none;
  border: 1px solid var(--hs-border-subtle);
  background: var(--hs-surface-muted);
  border-radius: var(--hs-radius-lg);
  overflow: hidden;
  padding: 0;
  width: 100%;
  aspect-ratio: 9 / 16;
  position: relative;
  cursor: pointer;
  box-shadow: var(--hs-shadow-md);
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
  color: var(--hs-fg-inverse);
  text-align: left;
  font-family: var(--hs-font-body);
  display: block;
}

.ftr-card-btn:hover,
.ftr-card-btn:focus-visible {
  transform: translateY(-3px);
  box-shadow: var(--hs-shadow-lg);
  border-color: var(--hs-green);
  outline: none;
}

.ftr-card-btn:focus-visible {
  outline: 3px solid var(--hs-green);
  outline-offset: 3px;
}

.ftr-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Play badge (top-right corner) */
.ftr-play {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  border-radius: var(--hs-radius-pill);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.92);
  color: var(--hs-ink);
  box-shadow: var(--hs-shadow-sm);
  transition: background 200ms ease, color 200ms ease, transform 200ms ease;
  pointer-events: none;
}

.ftr-card-btn:hover .ftr-play,
.ftr-card-btn:focus-visible .ftr-play {
  background: var(--hs-green);
  color: #fff;
  transform: scale(1.06);
}

/* Meta overlay at card bottom */
.ftr-card-meta {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  padding: 48px 20px 20px;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.72) 70%, rgba(0,0,0,0.86) 100%);
  color: var(--hs-fg-inverse);
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.ftr-pill {
  align-self: flex-start;
}

.ftr-card-title {
  font-family: var(--hs-font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 1.05;
  font-size: clamp(1.1rem, 1.6vw, 1.4rem);
  margin: 4px 0 0 0;
  color: var(--hs-fg-inverse);
}

.ftr-card-sub {
  font-size: 13px;
  line-height: 1.45;
  margin: 0;
  color: var(--hs-fg-inverse-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ftr-duration {
  font-family: var(--hs-font-mono, monospace);
  font-size: 11px;
  letter-spacing: .04em;
  color: var(--hs-fg-inverse-muted);
}

/* ── CTA ─────────────────────────────────────────────────────────────── */
.ftr-cta {
  margin-top: 56px;
  text-align: center;
}

/* reuse site's existing btn-primary + btn-lg styles via classes */
.ftr-cta-arrow {
  transition: transform 220ms ease;
  display: inline-block;
}
.ftr-cta .btn:hover .ftr-cta-arrow {
  transform: translateX(3px);
}

/* ── Lightbox ────────────────────────────────────────────────────────── */
.ftr-lb {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.86);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: ftr-fade 200ms ease;
}

@keyframes ftr-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.ftr-lb-inner {
  position: relative;
  width: min(420px, 100%);
  background: var(--hs-ink);
  border-radius: var(--hs-radius-xl);
  overflow: hidden;
  box-shadow: var(--hs-shadow-lg);
}

.ftr-lb-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: var(--hs-radius-pill);
  background: rgba(255,255,255,0.92);
  color: var(--hs-ink);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.ftr-lb-close:hover { background: #fff; }

.ftr-lb-video {
  width: 100%;
  aspect-ratio: 9 / 16;
  display: block;
  background: var(--hs-ink);
}

.ftr-lb-meta {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--hs-fg-inverse);
}

.ftr-lb-title {
  font-family: var(--hs-font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  margin: 0;
  font-size: 1.3rem;
  color: var(--hs-fg-inverse);
}

.ftr-lb-sub {
  margin: 0;
  color: var(--hs-fg-inverse-muted);
  font-size: 13px;
  line-height: 1.55;
}
