/* ═══════════════════════════════════════════
   BEAUTÉ DIGEST — Shared Design System
   All public pages import this file.
   ═══════════════════════════════════════════ */

/* ───────────────────────────────────────────
   訂閱區暫時隱藏（2026-05-28）
   原因：Beehiiv 還沒接，form submit 是純前端模擬、實際不收 email
   Restore：Beehiiv embed URL 換進 index.html#subscribe form action 後刪掉這條
   ─────────────────────────────────────────── */
.subscribe-section,
.btn-subscribe,
a[href*="#subscribe"] {
  display: none !important;
}

:root {
  --ink: #1a1a1a;
  --ink-light: #3d3d3d;
  --cream: #faf7f2;
  --cream-dark: #f3ede4;
  --blush: #e8c4c4;
  --rose: #c47a7a;
  --deep-rose: #8b3a3a;
  --gold: #b8956a;
  --gold-light: #d4b896;
  --sage: #8a9a7b;
  --lavender: #9b8ec4;
  --soft-gray: #e8e4df;
  --mid-gray: #9a958e;
  --white: #ffffff;

  --font-display: 'Playfair Display', 'Cormorant Garamond', serif;
  --font-serif: 'Noto Serif TC', 'Cormorant Garamond', serif;
  --font-sans: 'Noto Sans TC', sans-serif;

  --max-width: 1120px;
  --content-width: 780px;
  --gap: 24px;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
::selection { background: var(--blush); color: var(--ink); }
html { scroll-behavior: smooth; }
a { color: inherit; text-decoration: none; }

body {
  font-family: var(--font-sans);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.85;
  font-weight: 300;
  overflow-x: hidden;
}

/* Noise texture overlay */
.noise-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none; z-index: 9999; opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ═══ TOPBAR ═══ */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(250,247,242,0.92);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(232,228,223,0.6);
  box-shadow: 0 1px 20px rgba(0,0,0,0.05);
}

.topbar-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  line-height: 1;
}
.topbar-logo .wm-command {
  display: inline-flex;
  align-items: baseline;
  gap: 0;
}
.topbar-logo .wm-slash {
  font-family: "Space Mono", monospace;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--rose);
}
.topbar-logo .wm-aily {
  font-family: "Space Mono", monospace;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.5px;
  color: var(--rose);
  text-transform: lowercase;
}
.topbar-logo .wm-divider {
  width: 1px;
  height: 0.95em;
  background: var(--rose);
  opacity: 0.5;
}
.topbar-logo .wm-beaute {
  font-family: "Bodoni Moda", serif;
  font-weight: 900;
  font-size: 1.05rem;
  letter-spacing: 2px;
  color: var(--ink);
}
/* backwards compat: <span> 內子品牌名 fallback */
.topbar-logo > span:not(.wm-aily):not(.wm-divider):not(.wm-beaute) {
  font-family: "Bodoni Moda", serif;
  font-weight: 900;
  letter-spacing: 2px;
  color: var(--ink);
}

.topbar-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.topbar-nav a {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--mid-gray);
  transition: color 0.2s;
  position: relative;
  text-decoration: none;
}

.topbar-nav a:hover { color: var(--ink); }

.topbar-nav a.active {
  color: var(--ink);
  font-weight: 600;
}

.topbar-nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--rose);
  transition: width 0.3s ease;
}

.topbar-nav a:hover::after,
.topbar-nav a.active::after {
  width: 100%;
}

.btn-subscribe {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 18px; background: var(--ink); color: var(--cream);
  font-size: 0.72rem; font-weight: 500; letter-spacing: 1.5px;
  text-transform: uppercase; border-radius: 100px; border: none; cursor: pointer;
  transition: background 0.2s;
}
.btn-subscribe:hover { background: var(--deep-rose); }

.nav-search-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  color: var(--ink-light); text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.nav-search-icon:hover { background: var(--ink); color: var(--cream); }
.nav-search-icon::after { display: none; }
.nav-search-icon svg { width: 15px; height: 15px; }

.mobile-toggle {
  display: none; background: none; border: none;
  font-size: 1.3rem; cursor: pointer; color: var(--ink);
}

@media (max-width: 768px) {
  .mobile-toggle { display: block; }
  .topbar-nav {
    display: none; position: absolute; top: 56px; left: 0; right: 0;
    background: var(--cream); border-bottom: 1px solid var(--soft-gray);
    flex-direction: column; padding: 20px 32px; gap: 16px;
  }
  .topbar-nav.open { display: flex; }
  .topbar-nav a::after { display: none; }
}

/* ═══ FADE-IN ANIMATION ═══ */
.fade-in {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ═══ SHARED FOOTER (方案 B — 極簡單行) ═══ */
.site-footer {
  background: var(--ink);
  color: var(--soft-gray);
  padding: 48px 32px 24px;
  text-align: center;
  font-size: 0.82rem;
  line-height: 1.7;
}
.site-footer .footer-brand {
  margin-bottom: 40px;
  display: inline-flex;
  align-items: baseline;
}
.site-footer .footer-brand .wm-command {
  display: inline-flex;
  align-items: baseline;
  gap: 0;
}
.site-footer .footer-brand .wm-slash {
  font-family: "Space Mono", monospace;
  font-weight: 700;
  font-size: 2.0rem;
  color: var(--rose);
}
.site-footer .footer-brand .wm-aily {
  font-family: "Space Mono", monospace;
  font-weight: 700;
  font-size: 2.0rem;
  letter-spacing: -1px;
  color: var(--rose);
  text-transform: lowercase;
}
.site-footer .footer-brand .wm-divider {
  display: inline-block;
  width: 1px;
  height: 1.5rem;
  background: var(--soft-gray);
  opacity: 0.4;
  margin: 0 14px;
}
.site-footer .footer-brand .wm-beaute {
  font-family: "Bodoni Moda", serif;
  font-weight: 900;
  font-size: 2.2rem;
  letter-spacing: 5px;
  color: var(--soft-gray);
}
.site-footer .footer-links {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 0;
  font-size: 0.92rem;
  letter-spacing: 0.5px;
  margin-bottom: 24px;
}
.site-footer .footer-links a {
  padding: 4px 18px;
  color: var(--soft-gray);
  border-right: 1px solid var(--ink-light);
  transition: color 0.2s;
}
.site-footer .footer-links a:last-child { border-right: none; }
.site-footer .footer-links a:hover { color: var(--rose); }
.site-footer .footer-bottom-line {
  font-size: 0.72rem;
  color: var(--mid-gray);
  font-family: 'Bodoni Moda', serif;
  font-style: italic;
  padding-top: 18px;
  border-top: 1px solid var(--ink-light);
  max-width: 640px;
  margin: 0 auto;
}
.site-footer .footer-bottom-line a {
  color: var(--rose);
  transition: opacity 0.2s;
}
.site-footer .footer-bottom-line a:hover { opacity: 0.7; }
@media (max-width: 768px) {
  .site-footer { padding: 36px 24px 20px; }
  .site-footer .footer-brand { margin-bottom: 20px; }
  .site-footer .footer-brand .wm-slash,
  .site-footer .footer-brand .wm-aily { font-size: 1.5rem; }
  .site-footer .footer-brand .wm-beaute { font-size: 1.6rem; letter-spacing: 4px; }
  .site-footer .footer-brand .wm-divider { height: 1.1rem; margin: 0 10px; }
  .site-footer .footer-links { font-size: 0.85rem; margin-bottom: 20px; }
  .site-footer .footer-links a { padding: 4px 12px; }
}


/* ═══════════════════════════════════════════
   ACCESSIBILITY
   ═══════════════════════════════════════════ */

/* Skip to content link (visible only on keyboard focus) */
.skip-to-content {
  position: absolute;
  top: -100px;
  left: 12px;
  background: var(--ink);
  color: var(--cream);
  padding: 10px 16px;
  text-decoration: none;
  font-size: 0.85rem;
  border-radius: 4px;
  z-index: 9999;
  transition: top 0.2s;
}
.skip-to-content:focus {
  top: 12px;
  outline: 2px solid var(--rose);
  outline-offset: 2px;
}

/* Keyboard-visible focus ring (preserves mouse-click hover behaviour) */
*:focus-visible {
  outline: 2px solid var(--rose);
  outline-offset: 3px;
  border-radius: 2px;
}
/* Suppress focus ring on mouse click — only show on keyboard */
*:focus:not(:focus-visible) {
  outline: none;
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .fade-in {
    opacity: 1 !important;
    transform: none !important;
  }
}
