/*
 * benaiah.ai · shared theme
 * Single source of truth for CSS variables, base resets and brand patterns.
 * Linked from index.html and workshop.html so colour, type and motion stay in sync.
 *
 * Page-specific layout rules (hero grids, ladder, offer card, form card, etc.)
 * stay inside each page's own <style> block.
 */

:root {
  /* Light theme — pure black on white editorial */
  --ink: #000000;
  --muted: #4a4a4a;
  --paper: #ffffff;
  --panel: #ffffff;
  --surface: #ffffff;
  --surface-soft: #fafafa;
  --surface-faint: #f5f5f5;
  --line: rgba(0, 0, 0, 0.14);
  --line-strong: rgba(0, 0, 0, 0.22);

  /* Brand accent — emerald */
  --green: #10a36a;
  --green-dark: #0e8a5e;
  --green-deep: #086d4a;
  --green-hover: rgba(14, 138, 94, 0.1);
  --green-ring: rgba(14, 138, 94, 0.18);
  --green-border: rgba(14, 138, 94, 0.6);
  --green-wash: #e8f6ee;

  /* Section accents */
  --amber: #d8841d;
  --blue: #255e89;
  --red: #8c2f28;

  /* Text on light surfaces */
  --lead: #111111;
  --body-copy: #1a1a1a;
  --card-copy: #111111;
  --chat-copy: #000000;
  --inverse: #ffffff;

  /* Chrome */
  --nav-bg: rgba(255, 255, 255, 0.92);
  --grid-line: rgba(0, 0, 0, 0.04);
  --profile-bg: #000000;

  /* Buttons */
  --button-ink: #000000;
  --button-disabled: rgba(0, 0, 0, 0.2);

  /* Shadows */
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.1);
  --shadow-soft: 0 6px 18px rgba(0, 0, 0, 0.04);
  --shadow-card: 0 24px 60px rgba(0, 0, 0, 0.08);
}

body[data-theme="dark"] {
  /* Dark theme — cooler near-black to match the stark light editorial */
  --ink: #f4f0e7;
  --muted: #b7c0ba;
  --paper: #0a0e0c;
  --panel: #131817;
  --surface: #131817;
  --surface-soft: rgba(255, 255, 255, 0.04);
  --surface-faint: rgba(255, 255, 255, 0.065);
  --line: rgba(244, 240, 231, 0.16);
  --line-strong: rgba(244, 240, 231, 0.28);

  --green: #4fc98f;
  --green-dark: #9cdfbe;
  --green-deep: #4fc98f;
  --green-hover: rgba(79, 201, 143, 0.12);
  --green-ring: rgba(79, 201, 143, 0.16);
  --green-border: rgba(79, 201, 143, 0.55);
  --green-wash: rgba(79, 201, 143, 0.12);

  --amber: #f2b766;
  --blue: #7bb7e5;
  --red: #dd776e;

  --lead: #d4ddd7;
  --body-copy: #cbd6cf;
  --card-copy: #d9e1dc;
  --chat-copy: #e9eee9;
  --inverse: #0a0e0c;

  --nav-bg: rgba(10, 14, 12, 0.92);
  --grid-line: rgba(244, 240, 231, 0.045);
  --profile-bg: #050807;

  --button-ink: #f4f0e7;
  --button-disabled: rgba(244, 240, 231, 0.2);

  --shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
  --shadow-soft: 0 6px 18px rgba(0, 0, 0, 0.5);
  --shadow-card: 0 24px 60px rgba(0, 0, 0, 0.5);
}

/* --- Base resets --- */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  overflow-x: hidden;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px),
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    var(--paper);
  background-size: 40px 40px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.45;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

/* --- Universal container --- */
.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

/* --- Brand accent: italic emerald 'ai' / 'AI' fragment used inside the wordmark --- */
.wm-ai {
  color: var(--green-dark);
  font-style: italic;
}

body[data-theme="dark"] .wm-ai {
  color: var(--green);
}

/* --- Scroll-reveal animation primitive (page JS adds .is-visible) --- */
.reveal {
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 0.5s ease,
    transform 0.5s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

@media (max-width: 680px) {
  .shell {
    width: min(1180px, calc(100% - 22px));
  }
}
