/* ═══════════════════════════════════════════════════════════════════
   GLOBAL RESET & BASE
═══════════════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:          #0d0d0d;
  --surface:     #1a1a1a;
  --surface2:    #222222;
  --border:      #2e2e2e;
  --accent:      #d4a94a;
  --accent-dim:  #a07830;
  --text:        #f0f0f0;
  --text-muted:  #888888;
  --radius:      6px;
  --gap:         16px;
  --header-h:    80px;
  /* Main video aspect ratio: 1080 wide × 1602 tall */
  --video-ratio: calc(1602 / 1080);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }

/* ═══════════════════════════════════════════════════════════════════
   HEADER
═══════════════════════════════════════════════════════════════════ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 13, 13, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  height: var(--header-h);
}

.header-inner {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 24px;
}

.header-logo-wrap {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.header-logo {
  max-height: 56px;
  width: auto;
  object-fit: contain;
}

.header-logo-placeholder {
  height: 48px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  border: 1px dashed var(--border);
  color: var(--text-muted);
  border-radius: var(--radius);
  font-size: 13px;
  letter-spacing: 2px;
}

.header-text-wrap {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  text-align: right;
}

.header-text {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.4;
  max-width: 480px;
}

/* ═══════════════════════════════════════════════════════════════════
   MAIN CONTENT LAYOUT
═══════════════════════════════════════════════════════════════════ */
.main-content {
  padding: 24px;
}

.content-inner {
  max-width: 1600px;
  margin: 0 auto;
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

/* ═══════════════════════════════════════════════════════════════════
   LEFT COLUMN — VIDEO + BELOW TEXT + BOTTOM LOGOS
═══════════════════════════════════════════════════════════════════ */
.video-column {
  flex: 0 0 auto;
  width: clamp(280px, 35vw, 500px);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Portrait video wrapper — maintains 1080:1602 ratio */
.main-video-wrap {
  position: relative;
  width: 100%;
  padding-top: calc(100% * var(--video-ratio));
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

.main-video,
.video-placeholder {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 14px;
  letter-spacing: 1px;
  background: var(--surface);
}

/* Below-video text */
.below-video-text {
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
}

/* Bottom logos row */
.bottom-logos-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.bottom-logo-item {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bottom-logo-img {
  max-height: 48px;
  max-width: 100%;
  width: auto;
  object-fit: contain;
  filter: brightness(0.85);
  transition: filter 0.2s;
}

.bottom-logo-item a:hover .bottom-logo-img {
  filter: brightness(1);
}

/* ═══════════════════════════════════════════════════════════════════
   RIGHT COLUMN — THUMBNAIL GRID
═══════════════════════════════════════════════════════════════════ */
.thumbs-column {
  flex: 1;
  min-width: 0;
}

.thumbs-grid {
  display: grid;
  /* 4 columns — fills the right side of the layout */
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gap);
}

/* Each thumbnail slot — portrait ratio matching the main video */
.thumb-item {
  position: relative;
  width: 100%;
  padding-top: calc(100% * var(--video-ratio));
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
}

.thumb-item:not(.thumb-empty):hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.thumb-link {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  cursor: pointer;
}

.thumb-link[href]:hover .thumb-media {
  transform: scale(1.04);
}

.thumb-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

/* Play button overlay on video thumbnails */
.thumb-link[data-video="true"]::after {
  content: '▶';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: rgba(255,255,255,0.85);
  text-shadow: 0 2px 8px rgba(0,0,0,0.8);
  pointer-events: none;
  transition: opacity 0.2s;
}

.thumb-link[data-video="true"]:hover::after {
  opacity: 0;
}

/* Title bar at bottom of thumbnail */
.thumb-title {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 6px 8px 5px;
  background: linear-gradient(transparent, rgba(0,0,0,0.82));
  font-size: 11px;
  color: #ddd;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Empty slot */
.thumb-empty { cursor: default; }

.thumb-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--border);
  font-size: 18px;
  font-weight: 600;
  user-select: none;
}

/* ═══════════════════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .content-inner {
    flex-direction: column;
  }

  .video-column {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
  }

  .thumbs-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 600px) {
  :root { --header-h: 64px; }

  .main-content { padding: 16px; }

  .thumbs-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }

  .header-inner { padding: 0 16px; }
}
