/* ============================================================
   PerfumeGuide — shared theme
   Palette: "Bone & Rose". Warm bone paper, ink text, a deep
   couture rose accent (not bubblegum pink) and a muted gold
   hairline. Dark bands are near-black plum, the way niche
   fragrance houses present product.
   Legacy token names (--gold, --text-dim, ...) are kept as
   aliases so the legal pages inherit the palette untouched.
   ============================================================ */

:root {
  --bone: #faf7f3;
  --sand: #f2ebe3;
  --paper: #ffffff;
  --ink: #17130f;
  --ink-soft: rgba(23,19,15,0.62);
  --ink-mute: rgba(23,19,15,0.40);
  --rose: #c4485f;
  --rose-deep: #a8384d;
  --rose-soft: #e3a2ae;
  --rose-wash: #fbeff1;
  --metal: #a8874f;
  --line: rgba(23,19,15,0.10);
  --line-firm: rgba(23,19,15,0.20);

  --noir: #141110;
  --noir-2: #1e1a18;
  --noir-ink: #f3ebe1;
  --noir-mute: rgba(243,235,225,0.60);
  --noir-line: rgba(243,235,225,0.14);
  --noir-rose: #e8879c;
  --noir-metal: #c9a96a;

  --shadow-sm: 0 1px 2px rgba(23,19,15,0.05), 0 4px 14px -6px rgba(23,19,15,0.10);
  --shadow-md: 0 2px 6px rgba(23,19,15,0.05), 0 16px 36px -18px rgba(23,19,15,0.20);
  --shadow-lg: 0 30px 70px -28px rgba(23,19,15,0.35), 0 10px 28px -14px rgba(23,19,15,0.18);
  --max: 1140px;

  /* legacy aliases — used by privacy/terms/delete-account/reset-password */
  --bg: var(--bone);
  --bg-2: var(--rose-wash);
  --card: var(--paper);
  --card-border: var(--line);
  --text: var(--ink);
  --text-dim: var(--ink-soft);
  --text-faint: var(--ink-mute);
  --gold: var(--rose);
  --gold-bright: var(--rose-deep);
  --gold-dim: rgba(196,72,95,0.32);
  --rose-glow: rgba(196,72,95,0.07);
}

/* Three-state theme. The bare :root above is light. The media query covers
   "follow the device" (the default, no data-theme attribute set), and the
   explicit [data-theme] selectors let the nav toggle win in both directions. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bone: #100d0c;
    --sand: #171312;
    --paper: #1b1614;
    --ink: #f3ebe1;
    --ink-soft: rgba(243,235,225,0.64);
    --ink-mute: rgba(243,235,225,0.40);
    --rose: #e8879c;
    --rose-deep: #f0a3b3;
    --rose-soft: #7d4351;
    --rose-wash: #211619;
    --metal: #c9a96a;
    --line: rgba(243,235,225,0.12);
    --line-firm: rgba(243,235,225,0.22);
    --noir: #0a0808;
    --noir-2: #141110;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.4), 0 4px 14px -6px rgba(0,0,0,0.5);
    --shadow-md: 0 2px 6px rgba(0,0,0,0.4), 0 16px 36px -18px rgba(0,0,0,0.6);
    --shadow-lg: 0 30px 70px -28px rgba(0,0,0,0.75), 0 10px 28px -14px rgba(0,0,0,0.55);
    --gold-dim: rgba(232,135,156,0.32);
    --rose-glow: rgba(232,135,156,0.06);
  }
}
:root[data-theme="dark"] {
    --bone: #100d0c;
    --sand: #171312;
    --paper: #1b1614;
    --ink: #f3ebe1;
    --ink-soft: rgba(243,235,225,0.64);
    --ink-mute: rgba(243,235,225,0.40);
    --rose: #e8879c;
    --rose-deep: #f0a3b3;
    --rose-soft: #7d4351;
    --rose-wash: #211619;
    --metal: #c9a96a;
    --line: rgba(243,235,225,0.12);
    --line-firm: rgba(243,235,225,0.22);
    --noir: #0a0808;
    --noir-2: #141110;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.4), 0 4px 14px -6px rgba(0,0,0,0.5);
    --shadow-md: 0 2px 6px rgba(0,0,0,0.4), 0 16px 36px -18px rgba(0,0,0,0.6);
    --shadow-lg: 0 30px 70px -28px rgba(0,0,0,0.75), 0 10px 28px -14px rgba(0,0,0,0.55);
    --gold-dim: rgba(232,135,156,0.32);
    --rose-glow: rgba(232,135,156,0.06);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Sora', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bone);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { max-width: 100%; }
.serif { font-family: 'Fraunces', Georgia, 'Times New Roman', serif; }

:focus-visible {
  outline: 2px solid var(--rose);
  outline-offset: 3px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* ---- Shared nav ---- */
.pg-nav {
  position: sticky; top: 0; z-index: 500;
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 13px 26px;
  background: color-mix(in srgb, var(--bone) 82%, transparent);
  backdrop-filter: saturate(150%) blur(14px); -webkit-backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.pg-nav-logo {
  font-family: 'Fraunces', Georgia, serif; font-weight: 500; font-size: 17.5px;
  color: var(--ink); text-decoration: none; letter-spacing: -0.2px; white-space: nowrap;
}
.pg-nav-links { display: flex; gap: 26px; margin-left: auto; margin-right: 4px; }
.pg-nav-links a {
  font-size: 13px; font-weight: 500; color: var(--ink-soft); text-decoration: none;
  position: relative; padding: 4px 0; transition: color 0.16s ease;
}
.pg-nav-links a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 1px;
  background: var(--rose); transition: right 0.24s cubic-bezier(.2,.7,.3,1);
}
.pg-nav-links a:hover { color: var(--ink); }
.pg-nav-links a:hover::after { right: 0; }
.pg-nav-right { display: flex; align-items: center; gap: 12px; }
@media (max-width: 860px) { .pg-nav-links { display: none; } }

.pg-lang-switcher { position: relative; }
.pg-lang-btn {
  display: flex; align-items: center; gap: 6px;
  background: none; border: 1px solid var(--line-firm); border-radius: 999px;
  padding: 7px 12px; font-family: 'Sora', sans-serif; font-size: 12.5px; font-weight: 600;
  color: var(--ink-soft); cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.pg-lang-btn:hover { border-color: var(--rose); color: var(--ink); }
.pg-lang-caret { transition: transform 0.2s ease; }
.pg-lang-btn[aria-expanded="true"] .pg-lang-caret { transform: rotate(180deg); }
.pg-lang-menu {
  position: absolute; right: 0; top: calc(100% + 8px);
  background: var(--paper); border: 1px solid var(--line); border-radius: 12px;
  padding: 6px; min-width: 150px; list-style: none; margin: 0;
  box-shadow: var(--shadow-md);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
  z-index: 600;
}
.pg-lang-menu.open { opacity: 1; visibility: visible; transform: translateY(0); }
.pg-lang-menu li { padding: 9px 12px; border-radius: 7px; font-size: 13.5px; color: var(--ink-soft); cursor: pointer; }
.pg-lang-menu li:hover { background: var(--rose-wash); color: var(--ink); }
.pg-lang-menu li.active { color: var(--rose); font-weight: 600; }

/* ---- Shared buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: 'Sora', sans-serif; font-size: 14px; font-weight: 600;
  padding: 13px 24px; border-radius: 999px; text-decoration: none;
  border: 1px solid transparent; cursor: pointer;
  transition: transform 0.18s cubic-bezier(.2,.7,.3,1), background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.btn:hover { transform: translateY(-1.5px); }
.btn-solid { background: var(--ink); color: var(--bone); }
.btn-solid:hover { background: var(--rose-deep); }
.btn-outline { border-color: var(--line-firm); color: var(--ink); background: transparent; }
.btn-outline:hover { border-color: var(--rose); color: var(--rose); }

/* ---- Scroll reveal ---- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s cubic-bezier(.2,.7,.3,1), transform 0.7s cubic-bezier(.2,.7,.3,1); }
.reveal.in { opacity: 1; transform: none; }

/* ---- Shared footer ---- */
.pg-footer {
  border-top: 1px solid var(--line);
  background: var(--sand);
  padding: 56px 26px 40px;
}
.pg-footer-inner { max-width: var(--max); margin: 0 auto; }
.pg-footer-top { display: flex; flex-wrap: wrap; gap: 40px 64px; justify-content: space-between; }
.pg-footer-brand { max-width: 300px; }
.pg-footer-word { font-family: 'Fraunces', Georgia, serif; font-size: 21px; font-weight: 500; letter-spacing: -0.3px; }
.pg-footer-tag { margin: 10px 0 0; font-size: 13px; line-height: 1.65; color: var(--ink-soft); }
.pg-footer-cols { display: flex; flex-wrap: wrap; gap: 44px; }
.pg-footer-col h4 {
  margin: 0 0 14px; font-size: 10.5px; font-weight: 700; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--ink-mute);
}
.pg-footer-col a {
  display: block; margin-bottom: 10px; font-size: 13.5px; color: var(--ink-soft);
  text-decoration: none; transition: color 0.15s ease;
}
.pg-footer-col a:hover { color: var(--rose); }
.pg-footer-bottom {
  margin-top: 46px; padding-top: 22px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 10px 20px; justify-content: space-between;
  font-size: 12.5px; color: var(--ink-mute);
}

/* ---- Theme toggle ---- */
.pg-theme-btn {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; padding: 0;
  background: none; border: 1px solid var(--line-firm); border-radius: 999px;
  color: var(--ink-soft); cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.pg-theme-btn:hover { border-color: var(--rose); color: var(--ink); }
.pg-theme-btn svg { width: 16px; height: 16px; }
.pg-theme-btn .ico-moon { display: none; }
:root[data-theme="dark"] .pg-theme-btn .ico-moon { display: block; }
:root[data-theme="dark"] .pg-theme-btn .ico-sun { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .pg-theme-btn .ico-moon { display: block; }
  :root:not([data-theme="light"]) .pg-theme-btn .ico-sun { display: none; }
}
