/* AI Tools Vault — calm minimal theme. Vanilla CSS, no external dependencies. */

/* ============ Tokens ============ */
:root {
  --ink: #1d1d1f;
  --ink-soft: #515154;
  --ink-faint: #86868b;
  --paper: #ffffff;
  --wash: #fbfbfd;
  --wash-2: #f5f5f7;
  --card: #ffffff;
  --line: #e8e8ea;
  --line-soft: #f0f0f2;
  --gold: #c9972b;
  --gold-hover: #b3881f;
  --gold-deep: #8a6414;
  --gold-wash: #faf6ea;
  /* Neutral-first: gold is the single accent; no blue/green semantics */
  --radius: 20px;
  --radius-lg: 24px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-soft: 0 8px 24px -12px rgba(0, 0, 0, 0.10);
  --shadow-hover: 0 14px 30px -14px rgba(0, 0, 0, 0.16);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --maxw: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  font-size: 1.02rem;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; height: auto; }

a { color: var(--gold-deep); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--ink); }

::selection { background: var(--gold-wash); }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: 4px;
}

h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -0.02em; margin-top: 0; text-wrap: balance; }
h1 { font-size: clamp(2.4rem, 5.5vw, 3.8rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.2rem); margin-bottom: 0.5em; font-weight: 700; }
h3 { font-size: 1.12rem; margin-bottom: 0.4em; font-weight: 700; }

p { margin: 0 0 1em; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 1.5rem; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: #fff; padding: 0.6rem 1rem; z-index: 100;
}
.skip-link:focus { left: 0.5rem; top: 0.5rem; }

/* ============ Header / nav ============ */
.site-header {
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid var(--line);
}
.nav-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 0.75rem 1.5rem; max-width: var(--maxw); margin: 0 auto;
}
.brand { display: inline-flex; align-items: center; gap: 0.65rem; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 1.12rem; letter-spacing: -0.02em; }
.brand:hover { color: var(--ink); }
.brand-name span { color: var(--gold-deep); }
.main-nav ul { display: flex; gap: 0.15rem; list-style: none; margin: 0; padding: 0; }
.main-nav a {
  color: var(--ink-soft); text-decoration: none; font-size: 0.92rem; font-weight: 500;
  padding: 0.45rem 0.75rem; border-radius: 8px; white-space: nowrap;
}
.main-nav a:hover, .main-nav a:focus-visible { color: var(--ink); }
.main-nav a[aria-current="page"] { color: var(--ink); font-weight: 700; }

/* ============ Hero ============ */
.hero {
  background: var(--paper);
  color: var(--ink);
  padding: 5.5rem 0 4.5rem;
  border-bottom: 1px solid var(--line-soft);
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-faint); margin: 0 0 1.4rem;
}
.hero-eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.hero h1 { color: var(--ink); margin-bottom: 0.5em; max-width: 22ch; }
.hero h1 .accent { color: var(--gold-deep); }
.hero .lede { font-size: clamp(1.05rem, 2.2vw, 1.25rem); color: var(--ink-soft); max-width: 42rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.8rem; margin: 1.8rem 0 0; }
/* Dashboard stat tiles: big display figures, tight line-height, small labels */
.stat-tiles {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem; margin-top: 2.75rem;
}
.stat-tile {
  background: var(--card); border: 1px solid var(--line-soft);
  border-radius: var(--radius); padding: 1.3rem 1.5rem;
  box-shadow: var(--shadow-soft);
}
.stat-num {
  display: block; font-size: clamp(2.1rem, 4.5vw, 2.7rem); font-weight: 700;
  letter-spacing: -0.035em; line-height: 1.02; color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.stat-label {
  display: block; margin-top: 0.4rem; font-size: 0.74rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint);
}
/* Hero entrance */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.hero-eyebrow, .hero h1, .hero .lede, .hero-cta, .stat-tiles { animation: rise 0.6s ease both; }
.hero h1 { animation-delay: 0.06s; }
.hero .lede { animation-delay: 0.12s; }
.hero-cta { animation-delay: 0.18s; }
.stat-tiles { animation-delay: 0.24s; }

/* ============ Buttons ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font: inherit; font-weight: 600; font-size: 0.98rem; cursor: pointer; text-decoration: none;
  background: var(--gold);
  color: var(--ink); border: 1px solid transparent; border-radius: 999px;
  padding: 0.78rem 1.9rem;
  transition: background 0.15s ease;
}
.btn:hover { background: var(--gold-hover); color: var(--ink); }
.btn-ghost {
  background: transparent; color: var(--ink);
  border: 1px solid #d2d2d7;
}
.btn-ghost:hover { background: var(--wash-2); color: var(--ink); border-color: #c6c6ca; }

/* ============ Sections ============ */
section.block { padding: 4.5rem 0; }
.section-head { max-width: 44rem; margin-bottom: 2.5rem; }
.section-head p { color: var(--ink-soft); font-size: 1.05rem; }
.kicker {
  display: block;
  font-size: 0.76rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-faint); margin-bottom: 0.7rem;
}

/* ============ Spotlight ============ */
.spotlight { background: var(--wash); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.spot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.25rem; }
.spot-card {
  background: var(--card); border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg); padding: 1.75rem;
  box-shadow: var(--shadow-soft);
  display: flex; flex-direction: column; gap: 0.6rem; position: relative;
}
.spot-date {
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink-faint);
}
.spot-card h3 { margin: 0; font-size: 1.12rem; }
.spot-card h3 a { color: var(--ink); text-decoration: none; }
.spot-card h3 a:hover { color: var(--gold-deep); text-decoration: underline; text-underline-offset: 3px; }
.spot-card h3 a::after { content: ""; position: absolute; inset: 0; }
.spot-card p { margin: 0; color: var(--ink-soft); font-size: 0.95rem; }
.spot-badge {
  align-self: flex-start; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em;
  background: var(--gold-wash); color: var(--gold-deep);
  border: 1px solid #eadfc3; border-radius: 999px; padding: 0.22rem 0.65rem;
  text-transform: uppercase;
}
/* Lead card on wide screens */
@media (min-width: 900px) {
  .spot-grid { grid-template-columns: repeat(3, 1fr); }
  .spot-card:first-child { grid-column: span 2; background: var(--gold-wash); border-color: #eadfc3; }
}

/* ============ Search + filters ============ */
.toolbar {
  background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--radius-lg);
  padding: 1.5rem 1.6rem 1.6rem; margin-bottom: 2rem;
  box-shadow: var(--shadow-soft);
}
.search-row { display: flex; flex-wrap: wrap; gap: 0.8rem; align-items: center; }
.search-box { position: relative; flex: 1 1 260px; min-width: 220px; }
.search-box svg { position: absolute; left: 0.9rem; top: 50%; transform: translateY(-50%); pointer-events: none; }
#tool-search {
  width: 100%; font: inherit; padding: 0.72rem 1rem 0.72rem 2.7rem;
  border: 1px solid #d2d2d7; border-radius: 999px; background: var(--wash-2);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
#tool-search::placeholder { color: var(--ink-faint); }
#tool-search:hover { border-color: #c0c0c6; }
#tool-search:focus {
  outline: none; border-color: var(--gold); background: #fff;
  box-shadow: 0 0 0 3px rgba(201, 151, 43, 0.18);
}
.result-count {
  font-size: 0.92rem; color: var(--ink-faint); font-weight: 600; white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
/* Segmented control — quiet Apple-style */
.chip-row {
  display: flex; flex-wrap: nowrap; gap: 2px;
  margin-top: 1rem; padding: 4px;
  background: var(--wash-2); border-radius: 999px;
  overflow-x: auto; scrollbar-width: thin;
}
.chip-row::-webkit-scrollbar { height: 6px; }
.chip-row::-webkit-scrollbar-thumb { background: #d2d2d7; border-radius: 3px; }
.chip-row .chip {
  flex-shrink: 0;
  font: inherit; font-size: 0.88rem; font-weight: 550; cursor: pointer;
  border: none; background: transparent; color: var(--ink-soft);
  border-radius: 999px; padding: 0.45rem 1rem;
  transition: background 0.15s ease, color 0.15s ease;
}
.chip-row .chip:hover { color: var(--ink); }
.chip-row .chip[aria-pressed="true"] {
  background: var(--card); color: var(--ink);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}
.chip-row .chip .n { opacity: 0.55; font-weight: 400; font-size: 0.82em; }
/* Clear button (lives in the search row) */
.search-row .chip--clear {
  font: inherit; font-size: 0.88rem; font-weight: 600; cursor: pointer;
  border: none; background: none; color: var(--ink-faint);
  padding: 0.45rem 0.6rem; border-radius: 8px; text-decoration: underline; text-underline-offset: 3px;
}
.search-row .chip--clear:hover { color: var(--ink); }
/* Legacy .chip base (fallback outside chip-row) */
.chip {
  font: inherit; font-size: 0.9rem; font-weight: 600; cursor: pointer;
  border: 1px solid var(--line); background: var(--paper); color: var(--ink-soft);
  border-radius: 999px; padding: 0.4rem 0.95rem;
}
.chip .n { opacity: 0.6; font-weight: 400; font-size: 0.82em; }
.empty-state {
  display: none; text-align: center; padding: 3rem 1rem; color: var(--ink-faint);
  border: 1px dashed var(--line); border-radius: var(--radius-lg); background: var(--card);
}
.empty-state.show { display: block; animation: rise 0.3s ease both; }
.empty-state strong { display: block; font-size: 1.15rem; color: var(--ink); margin-bottom: 0.4rem; }

/* ============ Tool cards ============ */
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.25rem; }
.tool-card {
  background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-soft);
  display: flex; flex-direction: column; gap: 0.6rem;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.tool-card:hover {
  transform: translateY(-2px); box-shadow: var(--shadow-hover);
}
.tool-card.hidden { display: none; }
.tool-grid.filter-anim .tool-card:not(.hidden) { animation: rise 0.3s ease both; }
.tool-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.6rem; }
.tool-card h3 { margin: 0; font-size: 1.08rem; letter-spacing: -0.01em; }
.badge {
  flex-shrink: 0; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  border-radius: 999px; padding: 0.24rem 0.65rem; border: 1px solid transparent;
}
.badge--free { background: var(--wash-2); color: var(--ink-soft); border-color: var(--line); }
.badge--freemium { background: var(--wash-2); color: var(--ink-soft); border-color: var(--line); }
.badge--paid { background: var(--gold-wash); color: var(--gold-deep); border-color: #eadfc3; }
.tool-card p { margin: 0; color: var(--ink-soft); font-size: 0.94rem; flex-grow: 1; }
.tool-meta { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; margin-top: 0.35rem; padding-top: 0.75rem; border-top: 1px solid var(--line-soft); }
.cat-tag {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-size: 0.74rem; font-weight: 700; color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.07em;
}
.cat-tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }
.visit-link {
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-weight: 600; font-size: 0.92rem; text-decoration: none;
  color: var(--gold-deep);
}
.visit-link span[aria-hidden] { display: inline-block; transition: transform 0.18s ease; }
.visit-link:hover { color: var(--gold-deep); text-decoration: underline; text-underline-offset: 3px; }
.visit-link:hover span[aria-hidden] { transform: translate(2px, -2px); }

/* ============ Related tools ("You may also like") ============ */
.related {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.2rem 0.55rem;
  margin-top: 0.35rem; padding-top: 0.7rem;
  border-top: 1px dashed var(--line-soft);
  font-size: 0.84rem; color: var(--ink-faint);
}
.related-label {
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em;
}
.related-link { color: var(--gold-deep); text-decoration: none; font-weight: 600; }
.related-link:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.related-sep { opacity: 0.6; }

/* ============ Guide ============ */
.guide { background: var(--wash-2); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.guide h2 { color: var(--ink); }
.guide .section-head p { color: var(--ink-soft); }
.guide ol { counter-reset: step; list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
@media (min-width: 900px) {
  .guide ol { grid-template-columns: 1fr 1fr; }
  .guide ol li:last-child { grid-column: 1 / -1; }
}
.guide li {
  counter-increment: step; position: relative; padding: 1.5rem 1.75rem 1.5rem 4.5rem;
  background: var(--card); border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-soft);
}
.guide li::before {
  content: counter(step); position: absolute; left: 1.4rem; top: 1.4rem;
  width: 2.05rem; height: 2.05rem; border-radius: 50%;
  background: var(--gold);
  color: var(--ink); font-weight: 700; font-size: 0.98rem;
  display: flex; align-items: center; justify-content: center;
}
.guide li h3 { display: block; margin: 0 0 0.25rem; color: var(--ink); font-size: 1.02rem; line-height: 1.35; }
.guide li p { margin: 0; color: var(--ink-soft); font-size: 0.94rem; }

/* ============ Prose pages ============ */
.prose { max-width: 44rem; }
.prose h2 { margin-top: 2rem; }
.prose ul, .prose ol { padding-left: 1.4rem; }
.prose li { margin-bottom: 0.5rem; }
.updated-stamp {
  display: inline-block; font-size: 0.84rem; color: var(--ink-faint);
  border: 1px solid var(--line); border-radius: 999px; padding: 0.28rem 0.9rem;
  background: var(--card); margin-bottom: 1.25rem;
}

/* ============ Contact form ============ */
.contact-form { display: grid; gap: 1rem; max-width: 34rem; margin-top: 1.5rem; }
.field label { display: block; font-weight: 600; margin-bottom: 0.35rem; font-size: 0.95rem; }
.field input, .field textarea {
  width: 100%; font: inherit; padding: 0.65rem 0.9rem;
  border: 1px solid #d2d2d7; border-radius: var(--radius); background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 151, 43, 0.18);
}
.field textarea { min-height: 140px; resize: vertical; }
.form-note { font-size: 0.9rem; color: var(--ink-faint); }

/* ============ Footer ============ */
.site-footer {
  background: var(--wash-2); color: var(--ink-soft);
  padding: 3rem 0 1.75rem;
  border-top: 1px solid var(--line);
}
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.75rem; margin-bottom: 2rem; }
.site-footer h2, .site-footer h3 { color: var(--ink); font-size: 1rem; margin-bottom: 0.7rem; }
.site-footer h2 { font-size: 1.12rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 0.45rem; }
.site-footer a { color: var(--ink-soft); text-decoration: none; font-size: 0.93rem; }
.site-footer a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.footer-brand p { font-size: 0.92rem; max-width: 20rem; }
.footer-bottom {
  border-top: 1px solid var(--line); padding-top: 1.25rem;
  display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: space-between; align-items: center;
  font-size: 0.85rem; color: var(--ink-faint);
}

/* ============ Responsive ============ */
@media (max-width: 640px) {
  .nav-bar { flex-direction: column; align-items: stretch; gap: 0.6rem; padding-bottom: 0.7rem; }
  .brand { align-self: flex-start; }
  .main-nav ul {
    flex-wrap: nowrap; overflow-x: auto; gap: 0;
    margin: 0 -1.5rem; padding: 0 1.5rem 0.25rem;
    scrollbar-width: none;
  }
  .main-nav ul::-webkit-scrollbar { display: none; }
  .hero { padding: 3.5rem 0 3rem; }
  .hero-cta .btn { flex: 1 1 auto; }
  .tool-top { align-items: center; }
  section.block { padding: 3rem 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
