/*
 * Free Tools — Gunpowder Innovations
 *
 * Tokens are taken from the live gunpowderinnovations.com build (computed
 * styles) and the Founder Tools palette documented in the tool projects.
 * Nothing here is new brand: page ground, ink, pink, the card/tile/button
 * treatments and the type pairing all exist on the main site.
 */

:root {
  /* Ground & surfaces */
  --gi-bg: #f4f2ee;
  --gi-surface: #ffffff;
  --gi-surface-sunken: #f7f7f8;
  --gi-navy: #06122a;

  /* Text */
  --gi-ink: #121218;
  --gi-text: #323648;
  --gi-text-muted: #5f646c;
  --gi-text-on-dark: rgba(255, 255, 255, 0.7);
  --gi-text-on-dark-muted: #9a9cab;

  /* Lines */
  --gi-border: #e0e2e6;
  --gi-border-strong: #c9cdd2;

  /* Brand */
  --gi-pink: #ff0073;          /* logo, large display type, button fill   */
  --gi-pink-deep: #dd1487;     /* button gradient end                     */
  --gi-pink-text: #d6005f;     /* pink at text sizes (AA on white/ground) */
  --gi-pink-soft: #fff0f6;

  /* Type (all used on gunpowderinnovations.com) */
  --font-display: "Crimson Text", Georgia, "Times New Roman", serif;
  --font-heading: "Lora", Georgia, "Times New Roman", serif;
  --font-ui: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-action: "Albert Sans", var(--font-ui);

  /* Spacing scale */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 20px;
  --s-6: 24px;
  --s-8: 32px;
  --s-10: 40px;
  --s-12: 48px;
  --s-16: 64px;
  --s-20: 80px;
  --s-24: 96px;

  /* Radii */
  --r-sm: 8px;
  --r-md: 12px;
  --r-card: 16px;
  --r-btn: 19px;
  --r-lg: 20px;
  --r-xl: 32px;
  --r-footer: 40px;
  --r-pill: 999px;

  /* Elevation (verbatim from the main site) */
  --shadow-tile: 0 4px 8px -4px #c9cdd2, 0 12px 18px -2px rgba(201, 205, 210, 0.55),
    inset 0 1px 0 #ffffff, inset 0 -1px 0 #c9cdd2;
  --shadow-card-hover: 0 4px 8px -4px rgba(18, 18, 24, 0.08), 0 12px 18px -2px rgba(18, 18, 24, 0.06);
  --shadow-btn-pink: inset 4px 4px 8px rgba(255, 255, 255, 0.3), inset -4px -4px 8px rgba(255, 255, 255, 0.3),
    0 8px 16px rgba(245, 5, 121, 0.35);

  --focus-ring: 0 0 0 3px var(--gi-bg), 0 0 0 5px var(--gi-pink-text);

  /* Motion */
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --dur: 200ms;

  /* Layout */
  --container: 1100px;
  --gutter: 24px;
}

/* ------------------------------------------------------------------ base */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}

body {
  margin: 0;
  background: var(--gi-bg);
  color: var(--gi-text);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

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

ul {
  padding: 0;
  list-style: none;
}

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

button,
input {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

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

.skip-link {
  position: absolute;
  left: var(--s-4);
  top: -100px;
  z-index: 100;
  padding: var(--s-3) var(--s-4);
  background: var(--gi-ink);
  color: #fff;
  border-radius: var(--r-md);
  font-weight: 600;
}

.skip-link:focus-visible {
  top: var(--s-4);
}

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* --------------------------------------------------------------- buttons */

/* Primary: the main site's pink "Contact Us" button — gradient body, soft
   halo frame, white arrow orb. */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  min-height: 52px;
  padding: 6px 6px 6px 26px;
  border-radius: var(--r-btn);
  background: linear-gradient(110deg, var(--gi-pink) 0%, var(--gi-pink-deep) 100%);
  box-shadow: var(--shadow-btn-pink), 0 0 0 5px rgba(255, 255, 255, 0.7);
  color: #fff;
  font-family: var(--font-action);
  font-size: 18px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.btn-orb {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fff;
  color: var(--gi-ink);
  transition: transform var(--dur) var(--ease);
}

.btn-primary:hover {
  transform: translateY(-1px);
}

.btn-primary:hover .btn-orb {
  transform: translateX(2px);
}

.btn-primary[href^="#"]:hover .btn-orb {
  transform: translateY(2px);
}

.btn-primary:focus-visible {
  box-shadow: var(--shadow-btn-pink), var(--focus-ring);
}

/* Secondary: quiet outline, same shape language as the site's cards. */
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 var(--s-5);
  border: 1px solid var(--gi-border-strong);
  border-radius: var(--r-md);
  background: var(--gi-surface);
  color: var(--gi-ink);
  font-family: var(--font-action);
  font-size: 15px;
  font-weight: 600;
  transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}

.btn-secondary:hover {
  border-color: var(--gi-ink);
}

.link-button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--gi-pink-text);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  border-radius: 4px;
}

.link-button:hover {
  color: var(--gi-ink);
}

/* ------------------------------------------------------------- brand bar */

/* Logo only (no navigation), so the page still reads as Gunpowder Innovations. */
.brandbar {
  padding-top: var(--s-6);
}

.brandbar-logo {
  display: inline-flex;
  border-radius: var(--r-sm);
}

.brandbar-logo img {
  width: 136px;
  height: auto;
}

/* ------------------------------------------------------------------ hero */

.hero {
  overflow-x: clip;
  padding: var(--s-12) 0 var(--s-20);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr);
  align-items: center;
  gap: var(--s-16);
}

.hero-copy {
  max-width: 520px;
}

/* The main site's section label: white pill, Instrument Sans 14/500. */
.chip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 16px;
  border-radius: var(--r-pill);
  background: var(--gi-surface);
  color: var(--gi-ink);
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  letter-spacing: -0.01em;
}

/* Display type as on the main site ("Real products built for real
   businesses"): Lora 600, tight tracking. */
.hero-title {
  margin-top: var(--s-6);
  font-family: var(--font-heading);
  font-size: clamp(34px, 3.2vw + 16px, 60px);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.035em;
  color: var(--gi-ink);
}

.hero-title-accent {
  color: var(--gi-pink);
}

.hero-lede {
  max-width: 460px;
  margin-top: var(--s-6);
  color: var(--gi-text);
  font-size: 18px;
  line-height: 1.6;
  text-wrap: balance;
}

.hero-copy .btn-primary {
  margin-top: var(--s-10);
}

/* Hero composition: one sample document plus two small tool cards on a
   quiet panel carrying the main site's warm Free Tools wash. */
.hero-visual {
  position: relative;
}

.hv-panel {
  position: relative;
  aspect-ratio: 1 / 0.86;
  border: 1px solid var(--gi-border);
  border-radius: var(--r-xl);
  background:
    radial-gradient(75% 65% at 90% 6%, rgba(255, 178, 122, 0.3), rgba(255, 178, 122, 0) 64%),
    var(--gi-surface);
}

.hv-doc,
.hv-card {
  position: absolute;
  background: var(--gi-surface);
  border: 1px solid var(--gi-border);
  box-shadow: 0 1px 2px rgba(18, 18, 24, 0.04), 0 16px 32px -20px rgba(18, 18, 24, 0.22);
  animation: hv-in 600ms var(--ease) both;
}

.hv-doc {
  left: 50%;
  top: 50%;
  translate: -50% -50%;
  width: min(60%, 316px);
  padding: 22px 22px 20px;
  border-radius: 14px;
  color: var(--gi-ink);
  font-size: 11px;
  line-height: 1.4;
  animation-delay: 60ms;
}

.hv-doc-title {
  display: grid;
  justify-items: end;
  line-height: 1.3;
}

.hv-doc-title b {
  font-family: var(--font-heading);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.hv-doc-title span,
.hv-meta span {
  color: var(--gi-text-muted);
  font-size: 9.5px;
}

.hv-meta {
  display: flex;
  justify-content: space-between;
  gap: var(--s-4);
  margin-top: var(--s-5);
}

.hv-meta div {
  display: grid;
  gap: 2px;
}

.hv-meta div:last-child {
  text-align: right;
}

.hv-meta span {
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hv-meta b,
.hv-row b,
.hv-total b {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.hv-rows {
  margin-top: var(--s-4);
}

.hv-row {
  display: flex;
  justify-content: space-between;
  gap: var(--s-3);
  padding: 7px 0;
  border-top: 1px solid var(--gi-border);
  color: var(--gi-text);
}

.hv-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: var(--s-2);
  padding-top: var(--s-3);
  border-top: 1.5px solid var(--gi-ink);
  font-weight: 600;
}

.hv-total b {
  font-size: 16px;
}

.hv-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  padding: 12px 16px 12px 12px;
  border-radius: 14px;
}

.hv-card--contract {
  top: 8%;
  left: -5%;
  width: 212px;
  animation-delay: 200ms;
}

.hv-card--pdf {
  right: -5%;
  bottom: 9%;
  animation-delay: 320ms;
}

.hv-tile {
  display: grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--gi-surface);
  box-shadow: var(--shadow-tile);
  color: var(--gi-pink-text);
}

.hv-card-text {
  display: grid;
  line-height: 1.35;
}

.hv-card-text b {
  color: var(--gi-ink);
  font-size: 13px;
  font-weight: 600;
}

.hv-card-text span {
  color: var(--gi-text-muted);
  font-size: 11.5px;
}

.hv-signature {
  width: 100%;
  height: 26px;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--gi-border-strong);
  stroke: var(--gi-pink);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@keyframes hv-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

@media (max-width: 1180px) {
  .hero-grid {
    gap: var(--s-10);
  }

  .hv-card--contract {
    left: -3%;
  }

  /* Narrower panel: give the document more room below the contract card and
     keep the PDF card clear of the total. */
  .hv-doc {
    top: 47%;
  }

  .hv-card--pdf {
    right: -3%;
    bottom: 2%;
  }
}

@media (max-width: 960px) {
  .hero {
    padding-bottom: var(--s-16);
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s-12);
  }

  .hero-copy {
    max-width: 600px;
  }

  .hero-visual {
    width: 100%;
    max-width: 560px;
  }
}

/* ------------------------------------------------------------- directory */

.directory {
  padding: 0 0 var(--s-20);
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(28px, 3vw, 36px);
  font-weight: 600;
  line-height: 1.33;
  letter-spacing: -0.02em;
  color: var(--gi-ink);
}

/* Search + filters */
.toolbar {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  margin-top: var(--s-6);
}

.search {
  position: relative;
  flex: 1 1 360px;
  max-width: 440px;
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gi-text-muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  height: 52px;
  padding: 0 44px 0 46px;
  border: 1px solid var(--gi-border);
  border-radius: var(--r-md);
  background: var(--gi-surface);
  color: var(--gi-ink);
  font-size: 16px;
  transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease);
  -webkit-appearance: none;
  appearance: none;
}

.search-input::placeholder {
  color: var(--gi-text-muted);
  opacity: 1;
}

.search-input::-webkit-search-cancel-button {
  -webkit-appearance: none;
}

.search-input:hover {
  border-color: var(--gi-border-strong);
}

.search-input:focus-visible {
  border-color: var(--gi-pink-text);
  background: var(--gi-surface);
  box-shadow: 0 0 0 3px rgba(214, 0, 95, 0.16);
}

.search-clear {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: var(--r-sm);
  background: none;
  color: var(--gi-text-muted);
}

.search-clear[hidden] {
  display: none;
}

.search-clear:hover {
  color: var(--gi-ink);
  background: var(--gi-border);
}

.filters {
  display: flex;
  gap: var(--s-2);
  margin-left: auto;
}

.filter {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  min-height: 44px;
  padding: 0 var(--s-4);
  border: 1px solid var(--gi-border);
  border-radius: var(--r-pill);
  background: var(--gi-surface);
  color: var(--gi-text);
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}

.filter:hover {
  border-color: var(--gi-border-strong);
  color: var(--gi-ink);
}

.filter-count {
  color: var(--gi-text-muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.filter[aria-pressed="true"] {
  border-color: var(--gi-pink-text);
  background: var(--gi-pink-soft);
  color: var(--gi-pink-text);
  font-weight: 600;
}

.filter[aria-pressed="true"] .filter-count {
  color: var(--gi-pink-text);
}

.results-status {
  min-height: 24px;
  margin-top: var(--s-4);
  color: var(--gi-text-muted);
  font-size: 14px;
}

/* Categories */
.categories {
  display: grid;
  gap: 56px;
  margin-top: var(--s-3);
}

.category[hidden] {
  display: none;
}

.category-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-4);
  padding-bottom: var(--s-3);
  margin-bottom: var(--s-5);
  border-bottom: 1px solid var(--gi-border);
}

.category-title {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--gi-ink);
}

.category-count {
  color: var(--gi-text-muted);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

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

@media (max-width: 1180px) {
  .tool-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.tool-item[hidden] {
  display: none;
}

/* Tool card: a product shortcut. The main site's service-card surface
   (white, 16px radius, hairline, icon tile) with the title as the focus and an
   arrow disc that fills with brand pink on hover. */
.tool-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--s-6);
  height: 100%;
  min-height: 150px;
  padding: 22px;
  background: var(--gi-surface);
  border: 1px solid var(--gi-border);
  border-radius: var(--r-card);
  transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease);
}

/* Line-icon tile (used by the empty state). */
.tool-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex: none;
  border-radius: var(--r-md);
  background: var(--gi-surface);
  box-shadow: var(--shadow-tile);
  color: var(--gi-ink);
}

/* 3D object icon (Fluent Emoji 3D), shown as an object on the card with a
   soft contact shadow rather than inside a tile. */
.tool-art {
  display: block;
  width: 60px;
  height: 60px;
  flex: none;
}

.tool-art img {
  width: 60px;
  height: 60px;
  filter: drop-shadow(0 8px 10px rgba(18, 18, 24, 0.12));
  transition: transform 260ms var(--ease);
}

.tool-go {
  position: absolute;
  top: 22px;
  right: 22px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--gi-border);
  border-radius: 50%;
  color: var(--gi-text-muted);
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease),
    color var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.tool-title {
  color: var(--gi-ink);
  font-size: 19px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.tool-card:hover {
  transform: translateY(-3px);
  border-color: var(--gi-border-strong);
  box-shadow: var(--shadow-card-hover);
}

.tool-card:hover .tool-art img {
  transform: translateY(-2px) scale(1.06);
}

.tool-card:hover .tool-go {
  border-color: var(--gi-pink-text);
  background: var(--gi-pink-text);
  color: #fff;
  transform: translateX(2px);
}

.tool-card:focus-visible {
  border-color: var(--gi-pink-text);
  box-shadow: var(--focus-ring);
}

/* Empty state */
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-16) var(--s-6);
  background: var(--gi-surface);
  border: 1px dashed var(--gi-border-strong);
  border-radius: var(--r-card);
  text-align: center;
}

.empty[hidden] {
  display: none;
}

.empty .tool-icon {
  color: var(--gi-text-muted);
  margin-bottom: var(--s-2);
}

.empty-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--gi-ink);
}

.empty-text {
  max-width: 420px;
  color: var(--gi-text-muted);
}

.empty .btn-secondary {
  margin-top: var(--s-3);
}

/* ------------------------------------------------------------------- CTA */

.cta {
  padding-bottom: var(--s-24);
}

.cta-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-8);
  padding: var(--s-8) var(--s-10);
  background: var(--gi-surface);
  border: 1px solid var(--gi-border);
  border-radius: var(--r-lg);
}

.cta-title {
  font-family: var(--font-heading);
  font-size: clamp(22px, 2vw, 26px);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--gi-ink);
}

.cta-text {
  max-width: 540px;
  margin-top: var(--s-2);
  color: var(--gi-text);
}

/* ---------------------------------------------------------------- footer */

.site-footer {
  margin: 0 12px 12px;
  border-radius: var(--r-footer);
  background: var(--gi-navy) url("footer-bg.jpg") center / cover no-repeat;
  color: var(--gi-text-on-dark);
  font-family: var(--font-action);
}

.footer-inner {
  max-width: 1200px;
  margin-inline: auto;
  padding: var(--s-20) 108px var(--s-10);
}

.footer-top {
  display: flex;
  justify-content: space-between;
  gap: var(--s-12);
}

.footer-brand {
  max-width: 360px;
}

.footer-brand img {
  width: 131px;
  height: auto;
}

.footer-brand p {
  margin-top: var(--s-5);
  font-size: 16px;
  line-height: 1.3;
}

.footer-social {
  display: flex;
  gap: var(--s-2);
  margin-top: var(--s-8);
}

.footer-social a {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-left: -10px;
  margin-right: 10px;
  border-radius: var(--r-sm);
  color: #fff;
  transition: color var(--dur) var(--ease);
}

.footer-social a:hover {
  color: var(--gi-pink);
}

.footer-cols {
  display: flex;
  gap: var(--s-16);
}

.footer-heading {
  color: #fff;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
}

.footer-col ul {
  display: grid;
  gap: 2px;
  margin-top: var(--s-2);
}

.footer-col a {
  display: inline-block;
  padding: 3px 0;
  color: var(--gi-text-on-dark-muted);
  font-size: 14px;
  border-radius: 4px;
  transition: color var(--dur) var(--ease);
}

.footer-col a:hover {
  color: #fff;
}

.site-footer :focus-visible {
  box-shadow: 0 0 0 2px var(--gi-navy), 0 0 0 4px #fff;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: var(--s-4);
  margin-top: var(--s-24);
  padding-top: var(--s-5);
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--gi-text-on-dark-muted);
  font-size: 15px;
}

/* ------------------------------------------------------------ responsive */

@media (max-width: 1024px) {
  .toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .search {
    flex: none;
    max-width: none;
  }

  .filters {
    margin-left: 0;
    flex-wrap: wrap;
  }

  .footer-inner {
    padding-inline: var(--s-12);
  }
}

@media (max-width: 900px) {
  .tool-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  :root {
    --gutter: 20px;
  }

  .directory {
    padding-bottom: var(--s-16);
  }

  .cta {
    padding-bottom: var(--s-16);
  }

  .cta-card {
    flex-direction: column;
    align-items: flex-start;
    padding: var(--s-8);
  }

  .footer-inner {
    padding: var(--s-16) var(--s-8) var(--s-8);
  }

  .footer-top {
    flex-direction: column;
    gap: var(--s-10);
  }

  .footer-bottom {
    flex-direction: column;
    margin-top: var(--s-12);
  }
}

@media (max-width: 640px) {
  :root {
    --gutter: 16px;
  }

  .brandbar {
    padding-top: var(--s-4);
  }

  .brandbar-logo img {
    width: 120px;
  }

  .hero {
    padding: var(--s-8) 0 var(--s-12);
  }

  .hero-title {
    margin-top: var(--s-5);
  }

  .hero-lede {
    margin-top: var(--s-4);
    font-size: 17px;
  }

  .hero-copy .btn-primary {
    margin-top: var(--s-8);
  }

  /* Compact visual on phones: a simple stack, the PDF card overlapping only
     the document's bottom edge so nothing on the document is covered. */
  .hv-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    aspect-ratio: auto;
    padding: var(--s-6) var(--s-5) var(--s-5);
    border-radius: var(--r-lg);
  }

  .hv-card--contract {
    display: none;
  }

  .hv-doc,
  .hv-card--pdf {
    position: relative;
    inset: auto;
    translate: none;
  }

  .hv-doc {
    width: 100%;
    max-width: 320px;
    padding: 18px 18px 22px;
  }

  .hv-card--pdf {
    align-self: flex-end;
    margin-top: -10px;
  }

  .hv-meta,
  .hv-row:nth-child(3) {
    display: none;
  }

  .hv-rows {
    margin-top: var(--s-3);
  }

  /* Filters become one swipeable row instead of wrapping. */
  .filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    margin: 0 calc(var(--gutter) * -1);
    padding: 2px var(--gutter) 4px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .filters::-webkit-scrollbar {
    display: none;
  }

  .filter {
    flex: none;
  }

  .tool-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s-3);
  }

  /* Compact rows on phones: icon | title | arrow. */
  .tool-card {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: var(--s-4);
    min-height: 0;
    padding: 14px 16px;
  }

  .tool-art,
  .tool-art img {
    width: 44px;
    height: 44px;
  }

  .tool-title {
    flex: 1;
    font-size: 17px;
  }

  .tool-go {
    position: static;
    flex: none;
    order: 3;
  }

  .tool-card:hover {
    transform: none;
  }

  .categories {
    gap: var(--s-10);
  }

  .category-head {
    margin-bottom: var(--s-4);
  }

  .cta-card {
    padding: var(--s-6);
  }

  .cta-card .btn-primary {
    width: 100%;
    justify-content: space-between;
  }

  .site-footer {
    margin: 0 8px 8px;
    border-radius: var(--r-xl);
  }

  .footer-inner {
    padding: var(--s-12) var(--s-6) var(--s-8);
  }

  .footer-cols {
    gap: var(--s-10);
  }
}

/* -------------------------------------------------------- reduced motion */

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }

  .hv-doc,
  .hv-card {
    animation: none;
  }

  .tool-card:hover,
  .tool-card:hover .tool-go,
  .tool-card:hover .tool-art img,
  .btn-primary:hover,
  .btn-primary:hover .btn-orb {
    transform: none;
  }
}
