/* =====================================================
   AI Fluent — shared site styles (dark theme + sidebar)
   ===================================================== */

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #1E2227;
  --surface: #263238;
  --surface-2: #2e3a40;
  --surface-hover: #303a40;
  --border: rgba(255, 255, 255, 0.06);
  --border-strong: rgba(255, 255, 255, 0.12);
  --teal: #FF7043;      /* orange accent, kept var name for compat */
  --orange: #FF7043;
  --orange-dim: rgba(255, 112, 67, 0.12);
  --green: #4ade80;
  --text: #ffffff;
  --text-body: #e0e0e0;
  --text-mid: #9ca3af;
  --text-faint: #6b7280;
  --radius: 12px;
  --radius-sm: 8px;
  --sidebar-w: 240px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Albert Sans', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a { color: var(--orange); text-decoration: none; }
a:hover { opacity: 0.85; }

img { max-width: 100%; display: block; }

/* =====================================================
   SIDEBAR
   ===================================================== */

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: #1a1e22;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  z-index: 100;
  overflow-y: auto;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px 20px;
  color: var(--text);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}
.sidebar-logo:hover { opacity: 1; }
.sidebar-logo svg { flex-shrink: 0; }

.sidebar-nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  color: var(--text-body);
  font-size: 15px;
  font-weight: 500;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
}
.sidebar-nav a:hover {
  background: var(--surface);
  color: var(--text);
  opacity: 1;
}
.sidebar-nav a.active {
  background: var(--orange-dim);
  color: var(--orange);
}
.sidebar-nav a svg,
.sidebar-nav a .emoji {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.sidebar-bottom {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sidebar-cta {
  display: inline-block;
  background: var(--orange);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  padding: 12px 16px;
  border-radius: 8px;
  text-align: center;
  text-decoration: none;
  transition: opacity 0.15s, transform 0.15s;
}
.sidebar-cta:hover { opacity: 0.92; transform: translateY(-1px); color: #fff; }

.sidebar-signin {
  text-align: center;
  color: var(--text-mid);
  font-size: 13px;
  padding: 6px;
}
.sidebar-signin:hover { color: var(--text); opacity: 1; }

/* Mobile hamburger header */
.mobile-header {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: #1a1e22;
  border-bottom: 1px solid var(--border);
  padding: 0 16px;
  align-items: center;
  justify-content: space-between;
  z-index: 99;
}
.mobile-header .sidebar-logo {
  padding: 0;
  margin: 0;
  border: none;
  font-size: 16px;
}
.hamburger {
  background: transparent;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hamburger svg { width: 24px; height: 24px; }

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 98;
}

/* =====================================================
   LAYOUT — main content flows right of sidebar
   ===================================================== */

.main, .main-content {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.main-inner {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 56px 40px 80px;
  flex: 1;
}

/* =====================================================
   RESPONSIVE — mobile hamburger
   ===================================================== */

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.22s ease;
    width: 280px;
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay.open { display: block; }
  .mobile-header { display: flex; }
  .main, .main-content { margin-left: 0; padding-top: 60px; }
  .main-inner { padding: 32px 20px 60px; }
}

/* =====================================================
   TYPOGRAPHY
   ===================================================== */

h1, h2, h3, h4 {
  color: var(--text);
  font-family: 'Albert Sans', sans-serif;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

.page-hero { padding: 16px 0 28px; }
.page-hero h1 {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 800;
  margin-bottom: 12px;
}
.page-hero p.subtitle {
  font-size: clamp(16px, 2vw, 19px);
  color: var(--text-mid);
  max-width: 640px;
}

section { padding: 32px 0; }

section > h2,
.section h2 {
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 700;
  margin-bottom: 20px;
}

.section-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--orange);
  margin-bottom: 12px;
}

/* =====================================================
   BUTTONS
   ===================================================== */

.btn-primary {
  display: inline-block;
  padding: 14px 30px;
  background: var(--orange);
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  border-radius: 8px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.15s, transform 0.15s;
}
.btn-primary:hover { opacity: 0.92; transform: translateY(-1px); color: #fff; }

.btn-secondary {
  display: inline-block;
  padding: 12px 24px;
  background: transparent;
  color: var(--text);
  font-weight: 600;
  font-size: 15px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}
.btn-secondary:hover { background: var(--surface); border-color: var(--orange); color: var(--text); opacity: 1; }

/* =====================================================
   CARDS
   ===================================================== */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
.card:hover {
  background: var(--surface-hover);
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.card h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.35;
}
.card p { color: var(--text-mid); font-size: 14px; line-height: 1.55; }
.card .meta {
  font-size: 12px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.card-grid.cols-2 { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.card-grid.cols-3 { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

/* =====================================================
   FORMS
   ===================================================== */

.form {
  display: grid;
  gap: 16px;
  max-width: 560px;
}
.form-field { display: grid; gap: 6px; }
.form-field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-body);
}
.form-field input,
.form-field textarea {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  transition: border-color 0.15s, background 0.15s;
}
.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--orange);
  background: var(--surface-2);
}
.form-field textarea { resize: vertical; min-height: 120px; }

.form-note {
  font-size: 13px;
  color: var(--text-faint);
}

.form-success {
  background: rgba(74, 222, 128, 0.1);
  border: 1px solid rgba(74, 222, 128, 0.3);
  color: #a7f3d0;
  padding: 16px 18px;
  border-radius: 10px;
  font-size: 15px;
}

/* =====================================================
   FOOTER
   ===================================================== */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 40px;
  color: var(--text-faint);
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: auto;
}
.site-footer a { color: var(--text-faint); }
.site-footer a:hover { color: var(--text); }
.site-footer ul { list-style: none; display: flex; gap: 20px; flex-wrap: wrap; }

@media (max-width: 768px) {
  .site-footer { padding: 24px 20px; flex-direction: column; text-align: center; }
  .site-footer ul { justify-content: center; }
}

/* =====================================================
   HELPERS
   ===================================================== */

/* Reveal animations only activate if JS has marked the page ready.
   This prevents content from being hidden if JS fails or on static snapshots. */
html.js-reveal .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
html.js-reveal .reveal.visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  html.js-reveal .reveal { opacity: 1; transform: none; transition: none; }
}

.lock-overlay {
  position: relative;
}
.lock-overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(30,34,39,0.0) 0%, rgba(30,34,39,0.85) 100%);
  pointer-events: none;
  border-radius: 12px;
}
.lock-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--orange-dim);
  color: var(--orange);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 4px 10px;
  border-radius: 999px;
  z-index: 2;
}

.video-thumb {
  aspect-ratio: 16/10;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-faint);
  margin-bottom: 14px;
}
.video-thumb svg { width: 36px; height: 36px; }

.photo-placeholder {
  background: linear-gradient(135deg, #2a3036 0%, #303840 100%);
  border: 1px solid var(--border);
  border-radius: 16px;
  aspect-ratio: 4/5;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-faint);
  font-size: 14px;
  letter-spacing: 2px;
  text-transform: uppercase;
}
