@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&display=swap');

/* ===================== */
/* DESIGN TOKENS         */
/* ===================== */
:root {
  --bg:            #EFE3D1;
  --surface:       #FDFBF7;
  --primary:       #1E5C52;
  --primary-hover: #256B60;
  --secondary:     #2D7A6E;
  --accent:        #9B2020;
  --accent-hover:  #B02828;
  --text:          #1A2E2B;
  --text-muted:    #4A6B65;
  --border:        rgba(30,92,82,0.14);
  --border-strong: rgba(30,92,82,0.28);
  --nav-bg:        #2E5B52;
  --radius:        20px;
  --radius-sm:     12px;
  --radius-pill:   100px;
  --shadow:        0 4px 20px rgba(0,0,0,0.06);
  --shadow-hover:  0 8px 32px rgba(0,0,0,0.11);
  --transition:    150ms ease-out;
  --font-display:  'Playfair Display', Georgia, serif;
  --font-body:     'Inter', system-ui, sans-serif;
  --max-w:         1200px;
}

/* ===================== */
/* RESET + BASE          */
/* ===================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.03;
  pointer-events: none;
  z-index: 9999;
}

/* ===================== */
/* NAV                   */
/* ===================== */
.nav {
  background: var(--nav-bg);
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav-logo {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: white;
  font-weight: 700;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-logo img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
}
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-link {
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255,255,255,0.72);
  text-decoration: none;
  transition: var(--transition);
}
.nav-link:hover { color: white; background: rgba(255,255,255,0.1); }
.nav-link.active { color: white; }
.nav-link.active { color: white; }
.nav-cta {
  padding: 9px 20px;
  border-radius: var(--radius-pill);
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  color: white;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  margin-left: 4px;
}
.nav-cta:hover { background: rgba(255,255,255,0.25); transform: translateY(-1px); }

/* ===================== */
/* BUTTONS               */
/* ===================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: var(--transition);
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.btn-accent  { background: var(--accent); color: white; }
.btn-accent:hover { background: var(--accent-hover); transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.btn-ghost   { background: transparent; color: var(--primary); border: 2px solid var(--border-strong); }
.btn-ghost:hover { background: rgba(30,92,82,0.07); border-color: var(--primary); }

/* ===================== */
/* FOOTER                */
/* ===================== */
footer {
  background: var(--primary);
  padding: 44px 24px;
  text-align: center;
}
.footer-logo {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: white;
  margin-bottom: 6px;
}
footer p { font-size: 0.875rem; color: rgba(255,255,255,0.55); }
.footer-links { display: flex; justify-content: center; gap: 24px; margin-top: 20px; }
.footer-links a {
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  font-size: 0.875rem;
  transition: var(--transition);
}
.footer-links a:hover { color: white; }

/* ===================== */
/* LANDING — HERO        */
/* ===================== */
.hero {
  max-width: 760px;
  margin: 0 auto;
  padding: 88px 24px 76px;
  text-align: center;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(30,92,82,0.09);
  color: var(--primary);
  font-size: 0.775rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  margin-bottom: 22px;
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 1.08;
  color: var(--text);
  margin-bottom: 22px;
}
.hero-title em { color: var(--primary); font-style: italic; }
.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.75;
  max-width: 580px;
  margin: 0 auto 36px;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

/* ===================== */
/* STATS STRIP           */
/* ===================== */
.stats-strip {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 36px 24px;
}
.stats-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  text-align: center;
}
.stat-item { padding: 0 24px; }
.stat-item + .stat-item { border-left: 1px solid var(--border); }
.stat-value {
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 8px;
}
.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

/* ===================== */
/* PLATFORM CARDS        */
/* ===================== */
.platforms {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 72px 24px 80px;
}
.section-eyebrow {
  font-size: 0.775rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.section-title {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--text);
  margin-bottom: 32px;
}
.platform-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.platform-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: var(--transition);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.platform-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-3px); border-color: var(--border-strong); }
.platform-icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.platform-card.yt .platform-icon-wrap { background: rgba(30,92,82,0.09); }
.platform-card.tt .platform-icon-wrap { background: rgba(155,32,32,0.1); }
.platform-card h3 { font-family: var(--font-display); font-size: 1.375rem; color: var(--text); }
.platform-card p  { font-size: 0.9375rem; color: var(--text-muted); line-height: 1.65; }
.platform-cta { font-size: 0.875rem; font-weight: 600; margin-top: 4px; }
.platform-card.yt .platform-cta { color: var(--primary); }
.platform-card.tt .platform-cta { color: var(--accent); }
.platform-handle { font-size: 0.8125rem; color: var(--text-muted); margin-top: -6px; }

/* ===================== */
/* DASHBOARD HEADER      */
/* ===================== */
.dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.dash-page-title { font-family: var(--font-display); font-size: 1.75rem; color: var(--primary); line-height: 1.1; }
.dash-page-sub   { font-size: 0.8125rem; color: var(--text-muted); margin-top: 3px; }

.filter-pills {
  display: flex;
  gap: 4px;
  background: rgba(30,92,82,0.07);
  padding: 4px;
  border-radius: var(--radius-pill);
}
.filter-pill {
  padding: 7px 18px;
  border-radius: var(--radius-pill);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  border: none;
  background: transparent;
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-body);
}
.filter-pill.active { background: var(--primary); color: white; box-shadow: 0 2px 10px rgba(30,92,82,0.3); }
.filter-pill:hover:not(.active) { background: rgba(30,92,82,0.1); color: var(--primary); }

/* ===================== */
/* DASHBOARD BODY        */
/* ===================== */
.dash-body {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 28px 24px 72px;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}
.metric-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: var(--transition);
}
.metric-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.metric-icon {
  width: 36px;
  height: 36px;
  background: rgba(30,92,82,0.09);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.metric-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.metric-value {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.1;
}
.metric-value.small { font-size: 1.25rem; }
.metric-value a { color: var(--primary); text-decoration: none; }
.metric-value a:hover { color: var(--accent); text-decoration: underline; }
.metric-sub { font-size: 0.775rem; color: var(--text-muted); margin-top: 5px; }

.chart-row {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 14px;
  margin-bottom: 14px;
}
.chart-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}
.chart-card h3 { font-family: var(--font-display); font-size: 1.1rem; color: var(--text); margin-bottom: 20px; }
.chart-wrap { position: relative; }
.chart-wrap.donut   { height: 270px; }
.chart-wrap.bar     { height: 220px; }
.chart-wrap.bar-lg  { height: 200px; }

.recent-section { margin-top: 14px; }
.recent-section h3 { font-family: var(--font-display); font-size: 1.1rem; color: var(--text); margin-bottom: 14px; }
.visitor-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  transition: var(--transition);
}
.visitor-row:hover { box-shadow: var(--shadow); transform: translateX(3px); }
.visitor-name { font-family: var(--font-display); font-size: 1.05rem; color: var(--primary); font-weight: 600; }
.visitor-name a { color: inherit; text-decoration: none; }
.visitor-name a:hover { text-decoration: underline; }
.visitor-time { font-size: 0.85rem; color: var(--text-muted); }

/* loading / error states */
.dash-loading {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-muted);
  font-size: 1rem;
}
.dash-error {
  text-align: center;
  padding: 40px 24px;
  color: var(--accent);
  background: rgba(155,32,32,0.06);
  border-radius: var(--radius);
  border: 1px solid rgba(155,32,32,0.15);
}

/* ===================== */
/* PRIVACY PAGE          */
/* ===================== */
.privacy-body {
  max-width: 680px;
  margin: 0 auto;
  padding: 64px 24px 80px;
}
.privacy-body h1 { font-family: var(--font-display); font-size: 2.2rem; color: var(--text); margin-bottom: 8px; }
.privacy-body .effective { font-size: 0.875rem; color: var(--text-muted); margin-bottom: 40px; }
.privacy-body h2 { font-family: var(--font-display); font-size: 1.25rem; color: var(--primary); margin: 32px 0 10px; }
.privacy-body p  { color: var(--text-muted); line-height: 1.75; margin-bottom: 12px; }
.privacy-body a  { color: var(--primary); }
.privacy-body ul { padding-left: 20px; margin-bottom: 12px; }
.privacy-body li { color: var(--text-muted); line-height: 1.75; margin-bottom: 4px; }

/* ===================== */
/* RESPONSIVE            */
/* ===================== */
@media (max-width: 1024px) {
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .chart-row    { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .hero { padding: 56px 16px 56px; }
  .hero-title { font-size: 2.2rem; }
  .stats-inner { grid-template-columns: 1fr; text-align: left; }
  .stat-item + .stat-item { border-left: none; border-top: 1px solid var(--border); padding-top: 24px; margin-top: 24px; }
  .platform-grid { grid-template-columns: 1fr; }
  .metrics-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .dash-topbar-inner { flex-direction: column; align-items: flex-start; }
  .nav-links .nav-link { display: none; }
}
@media (max-width: 480px) {
  .metrics-grid { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; }
  .btn { width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
