/* Home page styles */

.hero { padding: 64px 0 40px; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 48px;
  align-items: center;
}
.hero h1 {
  font-size: clamp(2.3rem, 5.6vw, 4rem);
  font-weight: 800;
  margin: 20px 0 18px;
  letter-spacing: -0.035em;
}
.hero .lead { font-size: 1.12rem; color: var(--text-soft); max-width: 560px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 34px; }

.hero-stats { display: flex; flex-wrap: wrap; gap: 28px; margin: 0; }
.hero-stats div { min-width: 90px; }
.hero-stats dt { font-size: 1.7rem; font-weight: 800; letter-spacing: -0.03em; }
.hero-stats dd { margin: 0; color: var(--text-mute); font-size: .88rem; font-weight: 600; }

/* ---------- Hero illustration ---------- */

.hero-art {
  position: relative;
  min-height: 400px;
}
.art-card {
  position: absolute;
  width: 62%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  padding: 16px;
}
.art-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .8rem;
  font-weight: 700;
  color: var(--text-soft);
  margin-bottom: 12px;
}
.art-file {
  font-size: .64rem;
  font-weight: 800;
  padding: 3px 7px;
  border-radius: 6px;
  color: #fff;
}
.art-file.pdf { background: #ef4444; }
.art-file.md { background: #111827; }
:root[data-theme="dark"] .art-file.md { background: #4b5563; }

.art-pdf {
  top: 8px; left: 0;
  transform: rotate(-5deg);
  animation: bob 7s ease-in-out infinite;
}
.art-lines i {
  display: block;
  height: 8px;
  border-radius: 6px;
  background: var(--bg-soft);
  background: color-mix(in srgb, var(--text-mute) 22%, transparent);
  margin: 8px 0;
}
.art-fig {
  height: 74px;
  margin: 12px 0;
  border-radius: 10px;
  background: var(--gradient-soft);
  color: var(--brand-2);
  display: grid;
  place-items: center;
}
.art-fig svg { width: 70%; height: 70%; }

.art-md {
  top: 120px; right: 0;
  transform: rotate(3deg);
  animation: bob 7s ease-in-out infinite -3.5s;
}
.art-md pre {
  margin: 0;
  font-family: var(--mono);
  font-size: .78rem;
  line-height: 1.65;
  white-space: pre-wrap;
  color: var(--text-soft);
}
.art-md .c1 { color: var(--brand-1); font-weight: 700; }
.art-md .c2 { color: var(--brand-3); }
.art-md .c3 { color: var(--accent); }

.art-arrow {
  position: absolute;
  top: 56px; left: 74%;
  transform: translateX(-50%);
  z-index: 2;
  width: 52px; height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--gradient);
  box-shadow: 0 12px 26px -8px rgba(124, 77, 255, .8);
  animation: pulse 2.4s ease-in-out infinite;
}
.art-arrow svg { width: 24px; height: 24px; }

.art-figs {
  position: absolute;
  left: 6%; bottom: 0;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.art-figs span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px 8px 8px;
  border-radius: 12px;
  font-family: var(--mono);
  font-size: .74rem;
  font-weight: 600;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  animation: bob 6s ease-in-out infinite;
}
.art-figs span:nth-child(2) { animation-delay: -2s; }
.art-figs span:nth-child(3) { animation-delay: -4s; }
.art-figs b {
  width: 22px; height: 22px;
  border-radius: 6px;
  background: var(--gradient);
}

@keyframes bob {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -10px; }
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 12px 26px -8px rgba(124, 77, 255, .8), 0 0 0 0 rgba(155, 77, 255, .35); }
  50% { box-shadow: 0 12px 26px -8px rgba(124, 77, 255, .8), 0 0 0 14px rgba(155, 77, 255, 0); }
}

/* ---------- Sections ---------- */

.section { padding: 56px 0 24px; scroll-margin-top: calc(var(--header-h) + 8px); }
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}
.section-head.center { justify-content: center; text-align: center; }
.section-head h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); font-weight: 800; margin: 6px 0 6px; }
.section-sub { color: var(--text-soft); margin: 0; }
.eyebrow {
  display: inline-block;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Search + filters ---------- */

.search {
  position: relative;
  display: flex;
  align-items: center;
  width: min(100%, 340px);
}
.search svg {
  position: absolute;
  left: 14px;
  width: 18px; height: 18px;
  color: var(--text-mute);
  pointer-events: none;
}
.search input {
  width: 100%;
  font: inherit;
  font-size: .95rem;
  padding: 12px 14px 12px 42px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.search input:focus {
  outline: none;
  border-color: var(--brand-1);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand-1) 18%, transparent);
}

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.filter {
  font: inherit;
  font-size: .88rem;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-soft);
  cursor: pointer;
}
.filter.active { color: #fff; border-color: transparent; background: var(--gradient); }

/* ---------- Tool cards ---------- */

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 20px;
}
.tool-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 24px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  color: var(--text) !important;
  text-decoration: none !important;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  animation: card-in .5s ease both;
  isolation: isolate;
}
.tool-card::before {
  /* gradient ring on hover */
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1.5px;
  background: var(--gradient);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity .25s ease;
  z-index: -1;
}
a.tool-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: transparent; }
a.tool-card:hover::before { opacity: 1; }
.tool-card-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 18px; }
.tool-card-icon {
  width: 54px; height: 54px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--gradient);
  box-shadow: 0 12px 24px -12px rgba(124, 77, 255, .9);
  transition: transform .3s ease;
}
a.tool-card:hover .tool-card-icon { transform: rotate(-6deg) scale(1.06); }
.tool-card-icon svg { width: 28px; height: 28px; }
.tool-card h3 { font-size: 1.22rem; font-weight: 800; margin-bottom: 8px; }
.tool-card p { color: var(--text-soft); font-size: .95rem; margin-bottom: 16px; flex: 1; }
.tool-card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.tool-card-go {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: .92rem;
  color: var(--brand-1);
}
:root[data-theme="dark"] .tool-card-go { color: #a5a8ff; }
.tool-card-go svg { width: 16px; height: 16px; transition: transform .2s ease; }
a.tool-card:hover .tool-card-go svg { transform: translateX(4px); }

.tool-card.disabled { opacity: .7; }
.tool-card.placeholder {
  align-items: center;
  justify-content: center;
  text-align: center;
  background: transparent;
  border: 2px dashed var(--border-strong);
  box-shadow: none;
  min-height: 250px;
}
.tool-card.placeholder h3 { color: var(--text-soft); }
.tool-card.placeholder p { color: var(--text-mute); flex: 0; margin: 0; }
.ph-plus {
  width: 54px; height: 54px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.8rem;
  font-weight: 300;
  color: var(--text-mute);
  border: 2px dashed var(--border-strong);
  margin-bottom: 14px;
}

.empty { text-align: center; color: var(--text-mute); padding: 30px 0; }

.cat-head {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 14px 0 -4px;
  font-size: 1.05rem;
  font-weight: 800;
}
.cat-head:first-child { margin-top: 0; }
.cat-head::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.cat-head small {
  order: 2;
  font-size: .74rem;
  font-weight: 700;
  color: var(--text-mute);
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid var(--border);
}

@keyframes card-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- Features ---------- */

.features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.feature {
  padding: 24px;
  border-radius: var(--radius-lg);
  background: var(--surface-glass);
  border: 1px solid var(--border);
  backdrop-filter: blur(6px);
}
.feature h3 { font-size: 1.08rem; font-weight: 800; margin: 16px 0 8px; }
.feature p { color: var(--text-soft); font-size: .93rem; margin: 0; }
.f-icon {
  width: 46px; height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
}
.f-icon svg { width: 22px; height: 22px; }
.f1 { background: linear-gradient(135deg, #5b5bf6, #7c7cff); }
.f2 { background: linear-gradient(135deg, #f59e0b, #f97316); }
.f3 { background: linear-gradient(135deg, #ff5fa2, #e11d74); }
.f4 { background: linear-gradient(135deg, #10b9a6, #0ea5e9); }
.feature:nth-child(2) { transition-delay: .08s; }
.feature:nth-child(3) { transition-delay: .16s; }
.feature:nth-child(4) { transition-delay: .24s; }

/* ---------- About ---------- */

.about {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 34px;
  align-items: center;
  padding: 36px;
  background:
    radial-gradient(600px 200px at 0% 0%, rgba(124, 77, 255, .10), transparent 70%),
    var(--surface);
}
.avatar {
  width: 132px; height: 132px;
  border-radius: 50%;
  padding: 4px;
  background: var(--gradient);
  box-shadow: 0 20px 40px -18px rgba(124, 77, 255, .9);
}
.avatar span {
  width: 100%; height: 100%;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface);
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.about h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; margin: 6px 0 4px; }
.about .role { color: var(--brand-2); font-weight: 700; margin-bottom: 14px; }
.about p { color: var(--text-soft); }
.about .muted { color: var(--text-mute); margin: 0; font-size: .95rem; }

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { min-height: 380px; max-width: 520px; width: 100%; margin: 0 auto; }
  .features { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .hero { padding-top: 36px; }
  .hero-art { min-height: 400px; }
  .art-card { width: 74%; }
  .art-md { top: 118px; }
  .art-figs { left: 0; }
  .art-arrow { top: 72px; left: 84%; }
  .features { grid-template-columns: 1fr; }
  .about { grid-template-columns: 1fr; text-align: center; padding: 28px 20px; }
  .avatar { margin: 0 auto; width: 110px; height: 110px; }
  .search { width: 100%; }
  .container { padding: 0 16px; }
}
