/* ============================================================
   CULTURE BOX — Base Styles & Design Tokens
   ============================================================ */

:root {
  --cream: #FDFBF7;
  --parchment: #F5EFE3;
  --sand: #E8DCC8;
  --sand-dark: #D4C4A8;
  --gold: #C8A97E;
  --gold-dark: #A8855A;
  --gold-light: #E2C99A;
  --espresso: #1A0F07;
  --brown: #3D2314;
  --text: #2C1810;
  --text-muted: #7A6050;
  --text-light: #B09A88;
  --overlay: rgba(26, 15, 7, 0.7);

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', system-ui, sans-serif;

  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 20px;
  --radius-xl: 32px;

  --shadow-xs: 0 1px 4px rgba(44, 24, 16, 0.08);
  --shadow: 0 4px 20px rgba(44, 24, 16, 0.1);
  --shadow-lg: 0 12px 48px rgba(44, 24, 16, 0.16);
  --shadow-gold: 0 4px 24px rgba(200, 169, 126, 0.35);

  --transition: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.55s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }

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

/* ---- Background system ---- */
#site-image-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.site-bg-image {
  position: absolute;
  inset: 0;
  background-image: url('https://images.unsplash.com/photo-1488085061387-422e29b40080?w=1920&q=80');
  background-size: cover;
  background-position: center;
  transition: background-image 0.8s ease;
}
.site-bg-overlay {
  position: absolute;
  inset: 0;
  background: var(--overlay);
}
.site-bg-haze {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 100%, rgba(253,251,247,0.18) 0%, transparent 65%);
}

/* ---- Readable layer (hides bg on inner pages) ---- */
#site-readable-layer {
  position: fixed;
  inset: 0;
  z-index: 1;
  background: var(--cream);
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

#app {
  position: relative;
  z-index: 2;
  min-height: 100vh;
}

#page-content {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* ---- Typography ---- */
h1, h2, h3, h4, h5 { font-family: var(--font-display); line-height: 1.2; color: var(--text); }
h1 { font-size: clamp(2rem, 5vw, 3.8rem); font-weight: 700; }
h2 { font-size: clamp(1.4rem, 3vw, 2.2rem); font-weight: 600; }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); font-weight: 600; }
h4 { font-size: 1.05rem; font-weight: 600; }
p { line-height: 1.72; color: var(--text-muted); }
a { color: inherit; text-decoration: none; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 26px;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  border-radius: var(--radius);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  user-select: none;
  text-decoration: none;
}
.btn:active { transform: scale(0.97); }
.btn-sm { padding: 7px 16px; font-size: 0.8rem; }
.btn-lg { padding: 14px 36px; font-size: 0.95rem; }

.btn-primary {
  background: var(--espresso);
  color: var(--cream);
}
.btn-primary:hover {
  background: var(--brown);
  box-shadow: var(--shadow);
}

.btn-gold {
  background: linear-gradient(135deg, #D4B887 0%, #A8855A 100%);
  color: var(--espresso);
  font-weight: 700;
  box-shadow: var(--shadow-gold);
}
.btn-gold:hover {
  box-shadow: 0 8px 36px rgba(200, 169, 126, 0.55);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  border: 1.5px solid rgba(200, 169, 126, 0.4);
  color: var(--cream);
}
.btn-outline:hover {
  border-color: var(--gold);
  background: rgba(200, 169, 126, 0.1);
}
.btn-outline-dark {
  background: transparent;
  border: 1.5px solid var(--sand);
  color: var(--text);
}
.btn-outline-dark:hover {
  border-color: var(--gold);
  color: var(--gold-dark);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}
.btn-ghost:hover {
  background: rgba(200, 169, 126, 0.1);
  color: var(--text);
}

/* ---- Cards ---- */
.card {
  background: rgba(253, 251, 247, 0.95);
  border: 1px solid rgba(200, 169, 126, 0.18);
  border-radius: var(--radius-lg);
  padding: 28px;
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
  transition: var(--transition);
}
.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.card-flat {
  background: var(--parchment);
  border: 1px solid var(--sand);
  border-radius: var(--radius);
  padding: 20px;
}

/* ---- Inputs ---- */
.input {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--sand);
  border-radius: var(--radius);
  background: rgba(253, 251, 247, 0.9);
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text);
  transition: var(--transition);
  outline: none;
}
.input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(200, 169, 126, 0.15);
}
.input::placeholder { color: var(--text-light); }

.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}
.input-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

/* ---- Badge ---- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.badge-gold { background: rgba(200,169,126,0.15); color: var(--gold-dark); border: 1px solid rgba(200,169,126,0.3); }
.badge-green { background: rgba(45,125,78,0.1); color: #2D7D4E; border: 1px solid rgba(45,125,78,0.25); }
.badge-red { background: rgba(196,75,58,0.1); color: #C44B3A; border: 1px solid rgba(196,75,58,0.25); }
.badge-blue { background: rgba(43,94,167,0.1); color: #2B5EA7; border: 1px solid rgba(43,94,167,0.25); }

/* ---- Progress bar ---- */
.progress-bar {
  height: 5px;
  background: var(--sand);
  border-radius: 3px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold));
  border-radius: 3px;
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- Divider ---- */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--sand), transparent);
  margin: 20px 0;
}
.divider-text {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-light);
  font-size: 0.8rem;
  margin: 16px 0;
}
.divider-text::before,
.divider-text::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--sand);
}

/* ---- Section header ---- */
.section-label {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 6px;
}
.section-title {
  font-family: var(--font-display);
  color: var(--text);
  margin-bottom: 6px;
}
.section-subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 28px;
}

/* ---- Container ---- */
.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}
.container-narrow {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- Page wrapper ---- */
.page { min-height: 100vh; }
.page-inner {
  padding-top: 24px;
  padding-bottom: 100px;
}

/* ---- Avatar ---- */
.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--espresso);
  flex-shrink: 0;
}
.avatar-lg {
  width: 72px;
  height: 72px;
  font-size: 1.6rem;
}

/* ---- Utilities ---- */
.hidden { display: none !important; }
.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-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.text-center { text-align: center; }
.text-gold { color: var(--gold-dark); }
.text-muted { color: var(--text-muted); }
.w-full { width: 100%; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-24 { margin-bottom: 24px; }
.cursor-pointer { cursor: pointer; }

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--sand-dark); border-radius: 3px; }

/* ---- Selection ---- */
::selection { background: rgba(200, 169, 126, 0.28); color: var(--text); }

/* ---- Mobile ---- */
@media (max-width: 640px) {
  .container, .container-narrow { padding: 0 16px; }
  .card { padding: 20px; }
  .btn-lg { padding: 12px 28px; }
}
