/* Design tokens sourced from 01_material/Value.tokens.json */
:root {
  --neutral-100: #111317;
  --neutral-200: #21242c;
  --neutral-300: #373c49;
  --neutral-400: #4e5566;
  --neutral-500: #697388;
  --neutral-600: #848fa4;
  --neutral-700: #aeb7c8;
  --neutral-800: #d5d9e0;
  --neutral-900: #f0f2f4;
  --neutral-1000: #ffffff;
  --primary-300: #007a66;
  --primary-400: #00a388;
  --primary-500: #00ccaa;
  --primary-800: #99ebdd;
  --primary-900: #ccf5ee;
  --secondary-400: #c46231;
  --secondary-500: #f57a3d;
  --secondary-800: #fbcab1;
  --secondary-900: #fde4d8;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-14: 56px;
  --space-16: 64px;
  --font-display: "Poppins", "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--neutral-1000);
  background:
    radial-gradient(circle at 78% 12%, rgb(0 204 170 / 0.09), transparent 28rem),
    radial-gradient(circle at 10% 85%, rgb(245 122 61 / 0.06), transparent 24rem),
    var(--neutral-100);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: linear-gradient(rgb(255 255 255 / 0.025) 1px, transparent 1px), linear-gradient(90deg, rgb(255 255 255 / 0.025) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, black, transparent 72%);
  content: "";
  pointer-events: none;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

main,
footer {
  width: min(1184px, calc(100% - 48px));
  margin-inline: auto;
}

.hero {
  max-width: 870px;
  padding: 128px 0 104px;
}

.hero__eyebrow,
.section-label {
  color: var(--primary-500);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero__eyebrow {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}

.hero__eyebrow-mark {
  width: 28px;
  height: 2px;
  background: var(--primary-500);
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  max-width: 780px;
  font-family: var(--font-display);
  font-size: clamp(56px, 8.2vw, 104px);
  font-weight: 600;
  letter-spacing: -0.055em;
  line-height: 0.98;
}

h1 span {
  color: var(--neutral-600);
}

.hero__copy {
  max-width: 610px;
  margin-top: var(--space-8);
  color: var(--neutral-700);
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.55;
}

.tools {
  padding-bottom: 112px;
}

.tools__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-8);
  margin-bottom: var(--space-8);
  padding-top: var(--space-8);
  border-top: 1px solid var(--neutral-300);
}

.section-label {
  margin-bottom: var(--space-2);
  font-size: 11px;
}

h2 {
  font-family: var(--font-display);
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 600;
  letter-spacing: -0.035em;
}

.filters {
  display: flex;
  gap: var(--space-1);
  padding: var(--space-1);
  border: 1px solid var(--neutral-300);
  border-radius: 999px;
  background: rgb(33 36 44 / 0.78);
}

.filter {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 44px;
  padding: 0 var(--space-4);
  border: 0;
  border-radius: 999px;
  color: var(--neutral-700);
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.filter i {
  font-size: 18px;
}

.filter:hover {
  color: var(--neutral-1000);
  background: var(--neutral-300);
}

.filter:active {
  transform: scale(0.97);
}

.filter.is-active {
  color: var(--neutral-100);
  background: var(--primary-500);
}

.filter:focus-visible,
.tool-card:focus-visible {
  outline: 3px solid var(--primary-800);
  outline-offset: 3px;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-6);
}

.tool-card {
  position: relative;
  display: flex;
  min-height: 410px;
  flex-direction: column;
  overflow: hidden;
  padding: var(--space-8);
  border: 1px solid var(--neutral-300);
  border-radius: 20px;
  background: linear-gradient(145deg, rgb(33 36 44 / 0.94), rgb(17 19 23 / 0.96));
  box-shadow: 0 20px 50px rgb(0 0 0 / 0.18);
  transition: border-color 280ms ease, box-shadow 280ms ease, transform 280ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.tool-card::before {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 12% 0%, rgb(0 204 170 / 0.12), transparent 45%);
  content: "";
  opacity: 0;
  pointer-events: none;
  transition: opacity 280ms ease;
}

.tool-card:nth-child(2)::before {
  background: radial-gradient(circle at 12% 0%, rgb(245 122 61 / 0.12), transparent 45%);
}

.tool-card:hover {
  border-color: var(--neutral-500);
  box-shadow: 0 28px 70px rgb(0 0 0 / 0.32);
  transform: translateY(-7px);
}

.tool-card:hover::before {
  opacity: 1;
}

.tool-card__topline,
.tool-card__content,
.tool-card__cta {
  position: relative;
  z-index: 1;
}

.tool-card__topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.tool-card__icon,
.tool-card__arrow {
  display: grid;
  place-items: center;
}

.tool-card__icon {
  width: 68px;
  height: 68px;
  border-radius: var(--space-4);
  color: var(--primary-300);
  background: var(--primary-900);
  font-size: 32px;
}

.tool-card__icon--secondary {
  color: var(--secondary-400);
  background: var(--secondary-900);
}

.tool-card__arrow {
  width: 44px;
  height: 44px;
  border: 1px solid var(--neutral-300);
  border-radius: 50%;
  color: var(--neutral-700);
  font-size: 20px;
  transition: color 220ms ease, background-color 220ms ease, border-color 220ms ease, transform 220ms ease;
}

.tool-card:hover .tool-card__arrow {
  border-color: var(--primary-500);
  color: var(--neutral-100);
  background: var(--primary-500);
  transform: rotate(8deg);
}

.tool-card__content {
  margin-top: auto;
  padding-top: var(--space-12);
}

.tool-card__category {
  display: inline-block;
  margin-bottom: var(--space-3);
  color: var(--primary-500);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tool-card__category--secondary {
  color: var(--secondary-500);
}

h3 {
  font-family: var(--font-display);
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.15;
}

.tool-card__content p {
  max-width: 470px;
  margin-top: var(--space-4);
  color: var(--neutral-700);
  font-size: 16px;
  line-height: 1.6;
}

.tool-card__cta {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: var(--space-2);
  margin-top: var(--space-8);
  color: var(--neutral-1000);
  font-size: 14px;
  font-weight: 700;
}

.tool-card__cta i {
  color: var(--primary-500);
  transition: transform 220ms ease;
}

.tool-card:hover .tool-card__cta i {
  transform: translateX(5px);
}

.tool-card.is-hidden {
  display: none;
}

.tool-card.is-filtering-in {
  animation: card-in 360ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

footer {
  display: flex;
  justify-content: space-between;
  padding: var(--space-8) 0;
  border-top: 1px solid var(--neutral-300);
  color: var(--neutral-600);
  font-size: 13px;
}

.footer__meta {
  display: flex;
  gap: var(--space-5);
}

footer a {
  color: var(--neutral-700);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 4px;
  transition: color 180ms ease, text-decoration-color 180ms ease;
}

footer a:hover {
  color: var(--primary-500);
  text-decoration-color: currentColor;
}

footer a:focus-visible {
  border-radius: 2px;
  outline: 2px solid var(--primary-800);
  outline-offset: 4px;
}

.reveal {
  animation: reveal 700ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
  animation-delay: var(--delay, 0ms);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  margin: -1px;
  padding: 0;
  border: 0;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

@keyframes reveal {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes card-in {
  from { opacity: 0; transform: translateY(12px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 780px) {
  main,
  footer {
    width: min(100% - 32px, 640px);
  }

  .hero {
    padding: 88px 0 72px;
  }

  .tools__header {
    align-items: stretch;
    flex-direction: column;
  }

  .filters {
    align-self: flex-start;
    max-width: 100%;
    overflow-x: auto;
  }

  .filter {
    flex: 0 0 auto;
  }

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

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

@media (max-width: 480px) {
  h1 {
    font-size: clamp(48px, 15vw, 68px);
  }

  .hero__copy {
    font-size: 17px;
  }

  .filter {
    min-height: 42px;
    padding-inline: var(--space-3);
    font-size: 13px;
  }

  .filter i {
    display: none;
  }

  .tool-card {
    min-height: 390px;
    padding: var(--space-6);
  }

  .tool-card__icon {
    width: 60px;
    height: 60px;
  }

  footer {
    gap: var(--space-2);
    flex-direction: column;
  }

  .footer__meta {
    justify-content: space-between;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
  }
}
