/* ═══════════════════════════════════════════════════════════
   ZENTRA — Main Design System
   Imports: Inter, Outfit, Bebas Neue from Google Fonts
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Inter:wght@300;400;500;600;700&family=Outfit:wght@300;400;500;600;700;800&display=swap');

/* ── CSS Variables — Dark Theme (default) ──────────────────── */
:root,
[data-theme='dark'] {
  --bg:           #0B0B0B;
  --surface:      #111111;
  --surface-2:    #181818;
  --surface-3:    #212121;
  --surface-4:    #2A2A2A;

  --text:         #F0EBE1;
  --text-2:       #C0B8AD;
  --text-muted:   #7A7A7A;

  --accent:       #C8A96E;
  --accent-2:     #D4B87A;
  --accent-dark:  #A88950;
  --accent-glow:  rgba(200, 169, 110, 0.12);
  --accent-glow2: rgba(200, 169, 110, 0.06);

  --border:       rgba(255, 255, 255, 0.07);
  --border-2:     rgba(255, 255, 255, 0.12);
  --border-accent: rgba(200, 169, 110, 0.35);

  --success:      #22C55E;
  --success-bg:   rgba(34, 197, 94, 0.1);
  --error:        #EF4444;
  --error-bg:     rgba(239, 68, 68, 0.1);
  --warning:      #F59E0B;
  --warning-bg:   rgba(245, 158, 11, 0.1);
  --info:         #3B82F6;

  --overlay:      rgba(0, 0, 0, 0.88);
  --nav-bg:       rgba(11, 11, 11, 0.85);

  --shadow-sm:    0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow:       0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-lg:    0 24px 64px rgba(0, 0, 0, 0.6);
  --shadow-accent: 0 8px 32px rgba(200, 169, 110, 0.2);

  --radius-sm:    6px;
  --radius:       10px;
  --radius-lg:    16px;
  --radius-xl:    24px;
  --radius-full:  9999px;

  --transition:   0.25s ease;
  --transition-slow: 0.4s ease;
}

/* ── CSS Variables — Light Theme ───────────────────────────── */
[data-theme='light'] {
  --bg:           #F0EBE1;
  --surface:      #FDFAF5;
  --surface-2:    #F5F0E6;
  --surface-3:    #EDE6D8;
  --surface-4:    #E4DCC8;

  --text:         #0A0A0A;
  --text-2:       #3A3A3A;
  --text-muted:   #6B6B6B;

  --accent:       #8B6E35;
  --accent-2:     #7A5F28;
  --accent-dark:  #5E4A1E;
  --accent-glow:  rgba(139, 110, 53, 0.1);
  --accent-glow2: rgba(139, 110, 53, 0.05);

  --border:       rgba(0, 0, 0, 0.08);
  --border-2:     rgba(0, 0, 0, 0.14);
  --border-accent: rgba(139, 110, 53, 0.3);

  --success:      #16A34A;
  --success-bg:   rgba(22, 163, 74, 0.1);
  --error:        #DC2626;
  --error-bg:     rgba(220, 38, 38, 0.1);
  --warning:      #D97706;
  --warning-bg:   rgba(217, 119, 6, 0.1);
  --info:         #2563EB;

  --overlay:      rgba(10, 10, 10, 0.6);
  --nav-bg:       rgba(240, 235, 225, 0.88);

  --shadow-sm:    0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow:       0 8px 32px rgba(0, 0, 0, 0.12);
  --shadow-lg:    0 24px 64px rgba(0, 0, 0, 0.16);
  --shadow-accent: 0 8px 32px rgba(139, 110, 53, 0.15);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
  transition: background-color var(--transition-slow), color var(--transition-slow);
  overflow-x: hidden;
  min-height: 100vh;
}

img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
input, textarea, select { font-family: inherit; }

/* ── Typography ────────────────────────────────────────────── */
.font-display { font-family: 'Bebas Neue', sans-serif; }
.font-outfit  { font-family: 'Outfit', sans-serif; }
.font-inter   { font-family: 'Inter', sans-serif; }

h1, h2, h3 { line-height: 1.1; }
h4, h5, h6 { line-height: 1.3; }

.display-1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(5rem, 14vw, 14rem);
  letter-spacing: -0.02em;
  line-height: 0.9;
}
.display-2 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(3rem, 7vw, 7rem);
  letter-spacing: 0.01em;
  line-height: 0.95;
}
.heading-1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2.5rem, 5vw, 5rem);
  letter-spacing: 0.02em;
}
.heading-2 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2rem, 4vw, 4rem);
  letter-spacing: 0.03em;
}
.heading-3 {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  font-weight: 600;
}

.text-sm    { font-size: 0.8125rem; }
.text-base  { font-size: 1rem; }
.text-lg    { font-size: 1.125rem; }
.text-xl    { font-size: 1.25rem; }
.text-2xl   { font-size: 1.5rem; }

.text-accent   { color: var(--accent); }
.text-muted    { color: var(--text-muted); }
.text-2        { color: var(--text-2); }
.text-success  { color: var(--success); }
.text-error    { color: var(--error); }

.weight-300  { font-weight: 300; }
.weight-400  { font-weight: 400; }
.weight-500  { font-weight: 500; }
.weight-600  { font-weight: 600; }
.weight-700  { font-weight: 700; }

/* ── Layout ─────────────────────────────────────────────────── */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container-sm { max-width: 860px; }
.container-lg { max-width: 1440px; }

.section {
  padding: 6rem 0;
}
.section-sm {
  padding: 4rem 0;
}

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }

.flex         { display: flex; }
.flex-center  { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-col     { display: flex; flex-direction: column; }
.gap-1  { gap: 0.25rem; }
.gap-2  { gap: 0.5rem; }
.gap-3  { gap: 0.75rem; }
.gap-4  { gap: 1rem; }
.gap-6  { gap: 1.5rem; }
.gap-8  { gap: 2rem; }

/* ── Section Headers ─────────────────────────────────────────── */
.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.section-label::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 2px;
  background: var(--accent);
  flex-shrink: 0;
}

.section-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2.5rem, 5vw, 4rem);
  letter-spacing: 0.02em;
  line-height: 1;
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 520px;
  line-height: 1.7;
}

.section-header {
  margin-bottom: 3rem;
}
.section-header.centered {
  text-align: center;
}
.section-header.centered .section-label {
  justify-content: center;
}
.section-header.centered .section-label::before {
  display: none;
}
.section-header.centered .section-subtitle {
  margin: 0 auto;
}

/* ── Divider ─────────────────────────────────────────────────── */
.divider {
  height: 1px;
  background: var(--border);
  margin: 2rem 0;
}

/* ── Navigation ─────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: 72px;
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition-slow), border-color var(--transition-slow);
}

.navbar.scrolled {
  border-bottom-color: var(--border-2);
  box-shadow: 0 4px 24px rgba(0,0,0,0.3);
}

.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
  gap: 2rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  flex-shrink: 0;
}

/* ── Logo Image ─────────────────────────────────────────────── */
.nav-logo-img {
  height: 48px;
  width: auto;
  display: block;
  object-fit: contain;
  max-width: 180px;
  border-radius: 0;
  transition: filter var(--transition), transform var(--transition);
}

/* Dark mode → white logo */
[data-theme='dark'] .nav-logo-img {
  filter: brightness(0) invert(1);
}

/* Light mode → black logo */
[data-theme='light'] .nav-logo-img {
  filter: brightness(0);
}

/* Hover — slight dim on both themes */
.nav-logo:hover .nav-logo-img {
  opacity: 0.75;
  transform: scale(1.03);
}

.auth-logo-img {
  height: 72px;
  width: auto;
  display: block;
  margin: 0 auto;
  object-fit: contain;
  max-width: 220px;
  transition: filter var(--transition);
}

[data-theme='dark']  .auth-logo-img { filter: brightness(0) invert(1); }
[data-theme='light'] .auth-logo-img { filter: brightness(0); }

.nav-logo-text {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.8rem;
  letter-spacing: 0.12em;
  color: var(--accent);
  line-height: 1;
}

.nav-logo-sub {
  font-size: 0.6rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: block;
  margin-top: -2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  justify-content: center;
}

.nav-link {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: var(--radius-full);
  transition: color var(--transition), background var(--transition);
  letter-spacing: 0.03em;
  position: relative;
}

.nav-link:hover {
  color: var(--text);
  background: var(--surface-2);
}

.nav-link.active {
  color: var(--accent);
  background: var(--accent-glow);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

/* ── Theme Toggle ────────────────────────────────────────────── */
.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
  font-size: 1.1rem;
  color: var(--text-muted);
}

.theme-toggle:hover {
  background: var(--accent-glow);
  border-color: var(--border-accent);
  color: var(--accent);
}

/* ── User Badge in Nav ────────────────────────────────────────── */
.nav-user-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
  transition: all var(--transition);
}
.nav-user-btn:hover {
  border-color: var(--border-accent);
  color: var(--accent);
}

.nav-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent-glow);
  border: 1px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  flex-shrink: 0;
}

/* Dropdown */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 180px;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  padding: 0.5rem;
  box-shadow: var(--shadow);
  display: none;
  z-index: 100;
}

.nav-dropdown.open .nav-dropdown-menu {
  display: block;
  animation: fadeDown 0.2s ease;
}

.nav-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: var(--text-2);
  cursor: pointer;
  transition: all var(--transition);
  width: 100%;
}
.nav-dropdown-item:hover {
  background: var(--surface-3);
  color: var(--text);
}
.nav-dropdown-item.danger {
  color: var(--error);
}
.nav-dropdown-item.danger:hover {
  background: var(--error-bg);
}

.nav-dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 0.3rem 0;
}

/* ── Mobile Nav ──────────────────────────────────────────────── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.nav-hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  display: none;
  position: fixed;
  top: 72px;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 1.5rem;
  z-index: 999;
  flex-direction: column;
  gap: 0.5rem;
}

.mobile-menu.open {
  display: flex;
  animation: fadeDown 0.3s ease;
}

.mobile-nav-link {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-2);
  transition: all var(--transition);
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
  background: var(--accent-glow);
  color: var(--accent);
}

/* ── Footer ──────────────────────────────────────────────────── */
footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 4rem 0 2rem;
  margin-top: auto;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.5rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: 0.5rem;
}

.footer-tagline {
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.2rem;
}

.footer-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.footer-contact a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  transition: color var(--transition);
}
.footer-contact a:hover { color: var(--accent); }

.footer-heading {
  font-family: 'Outfit', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.2rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-link {
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color var(--transition);
}
.footer-link:hover { color: var(--accent); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-socials {
  display: flex;
  gap: 0.5rem;
}

.social-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: all var(--transition);
}
.social-icon:hover {
  background: var(--accent-glow);
  border-color: var(--border-accent);
  color: var(--accent);
  transform: translateY(-2px);
}

/* ── Page Hero (inner pages) ─────────────────────────────────── */
.page-hero {
  padding: 9rem 0 4rem;
  text-align: center;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 60% at 50% 0%, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}

/* ── Empty State ──────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
}

.empty-state-icon {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  display: block;
  opacity: 0.5;
}

.empty-state-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.empty-state-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

/* ── Scrollbar ────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--surface-4); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-dark); }

/* ── Selection ────────────────────────────────────────────────── */
::selection { background: rgba(200, 169, 110, 0.25); color: var(--text); }

/* ── Utilities ────────────────────────────────────────────────── */
.hidden   { display: none !important; }
.sr-only  { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.w-full   { width: 100%; }
.h-full   { height: 100%; }
.relative { position: relative; }
.absolute { position: absolute; }
.overflow-hidden { overflow: hidden; }
.text-center { text-align: center; }
.text-left   { text-align: left; }
.text-right  { text-align: right; }
.mt-1  { margin-top: 0.25rem; }
.mt-2  { margin-top: 0.5rem; }
.mt-3  { margin-top: 0.75rem; }
.mt-4  { margin-top: 1rem; }
.mt-6  { margin-top: 1.5rem; }
.mt-8  { margin-top: 2rem; }
.mb-1  { margin-bottom: 0.25rem; }
.mb-2  { margin-bottom: 0.5rem; }
.mb-4  { margin-bottom: 1rem; }
.mb-6  { margin-bottom: 1.5rem; }
.mb-8  { margin-bottom: 2rem; }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .section { padding: 4rem 0; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .container { padding: 0 1rem; }
  .grid-4 { grid-template-columns: 1fr; }
  .section { padding: 3rem 0; }
  .nav-logo-img { height: 36px; }
}

/* ── 320px Micro-mobile ──────────────────────────────────────── */
@media (max-width: 375px) {
  /* Reset container padding to tightest possible */
  .container { padding: 0 0.75rem; }

  /* Navbar — shrink to avoid overflow */
  .navbar { height: 60px; }
  .nav-inner { padding: 0 0.75rem; gap: 0.5rem; }
  .nav-logo-img { height: 32px; max-width: 120px; }
  .mobile-menu { top: 60px; padding: 1rem 0.75rem; }
  .mobile-nav-link { font-size: 0.9rem; padding: 0.65rem 0.75rem; }

  /* Sections */
  .section { padding: 2.5rem 0; }
  .section-title { font-size: clamp(1.75rem, 10vw, 2.5rem); }
  .section-subtitle { font-size: 0.9rem; }
  .section-header { margin-bottom: 2rem; }

  /* Grids collapse fully */
  .grid-2,
  .grid-3,
  .grid-4 { grid-template-columns: 1fr !important; gap: 0.75rem; }

  /* Buttons — slightly smaller on very small screens */
  .btn     { padding: 0.65rem 1.25rem; font-size: 0.82rem; }
  .btn-lg  { padding: 0.85rem 1.5rem;  font-size: 0.9rem; }
  .btn-xl  { padding: 0.9rem 1.5rem;   font-size: 0.9rem; }

  /* Footer grid */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .footer-brand-name { font-size: 1.75rem; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 0.75rem; }

  /* Page hero (inner pages) */
  .page-hero { padding: 7rem 0 2.5rem; }
  .page-hero .section-title { font-size: clamp(2rem, 12vw, 3.5rem); }

  /* Forms */
  .form-input,
  .form-select,
  .form-textarea { font-size: 0.875rem; padding: 0.65rem 0.875rem; }
  .form-label { font-size: 0.78rem; }

  /* Auth card */
  .auth-card { padding: 1.25rem 1rem; }
  .auth-logo-img { height: 52px; }

  /* Panels */
  .panel-content { padding: 1.25rem 0.75rem; }

  /* Stats bar gap */
  .stats-bar-inner { gap: 1.25rem; }

  /* Scroll row card width */
  .scroll-row > * { width: 185px; }
}

