/* ===== Design tokens (Skool-like) ===== */
:root {
  --bg: #f5f6f8;
  --card: #ffffff;
  --border: #e6e7eb;
  --text: #1a1d24;
  --text-soft: #5b6170;
  --text-muted: #8b909c;
  --accent: #fdb515;       /* Skool-style yellow JOIN button */
  --accent-text: #1a1d24;
  --link: #2563eb;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(16, 24, 40, 0.06), 0 1px 2px rgba(16, 24, 40, 0.04);
  --shadow-lg: 0 8px 28px rgba(16, 24, 40, 0.08);
  --max: 1080px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  font-size: 15px;
  border-radius: 10px;
  padding: 11px 18px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .05s ease, box-shadow .15s ease, background .15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover { background: #f0f1f4; }

.btn-join {
  background: var(--accent);
  color: var(--accent-text);
  width: 100%;
  font-size: 16px;
  padding: 14px 18px;
  box-shadow: 0 2px 0 #e09e0a;
}
.btn-join:hover { filter: brightness(1.03); }

/* ===== Top bar ===== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--card);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}
.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--text);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 14px;
  letter-spacing: .5px;
}
.brand-name { font-size: 17px; }

/* ===== Page layout ===== */
.page {
  max-width: var(--max);
  margin: 0 auto;
  padding: 28px 20px 64px;
}
.layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 28px;
  align-items: start;
}

/* ===== Main content ===== */
.content {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px;
}

/* Video placeholder */
.video-placeholder {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #1a1d24, #3a4150);
  margin-bottom: 22px;
  display: grid;
  place-items: center;
  gap: 14px;
  cursor: pointer;
  transition: filter .15s ease;
}
.video-placeholder:hover { filter: brightness(1.08); }
.play-btn {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  color: #1a1d24;
  display: grid;
  place-items: center;
  font-size: 26px;
  padding-left: 5px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}
.video-label {
  position: absolute;
  bottom: 14px;
  left: 16px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
  font-weight: 600;
}
.video-duration {
  position: absolute;
  bottom: 12px;
  right: 14px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
}

/* Inline image placeholders */
.img-placeholder {
  aspect-ratio: 16 / 9;
  border: 2px dashed var(--border);
  border-radius: 12px;
  background: #fafbfc;
  display: grid;
  place-items: center;
  gap: 8px;
  margin: 22px 0;
  color: var(--text-muted);
}
.img-icon { font-size: 30px; }
.img-text { font-size: 14px; font-weight: 600; }

/* Real content images */
.content-img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--border);
  margin: 22px 0;
}

.headline {
  font-size: 30px;
  line-height: 1.2;
  font-weight: 800;
  margin: 4px 0 14px;
  letter-spacing: -0.5px;
}
.lede {
  font-size: 18px;
  color: var(--text-soft);
  margin: 0 0 8px;
}

.rich h2 {
  font-size: 20px;
  font-weight: 700;
  margin: 28px 0 12px;
}
.rich p { color: var(--text-soft); margin: 0 0 12px; }

.offer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 14px 0 4px;
}
.offer {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  background: #fafbfc;
  font-weight: 600;
}
.offer-emoji { font-size: 22px; }
.offer-title { font-size: 15px; }

.feature-list {
  list-style: none;
  padding: 0;
  margin: 6px 0 0;
}
.feature-list li {
  position: relative;
  padding: 9px 0 9px 30px;
  color: var(--text-soft);
  border-bottom: 1px solid #f0f1f4;
}
.feature-list li:last-child { border-bottom: none; }
.feature-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 9px;
  color: #16a34a;
  font-weight: 800;
}
.feature-list strong { color: var(--text); }

/* ===== Sidebar / community card ===== */
.sidebar { position: sticky; top: 84px; }

.community-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.community-cover {
  position: relative;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #fdb515, #f97316);
  display: grid;
  place-items: center;
}
.community-cover img { width: 100%; height: 100%; object-fit: cover; }
.community-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}
.community-cover.video-cover {
  background: linear-gradient(135deg, #1a1d24, #3a4150);
  cursor: pointer;
  transition: filter .15s ease;
}
.community-cover.video-cover:hover { filter: brightness(1.08); }
.community-cover.video-cover .play-btn {
  width: 56px;
  height: 56px;
  font-size: 22px;
}

.community-body { padding: 18px; }
.community-name { font-size: 19px; font-weight: 800; margin: 0 0 2px; }
.community-handle { font-size: 13px; color: var(--text-muted); margin: 0 0 12px; }
.community-desc { font-size: 14px; color: var(--text-soft); margin: 0 0 16px; }

.meta-row {
  display: flex;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
  margin-bottom: 16px;
}
.meta { flex: 1; text-align: center; }
.meta + .meta { border-left: 1px solid var(--border); }
.meta-num { display: block; font-size: 18px; font-weight: 800; }
.meta-label { font-size: 12px; color: var(--text-muted); }

.creator {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  font-size: 14px;
  color: var(--text-soft);
}
.creator-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--text);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
}

.private-note {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  margin: 12px 0 0;
}

/* ===== Image fallbacks ===== */
.media-fallback { display: none !important; }
.media-fallback-label {
  display: none;
  color: #fff;
  font-weight: 800;
  font-size: 26px;
  letter-spacing: 1px;
}
.hero-media img.media-fallback ~ .media-fallback-label,
.community-cover img.media-fallback ~ .media-fallback-label {
  display: block;
}

/* ===== Footer ===== */
.footer {
  border-top: 1px solid var(--border);
  background: var(--card);
}
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 20px;
  display: flex;
  gap: 10px;
  justify-content: center;
  color: var(--text-muted);
  font-size: 13px;
}

/* ===== Responsive ===== */
@media (max-width: 880px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: static; order: -1; }
  .headline { font-size: 25px; }
}
@media (max-width: 480px) {
  .offer-grid { grid-template-columns: 1fr; }
  .content { padding: 18px; }
}
