/* ==========================================================================
   Les Bons Hommes — Warm Sacred Editorial Design System v2.8.0
   Mobile & Tablet First Responsive Edition
   https://bonshommes.org
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;500;600;700&family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,600&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&family=Newsreader:ital,opsz,wght@0,6..72,300;0,6..72,400;1,6..72,400&display=swap');

:root {
  /* Warm Parchment Palette */
  --bg-parchment: #FBF9F5;
  --bg-surface: #FFFFFF;
  --bg-subtle: #F3EFEA;
  --bg-dark-section: #141312;
  
  /* Ink & Typography */
  --text-ink: #1C1A18;
  --text-body: #383531;
  --text-muted: #736E67;
  --text-light: #F7F5F0;
  
  /* Noble Accents */
  --gold-antique: #9E7B35;
  --gold-hover: #B8934A;
  --gold-light: #EFE6D1;
  --gold-subtle: rgba(158, 123, 53, 0.15);
  --forest-seal: #2D4236;
  --forest-light: #EDF3F0;
  
  /* Lines & Dividers */
  --border-fine: rgba(28, 26, 24, 0.12);
  --border-gold: rgba(158, 123, 53, 0.35);
}

.btn-editorial-primary.hidden,
.btn-editorial-secondary.hidden,
.btn-telegram-editorial.hidden,
.wizard-step-panel.hidden {
  display: none !important;
}

/* Base Setup */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg-parchment);
  color: var(--text-body);
  overflow-x: hidden;
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: var(--bg-parchment);
  color: var(--text-body);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  width: 100%;
}

/* Typography Classes */
.font-display {
  font-family: 'Cormorant Garamond', Georgia, serif;
}

.font-cinzel {
  font-family: 'Cinzel', serif;
}

.font-reading {
  font-family: 'Newsreader', Georgia, serif;
}

.font-sans {
  font-family: 'Plus Jakarta Sans', sans-serif;
}

/* Pull Quote */
.pull-quote {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(1.5rem, 3.5vw, 2.5rem);
  line-height: 1.25;
  color: var(--text-ink);
  font-style: italic;
  letter-spacing: -0.01em;
  padding: 2rem 0;
  margin: 2.5rem 0;
  border-top: 1px solid var(--border-gold);
  border-bottom: 1px solid var(--border-gold);
}

/* ==========================================================================
   BUTTON STYLES (MOBILE-FIRST FLUIDITY, NO OVERFLOW)
   ========================================================================== */
.btn-editorial-primary {
  background-color: #1C1A18;
  color: #FFFFFF;
  font-family: 'Cinzel', serif;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  min-height: 2.75rem;
  padding: 0.65rem 1.15rem;
  border-radius: 6px;
  border: 1px solid #9E7B35;
  box-shadow: 0 4px 14px rgba(28, 26, 24, 0.15), 0 2px 6px rgba(158, 123, 53, 0.2);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  touch-action: manipulation;
  max-width: 100%;
}

@media (min-width: 640px) {
  .btn-editorial-primary {
    font-size: 0.8125rem;
    letter-spacing: 0.14em;
    min-height: 3rem;
    padding: 0.75rem 2rem;
    gap: 0.65rem;
  }
}

.btn-editorial-primary:hover {
  background-color: #9E7B35;
  color: #FFFFFF;
  border-color: #B8934A;
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(158, 123, 53, 0.35);
}

.btn-editorial-secondary {
  background-color: #FFFFFF;
  color: #1C1A18;
  font-family: 'Cinzel', serif;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  min-height: 2.75rem;
  padding: 0.65rem 1rem;
  border-radius: 6px;
  border: 1px solid rgba(28, 26, 24, 0.25);
  box-shadow: 0 2px 6px rgba(28, 26, 24, 0.05);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  touch-action: manipulation;
  max-width: 100%;
}

@media (min-width: 640px) {
  .btn-editorial-secondary {
    font-size: 0.8125rem;
    letter-spacing: 0.14em;
    min-height: 3rem;
    padding: 0.75rem 1.75rem;
    gap: 0.65rem;
  }
}

.btn-editorial-secondary:hover {
  border-color: #9E7B35;
  color: #9E7B35;
  background-color: #FAF8F5;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(158, 123, 53, 0.15);
}

.btn-telegram-editorial {
  background-color: #229ED9;
  color: #FFFFFF;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  min-height: 2.875rem;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  box-shadow: 0 4px 14px rgba(34, 158, 217, 0.25);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  text-decoration: none;
  white-space: nowrap;
  touch-action: manipulation;
}

.btn-telegram-editorial:hover {
  background-color: #1b85b8;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(34, 158, 217, 0.35);
}

.btn-load-more {
  background-color: #FFFFFF;
  color: var(--text-ink);
  font-family: 'Cinzel', serif;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  min-height: 2.65rem;
  padding: 0.65rem 1.5rem;
  border: 1px solid var(--border-fine);
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(28, 26, 24, 0.05);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  white-space: nowrap;
  cursor: pointer;
  touch-action: manipulation;
}

@media (min-width: 640px) {
  .btn-load-more {
    font-size: 0.8125rem;
    letter-spacing: 0.12em;
    min-height: 2.75rem;
    padding: 0.75rem 2rem;
  }
}

.btn-load-more:hover {
  border-color: var(--gold-antique);
  color: var(--gold-antique);
  background-color: #FAF8F5;
}

/* ==========================================================================
   FAQ CATEGORY TAB BUTTONS
   ========================================================================== */
.faq-tab-btn {
  background-color: var(--bg-subtle);
  color: var(--text-body);
  border: 1px solid var(--border-fine);
  border-radius: 4px;
  padding: 0.4rem 0.85rem;
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: all 0.2s ease;
  cursor: pointer;
  white-space: nowrap;
  touch-action: manipulation;
}

@media (min-width: 640px) {
  .faq-tab-btn {
    padding: 0.45rem 1.15rem;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
  }
}

.faq-tab-btn:hover {
  background-color: var(--gold-light);
  color: var(--text-ink);
  border-color: var(--gold-antique);
}

.faq-tab-btn.active {
  background-color: #1C1A18 !important;
  color: #FFFFFF !important;
  border-color: #1C1A18 !important;
  box-shadow: 0 2px 8px rgba(28, 26, 24, 0.25) !important;
}

.faq-tab-btn.active:hover {
  background-color: #9E7B35 !important;
  color: #FFFFFF !important;
  border-color: #9E7B35 !important;
}

/* Paper Card Surfaces */
.paper-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-fine);
  border-radius: 8px;
  transition: all 0.3s ease;
}

.paper-card-hover:hover {
  border-color: var(--border-gold);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(28, 26, 24, 0.05);
}

/* Rating Pill Buttons (Values 1-5) */
.rating-pill-btn {
  background-color: var(--bg-subtle);
  color: var(--text-body);
  border: 1px solid var(--border-fine);
  border-radius: 4px;
  padding: 0.45rem 0;
  font-weight: 700;
  font-size: 0.8125rem;
  transition: all 0.15s ease;
  cursor: pointer;
  touch-action: manipulation;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.4rem;
}

.rating-pill-btn:hover {
  background-color: var(--gold-light);
  border-color: var(--gold-antique);
  color: var(--text-ink);
}

.rating-pill-btn.selected {
  background-color: var(--text-ink) !important;
  color: #FFFFFF !important;
  border-color: var(--text-ink) !important;
  box-shadow: 0 2px 6px rgba(28, 26, 24, 0.2) !important;
}

/* Form Inputs */
.form-input-editorial {
  background-color: #FFFFFF;
  border: 1px solid var(--border-fine);
  border-radius: 6px;
  color: var(--text-ink);
  padding: 0.65rem 0.85rem;
  font-size: 0.9375rem;
  transition: all 0.2s ease;
  width: 100%;
}

.form-input-editorial:focus {
  outline: none;
  border-color: var(--gold-antique);
  box-shadow: 0 0 0 3px rgba(158, 123, 53, 0.15);
}

/* Step Indicator Pills */
.step-indicator-pill {
  border: 1px solid var(--border-fine);
  background-color: var(--bg-surface);
  color: var(--text-muted);
  border-radius: 6px;
  font-family: 'Cinzel', serif;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 2.5rem;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
}

.step-indicator-pill:hover {
  background-color: var(--gold-light);
  border-color: var(--gold-antique);
  color: var(--text-ink);
}

.step-indicator-pill.active {
  background-color: #1C1A18 !important;
  color: #FFFFFF !important;
  border-color: #1C1A18 !important;
  box-shadow: 0 2px 8px rgba(28, 26, 24, 0.25) !important;
}

.step-indicator-pill.completed {
  background-color: var(--gold-light) !important;
  color: var(--gold-antique) !important;
  border-color: var(--gold-antique) !important;
}

/* Accordion Transitions */
.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
  opacity: 0;
}

.faq-item.open .faq-content {
  max-height: 1200px;
  opacity: 1;
}

.faq-item.open .faq-icon {
  transform: rotate(180deg);
  color: var(--gold-antique);
}

/* Frame for Historical Art */
.art-frame {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(28, 26, 24, 0.12);
  border: 1px solid rgba(158, 123, 53, 0.25);
}

.art-caption {
  font-family: 'Newsreader', Georgia, serif;
  font-style: italic;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 0.6rem;
  text-align: center;
}

/* Suggestion Tag Pills (Chapter V) */
.suggestion-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  border: 1px solid var(--border-fine);
  background-color: #FFFFFF !important;
  color: var(--text-ink) !important;
  transition: all 0.2s ease;
  cursor: pointer;
  user-select: none;
}

.suggestion-tag:hover:not(.selected):not([disabled]) {
  background-color: var(--gold-light) !important;
  border-color: var(--gold-antique) !important;
  color: var(--text-ink) !important;
}

.suggestion-tag.selected,
.suggestion-tag:disabled,
.suggestion-tag[disabled] {
  background-color: var(--gold-antique) !important;
  border-color: var(--gold-antique) !important;
  color: #FFFFFF !important;
  box-shadow: 0 2px 6px rgba(158, 123, 53, 0.35) !important;
  cursor: default !important;
  pointer-events: none !important;
  opacity: 0.88;
}