/* ==========================================================================
   TOOLHUB — Design System
   Theme: "Workshop catalog" — utility tools presented like labeled
   instruments on a workbench. Clean, fast, trustworthy.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* Color tokens — Gold / Black luxury palette */
  --ink:        #14120C;
  --ink-soft:   #6B6255;
  --paper:      #FAF8F4;
  --paper-dim:  #F0EBE0;
  --line:       #E6DFCE;
  --accent:     #C9A24B;   /* rich gold — actions, CTAs */
  --accent-2:   #E8C878;   /* pale gold, gradient partner */
  --accent-ink: #8A6C24;
  --teal:       #0F9B8E;   /* live/success/preview state */
  --teal-soft:  #E3F5F2;
  --indigo:     #C9A24B;   /* tertiary accent, matches gold now */
  --white:      #FFFFFF;
  --ink-900:    #0A0906;   /* deepest black, for hero band */

  /* Type */
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Layout */
  --radius: 10px;
  --radius-sm: 6px;
  --shadow-card: 0 1px 2px rgba(28,31,38,0.04), 0 4px 16px rgba(28,31,38,0.06);
  --shadow-lift: 0 8px 24px rgba(28,31,38,0.10);
  --max-w: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  margin: 0;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

p { margin: 0; line-height: 1.6; color: var(--ink-soft); }

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* Focus visibility for accessibility */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ---------- Top nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250,248,244,0.88);
  backdrop-filter: blur(10px) saturate(1.4);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(201,162,75,0.25);
}

.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 66px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--ink-900);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 13px;
  box-shadow: 0 4px 12px rgba(201,162,75,0.4);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
}

.nav-links a:hover { color: var(--ink); }

.tool-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--accent-ink);
  background: #FBF3DF;
  border: 1px solid #EAD9A8;
  padding: 3px 8px;
  border-radius: 5px;
  display: inline-block;
}

/* ---------- Hero band (dark, blueprint-grid) ---------- */
.hero-dark {
  position: relative;
  background: var(--ink-900);
  overflow: hidden;
  padding: 76px 0 64px;
}

.hero-dark::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.045) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(ellipse 75% 75% at 30% 20%, black 40%, transparent 85%);
}

.hero-dark::after {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  top: -220px;
  right: -120px;
  background: radial-gradient(circle, rgba(201,162,75,0.45), transparent 70%);
  filter: blur(10px);
}

.hero-dark .container { position: relative; z-index: 1; }

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--accent-2);
  background: rgba(201,162,75,0.16);
  border: 1px solid rgba(201,162,75,0.45);
  padding: 6px 12px;
  border-radius: 999px;
}

.hero-eyebrow .live-dot { background: var(--accent-2); box-shadow: 0 0 0 3px rgba(232,200,120,0.3); }

.hero-dark h1 {
  color: var(--white);
  font-size: clamp(34px, 5.4vw, 54px);
  max-width: 680px;
  margin-top: 18px;
}

.hero-dark h1 .accent-word {
  background: linear-gradient(100deg, var(--accent-2), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-dark p.lead {
  color: #B7BBC4;
  font-size: 17px;
  max-width: 560px;
  margin-top: 16px;
}

.hero-stats {
  display: flex;
  gap: 32px;
  margin-top: 36px;
  flex-wrap: wrap;
}

.hero-stat .num {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 24px;
  color: var(--white);
}

.hero-stat .label {
  font-size: 12.5px;
  color: #8A8F9B;
  margin-top: 2px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.btn:active { transform: translateY(1px); }

.btn-primary {
  background: linear-gradient(100deg, var(--accent), var(--accent-2));
  color: var(--ink-900);
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(201,162,75,0.3);
}
.btn-primary:hover { box-shadow: 0 8px 20px rgba(201,162,75,0.45); filter: brightness(1.05); }

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}
.btn-ghost:hover { border-color: var(--ink); }

.btn-block { width: 100%; }

/* ---------- Tool cards (homepage grid) ---------- */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.tool-card {
  position: relative;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  cursor: pointer;
  overflow: hidden;
}

.tool-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.tool-card:hover::before { transform: scaleX(1); }

.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift);
  border-color: #D8D4C6;
}

.tool-card.disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.tool-card.disabled:hover { transform: none; box-shadow: none; border-color: var(--line); }
.tool-card.disabled::before { display: none; }

.tool-icon {
  width: 42px;
  height: 42px;
  border-radius: 9px;
  background: linear-gradient(160deg, var(--paper-dim), var(--white));
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.tool-card h3 {
  font-size: 16.5px;
  font-weight: 600;
}

.tool-card p {
  font-size: 13.5px;
}

.tool-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  position: relative;
}

.tool-card-foot::before,
.tool-card-foot::after {
  content: "";
  position: absolute;
  top: -6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--line);
}
.tool-card-foot::before { left: -32px; }
.tool-card-foot::after { right: -32px; }

/* ---------- Category pills ---------- */
.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--white);
  cursor: pointer;
  color: var(--ink-soft);
  transition: all 0.15s ease;
}

.pill:hover { border-color: var(--accent); color: var(--ink); }

.pill.active {
  background: var(--ink-900);
  color: var(--white);
  border-color: var(--ink-900);
}

/* ---------- Form elements (used inside tools) ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }

.field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.field input, .field textarea, .field select {
  font-family: var(--font-body);
  font-size: 14px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--ink);
  width: 100%;
}

.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--ink);
}

/* ---------- Workspace shell (tool pages: form + live preview) ---------- */
.tool-hero {
  padding: 32px 0 22px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(ellipse 60% 100% at 100% 0%, rgba(201,162,75,0.10), transparent 70%),
    var(--paper);
}

.tool-hero .crumb {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-ink);
  margin-bottom: 10px;
  letter-spacing: 0.03em;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  padding: 28px 0 80px;
  align-items: start;
}

@media (max-width: 880px) {
  .workspace { grid-template-columns: 1fr; }
}

.panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-card);
}

.panel-preview {
  border-top: 3px solid transparent;
  border-image: linear-gradient(90deg, var(--teal), var(--accent)) 1;
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 18px;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-soft);
}

.preview-sticky {
  position: sticky;
  top: 88px;
}

footer.site-footer {
  border-top: 1px solid var(--line);
  padding: 32px 0;
  text-align: center;
  font-size: 13px;
  color: var(--ink-soft);
}
