/**
 * Wag'n Tails - Tools & Resources path chooser
 * Enqueue only on tools-resources / resources pages.
 * Scoped under body.wagn-tools-resources.
 */

body.wagn-tools-resources *,
body.wagn-tools-resources *::before,
body.wagn-tools-resources *::after {
  box-sizing: border-box;
}

html:has(body.wagn-tools-resources) {
  scroll-behavior: smooth;
}

body.wagn-tools-resources {
  --tr-cream: var(--cream, #f7f4ee);
  --tr-ink: var(--ink, #1a1224);
  --tr-muted: var(--ink-muted, #5c5368);
  --tr-purple: var(--purple, #603387);
  --tr-purple-deep: var(--purple-deep, #4a2468);
  background: var(--tr-cream);
  color: var(--tr-ink);
}

body.wagn-tools-resources img,
body.wagn-tools-resources svg {
  max-width: 100%;
  height: auto;
}

body.wagn-tools-resources a {
  color: inherit;
  text-decoration: none;
}

body.wagn-tools-resources h1,
body.wagn-tools-resources h2 {
  font-family: var(--font-heading);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.08;
  margin: 0;
}

body.wagn-tools-resources p {
  margin: 0;
}

body.wagn-tools-resources .tr-main {
  overflow-x: clip;
}

body.wagn-tools-resources .container {
  width: min(100% - 2 * var(--page-gutter, 1.25rem), var(--container, 72rem));
  margin-inline: auto;
}

body.wagn-tools-resources .section {
  position: relative;
}

body.wagn-tools-resources .text-gradient {
  background: linear-gradient(120deg, var(--tr-purple-deep) 0%, var(--tr-purple) 55%, #7a4aad 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Hero */
body.wagn-tools-resources .tr-hero {
  position: relative;
  padding: clamp(5.5rem, 12vw, 7.5rem) 0 clamp(2.75rem, 6vw, 4rem);
  text-align: center;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(243, 236, 251, 0.95) 0%, transparent 70%),
    linear-gradient(180deg, #efe6f8 0%, var(--lavender, #e8dff2) 45%, #f3ecfb 100%);
  overflow: hidden;
}

body.wagn-tools-resources .tr-hero__glow {
  position: absolute;
  inset: -20% 10% auto;
  height: 70%;
  background: radial-gradient(ellipse at center, rgba(96, 51, 135, 0.12), transparent 70%);
  pointer-events: none;
}

body.wagn-tools-resources .tr-hero__atmosphere {
  position: absolute;
  inset: auto 0 -35% 0;
  height: 55%;
  background:
    radial-gradient(ellipse 50% 80% at 20% 100%, rgba(120, 196, 184, 0.18), transparent 60%),
    radial-gradient(ellipse 45% 70% at 85% 90%, rgba(96, 51, 135, 0.1), transparent 55%);
  pointer-events: none;
}

body.wagn-tools-resources .tr-hero__inner {
  position: relative;
  z-index: 1;
}

body.wagn-tools-resources .tr-brand {
  font-family: var(--font-heading);
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  font-weight: 750;
  letter-spacing: -0.03em;
  color: var(--tr-purple-deep);
  margin-bottom: 0.85rem;
}

body.wagn-tools-resources .tr-hero__title {
  font-size: clamp(2.35rem, 5.2vw, 4rem);
  max-width: 14ch;
  margin: 0 auto 1rem;
}

body.wagn-tools-resources .tr-hero__lede {
  max-width: 34rem;
  margin: 0 auto;
  color: var(--tr-muted);
  font-size: clamp(1.1rem, 1.45vw, 1.28rem);
  font-weight: 500;
  line-height: 1.55;
}

/* Wave */
body.wagn-tools-resources .tr-wave {
  line-height: 0;
  margin-top: -0.5rem;
  color: var(--tr-cream);
}

body.wagn-tools-resources .tr-wave svg {
  width: 100%;
  height: clamp(2.5rem, 6vw, 4rem);
  display: block;
}

body.wagn-tools-resources .tr-wave__fill {
  fill: currentColor;
}

/* Paths */
body.wagn-tools-resources .tr-paths {
  padding: clamp(1.5rem, 3.5vw, 2.75rem) 0 clamp(3rem, 7vw, 4.5rem);
  background: var(--tr-cream);
}

body.wagn-tools-resources .tr-paths__header {
  text-align: center;
  margin-bottom: clamp(1.5rem, 3vw, 2.25rem);
}

body.wagn-tools-resources .tr-paths__title {
  font-size: clamp(1.5rem, 2.6vw, 2.15rem);
  color: var(--tr-purple-deep);
  margin-bottom: 0.65rem;
}

body.wagn-tools-resources .tr-paths__lede {
  max-width: 36rem;
  margin: 0 auto;
  color: var(--tr-muted);
  font-size: clamp(1.02rem, 1.25vw, 1.15rem);
  line-height: 1.5;
}

body.wagn-tools-resources .tr-lanes {
  display: grid;
  gap: 1rem;
  max-width: 980px;
  margin-inline: auto;
}

@media (min-width: 800px) {
  body.wagn-tools-resources .tr-lanes {
    grid-template-columns: 1fr 1fr;
    gap: 1.15rem;
    align-items: start;
  }

  body.wagn-tools-resources .tr-lane--vet {
    transform: translateY(1rem);
  }

  body.wagn-tools-resources .tr-lane--vet:hover,
  body.wagn-tools-resources .tr-lane--vet:focus-visible {
    transform: translateY(calc(1rem - 5px)) scale(1.015);
  }
}

body.wagn-tools-resources .tr-lane {
  position: relative;
  display: block;
  border-radius: 1.15rem;
  overflow: hidden;
  isolation: isolate;
  min-height: clamp(17rem, 42vw, 22rem);
  box-shadow: 0 18px 40px rgba(26, 18, 36, 0.12);
  transition:
    transform 0.35s var(--ease, cubic-bezier(0.22, 1, 0.36, 1)),
    box-shadow 0.35s var(--ease, cubic-bezier(0.22, 1, 0.36, 1));
}

body.wagn-tools-resources .tr-lane:hover,
body.wagn-tools-resources .tr-lane:focus-visible {
  transform: translateY(-5px) scale(1.015);
  box-shadow: 0 24px 48px rgba(26, 18, 36, 0.16);
  outline: none;
}

body.wagn-tools-resources .tr-lane:focus-visible {
  outline: 2px solid var(--aqua, #5ec4b6);
  outline-offset: 3px;
}

body.wagn-tools-resources .tr-lane img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s var(--ease, cubic-bezier(0.22, 1, 0.36, 1));
}

body.wagn-tools-resources .tr-lane:hover img,
body.wagn-tools-resources .tr-lane:focus-visible img {
  transform: scale(1.04);
}

body.wagn-tools-resources .tr-lane__scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(26, 18, 36, 0.15) 0%, rgba(26, 18, 36, 0.55) 45%, rgba(26, 18, 36, 0.88) 100%);
  transition: opacity 0.35s ease;
}

body.wagn-tools-resources .tr-lane--vet .tr-lane__scrim {
  background:
    linear-gradient(180deg, rgba(42, 28, 58, 0.2) 0%, rgba(42, 28, 58, 0.58) 48%, rgba(26, 18, 36, 0.9) 100%);
}

body.wagn-tools-resources .tr-lane:hover .tr-lane__scrim,
body.wagn-tools-resources .tr-lane:focus-visible .tr-lane__scrim {
  opacity: 0.92;
}

body.wagn-tools-resources .tr-lane__label {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 1;
  display: grid;
  gap: 0.35rem;
  padding: 1.35rem 1.25rem 1.4rem;
  color: #fff;
  text-align: left;
}

body.wagn-tools-resources .tr-lane__eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.85;
}

body.wagn-tools-resources .tr-lane__name {
  font-family: var(--font-heading);
  font-size: clamp(1.35rem, 2vw, 1.65rem);
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

body.wagn-tools-resources .tr-lane__cta {
  font-size: 0.98rem;
  line-height: 1.4;
  opacity: 0.9;
  max-width: 28ch;
}

body.wagn-tools-resources .tr-lane__go {
  margin-top: 0.45rem;
  font-size: 0.92rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  opacity: 0.95;
  transform: translateX(0);
  transition: transform 0.3s var(--ease, cubic-bezier(0.22, 1, 0.36, 1));
}

body.wagn-tools-resources .tr-lane:hover .tr-lane__go,
body.wagn-tools-resources .tr-lane:focus-visible .tr-lane__go {
  transform: translateX(4px);
}

@media (max-width: 799px) {
  body.wagn-tools-resources .tr-lane--vet {
    transform: none;
  }

  body.wagn-tools-resources .tr-lane {
    min-height: 16.5rem;
  }
}

/* Close */
body.wagn-tools-resources .tr-close {
  padding: clamp(2.5rem, 6vw, 4rem) 0 clamp(3.5rem, 8vw, 5rem);
  background:
    radial-gradient(ellipse 70% 80% at 50% 0%, rgba(243, 236, 251, 0.85), transparent 65%),
    linear-gradient(180deg, #efe8f6 0%, var(--lavender, #e8dff2) 100%);
  text-align: center;
}

body.wagn-tools-resources .tr-close__title {
  font-size: clamp(1.55rem, 2.8vw, 2.2rem);
  color: var(--tr-purple-deep);
  margin-bottom: 0.65rem;
}

body.wagn-tools-resources .tr-close__lede {
  max-width: 32rem;
  margin: 0 auto 1.5rem;
  color: var(--tr-muted);
  font-size: 1.08rem;
  line-height: 1.5;
}

body.wagn-tools-resources .tr-close__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  justify-content: center;
}

@media (prefers-reduced-motion: reduce) {
  body.wagn-tools-resources .tr-lane,
  body.wagn-tools-resources .tr-lane img,
  body.wagn-tools-resources .tr-lane__go {
    transition: none;
  }

  body.wagn-tools-resources .tr-lane:hover,
  body.wagn-tools-resources .tr-lane:focus-visible,
  body.wagn-tools-resources .tr-lane--vet:hover,
  body.wagn-tools-resources .tr-lane--vet:focus-visible {
    transform: none;
  }

  body.wagn-tools-resources .tr-lane:hover img,
  body.wagn-tools-resources .tr-lane:focus-visible img {
    transform: none;
  }
}

/* Reveal motion (sitewide wagn-motion.js) */
html.js body.wagn-tools-resources [data-reveal] {
  --reveal-distance: 1.1rem;
  --reveal-duration: 0.7s;
  opacity: 0;
  transform: translateY(var(--reveal-distance));
  transition:
    opacity var(--reveal-duration) var(--ease-editorial, cubic-bezier(0.22, 1, 0.36, 1)),
    transform var(--reveal-duration) var(--ease-editorial, cubic-bezier(0.22, 1, 0.36, 1));
  transition-delay: var(--reveal-delay, 0ms);
}

html.js body.wagn-tools-resources [data-hero] [data-reveal],
html.js body.wagn-tools-resources [data-hero] [data-reveal="title"] {
  transform: none;
}

html.js body.wagn-tools-resources [data-reveal].is-inview,
html.js body.wagn-tools-resources [data-reveal].is-in,
html:not(.js) body.wagn-tools-resources [data-reveal] {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html.js body.wagn-tools-resources [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}
