/*
  BouyaLabs creator shell CSS.
  Extracted on 2026-05-25 to let livre-v2 keep the shared base/header/nav
  without downloading the full homepage stylesheet.
*/

/* ===========================================
   1. CSS CUSTOM PROPERTIES (Variables)
   =========================================== */
:root {
  /* ===== Color Palette ===== */
  /* Primary - Warm Gold */
  --color-primary: #D4A853;
  --color-primary-light: #E8C97D;
  --color-primary-dark: #B8923F;
  --color-primary-50: rgba(212, 168, 83, 0.1);
  --color-primary-100: rgba(212, 168, 83, 0.2);
  
  /* Secondary - Deep Navy */
  --color-secondary: #1A2744;
  --color-secondary-light: #2A3A5C;
  --color-secondary-dark: #0F1829;
  
  /* Accent - Soft Teal */
  --color-accent: #5BA4A4;
  --color-accent-light: #7DBDBD;
  --color-accent-dark: #4A8F8F;
  
  /* Neutrals - Paper Tones */
  --color-cream: #FAF8F5;
  --color-paper: #F5F2ED;
  --color-paper-dark: #EBE6DE;
  --color-sand: #D4CFC5;
  
  /* Grays */
  --color-gray-50: #FAFAFA;
  --color-gray-100: #F5F5F5;
  --color-gray-200: #E5E5E5;
  --color-gray-300: #D4D4D4;
  --color-gray-400: #A3A3A3;
  --color-gray-500: #737373;
  --color-gray-600: #525252;
  --color-gray-700: #404040;
  --color-gray-800: #262626;
  --color-gray-900: #171717;
  
  /* Semantic Colors */
  --color-success: #4CAF50;
  --color-error: #E53935;
  --color-warning: #FF9800;
  --color-info: #2196F3;
  
  /* ===== Typography ===== */
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Instrument Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  
  /* Font Sizes - Fluid */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.375vw, 1rem);
  --text-base: clamp(1rem, 0.9rem + 0.5vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.625vw, 1.25rem);
  --text-xl: clamp(1.25rem, 1.1rem + 0.75vw, 1.5rem);
  --text-2xl: clamp(1.5rem, 1.25rem + 1.25vw, 2rem);
  --text-3xl: clamp(2rem, 1.5rem + 2.5vw, 3rem);
  --text-4xl: clamp(2.5rem, 1.75rem + 3.75vw, 4rem);
  --text-5xl: clamp(3rem, 2rem + 5vw, 5rem);
  
  /* Font Weights */
  --font-light: 300;
  --font-regular: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  
  /* Line Heights */
  --leading-tight: 1.2;
  --leading-snug: 1.35;
  --leading-normal: 1.6;
  --leading-relaxed: 1.75;
  
  /* Letter Spacing */
  --tracking-tighter: -0.05em;
  --tracking-tight: -0.025em;
  --tracking-normal: 0;
  --tracking-wide: 0.025em;
  --tracking-wider: 0.05em;
  --tracking-widest: 0.1em;
  
  /* ===== Spacing ===== */
  --space-1: 0.25rem;  /* 4px */
  --space-2: 0.5rem;   /* 8px */
  --space-3: 0.75rem;  /* 12px */
  --space-4: 1rem;     /* 16px */
  --space-5: 1.25rem;  /* 20px */
  --space-6: 1.5rem;   /* 24px */
  --space-8: 2rem;     /* 32px */
  --space-10: 2.5rem;  /* 40px */
  --space-12: 3rem;    /* 48px */
  --space-16: 4rem;    /* 64px */
  --space-20: 5rem;    /* 80px */
  --space-24: 6rem;    /* 96px */
  --space-32: 8rem;    /* 128px */
  
  /* ===== Layout ===== */
  --container-sm: 640px;
  --container-md: 768px;
  --container-lg: 1024px;
  --container-xl: 1200px;
  --container-2xl: 1400px;
  
  /* ===== Borders ===== */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 24px;
  --radius-full: 9999px;
  
  /* ===== Shadows ===== */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 16px 32px rgba(0, 0, 0, 0.12);
  --shadow-2xl: 0 24px 48px rgba(0, 0, 0, 0.16);
  --shadow-inner: inset 0 2px 4px rgba(0, 0, 0, 0.06);
  
  /* Glow Effects */
  --glow-gold: 0 0 20px rgba(212, 168, 83, 0.3);
  --glow-gold-lg: 0 0 40px rgba(212, 168, 83, 0.4);
  --glow-subtle: 0 0 30px rgba(212, 168, 83, 0.15);
  
  /* ===== Transitions ===== */
  --ease-default: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth: cubic-bezier(0.23, 1, 0.32, 1);
  
  --duration-fast: 150ms;
  --duration-base: 300ms;
  --duration-slow: 500ms;
  --duration-slower: 700ms;
  
  /* ===== Z-Index ===== */
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-fixed: 300;
  --z-modal-backdrop: 400;
  --z-modal: 500;
  --z-popover: 600;
  --z-tooltip: 700;
  --z-loader: 1000;
}

/* Creator shell: brand mark + mobile menu stability */
/* V3 live stability: brand mark + mobile navigation */
.nav-logo, body[data-bouya-page="home"] .nav-logo, body[data-bouya-page="creator"] .nav-logo {
  background: #faf4f1 !important;
  border-color: rgba(214, 170, 79, 0.64) !important;
}
@media (max-width: 968px) {
.nav-toggle {
    position: relative;
    z-index: 1402 !important;
    border: 0;
    background: transparent;
    cursor: pointer;
    touch-action: manipulation;
  }
.nav-menu li {
    width: min(100%, 420px) !important;
    margin-left: auto;
    margin-right: auto;
  }
}

/* ===========================================
   2. CSS RESET & BASE STYLES
   =========================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  font-size: 16px;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  background-color: var(--color-secondary-dark);
}
section[id] {
  scroll-margin-top: 104px;
}
body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--font-regular);
  line-height: var(--leading-normal);
  color: var(--color-gray-800);
  background-color: var(--color-cream);
  overflow-x: hidden;
  min-height: 100vh;
}
/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html {
    scroll-behavior: auto;
  }
}
@media (max-width: 768px) {
html {
    scroll-padding-top: 92px;
  }
section[id] {
    scroll-margin-top: 96px;
  }
}
/* Images */
img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
  height: auto;
}
/* Links */
a {
  color: inherit;
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-default);
}
a:hover {
  color: var(--color-primary);
}
/* Lists */
ul, ol {
  list-style: none;
}
/* Buttons & Inputs */
button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
}
button {
  cursor: pointer;
  background: none;
  border: none;
}
/* Focus States */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}
/* Selection */
::selection {
  background-color: var(--color-primary-100);
  color: var(--color-secondary-dark);
}

/* ===========================================
   6. HEADER & NAVIGATION
   =========================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: var(--z-fixed);
  background: rgba(250, 248, 245, 0.97);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(26,42,68,.09);
  box-shadow: 0 2px 18px rgba(26,42,68,.09);
  transition: all var(--duration-base) var(--ease-default);
}
.header::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(212,168,83,.12), transparent 26%, rgba(91,164,164,.08) 72%, transparent),
    linear-gradient(rgba(26,39,68,.035) 1px, transparent 1px);
  background-size: 100% 100%, 100% 12px;
  opacity: .76;
}
.header.scrolled {
  background: rgba(250, 248, 245, 0.99);
  border-bottom-color: rgba(26,42,68,.13);
  box-shadow: 0 4px 28px rgba(26,42,68,.13);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 1;
  max-width: var(--container-2xl);
  margin: 0 auto;
  padding: var(--space-2) var(--space-8);
  height: 60px;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 10;
}
.nav-logo {
  height: 44px;
  width: 44px;
  border-radius: 50%;
  object-fit: contain;
  padding: 3px;
  background: #fffdf8;
  transition: transform var(--duration-base) var(--ease-bounce), box-shadow .3s ease;
  box-shadow: 0 2px 8px rgba(26,42,68,.1);
  border: 1.5px solid rgba(214, 170, 79, 0.52);
}
.nav-brand-wordmark {
  display: grid;
  gap: 4px;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.46rem;
  font-weight: 700;
  letter-spacing: -0.024em;
  color: #16233d;
  line-height: 0.96;
  white-space: nowrap;
}
.nav-brand-name-line {
  display: block;
  text-shadow: 0 1px 0 rgba(255,255,255,.76), 0 1.6px 0 rgba(227,216,196,.94), 0 12px 22px rgba(16,24,39,.1);
}
.nav-brand-subline {
  display: block;
  font-family: var(--font-body);
  font-size: 0.52rem;
  font-weight: 700;
  line-height: 1.08;
  color: rgba(26,39,68,.62);
  letter-spacing: .18em;
  text-transform: uppercase;
}
.nav-brand-wordmark .wm-gold {
  color: #cf9f41;
  font-weight: 800;
  text-shadow: 0 1px 0 rgba(255,245,219,.88), 0 0 1px rgba(212,168,83,.34), 0 10px 18px rgba(191,141,43,.16);
}
.nav-brand-lockup-mobile {
  display: none;
  min-width: 0;
  align-items: center;
  position: relative;
}
.nav-brand-lockup-mobile::before {
  content: "";
  position: absolute;
  inset: -10px -14px -12px;
  border-radius: 20px;
  background:
    radial-gradient(circle at 50% 16%, rgba(255,255,255,.96) 0%, rgba(248,241,229,.88) 40%, rgba(248,241,229,0) 76%),
    linear-gradient(180deg, rgba(255,255,255,.5), rgba(246,236,220,.08));
  border: 1px solid rgba(207,159,65,.14);
  box-shadow: 0 14px 30px rgba(16,24,39,.09), inset 0 1px 0 rgba(255,255,255,.82);
  pointer-events: none;
}
.nav-brand-lockup-copy {
  display: grid;
  gap: 3px;
  justify-items: center;
  min-width: 0;
  position: relative;
  z-index: 1;
}
.nav-brand-lockup-main {
  display: block;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.62rem;
  font-weight: 700;
  letter-spacing: -0.034em;
  color: #16233d;
  line-height: 0.94;
  white-space: nowrap;
  text-shadow: 0 1px 0 rgba(255,255,255,.82), 0 2px 0 rgba(227,216,196,.98), 0 16px 28px rgba(16,24,39,.12), 0 0 18px rgba(207,159,65,.05);
}
.nav-brand-lockup-main .wm-gold {
  color: #cf9f41;
  font-weight: 800;
  text-shadow: 0 1px 0 rgba(255,245,219,.92), 0 0 1px rgba(212,168,83,.32), 0 12px 20px rgba(191,141,43,.18), 0 0 16px rgba(212,168,83,.08);
}
.nav-brand-lockup-sub {
  display: block;
  font-family: var(--font-body);
  font-size: 0.52rem;
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: .12em;
  text-transform: none;
  color: rgba(26,39,68,.68);
  text-shadow: 0 1px 0 rgba(255,255,255,.62);
}
.nav-brand:hover .nav-logo {
  transform: scale(1.05);
}
.nav-brand:hover .nav-brand-wordmark {
  opacity: 1;
}
@media (min-width: 969px) {
 .nav-logo {
    width: 52px;
    height: 52px;
  }
}
.nav-menu {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}
.nav-link {
  position: relative;
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--color-gray-700);
  padding: var(--space-2) 0;
  transition: color var(--duration-fast) var(--ease-default);
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-primary);
  transition: width var(--duration-base) var(--ease-default);
}
.nav-link:hover, .nav-link.active {
  color: var(--color-primary);
}
.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}
.nav-cta-btn {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: white !important;
  padding: 10px 22px !important;
  border-radius: var(--radius-full);
  font-weight: var(--font-semibold);
  font-size: 13px;
  letter-spacing: 0.02em;
  transition: all var(--duration-base) var(--ease-default);
  box-shadow: 0 2px 8px rgba(212,168,83,.2);
}
.nav-cta-btn::after {
  display: none;
}
.nav-cta-btn:hover {
  background: linear-gradient(135deg, var(--color-primary-light), var(--color-primary));
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(212,168,83,.35);
}
/* Mobile Toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  padding: var(--space-2);
  z-index: 10;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-gray-800);
  border-radius: var(--radius-full);
  transition: all var(--duration-base) var(--ease-default);
  transform-origin: center;
}
.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}
.nav-toggle.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}
/* Mobile Navigation */
@media (max-width: 968px) {
  .nav-toggle {
    display: flex;
  }
  
  .nav-menu {
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    width: auto;
    height: calc(100vh - 56px);
    background: var(--color-cream);
    flex-direction: column;
    justify-content: flex-start;
    padding: var(--space-8);
    gap: var(--space-4);
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
      transform var(--duration-base) var(--ease-default),
      opacity var(--duration-base) var(--ease-default),
      visibility 0s linear var(--duration-base);
    overflow-y: auto;
    overflow-x: hidden;
  }
  
  .nav-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition:
      transform var(--duration-base) var(--ease-default),
      opacity var(--duration-base) var(--ease-default);
  }
  
  .nav-link {
    font-size: var(--text-lg);
    padding: var(--space-3) 0;
  }
  
  .nav-cta,
  .nav-cta-btn {
    margin-top: var(--space-4);
    text-align: center;
  }
}

@media (max-width: 768px) {
.nav {
    height: 72px;
    padding: var(--space-2) 18px;
  }
 .nav-brand {
    gap: 10px;
    flex: 0 0 auto;
    min-width: auto;
  }
 .nav-logo {
    width: 56px;
    height: 56px;
    flex: 0 0 56px;
    position: relative;
    z-index: 2;
    margin-left: -4px;
    box-shadow: none;
    filter: drop-shadow(0 2px 0 rgba(255,248,229,.42)) drop-shadow(0 12px 20px rgba(16,24,39,.2));
  }
 .nav-brand-wordmark--desktop {
    display: none;
  }
 .nav-brand-lockup-mobile {
    display: flex;
    align-items: center;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(244px, calc(100vw - 148px));
    justify-content: center;
    min-width: 0;
    z-index: 1;
  }
  .nav-brand-lockup-mobile::before {
    content: none;
  }
  .nav-brand-lockup-mobile::after {
    content: none;
  }
  .nav-brand-lockup-copy {
    justify-items: center;
    text-align: center;
    width: 100%;
    max-width: 244px;
    margin: 0 auto;
    gap: 4px;
    padding-left: 0;
  }
  .nav-toggle {
    padding: 10px 8px;
    position: relative;
    z-index: 2;
  }
 .nav-brand-lockup-main {
    font-size: clamp(2.08rem, 6.15vw, 2.34rem);
    line-height: 0.92;
    letter-spacing: -0.05em;
    color: rgba(20, 32, 56, 0.92);
    text-shadow: 0 1px 0 rgba(255,255,255,.48), 0 6px 14px rgba(16,24,39,.06);
  }
 .nav-brand-lockup-sub {
    font-size: 0.58rem;
    line-height: 1.2;
    letter-spacing: .12em;
    color: rgba(43, 65, 99, .72);
    text-shadow: none;
  }
}

/* Creator-specific mobile header alignment, reduced from the global home rules. */
@media (max-width: 768px) {
  html,
  body[data-bouya-page="creator"] {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  body[data-bouya-page="creator"] .header {
    background: rgba(255, 252, 246, 0.96);
    width: 100vw;
    max-width: 100vw;
    overflow: hidden;
  }

  body[data-bouya-page="creator"] .nav {
    width: 100vw;
    max-width: 100vw;
    margin: 0;
    box-sizing: border-box;
    justify-content: flex-end;
  }

  body[data-bouya-page="creator"] .nav-brand {
    position: absolute;
    left: calc(50% - 22px);
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(316px, calc(100vw - 108px));
    justify-content: flex-start;
    z-index: 2;
  }

  body[data-bouya-page="creator"] .nav-logo {
    transform: translateX(-16px);
  }

  body[data-bouya-page="creator"] .nav-brand-lockup-mobile {
    position: relative;
    left: auto;
    top: auto;
    transform: none;
    width: auto;
    flex: 1 1 auto;
    justify-content: flex-start;
  }

  body[data-bouya-page="creator"] .nav-brand-lockup-copy {
    max-width: none;
    margin-left: -8px;
  }

  body[data-bouya-page="creator"] .nav-brand-lockup-main {
    font-size: clamp(2.14rem, 6.24vw, 2.42rem);
    line-height: 0.94;
    letter-spacing: -0.045em;
    text-shadow: 0 1px 0 rgba(255,255,255,.42), 0 4px 10px rgba(16,24,39,.04);
  }

  body[data-bouya-page="creator"] .nav-brand-lockup-sub {
    font-size: 0.6rem;
    letter-spacing: .1em;
    display: inline-block;
    padding-bottom: 4px;
    background: linear-gradient(90deg, rgba(212,168,83,0), rgba(212,168,83,.66) 24%, rgba(248,231,190,.9) 50%, rgba(123,184,173,.38) 76%, rgba(123,184,173,0)) center bottom / 100% 1px no-repeat;
  }

  body[data-bouya-page="creator"] .nav-toggle {
    z-index: 3;
    margin-left: auto;
  }
}

/* Creator mobile menu hotfix, reduced from the global V3 hotfix. */
body[data-bouya-page="creator"] .nav-logo {
  background: transparent !important;
  border-color: transparent !important;
}

@media (max-width: 968px) {
  .header,
  body[data-bouya-page="creator"] .header {
    z-index: 1200 !important;
  }

  body.nav-open .header,
  body[data-bouya-page="creator"].nav-open .header {
    overflow: visible !important;
  }

  .nav {
    z-index: 1201 !important;
  }

  .nav-toggle {
    position: relative !important;
    z-index: 1402 !important;
    cursor: pointer !important;
    touch-action: manipulation !important;
  }

  .nav-menu {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100vw !important;
    max-width: none !important;
    height: 100svh !important;
    padding: calc(78px + env(safe-area-inset-top, 0px)) 22px calc(28px + env(safe-area-inset-bottom, 0px)) !important;
    background:
      linear-gradient(rgba(26,39,68,.035) 1px, transparent 1px),
      linear-gradient(135deg, rgba(255,252,246,.99), rgba(250,244,241,.99)) !important;
    background-size: 100% 13px, 100% 100% !important;
    box-shadow: 0 26px 64px rgba(15, 24, 41, 0.22) !important;
    z-index: 1300 !important;
    transform: translateY(-10px) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    overflow-y: auto !important;
  }

  .nav-menu.active,
  body.nav-open .nav-menu {
    transform: translateY(0) !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }
}
