/* S2: About, the lanyard ID card and the quick facts. Owned by S2. */
.about {
  --ease-io: cubic-bezier(.65, 0, .35, 1);
  --ease-back: cubic-bezier(.34, 1.56, .64, 1);
  --t-fast: 200ms;
  --t-mid: 450ms;
  --t-slow: 700ms;
  --stagger: 55ms;
}

/* Grid */
.about__grid {
  max-width: var(--content);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) 340px minmax(0, .85fr);
  gap: clamp(32px, 4vw, 64px);
  align-items: start;
}
@media (min-width: 700px) and (max-width: 1023.98px) {
  .about__grid { grid-template-columns: 1fr 1fr; gap: 40px 32px; }
  .about__text { grid-column: 1 / -1; }
}
@media (max-width: 699.98px) {
  .about__grid { grid-template-columns: minmax(0, 1fr); gap: 48px; }
}

/* Text column */
.about__text p {
  max-width: 58ch;
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--ink-2);
}
.about__text p + p { margin-top: 20px; }
.about__text > p:first-child {
  font-size: clamp(1.25rem, 1.6vw, 1.5rem);
  line-height: 1.45;
  font-weight: 500;
  color: var(--ink);
}
.about__quote {
  margin-top: 40px;
  padding-left: 20px;
  border-left: 2px solid var(--accent-2);
}
.about__text .about__quote p {
  margin-top: 0;
  font: italic 400 clamp(1.25rem, 1.5vw, 1.5rem) / 1.3 var(--font-display);
  letter-spacing: -.01em;
  color: var(--ink);
}
.about__quote footer {
  margin-top: 12px;
  font: 500 12px / 1.4 var(--font-mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--mute-text);
}

/* The badge column */
.badge { min-width: 0; position: relative; }
@media (min-width: 1024px) {
  .badge { position: sticky; top: 96px; }
  /* The strap always reaches the top of the grid: a tall extension, clipped at the grid edge. */
  .about__grid { clip-path: inset(0 -100vw -100vw); }
  .badge__strap { position: relative; }
  .badge__strap::before { content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 1050px; background: inherit; }
}
@media (max-width: 699.98px) {
  .badge { justify-self: center; }
}
.badge__strap {
  width: 26px;
  height: 150px;
  margin: 0 auto;
  background: repeating-linear-gradient(180deg, var(--accent) 0 14px, color-mix(in srgb, var(--accent) 72%, var(--dark)) 14px 15px);
  border-radius: 0 0 4px 4px;
}
.badge__clip {
  position: relative;
  width: 44px;
  height: 26px;
  margin: -4px auto 0;
  border-radius: 8px;
  background: var(--clip);
  box-shadow: var(--hair);
}
.badge__swing {
  width: max-content;
  margin: 0 auto;
  transform-origin: 50% 0;
  perspective: 1400px;
}

/* The card */
.badge__card {
  display: grid;
  gap: .75em;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-sans);
  font-size: 16px;
  width: 21em;
}
@media (max-width: 699.98px) {
  .badge__card { font-size: 14.5px; }
}
.badge__face {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 2.35em 1.375em 1.125em;
  border-radius: var(--radius);
  overflow: hidden;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  box-shadow: var(--hair), var(--shadow);
}
.badge__face--front { background: var(--card); color: var(--ink); }
.badge__face--back { background: var(--dark); color: var(--on-dark); }

html.js .badge__card {
  height: 29.53em;
  gap: 0;
  transform-style: preserve-3d;
}
html.js .badge__face { grid-area: 1 / 1; }
html.js .badge__face--back { transform: rotateY(180deg); }
html.js .badge__card.is-back { transform: rotateY(180deg); }

#badge-card:focus-visible { outline: 0; }
#badge-card:focus-visible .badge__face {
  box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--focus), var(--shadow);
}

/* The slot sits where the 3D card's slot is: 0.13 of its height below the top edge, 0.34 x 0.07 of its width */
.badge__slot {
  position: absolute;
  top: 1.25em;
  left: 50%;
  width: 4.46em;
  height: .92em;
  margin-left: -2.23em;
  border-radius: 999px;
  background: var(--soft);
}
.badge__face--back .badge__slot { background: var(--dark-2); }
.badge__org {
  font: 500 .6875em / 1 var(--font-mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent-2-ink);
}
.badge__face--back .badge__org { color: var(--accent); }
/* Portrait 4:5, the same ratio as the photo itself, so the whole head shows: hair, air above it, beard */
.badge__photo {
  width: 9.4em;
  height: 11.75em;
  margin: .6em auto 0;
  object-fit: cover;
  object-position: 50% 50%;
  border-radius: var(--radius-sm);
}
.badge__name {
  margin-top: .5em;
  font: 500 2.375em / 1 var(--font-display);
  letter-spacing: -.02em;
}
.badge__role {
  margin-top: .25em;
  font-weight: 600;
  font-size: .9375em;
  line-height: 1.25;
}
.badge__rows {
  display: grid;
  gap: .25em;
  margin-top: .7em;
  font: 500 .75em / 1.4 var(--font-mono);
}
.badge__row { display: grid; grid-template-columns: 11ch minmax(0, 1fr); column-gap: 1ch; min-width: 0; }
.badge__rows b {
  min-width: 0;
  font-weight: 500;
  color: var(--mute-text);
  text-transform: uppercase;
}
.badge__list { display: grid; margin-top: 1em; }
.badge__item {
  padding: .45em 0;
  border-top: 1px solid var(--line-dark);
  font-size: .9375em;
  line-height: 1.35;
}
.badge__return {
  margin-top: auto;
  padding-top: .75em;
  font: italic 400 1.0625em / 1.25 var(--font-display);
  color: var(--mute-dark);
}
/* Front, bottom: the fine print, the code strip and the holographic seal */
.badge__foot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 4em;
  grid-template-rows: auto auto;
  column-gap: .75em;
  align-items: end;
  margin-top: auto;
  padding-top: .5em;
}
.badge__fine {
  display: grid;
  gap: .1em;
  font: 500 .625em / 1.35 var(--font-mono);
  letter-spacing: .02em;
  color: var(--mute-text);
}
.badge__foot .badge__code { margin-top: .4em; height: 1.5em; }
.badge__seal {
  grid-column: 2;
  grid-row: 1 / span 2;
  width: 4em;
  height: 4em;
  border-radius: 50%;
}
/* Back, bottom: the vCard QR with its caption, and the return line */
.badge__bottom {
  display: grid;
  grid-template-columns: 7.2em minmax(0, 1fr);
  column-gap: 1em;
  align-items: end;
  margin-top: auto;
  padding-top: .6em;
}
.badge__scanbox { display: grid; justify-items: center; gap: .3em; }
.badge__qr { display: block; width: 7.2em; height: 7.2em; border-radius: .5em; }
.badge__scan {
  font: 500 .5625em / 1.3 var(--font-mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  text-align: center;
  color: var(--mute-dark);
}
.badge__bottom .badge__return { margin-top: 0; padding-top: 0; font-size: .84em; overflow-wrap: anywhere; }
.badge__code {
  margin-top: auto;
  height: 1.75em;
  background: repeating-linear-gradient(90deg, currentColor 0 3px, transparent 3px 5px, currentColor 5px 6px, transparent 6px 10px, currentColor 10px 14px, transparent 14px 16px);
  opacity: .85;
}
.badge__face--back .badge__code { margin-top: .6em; }
.badge__hint {
  margin-top: 22px;
  text-align: center;
  font: 500 12px / 1.4 var(--font-mono);
  letter-spacing: .04em;
  color: var(--mute-text);
}

/* Without scripts the faces follow each other in normal flow (no html.js rules above apply) */
html:not(.js) .badge__code { margin-top: 1em; }

/* Quick facts */
.facts { display: grid; min-width: 0; }
.facts > div {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
@media (max-width: 699.98px) {
  .facts > div { grid-template-columns: 1fr; gap: 2px; }
}
.facts dt {
  font: 500 11px / 1.6 var(--font-mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--mute-text);
}
.facts dd {
  font-size: 1rem;
  line-height: 1.45;
  font-weight: 600;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.facts dd a { color: inherit; text-decoration: underline; text-decoration-color: var(--accent-2); text-underline-offset: .25em; }
.facts .facts__off dd { font-weight: 400; color: var(--ink-2); font-size: .95rem; }
.facts > div:not(.facts__off) + .facts__off {
  margin-top: 28px;
  border-top: 2px solid var(--ink);
}

/* Motion */
@media (prefers-reduced-motion: no-preference) {
  html.js .badge:not(.is-in) { opacity: 0; transform: translateY(-40px); }
  html.js .badge.is-in {
    opacity: 1;
    transform: none;
    transition: opacity 600ms linear, transform 900ms var(--ease);
  }
  html.js .badge__card { transition: transform 900ms var(--ease-io); }
  html.js .facts:not(.is-in) > div { opacity: 0; transform: translateY(12px); }
  html.js .facts.is-in > div {
    opacity: 1;
    transform: none;
    transition: opacity 600ms var(--ease), transform 600ms var(--ease);
    transition-delay: calc(var(--i, 0) * var(--stagger));
  }
}
@media (prefers-reduced-motion: reduce) {
  html.js .badge__card { transition: none; }
}

/* S17: the 3D card (React Bits Lanyard), the door reader, the notes. The 3D stage replaces the HTML card
   (kept in the page, visually hidden) only after lanyard.js mounted: badge.js sets .is-3d. */
.badge { --stage-w: min(416px, calc(100% + 76px), 100vw); }
@media (min-width: 700px) and (max-width: 799.98px) {
  .badge__card { font-size: 14.5px; }
}
.badge__scene { position: relative; }
.badge__stage { display: none; }
.badge.is-3d .badge__strap,
.badge.is-3d .badge__clip { display: none; }
.badge.is-3d .badge__swing {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  overflow: hidden;
  clip-path: inset(50%);
  transform: none !important;
}
/* While lanyard.js mounts the HTML card still shows; the stage has its size but is not seen. */
.badge.is-3d-try .badge__stage {
  display: block;
  position: absolute;
  top: 0;
  left: calc((100% - var(--stage-w)) / 2);
  width: var(--stage-w);
  aspect-ratio: 1 / 1.6875;
  visibility: hidden;
  pointer-events: none;
}
.badge.is-3d .badge__stage {
  display: block;
  position: relative;
  width: var(--stage-w);
  margin-left: calc((100% - var(--stage-w)) / 2);
  aspect-ratio: 1 / 1.6875;
  border-radius: 12px;
}
.badge.is-3d:has(#badge-card:focus-visible) .badge__stage { outline: 2px solid var(--focus); outline-offset: 3px; }
.badge__lanyard {
  position: absolute;
  inset: 0;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 9%), linear-gradient(to right, transparent 0, #000 7%, #000 93%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to bottom, transparent 0, #000 9%), linear-gradient(to right, transparent 0, #000 7%, #000 93%, transparent 100%);
  mask-composite: intersect;
}
.lanyard-canvas { display: block; width: 100%; height: 100%; }
html.js .badge.is-3d:not(.is-in) { transform: none; }

/* Door reader: a small wall unit, beside the card at card-centre height (also on phones: the canvas is touch-action pan-y, so a
   finger can only drag the card sideways onto it). Below the card in the HTML fallback. */
.badge__door { position: relative; display: grid; justify-items: center; margin-top: 14px; z-index: 3; }
.badge.is-3d .badge__door {
  position: absolute;
  top: 57%;
  right: calc((100% - var(--stage-w)) / 2 + 4px);
  margin: 0;
  transform: translateY(-50%);
  justify-items: end;
}
@media (max-width: 699.98px) {
  .badge.is-3d .badge__reader { width: 44px; }
}
.badge__reader {
  display: grid;
  justify-items: center;
  align-content: space-between;
  width: 50px;
  height: 96px;
  padding: 11px 5px 9px;
  border: 0;
  border-radius: 14px;
  background: var(--dark) linear-gradient(160deg, var(--dark-2), var(--dark));
  color: var(--on-dark);
  cursor: pointer;
  box-shadow: 0 0 0 1px var(--line-dark), 0 14px 26px -14px rgba(15, 42, 34, .7), inset 0 1px 0 rgba(255, 255, 255, .1);
  font: 500 8px / 1.2 var(--font-mono);
  letter-spacing: .12em;
  text-align: center;
  text-transform: uppercase;
  transition: box-shadow 200ms linear;
}
.badge__led {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  opacity: .6;
  box-shadow: 0 0 0 2px rgba(246, 239, 227, .1);
}
.badge__swipe {
  width: 6px;
  height: 28px;
  border-radius: 3px;
  background: #06130e;
  box-shadow: inset 0 0 0 1px rgba(246, 239, 227, .22);
}
.badge__door.is-near .badge__reader { box-shadow: 0 0 0 2px var(--accent), 0 14px 26px -14px rgba(15, 42, 34, .7); }
.badge__door.is-granted .badge__led { background: #3ddc84; opacity: 1; box-shadow: 0 0 10px 2px rgba(61, 220, 132, .65); }
.badge__door.is-granted .badge__reader { box-shadow: 0 0 0 2px #3ddc84, 0 14px 26px -14px rgba(15, 42, 34, .7); }
html:not(.js) .badge__reader { display: none; }

.badge__panel {
  position: relative;
  width: 15rem;
  max-width: calc(100vw - 2 * var(--gutter));
  margin-top: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--card);
  color: var(--ink);
  box-shadow: var(--hair), 0 24px 48px -20px rgba(15, 42, 34, .5);
}
html.js .badge__panel { position: absolute; top: calc(100% + 10px); right: 0; margin: 0; z-index: 5; }
html.js .badge__panel:not(.is-open) { display: none; }
/* badge-reader.js did not load: no reader button, the three actions as plain links under the card (like scripts off) */
.badge.is-plain .badge__reader, .badge.is-plain .badge__close { display: none; }
html.js .badge.is-plain .badge__panel { position: relative; top: auto; right: auto; display: block; margin: 12px 0 0; }
.badge__panel-title {
  display: flex;
  align-items: center;
  gap: .6em;
  padding-right: 28px;
  font: 500 11px / 1.2 var(--font-mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent-2-ink);
}
.badge__panel.is-open .badge__panel-title { color: #1b6e41; }
.badge__panel.is-open .badge__panel-title::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #2fbf71; }
.badge__actions { display: grid; gap: 8px; margin-top: 12px; list-style: none; padding: 0; }
.badge__act {
  display: block;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font: 600 14px / 1.2 var(--font-sans);
  text-align: center;
  text-decoration: none;
}
.badge__act:hover { background: var(--ink-2); }
.badge__addr { margin-top: 10px; font: 500 11px / 1.4 var(--font-mono); color: var(--mute-text); overflow-wrap: anywhere; text-align: center; }
.badge__close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: var(--soft);
  color: var(--ink);
  font: 500 18px / 1 var(--font-sans);
  cursor: pointer;
}
html:not(.js) .badge__close { display: none; }

/* The shared note: a status line under the card */
.badge__note {
  width: max-content;
  max-width: 100%;
  min-height: 2em;
  margin: 10px auto 0;
  padding: .55em 1em;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font: 500 12px / 1.3 var(--font-mono);
  letter-spacing: .02em;
  text-align: center;
  opacity: 0;
  pointer-events: none;
}
.badge__note.is-on { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .badge__note { transition: opacity 400ms linear; }
}
@media (prefers-reduced-motion: no-preference) {
  .badge__note { transform: translateY(6px); transition: opacity 400ms linear, transform 400ms var(--ease); }
  .badge__note.is-on { transform: none; }
  .badge__door.is-granted .badge__led { animation: badge-led 1.2s ease-in-out infinite; }
  @keyframes badge-led { 50% { box-shadow: 0 0 16px 5px rgba(61, 220, 132, .45); } }
}

/* The HTML card's seal: static, with a fixed conic sheen (nothing moves) */
.badge__foot { position: relative; }
.badge__foot::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 4em;
  height: 4em;
  border-radius: 50%;
  pointer-events: none;
  background: conic-gradient(from 200deg, rgba(255, 255, 255, 0) 0deg, rgba(255, 255, 255, .55) 40deg, rgba(120, 190, 255, .28) 90deg, rgba(255, 190, 120, .3) 150deg, rgba(255, 255, 255, 0) 210deg, rgba(255, 255, 255, .35) 290deg, rgba(255, 255, 255, 0) 360deg);
  mix-blend-mode: soft-light;
}

/* Lazy images that never got a src (scripts off): hide them, the noscript copy shows instead. */
.badge__seal[data-src]:not([src]),
.badge__qr[data-src]:not([src]) { display: none; }
.badge__foot > noscript { display: contents; }
