/*!
 * Wendi design system, v1.2.0
 * SINGLE SOURCE OF TRUTH for the main site, Woof (Grav) and the shop.
 * Edit THIS file, then run `python3 scripts/sync_design.py` from the repo root.
 * The script copies it into each theme; do not edit the copies.
 * Do not hotlink one public URL from all three sites.
 *
 * Contents: 1 page tokens + dusk tokens, 2 base type and a11y, 3 shared surfaces,
 * 4 shared chips/buttons, 5 shared footer (wf-*), 6 consent banner, 7 navigation and language controls.
 *
 * Two token families on purpose:
 *   --bg-1 / --primary / --text …  page chrome; flips with [data-theme="light"]
 *   --w-*                          dusk panels (footer, heroes); stay night-pink
 */

/* ---------- 1. Fonts and tokens ---------- */
/* Same Google Fonts request on every site (see FONT_LINK in scripts/sync_design.py):
   https://fonts.googleapis.com/css2?family=Quicksand:wght@500;600;700&display=swap */
:root {
  --bg-1: #180914;
  --bg-2: #23101e;
  --bg-3: #2f1628;
  --surface: #26121f;
  --surface-2: #311829;
  --surface-3: #3b1d33;
  --surface-soft: rgba(255, 255, 255, 0.06);
  --border: #5c3851;
  --line: rgba(255, 255, 255, 0.12);
  --text: #fff0f9;
  --muted: #d8b0c8;
  --primary: #ff8fc4;
  --primary-2: #ffb0dd;
  --primary-deep: #ff6eb3;
  --primary-dark: #e85aa0;
  --primary-gradient: linear-gradient(to right, var(--primary), var(--primary-2));
  --accent: #d7a4ff;
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.34);
  --shadow-soft: 0 8px 20px rgba(0, 0, 0, 0.24);
  --shadow-sm: 0 10px 30px rgba(114, 62, 92, 0.18);
  --radius-sm: 14px;
  --radius-md: 22px;
  --radius-lg: 30px;
  --radius-full: 9999px;

  --w-font: "Quicksand", system-ui, -apple-system, "Segoe UI", Roboto, "Hiragino Sans", "Noto Sans JP", sans-serif;
  --font-display: var(--w-font);
  --font-body: var(--w-font);
  --font-size: 16px;
  --w-ink: #2a0f22;
  --w-cream: #fff0f9;
  --w-blush: #e6c4d8;
  --w-pink: #ff8fc4;
  --w-pink-2: #ffb0dd;
  --w-violet: #d7a4ff;
  --w-gold: #ffd9a0;
  --w-night-1: #1b0b20;
  --w-night-2: #180914;
  --w-radius-panel: 32px;
  --w-radius-card: 24px;
  --w-ease: cubic-bezier(.2, .8, .2, 1);
  --w-grad-cta: linear-gradient(135deg, var(--w-pink-2), var(--w-pink));
  --w-grad-text: linear-gradient(100deg, var(--w-pink-2), var(--w-violet) 55%, var(--w-gold));
  --w-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

:root[data-theme="light"],
[data-theme="light"] {
  --bg-1: #fff2fb;
  --bg-2: #ffe6f3;
  --bg-3: #ffd4ea;
  --surface: #fffafc;
  --surface-2: #fff4f9;
  --surface-3: #ffeaf5;
  --surface-soft: rgba(255, 255, 255, 0.78);
  --border: #f1c6de;
  --line: rgba(133, 86, 116, 0.14);
  --text: #4d2441;
  --muted: #8e6781;
  --primary: #ff79b7;
  --primary-2: #ff9dce;
  --primary-deep: #e85aa0;
  --primary-dark: #d14a8c;
  --primary-gradient: linear-gradient(to right, var(--primary), var(--primary-2));
  --accent: #b67dff;
  --shadow: 0 18px 44px rgba(171, 74, 131, 0.14);
  --shadow-soft: 0 8px 20px rgba(171, 74, 131, 0.08);
  --shadow-sm: 0 10px 30px rgba(171, 74, 131, 0.1);
}

/* ---------- 2. Base type and accessibility ---------- */
html {
  font-size: var(--font-size);
  scroll-behavior: smooth;
}
body,
button, input, select, textarea,
h1, h2, h3, h4, h5, h6,
.title-font, .body-font {
  font-family: var(--w-font);
}
body {
  font-size: 1rem;
  line-height: 1.55;
  font-weight: 500;
}
h1, h2, h3 { font-weight: 700; letter-spacing: 0; word-spacing: .05em; text-wrap: balance; }
:focus-visible { outline: 3px solid var(--w-violet); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ---------- 3. Shared "dusk" surface ----------
   Every hero / panel on every site uses this exact recipe. */
.cine, .wf-panel, .hp-closing, .woof-masthead, .wldr-disco-intro, .wldr-hero,
.about-hero, .about-closing, .contact-hero, .shop-hero {
  position: relative;
  isolation: isolate;
  overflow: clip;
  color: var(--w-cream);
  border-radius: var(--w-radius-panel);
  background:
    radial-gradient(110% 90% at 85% 0%, #5a2a66 0%, transparent 60%),
    radial-gradient(90% 80% at 0% 100%, #7a2f55 0%, transparent 60%),
    linear-gradient(180deg, var(--w-night-1), var(--w-night-2));
}
.cine::after, .wf-panel::after, .hp-closing::after, .woof-masthead::after, .wldr-disco-intro::after,
.wldr-hero::after, .about-hero::after, .about-closing::after, .contact-hero::after, .shop-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: .05;
  mix-blend-mode: overlay;
  pointer-events: none;
  background-image: var(--w-grain);
}

/* ---------- 4. Shared chips, gradient text, primary button ---------- */
.hp-kicker, .woof-eyebrow, .wldr-eyebrow, .about-eyebrow, .contact-eyebrow, .shop-hero-eyebrow, .cine-eyebrow {
  display: inline-block;
  padding: .3rem .85rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: .78rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--w-gold);
  background: rgba(255, 217, 160, .08);
  border: 1px solid rgba(255, 217, 160, .28);
}
.hp-btn--primary, .about-btn--primary, .wldr-btn--primary, .wf-btn--primary, .cine-btn-primary {
  color: var(--w-ink);
  border-color: transparent;
  background: var(--w-grad-cta);
}

/* ---------- 5. Shared footer (markup: footer.wf in all three themes) ---------- */
.wf { margin-top: clamp(3rem, 8vw, 5rem); padding: 0 0 .75rem; }
.wf-inner { max-width: 1180px; margin-inline: auto; padding-inline: 16px; }
.wf-panel { display: grid; gap: clamp(1.5rem, 4vw, 3rem); grid-template-columns: 1fr; padding: clamp(1.5rem, 4vw, 3rem); }
@media (min-width: 960px) { .wf-panel { grid-template-columns: minmax(240px, 1fr) 2fr; } }
.wf-logo img { display: block; width: 150px; height: auto; }
.wf-tagline { max-width: 30ch; margin: .75rem 0 1.1rem; color: var(--w-blush); font-size: 1.05rem; line-height: 1.5; }
.wf-cta { display: flex; flex-wrap: wrap; gap: .6rem; }
.wf-btn {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: .55rem 1.2rem;
  border-radius: 999px;
  font-family: var(--w-font);
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--w-cream);
  border: 1.5px solid rgba(255, 240, 249, .35);
  transition: transform .2s, background .2s;
}
.wf-btn:hover { transform: translateY(-2px); background: rgba(255, 255, 255, .1); }
.wf-btn--primary { color: var(--w-ink); border-color: transparent; background: var(--w-grad-cta); }
.wf-btn--primary:hover { background: linear-gradient(135deg, #ffc4e6, var(--w-pink-2)); }
.wf-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1.5rem 2rem; align-content: start; }
.wf-col { display: block; margin: 0; padding: 0; background: none; border: 0; }
.wf-col-title { display: block; margin: 0 0 .75rem; padding: 0; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--w-gold); }
.wf-col-title::before, .wf-col-title::after { content: none; display: none; }
.wf-col ul, .wf-legal { margin: 0; padding: 0; list-style: none; }
.wf-col ul { display: grid; gap: .1rem; }
.wf-col li, .wf-legal li { margin: 0; padding: 0; list-style: none; }
.wf-col li::before, .wf-col li::marker, .wf-legal li::before, .wf-legal li::marker { content: none; display: none; }
.wf-col a { display: inline-flex; align-items: center; gap: .5rem; min-height: 36px; padding-block: .3rem; font-family: var(--w-font); font-size: 1rem; line-height: 1.35; color: var(--w-cream); text-decoration: none; transition: color .2s, transform .2s; }
.wf-col a:hover { color: var(--w-pink-2); transform: translateX(3px); }
.wf-col a i { width: 1.2em; text-align: center; color: var(--w-pink); }
.wf-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem 1.5rem; margin-top: 1.25rem; padding: 0 .5rem; font-size: .92rem; color: var(--muted, var(--w-blush)); }
.wf-bottom p { margin: 0; }
.wf-legal { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; }
.wf-legal a, .wf-linkbtn { color: inherit; text-decoration: underline; text-underline-offset: .2em; }
.wf-linkbtn { padding: 0; border: 0; font: inherit; background: none; cursor: pointer; }
.wf-legal a:hover, .wf-linkbtn:hover { color: var(--w-pink); }
.wf-top { text-decoration: none !important; font-weight: 700; }
.wf a:focus-visible, .wf-linkbtn:focus-visible { outline: 3px solid var(--w-violet); outline-offset: 3px; border-radius: 8px; }

/* ---------- 6. Consent banner (same look on all sites) ---------- */
.consent-banner, .wendi-consent {
  position: fixed;
  inset: auto 1rem 1rem 1rem;
  z-index: 1000;
  max-width: 36rem;
  margin-inline: auto;
  padding: 1rem;
  border-radius: 1rem;
  color: var(--w-cream);
  background: #26121f;
  border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .45);
}
.consent-banner p, .wendi-consent p { margin: 0 0 .75rem; }
.consent-actions, .wendi-consent-actions { display: flex; flex-wrap: wrap; gap: .5rem; }

/* ---------- 7. Shared navigation, language controls and footer settings ---------- */
body .wendi-langs {
  display: inline-flex; flex-wrap: wrap; align-items: center; gap: .15rem;
  width: fit-content; max-width: 100%; margin: 0; padding: .2rem;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface-soft); font-family: var(--w-font); line-height: 1.3;
}
body .wendi-langs .wendi-lang {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 36px; margin: 0; padding: .3rem .8rem; border: 0; border-radius: 999px;
  font: inherit; font-size: .85rem; font-weight: 700; letter-spacing: normal;
  color: var(--text); text-decoration: none; white-space: nowrap; transform: none;
}
body .wendi-langs .wendi-lang:hover { color: var(--text); background: var(--surface-3); transform: none; }
body .wendi-langs .wendi-lang[aria-current="true"] {
  color: var(--w-ink, #2a0f22); background: var(--w-grad-cta); text-decoration: none;
}
body .wendi-langs .wendi-lang:focus-visible,
body .wendi-menu-toggle:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
body .wendi-header .i18n-controls,
body #top-bar .i18n-controls { display: flex; align-items: center; gap: .5rem; position: static; width: auto; height: auto; flex-shrink: 0; }
body .wendi-header .nav-langs { display: none; }
body .wendi-menu-toggle.hamburger-toggle,
body .wendi-menu-toggle.nav-hamburger {
  position: relative; z-index: 10020; display: none; flex: 0 0 44px;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  width: 44px; height: 44px; margin: 0; padding: 0;
  color: var(--primary); background: var(--surface); border: 1px solid var(--line);
  border-radius: 50%; cursor: pointer; box-shadow: none; transform: none;
}
body .wendi-menu-toggle.nav-hamburger { display: flex; }
body .wendi-menu-toggle:hover { background: var(--surface-3); transform: none; }
body .wendi-menu-toggle > span {
  position: static; display: block; flex: 0 0 2px; width: 20px; height: 2px;
  margin: 0; border-radius: 2px; background: currentColor;
  transition: transform .2s ease, opacity .2s ease;
}
body .wendi-menu-toggle[aria-expanded="true"] > span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body .wendi-menu-toggle[aria-expanded="true"] > span:nth-child(2) { opacity: 0; }
body .wendi-menu-toggle[aria-expanded="true"] > span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
body .wf { margin-top: clamp(3rem, 8vw, 5rem); padding: 0 0 .75rem; }
body .wf .wf-settings { display: grid; gap: .8rem; margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--w-line, rgba(255,255,255,.15)); }
body .wf-settings .wf-col-title { margin: 0; }
body .wf .wf-setting { display: grid; justify-items: start; gap: .4rem; }
body .wf .wf-setting-label { margin: 0; color: var(--w-cream); font-size: .9rem; line-height: 1.5; }
body .wf .wendi-langs { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.18); }
body .wf .wendi-langs .wendi-lang { color: var(--w-cream); min-height: 36px; padding: .3rem .8rem; font-size: .85rem; }
body .wf .wendi-langs .wendi-lang:hover { background: rgba(255,255,255,.1); color: var(--w-cream); transform: none; }
body .wf .wendi-langs .wendi-lang[aria-current="true"] { color: var(--w-ink); background: var(--w-grad-cta); }
/* Shop's old footer theme uses !important links; scope the compatibility reset. */
body #colophon.wf .wendi-langs .wendi-lang { color: var(--w-cream) !important; }
body #colophon.wf .wendi-langs .wendi-lang[aria-current="true"] { color: var(--w-ink) !important; }
body #colophon.wf .wendi-langs .wendi-lang:hover { transform: none; }
body .wf .wf-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 640px) {
  body .wf .wf-cols { grid-template-columns: 1fr; gap: 1.5rem; }
  body .wf .wf-bottom { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 1024px) {
  body .wendi-header .wendi-menu-toggle { display: flex; }
  body .wendi-header .topbar { justify-content: space-between; gap: .75rem; }
  body .wendi-header .site-nav {
    display: flex; flex-direction: column; position: fixed !important;
    top: 0 !important; left: 0 !important; width: min(320px, 86vw);
    height: 100vh; height: 100dvh; margin: 0; padding: 88px 20px 24px;
    background: var(--surface) !important; box-shadow: 8px 0 24px rgba(0,0,0,.28);
    transform: translateX(-110%); transition: transform .25s ease;
    z-index: 10000; overflow-y: auto; visibility: hidden;
  }
  body .wendi-header .site-nav.active { transform: translateX(0); visibility: visible; }
  body .wendi-header .site-nav ul { display: flex; flex-direction: column; align-items: stretch; width: 100%; margin: 0; padding: 0; gap: .65rem; }
  body .wendi-header .site-nav li { display: block; margin: 0; width: 100%; }
  body .wendi-header .site-nav li > a { display: block; width: 100%; }
  body .wendi-header .i18n-controls .wendi-langs { display: none; }
  body .wendi-header .site-nav .nav-langs { display: block; margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--line); }
  body .nav-overlay { position: fixed; inset: 0; z-index: 9990; display: none; background: rgba(0,0,0,.5); }
  body .nav-overlay.active { display: block; }
  body #top-bar .top-bar-inner { gap: .5rem; }
}
@media (prefers-reduced-motion: reduce) {
  body .wendi-menu-toggle > span, body .wendi-header .site-nav { transition: none; }
}
/* Keep WooCommerce's tools and persistent sidebar within the same component sizes. */
body #top-bar .top-bar-right { display: flex; align-items: center; justify-content: flex-end; gap: .5rem; width: auto; min-width: 0; }
body #top-bar .top-bar-left { width: auto; flex-shrink: 0; }
body #top-bar .top-bar-center { flex: 1; min-width: 0; }
body #nav-sidebar { width: min(320px, 86vw); max-width: 86vw; height: 100dvh; background: var(--surface); }
body #nav-sidebar .nav-sidebar-inner { padding: 88px 20px 24px; }
body #nav-sidebar .nav-langs { display: block; margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--line); }
body.nav-sidebar-open #nav-overlay { display: block; }
@media (max-width: 1024px) { body #top-bar .i18n-controls .wendi-langs { display: none; } }
/* Opaque drawer surfaces keep content readable over animated heroes. */
:root { --wendi-nav-surface: #26121f; }
[data-theme="light"] { --wendi-nav-surface: #fff4f9; }
body .wendi-menu-toggle.hamburger-toggle,
body .wendi-menu-toggle.nav-hamburger { color: var(--w-pink); background: var(--wendi-nav-surface); }
body #nav-sidebar,
body .wendi-header .site-nav.active { background: var(--wendi-nav-surface) !important; }
body .wendi-langs .wendi-lang[aria-current="true"] { background: var(--w-grad-cta); }
@media (max-width: 1024px) {
  body .wendi-header .topbar { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; }
  body .wendi-header .brand { justify-self: center; }
  body .wendi-header .nav-wrapper { justify-self: end; }
  body .wendi-header .theme-toggle { width: 44px; height: 44px; }
  body .wendi-header .site-nav li > a { display: flex; align-items: center; min-height: 44px; padding: .75rem 1rem; line-height: 1.4; font-weight: 700; }
}
/* Shared two-state appearance control. Footer surfaces retain their dusk palette. */
body .wendi-appearance { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 44px; height: 44px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--primary); font-size: 24px; line-height: 1; cursor: pointer; }
body .wendi-appearance:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.appearance-moon { display: none; }
[data-theme="light"] .appearance-sun { display: none; }
[data-theme="light"] .appearance-moon { display: inline; }
body .wf .wendi-appearance { background: rgba(255,255,255,.06); color: var(--w-pink); border-color: rgba(255,255,255,.18); }
html[data-theme="light"] body { color-scheme: light; color: var(--text); background: linear-gradient(180deg, #fff8fb, #fff1f7); }
html[data-theme="light"] body #top-bar { background: rgba(255,248,251,.94); }
html[data-theme="light"] body #top-bar #searchicon,
html[data-theme="light"] body #top-bar .top-account { color: var(--text); background: var(--surface); }
