/* ═══════════════════════════════════════════════════════════════
   JOURY BASE — Brand tokens · Reset · Typography · Utilities
   Brand: Red #C8102E · Caramel #C49A6C · Dark #0D0608 · Cream #FFF8F2
   ═══════════════════════════════════════════════════════════════ */

/* ─── Brand palette ─────────────────────────────────────────────── */
:root {
  --brand-red:       #C8102E;
  --brand-red-dark:  #A00D24;
  --brand-red-glow:  rgba(200, 16, 46, 0.18);
  --brand-caramel:   #C49A6C;
  --brand-caramel-lt:#D4B896;
  --brand-caramel-dk:#A0784A;

  --radius-xs:   4px;
  --radius-sm:   8px;
  --radius-md:   14px;
  --radius-lg:   22px;
  --radius-xl:   32px;
  --radius-pill: 999px;

  --shadow-sm:  0 2px 8px rgba(0,0,0,.10);
  --shadow-md:  0 8px 28px rgba(0,0,0,.15);
  --shadow-lg:  0 24px 64px rgba(0,0,0,.22);
  --shadow-red: 0 8px 32px rgba(200,16,46,.25);

  --ease:      cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out:  cubic-bezier(0, 0, 0.2, 1);
  --ease-back: cubic-bezier(0.34, 1.56, 0.64, 1);
  --t:         0.32s var(--ease);
  --t-fast:    0.16s var(--ease);
  --t-slow:    0.56s var(--ease);

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

  --z-nav:    100;
  --z-modal:  200;
  --z-toast:  300;

  --container: 1320px;
  --gutter: clamp(16px, 5vw, 56px);
}

/* ─── Confiserie / Food theme (dark, bold, craving) ─────────────── */
.confiserie-theme, .food-theme {
  --bg:         #0D0608;
  --bg-surface: #160B0E;
  --bg-card:    #1C1013;
  --bg-hover:   #231418;
  --bg-glass:   rgba(255,255,255,.04);

  --text-1: #FFFFFF;
  --text-2: #B8A8AA;
  --text-3: #6E5C5E;

  --accent:       var(--brand-red);
  --accent-hover: var(--brand-red-dark);
  --accent-muted: var(--brand-red-glow);
  --accent-2:     var(--brand-caramel);

  --border:       rgba(255,255,255,.07);
  --border-hover: rgba(255,255,255,.14);

  --badge-new:  #22C55E;
  --badge-hot:  var(--brand-red);
  --badge-sale: var(--brand-caramel);
}

/* ─── Cosmetique theme (light, clean, luxe) ─────────────────────── */
.cosmetique-theme, .cosmetics-theme {
  --bg:         #FFF8F2;
  --bg-surface: #FFFFFF;
  --bg-card:    #FFFFFF;
  --bg-hover:   #F7EFE6;
  --bg-glass:   rgba(196,154,108,.06);

  --text-1: #1A0E08;
  --text-2: #6B5040;
  --text-3: #B09880;

  --accent:       var(--brand-caramel);
  --accent-hover: var(--brand-caramel-dk);
  --accent-muted: rgba(196,154,108,.12);
  --accent-2:     var(--brand-red);

  --border:       rgba(0,0,0,.07);
  --border-hover: rgba(196,154,108,.30);

  --badge-new:  #6B9E78;
  --badge-hot:  var(--brand-red);
  --badge-sale: var(--brand-caramel);
}

/* ─── Reset ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg, #0D0608);
  color: var(--text-1, #fff);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--accent-hover); }

/* ─── Layout ─────────────────────────────────────────────────────── */
.joury-container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.joury-main-content { min-height: 60vh; }

/* ─── Typography ─────────────────────────────────────────────────── */
.j-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
}
.j-title-hero {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 7vw, 6rem);
  font-weight: 700;
  line-height: 1.04;
  color: var(--text-1);
}
.j-title-xl {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.8rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--text-1);
}
.j-title-lg {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  font-weight: 600;
  line-height: 1.2;
  color: var(--text-1);
}
.j-title-md {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-1);
}
.j-body { font-size: 15px; color: var(--text-2); line-height: 1.7; }

/* ─── Badges ─────────────────────────────────────────────────────── */
.j-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
  line-height: 1.4;
}
.j-badge--new  { background: var(--badge-new);  color: #fff; }
.j-badge--hot  { background: var(--badge-hot);  color: #fff; }
.j-badge--sale { background: var(--badge-sale); color: #fff; }

/* ─── Buttons ────────────────────────────────────────────────────── */
.j-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .03em;
  cursor: pointer;
  border: none;
  transition: all var(--t);
  white-space: nowrap;
  text-decoration: none;
}
.j-btn--primary {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-red);
}
.j-btn--primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(200,16,46,.38);
  color: #fff;
}
.j-btn--outline {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
}
.j-btn--outline:hover { background: var(--accent); color: #fff; }
.j-btn--ghost {
  background: var(--bg-glass);
  color: var(--text-1);
  border: 1.5px solid var(--border);
  backdrop-filter: blur(8px);
}
.j-btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
.j-btn--sm { padding: 9px 20px; font-size: 12px; }
.j-btn--lg { padding: 17px 40px; font-size: 16px; }

/* ─── Reveal system ──────────────────────────────────────────────── */
.j-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s var(--ease-out), transform 0.65s var(--ease-out);
}
.j-reveal.is-visible { opacity: 1; transform: translateY(0); }
.j-reveal-fade { opacity: 0; transition: opacity 0.65s var(--ease-out); }
.j-reveal-fade.is-visible { opacity: 1; }
.j-reveal-left  { opacity: 0; transform: translateX(-32px); transition: opacity 0.65s var(--ease-out), transform 0.65s var(--ease-out); }
.j-reveal-right { opacity: 0; transform: translateX( 32px); transition: opacity 0.65s var(--ease-out), transform 0.65s var(--ease-out); }
.j-reveal-left.is-visible,
.j-reveal-right.is-visible { opacity: 1; transform: translateX(0); }
.j-delay-1 { transition-delay: .10s; }
.j-delay-2 { transition-delay: .20s; }
.j-delay-3 { transition-delay: .30s; }
.j-delay-4 { transition-delay: .40s; }
.j-delay-5 { transition-delay: .50s; }

/* ─── Grid helpers ───────────────────────────────────────────────── */
.j-grid { display: grid; gap: var(--gap, 24px); }
.j-grid--2    { grid-template-columns: repeat(2, 1fr); }
.j-grid--3    { grid-template-columns: repeat(3, 1fr); }
.j-grid--4    { grid-template-columns: repeat(4, 1fr); }
.j-grid--auto { grid-template-columns: repeat(auto-fill, minmax(var(--min, 260px), 1fr)); }

@media (max-width: 900px) {
  .j-grid--4 { grid-template-columns: repeat(2, 1fr); }
  .j-grid--3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 540px) {
  .j-grid--2,
  .j-grid--3,
  .j-grid--4 { grid-template-columns: 1fr; }
}

/* ─── Horizontal scroll ──────────────────────────────────────────── */
.j-hscroll {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.j-hscroll::-webkit-scrollbar { display: none; }
.j-hscroll > * { scroll-snap-align: start; flex-shrink: 0; }

/* ─── Divider ────────────────────────────────────────────────────── */
.j-hr { height: 1px; background: var(--border); margin-block: 56px; }

/* ─── Noise texture overlay ──────────────────────────────────────── */
.j-noise::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  border-radius: inherit;
}

/* ═══════════════════════════════════════════════════════════════
   LOGO-COLOR TEXT ANIMATIONS & HOVER EFFECTS
   All 5 brand colors cycle through every animation:
   Red #C8102E · Dark Red #A00D24 · Caramel #C49A6C
   Light Gold #D4B896 · Amber #A0784A · Cream #FFF8F2
   ═══════════════════════════════════════════════════════════════ */

/* ─── Keyframes (available to every page via base.css) ───────── */
@keyframes j-logo-flow {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes j-shimmer-sweep {
  0%   { background-position: 200% center; }
  100% { background-position: -200% center; }
}
@keyframes j-color-cycle {
  0%, 100% { color: #C8102E; }
  25%       { color: #C49A6C; }
  50%       { color: #D4B896; }
  75%       { color: #A0784A; }
}
@keyframes j-glow-cycle {
  0%, 100% { text-shadow: 0 0 24px rgba(200,16,46,.6),   0 0 8px rgba(200,16,46,.3); }
  25%       { text-shadow: 0 0 28px rgba(196,154,108,.6), 0 0 8px rgba(196,154,108,.3); }
  50%       { text-shadow: 0 0 22px rgba(212,184,150,.5), 0 0 8px rgba(212,184,150,.25); }
  75%       { text-shadow: 0 0 24px rgba(160,120,74,.55), 0 0 8px rgba(160,120,74,.3); }
}
@keyframes j-color-cycle-faint {
  0%, 100% { color: rgba(200,16,46,.32); }
  25%       { color: rgba(196,154,108,.32); }
  50%       { color: rgba(212,184,150,.26); }
  75%       { color: rgba(160,120,74,.28); }
}

/* ─── Utility classes ────────────────────────────────────────── */
/* Add class="j-text-logo-gradient" for always-on gradient text  */
.j-text-logo-gradient {
  background: linear-gradient(90deg,
    #C8102E, #A00D24, #C49A6C, #D4B896, #A0784A, #C8102E
  );
  background-size: 300% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: j-shimmer-sweep 4s linear infinite;
}
/* Add class="j-text-logo-pulse" for color-cycling text with glow */
.j-text-logo-pulse {
  animation: j-color-cycle 4s ease infinite, j-glow-cycle 4s ease infinite;
}

/* ─── Eyebrow labels — shimmer sweep through all 5 logo colors ── */
.j-eyebrow {
  background: linear-gradient(90deg,
    #C8102E, #D4B896, #C49A6C, #A0784A, #C8102E
  );
  background-size: 300% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: j-shimmer-sweep 4s linear infinite;
}

/* ─── Hero / XL section title — gradient on hover ────────────── */
.j-title-hero,
.j-title-xl { cursor: default; }
.j-title-hero:hover,
.j-title-xl:hover {
  background: linear-gradient(135deg,
    #FFF8F2 0%, #D4B896 18%, #C49A6C 38%,
    #C8102E 58%, #A00D24 75%, #C49A6C 90%, #FFF8F2 100%
  );
  background-size: 300% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: j-logo-flow 3s ease infinite;
}

/* ─── Medium titles — caramel + red glow on hover ────────────── */
.j-title-lg,
.j-title-md { transition: color var(--t), text-shadow var(--t); }
.j-title-lg:hover,
.j-title-md:hover {
  color: var(--brand-caramel-lt);
  text-shadow:
    0 0 20px rgba(196,154,108,.45),
    0 0 40px rgba(200,16,46,.2);
}
