/* ==========================================================================
   HS Design — Zero-LCP Hybrid Architectural Video Facade (v1.0)
   Brand Tokens: Forest Green (#273E26), Sage Accent (#4A7C59), Warm Sand (#F6F3EC)
   Pattern: Scroll-In-View Silent Preview (Tier 1 MP4/WebM | Tier 2 Ken Burns)
            + 1-Tap Full-Sound Inline Swap + Optional Theater Lightbox
   ========================================================================== */

:root {
  --hs-vf-forest: #273E26;
  --hs-vf-forest-deep: #1B2C1A;
  --hs-vf-sage: #4A7C59;
  --hs-vf-sand: #F6F3EC;
  --hs-vf-sand-alt: #EDE7DC;
  --hs-vf-border: #D9D1C3;
  --hs-vf-ink: #1D1D1F;
  --hs-vf-ink-mute: #5B5F57;
  --hs-vf-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Portfolio Card Subtle Indicator Pill (portfolio.html / index.html) ---------- */
.portfolio-img-wrap {
  position: relative;
}

.hs-card-video-pill {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.34rem 0.72rem;
  border-radius: 999px;
  background: rgba(27, 44, 26, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(246, 243, 236, 0.24);
  color: #F6F3EC;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1;
  pointer-events: none;
}

.hs-card-video-pill svg {
  width: 10px;
  height: 10px;
  flex-shrink: 0;
}

/* ---------- Shared Architectural Video Frame (Portfolio & Blog) ---------- */
.hs-vf-block {
  margin: 2.25rem 0;
  border-radius: 18px;
  background: var(--hs-vf-sand);
  border: 1px solid var(--hs-vf-border);
  overflow: hidden;
  color: var(--hs-vf-ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.hs-vf-block--blog {
  border-left: 3px solid var(--hs-vf-forest);
}

.hs-vf-block--dark {
  background: rgba(255, 255, 255, 0.035);
  border-color: rgba(255, 255, 255, 0.12);
  color: #F6F3EC;
}

.hs-vf-layout {
  display: grid;
  grid-template-columns: minmax(220px, 310px) 1fr;
  gap: 1.75rem;
  padding: 1.5rem;
  align-items: center;
}

.hs-vf-layout--landscape {
  grid-template-columns: minmax(280px, 460px) 1fr;
}

.hs-vf-layout--compact {
  grid-template-columns: 1fr;
  padding: 0;
  gap: 0;
}

@media (max-width: 780px) {
  .hs-vf-layout,
  .hs-vf-layout--landscape {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    padding: 1.15rem;
  }
}

/* ---------- Alive Stage (Zero-LCP Poster + Tier 1 Video / Tier 2 Drift + Inline Iframe) ---------- */
.hs-vf-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  max-height: 520px;
  margin: 0 auto;
  border-radius: 12px;
  overflow: hidden;
  background: var(--hs-vf-forest-deep);
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 12px 30px -18px rgba(27, 44, 26, 0.45);
}

.hs-vf-stage--landscape {
  aspect-ratio: 16 / 9;
  max-height: 360px;
}

.hs-vf-stage:focus-visible {
  outline: 2px solid var(--hs-vf-forest);
  outline-offset: 3px;
}

.hs-vf-poster,
.hs-vf-preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.hs-vf-poster {
  z-index: 1;
  transform: scale(1.01);
  transition: transform 0.9s var(--hs-vf-ease);
  filter: brightness(0.96) contrast(1.04);
}

/* Tier 2 subtle architectural Ken Burns drift when scrolled into view */
@keyframes hsVfDrift {
  0% {
    transform: scale(1.01) translate3d(0, 0, 0);
  }
  100% {
    transform: scale(1.075) translate3d(0, -1.5%, 0);
  }
}

.hs-vf-stage.is-inview[data-motion-tier="tier2"]:not(.is-playing) .hs-vf-poster {
  animation: hsVfDrift 14s ease-in-out alternate infinite;
  will-change: transform;
}

/* Tier 1 ultra-light silent preview loop */
.hs-vf-preview {
  z-index: 2;
  opacity: 0;
  transition: opacity 0.65s var(--hs-vf-ease);
}

.hs-vf-preview.is-ready {
  opacity: 1;
}

.hs-vf-scrim {
  position: absolute;
  inset: 0;
  z-index: 3;
  background: linear-gradient(
    to top,
    rgba(18, 28, 18, 0.72) 0%,
    rgba(18, 28, 18, 0.16) 44%,
    rgba(18, 28, 18, 0.12) 100%
  );
  pointer-events: none;
  transition: opacity 0.35s var(--hs-vf-ease);
}

.hs-vf-stage:hover .hs-vf-scrim {
  opacity: 0.88;
}

.hs-vf-stage.is-playing .hs-vf-scrim,
.hs-vf-stage.is-playing .hs-vf-play-trigger,
.hs-vf-stage.is-playing .hs-vf-stage-foot,
.hs-vf-stage.is-playing .hs-vf-stage-badge {
  display: none;
}

/* Top micro-status inside stage */
.hs-vf-stage-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  padding: 0.28rem 0.62rem;
  border-radius: 999px;
  background: rgba(20, 28, 20, 0.66);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(246, 243, 236, 0.18);
  color: rgba(246, 243, 236, 0.94);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  pointer-events: none;
}

.hs-vf-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #9CD8A8;
  flex-shrink: 0;
}

/* Center frosted Forest Green play button */
.hs-vf-play-trigger {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 4;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: rgba(39, 62, 38, 0.84);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(246, 243, 236, 0.34);
  color: #F6F3EC;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 0.35s var(--hs-vf-ease), background 0.3s ease;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.32);
}

.hs-vf-stage:hover .hs-vf-play-trigger {
  transform: translate(-50%, -50%) scale(1.07);
  background: var(--hs-vf-forest);
}

.hs-vf-play-trigger svg {
  width: 22px;
  height: 22px;
  margin-left: 3px;
}

/* Bottom caption bar inside stage */
.hs-vf-stage-foot {
  position: absolute;
  left: 0.85rem;
  right: 0.85rem;
  bottom: 0.85rem;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  color: #F6F3EC;
  font-size: 12px;
  font-weight: 500;
  pointer-events: none;
}

.hs-vf-tap-hint {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  opacity: 0.92;
}

.hs-vf-tap-hint svg {
  width: 14px;
  height: 14px;
}

.hs-vf-duration {
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  padding: 0.16rem 0.48rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

/* Active Inline Iframe */
.hs-vf-iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  z-index: 5;
  background: #000;
}

/* ---------- Editorial Metadata Column ---------- */
.hs-vf-meta {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-width: 0;
}

.hs-vf-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--hs-vf-forest);
}

.hs-vf-eyebrow::before {
  content: '';
  width: 16px;
  height: 1px;
  background: var(--hs-vf-forest);
  display: inline-block;
}

.hs-vf-block--dark .hs-vf-eyebrow {
  color: #9CD8A8;
}

.hs-vf-block--dark .hs-vf-eyebrow::before {
  background: #9CD8A8;
}

.hs-vf-title {
  margin: 0;
  font-family: 'Inter Tight', 'Inter', sans-serif;
  font-size: clamp(1.18rem, 2.2vw, 1.5rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--hs-vf-ink);
}

.hs-vf-block--dark .hs-vf-title {
  color: #FFFFFF;
}

.hs-vf-desc {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.65;
  color: var(--hs-vf-ink-mute);
}

.hs-vf-block--dark .hs-vf-desc {
  color: rgba(246, 243, 236, 0.74);
}

/* Platform Switcher (when both YouTube & TikTok exist for same page) */
.hs-vf-switcher {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.15rem;
}

.hs-vf-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.38rem 0.82rem;
  border-radius: 999px;
  border: 1px solid var(--hs-vf-border);
  background: transparent;
  color: var(--hs-vf-ink-mute);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s var(--hs-vf-ease);
}

.hs-vf-tab:hover {
  border-color: var(--hs-vf-forest);
  color: var(--hs-vf-forest);
}

.hs-vf-tab.is-active {
  background: var(--hs-vf-forest);
  border-color: var(--hs-vf-forest);
  color: #F6F3EC;
}

/* Action Bar: Expand + Clean External Fallback Pills */
.hs-vf-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  margin-top: 0.35rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--hs-vf-border);
}

.hs-vf-block--dark .hs-vf-actions {
  border-top-color: rgba(255, 255, 255, 0.12);
}

.hs-vf-btn-expand {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  padding: 0.48rem 0.95rem;
  border-radius: 999px;
  background: var(--hs-vf-forest);
  color: #F6F3EC;
  font-size: 12.5px;
  font-weight: 600;
  border: 1px solid var(--hs-vf-forest);
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s var(--hs-vf-ease);
}

.hs-vf-btn-expand:hover {
  background: var(--hs-vf-forest-deep);
  transform: translateY(-1px);
}

.hs-vf-ext-link {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--hs-vf-forest);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity 0.2s ease;
}

.hs-vf-ext-link:hover {
  opacity: 0.72;
}

.hs-vf-block--dark .hs-vf-ext-link {
  color: #9CD8A8;
}

/* Compact Dark Grid Card & Two-Tab Switcher (for index.html #videos Zero-LCP Showcase) */
.hs-vf-cat-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(246, 243, 236, 0.12);
}

.hs-vf-cat-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.hs-vf-cat-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.58rem 1.2rem;
  border-radius: 999px;
  border: 1px solid rgba(246, 243, 236, 0.18);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(246, 243, 236, 0.76);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: all 0.28s var(--hs-vf-ease);
}

.hs-vf-cat-tab:hover {
  border-color: rgba(156, 216, 168, 0.55);
  color: #F6F3EC;
}

.hs-vf-cat-tab.is-active {
  background: var(--hs-vf-forest);
  border-color: #6FA97E;
  color: #F6F3EC;
  box-shadow: 0 8px 22px -10px rgba(39, 62, 38, 0.85);
}

.hs-vf-cat-count {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  padding: 0.1rem 0.44rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: inherit;
}

.hs-vf-cat-panel[hidden] {
  display: none !important;
}

.hs-vf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 1.75rem;
}

.hs-vf-grid-card {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: 0.85rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(246, 243, 236, 0.1);
  transition: border-color 0.35s var(--hs-vf-ease), transform 0.35s var(--hs-vf-ease);
}

.hs-vf-grid-card:hover {
  border-color: rgba(156, 216, 168, 0.34);
  transform: translateY(-3px);
}

.hs-vf-grid-caption {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.15rem 0.25rem 0.25rem;
}

.hs-vf-grid-caption h3 {
  margin: 0;
  font-family: 'Inter Tight', 'Inter', sans-serif;
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.32;
  letter-spacing: -0.015em;
  color: #F6F3EC;
}

.hs-vf-grid-caption-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 0.85rem;
  font-size: 12px;
  color: rgba(246, 243, 236, 0.68);
}

.hs-vf-grid-caption-links a {
  color: #9CD8A8;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hs-vf-grid-caption-links a:hover {
  color: #F6F3EC;
}

/* ---------- Optional Architectural Theater Lightbox Modal ---------- */
html.hs-vf-modal-open,
html.hs-vf-modal-open body {
  overflow: hidden !important;
}

.hs-vf-modal {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(15, 22, 15, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.28s var(--hs-vf-ease), visibility 0.28s var(--hs-vf-ease);
}

.hs-vf-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.hs-vf-modal-dialog {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: #141914;
  border: 1px solid rgba(246, 243, 236, 0.16);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 28px 64px rgba(0, 0, 0, 0.55);
}

.hs-vf-modal-dialog--landscape {
  max-width: 880px;
}

.hs-vf-modal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid rgba(246, 243, 236, 0.1);
  color: #F6F3EC;
  font-size: 13px;
  font-weight: 600;
}

.hs-vf-modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #F6F3EC;
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
}

.hs-vf-modal-close:hover {
  background: rgba(255, 255, 255, 0.18);
}

.hs-vf-modal-body {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  max-height: 76vh;
  background: #000;
}

.hs-vf-modal-dialog--landscape .hs-vf-modal-body {
  aspect-ratio: 16 / 9;
}

.hs-vf-modal-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0.65rem 1rem;
  background: #141914;
}

/* ---------- Reduced Motion Respect ---------- */
@media (prefers-reduced-motion: reduce) {
  .hs-vf-stage.is-inview[data-motion-tier="tier2"]:not(.is-playing) .hs-vf-poster {
    animation: none !important;
  }
  .hs-vf-play-trigger,
  .hs-vf-poster,
  .hs-vf-preview {
    transition: none !important;
  }
}
