/* ============================================================
   NewPal Theme — Global Stylesheet
   Theme: Consistent #541342
   ============================================================ */

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

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

:root {
  /* Core Colors */
  --brand: #541342;
  --brand-light: #7a1d5e;
  --brand-dark: #3a0d2e;
  --brand-muted: rgba(84, 19, 66, 0.7);
  --brand-glass: rgba(84, 19, 66, 0.05);
  --brand-glass-hover: rgba(84, 19, 66, 0.1);
  --brand-glow: rgba(84, 19, 66, 0.25);
  
  /* Background & Surface */
  --bg-color: #faf8f9;
  --surface: #ffffff;
  --surface-glass: rgba(255, 255, 255, 0.85);
  
  /* Text */
  --text-main: #1a0614;
  --text-muted: #4a3843;
  
  /* UI Elements */
  --shadow-sm: 0 4px 16px rgba(84, 19, 66, 0.08);
  --shadow-md: 0 8px 32px rgba(84, 19, 66, 0.12);
  --shadow-lg: 0 16px 48px rgba(84, 19, 66, 0.15);
  
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 32px;
  --radius-full: 999px;
  
  --transition: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: 0.2s ease;
  
  --font-body: 'Outfit', system-ui, sans-serif;

  /* Required Consistent CSS Variables */
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 2.5rem;
  --font-size-4xl: 4rem;

  --font-weight-light: 300;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-extrabold: 800;

  --button-primary-bg: var(--brand);
  --button-primary-hover: var(--brand-light);
  --button-primary-text: var(--surface);

  --button-secondary-bg: var(--brand-glass);
  --button-secondary-hover: var(--brand-glass-hover);
  --button-secondary-text: var(--brand);
  --button-secondary-border: var(--brand-glow);
}

/* ── Base ── */
html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg-color);
  color: var(--text-main);
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── Layout ── */
.page-wrap {
  position: relative;
  z-index: 1;
  padding-top: 80px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.page-wrap > .section {
  flex: 1;
}

.home-wrap { /* legacy alias for home */
  position: relative;
  z-index: 1;
  padding-top: 80px;
}

/* ── Background Mesh ── */
.background-mesh {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.mesh-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.5;
  animation: float 20s ease-in-out infinite;
}
.orb-1 {
  width: 600px;
  height: 600px;
  background: var(--brand-glow);
  top: -100px;
  left: -200px;
}
.orb-2 {
  width: 500px;
  height: 500px;
  background: rgba(122, 29, 94, 0.2);
  bottom: 10%;
  right: -100px;
  animation-delay: -5s;
}
.orb-3 {
  width: 400px;
  height: 400px;
  background: rgba(84, 19, 66, 0.15);
  top: 40%;
  left: 40%;
  animation-delay: -10s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -50px) scale(1.1); }
  66% { transform: translate(-20px, 30px) scale(0.9); }
}

/* ── Particles ── */
.particles {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.particle {
  position: absolute;
  border-radius: 50%;
  background: var(--brand);
  animation: particleDrift linear infinite;
}
@keyframes particleDrift {
  0% { transform: translateY(110vh) rotate(0deg); opacity: 0; }
  10% { opacity: 0.5; }
  90% { opacity: 0.5; }
  100% { transform: translateY(-10vh) rotate(360deg); opacity: 0; }
}

/* ── Navigation ── */
.home-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 80px;
  z-index: 100;
  transition: all var(--transition);
  border-bottom: 1px solid transparent;
}
.home-nav.scrolled {
  background: var(--surface-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--brand-glass);
  box-shadow: var(--shadow-sm);
  height: 70px;
}

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

.nav-logo-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--brand);
}
.logo-box {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px var(--brand-glow);
}
.logo-box img {
  width: 24px;
  height: 24px;
  filter: brightness(0) invert(1);
}
.logo-text {
  font-family: Georgia, serif;
  font-size: 1.5rem;
  font-weight: var(--font-weight-extrabold);
  letter-spacing: -0.5px;
}

.nav-links-list {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  list-style: none;
  margin-left: 3rem;
  margin-right: auto;
}
.nav-links-list a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: var(--font-weight-medium);
  font-size: var(--font-size-sm);
  transition: color var(--transition-fast);
}
.nav-links-list a:hover {
  color: var(--brand);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

#navAuthContainer,
#mobileAuthContainer {
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast) ease-in-out;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.5rem;
  border-radius: var(--radius-full);
  font-weight: var(--font-weight-bold);
  text-decoration: none;
  transition: all var(--transition);
  border: 1.5px solid transparent;
  font-family: var(--font-body);
  cursor: pointer;
  white-space: nowrap;
  font-size: var(--font-size-sm);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--button-primary-bg);
  color: var(--button-primary-text) !important;
  border-color: var(--button-primary-bg);
  box-shadow: 0 4px 16px var(--brand-glow);
}
.btn-primary:hover:not(:disabled) {
  background: var(--surface);
  color: var(--button-primary-bg) !important;
  border-color: var(--button-primary-bg);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--brand-glow);
}

.btn-secondary {
  background: var(--button-secondary-bg);
  color: var(--button-secondary-text) !important;
  border-color: var(--button-secondary-border);
}
.btn-secondary:hover:not(:disabled) {
  background: var(--brand-glass-hover);
  border-color: var(--brand);
  transform: translateY(-2px);
}

.nav-cta,
.nav-auth-btn {
  background: var(--brand);
  color: var(--surface) !important;
  padding: 0.6rem 1.5rem;
  border-radius: var(--radius-full);
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-sm);
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(84, 19, 66, 0.15);
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--brand);
  white-space: nowrap;
  cursor: pointer;
}
.nav-cta:hover,
.nav-auth-btn:hover {
  background: var(--surface);
  color: var(--brand) !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--brand-glow);
}

.nav-auth-btn.mobile-block {
  display: flex;
  width: 100%;
  padding: 0.75rem 1.5rem;
}

.home-mobile-btn {
  display: none;
  background: none;
  border: none;
  color: var(--brand);
  cursor: pointer;
}
.home-mobile-menu {
  display: none;
  position: fixed;
  top: 70px;
  left: 0;
  right: 0;
  background: var(--surface-glass);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--brand-glass);
  z-index: 99;
  padding: 1rem 2rem 2rem;
  box-shadow: var(--shadow-md);
}
.home-mobile-menu.open {
  display: block;
  animation: slideDown 0.3s ease;
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}
.mobile-menu-inner {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.mobile-menu-inner a {
  color: var(--text-main);
  text-decoration: none;
  font-weight: 500;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast);
}
.mobile-menu-inner a:hover {
  background: var(--brand-glass);
  color: var(--brand);
}
.mobile-nav-cta {
  background: var(--brand);
  color: var(--surface) !important;
  text-align: center;
  margin-top: 1rem;
}

/* ── Sections ── */
.section {
  padding: 6rem 2rem;
  max-width: 1280px;
  margin: 0 auto;
}
.section-header {
  text-align: center;
  margin-bottom: 4rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}
.eyebrow {
  display: inline-block;
  color: var(--brand);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.8rem;
  margin-bottom: 1rem;
  padding: 0.4rem 1rem;
  background: var(--brand-glass);
  border-radius: var(--radius-full);
}
.section-title {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 1rem;
  letter-spacing: -0.5px;
}
.section-desc {
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ── Footer ── */
.home-footer {
  background: var(--brand);
  color: rgba(255,255,255,0.8);
  padding: 5rem 2rem 2rem;
  margin-top: auto; /* For flex layout pages */
}
.footer-container {
  max-width: 1280px;
  margin: 0 auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 4rem;
  margin-bottom: 4rem;
}
.footer-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--surface);
  text-decoration: none;
  font-family: Georgia, serif;
  font-size: 1.5rem;
  font-weight: var(--font-weight-extrabold);
  margin-bottom: 1rem;
}
.footer-logo img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  filter: brightness(0) invert(1);
}
.footer-links h4 {
  color: var(--surface);
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}
.footer-links a {
  display: block;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  margin-bottom: 0.8rem;
  transition: color var(--transition-fast);
}
.footer-links a:hover {
  color: var(--surface);
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 2rem;
  text-align: center;
  font-size: 0.9rem;
}

/* ── Scroll Reveal ── */
.reveal-up {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-up.visible {
  opacity: 1;
  transform: translateY(0);
}

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

@media (max-width: 768px) {
  .nav-links-list { display: none; }
  .home-mobile-btn { display: block; }
}

@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}
