/* E.M. Designs shared design tokens — v4 Editorial.
   Single source of truth for color, font, geometry across standalone HTML pages.
   See /brand/EM_DESIGNS_BRAND_GUIDE.md for the full system. */

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

:root {
  /* Surfaces */
  --bg-base:        hsl(40 15% 97%);
  --bg-surface:     hsl(0 0% 100%);
  --bg-muted:       hsl(40 8% 92%);
  --bg-code:        hsl(0 0% 98%);

  /* Text */
  --text-primary:   hsl(0 0% 8%);
  --text-secondary: hsl(0 0% 45%);
  --text-muted:     hsl(0 0% 60%);

  /* Borders */
  --border:         hsl(0 0% 88%);
  --border-strong:  hsl(0 0% 70%);

  /* Accent — gold */
  --accent:         hsl(43 55% 50%);
  --accent-strong:  hsl(43 60% 42%);
  --accent-soft:    hsl(43 50% 92%);
  --accent-fg:      hsl(0 0% 100%);

  /* Semantic */
  --success:        hsl(150 30% 40%);
  --warning:        hsl(38 60% 50%);
  --destructive:    hsl(0 60% 55%);

  /* Fonts */
  --font-display:   'Playfair Display', Georgia, serif;
  --font-body:      'Inter', system-ui, -apple-system, sans-serif;
  --font-mono:      'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --font-script:    'Italiana', 'Didot', Georgia, serif;

  /* Geometry */
  --radius:         0.25rem;
  --radius-lg:      0.5rem;
}

html, body { background: var(--bg-base); color: var(--text-primary); }
/* Reserve the scrollbar gutter on every page so the fixed, centered nav
   renders at the same width whether the page scrolls or not. Without this,
   navigating from a long page (scrollbar shown) to a short one (no scrollbar)
   shifts the logo + menu by the scrollbar width (~15px on Windows). */
html { scrollbar-gutter: stable; }
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
a.text-link {
  color: var(--text-primary);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
  transition: color 0.15s, text-decoration-thickness 0.15s;
}
a.text-link:hover { color: var(--accent); text-decoration-thickness: 2px; }

/* ===== NAV ===== */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(248, 246, 241, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-content {
  max-width: 1280px; margin: 0 auto; padding: 18px 48px;
  display: flex; justify-content: space-between; align-items: center;
}
.logo {
  font-family: var(--font-display);
  font-size: 20px; font-weight: 700; letter-spacing: 0.15em;
  color: var(--text-primary); text-decoration: none;
}
.logo:hover { color: var(--accent); }
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a {
  color: var(--text-secondary); text-decoration: none;
  font-size: 13px; font-weight: 500; letter-spacing: 0.04em;
  transition: color 0.15s;
}
.nav-links a:hover, .nav-links a.active { color: var(--text-primary); }
.nav-links a.active {
  position: relative;
}
.nav-links a.active::after {
  content: ''; position: absolute; bottom: -6px; left: 0; right: 0;
  height: 2px; background: var(--accent);
}

/* ===== MAIN ===== */
main {
  position: relative; z-index: 1;
  max-width: 1200px; margin: 0 auto; padding: 120px 48px 80px;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}
.page-title { font-size: 56px; line-height: 1.05; margin-bottom: 16px; }
.page-subtitle {
  color: var(--text-secondary);
  font-size: 18px; line-height: 1.6;
  margin-bottom: 56px; max-width: 680px;
}

/* ===== CARD ===== */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.card-title {
  font-family: var(--font-display);
  font-size: 24px; font-weight: 600;
  margin-bottom: 8px;
}
.card-sub { color: var(--text-secondary); font-size: 14px; margin-bottom: 24px; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  background: var(--accent); color: var(--accent-fg);
  border: 1px solid var(--accent);
  padding: 12px 24px;
  font-family: var(--font-body);
  font-size: 14px; font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: var(--radius);
  cursor: pointer; transition: background 0.15s, border-color 0.15s, color 0.15s;
  text-decoration: none;
}
.btn:hover { background: var(--accent-strong); border-color: var(--accent-strong); }

.btn-secondary {
  background: var(--bg-surface); color: var(--text-primary);
  border: 1px solid var(--border-strong);
}
.btn-secondary:hover { border-color: var(--text-primary); background: var(--bg-base); }

.btn-ghost {
  background: transparent; color: var(--text-primary); border: 1px solid transparent;
}
.btn-ghost:hover { background: var(--bg-muted); }

/* ===== BADGES & TAGS ===== */
.badge {
  display: inline-block; padding: 4px 10px;
  font-size: 11px; font-weight: 500; letter-spacing: 0.12em;
  text-transform: uppercase; font-family: var(--font-mono);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-secondary);
  background: var(--bg-surface);
}
.badge-pro {
  border-color: var(--accent);
  color: var(--accent-strong);
  background: var(--accent-soft);
}

.feature-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent-strong);
}

/* ===== GRID ===== */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

/* ===== STATUS MESSAGES ===== */
.status-msg {
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  background: var(--bg-surface);
}
.status-msg.success { border-color: var(--success); color: var(--success); background: hsl(150 30% 95%); }
.status-msg.error { border-color: var(--destructive); color: var(--destructive); background: hsl(0 60% 96%); }
.status-msg.info { border-color: var(--border-strong); color: var(--text-secondary); }

/* ===== FOOTER ===== */
footer.site-footer {
  border-top: 1px solid var(--border);
  padding: 48px 48px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 80px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .nav-content { padding: 14px 24px; }
  .nav-links { gap: 16px; }
  main { padding: 100px 24px 60px; }
  .page-title { font-size: 40px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}
