/*
 * layout.css
 * Structural layout: top navigation bar, page container, the two-column
 * workspace (sidebar + stage), video grid, and responsive breakpoints.
 * Depends on tokens from base.css.
 */

/* ─── Stacking Context ───────────────────────────────────────────────────── */
/* Lift topbar and container above the fixed orb decorations (z-index: 0). */

.topbar,
.container {
  position: relative;
  z-index: 1;
}

/* ─── Top Navigation Bar ─────────────────────────────────────────────────── */

.topbar {
  max-width: 1100px;
  margin: 0 auto;
  padding: 22px 20px 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
}

.logo {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #042f2e;
  font-weight: 700;
}

.brand .sub {
  display: block;
  font-size: 12px;
}

/* ─── Page Container ─────────────────────────────────────────────────────── */

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 12px 20px 40px;
}

/* ─── Hero / Join Panel ──────────────────────────────────────────────────── */

.hero {
  padding: 42px 36px;
  max-width: 640px;
  margin: 48px auto 0;
}

.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(28px, 5vw, 44px);
  line-height: 1.1;
}

.lede { margin: 0 0 24px; }

.join-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ─── Two-column Workspace (Sidebar + Stage) ─────────────────────────────── */

.workspace {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 16px;
  align-items: start;
}

/* Generic flex row used inside sidebar header and controls bar. */
.row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.sidebar .muted {
  margin: 4px 0 0;
  font-size: 12px;
}

/* ─── Video Grid ─────────────────────────────────────────────────────────── */

.videos {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  min-height: 320px;
  max-height: 70vh;
  margin-bottom: 16px;
  background: #000;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
}

/* ─── Call Controls Bar ──────────────────────────────────────────────────── */

.controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap; /* allow wrapping on very small screens */
}

.media-controls {
  display: flex;
  gap: 8px;
  align-items: center;
}

.controls p { margin: 0; }

/* ─── Responsive Breakpoint ──────────────────────────────────────────────── */

@media (max-width: 860px) {
  .workspace,
  .videos {
    grid-template-columns: 1fr;
  }

  .hero {
    margin-top: 24px;
    padding: 28px 20px;
  }
}
