/* ==========================================================================
   Amnet Resources: Case Studies Hub Stylesheet
   Source: case-studies.html (Amnet ContentSource Thought Leadership System)
   Fidelity: 100% visual parity with Amnet Editorial Design System
   Hardened for Hostinger/mobile overflow (375px) & dynamic JS filtering
   ========================================================================== */

/* ---- Essential Cascade Guards & Overflow ---- */
[hidden],
.ac[hidden],
.tlc[hidden],
.fnote[hidden] {
  display: none !important;
}

html,
body {
  overflow-x: hidden;
  max-width: 100%;
}

.hero-grid > *,
.agrid > *,
.sh2 > * {
  min-width: 0;
}

/* ---- Hero Section & Typography ---- */
.hero {
  background: var(--mist, #f2f4f7);
  border-bottom: 1px solid var(--line, #dbdee2);
  position: relative;
  overflow: hidden;
}

.hero .wrap {
  padding-top: 28px !important;
  padding-bottom: 20px !important;
}

.hero .crumbs {
  font-family: var(--mono, 'IBM Plex Mono', ui-monospace, monospace);
  font-size: 11.5px;
  letter-spacing: .14em;
  color: var(--faint, #94969d);
  margin-bottom: 22px !important;
  text-transform: uppercase;
}

.hero .crumbs a {
  color: var(--faint, #94969d);
  text-decoration: none;
  transition: color .2s ease;
}

.hero .crumbs a:hover {
  color: var(--accent, #ee5b42);
}

.hero .crumbs .here {
  color: var(--ink, #1d2024);
  font-weight: 500;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  gap: 48px;
  align-items: center !important;
  padding-bottom: 36px !important;
  margin-top: 0 !important;
}

.hero .kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px !important;
}

.hero .kicker i {
  width: 24px;
  height: 1px;
  background: var(--accent, #ee5b42);
  display: inline-block;
  flex-shrink: 0;
}

.hero .kicker span {
  font-family: var(--mono, 'IBM Plex Mono', ui-monospace, monospace);
  font-size: 12px;
  letter-spacing: .18em;
  color: var(--accent, #ee5b42);
  text-transform: uppercase;
}

.hero h1.display.long {
  font-family: var(--serif, 'Newsreader', Georgia, serif);
  font-weight: 400;
  font-size: 36px !important;
  line-height: 1.18 !important;
  letter-spacing: -.01em !important;
  max-width: 24ch !important;
  margin: 0;
  text-wrap: balance;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.hero .lede {
  font-size: 19px;
  line-height: 1.6;
  color: var(--body, #454850);
  margin: 20px 0 8px;
}

.hero .hero-cta {
  margin-top: 30px !important;
}

.hero .hero-cta a.btn-accent,
.hero .hero-cta .btn-accent {
  display: inline-block;
  font-family: var(--sans, 'Libre Franklin', sans-serif);
  font-weight: 600;
  font-size: 14px;
  color: #fff;
  background: var(--accent, #ee5b42);
  padding: 11px 22px;
  text-decoration: none;
  transition: background .2s ease, transform .2s ease;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}

.hero .hero-cta a.btn-accent:hover,
.hero .hero-cta .btn-accent:hover {
  background: #d94931;
  color: #fff;
}

/* ---- "The Record" Cyclic Timeline Rotator (.tlc) ---- */
.hero .tlc {
  background: #fff;
  border: 1px solid var(--line, #dbdee2);
  border-top: 3px solid var(--accent, #ee5b42);
  max-width: 440px;
  margin-left: auto;
  width: 100%;
  min-width: 0;
  position: relative;
  box-sizing: border-box;
}

.tlh {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px !important;
  border-bottom: 1px solid var(--line, #dbdee2);
}

.tlh span {
  font-family: var(--mono, 'IBM Plex Mono', ui-monospace, monospace);
  font-size: 11px;
  letter-spacing: .16em;
  color: var(--accent, #ee5b42);
  text-transform: uppercase;
}

.tlgo {
  font-family: var(--sans, 'Libre Franklin', sans-serif);
  font-size: 14px;
  font-weight: 600;
  color: var(--blue, #0061a8);
  text-decoration: none;
  transition: color .2s ease;
}

.tlgo:hover {
  text-decoration: underline;
  color: var(--accent, #ee5b42);
}

.tl {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}

.tl::before {
  content: "";
  position: absolute;
  left: 29px;
  top: 22px;
  bottom: 22px;
  width: 1px;
  background: var(--line2, #cfd2d7);
  z-index: 0;
}

.hero .tl li:nth-child(n+4) {
  display: none;
}

.tli {
  position: relative;
  width: 100%;
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: 4px 18px;
  text-align: left;
  background: none;
  border: none;
  border-bottom: 1px solid var(--line, #dbdee2);
  padding: 12px 20px !important;
  cursor: pointer;
  font: inherit;
  color: var(--ink, #1d2024);
  box-sizing: border-box;
  transition: background .2s ease;
}

.tl li:last-child .tli {
  border-bottom: none;
}

.tli::before {
  content: "";
  grid-row: 1/3;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--line2, #cfd2d7);
  margin: 3px 0 0 1px;
  position: relative;
  z-index: 1;
  transition: background .25s ease, border-color .25s ease;
}

.tli.on::before {
  background: var(--accent, #ee5b42);
  border-color: var(--accent, #ee5b42);
}

.tld {
  grid-column: 2;
  font-family: var(--mono, 'IBM Plex Mono', ui-monospace, monospace);
  font-size: 10.5px;
  letter-spacing: .14em;
  color: var(--muted, #6b6e75);
  text-transform: uppercase;
}

.tlt {
  grid-column: 2;
  font-family: var(--serif, 'Newsreader', Georgia, serif);
  font-size: 15.5px !important;
  line-height: 1.25;
  color: var(--ink, #1d2024);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color .2s ease;
}

.tli:hover .tlt {
  color: var(--blue, #0061a8);
}

.hero .tlq {
  display: none !important;
}

.tli > i {
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 2px;
  width: 0;
  background: var(--accent, #ee5b42);
  transition: width .05s linear;
}

.tli:focus-visible {
  outline: 2px solid var(--blue, #0061a8);
  outline-offset: -2px;
}

/* ---- Section 02: Case Studies Grid & Filter Bar ---- */
.plain.arts {
  padding: 64px 0 72px;
  background: #fff;
}

.sh2 {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.sh2 .eyebrow {
  font-family: var(--mono, 'IBM Plex Mono', ui-monospace, monospace);
  font-size: 11px;
  letter-spacing: .18em;
  color: var(--accent, #ee5b42);
  margin-bottom: 12px;
  text-transform: uppercase;
}

.sh2 .h2 {
  font-family: var(--serif, 'Newsreader', Georgia, serif);
  font-weight: 400;
  font-size: 34px;
  line-height: 1.15;
  letter-spacing: -.015em;
  margin: 0;
  max-width: 20ch;
  color: var(--ink, #1d2024);
}

.sh2 p {
  margin: 10px 0 0;
  font-size: 15px;
  color: var(--muted, #6b6e75);
  max-width: 52ch;
  line-height: 1.55;
}

/* Topic Filter Chips (.flt2) */
.flt2 {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.flt2 button {
  font-family: var(--sans, 'Libre Franklin', sans-serif);
  font-size: 14px;
  border: 1px solid var(--line2, #cfd2d7);
  background: #fff;
  color: var(--ink, #1d2024);
  padding: 9px 16px;
  cursor: pointer;
  border-radius: 0;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
  white-space: nowrap;
}

.flt2 button sup {
  font-family: var(--mono, 'IBM Plex Mono', ui-monospace, monospace);
  font-size: 10px;
  color: var(--muted, #6b6e75);
  margin-left: 2px;
  font-weight: 400;
}

.flt2 button:hover {
  border-color: var(--ink, #1d2024);
}

.flt2 button.on {
  background: var(--ink, #1d2024);
  color: #fff;
  border-color: var(--ink, #1d2024);
}

.flt2 button.on sup {
  color: #ffb3a4;
}

.flt2 button:focus-visible {
  outline: 2px solid var(--blue, #0061a8);
  outline-offset: 2px;
}

.fnote {
  font-family: var(--mono, 'IBM Plex Mono', ui-monospace, monospace);
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--accent, #ee5b42);
  margin-left: 6px;
}

/* ---- Card Grid Layout (.agrid, .ac) ---- */
.agrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.ac {
  background: #fff;
  border: 1px solid var(--line, #dbdee2);
  transition: transform .3s ease, box-shadow .3s ease, opacity .3s ease;
  min-width: 0;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

.ac[hidden] {
  display: none !important;
}

.ac.in {
  animation: cin .4s ease both;
}

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

.ac:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(29, 32, 36, .1);
}

.ac > a {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.ac > a:focus-visible {
  outline: 2px solid var(--blue, #0061a8);
  outline-offset: 2px;
}

/* ---- Card Visual Header (.ai, .cov2) ---- */
.ai {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: linear-gradient(135deg, #2c3440, #1d2024);
}

.ai img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s ease;
}

.ac:hover .ai img {
  transform: scale(1.05);
}

/* ---- Fallback Cover Art (.cov) matching articles.css ---- */
.cov {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 10px;
  padding: 8% 8% 7%;
  background:
    radial-gradient(circle at 88% 12%, rgba(238, 91, 66, .28) 0, rgba(238, 91, 66, 0) 38%),
    repeating-radial-gradient(circle at 88% 12%, rgba(255, 255, 255, .05) 0 1px, transparent 1px 22px),
    linear-gradient(135deg, #2c3440, #1d2024);
}

.cov .cq {
  font-family: var(--serif, 'Newsreader', Georgia, serif);
  font-size: 60px;
  line-height: .6;
  color: var(--accent, #ee5b42);
}

.cov p {
  font-family: var(--serif, 'Newsreader', Georgia, serif);
  font-size: 21px;
  line-height: 1.2;
  color: #fff;
  margin: 0;
  max-width: 22ch;
}

.cov .cb {
  font-family: var(--mono, 'IBM Plex Mono', ui-monospace, monospace);
  font-size: 10.5px;
  letter-spacing: .14em;
  color: #ffb3a4;
  text-transform: uppercase;
}

.ai .cov {
  padding: 46px 20px 18px;
}

.ai .cov p {
  font-size: 16.5px;
  line-height: 1.25;
  color: #fff;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ai .cov .cb {
  display: block;
}

/* Ambient Radial & Typographic Artwork Headers */
.cov2 {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 6px;
  padding: 46px 22px 20px;
  background:
    radial-gradient(circle at 88% 12%, rgba(238, 91, 66, .32) 0, rgba(238, 91, 66, 0) 40%),
    repeating-radial-gradient(circle at 88% 12%, rgba(255, 255, 255, .05) 0 1px, transparent 1px 22px),
    linear-gradient(135deg, #2c3440, #1d2024);
}

/* Department Gradients for .cov & .cov2 */
.cov.el,
.ac[data-sector="el"] .cov,
.ac[data-k*="el"] .cov,
.cov2.el,
.ac[data-k="el"] .cov2 {
  background:
    radial-gradient(circle at 88% 12%, rgba(238, 91, 66, .32) 0, rgba(238, 91, 66, 0) 40%),
    repeating-radial-gradient(circle at 88% 12%, rgba(255, 255, 255, .05) 0 1px, transparent 1px 22px),
    linear-gradient(135deg, #1b2a32, #10191e);
}

.cov.ed,
.ac[data-sector="pub"] .cov,
.ac[data-sector="ed"] .cov,
.ac[data-k*="pub"] .cov,
.ac[data-k*="ed"] .cov,
.cov2.ed,
.ac[data-k="ed"] .cov2 {
  background:
    radial-gradient(circle at 88% 12%, rgba(238, 91, 66, .32) 0, rgba(238, 91, 66, 0) 40%),
    repeating-radial-gradient(circle at 88% 12%, rgba(255, 255, 255, .05) 0 1px, transparent 1px 22px),
    linear-gradient(135deg, #23272d, #181a1d);
}

.cov.pr,
.ac[data-sector="pr"] .cov,
.ac[data-k*="pr"] .cov,
.cov2.pr,
.ac[data-k="pr"] .cov2 {
  background:
    radial-gradient(circle at 88% 12%, rgba(238, 91, 66, .32) 0, rgba(238, 91, 66, 0) 40%),
    repeating-radial-gradient(circle at 88% 12%, rgba(255, 255, 255, .05) 0 1px, transparent 1px 22px),
    linear-gradient(135deg, #182230, #101620);
}

.cov.acc,
.ac[data-sector="acc"] .cov,
.ac[data-k*="acc"] .cov,
.cov2.acc,
.ac[data-k="acc"] .cov2 {
  background:
    radial-gradient(circle at 88% 12%, rgba(238, 91, 66, .32) 0, rgba(238, 91, 66, 0) 40%),
    repeating-radial-gradient(circle at 88% 12%, rgba(255, 255, 255, .05) 0 1px, transparent 1px 22px),
    linear-gradient(135deg, #242b35, #171b22);
}

.cov2 b {
  font-family: var(--serif, 'Newsreader', Georgia, serif);
  font-weight: 400;
  font-size: 40px;
  line-height: 1;
  color: #fff;
  white-space: nowrap;
}

.cov2 span {
  font-family: var(--mono, 'IBM Plex Mono', ui-monospace, monospace);
  font-size: 10.5px;
  letter-spacing: .14em;
  color: #ffb3a4;
  text-transform: uppercase;
}

/* Document Specimen Variant (.cov2.doc) */
.cov2.doc {
  justify-content: center;
  align-items: center;
  padding: 0;
}

.cov2.doc i {
  display: block;
  width: 84px;
  height: 108px;
  background: #fff;
  box-shadow: 10px -10px 0 rgba(255, 255, 255, .18), 20px -20px 0 rgba(255, 255, 255, .08);
  position: relative;
  transition: transform .3s ease;
}

.cov2.doc i::before {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  top: 16px;
  height: 7px;
  background: var(--ink, #1d2024);
  box-shadow:
    0 14px 0 var(--grey, #ebedf0),
    0 24px 0 var(--grey, #ebedf0),
    0 34px 0 var(--grey, #ebedf0),
    0 44px 0 var(--grey, #ebedf0),
    0 54px 0 var(--grey, #ebedf0);
}

.cov2.doc i::after {
  content: "";
  position: absolute;
  left: 12px;
  width: 30px;
  bottom: 12px;
  height: 5px;
  background: var(--accent, #ee5b42);
}

.ac:hover .cov2.doc i {
  transform: translateY(-4px);
}

/* Category Badge (.atag) */
.atag {
  position: absolute;
  left: 14px;
  top: 14px;
  background: var(--accent, #ee5b42);
  color: #fff;
  font-family: var(--mono, 'IBM Plex Mono', ui-monospace, monospace);
  font-size: 10px;
  letter-spacing: .14em;
  padding: 5px 9px;
  text-transform: uppercase;
  z-index: 2;
}

/* Card Body (.ab) */
.ab {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px 22px 20px;
  flex: 1;
}

.ab h3 {
  font-family: var(--serif, 'Newsreader', Georgia, serif);
  font-weight: 400;
  font-size: 23px;
  line-height: 1.2;
  margin: 0;
  color: var(--ink, #1d2024);
}

.ab p {
  font-size: 15px;
  line-height: 1.55;
  color: var(--body, #454850);
  margin: 0;
}

/* Client Excerpt & Outcome Byline (.aby) */
.aby {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line, #dbdee2);
  flex-wrap: wrap;
}

.aby-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.aby b,
.aby-left b {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink, #1d2024);
  line-height: 1.3;
}

.aby span,
.aby-left span {
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--muted, #6b6e75);
}

/* Read Link (.ago) */
.ago,
.aby .ago {
  font-size: 14px;
  font-weight: 600;
  color: var(--blue, #0061a8);
  white-space: nowrap;
  flex-shrink: 0;
  text-decoration: none;
  transition: color .2s ease;
}

.ac:hover .ago,
.ac:hover .aby .ago {
  text-decoration: underline;
  color: var(--accent, #ee5b42);
}

/* ---- Responsive Breakpoints ---- */
@media (max-width: 1360px) {
  .wrap {
    padding-left: 32px;
    padding-right: 32px;
  }
}

@media (max-width: 1100px) {
  .agrid {
    gap: 20px;
  }
}

@media (max-width: 1000px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .hero h1.display.long {
    font-size: 27px !important;
  }

  .hero .tlc {
    max-width: 100%;
    margin-left: 0;
  }

  .arts {
    padding: 48px 0 56px;
  }

  .agrid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}

@media (max-width: 640px) {
  .sh2 {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

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

  .flt2 {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 6px;
  }

  .flt2 button {
    padding: 8px 12px;
    font-size: 13px;
  }
}

@media (max-width: 375px) {
  .wrap {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero h1.display.long {
    font-size: 24px !important;
  }

  .ab {
    padding: 16px;
  }

  .ab h3 {
    font-size: 20px;
  }

  .cov2 b {
    font-size: 32px;
  }
}

/* ---- Accessibility / Motion Settings ---- */
@media (prefers-reduced-motion: reduce) {
  .ac.in {
    animation: none;
  }
  .tli > i {
    transition: none;
  }
  .ac:hover {
    transform: none;
  }
  .ai img {
    transition: none;
  }
}
