/*
 * WTF Design System v1.0
 * Shared across all WTF family sites
 * Include: <link rel="stylesheet" href="/_shared/wtf-design-system.css">
 * Then set --wtf-accent, --wtf-accent-hover, --wtf-accent-glow per site
 */

/* === FONT === */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

/* === TOKENS === */
:root {
  /* Backgrounds */
  --wtf-bg: #0f172a;
  --wtf-bg-raised: #1e293b;
  --wtf-bg-input: #0c1524;

  /* Text */
  --wtf-text: #f1f5f9;
  --wtf-text-muted: #94a3b8;
  --wtf-text-dim: #64748b;

  /* Borders */
  --wtf-border: rgba(255, 255, 255, 0.08);
  --wtf-border-hover: rgba(255, 255, 255, 0.16);

  /* Accent — override per site after importing this file */
  --wtf-accent: #f59e0b;
  --wtf-accent-hover: #d97706;
  --wtf-accent-glow: rgba(245, 158, 11, 0.15);

  /* Per-app accent palette (for cross-link grids) */
  --wtf-c-suite: #f59e0b;
  --wtf-c-worth: #eab308;
  --wtf-c-fee: #10b981;
  --wtf-c-health: #14b8a6;
  --wtf-c-budget: #22c55e;
  --wtf-c-contract: #6366f1;
  --wtf-c-charge: #3b82f6;
  --wtf-c-subscription: #10b981;

  /* Status */
  --wtf-green: #22c55e;
  --wtf-red: #ef4444;
  --wtf-yellow: #eab308;

  /* Radii */
  --wtf-radius-sm: 8px;
  --wtf-radius: 12px;
  --wtf-radius-lg: 16px;
  --wtf-radius-pill: 24px;

  /* Glass */
  --wtf-glass-bg: rgba(255, 255, 255, 0.04);
  --wtf-glass-border: rgba(255, 255, 255, 0.08);
  --wtf-glass-blur: 12px;

  /* Shadows */
  --wtf-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
  --wtf-shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.4);
}

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

/* === BASE === */
html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--wtf-bg);
  color: var(--wtf-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

a { color: var(--wtf-accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--wtf-accent-hover); }
img { max-width: 100%; height: auto; }

/* === LAYOUT === */
.wtf-container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.wtf-container-sm { max-width: 800px; margin: 0 auto; padding: 0 24px; }
.wtf-container-wide { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* === NAV === */
.wtf-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--wtf-border);
  padding: 14px 0;
}
.wtf-nav .wtf-container { display: flex; align-items: center; justify-content: space-between; }
.wtf-nav-logo { font-size: 1.4rem; font-weight: 800; letter-spacing: -0.02em; color: var(--wtf-text); }
.wtf-nav-logo span { color: var(--wtf-accent); }
.wtf-nav-links { display: flex; gap: 28px; align-items: center; }
.wtf-nav-links a { color: var(--wtf-text-muted); font-size: 0.9rem; font-weight: 500; }
.wtf-nav-links a:hover { color: var(--wtf-text); }
.wtf-nav-cta {
  background: var(--wtf-accent); color: #000 !important; padding: 8px 20px;
  border-radius: var(--wtf-radius-sm); font-weight: 600; font-size: 0.875rem;
  transition: background 0.2s;
}
.wtf-nav-cta:hover { background: var(--wtf-accent-hover); color: #000 !important; }

/* Mobile hamburger */
.wtf-nav-toggle {
  display: none; background: none; border: none; cursor: pointer;
  width: 32px; height: 32px; position: relative; flex-shrink: 0;
}
.wtf-nav-toggle span {
  display: block; width: 22px; height: 2px; background: var(--wtf-text);
  position: absolute; left: 5px; transition: all 0.3s;
}
.wtf-nav-toggle span:nth-child(1) { top: 8px; }
.wtf-nav-toggle span:nth-child(2) { top: 15px; }
.wtf-nav-toggle span:nth-child(3) { top: 22px; }
.wtf-nav-toggle.active span:nth-child(1) { transform: rotate(45deg); top: 15px; }
.wtf-nav-toggle.active span:nth-child(2) { opacity: 0; }
.wtf-nav-toggle.active span:nth-child(3) { transform: rotate(-45deg); top: 15px; }

/* === BUTTONS === */
.wtf-btn {
  display: inline-block; padding: 14px 32px; border-radius: 10px;
  font-weight: 700; font-size: 1.05rem; border: none; cursor: pointer;
  transition: all 0.2s; text-align: center; line-height: 1.4;
  font-family: inherit;
}
.wtf-btn-primary { background: var(--wtf-accent); color: #000; }
.wtf-btn-primary:hover { background: var(--wtf-accent-hover); transform: translateY(-1px); color: #000; }
.wtf-btn-secondary {
  background: var(--wtf-glass-bg); color: var(--wtf-text);
  border: 1px solid var(--wtf-border);
}
.wtf-btn-secondary:hover { border-color: var(--wtf-accent); background: rgba(255,255,255,0.06); color: var(--wtf-text); }
.wtf-btn-block { display: block; width: 100%; }

/* === GLASS CARD === */
.wtf-glass {
  background: var(--wtf-glass-bg);
  backdrop-filter: blur(var(--wtf-glass-blur)); -webkit-backdrop-filter: blur(var(--wtf-glass-blur));
  border: 1px solid var(--wtf-glass-border);
  border-radius: var(--wtf-radius);
  transition: all 0.3s;
}
.wtf-glass:hover {
  border-color: var(--wtf-border-hover);
  box-shadow: var(--wtf-shadow);
}

/* === SECTION === */
.wtf-section { padding: 100px 0; }
.wtf-section-header { text-align: center; margin-bottom: 60px; }
.wtf-section-header h2 {
  font-size: 2.5rem; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 16px;
}
.wtf-section-header p { color: var(--wtf-text-muted); font-size: 1.1rem; max-width: 520px; margin: 0 auto; }

/* === HERO (shared skeleton, override per site) === */
.wtf-hero {
  padding: 150px 0 100px; text-align: center;
  position: relative; overflow: hidden;
}
.wtf-hero::before {
  content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 800px; height: 600px;
  background: radial-gradient(ellipse, var(--wtf-accent-glow) 0%, transparent 70%);
  pointer-events: none;
}
.wtf-hero-badge {
  display: inline-block; padding: 6px 16px; border-radius: var(--wtf-radius-pill);
  font-size: 0.85rem; font-weight: 600; color: var(--wtf-accent);
  background: var(--wtf-accent-glow); border: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 24px; position: relative;
}
.wtf-hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.2rem); font-weight: 800;
  letter-spacing: -0.03em; line-height: 1.1; margin-bottom: 24px;
  position: relative;
}
.wtf-hero h1 span { color: var(--wtf-accent); }
.wtf-hero p {
  font-size: 1.2rem; color: var(--wtf-text-muted);
  max-width: 580px; margin: 0 auto 40px; position: relative;
}
.wtf-hero-buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; position: relative; }

/* === WTF FAMILY PROMO GRID === */
.wtf-family-section { padding: 80px 0; border-top: 1px solid var(--wtf-border); }
.wtf-family-section .wtf-section-header { margin-bottom: 40px; }
.wtf-family-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px;
}
.wtf-family-card {
  padding: 24px; display: flex; flex-direction: column; text-decoration: none !important;
}
.wtf-family-card:hover { transform: translateY(-3px); }
.wtf-family-card-icon { font-size: 1.5rem; margin-bottom: 8px; }
.wtf-family-card-name { font-size: 1.05rem; font-weight: 700; color: var(--wtf-text); margin-bottom: 2px; }
.wtf-family-card-price { font-size: 0.8rem; font-weight: 600; margin-bottom: 8px; }
.wtf-family-card-desc { color: var(--wtf-text-muted); font-size: 0.85rem; flex: 1; line-height: 1.5; }
.wtf-family-card-cta { display: inline-block; margin-top: 12px; font-size: 0.8rem; font-weight: 600; }

/* Per-app accent colors */
[data-app="suite"] .wtf-family-card-price,
[data-app="suite"] .wtf-family-card-cta { color: var(--wtf-c-suite); }
[data-app="worth"] .wtf-family-card-price,
[data-app="worth"] .wtf-family-card-cta { color: var(--wtf-c-worth); }
[data-app="fee"] .wtf-family-card-price,
[data-app="fee"] .wtf-family-card-cta { color: var(--wtf-c-fee); }
[data-app="health"] .wtf-family-card-price,
[data-app="health"] .wtf-family-card-cta { color: var(--wtf-c-health); }
[data-app="budget"] .wtf-family-card-price,
[data-app="budget"] .wtf-family-card-cta { color: var(--wtf-c-budget); }
[data-app="contract"] .wtf-family-card-price,
[data-app="contract"] .wtf-family-card-cta { color: var(--wtf-c-contract); }
[data-app="charge"] .wtf-family-card-price,
[data-app="charge"] .wtf-family-card-cta { color: var(--wtf-c-charge); }
[data-app="subscription"] .wtf-family-card-price,
[data-app="subscription"] .wtf-family-card-cta { color: var(--wtf-c-subscription); }

/* Suite highlight card */
.wtf-family-card.wtf-suite-highlight {
  border-color: var(--wtf-c-suite) !important;
  background: linear-gradient(135deg, var(--wtf-glass-bg), rgba(245, 158, 11, 0.08)) !important;
}

/* === FOOTER === */
.wtf-footer { border-top: 1px solid var(--wtf-border); padding: 60px 0 40px; }
.wtf-footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px; margin-bottom: 40px;
}
.wtf-footer-brand .wtf-nav-logo { margin-bottom: 8px; }
.wtf-footer-brand p { color: var(--wtf-text-muted); font-size: 0.875rem; line-height: 1.5; }
.wtf-footer-col h4 {
  font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--wtf-text-dim); margin-bottom: 16px; font-weight: 600;
}
.wtf-footer-col a { display: block; color: var(--wtf-text-muted); font-size: 0.875rem; margin-bottom: 8px; }
.wtf-footer-col a:hover { color: var(--wtf-text); }
.wtf-footer-bottom {
  border-top: 1px solid var(--wtf-border);
  padding-top: 24px; text-align: center;
  color: var(--wtf-text-dim); font-size: 0.8rem;
}

/* === ACCESSIBILITY === */
.wtf-skip-link {
  position: absolute; top: -50px; left: 16px;
  background: var(--wtf-accent); color: #000; padding: 8px 16px;
  border-radius: var(--wtf-radius-sm); z-index: 200; font-weight: 600;
  transition: top 0.2s;
}
.wtf-skip-link:focus { top: 8px; color: #000; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

:focus-visible { outline: 2px solid var(--wtf-accent); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .wtf-nav-links {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--wtf-border);
    flex-direction: column; gap: 0; padding: 8px 0;
  }
  .wtf-nav-links.active { display: flex; }
  .wtf-nav-links a { padding: 12px 24px; display: block; }
  .wtf-nav-links .wtf-nav-cta { margin: 8px 24px 12px; text-align: center; display: block; }
  .wtf-nav-toggle { display: block; }
  .wtf-hero { padding: 120px 0 60px; }
  .wtf-hero h1 { font-size: 2.2rem; }
  .wtf-section { padding: 60px 0; }
  .wtf-section-header h2 { font-size: 1.8rem; }
  .wtf-footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .wtf-family-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .wtf-footer-grid { grid-template-columns: 1fr; }
  .wtf-hero-buttons { flex-direction: column; align-items: center; }
  .wtf-hero-buttons .wtf-btn { width: 100%; max-width: 300px; }
}

/* === SHARED MOBILE NAV JS HOOK === */
/* Add this script to each page:
   document.querySelector('.wtf-nav-toggle')?.addEventListener('click', function() {
     this.classList.toggle('active');
     document.querySelector('.wtf-nav-links').classList.toggle('active');
   });
*/
