/* ==========================================================================
   Over de maker (/maker/, /team/, /films/, /fund/, /backstage/ and the 404): the personal side of Baffo, in the
   product's own design (product.css) and frame. Small, warm details for whoever finds them; never on the path of a
   guest or a venue (docs/BAFFO-CONTEXT.md). The secrets and seasons still run on main.js; this file gives what
   main.js builds (toast, credits, bulbs, the secret cards, the season's extras) the product's look.
   Every class here is used by main.js or films.js, or starts with "m-".
   ========================================================================== */

/* ----- The maker's page ----- */
.m-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--b-4);
  align-items: center;
}

.m-quote {
  color: var(--b-soft);
  font-style: italic;
  transition: opacity 400ms ease;
}

.m-quote.is-out {
  opacity: 0;
}

/* The big name (secret: The Truman Show). It looks like the rest of the title. */
.show-word {
  cursor: default;
  border-radius: var(--b-radius-s);
}

/* Baffo Bot: knock on him (the Konami code without a keyboard, and some seasons' secret). */
.m-bot {
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  padding: var(--b-2);
  border-radius: 50%;
  background: var(--b-bot-disc);
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
}

.m-bot img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.ring-awake {
  box-shadow: 0 0 0 4px var(--b-honey), 0 0 48px color-mix(in srgb, var(--b-honey) 60%, transparent);
}

.shockwave {
  position: absolute;
  inset: 0;
  border: 2px solid var(--b-honey);
  border-radius: 50%;
  pointer-events: none;
}

#show {
  position: relative;
}

.m-door {
  font-weight: 650;
}

.m-me {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: var(--b-4);
  align-items: center;
}

.m-me img {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
}

/* Backstage in the list: one dot per secret */
.secret-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: var(--b-1);
}

.secret-dots span {
  width: 10px;
  height: 10px;
  border: 1px solid var(--b-edge);
  border-radius: 50%;
}

.secret-dots span.is-found {
  border-color: var(--b-honey-edge);
  background: var(--b-honey);
}

/* The credits: a small "Fin." at the end of the maker's page */
.m-credits {
  min-height: var(--b-tap);
  padding: 0 var(--b-3);
  border: 0;
  border-radius: var(--b-radius-pill);
  background: none;
  color: var(--b-soft);
  cursor: pointer;
  font: inherit;
  font-style: italic;
}

.m-credits:hover {
  background: var(--b-sunk);
  color: var(--b-ink);
}

.credits-roll {
  position: fixed;
  inset: 0;
  z-index: 65;
  overflow: hidden;
  background: #000000;
  cursor: pointer;
}

.credits-roll:focus {
  outline: none;
}

.credits-roll-track {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 var(--b-5);
  text-align: center;
  will-change: transform;
}

.roll-role {
  color: #B8B1A3;
  font-size: var(--b-small);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.roll-name {
  margin: var(--b-2) 0 var(--b-8);
  color: #F3EEE3;
  font-size: var(--b-title);
  font-weight: 650;
}

.roll-final {
  margin-top: var(--b-7);
  color: #E9C46A;
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  font-style: italic;
  font-weight: 650;
  line-height: 1;
}

.credits-roll.is-static {
  overflow-y: auto;
}

.credits-roll.is-static .credits-roll-track {
  position: static;
  padding: 96px var(--b-5);
}

/* ----- A secret found: one quiet toast ----- */
.secret-toast {
  position: fixed;
  bottom: calc(var(--b-5) + env(safe-area-inset-bottom, 0px));
  left: 50%;
  z-index: 70;
  width: max-content;
  max-width: calc(100vw - 32px);
  padding: var(--b-3) var(--b-5);
  border-radius: var(--b-radius-m);
  background: var(--b-ink);
  color: var(--b-page);
  box-shadow: var(--b-shadow);
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity 280ms ease-out, transform 280ms var(--b-ease);
}

.secret-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.secret-toast-quote {
  font-size: var(--b-lead);
  font-style: italic;
  line-height: 1.3;
}

.secret-toast-count {
  margin-top: var(--b-1);
  font-size: var(--b-small);
  font-weight: 650;
}

/* ----- Team ----- */
.m-team {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--b-4);
}

.member {
  display: grid;
  gap: var(--b-1);
  align-content: start;
}

.portrait {
  position: relative;
  display: block;
  width: 100%;
  margin-bottom: var(--b-2);
  padding: 0;
  overflow: hidden;
  aspect-ratio: 1;
  border: 0;
  border-radius: var(--b-radius-l);
  background: var(--b-sunk);
  font: inherit;
}

button.portrait {
  cursor: pointer;
  touch-action: manipulation;
}

.portrait-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--b-soft);
  font-size: var(--b-display);
  font-weight: 650;
}

.portrait img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.portrait.is-eyes {
  box-shadow: 0 0 0 3px var(--b-honey);
}

.member-name {
  font-size: var(--b-lead);
}

.member-role {
  font-weight: 600;
}

.member-line {
  color: var(--b-soft);
  font-size: var(--b-small);
}

/* ----- Films: the letterboard with its twelve bulbs (a keyboard: secret Close Encounters) ----- */
.letterboard {
  padding: var(--b-5);
  border-radius: var(--b-radius-l);
  background: #0B1226;
  color: #F3EEE3;
  box-shadow: var(--b-shadow);
}

.bulbs {
  display: flex;
  justify-content: space-between;
}

.bulbs span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #F6DE96;
  box-shadow: 0 0 8px rgba(246, 222, 150, 0.8);
}

.letterboard .bulbs {
  /* A taller, invisible tap zone, and no double-tap zoom. */
  margin-top: calc(-1 * var(--b-3));
  padding: var(--b-3) 0 var(--b-4);
  border-bottom: 1px dashed rgba(233, 196, 106, 0.3);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
}

.bulbs span.is-played,
.bulbs.is-answering span {
  background: #FFFFFF;
  box-shadow: 0 0 10px 3px rgba(246, 222, 150, 0.95);
}

.bulbs span.is-played {
  transform: scale(1.7);
}

@media (prefers-reduced-motion: no-preference) {
  .bulbs span {
    animation: m-bulb 1.2s steps(1, end) infinite;
    transition: transform 160ms var(--b-ease);
  }

  .bulbs span:nth-child(even) {
    animation-delay: -600ms;
  }

  .bulbs span.is-played,
  .bulbs.is-answering span {
    animation: none;
  }
}

@keyframes m-bulb {
  0% { opacity: 1; }
  50% { opacity: 0.3; }
}

.board-list {
  margin: var(--b-2) 0 0;
  padding: 0;
  list-style: none;
}

.board-list li {
  display: flex;
  justify-content: space-between;
  gap: var(--b-4);
  padding: var(--b-2) 0;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.board-year {
  color: #E9C46A;
  font-variant-numeric: tabular-nums;
}

/* The rest of /films/ (films.js): a double feature, the Wall of Fame and film facts */
.film-kicker {
  color: var(--b-soft);
  font-size: var(--b-small);
  font-weight: 600;
}

.films-why {
  margin-top: var(--b-1);
  font-style: italic;
}

.film-poster {
  position: relative;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border-radius: var(--b-radius-s);
  background: var(--b-sunk);
}

.film-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.film-poster.is-typographic {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: var(--b-1);
  padding: 14% 10% 12%;
  background: radial-gradient(ellipse at 30% 0%, var(--tone-a), var(--tone-b) 70%);
  color: #F3EEE3;
}

.film-poster[data-tone="0"] { --tone-a: #1f3a7a; --tone-b: #0a1430; }
.film-poster[data-tone="1"] { --tone-a: #5a1f2e; --tone-b: #1a0a12; }
.film-poster[data-tone="2"] { --tone-a: #1d4a3f; --tone-b: #08181a; }
.film-poster[data-tone="3"] { --tone-a: #4a2a6a; --tone-b: #130b22; }
.film-poster[data-tone="4"] { --tone-a: #6a4a1a; --tone-b: #1a1208; }
.film-poster[data-tone="5"] { --tone-a: #1a4a6a; --tone-b: #08141e; }

.film-poster-rank {
  position: absolute;
  top: 8%;
  left: 10%;
  color: #E9C46A;
  font-size: var(--b-title);
  font-style: italic;
  font-weight: 650;
}

.film-poster-title {
  font-weight: 650;
  line-height: 1.1;
}

.film-poster-year {
  color: #B8B1A3;
  font-size: var(--b-small);
}

.film-title {
  margin-top: var(--b-1);
  font-size: var(--b-lead);
  line-height: 1.2;
}

.film-meta,
.film-rating {
  margin-top: var(--b-1);
  color: var(--b-soft);
  font-size: var(--b-small);
}

.film-stars {
  color: var(--b-honey-edge);
}

.film-line {
  margin-top: var(--b-2);
  font-style: italic;
}

.film-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--b-1);
  margin-top: var(--b-3);
}

.film-link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 var(--b-3);
  border: 1px solid var(--b-edge);
  border-radius: var(--b-radius-pill);
  color: var(--b-ink);
  font-size: var(--b-small);
  text-decoration: none;
}

.film-link:hover {
  background: var(--b-sunk);
}

.double-cards {
  display: grid;
  gap: var(--b-3);
  margin-top: var(--b-4);
}

.double-card {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: var(--b-4);
  align-items: start;
  padding: var(--b-3);
  border: 1px solid var(--b-line);
  border-radius: var(--b-radius-m);
  background: var(--b-surface);
}

.wall {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: var(--b-4);
  margin: var(--b-4) 0 0;
  padding: 0;
  list-style: none;
}

.wall-item {
  position: relative;
  perspective: 1000px;
}

.wall-front,
.wall-back {
  width: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.wall-front {
  position: relative;
  display: block;
  padding: 0;
  border: 0;
  border-radius: var(--b-radius-s);
  background: none;
  cursor: pointer;
  text-align: left;
}

.wall-rank {
  position: absolute;
  bottom: -10px;
  left: 10px;
  padding: 2px 10px;
  border-radius: var(--b-radius-pill);
  background: var(--b-ink);
  color: var(--b-page);
  font-size: var(--b-small);
  font-variant-numeric: tabular-nums;
}

.wall-back {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: var(--b-3);
  border: 1px solid var(--b-line);
  border-radius: var(--b-radius-s);
  background: var(--b-surface);
  transform: rotateY(180deg);
}

.wall-back .film-title {
  font-size: var(--b-body);
}

.wall-back .film-link {
  min-height: 30px;
  padding: 0 var(--b-2);
}

.wall-close {
  align-self: flex-start;
  min-height: 36px;
  margin-top: auto;
  padding: var(--b-2) 0 0;
  border: 0;
  background: none;
  color: var(--b-soft);
  cursor: pointer;
  font: inherit;
  font-size: var(--b-small);
}

.wall-item.is-turned .wall-front {
  transform: rotateY(-180deg);
}

.wall-item.is-turned .wall-back {
  transform: rotateY(0);
}

@media (prefers-reduced-motion: no-preference) {
  .wall-front,
  .wall-back {
    transition: transform 650ms var(--b-ease);
  }
}

@media (prefers-reduced-motion: reduce) {
  .wall-item.is-turned .wall-front {
    visibility: hidden;
  }
}

.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--b-4);
  margin: var(--b-4) 0 0;
  padding: 0;
  list-style: none;
}

.fact {
  display: grid;
  gap: var(--b-1);
  align-content: start;
  padding-top: var(--b-3);
  border-top: 1px solid var(--b-line);
}

.fact-value {
  font-size: var(--b-title);
  font-weight: 650;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.fact-text {
  color: var(--b-soft);
  font-size: var(--b-small);
}

/* ----- Fund the Boss: the QR code on a wide screen, the IBAN on a phone ----- */
.fund-qr-frame {
  width: 200px;
  padding: var(--b-3);
  border-radius: var(--b-radius-m);
  background: #FFFFFF;
  color: #000000;
}

.fund-qr-frame svg {
  display: block;
  width: 100%;
  height: auto;
}

.fund-iban {
  font-size: var(--b-title);
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  letter-spacing: 0.02em;
}

/* A phone pays with the IBAN; a wide screen can also scan the code. */
@media (max-width: 639px) {
  #fund-qr-block {
    display: none !important;
  }
}

/* ----- Backstage: one card per secret ----- */
.secrets-count {
  font-weight: 700;
}

.secrets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--b-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.secret-card {
  display: grid;
  gap: var(--b-2);
  align-content: start;
  min-height: 120px;
  padding: var(--b-4);
  border: 1px dashed var(--b-edge);
  border-radius: var(--b-radius-m);
}

.secret-card.is-found {
  border: 1px solid var(--b-honey-edge);
  background: var(--b-surface);
}

.secret-quote {
  font-size: var(--b-lead);
  font-style: italic;
  font-weight: 600;
  line-height: 1.3;
}

.secret-film,
.secret-label,
.secret-hint {
  color: var(--b-soft);
  font-size: var(--b-small);
}

.secret-label {
  font-weight: 700;
}

.secret-lock {
  color: var(--b-soft);
  font-size: var(--b-title);
  font-weight: 700;
}

/* ----- The seasons (season-boot.js sets html[data-season]; main.js draws) ----- */
.season-canvas {
  position: fixed;
  inset: 0;
  z-index: 45;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.season-special {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 46;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  filter: drop-shadow(0 0 8px rgba(246, 222, 150, 0.85));
}

.season-special svg {
  width: 26px;
  height: 26px;
}

.season-special.is-static {
  top: 22%;
  right: 6%;
  left: auto;
}

.season-egg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 36px;
  margin-left: 0.2em;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  vertical-align: middle;
}

.season-egg svg {
  width: 20px;
  height: 26px;
}
