/* What the cards are made of, and what is printed on them.
   Faces are authored in design pixels on each card's own canvas and scaled as a
   whole, so these sizes are read at roughly 1:1 on a 300–460px wide card. */

/* --- The photograph ------------------------------------------------------ */

.tc-art-frame {
  position: relative;
  overflow: hidden;
  background-color: #1a1c1e;
  background-image: var(--grain);
}
.photo-card > .tc-art-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  z-index: -1;
}
.card-art-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  -webkit-user-drag: none;
  opacity: 0;
  transition: opacity .55s ease;
}
.tc-art-frame.fit-contain .card-art-image { object-fit: contain; }
.card-art-image.is-ready { opacity: 1; }

/* A card that shows only its photograph prints it at full strength. */
.front-bare .card-art-image { filter: none; }
/* Anything printed over the photograph steps it back so the type stays legible. */
.card-back .card-art-image,
.link-card .card-art-image { filter: brightness(.72) saturate(.9); }

/* --- Developing ---------------------------------------------------------- */

/* Nothing is announced until the wait is worth announcing. Then the card reads
   like a sheet in a tray: grain first, then a slow sweep, then the print. */
.card-develop {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background-color: #17191b;
  background-image:
    linear-gradient(100deg, transparent 30%, #ffffff0e 48%, transparent 66%),
    var(--grain);
  background-size: 260% 100%, auto;
  background-position: 140% 0, 0 0;
  transition: opacity .35s ease;
}
.tc-art-frame.is-developing .card-develop {
  opacity: 1;
  animation: develop-sweep 2.6s cubic-bezier(.4, 0, .3, 1) infinite;
}
.tc-art-frame.is-blank { background-color: #17191b; }

@keyframes develop-sweep {
  0% { background-position: 140% 0, 0 0; }
  100% { background-position: -60% 0, 0 0; }
}

/* --- Printed panels ------------------------------------------------------ */

.tc-information,
.photo-card .tc-header {
  position: relative;
  background: var(--grain), #202326f2;
  border: 1px solid #7a7e8238;
  border-radius: 2px;
  box-shadow: 0 1px 0 #494d50, 0 3px 0 #151719, 0 6px 10px #0005;
}
.tc-information { padding: 12px 13px 11px; }
/* Inside a panel the title is separated by space, not by a rule. */
.tc-information .tc-header {
  padding: 0 0 9px;
  margin: 0 0 8px;
  background: none;
  border: 0;
  box-shadow: none;
}
.tc-title {
  color: var(--accent, #c8b66c);
  font: 500 15px/1.35 var(--font-title);
  letter-spacing: .105em;
  text-transform: uppercase;
  text-wrap: balance;
  overflow-wrap: anywhere;
}
.card-photo-space { flex: 1; min-height: 0; }
.tc-type-line {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  color: #969ea3;
  font: 500 8.5px/1.5 var(--font-sans);
  letter-spacing: .055em;
  text-transform: uppercase;
}
.tc-text-box { padding: 8px 0 4px; }
.tc-tagline, .dossier-description {
  color: #b9bfc2;
  font-size: 12px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.tc-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 8px;
  color: #879196;
  font-size: 9px;
}
.card-open {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #d6d8d6;
  font-size: 10.5px;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.dossier-specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px 14px;
  padding: 9px 0 2px;
}
.spec-item { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.spec-label {
  color: #8d9599;
  font-size: 7.5px;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.spec-val { color: #c4cacd; font-size: 10px; line-height: 1.4; overflow-wrap: anywhere; }

/* --- Card kinds ---------------------------------------------------------- */

/* A photograph, and nothing else, until it is turned over. The print runs to
   the cut edge of the card: the stock's thickness is the only frame. */
.photo-card.front-bare {
  padding: 0;
  overflow: hidden;
  border-color: #4c4f5133;
}
.photo-card.front-bare > .tc-art-frame { z-index: 0; }

/* The day already showing sits proud of the others. */
.card-wrapper.is-selected .playing-card { box-shadow: var(--card-hover-shadow); }
.card-wrapper.is-selected .tc-title { color: #e6e8e6; }

/* A card that goes somewhere states its destination on the front. */
.link-card { --accent: #cfd2d2; justify-content: flex-end; }
.link-card .tc-title { color: #d9dcdc; }

/* Printed matter with no photograph behind it. */
.note-card { --accent: #bcaa70; justify-content: center; background-color: #24272a; }
.note-card .tc-information { padding: 16px; background: none; border: 0; box-shadow: none; }
.note-card .tc-tagline + .tc-tagline { margin-top: 9px; }

/* A card with no photograph behind it prints its type on the stock itself. */
.link-card-plain { --accent: #cfd3d5; justify-content: center; background-color: #26292b; }
.link-card-plain .tc-information { padding: 15px; background: none; border: 0; box-shadow: none; }

/* A single figure, stamped on its own card. */
.stat-card {
  --accent: #cfd3d5;

  align-items: center;
  justify-content: center;
  background-color: #26292b;
}
.stat-card .tc-information {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 12px;
  background: none;
  border: 0;
  box-shadow: none;
}
.tc-stat {
  color: #d9dcdc;
  font: 400 26px/1 var(--font-title);
  letter-spacing: .01em;
  white-space: nowrap;
}
.tc-stat-label {
  color: #8b9296;
  font-size: 8.5px;
  letter-spacing: .13em;
  text-align: center;
  text-transform: uppercase;
}

/* A section break dealt as a label card: wide, short, and clearly printed. */
.heading-card { --accent: #cfd3d5; justify-content: center; background-color: #26292b; }
.heading-card .tc-information {
  padding: 14px 16px;
  background: none;
  border: 0;
  box-shadow: none;
}
.heading-card .tc-title { font-size: 17px; letter-spacing: .13em; }
.heading-card .tc-information .tc-header { padding: 0; margin: 0 0 7px; }
.heading-card .tc-text-box { padding: 0; }
.heading-card .tc-tagline { color: #939a9e; font-size: 11.5px; }
.heading-card .tc-footer { padding-top: 9px; }

/* A caption ends with an ellipsis rather than a scrollbar: the card is a card. */
.tc-tagline, .dossier-description {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 6;
  line-clamp: 6;
  overflow: hidden;
}
.heading-card .tc-tagline { -webkit-line-clamp: 3; line-clamp: 3; }
.link-card .tc-tagline { -webkit-line-clamp: 5; line-clamp: 5; }

/* One print at a time, on a card cut to that print: no mount, no matting. */
.slideshow-card { padding: 0; overflow: hidden; background-color: #1b1e20; }
.slideshow-window { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; }
.slideshow-window .tc-art-frame { position: absolute; inset: 0; background-color: #111315; }

/* --- The identity card --------------------------------------------------- */

.title-card .playing-card, .title-face {
  padding: 8px 18px;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--grain), #202326;
  box-shadow: 0 1px 0 #45484a, 0 2px 0 #272a2c, 0 3px 3px -1px #000a;
}
.title-card h1, .title-face h1 {
  display: flex;
  flex-direction: column;
  gap: 3px;
  color: #b0b7bb;
  font: 500 11px/1.15 var(--font-title);
  letter-spacing: .17em;
  text-transform: uppercase;
}
.title-discipline { color: #8b9297; font-size: 8px; letter-spacing: .34em; }
.title-face.title-reverse {
  flex-direction: row;
  gap: 7px;
  padding: 7px 8px;
}
.title-face.title-reverse p {
  color: #afb8be;
  font: 500 9px/1.3 var(--font-title);
  letter-spacing: .12em;
  white-space: nowrap;
  text-transform: uppercase;
}
.title-email {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 21px;
  height: 21px;
  flex-shrink: 0;
  color: #afb8be;
  -webkit-user-drag: none;
}
.title-email svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.4; }
.title-email:hover { color: #dedfdc; }

@media (max-width: 760px) {
  .title-card h1, .title-face h1 { font-size: 11px; }
  .title-face.title-reverse { gap: 5px; padding: 7px 5px; }
  .title-face.title-reverse p { font-size: 8px; letter-spacing: .09em; }
  .title-email { width: 18px; }
}
