:root {
  --tools-bg: #0b0b0d;
  --tools-panel: #121216;
  --tools-panel-raised: #18181d;
  --tools-border: rgba(255, 255, 255, 0.08);
  --tools-blue: #3b82f6;
  --tools-blue-bright: #60a5fa;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--tools-bg);
}

.tools-shell {
  width: min(1200px, calc(100% - 48px));
  margin-inline: auto;
}

.tools-hero {
  position: relative;
  display: block;
  min-height: 640px;
  padding: 150px 0 64px;
  overflow: hidden;
  isolation: isolate;
  border-bottom: 1px solid var(--tools-border);
}

.tools-hero-art {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(7, 8, 12, 0.98) 0%, rgba(7, 8, 12, 0.78) 48%, rgba(7, 8, 12, 0.35) 100%),
    linear-gradient(0deg, var(--tools-bg) 0%, transparent 42%),
    url("/images/background/Dimensius_the_All-Devouring_TWW.webp") center 28% / cover no-repeat;
}

.tools-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 18% 45%, rgba(59, 130, 246, 0.16), transparent 32%),
    linear-gradient(180deg, transparent 60%, var(--tools-bg));
  pointer-events: none;
}

.tools-hero-inner {
  display: flex;
  min-height: 425px;
  flex-direction: column;
  justify-content: space-between;
  gap: 54px;
}

.tools-hero-copy {
  max-width: 720px;
}

.tools-eyebrow,
.tools-section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--tools-blue-bright);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.tools-hero h1 {
  margin: 18px 0 20px;
  color: #fafafa;
  font-size: clamp(48px, 6.3vw, 84px);
  font-weight: 800;
  line-height: 0.96;
  letter-spacing: -0.045em;
  text-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}

.tools-hero h1 span {
  color: #93c5fd;
}

.tools-hero-copy > p {
  max-width: 650px;
  margin: 0;
  color: #c4c4cc;
  font-size: 18px;
  line-height: 1.55;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.75);
}

.tools-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.tools-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 17px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.tools-button-primary {
  background: var(--tools-blue);
  border-color: rgba(147, 197, 253, 0.3);
}

.tools-button-primary:hover {
  color: #fff;
  background: #2563eb;
}

.tools-button-secondary {
  background: rgba(10, 12, 18, 0.58);
  border-color: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
}

.tools-button-secondary:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.22);
}

.tools-hero-workflow {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  max-width: 850px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(10, 11, 15, 0.76);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(16px);
}

.workflow-label {
  padding: 0 16px 0 6px;
  color: #71717a;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tools-hero-workflow a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 7px;
  color: #d4d4d8;
  text-decoration: none;
}

.tools-hero-workflow a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.tools-hero-workflow a > i {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 7px;
  color: #93c5fd;
  background: rgba(59, 130, 246, 0.13);
}

.tools-hero-workflow a span {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tools-hero-workflow a strong {
  font-size: 12px;
  font-weight: 700;
}

.tools-hero-workflow a small {
  color: #71717a;
  font-size: 10px;
}

.workflow-arrow {
  color: #3f3f46;
  font-size: 9px;
}

.tools-directory,
.tools-more {
  padding: 90px 0;
}

.tools-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 36px;
  margin-bottom: 30px;
}

.tools-section-head h2 {
  margin: 8px 0 0;
  color: #fafafa;
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 750;
  line-height: 1;
  letter-spacing: -0.035em;
}

.tools-section-head > p {
  max-width: 430px;
  margin: 0;
  color: #8b8b93;
  font-size: 14px;
  line-height: 1.55;
}

.tools-bento {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-rows: 220px;
  gap: 12px;
}

.tool-card {
  position: relative;
  display: flex;
  overflow: hidden;
  align-items: flex-end;
  padding: 22px;
  border: 1px solid var(--tools-border);
  border-radius: 12px;
  background: var(--tools-panel);
  color: inherit;
  text-decoration: none;
  isolation: isolate;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.tool-card:hover {
  color: inherit;
  border-color: rgba(96, 165, 250, 0.34);
  background: var(--tools-panel-raised);
}

.tool-card > img {
  position: absolute;
  inset: 0;
  z-index: -3;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tool-card-shade {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(180deg, rgba(8, 8, 10, 0.08) 10%, rgba(8, 8, 10, 0.94) 90%),
    linear-gradient(90deg, rgba(8, 8, 10, 0.5), transparent 70%);
  transition: background 0.18s ease;
}

.tool-card:hover .tool-card-shade {
  background:
    linear-gradient(180deg, rgba(8, 8, 10, 0.03) 5%, rgba(10, 17, 30, 0.93) 90%),
    linear-gradient(90deg, rgba(8, 8, 10, 0.45), transparent 70%);
}

.tool-card-content {
  display: flex;
  width: 100%;
  max-width: 520px;
  flex-direction: column;
  align-items: flex-start;
}

.tool-card-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  color: #93c5fd;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tool-card-content > strong {
  color: #fff;
  font-size: 24px;
  font-weight: 750;
  line-height: 1.1;
  letter-spacing: -0.025em;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.8);
}

.tool-card-content > span:not(.tool-card-meta):not(.tool-card-action) {
  max-width: 480px;
  margin-top: 8px;
  color: #d4d4d8;
  font-size: 13px;
  line-height: 1.5;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.9);
}

.tool-card-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  color: #bfdbfe;
  font-size: 12px;
  font-weight: 700;
}

.tool-card-action i {
  font-size: 9px;
  transition: transform 0.15s ease;
}

.tool-card:hover .tool-card-action i {
  transform: translateX(3px);
}

.tool-card-planner {
  grid-column: span 7;
  grid-row: span 2;
}

.tool-card-planner .tool-card-content > strong {
  font-size: clamp(30px, 4vw, 46px);
}

.tool-card-guides,
.tool-card-roster {
  grid-column: span 5;
}

.tool-card-comp,
.tool-card-quiz,
.tool-card-addon {
  grid-column: span 4;
}

.tool-card-comp .tool-card-content > span:not(.tool-card-meta):not(.tool-card-action),
.tool-card-quiz .tool-card-content > span:not(.tool-card-meta):not(.tool-card-action),
.tool-card-addon .tool-card-content > span:not(.tool-card-meta):not(.tool-card-action) {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tools-more {
  padding-top: 20px;
  border-top: 1px solid var(--tools-border);
}

.tools-more-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.tool-mini-card {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 100px;
  padding: 9px 14px 9px 9px;
  border: 1px solid var(--tools-border);
  border-radius: 10px;
  background: var(--tools-panel);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.tool-mini-card:hover {
  color: inherit;
  border-color: rgba(96, 165, 250, 0.25);
  background: var(--tools-panel-raised);
}

.tool-mini-image {
  width: 82px;
  height: 82px;
  overflow: hidden;
  border-radius: 7px;
  background: #1a1a1e;
}

.tool-mini-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tool-mini-card > span:nth-child(2) {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 3px 8px;
  min-width: 0;
}

.tool-mini-card > span:nth-child(2) > i {
  grid-row: span 2;
  margin-top: 2px;
  color: var(--tools-blue-bright);
}

.tool-mini-card strong {
  color: #f4f4f5;
  font-size: 14px;
  font-weight: 700;
}

.tool-mini-card small {
  overflow: hidden;
  color: #71717a;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tool-mini-card > i {
  color: #52525b;
  font-size: 11px;
}

.tool-mini-card:hover > i {
  color: #93c5fd;
}

.tools-final-cta {
  padding: 30px 0 100px;
}

.tools-final-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: 40px;
  border: 1px solid rgba(96, 165, 250, 0.16);
  border-radius: 14px;
  background:
    radial-gradient(circle at 80% 20%, rgba(59, 130, 246, 0.14), transparent 35%),
    linear-gradient(135deg, #111823, #101014);
}

.tools-final-inner h2 {
  margin: 8px 0 6px;
  color: #fafafa;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 750;
  line-height: 1;
  letter-spacing: -0.03em;
}

.tools-final-inner p {
  margin: 0;
  color: #8b8b93;
  font-size: 14px;
}

@media (max-width: 900px) {
  .tools-hero {
    min-height: auto;
    padding-top: 130px;
  }

  .tools-hero-workflow {
    grid-template-columns: 1fr;
    max-width: 480px;
  }

  .workflow-label,
  .workflow-arrow {
    display: none;
  }

  .tools-bento {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 250px;
  }

  .tool-card-planner {
    grid-column: span 2;
    grid-row: span 1;
  }

  .tool-card-guides,
  .tool-card-roster,
  .tool-card-comp,
  .tool-card-quiz,
  .tool-card-addon {
    grid-column: span 1;
  }
}

@media (max-width: 680px) {
  .tools-shell {
    width: min(100% - 28px, 1200px);
  }

  .tools-hero {
    padding: 110px 0 44px;
  }

  .tools-hero h1 {
    font-size: clamp(42px, 14vw, 62px);
  }

  .tools-hero-copy > p {
    font-size: 16px;
  }

  .tools-section-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .tools-directory,
  .tools-more {
    padding: 64px 0;
  }

  .tools-bento {
    display: flex;
    flex-direction: column;
  }

  .tool-card {
    min-height: 310px;
  }

  .tool-card-planner {
    min-height: 380px;
  }

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

  .tools-final-inner {
    align-items: flex-start;
    flex-direction: column;
    padding: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .tool-card-action i {
    transition: none;
  }
}
