/* Agent Library: crew-roster system.
   File-card grid on the house navy/orange condensed-caps identity.
   The orange checkpoint ring repeated on every card is the thesis
   (you stay the loop) rendered as a visual system. */

:root {
  --al-navy: var(--color-navy, #0E1A2B);
  --al-ink: var(--color-charcoal, #2B2E34);
  --al-cream: #FAF7F0;
  --al-orange: var(--color-orange, #F26A21);
  --al-line: rgba(14, 26, 43, .16);
  --al-grid-line: rgba(14, 26, 43, .05);
}

/* ---------- HERO ---------- */

.al-hero { position: relative; overflow: hidden; }
.al-hero .sr-wrap { position: relative; z-index: 1; }
.al-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(250, 247, 240, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(250, 247, 240, .045) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: linear-gradient(115deg, transparent 25%, #000 80%);
  mask-image: linear-gradient(115deg, transparent 25%, #000 80%);
  pointer-events: none;
}
.al-hero h1 { margin: .6rem 0 1.1rem; }
.al-hero-sub { font-size: 1.45rem; font-weight: 600; max-width: 30ch; line-height: 1.3; margin: 0; }
.al-hero-body { max-width: 58ch; margin: 1rem 0 0; }
/* sam.css scopes .sr-hero-actions under body.sam-r with margin:-8px (old
   flex-gap technique); match that specificity to give the buttons real air. */
body.sam-r .al-hero .sr-hero-actions { margin-top: 1.9rem; }

/* ---------- PROOF STRIP ---------- */

.al-proof { background: var(--al-cream); border-bottom: 1px solid var(--al-line); padding: 1.5rem 0; }
.al-proof p {
  max-width: 76ch;
  margin: 0;
  color: var(--al-ink);
  font-size: .95rem;
  line-height: 1.6;
  border-left: 3px solid var(--al-orange);
  padding-left: 1.1rem;
}
.al-proof strong { color: var(--al-navy); }

/* ---------- CATEGORY RAIL (file tabs + scroll-spy) ---------- */

.al-rail { position: sticky; top: 64px; z-index: 40; background: var(--al-navy); border-bottom: 2px solid var(--al-orange); }
.al-rail ul {
  display: flex;
  list-style: none;
  margin: 0 auto;
  padding: 0 1rem;
  max-width: 1200px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  counter-reset: al-tab;
  scrollbar-width: none;
}
.al-rail ul::-webkit-scrollbar { display: none; }
.al-rail a {
  counter-increment: al-tab;
  display: flex;
  align-items: baseline;
  gap: .45rem;
  padding: .8rem 1rem .65rem;
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  font-size: 1rem;
  color: var(--al-cream);
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
}
.al-rail a::before { content: counter(al-tab, decimal-leading-zero); color: var(--al-orange); font-size: .78em; font-weight: 700; }
.al-rail a:hover, .al-rail a.is-active { border-bottom-color: var(--al-orange); background: rgba(250, 247, 240, .07); }
.al-rail a:focus-visible { outline: 3px solid var(--al-orange); outline-offset: -3px; }

/* ---------- BANDS ---------- */

#al-main { counter-reset: al-band; background: var(--al-cream); }

.al-band { counter-increment: al-band; padding: 4rem 0 4.5rem; scroll-margin-top: 7.5rem; }
#answering-customers, #scheduling, #files {
  background-color: #fff;
  background-image:
    linear-gradient(var(--al-grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--al-grid-line) 1px, transparent 1px);
  background-size: 64px 64px;
}

.al-band h2 {
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  line-height: .95;
  letter-spacing: .01em;
  color: var(--al-navy);
  margin: 0 0 .55rem;
  padding-bottom: .55rem;
  border-bottom: 3px solid var(--al-navy);
}
.al-band h2::before {
  content: counter(al-band, decimal-leading-zero);
  display: inline-block;
  margin-right: .3em;
  font-size: .52em;
  font-weight: 700;
  letter-spacing: 0;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--al-orange);
  transform: translateY(-.62em);
}
.al-band-intro { max-width: 60ch; margin: 0 0 2.25rem; color: var(--al-ink); }

/* ---------- CARD GRID ---------- */

.al-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 1.6rem 1.4rem;
  align-items: start;
}

/* ---------- CARDS (personnel files) ---------- */

.al-card {
  background: #fff;
  border: 1px solid var(--al-navy);
  border-top-width: 3px;
  border-radius: 0;
  box-shadow: 5px 5px 0 rgba(14, 26, 43, .08);
  padding: 1.35rem 1.35rem 0;
  color: var(--al-ink);
  display: flex;
  flex-direction: column;
  scroll-margin-top: 8.5rem;
}
.al-card.is-open { box-shadow: 7px 7px 0 rgba(242, 106, 33, .28); }

.al-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: .5rem .75rem; flex-wrap: wrap; }
.al-card-name {
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .02em;
  font-size: 1.65rem;
  line-height: 1;
  color: var(--al-navy);
  margin: 0;
}

/* Badges: the proof tier system */
.al-badge {
  font-family: Archivo, sans-serif;
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  padding: .32rem .5rem;
  white-space: normal;
  line-height: 1.35;
  text-align: left;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  gap: .38rem;
}
.al-badge--lr { background: var(--al-navy); color: var(--al-cream); }
.al-badge--lr::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--al-orange);
  animation: al-pulse 2.2s ease-in-out infinite;
}
@keyframes al-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
.al-badge--client { border: 1px solid var(--al-navy); color: var(--al-navy); background: transparent; }
.al-badge--used { border: 1px solid var(--al-orange); color: var(--al-ink); background: transparent; }

.al-card-outcome { margin: .85rem 0 1rem; font-size: 1rem; line-height: 1.55; color: var(--al-ink); }

/* Fact table: hairline rules, label column */
.al-card-facts { margin: 0; font-size: .9rem; }
.al-card-facts > div {
  display: grid;
  grid-template-columns: 118px 1fr;
  gap: .8rem;
  padding: .6rem 0;
  border-top: 1px solid var(--al-line);
}
.al-card-facts dt {
  font-family: Archivo, sans-serif;
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: rgba(14, 26, 43, .55);
  padding-top: .2rem;
}
.al-card-facts dd { margin: 0; color: var(--al-ink); line-height: 1.5; }

/* THE SIGNATURE: the checkpoint row, same spot on all 20 cards */
.al-card-facts > div:nth-child(2) {
  border-top: 2px solid var(--al-orange);
  background: linear-gradient(90deg, rgba(242, 106, 33, .07), transparent 72%);
}
.al-card-facts > div:nth-child(2) dt { color: var(--al-orange); }
.al-card-facts > div:nth-child(2) dt::before {
  content: "";
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: .38rem;
  border: 2px solid var(--al-orange);
  border-radius: 50%;
  vertical-align: -1px;
}
.al-card-facts > div:nth-child(2) dd { font-weight: 600; color: var(--al-navy); }

/* Toggle: full-bleed drawer handle */
.al-card-toggle {
  margin: 1rem -1.35rem 0;
  padding: .8rem 1.35rem;
  width: calc(100% + 2.7rem);
  text-align: left;
  background: transparent;
  border: 0;
  border-top: 1px solid var(--al-line);
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: 1rem;
  color: var(--al-navy);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.al-card-toggle::after { content: "+"; font-size: 1.25rem; line-height: 1; color: var(--al-orange); }
.al-card.is-open .al-card-toggle::after { content: "\2212"; }
.al-card-toggle:hover { background: var(--al-navy); color: var(--al-cream); }
.al-card-toggle:focus-visible { outline: 3px solid var(--al-orange); outline-offset: -3px; }

/* Expanded panel: opening the file */
.al-card-more {
  margin: 0 -1.35rem;
  padding: 1.15rem 1.35rem 1.35rem;
  background: var(--al-cream);
  border-top: 1px solid var(--al-line);
}
.al-split h4 {
  font-family: Archivo, sans-serif;
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: rgba(14, 26, 43, .55);
  margin: 0 0 .5rem;
}
.al-split ul { list-style: square; margin: 0 0 1.1rem; padding-left: 1.05rem; }
.al-split li { margin-bottom: .45rem; line-height: 1.5; }
.al-split li::marker { color: var(--al-orange); }
.al-split > div + div { border-left: 2px solid var(--al-orange); padding-left: .95rem; }
.al-split > div + div h4 { color: var(--al-orange); }
.al-split > div + div p { margin: 0; font-weight: 500; color: var(--al-navy); }

/* CTAs on cards + band footers */
.al-cta {
  display: inline-block;
  margin-top: 1rem;
  background: var(--al-orange);
  color: #fff;
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  font-size: 1rem;
  padding: .55rem 1.05rem;
  text-decoration: none;
}
.al-cta:hover { background: var(--al-navy); color: var(--al-cream); }
.al-cta:focus-visible { outline: 3px solid var(--al-navy); outline-offset: 2px; }
.al-band-cta { margin: 2.4rem 0 0; }

/* Ghost fallback for the hero secondary button (sam.css wins when loaded) */
.sr-btn.ghost { background: transparent; border: 1.5px solid var(--al-cream); color: var(--al-cream); }
.sr-btn.ghost:hover { border-color: var(--al-orange); color: var(--al-orange); }

/* ---------- RESPONSIVE + MOTION ---------- */

@media (max-width: 720px) {
  .al-band { padding: 2.5rem 0 3rem; }
  .al-grid { grid-template-columns: 1fr; }
  .al-card-facts > div { grid-template-columns: 1fr; gap: .2rem; }
  .al-card-facts dt { padding-top: 0; }
}

@media (prefers-reduced-motion: no-preference) {
  .al-card { transition: box-shadow .15s ease, transform .15s ease; }
  .al-card:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 rgba(14, 26, 43, .12); }
  .al-card-toggle { transition: background .12s ease, color .12s ease; }
}
@media (prefers-reduced-motion: reduce) {
  .al-badge--lr::before { animation: none; }
}
