/* The Examples page (src/components/pages/Examples.astro). */

/* the table of contents under the hero: the four examples with whom each is for, then the other two sections */
.ex-toc { margin-top: 28px; max-width: 900px; }
.ex-toc ol { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ex-toc li a {
  display: grid;
  gap: 2px;
  height: 100%;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  text-decoration: none;
}
.ex-toc li a:hover { border-color: var(--sky); }
.ex-toc-no { font-family: 'JetBrains Mono', 'Courier New', monospace; font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--sky-deep); }
.ex-toc-title { color: var(--ink); font-weight: 600; font-size: 0.98rem; line-height: 1.35; }
.ex-toc-who { color: var(--ink-soft); font-size: 0.88rem; line-height: 1.35; }
.ex-toc-more { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 14px; }
.ex-toc-more a { color: var(--sky-deep); font-size: 0.95rem; }
@media (max-width: 640px) { .ex-toc ol { grid-template-columns: 1fr; } }

/* the film's own clock stands in the bottom right corner of the picture */
.ex-walk-film .video-badge { top: 14px; bottom: auto; }

/* one example */
.ex-head { max-width: 780px; margin-bottom: 36px; }
.ex-head .s-badge { display: inline-block; margin-bottom: 14px; }
.ex-head h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); margin-bottom: 12px; overflow-wrap: break-word; }
.ex-who { color: var(--sky-deep); font-weight: 600; font-size: 1rem; margin-bottom: 10px; }
.ex-summary { color: var(--ink-soft); font-size: 1.08rem; line-height: 1.62; }

/* the picture at the top of an example: the film, the PDF sheet */
.ex-lead { display: block; max-width: 900px; margin: 0 0 44px; }
.ex-film figcaption { padding: 10px 4px 0; font-size: 0.9rem; color: var(--ink-faded); }
.ex-film video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: 20px; background: #0a2c3d; box-shadow: var(--shadow-lift); }
.ex-pdf { max-width: 720px; }
.ex-pdf img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow-lift);
}

/* the steps: number and heading, then the part of the screenshot the step speaks about, then the text; on a wide
   screen the heading and the text on the left, the picture on the right */
.ex-steps { list-style: none; display: grid; gap: 44px; }
.ex-step {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.4fr);
  grid-template-areas: "head shot" "text shot";
  grid-template-rows: auto 1fr;
  column-gap: 40px;
  align-items: start;
}
.ex-step-head { grid-area: head; }
.ex-shot-wrap { grid-area: shot; }
.ex-step-p { grid-area: text; color: var(--ink-soft); font-size: 1rem; line-height: 1.6; overflow-wrap: break-word; }
.ex-step-p a { color: var(--sky-deep); }
.ex-step-head .s-num { display: block; font-family: 'Lora', Georgia, serif; font-style: italic; font-size: 2.2rem; color: var(--sky-deep); line-height: 1; margin-bottom: 10px; }
.ex-step-head h3 { font-family: 'IBM Plex Sans', sans-serif; font-weight: 700; font-size: 1.2rem; letter-spacing: -0.018em; color: var(--ink); margin-bottom: 8px; }
.ex-shot { display: block; text-decoration: none; padding: 8px; }
.ex-crop { display: block; position: relative; overflow: hidden; border-radius: 10px; background: #f4f7f9; }
.ex-crop img { position: absolute; display: block; max-width: none; height: auto; }
.ex-crop.ex-fade { -webkit-mask-image: linear-gradient(to right, #000 86%, transparent); mask-image: linear-gradient(to right, #000 86%, transparent); }
.ex-panel-note { margin-top: 8px; font-size: 0.86rem; color: var(--ink-soft); }
.ex-full { display: inline-block; margin-top: 8px; font-size: 0.86rem; color: var(--ink-faded); }
.ex-full:hover { color: var(--sky-deep); }

/* what the reader gains, the files, the links on */
.ex-end { margin-top: 44px; max-width: 780px; }
.ex-gain {
  border-left: 4px solid var(--sky);
  background: var(--sky-mist);
  border-radius: 0 16px 16px 0;
  padding: 18px 22px;
}
.ex-gain strong { display: block; font-family: 'JetBrains Mono', 'Courier New', monospace; font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--sky-deep); margin-bottom: 6px; }
.ex-gain p { color: var(--ink); font-size: 1.08rem; line-height: 1.55; font-weight: 600; }
.ex-gain .ex-more { margin-top: 8px; font-weight: 400; font-size: 0.98rem; color: var(--ink-soft); }
.ex-gain a { color: var(--sky-deep); font-weight: 600; }
.ex-pkg { margin-top: 14px; color: var(--ink-soft); font-size: 0.95rem; line-height: 1.5; }
.ex-pkg strong { color: var(--ink); font-weight: 600; }
.ex-links { margin-top: 22px; }

/* on the machine */
.ex-machine { background: var(--ink); color: #e9f3f7; }
.ex-machine .s-head h2, .ex-machine .section-label { color: #fff; }
.ex-machine .s-head h2 em { color: var(--sky); }
.ex-machine-list { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.ex-machine-list li {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  padding: 22px;
  font-size: 0.98rem;
  line-height: 1.6;
  color: #d6e6ee;
  overflow-wrap: break-word;
}
.ex-machine .btn-secondary { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.4); }
.ex-machine .btn-secondary:hover { border-color: #fff; }

@media (max-width: 900px) {
  .ex-machine-list { grid-template-columns: 1fr; }
  .ex-step { grid-template-columns: 1fr; grid-template-areas: "head" "shot" "text"; grid-template-rows: auto; row-gap: 12px; }
  .ex-step-head h3 { margin-bottom: 0; }
  .ex-steps { gap: 40px; }
}
@media (max-width: 540px) {
  .ex-lead { margin-bottom: 32px; }
}
