/* ============================================
   WinNechri — Shared Stylesheet
   Theme: Dark Commerce / Amber Accent
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Newsreader:ital,wght@0,400;0,500;0,600;0,700&family=Hanken+Grotesk:wght@300;400;500;600;700;800&family=Schibsted+Grotesk:wght@400;500;600;700;800&family=Playfair+Display:wght@500;600;700;800&family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&family=IBM+Plex+Sans+Arabic:wght@300;400;500;600;700&display=swap');

:root {
  /* ── Unified, theme-aware tokens (default ambiance: Braises) ── */
  --bg-primary: #0b0805;
  --bg-secondary: #120c06;
  --bg-card: #161009;
  --bg-hover: #1e1610;
  --border: #2c2114;
  --border-light: #3d2d18;

  --amber: #f59e0b;
  --amber-dark: #b45309;
  --amber-light: #fcd34d;
  --amber-glow: rgba(245, 158, 11, 0.15);

  --teal: #2dd4bf;
  --teal-light: #14B8A6;
  --teal-glow: rgba(13, 148, 136, 0.15);

  --text-primary: #f6efe4;
  --text-secondary: #b6aa97;
  --text-muted: #76695a;

  /* Type pairing (default: Éditorial) — switchable via html[data-font] */
  --font-display: 'Newsreader', Georgia, serif;
  --font-body: 'Hanken Grotesk', system-ui, sans-serif;
  --font-arabic: 'IBM Plex Sans Arabic', var(--font-body);
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --display-weight: 600;

  --radius: 8px;
  --radius-lg: 16px;
  --maxw: 1240px;
  --ease: cubic-bezier(.22,.61,.36,1);
  --transition: 0.2s ease;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-amber: 0 4px 24px rgba(245,158,11,0.2);
}

/* Ambiance: Sahara (warmer gold/sand) */
html[data-theme="sahara"] {
  --bg-primary:#0e0a04; --bg-secondary:#161009; --bg-card:#1a130a; --bg-hover:#2c200f;
  --border:#352713; --border-light:#473418;
  --text-primary:#f8f0df; --text-secondary:#bfae8e; --text-muted:#857458;
  --amber:#e9b24a; --amber-light:#f7d98b; --amber-dark:#a9701f; --amber-glow:rgba(233,178,74,0.15);
}
/* Ambiance: Nuit (cooler, sober — matches homepage default) */
html[data-theme="nuit"] {
  --bg-primary:#0a0b0e; --bg-secondary:#0f1116; --bg-card:#13151b; --bg-hover:#21242d;
  --border:#23262f; --border-light:#333744;
  --text-primary:#eef1f6; --text-secondary:#9aa1b0; --text-muted:#5c6273;
  --amber:#e0a23c; --amber-light:#f0c277; --amber-dark:#9a6a1f; --amber-glow:rgba(224,162,60,0.15);
}

/* ============================================================
   LIGHT MODE  —  html[data-mode="light"]  (style.css namespace)
   Mirrors the home.css light palette so shared chrome matches.
   ============================================================ */
html[data-mode="light"] {
  --bg-primary:#fbf5ea; --bg-secondary:#f3ead9; --bg-card:#fffdf8; --bg-hover:#f1e7d6;
  --border:#e9dcc4; --border-light:#dbc8a6;
  --text-primary:#231a0e; --text-secondary:#5e5340; --text-muted:#9a8b6f;
  --amber:#d4881a; --amber-dark:#7a4604; --amber-light:#985907; --amber-glow:rgba(212,136,26,0.14);
  --shadow:0 12px 32px -14px rgba(120,84,28,0.20);
  --shadow-amber:0 12px 30px -12px rgba(212,136,26,0.30);
}
html[data-mode="light"][data-theme="nuit"] {
  --bg-primary:#f6f7fa; --bg-secondary:#eceff4; --bg-card:#ffffff; --bg-hover:#e9edf3;
  --border:#e1e5ec; --border-light:#ccd3de;
  --text-primary:#161a21; --text-secondary:#505868; --text-muted:#88909f;
  --amber:#cf8a1c; --amber-dark:#744a05; --amber-light:#8c5807; --amber-glow:rgba(207,138,28,0.12);
}
html[data-mode="light"][data-theme="sahara"] {
  --bg-primary:#fcf6e6; --bg-secondary:#f4ebd3; --bg-card:#fffef7; --bg-hover:#f0e6c9;
  --border:#ebdfc0; --border-light:#ddca9c;
  --text-primary:#291f0e; --text-secondary:#645839; --text-muted:#9c8c62;
  --amber:#cf8f12; --amber-dark:#744b04; --amber-light:#8f5e06; --amber-glow:rgba(207,143,18,0.14);
}

/* Type pairings (switchable via html[data-font]) */
html[data-font="moderne"] {
  --font-display:'Schibsted Grotesk', system-ui, sans-serif;
  --font-body:'Schibsted Grotesk', system-ui, sans-serif;
  --display-weight:700;
}
html[data-font="classique"] {
  --font-display:'Playfair Display', Georgia, serif;
  --font-body:'Inter', system-ui, sans-serif;
  --display-weight:700;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
}

body[dir="rtl"] {
  font-family: var(--font-arabic);
}

/* ── Typography ── */
h1, h2, h3 { font-family: var(--font-display); line-height: 1.2; font-weight: var(--display-weight, 700); }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: 1.25rem; }
p  { color: var(--text-secondary); }
a  { color: inherit; text-decoration: none; }

/* ── Layout ── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Navbar ── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10,10,10,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
}

.navbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.015em;
  display: inline-flex;
  align-items: center;
  gap: 0;
  white-space: nowrap;
}
.logo::before {
  content:''; width: .92em; height: 1.04em; margin-inline-end: .34em; flex-shrink:0;
  background: var(--amber);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M12 23s8-7.3 8-13A8 8 0 1 0 4 10c0 5.7 8 13 8 13Zm0-9.5a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z'/%3E%3C/svg%3E") center/contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M12 23s8-7.3 8-13A8 8 0 1 0 4 10c0 5.7 8 13 8 13Zm0-9.5a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z'/%3E%3C/svg%3E") center/contain no-repeat;
  filter: drop-shadow(0 2px 7px rgba(245,158,11,.4));
}

.logo span {
  color: var(--text-primary);
  font-weight: 800;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}

.nav-links a {
  padding: 6px 14px;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.nav-cta {
  background: var(--amber) !important;
  color: #000 !important;
  font-weight: 600 !important;
  padding: 8px 18px !important;
  border-radius: var(--radius) !important;
  transition: all var(--transition) !important;
}

.nav-cta:hover {
  background: var(--amber-light) !important;
  transform: translateY(-1px);
  box-shadow: var(--shadow-amber);
}

.lang-switcher {
  display: flex;
  gap: 4px;
}

.lang-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font-body);
}

.lang-btn:hover,
.lang-btn.active {
  border-color: var(--amber);
  color: var(--amber);
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  font-family: var(--font-body);
}

.btn-primary {
  background: var(--amber);
  color: #000;
}

.btn-primary:hover {
  background: var(--amber-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-amber);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-light);
}

.btn-outline:hover {
  border-color: var(--amber);
  color: var(--amber);
}

.btn-teal {
  background: var(--teal);
  color: #fff;
}

.btn-teal:hover {
  background: var(--teal-light);
  transform: translateY(-2px);
}

/* ── Cards ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all var(--transition);
  overflow: hidden;
}

.card:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

/* ── Badge ── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.badge-amber {
  background: var(--amber-glow);
  color: var(--amber);
  border: 1px solid rgba(245,158,11,0.3);
}

.badge-teal {
  background: var(--teal-glow);
  color: var(--teal-light);
  border: 1px solid rgba(13,148,136,0.3);
}

/* ── Section ── */
.section {
  padding: 80px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 48px;
}

.section-title h2 { margin-bottom: 12px; }

/* ── Footer ── */
.footer {
  border-top: 1px solid var(--border);
  padding: 40px 24px;
  margin-top: 80px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.875rem;
  transition: color var(--transition);
}

.footer-links a:hover { color: var(--amber); }

.footer-copy {
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* ── Input / Form ── */
.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.input-group label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.input-group input,
.input-group textarea,
.input-group select {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 12px 16px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.9rem;
  transition: border-color var(--transition);
  width: 100%;
}

.input-group input:focus,
.input-group textarea:focus,
.input-group select:focus {
  outline: none;
  border-color: var(--amber);
  box-shadow: 0 0 0 3px var(--amber-glow);
}

.input-group textarea { resize: vertical; min-height: 100px; }

/* ── Divider ── */
.divider {
  height: 1px;
  background: var(--border);
  margin: 40px 0;
}

/* ── Responsive ── */
.hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
}

@media (max-width: 768px) {
  .hamburger { display: block; }

  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0; right: 0;
    background: var(--bg-secondary);
    flex-direction: column;
    padding: 16px;
    border-bottom: 1px solid var(--border);
  }

  .nav-links.open { display: flex; }
  .nav-links a { width: 100%; padding: 12px 16px; }

  .section { padding: 48px 0; }
}

/* ── Animations ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes pulse-amber {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245,158,11,0.4); }
  50%       { box-shadow: 0 0 0 8px rgba(245,158,11,0); }
}

.animate-fade-up {
  animation: fadeUp 0.6s ease forwards;
}

.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }

/* ── Ambient depth + cursor light (site-wide premium pass) ── */
body::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(1100px 680px at 84% -10%, var(--amber-glow), transparent 58%),
    radial-gradient(820px 560px at -6% 10%, rgba(245,158,11,.05), transparent 55%),
    radial-gradient(1000px 760px at 50% 120%, rgba(245,158,11,.04), transparent 60%);
  opacity: .7;
}
.wn-cursor-glow {
  position: fixed; top: 0; left: 0; width: 340px; height: 340px; margin: -170px 0 0 -170px;
  border-radius: 50%; pointer-events: none; z-index: -1;
  background: radial-gradient(circle at center, rgba(245,158,11,.16), transparent 60%);
  opacity: 0; transition: opacity .5s ease; mix-blend-mode: screen; will-change: transform;
}
@media (prefers-reduced-motion: reduce) { .wn-cursor-glow { display: none; } }

/* ============================================================
   UNIFIED NAVBAR + FOOTER (shared across every page)
   Mirrors the homepage .wn-nav so all pages match exactly.
   ============================================================ */
.wn-nav {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--bg-primary) 78%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  padding: 0;
}
.wn-nav-inner {
  max-width: var(--maxw); margin: 0 auto; height: 68px; padding: 0 28px;
  display: flex; align-items: center; gap: 16px;
}
.wn-logo {
  font-family: var(--font-display); font-weight: 600; font-size: 1.4rem;
  letter-spacing: -.015em; color: var(--text-primary);
  display: flex; align-items: center; gap: 0; white-space: nowrap;
  direction: ltr;            /* brand wordmark always reads WinNechri, even in RTL */
}
.wn-logo::before {
  content:''; width: .92em; height: 1.04em; margin-inline-end: .34em; flex-shrink:0;
  background: var(--amber);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M12 23s8-7.3 8-13A8 8 0 1 0 4 10c0 5.7 8 13 8 13Zm0-9.5a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z'/%3E%3C/svg%3E") center/contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M12 23s8-7.3 8-13A8 8 0 1 0 4 10c0 5.7 8 13 8 13Zm0-9.5a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z'/%3E%3C/svg%3E") center/contain no-repeat;
  filter: drop-shadow(0 2px 7px color-mix(in srgb, var(--amber) 45%, transparent));
}
.wn-logo b { color: var(--text-primary); font-weight: 800; }
.wn-logo .ar { font-family: var(--font-arabic); font-size: .82rem; color: var(--text-muted); margin-inline-start: 9px; font-weight: 400; white-space: nowrap; }
.wn-nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin-inline-start: auto; }
.wn-nav-links a {
  padding: 8px 14px; border-radius: 9px; font-size: .9rem; font-weight: 500; white-space: nowrap;
  color: var(--text-secondary); text-decoration: none; transition: all .18s var(--ease);
}
.wn-nav-links a:hover, .wn-nav-links a.active { color: var(--text-primary); background: var(--bg-hover); }
.wn-cta {
  background: var(--amber) !important; color: #1a1206 !important; font-weight: 700 !important;
  padding: 9px 18px !important;
}
.wn-cta:hover { background: var(--amber-light) !important; box-shadow: 0 6px 22px var(--amber-glow); }
.wn-lang { display: flex; gap: 2px; padding: 3px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; }
.wn-lang button {
  background: none; border: none; color: var(--text-muted); font-family: var(--font-mono);
  font-size: .72rem; padding: 5px 9px; border-radius: 7px; cursor: pointer; transition: all .15s;
}
.wn-lang button:hover { color: var(--text-secondary); }
.wn-lang button.active { background: var(--amber-glow); color: var(--amber-light); }
.wn-burger { display: none; background: none; border: none; color: var(--text-primary); font-size: 1.4rem; cursor: pointer; }

.wn-foot { border-top: 1px solid var(--border); padding: 40px 0; margin-top: 40px; }
.wn-foot-inner { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.wn-foot-links { display: flex; gap: 22px; list-style: none; }
.wn-foot-links a { color: var(--text-muted); font-size: .86rem; text-decoration: none; transition: color .15s; }
.wn-foot-links a:hover { color: var(--amber); }
.wn-foot-copy { color: var(--text-muted); font-size: .84rem; }

/* keep Latin runs (URLs, @handles, phone) left-to-right inside RTL pages */
[dir="rtl"] .keep-ltr { direction: ltr; unicode-bidi: isolate; }

@media (max-width: 720px) {
  .wn-nav-inner { height: 60px; padding: 0 16px; gap: 8px; }
  .wn-logo .ar { display: none; }
  .wn-lang { display: none; }
  .wn-nav-links {
    display: none; position: absolute; top: 60px; inset-inline: 0;
    flex-direction: column; padding: 16px; gap: 4px;
    background: var(--bg-secondary); border-bottom: 1px solid var(--border); margin: 0;
  }
  .wn-nav-links.open { display: flex; }
  .wn-nav-links a { width: 100%; padding: 12px 16px; font-size: 1rem; }
  .wn-nav-links-lang {
    display: flex; gap: 2px; padding: 3px; margin-top: 8px;
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px;
    align-self: flex-start;
  }
  .wn-nav-links-lang button {
    background: none; border: none; color: var(--text-muted); font-family: var(--font-mono);
    font-size: .72rem; padding: 6px 12px; border-radius: 7px; cursor: pointer; transition: all .15s;
  }
  .wn-nav-links-lang button:hover { color: var(--text-secondary); }
  .wn-nav-links-lang button.active { background: var(--amber-glow); color: var(--amber-light); }
  .wn-burger {
    display: flex; align-items: center; justify-content: center;
    margin-inline-start: auto;
    min-width: 44px; min-height: 44px;
    font-size: 1.6rem;
  }
}

/* ============================================================
   LIGHT / DARK TOGGLE BUTTON (in the nav, beside the language switcher)
   ============================================================ */
.wn-mode {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 34px; flex-shrink: 0;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px;
  color: var(--text-secondary); cursor: pointer; padding: 0;
  transition: color .15s, border-color .15s, background .15s;
}
.wn-mode:hover { color: var(--amber); border-color: var(--amber); }
.wn-mode svg { width: 17px; height: 17px; display: block; }
.wn-mode .ico-moon { display: none; }
html[data-mode="light"] .wn-mode .ico-sun  { display: none; }
html[data-mode="light"] .wn-mode .ico-moon { display: block; }

/* ============================================================
   LIGHT MODE — shared component fixes (style.css pages)
   ============================================================ */
html[data-mode="light"] body::before { opacity: .45; }
html[data-mode="light"] .wn-cursor-glow {
  mix-blend-mode: multiply;
  background: radial-gradient(circle at center, color-mix(in srgb, var(--amber) 16%, transparent), transparent 60%);
}
/* hardcoded dark sticky bar on the Boutiques page → adaptive light */
html[data-mode="light"] .filters-bar { background: color-mix(in srgb, var(--bg-primary) 88%, transparent); }

/* ============================================================
   SITE-WIDE DRIFTING EMBERS (light mode)
   A calm field of warm motes rising behind the whole page.
   Built by motes.js; visible/animated only in light mode.
   ============================================================ */
.wn-motes {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden;
  opacity: 0;
}
html[data-mode="light"] .wn-motes { opacity: 1; }
.wn-motes i {
  position: absolute; border-radius: 50%;
  background: radial-gradient(circle, rgba(233,167,58,.95) 0%, rgba(224,144,30,.55) 50%, rgba(224,144,30,0) 72%);
  box-shadow: 0 0 6px 1px rgba(224,144,30,.30);
  opacity: 0; will-change: transform, opacity;
  animation: moteRise var(--dur, 20s) linear var(--delay, 0s) infinite;
  animation-play-state: paused;
}
html[data-mode="light"] .wn-motes i { animation-play-state: running; }
@keyframes moteRise {
  0%   { opacity: 0; transform: translate(0, 0) scale(.55); }
  12%  { opacity: .5; }
  88%  { opacity: .5; }
  100% { opacity: 0; transform: translate(var(--drift, 0px), calc(-100vh - 60px)) scale(1); }
}
@media (prefers-reduced-motion: reduce) { .wn-motes { display: none; } }
