/* ═══════════════════════════════════════════
   CROWN ROLEPLAY — Main Stylesheet
   ═══════════════════════════════════════════ */

/* ── CSS VARIABLES ── */
:root {
  --bg-primary:    #0a0a0f;
  --bg-secondary:  #111118;
  --bg-card:       #16161f;
  --bg-card-hover: #1c1c28;

  --gold-primary:  #c9a84c;
  --gold-light:    #e2cc7a;
  --gold-dark:     #8b7230;
  --gold-glow:     rgba(201, 168, 76, 0.25);

  --text-primary:  #e8e6e1;
  --text-secondary:#9a9890;
  --text-muted:    #5e5d58;

  --border:        rgba(201, 168, 76, 0.12);
  --border-hover:  rgba(201, 168, 76, 0.3);

  --font-display:  'Cinzel', serif;
  --font-body:     'Raleway', sans-serif;
  --font-mono:     'JetBrains Mono', monospace;

  --container:     1200px;
  --container-narrow: 820px;
  --radius:        8px;
  --transition:    0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}


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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--text-primary);
  background: var(--bg-primary);
  line-height: 1.7;
  overflow-x: hidden;
}

a { color: var(--gold-primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--gold-light); }

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

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--bg-card);
  padding: 0.15em 0.5em;
  border-radius: 4px;
  border: 1px solid var(--border);
}


/* ── UTILITIES ── */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 2rem;
}
.container-narrow {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 2rem;
}
.center { text-align: center; }


/* ── SECTION HEADINGS ── */
.section-label {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold-primary);
  margin-bottom: 0.5rem;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2.5rem;
  line-height: 1.2;
}


/* ══════════════════════════════════════════
   HEADER / NAV
   ══════════════════════════════════════════ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

/* Logo */
.logo {
  display: flex; align-items: center; gap: 0.75rem;
}
.logo-img {
  width: 40px; height: 40px;
  object-fit: contain;
}
.logo-text {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--gold-primary);
  letter-spacing: 0.15em;
}

/* Desktop Nav */
.desktop-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.nav-link {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  transition: color var(--transition), background var(--transition);
  background: none;
  border: none;
  cursor: pointer;
  display: flex; align-items: center; gap: 0.4rem;
}
.nav-link:hover { color: var(--gold-primary); background: rgba(201, 168, 76, 0.06); }

/* Dropdowns */
.nav-dropdown { position: relative; }
.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  min-width: 200px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.5rem 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
  box-shadow: 0 16px 48px rgba(0,0,0,0.5);
}
.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu {
  opacity: 1; visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.dropdown-item {
  display: block;
  padding: 0.6rem 1.2rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: background var(--transition), color var(--transition);
}
.dropdown-item:hover {
  background: rgba(201, 168, 76, 0.08);
  color: var(--gold-primary);
}
.chevron { transition: transform 0.2s; }
.nav-dropdown:hover .chevron { transform: rotate(180deg); }

/* Connect Button */
.btn-connect {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 0.55rem 1.4rem;
  background: transparent;
  color: var(--gold-primary);
  border: 1px solid var(--gold-primary);
  border-radius: 100px;
  transition: all var(--transition);
}
.btn-connect:hover {
  background: var(--gold-primary);
  color: var(--bg-primary);
}

/* Mobile Toggle */
.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.mobile-toggle span {
  display: block;
  width: 24px; height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s;
}
.mobile-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mobile-toggle.active span:nth-child(2) { opacity: 0; }
.mobile-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile Nav */
.mobile-nav {
  display: none;
  padding: 1rem 2rem 2rem;
  border-top: 1px solid var(--border);
}
.mobile-nav.open { display: block; }
.mobile-nav-link, .mobile-dropdown-toggle {
  display: block;
  width: 100%;
  text-align: left;
  font-size: 0.95rem;
  color: var(--text-secondary);
  padding: 0.8rem 0;
  border: none;
  background: none;
  cursor: pointer;
  font-family: var(--font-body);
  border-bottom: 1px solid var(--border);
  transition: color var(--transition);
}
.mobile-nav-link:hover, .mobile-dropdown-toggle:hover { color: var(--gold-primary); }
.mobile-dropdown-toggle {
  display: flex; justify-content: space-between; align-items: center;
}
.mobile-dropdown-menu {
  display: none;
  padding-left: 1rem;
}
.mobile-dropdown-menu.open { display: block; }
.mobile-dropdown-item {
  display: block;
  font-size: 0.88rem;
  color: var(--text-muted);
  padding: 0.5rem 0;
}
.mobile-dropdown-item:hover { color: var(--gold-primary); }
.mobile-connect {
  margin-top: 1rem;
  display: inline-block;
}


/* ══════════════════════════════════════════
   HERO
   ══════════════════════════════════════════ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(201, 168, 76, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 80%, rgba(201, 168, 76, 0.04) 0%, transparent 50%),
    var(--bg-primary);
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('/images/hero-bg.jpg') center/cover no-repeat;
  opacity: 0.15;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10,10,15,0.4) 0%, rgba(10,10,15,0.95) 100%);
}
.hero-content {
  position: relative;
  z-index: 2;
  padding: 2rem;
}
.hero-badge {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold-primary);
  border: 1px solid var(--gold-dark);
  padding: 0.4rem 1.2rem;
  border-radius: 100px;
  margin-bottom: 2rem;
  animation: fadeUp 0.8s ease both;
}
.hero-title {
  font-family: var(--font-display);
  margin-bottom: 1.5rem;
  animation: fadeUp 0.8s 0.15s ease both;
}
.hero-title-line {
  display: block;
  font-size: clamp(3.5rem, 10vw, 7rem);
  font-weight: 900;
  line-height: 1;
  background: linear-gradient(180deg, var(--gold-light) 0%, var(--gold-dark) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
  filter: drop-shadow(0 0 40px var(--gold-glow));
}
.hero-title-sub {
  display: block;
  font-size: clamp(1rem, 3vw, 1.6rem);
  font-weight: 400;
  letter-spacing: 0.5em;
  color: var(--text-secondary);
  margin-top: 0.3rem;
}
.hero-desc {
  max-width: 540px;
  margin: 0 auto 2rem;
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.8;
  animation: fadeUp 0.8s 0.3s ease both;
}
.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2rem;
  animation: fadeUp 0.8s 0.45s ease both;
}
.hero-server-ip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  animation: fadeUp 0.8s 0.6s ease both;
}
.hero-server-ip code {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.copy-btn {
  background: none; border: none; cursor: pointer;
  color: var(--text-muted);
  transition: color var(--transition);
  padding: 4px;
}
.copy-btn:hover { color: var(--gold-primary); }


/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.75rem 1.8rem;
  border-radius: 100px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
}
.btn-primary {
  background: var(--gold-primary);
  color: var(--bg-primary);
  border-color: var(--gold-primary);
}
.btn-primary:hover {
  background: var(--gold-light);
  color: var(--bg-primary);
  box-shadow: 0 4px 24px var(--gold-glow);
}
.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border-color: rgba(255,255,255,0.2);
}
.btn-outline:hover {
  border-color: var(--gold-primary);
  color: var(--gold-primary);
}
.btn-lg { padding: 0.9rem 2.2rem; font-size: 0.9rem; }


/* ══════════════════════════════════════════
   SECTIONS
   ══════════════════════════════════════════ */
.section {
  padding: 6rem 0;
}


/* ── ABOUT ── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 4rem;
  align-items: center;
}
.about-image {
  position: relative;
}
.about-image img {
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.about-image-border {
  position: absolute;
  top: 1rem; left: 1rem;
  right: -1rem; bottom: -1rem;
  border: 1px solid var(--gold-dark);
  border-radius: var(--radius);
  z-index: -1;
  opacity: 0.5;
}
.about-text p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  font-size: 0.95rem;
}
.about-stats {
  display: flex;
  gap: 2.5rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.stat-number {
  display: block;
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--gold-primary);
}
.stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}


/* ── FEATURES ── */
.features {
  background: var(--bg-secondary);
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: border-color var(--transition), transform var(--transition);
}
.feature-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}
.feature-icon {
  width: 52px; height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(201, 168, 76, 0.08);
  border-radius: var(--radius);
  margin-bottom: 1.2rem;
  color: var(--gold-primary);
}
.feature-card h4 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
}
.feature-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
}


/* ── DEPARTMENTS ── */
.dept-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.dept-card {
  position: relative;
  height: 300px;
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  transition: transform var(--transition);
}
.dept-card:hover { transform: translateY(-4px); }
.dept-card-bg {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.6s ease;
}
.dept-card:hover .dept-card-bg { transform: scale(1.05); }
.dept-card-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(10,10,15,0.9) 0%, rgba(10,10,15,0.2) 60%);
}
.dept-card-content {
  position: relative; z-index: 1;
  padding: 1.5rem;
}
.dept-card-content h4 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--gold-primary);
  margin-bottom: 0.25rem;
}
.dept-card-content p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}


/* ── CTA ── */
.cta {
  text-align: center;
  background:
    radial-gradient(ellipse at center, rgba(201, 168, 76, 0.06) 0%, transparent 70%),
    var(--bg-primary);
}
.cta-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  margin-bottom: 1rem;
}
.cta-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}
.cta-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}


/* ══════════════════════════════════════════
   PAGE HERO (inner pages)
   ══════════════════════════════════════════ */
.page-hero {
  position: relative;
  padding: 10rem 2rem 4rem;
  text-align: center;
  background:
    radial-gradient(ellipse at center top, rgba(201, 168, 76, 0.08) 0%, transparent 60%),
    var(--bg-secondary);
}
.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  color: var(--text-primary);
}
.page-subtitle {
  margin-top: 0.8rem;
  font-size: 1.05rem;
  color: var(--text-secondary);
}

.page-content h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin: 2.5rem 0 1rem;
  color: var(--gold-primary);
}
.page-content h3 {
  font-size: 1.2rem;
  margin: 2rem 0 0.8rem;
}
.page-content p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}
.page-content ul, .page-content ol {
  margin: 1rem 0 1rem 1.5rem;
  color: var(--text-secondary);
}
.page-content li { margin-bottom: 0.4rem; }

/* Page list (for section pages) */
.page-list { margin-top: 2rem; }
.page-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  transition: border-color var(--transition), transform var(--transition);
}
.page-list-item:hover {
  border-color: var(--border-hover);
  transform: translateX(4px);
}
.page-list-item h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
}
.page-list-item p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0.2rem 0 0;
}
.page-list-arrow {
  font-size: 1.2rem;
  color: var(--gold-primary);
}


/* ══════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════ */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 4rem 0 0;
}
.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  gap: 3rem;
  flex-wrap: wrap;
}
.footer-logo {
  width: 48px; height: 48px;
  margin-bottom: 0.8rem;
  opacity: 0.7;
}
.footer-tagline {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-style: italic;
}
.footer-links {
  display: flex;
  gap: 4rem;
}
.footer-col h4 {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gold-primary);
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}
.footer-col a {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  transition: color var(--transition);
}
.footer-col a:hover { color: var(--gold-primary); }

.footer-bottom {
  max-width: var(--container);
  margin: 3rem auto 0;
  padding: 1.5rem 2rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-bottom p {
  font-size: 0.78rem;
  color: var(--text-muted);
}
.footer-server-ip code {
  color: var(--text-muted);
  font-size: 0.78rem;
}


/* ══════════════════════════════════════════
   ANIMATIONS
   ══════════════════════════════════════════ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}


/* ══════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════ */
@media (max-width: 1024px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; gap: 2rem; }
}

@media (max-width: 768px) {
  .desktop-nav, .header-inner > .btn-connect { display: none; }
  .mobile-toggle { display: flex; }

  .features-grid,
  .dept-grid { grid-template-columns: 1fr; }

  .about-stats {
    flex-wrap: wrap;
    gap: 1.5rem;
  }

  .footer-inner {
    flex-direction: column;
  }
  .footer-links {
    flex-direction: column;
    gap: 2rem;
  }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .hero-title-line {
    font-size: clamp(2.5rem, 12vw, 5rem);
  }
}
