/* Weegoes Universal Editorial Design System */
/* Google Fonts are loaded via a <link rel="stylesheet"> in each page <head>
   (see the SEO head block) so they are discovered by the preload scanner
   instead of blocking on this stylesheet. */

:root {
  /* Color Palette */
  --bg-page: #FAF9F6;
  --bg-surface: #FFFFFF;
  --bg-subtle: #F4F1EB;
  --bg-hover: #EFECE6;

  --text-primary: #242424;
  --text-secondary: #77736E;
  --text-muted: #A19D97;

  --accent: #F46D82;
  --accent-soft: #FFE4E8;
  --accent-hover: #E85B72;

  --border-light: #E8E5DF;
  --border-subtle: #F0ECE4;
  --border-focus: #242424;

  /* Typography */
  --font-serif: 'Instrument Serif', Georgia, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: ui-monospace, 'SF Mono', Menlo, Monaco, Consolas, monospace;

  /* Radii - Architectural & Refined (No Pill Bubbles) */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;

  /* Elevation */
  --shadow-subtle: 0 1px 3px rgba(36, 36, 36, 0.04), 0 1px 2px rgba(36, 36, 36, 0.02);
  --shadow-card: 0 4px 12px rgba(36, 36, 36, 0.05), 0 1px 3px rgba(36, 36, 36, 0.03);
  --shadow-float: 0 12px 32px rgba(36, 36, 36, 0.08), 0 2px 6px rgba(36, 36, 36, 0.04);
}

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

html {
  font-size: 16px;
  background-color: var(--bg-page);
  color: var(--text-primary);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Refined Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-page);
}
::-webkit-scrollbar-thumb {
  background: #D8D4CC;
  border-radius: var(--radius-xs);
}
::-webkit-scrollbar-thumb:hover {
  background: #BFB9AE;
}

/* Links */
a {
  color: inherit;
  text-decoration: none;
}

/* Focus States */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Universal Weegoes Header Bar */
.weegoes-header,
.weegoes-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 54px;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  background: rgba(250, 249, 246, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
}

.weegoes-header-left,
.weegoes-nav-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.weegoes-brand {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  text-decoration: none;
  color: var(--text-primary);
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 400;
  letter-spacing: -0.02em;
}

.weegoes-brand-text {
  font-family: var(--font-serif);
  font-size: 24px;
  color: var(--text-primary);
}

.weegoes-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 500;
  transition: all 0.15s ease;
  cursor: pointer;
}

.weegoes-back-btn:hover {
  background: var(--bg-subtle);
  border-color: #D8D4CC;
}

.weegoes-back-btn svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
}

.weegoes-header-center,
.weegoes-nav-center {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0 10px;
}

.weegoes-badge,
.weegoes-active-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  padding: 4px 10px;
  border-radius: var(--radius-xs);
}

.weegoes-header-right,
.weegoes-nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.weegoes-tool-btn,
.nav-icon-btn {
  width: 34px;
  height: 34px;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 13px;
  text-decoration: none;
}

.weegoes-tool-btn:hover,
.nav-icon-btn:hover {
  background: var(--bg-subtle);
  border-color: #D8D4CC;
}

.weegoes-tool-btn svg,
.nav-icon-btn svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
}

.weegoes-tool-btn.sound-muted,
.nav-icon-btn.sound-muted {
  color: var(--text-muted);
  opacity: 0.55;
}

.weegoes-brand-logo {
  width: 24px;
  height: 24px;
  background: var(--text-primary);
  color: #FAF9F6;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  flex-shrink: 0;
}

.weegoes-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.weegoes-share-btn:hover {
  background: var(--bg-subtle);
  border-color: #D8D4CC;
}

.weegoes-share-btn svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
}

.weegoes-btn-text {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}

.weegoes-btn-text:hover {
  background: var(--bg-subtle);
  border-color: #D8D4CC;
}

.weegoes-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--accent);
  color: #FFFFFF;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease;
  text-decoration: none;
}

.weegoes-btn-primary:hover {
  background: var(--accent-hover);
}

/* Shared header navigation links (styled here so every page matches) */
.weegoes-nav-links {
  display: flex;
  gap: 4px;
  align-items: center;
}

.weegoes-nav-link {
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.weegoes-nav-link:hover {
  background: var(--bg-subtle);
  color: var(--text-primary);
}

.weegoes-nav-link.active {
  color: var(--text-primary);
  font-weight: 600;
  background: var(--bg-subtle);
}

/* Respect reduced-motion preferences site-wide */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* Toast Message */
.weegoes-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(40px);
  opacity: 0;
  background: var(--text-primary);
  color: #FFFFFF;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-float);
  z-index: 10000;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.weegoes-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Mobile Navigation (hamburger + slide-down menu) */
.weegoes-menu-btn {
  display: none;
  width: 34px;
  height: 34px;
  padding: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: background 0.15s ease, border-color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.weegoes-menu-btn:hover {
  background: var(--bg-subtle);
  border-color: #D8D4CC;
}

.weegoes-menu-btn span {
  display: block;
  width: 16px;
  height: 1.6px;
  border-radius: 2px;
  background: var(--text-primary);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.weegoes-menu-btn.open span:nth-child(1) {
  transform: translateY(5.6px) rotate(45deg);
}
.weegoes-menu-btn.open span:nth-child(2) {
  opacity: 0;
}
.weegoes-menu-btn.open span:nth-child(3) {
  transform: translateY(-5.6px) rotate(-45deg);
}

.weegoes-mobile-menu {
  position: fixed;
  top: 54px;
  left: 0;
  right: 0;
  z-index: 999;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-light);
  box-shadow: var(--shadow-card);
  transform: translateY(-8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

.weegoes-mobile-menu.open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.weegoes-mobile-menu-inner {
  display: flex;
  flex-direction: column;
  padding: 8px 16px 14px;
}

.weegoes-mobile-menu-inner a {
  padding: 13px 6px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-subtle);
}

.weegoes-mobile-menu-inner a:last-child {
  border-bottom: none;
}

.weegoes-mobile-menu-inner a.active {
  color: var(--accent);
}

@media (prefers-reduced-motion: reduce) {
  .weegoes-mobile-menu,
  .weegoes-menu-btn span {
    transition: none;
  }
}

/* Mobile / tablet Responsiveness for Universal Top Bar */
@media (max-width: 820px) {
  .weegoes-menu-btn {
    display: flex;
  }

  .weegoes-mobile-menu {
    top: 50px;
  }

  .weegoes-header,
  .weegoes-nav {
    padding: 0 12px;
    height: 50px;
  }

  .weegoes-header-center,
  .weegoes-nav-center {
    display: none; /* Avoid overlapping on compact mobile screens */
  }

  .weegoes-brand {
    font-size: 22px;
  }

  .weegoes-back-btn span {
    display: inline;
    font-size: 12px;
  }

  .weegoes-back-btn {
    padding: 5px 9px;
  }

  .weegoes-tool-btn,
  .nav-icon-btn {
    width: 32px;
    height: 32px;
  }
}
