/* ── BlackHaus University Global Stylesheet ──────────────── */

/* ── Design tokens ──────────────────────────────────────── */
:root {
  --bg:         #fafafa;
  --fg:         #1a1a1a;
  --card:       #ffffff;
  --navy:       #0f1823;
  --gold:       #d4af37;
  --gold-dk:    #b8960f;
  --border:     #e5e5e5;
  --muted:      #666666;
  --ff-serif:   'Playfair Display', Georgia, serif;
  --ff-body:    'Lato', system-ui, sans-serif;
  --radius:     12px;
  --radius-sm:  8px;
}

/* ── Reset & base ───────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
}
body {
  font-family: var(--ff-body);
  font-size: 16px;
  line-height: 1.6;
  background: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
}
img {
  display: block;
  max-width: 100%;
}
a {
  color: inherit;
  text-decoration: none;
}

/* ── Accessibility ──────────────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--gold);
  color: #1a1a1a;
  padding: .5rem 1rem;
  font-weight: 700;
  z-index: 999;
  border-radius: 0 0 8px 0;
  transition: top 0.2s;
}
.skip-link:focus {
  left: 0;
}

/* ── Utility ────────────────────────────────────────────── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.section {
  padding: 4rem 0;
}
.section-sm {
  padding: 2.5rem 0;
}
.divider {
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(212,175,55,.35), transparent);
}
.text-center {
  text-align: center;
}

/* ── Typography ─────────────────────────────────────────── */
.serif {
  font-family: var(--ff-serif);
}
.section-eyebrow {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--gold-dk);
  margin-bottom: .5rem;
}
.section-heading {
  font-family: var(--ff-serif);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 1rem;
}
.section-sub {
  font-size: 1rem;
  color: var(--muted);
  max-width: 40rem;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}

/* ── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem 1.75rem;
  border-radius: var(--radius-sm);
  font-family: var(--ff-body);
  font-weight: 700;
  font-size: .95rem;
  cursor: pointer;
  transition: all .2s;
  border: 2px solid transparent;
}
.btn-gold {
  background: var(--gold);
  color: #1a1a1a;
}
.btn-gold:hover {
  background: var(--gold-dk);
  box-shadow: 0 8px 24px rgba(212,175,55,.4);
  transform: translateY(-2px);
}
.btn-outline {
  background: transparent;
  border-color: rgba(26,26,26,.25);
  color: var(--fg);
}
.btn-outline:hover {
  border-color: var(--gold);
  color: var(--gold-dk);
}
.btn-ghost {
  background: transparent;
  border-color: rgba(255,255,255,.25);
  color: #fff;
}
.btn-ghost:hover {
  border-color: var(--gold);
  color: var(--gold);
}
.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.05rem;
  border-radius: var(--radius);
}
.btn-dark {
  background: #1a1a1a;
  color: var(--gold);
  border: 2px solid #1a1a1a;
  font-weight: 700;
  border-radius: var(--radius-sm);
}
.btn-dark:hover {
  background: #000;
  box-shadow: 0 8px 24px rgba(0,0,0,.3);
  transform: translateY(-2px);
}

/* ── Cards ──────────────────────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: all .25s;
}
.card:hover {
  border-color: rgba(212,175,55,.5);
  box-shadow: 0 8px 32px rgba(0,0,0,.08);
  transform: translateY(-3px);
}

/* ── Nav ────────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0,0,0,.07);
}
.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 64px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: .75rem;
}
.nav-logo img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 8px;
}
.nav-logo-name {
  font-family: var(--ff-serif);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--navy);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.nav-link {
  font-weight: 600;
  font-size: .9rem;
  color: var(--fg);
  position: relative;
  padding-bottom: 2px;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  width: 0;
  background: var(--gold);
  transition: width .25s;
}
.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}
.nav-link:hover, .nav-link.active {
  color: var(--gold-dk);
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: .75rem;
}
.nav-signin {
  font-weight: 600;
  font-size: .9rem;
  padding: .4rem .9rem;
  border-radius: var(--radius-sm);
  transition: all .2s;
}
.nav-signin:hover {
  color: var(--gold-dk);
  background: rgba(212,175,55,.1);
}
.mobile-btn {
  display: none;
  padding: .5rem;
  background: none;
  border: none;
  cursor: pointer;
}

/* ── Mobile menu ────────────────────────────────────────── */
.mobile-menu {
  display: none;
  padding: 1rem 0;
  border-top: 1px solid var(--border);
}
.mobile-menu.open {
  display: block;
}
.mobile-menu a {
  display: block;
  padding: .6rem .75rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: .95rem;
  transition: all .2s;
}
.mobile-menu a:hover, .mobile-menu a.active {
  color: var(--gold-dk);
  background: rgba(212,175,55,.08);
}
.mobile-menu-actions {
  display: flex;
  gap: .5rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.mobile-menu-actions a {
  flex: 1;
  text-align: center;
}

/* ── Hero section (default pages) ────────────────────────── */
.hero {
  background: var(--navy);
  color: #fff;
  padding: 5rem 0 4rem;
  position: relative;
  overflow: hidden;
  text-align: center;
}
.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(to right, transparent, var(--gold), transparent);
}
.hero h1 {
  font-family: var(--ff-serif);
  font-size: clamp(2.25rem, 5vw, 4rem);
  font-weight: 900;
  line-height: 1.1;
  max-width: 820px;
  margin: 0 auto 1.25rem;
}
.hero h1 em {
  font-style: normal;
  color: var(--gold);
}
.hero p {
  font-size: 1.1rem;
  color: rgba(255,255,255,.8);
  max-width: 640px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

/* ── Footer ─────────────────────────────────────────────── */
.footer {
  background: var(--navy);
  color: #fff;
  padding: 4rem 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}
.footer h4 {
  font-family: var(--ff-serif);
  font-weight: 700;
  margin-bottom: 1.25rem;
  font-size: .95rem;
}
.footer-links {
  display: flex;
  flex-direction: column;
  gap: .65rem;
}
.footer-links a {
  font-size: .875rem;
  color: rgba(255,255,255,.65);
  transition: all .25s;
}
.footer-links a:hover {
  color: var(--gold);
  padding-left: 4px;
}
.footer-brand p {
  font-size: .875rem;
  color: rgba(255,255,255,.6);
  line-height: 1.6;
  margin: .5rem 0 1.25rem;
}
.social-row {
  display: flex;
  gap: .6rem;
}
.social-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.1);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .3s;
}
.social-btn:hover {
  background: var(--gold);
  color: #1a1a1a;
  transform: scale(1.1);
}
.social-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.12);
  padding: 1.25rem 0;
  text-align: center;
  font-size: .8rem;
  color: rgba(255,255,255,.45);
}

/* ── Back to top button ─────────────────────────────────── */
#back-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 40;
  width: 44px;
  height: 44px;
  background: var(--gold);
  color: #1a1a1a;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  transition: all .25s;
  box-shadow: 0 4px 16px rgba(212,175,55,.4);
}
#back-top:hover {
  background: var(--gold-dk);
  transform: translateY(-2px);
}
#back-top.visible {
  display: flex;
}

/* ── Cookie consent banner ───────────────────────────────── */
.cookie-banner {
  position: fixed;
  bottom: 24px;
  right: 16px;
  z-index: 100;
  background: var(--navy);
  color: #fff;
  border: 1px solid rgba(212,175,55,.3);
  border-radius: var(--radius);
  padding: 1.5rem;
  max-width: 380px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
  transform: translateY(120%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.cookie-banner.show {
  transform: translateY(0);
}
.cookie-banner-text {
  font-size: 0.85rem;
  line-height: 1.5;
  color: rgba(255,255,255,0.8);
}
.cookie-banner-text a {
  color: var(--gold);
  text-decoration: underline;
}
.cookie-banner-text a:hover {
  color: var(--gold-dk);
}
.cookie-banner-actions {
  display: flex;
  gap: 0.75rem;
}
.cookie-banner-actions button {
  flex: 1;
  padding: 0.6rem;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}
.cookie-banner-accept {
  background: var(--gold);
  color: #1a1a1a;
}
.cookie-banner-accept:hover {
  background: var(--gold-dk);
}
.cookie-banner-decline {
  background: rgba(255,255,255,0.1);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.15) !important;
}
.cookie-banner-decline:hover {
  background: rgba(255,255,255,0.2);
}

/* ── Grid helpers ───────────────────────────────────────── */
.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
}
.grid-3col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

/* ── Media queries ──────────────────────────────────────── */
@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 680px) {
  .nav-links, .nav-actions {
    display: none;
  }
  .mobile-btn {
    display: block;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Legal pages layout ─────────────────────────────────── */
.legal-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 3rem;
  align-items: start;
}
.legal-sidebar {
  position: sticky;
  top: 5.5rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.legal-sidebar h3 {
  font-family: var(--ff-serif);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 1rem;
}
.legal-content {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 3rem;
}
.legal-container-sm {
  max-width: 800px;
  margin: 0 auto;
}

/* ── Legal Summary & Warning Banners ─────────────────────── */
.summary-card {
  background: linear-gradient(135deg, rgba(212,175,55,.08) 0%, #ffffff 100%);
  border: 1px solid rgba(212,175,55,.2);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius-sm);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2.5rem;
  display: flex;
  gap: 1rem;
  align-items: start;
}
.summary-card p {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.6;
}
.summary-card svg {
  color: var(--gold-dk);
  flex-shrink: 0;
  margin-top: 2px;
}

.warning-banner {
  background: #fdfaf2;
  border: 1px solid #faecc8;
  border-left: 4px solid #d97706;
  border-radius: var(--radius-sm);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2.5rem;
  display: flex;
  gap: 1rem;
  align-items: start;
}
.warning-banner p {
  font-size: 0.9rem;
  color: #92400e;
  line-height: 1.6;
}
.warning-banner svg {
  color: #d97706;
  flex-shrink: 0;
  margin-top: 2px;
}

/* ── Hero Badges ────────────────────────────────────────── */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.5rem;
}
.hero-badge-blue {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.25);
  color: #93c5fd;
}
.hero-badge-amber {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.25);
  color: #fde047;
}

/* ── Prose & legal typography ───────────────────────────── */
.prose section {
  margin-bottom: 2.5rem;
}
.prose section:last-child {
  margin-bottom: 0;
}
.prose h2 {
  font-family: var(--ff-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--navy);
  margin-top: 0;
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid rgba(212, 175, 55, 0.15);
}
.prose h3 {
  font-family: var(--ff-serif);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--fg);
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}
.prose p {
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}
.prose ul, .prose ol {
  color: var(--muted);
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
  font-size: 0.95rem;
}
.prose li {
  margin-bottom: 0.5rem;
}
.prose a {
  color: var(--gold-dk);
  font-weight: 600;
  text-decoration: underline;
}
.prose a:hover {
  color: var(--gold);
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}
.prose thead th {
  background: #f5f5f5;
  font-family: var(--ff-serif);
  font-weight: 700;
  color: var(--navy);
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 2px solid rgba(212, 175, 55, 0.25);
}
.prose tbody td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  line-height: 1.6;
  vertical-align: top;
}
.prose tbody tr:hover {
  background: rgba(212, 175, 55, 0.04);
}
.caps-block {
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem;
  margin-bottom: 1rem;
}

/* ── Cross links bottom navigation ───────────────────────── */
.cross-links {
  margin-top: 3rem;
  text-align: center;
}
.cross-links p {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 1rem;
}
.cross-links-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

/* Responsive legal layout */
@media (max-width: 900px) {
  .legal-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .legal-sidebar {
    position: static;
  }
}

/* ── TOC links ──────────────────────────────────────────── */
.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.toc-list li {
  margin: 0;
  padding: 0;
}
.toc-link {
  font-family: var(--ff-body);
  font-size: 0.85rem;
  color: var(--muted);
  transition: color 0.2s, transform 0.2s;
  display: block;
  padding: 0.35rem 0;
  line-height: 1.4;
}
.toc-link:hover {
  color: var(--gold-dk);
  transform: translateX(3px);
}
.toc-link.active {
  color: var(--gold);
  font-weight: 700;
}


