/* GuideMe — cool/tech premium design tokens
 * Pushing UI.md cooler: anchored navy + near-black, ivory base, electric accent.
 */

:root {
  /* Surfaces */
  --ink-abyss: #070B12;        /* deepest anchor — footers, blackout */
  --ink-900: #0A1628;          /* primary dark — rails, headers */
  --ink-800: #112240;          /* primary light — hover states on dark */
  --ink-700: #1B2A47;          /* elevated dark */
  --ink-600: #2B3A5A;          /* borders on dark */

  --paper-0: #F4F1EC;          /* ivory base — page bg (warmer than white) */
  --paper-1: #FAF8F4;          /* card surface */
  --paper-2: #EEEAE3;          /* alternating section bg */
  --paper-3: #E2DED6;          /* secondary / muted elevated */

  /* Ink on paper */
  --text-900: #0A1628;         /* headings */
  --text-700: #1E293B;         /* body */
  --text-500: #5A6679;         /* muted / metadata */
  --text-400: #8490A3;         /* placeholder */

  --hair: rgba(10, 22, 40, 0.08);   /* hairline borders */
  --hair-strong: rgba(10, 22, 40, 0.14);
  --hair-dark: rgba(244, 241, 236, 0.10); /* hairline on dark */

  /* Accent — electric ocean */
  --accent: #2F7DFB;
  --accent-hover: #1D6DE8;
  --accent-soft: #E6EFFE;
  --accent-deep: #0B4AB8;

  /* Status */
  --ok: #1F9D55;
  --warn: #C08B10;
  --err: #C0362C;

  /* Type */
  --font-display: 'Instrument Serif', 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Geist', 'Inter', 'Söhne', system-ui, -apple-system, sans-serif;
  --font-mono: 'Geist Mono', 'JetBrains Mono', 'IBM Plex Mono', ui-monospace, monospace;

  /* Radii — tight on data, pill on buttons */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-xl: 24px;
  --r-pill: 999px;

  /* Shadow hierarchy */
  --sh-sm: 0 1px 2px rgba(10,22,40,.04), 0 1px 1px rgba(10,22,40,.03);
  --sh-md: 0 4px 18px rgba(10,22,40,.06), 0 2px 6px rgba(10,22,40,.04);
  --sh-lg: 0 24px 60px rgba(10,22,40,.12), 0 8px 20px rgba(10,22,40,.06);
  --sh-glow: 0 0 0 1px rgba(47,125,251,.25), 0 10px 40px rgba(47,125,251,.18);

  /* Motion */
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --ease-inout: cubic-bezier(.65, 0, .35, 1);
  --dur-fast: 140ms;
  --dur-med: 280ms;
  --dur-slow: 520ms;

  /* Layout */
  --maxw: 1240px;
  --gutter: clamp(16px, 3.4vw, 40px);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper-0);
  color: var(--text-700);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-feature-settings: 'ss01', 'cv11', 'tnum';
}

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  color: var(--text-900);
  letter-spacing: -0.02em;
  line-height: 1.08;
  margin: 0;
  font-weight: 600;
}

p { margin: 0; }

button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 0;
}

input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }

/* ---------- Primitives ---------- */

.gm-mono {
  font-family: var(--font-mono);
  font-feature-settings: 'tnum', 'zero';
  letter-spacing: 0;
}

.gm-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-500);
}

.gm-hair {
  height: 1px;
  background: var(--hair);
  width: 100%;
}

/* Logo */
.gm-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-sans);
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--text-900);
  font-size: 17px;
}
.gm-logo.on-dark { color: var(--paper-0); }
.gm-logo__mark {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.gm-logo__mark svg { width: 100%; height: 100%; display: block; }
.gm-logo__word {
  display: inline-flex;
  align-items: baseline;
  gap: 1px;
}
.gm-logo__word .me {
  font-style: italic;
  font-family: var(--font-display);
  font-weight: 400;
  margin-left: 2px;
  font-size: 1.05em;
  line-height: 1;
}

/* Buttons */
.gm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px;
  border-radius: var(--r-pill);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: -0.005em;
  transition: background var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out),
              transform var(--dur-fast) var(--ease-out);
  cursor: pointer;
  white-space: nowrap;
}
.gm-btn--primary {
  background: var(--ink-900);
  color: var(--paper-0);
}
.gm-btn--primary:hover { background: var(--ink-800); box-shadow: var(--sh-md); }
.gm-btn--primary:active { transform: translateY(1px); }

.gm-btn--accent {
  background: var(--accent);
  color: #fff;
}
.gm-btn--accent:hover { background: var(--accent-hover); box-shadow: var(--sh-glow); }

.gm-btn--ghost {
  background: transparent;
  color: var(--text-700);
  border: 1px solid var(--hair-strong);
}
.gm-btn--ghost:hover { background: var(--paper-1); border-color: var(--text-900); color: var(--text-900); }

.gm-btn--ghost-dark {
  background: transparent;
  color: var(--paper-0);
  border: 1px solid var(--hair-dark);
}
.gm-btn--ghost-dark:hover { background: rgba(244,241,236,.06); border-color: rgba(244,241,236,.25); }

.gm-btn--sm { height: 32px; padding: 0 14px; font-size: 13px; }

/* Tag / pill */
.gm-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 10px;
  border-radius: var(--r-pill);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-500);
  background: var(--paper-1);
  border: 1px solid var(--hair);
}
.gm-tag--accent {
  color: var(--accent-deep);
  background: var(--accent-soft);
  border-color: rgba(47,125,251,.18);
}
.gm-tag--ai {
  color: var(--accent);
  background: transparent;
  border-color: rgba(47,125,251,.30);
}
.gm-tag--ai::before { content: '∴'; font-size: 13px; color: var(--accent); }

/* AI micro-marker */
.gm-ai-mark {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}
.gm-ai-mark::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(47,125,251,.6);
  animation: gm-pulse 1.8s infinite var(--ease-inout);
}
@keyframes gm-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.7); }
}

/* Card */
.gm-card {
  background: var(--paper-1);
  border: 1px solid var(--hair);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-sm);
}

/* Utility */
.gm-row { display: flex; align-items: center; }
.gm-stack { display: flex; flex-direction: column; }
.gm-spacer { flex: 1; }

/* Selection */
::selection { background: var(--accent); color: #fff; }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--hair-strong); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-400); }
