/* Homepage only. Loaded after tokens.css. Light, token-driven, no external assets. */

.masthead,
.page,
.foot {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 32px);
}

html { scrollbar-color: var(--line-2) transparent; }

/* ---- Masthead ------------------------------------------------------------ */
.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: clamp(18px, 3.5vw, 28px);
  padding-bottom: clamp(18px, 3.5vw, 28px);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 1.06rem;
  letter-spacing: -.01em;
  color: var(--text);
  text-decoration: none;
}
.brand svg { width: 22px; height: 22px; color: var(--accent); flex: 0 0 auto; }
.badge-local {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: .8rem;
  color: var(--text-2);
  cursor: help;
}
.badge-local svg { width: 15px; height: 15px; flex: 0 0 auto; }
.badge-local::after {
  content: attr(data-tip);
  position: absolute;
  right: 0;
  top: calc(100% + 9px);
  z-index: 20;
  width: max-content;
  max-width: 240px;
  padding: 9px 12px;
  border-radius: var(--radius-in);
  background: #1b2430;
  color: #fff;
  font-size: .78rem;
  font-weight: 400;
  line-height: 1.45;
  text-align: left;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(-3px);
  pointer-events: none;
  transition: opacity .14s ease, transform .14s ease;
}
.badge-local:hover::after,
.badge-local:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Hero -------------------------------------------------------------- */
.hero {
  display: grid;
  gap: clamp(28px, 5vw, 56px);
  align-items: center;
  padding: clamp(24px, 6vw, 64px) 0 clamp(40px, 8vw, 80px);
}
.hero h1 {
  margin: 0;
  font-size: clamp(2.05rem, 1.35rem + 3.3vw, 3.35rem);
  line-height: 1.04;
  letter-spacing: -.035em;
  text-wrap: balance;
  max-width: 15ch;
}
.hero-lede {
  margin: 18px 0 0;
  font-size: clamp(1rem, .95rem + .3vw, 1.13rem);
  line-height: 1.6;
  color: var(--text-2);
  max-width: 44ch;
  text-wrap: pretty;
}
.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}
.hero-facts li {
  padding: 4px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-2);
}
.hero-jump {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 24px;
  font-weight: 600;
  font-size: .92rem;
  color: var(--accent-2);
  text-decoration: none;
}
.hero-jump svg { width: 16px; height: 16px; transition: transform .16s ease-out; }
.hero-jump:hover svg { transform: translateY(2px); }

.hero-figure {
  justify-self: center;
  width: 100%;
  max-width: 300px;
  color: var(--accent);
}
.hero-figure svg { width: 100%; height: auto; display: block; opacity: .92; }
.hero-figure .hf-draw > * {
  stroke-dasharray: 620;
  stroke-dashoffset: 620;
  animation: hf-in 1.1s .1s ease-out forwards;
}
@keyframes hf-in { to { stroke-dashoffset: 0; } }

@media (min-width: 880px) {
  .hero { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); }
  .hero-figure { max-width: 340px; justify-self: end; }
}

/* ---- Tool directory -------------------------------------------------- */
.tools { scroll-margin-top: 24px; }
.landing-area + .landing-area { margin-top: clamp(30px, 5vw, 46px); }
.landing-area > h2 {
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  font-size: .95rem;
  font-weight: 650;
  letter-spacing: -.01em;
  color: var(--text);
}
.landing-area > h2 .count {
  margin-left: 8px;
  font-weight: 500;
  font-size: .82rem;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}

.landing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 264px), 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.landing-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 100%;
  padding: 16px 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  transition: border-color .13s ease, box-shadow .13s ease, transform .13s ease;
}
.landing-card:hover,
.landing-card:focus-visible {
  border-color: var(--line-2);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.landing-card h3 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  font-weight: 650;
  letter-spacing: -.01em;
  transition: color .13s ease;
}
.landing-card:hover h3,
.landing-card:focus-visible h3 { color: var(--accent-2); }
.landing-card p {
  margin: 0;
  font-size: .86rem;
  line-height: 1.5;
  color: var(--text-2);
  text-wrap: pretty;
}
.landing-card .tag {
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--warn-bg);
  color: var(--warn);
  font-size: .64rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

/* ---- How it works -------------------------------------------------- */
.how {
  margin-top: clamp(52px, 9vw, 104px);
  padding: clamp(22px, 4vw, 36px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.how h2 { margin: 0; font-size: 1.1rem; letter-spacing: -.01em; }
.how-steps {
  display: grid;
  gap: 16px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}
.how-steps li { display: flex; align-items: flex-start; gap: 12px; }
.how-n {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--accent-bg);
  color: var(--accent-2);
  font-size: .78rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.how-steps li p { margin: 0; font-size: .9rem; line-height: 1.55; color: var(--text-2); }
.how-foot {
  margin: 18px 0 0;
  font-size: .84rem;
  line-height: 1.55;
  color: var(--text-2);
  max-width: 68ch;
}
@media (min-width: 720px) {
  .how-steps { grid-template-columns: repeat(3, 1fr); gap: 26px; }
}

/* ---- Footer ------------------------------------------------------- */
.foot {
  margin-top: clamp(44px, 8vw, 84px);
  padding-top: 24px;
  padding-bottom: 48px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  font-size: .84rem;
  color: var(--text-2);
}
.foot-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 650;
  color: var(--text);
}
.foot-brand svg { width: 18px; height: 18px; color: var(--accent); }
.foot-nav { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.foot-nav a,
.foot-note a { color: var(--text-2); }
.foot-nav a:hover,
.foot-note a:hover { color: var(--accent-2); }
.foot-note { flex-basis: 100%; margin: 0; line-height: 1.55; max-width: 70ch; }

@media (max-width: 460px) {
  .badge-local span { display: none; }
}
