
/* ================================================================
   HOMEPAGE — body.home-page  (hp-* design system)
   ================================================================ */

/* ── Base ───────────────────────────────────────────────────── */
body.home-page { background: #f1f5f9; }
body.home-page main { background: transparent; }

.hp-wrap {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 1rem;
}
@media(min-width:640px)  { .hp-wrap { padding: 0 1.5rem; } }
@media(min-width:1024px) { .hp-wrap { padding: 0 2rem; } }

/* ── Hero ───────────────────────────────────────────────────── */
.hp-hero {
  background: linear-gradient(160deg, #eef2ff 0%, #f5f3ff 30%, #faf5ff 65%, #f8fafc 100%);
  border-bottom: 1px solid #e2e8f0;
}
.hp-hero-inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 4.5rem 1.5rem 3rem;
  text-align: center;
}
.hp-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: #fff;
  border: 1.5px solid #e0e7ff;
  color: #4338ca;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: .35rem 1rem;
  border-radius: 9999px;
  margin-bottom: 1.5rem;
  box-shadow: 0 1px 4px rgba(79,70,229,.08);
}
.hp-eyebrow-dot {
  width: 6px;
  height: 6px;
  background: #22c55e;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(34,197,94,.25);
}
.hp-h1 {
  font-size: clamp(2rem,5vw,3.1rem);
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -.04em;
  line-height: 1.12;
  margin-bottom: 1.1rem;
}
.hp-br { display: none; }
@media(min-width:480px) { .hp-br { display: block; } }
.hp-subtitle {
  font-size: clamp(.9rem,2vw,1.05rem);
  color: #64748b;
  line-height: 1.7;
  max-width: 600px;
  margin: 0 auto 2.25rem;
}

/* Search */
.hp-search-container { margin-bottom: 1.75rem; }
.hp-search-box {
  position: relative;
  max-width: 580px;
  margin: 0 auto;
}
.hp-search-svg {
  position: absolute;
  left: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  pointer-events: none;
}
.hp-search-input {
  width: 100%;
  padding: .875rem 3rem .875rem 3rem;
  border: 2px solid #e0e7ff;
  border-radius: 9999px;
  font-size: .95rem;
  font-family: var(--font-sans);
  color: #0f172a;
  background: #fff;
  box-shadow: 0 4px 20px rgba(79,70,229,.08), 0 1px 3px rgba(0,0,0,.04);
  transition: border-color 200ms, box-shadow 200ms;
}
.hp-search-input:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 4px 20px rgba(79,70,229,.12), 0 0 0 4px rgba(99,102,241,.1);
}
.hp-search-clear {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #94a3b8;
  color: #fff;
  font-size: .7rem;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.hp-search-clear:hover { background: #475569; }

/* Category pills */
.hp-cat-pills {
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
  justify-content: center;
}
.hp-pill {
  padding: .4rem 1rem;
  border-radius: 9999px;
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 200ms;
  border: 1.5px solid #e2e8f0;
  background: #fff;
  color: #475569;
  white-space: nowrap;
}
.hp-pill span {
  background: #f1f5f9;
  color: #94a3b8;
  border-radius: 9999px;
  font-size: .65rem;
  padding: .05rem .4rem;
  margin-left: .25rem;
}
.hp-pill:hover { border-color: #a5b4fc; color: #4338ca; background: #f5f3ff; }
.hp-pill.active { background: #4f46e5; color: #fff; border-color: #4f46e5; }
.hp-pill.active span { background: rgba(255,255,255,.25); color: #fff; }
.hp-pill.active.finance { background: #059669; border-color: #059669; }
.hp-pill.active.usa     { background: #2563eb; border-color: #2563eb; }
.hp-pill.active.dev     { background: #7c3aed; border-color: #7c3aed; }
.hp-pill.active.convert { background: #d97706; border-color: #d97706; }
.hp-pill.active.general { background: #db2777; border-color: #db2777; }

/* Stats bar */
.hp-stats-bar {
  background: #fff;
  border-top: 1px solid #e2e8f0;
  padding: 1rem;
}
.hp-stats-inner {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: .5rem 0;
}
.hp-stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: .25rem 1.5rem;
}
.hp-stat-item strong {
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1;
}
.hp-stat-item span {
  font-size: .67rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 600;
  margin-top: .2rem;
  white-space: nowrap;
}
.hp-stat-sep {
  width: 1px;
  height: 28px;
  background: #e2e8f0;
}
@media(max-width:480px) {
  .hp-stat-sep { display: none; }
  .hp-stat-item { padding: .25rem .75rem; }
}

/* ── Popular tools ───────────────────────────────────────────── */
.hp-popular { padding: 2.5rem 0 1rem; }
.hp-section-label { margin-bottom: 1.25rem; }
.hp-section-label.center { text-align: center; }
.hp-label-badge {
  display: inline-block;
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: .25rem .75rem;
  border-radius: 9999px;
  margin-bottom: .5rem;
}
.hp-label-badge.popular { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.hp-section-h2 {
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -.02em;
  margin-bottom: .3rem;
}
.hp-section-sub { font-size: .85rem; color: #64748b; }

.hp-pop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: .625rem;
}
.hp-pop-card {
  display: flex;
  align-items: center;
  gap: .625rem;
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  padding: .75rem 1rem;
  text-decoration: none;
  color: #0f172a;
  font-weight: 600;
  font-size: .825rem;
  transition: all 200ms;
  white-space: nowrap;
  overflow: hidden;
}
.hp-pop-card:hover {
  border-color: #a5b4fc;
  box-shadow: 0 4px 12px rgba(79,70,229,.1);
  transform: translateY(-2px);
  color: #4338ca;
}
.hp-pop-card.finance:hover { border-color: #6ee7b7; color: #059669; }
.hp-pop-card.usa:hover     { border-color: #93c5fd; color: #2563eb; }
.hp-pop-card.dev:hover     { border-color: #a78bfa; color: #7c3aed; }
.hp-pop-card.general:hover { border-color: #f9a8d4; color: #db2777; }
.hp-pop-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.hp-pop-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.hp-pop-arrow { flex-shrink: 0; color: #94a3b8; }
.hp-pop-card:hover .hp-pop-arrow { color: inherit; }

/* ── Tool sections ───────────────────────────────────────────── */
.hp-tools-area { padding-bottom: 1rem; }
.hp-section { padding: 1.5rem 0 0; }

/* Category header */
.hp-cat-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.5rem 1.5rem 1.25rem;
  background: #fff;
  border-radius: 14px 14px 0 0;
  border: 1.5px solid #e2e8f0;
  position: relative;
  flex-wrap: wrap;
}
@media(min-width:640px) { .hp-cat-header { padding: 1.5rem 1.75rem 1.25rem; } }
.hp-cat-header::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  border-radius: 0;
}
.hp-cat-header.finance::after { background: #059669; }
.hp-cat-header.usa::after     { background: #2563eb; }
.hp-cat-header.dev::after     { background: #7c3aed; }
.hp-cat-header.convert::after { background: #d97706; }
.hp-cat-header.general::after { background: #db2777; }

.hp-cat-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.hp-cat-icon-wrap.finance { background: linear-gradient(135deg,#d1fae5,#a7f3d0); }
.hp-cat-icon-wrap.usa     { background: linear-gradient(135deg,#dbeafe,#bfdbfe); }
.hp-cat-icon-wrap.dev     { background: linear-gradient(135deg,#ede9fe,#ddd6fe); }
.hp-cat-icon-wrap.convert { background: linear-gradient(135deg,#fef3c7,#fde68a); }
.hp-cat-icon-wrap.general { background: linear-gradient(135deg,#fce7f3,#fbcfe8); }

.hp-cat-title-wrap { flex: 1; min-width: 200px; }
.hp-cat-title-wrap h2 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -.02em;
  margin-bottom: .3rem;
}
.hp-cat-title-wrap p {
  font-size: .82rem;
  color: #64748b;
  line-height: 1.5;
  margin: 0;
}
.hp-cat-badge {
  flex-shrink: 0;
  font-size: .68rem;
  font-weight: 700;
  padding: .3rem .75rem;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: .06em;
  align-self: flex-start;
}
.hp-cat-badge.finance { background: #d1fae5; color: #065f46; }
.hp-cat-badge.usa     { background: #dbeafe; color: #1e3a8a; }
.hp-cat-badge.dev     { background: #ede9fe; color: #4c1d95; }
.hp-cat-badge.convert { background: #fef3c7; color: #78350f; }
.hp-cat-badge.general { background: #fce7f3; color: #831843; }

/* Tool grid */
.hp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: .625rem;
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-top: none;
  border-radius: 0 0 14px 14px;
  padding: .75rem;
  box-shadow: 0 4px 16px rgba(0,0,0,.04);
}

/* ── Tool Cards ──────────────────────────────────────────────── */
.hp-card {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  background: #fff;
  border: 1.5px solid #f1f5f9;
  border-radius: 10px;
  padding: .875rem 1rem;
  text-decoration: none;
  color: #0f172a;
  transition: all 200ms;
  position: relative;
  overflow: hidden;
}
.hp-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 200ms;
}
.hp-card-finance::before { background: #059669; }
.hp-card-usa::before     { background: #2563eb; }
.hp-card-dev::before     { background: #7c3aed; }
.hp-card-convert::before { background: #d97706; }
.hp-card-general::before { background: #db2777; }
.hp-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.07); transform: translateY(-2px); }
.hp-card:hover::before { transform: scaleX(1); }
.hp-card-finance:hover { border-color: #6ee7b7; }
.hp-card-usa:hover     { border-color: #93c5fd; }
.hp-card-dev:hover     { border-color: #a78bfa; }
.hp-card-convert:hover { border-color: #fcd34d; }
.hp-card-general:hover { border-color: #f9a8d4; }

.hp-card-top { display: flex; align-items: center; gap: .6rem; }
.hp-card-icon {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.hp-icon-finance,.hp-pop-icon.hp-icon-finance { background: #d1fae5; }
.hp-icon-usa,.hp-pop-icon.hp-icon-usa         { background: #dbeafe; }
.hp-icon-dev,.hp-pop-icon.hp-icon-dev         { background: #ede9fe; }
.hp-icon-convert,.hp-pop-icon.hp-icon-convert { background: #fef3c7; }
.hp-icon-general,.hp-pop-icon.hp-icon-general { background: #fce7f3; }

.hp-card-info { flex: 1; min-width: 0; }
.hp-card-name {
  font-size: .845rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hp-card-finance:hover .hp-card-name { color: #059669; }
.hp-card-usa:hover     .hp-card-name { color: #2563eb; }
.hp-card-dev:hover     .hp-card-name { color: #7c3aed; }
.hp-card-convert:hover .hp-card-name { color: #d97706; }
.hp-card-general:hover .hp-card-name { color: #db2777; }
.hp-usa-badge {
  display: inline-block;
  background: #dbeafe;
  color: #1e40af;
  font-size: .6rem;
  font-weight: 700;
  padding: .1rem .4rem;
  border-radius: 4px;
  margin-top: .2rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.hp-card-arr {
  flex-shrink: 0;
  color: #cbd5e1;
  transition: color 200ms, transform 200ms;
}
.hp-card:hover .hp-card-arr { color: #94a3b8; transform: translateX(2px); }
.hp-card-desc {
  font-size: .77rem;
  color: #64748b;
  line-height: 1.5;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hp-card-tags { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: auto; }
.hp-tag {
  font-size: .65rem;
  font-weight: 600;
  padding: .15rem .5rem;
  border-radius: 9999px;
  border: 1px solid;
  white-space: nowrap;
}
.hp-card-finance .hp-tag { background: #f0fdf4; color: #059669; border-color: #bbf7d0; }
.hp-card-usa     .hp-tag { background: #eff6ff; color: #2563eb; border-color: #bfdbfe; }
.hp-card-dev     .hp-tag { background: #f5f3ff; color: #7c3aed; border-color: #ddd6fe; }
.hp-card-convert .hp-tag { background: #fffbeb; color: #d97706; border-color: #fde68a; }
.hp-card-general .hp-tag { background: #fdf2f8; color: #db2777; border-color: #fbcfe8; }

/* ── Why FreeByte ─────────────────────────────────────────────── */
.hp-why {
  padding: 3rem 0;
  background: #fff;
  border-top: 1px solid #e2e8f0;
  margin-top: 2rem;
}
.hp-why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}
.hp-why-card {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  padding: 1.5rem;
}
.hp-why-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: .875rem;
}
.hp-why-card h3 { font-size: .95rem; font-weight: 700; color: #0f172a; margin-bottom: .4rem; }
.hp-why-card p  { font-size: .82rem; color: #64748b; line-height: 1.6; }

/* ── SEO Content ─────────────────────────────────────────────── */
.hp-seo {
  padding: 2.5rem 0 3rem;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
}
.hp-seo-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
@media(min-width:768px) { .hp-seo-grid { grid-template-columns: 1fr 1fr; } }
.hp-seo-block h2 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: .75rem;
  letter-spacing: -.02em;
}
.hp-seo-block p { font-size: .82rem; color: #475569; line-height: 1.75; margin-bottom: .6rem; }
.hp-seo-block a { color: #4338ca; font-weight: 500; text-decoration: none; }
.hp-seo-block a:hover { text-decoration: underline; }

/* ── No results ──────────────────────────────────────────────── */
.hp-no-results { padding: 1.5rem; }
.hp-no-results-inner {
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 16px;
  padding: 4rem 1rem;
  text-align: center;
  max-width: 420px;
  margin: 0 auto;
}
.hp-no-results-icon  { font-size: 3rem; margin-bottom: .5rem; }
.hp-no-results-title { font-size: 1.1rem; font-weight: 700; color: #0f172a; margin-bottom: .35rem; }
.hp-no-results-sub   { font-size: .85rem; color: #64748b; margin-bottom: 1.5rem; }

/* ── Footer ──────────────────────────────────────────────────── */
.hp-footer { background: #0f172a; color: #94a3b8; padding: 3rem 0 0; }
.hp-footer-inner { max-width: 1360px; margin: 0 auto; padding: 0 1.5rem; }
@media(min-width:1024px) { .hp-footer-inner { padding: 0 2rem; } }
.hp-footer-top {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid #1e293b;
}
@media(min-width:768px) { .hp-footer-top { grid-template-columns: 220px 1fr; } }
.hp-footer-logo { font-size: 1.4rem; font-weight: 800; color: #fff; margin-bottom: .5rem; letter-spacing: -.03em; }
.hp-footer-logo span { color: #6366f1; }
.hp-footer-brand p { font-size: .8rem; color: #64748b; line-height: 1.6; margin-bottom: 1rem; }
.hp-trust-badges { display: flex; gap: .5rem; flex-wrap: wrap; }
.hp-trust-badges span {
  background: #1e293b;
  color: #94a3b8;
  font-size: .68rem;
  font-weight: 600;
  padding: .25rem .6rem;
  border-radius: 6px;
  border: 1px solid #334155;
}
.hp-footer-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 2rem;
}
.hp-footer-col h4 {
  font-size: .75rem;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-bottom: .875rem;
}
.hp-footer-col a {
  display: block;
  font-size: .78rem;
  color: #64748b;
  padding: .2rem 0;
  transition: color 150ms, transform 150ms;
  text-decoration: none;
}
.hp-footer-col a:hover { color: #e2e8f0; transform: translateX(3px); }
.hp-footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 0;
  font-size: .75rem;
  color: #475569;
  flex-wrap: wrap;
  gap: .5rem;
}
.hp-footer-bottom a { color: #64748b; text-decoration: none; }
.hp-footer-bottom a:hover { color: #e2e8f0; }

/* ── Responsive ──────────────────────────────────────────────── */
@media(max-width:639px) {
  .hp-hero-inner { padding: 3rem 1rem 2rem; }
  .hp-pop-grid   { grid-template-columns: repeat(2, 1fr); }
  .hp-grid       { grid-template-columns: 1fr; }
}
@media(min-width:640px) {
  .hp-pop-grid { grid-template-columns: repeat(auto-fill, minmax(185px, 1fr)); }
}
@media(min-width:1024px) {
  .hp-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
}
