/* Tools page (/tools/, /ja/tools/) — shared EN + JA. Not loaded elsewhere.
   Reuses .section-label, .scan-cta / .scan-cta-arrow, .connect-heading /
   .cta-accent from styles.css. */

/* Status badge colors — scoped here rather than styles.css :root since
   they're only used by this page's StatusBadge component, not part of
   the sitewide palette. Not bound to Figma variables (raw hex on the
   StatusBadge component variants), so these are new tokens rather than
   a reuse of an existing close color. */
:root {
  --status-stack:            #12D510;
  --status-stack-bg:         rgba(63, 232, 61, 0.12);
  --status-stack-border:     rgba(18, 213, 16, 0.3);
  --status-rotation:         #00C7BE;  /* Colors/Mint, the one variant that IS a bound Figma variable */
  --status-rotation-bg:      rgba(54, 232, 199, 0.12);
  --status-rotation-border:  rgba(54, 232, 199, 0.3);
  --status-watching:         #AAA9FF;
  --status-watching-bg:      rgba(170, 169, 255, 0.12);
  --status-watching-border:  rgba(170, 169, 255, 0.3);
  --status-overhyped:        #FFAE00;
  --status-overhyped-bg:     rgba(255, 174, 0, 0.12);
  --status-overhyped-border: rgba(255, 174, 0, 0.3);
  --status-dropped:          #F87171;
  --status-dropped-bg:       rgba(248, 113, 113, 0.1);
  --status-dropped-border:   rgba(248, 113, 113, 0.25);
}

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

.tools-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  width: 100%;
  padding: 100px clamp(20px, 8vw, 96px);
  text-align: center;
}

.tools-hero-title {
  font-size: var(--font-size-display);
  font-weight: var(--weight-black);
  letter-spacing: -2px;
  text-transform: uppercase;
  line-height: 1;
  color: var(--text-accent);
}

.tools-hero-intro {
  font-size: var(--font-size-body-md);
  line-height: var(--line-height-body);
  max-width: 559px;
  color: var(--text-primary);
}

/* ---- Page body wrapper (the slightly-recessed panel behind the
   community strip / grid / graveyard, close to but distinct from
   --bg-canvas so it reads as a nested surface) ---- */

.tools-body {
  width: 100%;
  background: var(--bg-canvas);
}

.tools-section {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: var(--space-xl);
  padding-right: var(--space-xl);
}

/* ---- Community strip ---- */

.community-strip {
  width: 100%;
  background: var(--bg-surface);
  padding: var(--space-lg) 0;
}

.community-strip-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-md);
  transition: opacity 0.2s;
}

.community-strip-inner:hover {
  opacity: 0.85;
}

.community-strip-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-pill);
  background: var(--bg-brand);
  color: var(--accent-ink);
}

.community-strip-text {
  flex: 0 1 auto;
  font-size: var(--font-size-body-md);
  line-height: var(--line-height-body);
  color: var(--text-primary);
}

.community-strip-arrow {
  flex-shrink: 0;
  font-weight: var(--weight-black);
  font-size: var(--font-size-body-lg);
  color: var(--bg-brand);
}

/* ---- Section heads (Active / Graveyard) ---- */

.tools-section-head {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.tools-section-head .section-label {
  margin-bottom: 0;
}

.tools-section-sub {
  font-size: var(--font-size-body-md);
  line-height: var(--line-height-body);
  color: var(--text-muted);
}

/* ---- Active tools grid ---- */

.tools-active {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
  padding: var(--space-xxxl) 0 var(--space-xxl);
}

.tools-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
}

.tool-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  padding: var(--space-lg);
  background: var(--bg-elevated);
  border: 1px solid var(--border-rule);
  border-radius: var(--radius-md);
}

.tool-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-md);
}

.tool-card-heading {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  min-width: 0;
}

.tool-card-title {
  font-size: var(--font-size-heading-3);
  font-weight: var(--weight-black);
  line-height: 1.2;
  color: var(--text-primary);
}

.tool-card-tag {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  padding: var(--space-xs) var(--space-12);
  background: var(--bg-surface);
  border: 1px solid var(--border-rule);
  border-radius: var(--radius-sm);
  font-size: var(--font-size-label-small);
  font-weight: var(--weight-black);
  letter-spacing: var(--tracking-eyebrow);
  line-height: 1.5;
  text-transform: uppercase;
  color: var(--text-accent);
}

.tool-card-summary {
  font-size: var(--font-size-body-md);
  font-weight: var(--weight-semibold);
  line-height: var(--line-height-body);
  color: var(--text-muted);
}

.tool-card-verdict {
  margin-top: auto;
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border-rule);
}

.tool-card-verdict-label {
  margin-bottom: var(--space-sm);
  font-size: var(--font-size-label-small);
  font-weight: var(--weight-black);
  letter-spacing: var(--tracking-eyebrow);
  line-height: 1.5;
  text-transform: uppercase;
  color: var(--text-accent);
}

.tool-card-verdict-text {
  font-size: var(--font-size-body-md);
  line-height: var(--line-height-body);
  color: var(--text-muted);
}

/* ---- Status badge (core stack / in rotation / watching / overhyped / dropped) ---- */

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-6);
  flex-shrink: 0;
  padding: var(--space-xs) var(--space-12);
  border-radius: var(--radius-pill);
  border: 1px solid;
  font-size: var(--font-size-label-medium);
  font-weight: var(--weight-medium);
  line-height: var(--line-height-label);
  white-space: nowrap;
  color: var(--text-primary);
}

.status-badge-dot {
  flex-shrink: 0;
  width: var(--space-6);
  height: var(--space-6);
  border-radius: 50%;
}

.status-badge--stack {
  background: var(--status-stack-bg);
  border-color: var(--status-stack-border);
}
.status-badge--stack .status-badge-dot { background: var(--status-stack); }

.status-badge--rotation {
  background: var(--status-rotation-bg);
  border-color: var(--status-rotation-border);
}
.status-badge--rotation .status-badge-dot { background: var(--status-rotation); }

.status-badge--watching {
  background: var(--status-watching-bg);
  border-color: var(--status-watching-border);
}
.status-badge--watching .status-badge-dot { background: var(--status-watching); }

.status-badge--overhyped {
  background: var(--status-overhyped-bg);
  border-color: var(--status-overhyped-border);
}
.status-badge--overhyped .status-badge-dot { background: var(--status-overhyped); }

.status-badge--dropped {
  background: var(--status-dropped-bg);
  border-color: var(--status-dropped-border);
  color: var(--status-dropped);
}
.status-badge--dropped .status-badge-dot { background: var(--status-dropped); }

/* ---- Graveyard ---- */

.tools-graveyard {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  padding: var(--space-md) 0 var(--space-xxxl);
}

.tools-graveyard-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-rule);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.graveyard-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-12);
  padding: var(--space-lg);
  border-bottom: 1px solid var(--border-rule);
}

.graveyard-row:last-child {
  border-bottom: none;
}

.graveyard-row:nth-child(2),
.graveyard-row:nth-child(3) {
  background: rgb(from var(--bg-elevated) r g b / 40%);
}

.graveyard-row-head {
  display: flex;
  align-items: center;
  gap: var(--space-12);
  flex: 0 0 260px;
}

.graveyard-name {
  font-size: var(--font-size-body-md);
  font-weight: var(--weight-black);
  line-height: 1.5;
  color: var(--text-primary);
}

.graveyard-note {
  flex: 1 1 320px;
  font-size: var(--font-size-body-md);
  line-height: var(--line-height-body);
  color: var(--text-muted);
}

/* ---- Footnote ---- */

.tools-footnote {
  padding: var(--space-xl);
  border-top: 1px solid var(--border-rule);
}

.tools-footnote p {
  max-width: 1200px;
  margin: 0 auto;
  font-size: var(--font-size-body-md);
  line-height: var(--line-height-body);
  color: var(--text-primary);
}

/* ---- Contribute CTA bar ---- */

.tools-cta {
  padding: var(--space-xxl) 0;
  background: var(--bg-canvas);
  border-top: 1px solid var(--border-rule);
}

.tools-cta-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: var(--space-xl);
}

@media (max-width: 1024px) {
  .tools-hero-title {
    font-size: 48px;
    letter-spacing: -1.92px;
  }

  .tools-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .tools-section {
    padding-left: var(--space-md);
    padding-right: var(--space-md);
  }

  .tools-cta {
    padding: var(--space-xl) 0;
  }

  .tools-cta-inner {
    justify-content: center;
    text-align: center;
  }

  .tools-cta .scan-cta {
    width: 100%;
    justify-content: center;
  }

  .graveyard-row {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-sm);
  }

  .graveyard-row-head {
    flex: 0 0 auto;
  }

  .graveyard-note {
    /* .graveyard-note's flex-basis: 320px (desktop) becomes a min-height
       once the row switches to flex-direction: column here — without
       this reset it forces the text box to 320px tall regardless of
       actual content, leaving a huge gap before the next row. */
    flex: 1 1 auto;
  }
}

@media (max-width: 480px) {
  .tools-hero-title {
    font-size: 40px;
    letter-spacing: -1.6px;
  }

  .tool-card-top {
    flex-direction: column;
  }
}
