/* ═══════════════════════════════════════════════════════════════
   01 — Agenda. Full-bleed, dark, three themes on stage.
   The metrics footer is gone: it competed with the themes for the
   one thing this page has to do — get the room into a theme.
   ═══════════════════════════════════════════════════════════════ */

.ag {
  position: relative; z-index: 2; align-items: stretch;
  min-height: calc(100vh - var(--headerH));
  display: flex; flex-direction: column;
  padding: clamp(24px, 4vh, 54px) var(--gutter) clamp(18px, 2.6vh, 32px);
  gap: clamp(18px, 2.6vh, 34px);
}

.ag__head { text-align: left; max-width: var(--measure); margin: 0 auto; width: 100%; }
.ag__kicker {
  font-size: var(--t-050); font-weight: 700;
  letter-spacing: var(--tr-wide); text-transform: uppercase;
  color: var(--step-deploy); margin-bottom: 12px;
}
.ag__h {
  font-family: var(--font-serif); font-weight: 400;
  font-size: clamp(38px, 6.4vw, 104px); line-height: .98;
  letter-spacing: -.022em; margin: 0;
}

/* ── The three themes ────────────────────────────────────────── */

.ag__themes {
  flex: 1; min-height: 0;
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(10px, 1.1vw, 20px);
}

.ag-theme {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; flex-direction: column; justify-content: flex-end;
  min-height: clamp(260px, 40vh, 520px);
  background: var(--base-raise); border: 1px solid var(--line);
  border-radius: 14px; padding: 0; text-align: left;
  transition: border-color var(--d-ui) var(--ease),
              transform var(--d-ui) var(--ease);
}
.ag-theme:hover { border-color: var(--tone); transform: translateY(-4px); }

.ag-theme--1 { --tone: var(--step-deploy); }
.ag-theme--2 { --tone: var(--step-invent); }
.ag-theme--3 { --tone: var(--step-reshape); }

.ag-theme__img { position: absolute; inset: 0; z-index: 0; }
.ag-theme__img img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  filter: grayscale(.55) brightness(.34) contrast(1.05);
  transform: scale(1.03);
  transition: transform .9s var(--ease), filter .6s var(--ease);
}
.ag-theme:hover .ag-theme__img img {
  transform: scale(1.09); filter: grayscale(.25) brightness(.46);
}

/* Animated gradient wash, tinted per theme. Slow enough to read as
   light moving across a surface rather than a loading state. */
.ag-theme__grad {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(160deg,
    color-mix(in srgb, var(--tone) 34%, transparent) 0%,
    transparent 42%,
    var(--scrim-mid) 72%,
    var(--scrim-bot) 100%);
  background-size: 180% 180%;
  animation: agDrift 18s ease-in-out infinite alternate;
  animation-delay: calc(var(--i) * -6s);
}
@keyframes agDrift {
  from { background-position: 0% 0%; }
  to   { background-position: 100% 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .ag-theme__grad { animation: none; }
}

.ag-theme__body {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; gap: 10px;
  padding: clamp(18px, 2.4vh, 30px) clamp(16px, 1.6vw, 28px) clamp(20px, 2.8vh, 34px);
}
.ag-theme__n {
  font-family: var(--font-display); font-size: var(--t-100);
  font-weight: 800; letter-spacing: var(--tr-wide);
  color: var(--tone); font-variant-numeric: tabular-nums;
}
.ag-theme__name {
  font-family: var(--font-serif); font-weight: 400;
  font-size: clamp(20px, 2.1vw, 34px); line-height: 1.1;
  letter-spacing: -.014em; color: var(--ink); max-width: 13ch;
}
.ag-theme__amb {
  font-size: var(--t-200); color: var(--stone);
  max-width: 28ch; line-height: 1.45;
  padding-top: 10px; border-top: 1px solid var(--line-firm);
}
.ag-theme__go {
  margin-top: 4px; font-size: var(--t-050); font-weight: 700;
  letter-spacing: var(--tr-wide); text-transform: uppercase;
  color: var(--tone);
  display: inline-flex; align-items: center; gap: 8px;
}
.ag-theme__go::after { content: "→"; transition: transform var(--d-ui) var(--ease); }
.ag-theme:hover .ag-theme__go::after { transform: translateX(6px); }

/* ── Bookend rail ────────────────────────────────────────────── */

.ag__rail { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(10px, 1.1vw, 20px); }
.ag-rail {
  display: grid; grid-template-columns: auto 1fr auto;
  align-items: center; gap: 16px;
  padding: clamp(12px, 1.6vh, 18px) clamp(14px, 1.4vw, 22px);
  background: none; border: 1px solid var(--line); border-radius: 10px;
  text-align: left; color: var(--ink);
  transition: background var(--d-micro) var(--ease),
              border-color var(--d-micro) var(--ease);
}
.ag-rail:hover { background: var(--ink-03); border-color: var(--line-firm); }
.ag-rail__n {
  font-family: var(--font-display); font-size: var(--t-100);
  font-weight: 800; letter-spacing: var(--tr-wide); color: var(--stone);
  font-variant-numeric: tabular-nums;
}
.ag-rail__t { font-size: var(--t-300); font-weight: 600; }
.ag-rail__s { display: none; }
.ag-rail__go { color: var(--stone); transition: transform var(--d-ui) var(--ease); }
.ag-rail:hover .ag-rail__go { transform: translateX(5px); color: var(--ink); }

@media (max-width: 1100px) {
  .ag__themes { grid-template-columns: 1fr; }
  .ag__rail { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════════
   AGENDA — refinement pass
   Image fades OUT at the top into the page ground and the colour
   gradient rises from the BOTTOM, so type sits on solid tone rather
   than on photograph. Subtext removed; sizes up.
   ═══════════════════════════════════════════════════════════════ */

.ag-theme {
  border: 0; border-radius: 16px;
  background: var(--base-raise);
  box-shadow: var(--card-lift);
}
.ag-theme:hover { transform: translateY(-5px); }

/* Photograph occupies the TOP and dissolves downward into the card.
   These stills are pale (mean luminance ~136), so ONLY the bottom edge
   is masked — fading the top as well erased them entirely against a
   light page. Contrast lifted so the architecture actually reads. */
.ag-theme__img { inset: 0 0 auto 0; height: 64%; }
.ag-theme__img img {
  filter: contrast(1.14) saturate(.9) brightness(.96);
  mask-image: linear-gradient(180deg, var(--mask-on) 0%, var(--mask-on) 56%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, var(--mask-on) 0%, var(--mask-on) 56%, transparent 100%);
}
.ag-theme:hover .ag-theme__img img { filter: contrast(1.16) saturate(1) brightness(1.02); }

/* Colour rises from the bottom — text always lands on tone. */
.ag-theme__grad {
  background: linear-gradient(0deg,
    color-mix(in srgb, var(--tone) 26%, var(--base-raise)) 0%,
    color-mix(in srgb, var(--tone) 12%, var(--base-raise)) 34%,
    transparent 66%);
  background-size: 100% 190%;
  animation: agDrift 20s ease-in-out infinite alternate;
  animation-delay: calc(var(--i) * -7s);
}
@keyframes agDrift {
  from { background-position: 0 100%; }
  to   { background-position: 0 40%; }
}

.ag-theme__body {
  justify-content: flex-end; flex: 1;
  padding: clamp(24px, 3.2vh, 40px) clamp(20px, 1.9vw, 32px) clamp(26px, 3.4vh, 42px);
  gap: 14px;
}
.ag-theme__n {
  font-size: var(--t-300); letter-spacing: var(--tr-wide);
  color: var(--tone);
}
.ag-theme__name {
  font-size: clamp(24px, 2.5vw, 40px); line-height: 1.08;
  max-width: 14ch; color: var(--ink);
}
.ag-theme__go { margin-top: 2px; font-size: var(--t-100); }

.ag__h { font-size: clamp(44px, 7vw, 116px); }
.ag__kicker { font-size: var(--t-100); }

/* ── Nested themes under 02 ──────────────────────────────────── */
.ag-sub {
  display: flex; flex-direction: column; gap: 2px;
  margin-top: 6px; padding-top: 14px; border-top: 1px solid var(--line-firm);
}
.ag-sub__i {
  display: flex; align-items: center; gap: 11px;
  padding: 8px 0; font-size: var(--t-300); font-weight: 600;
  color: var(--ink); line-height: 1.3;
  transition: padding-left var(--d-ui) var(--ease);
}
.ag-sub__i:hover { padding-left: 6px; }
.ag-sub__d {
  width: 8px; height: 8px; border-radius: 50%; flex: none;
  background: var(--tone);
}
.ag-theme--1 { --tone: var(--step-deploy); }
.ag-theme--2 { --tone: var(--step-invent); }
.ag-theme--3 { --tone: var(--step-reshape); }
/* Card 02 carries three themes, so it needs more room for type. */
.ag-theme--2 .ag-theme__img { height: 46%; }

/* Card 03's still (water over pale stone) is the lowest-contrast of
   the three and disappeared at the shared setting. Treated per-card
   rather than pushing the other two too hard. */
.ag-theme--3 .ag-theme__img img { filter: contrast(1.34) saturate(.95) brightness(.88); }
.ag-theme--3:hover .ag-theme__img img { filter: contrast(1.4) saturate(1.05) brightness(.93); }

/* Match section 02's measure and left alignment. */
.ag__themes { max-width: var(--measure); margin: 0 auto; width: 100%; }
.ag__h { max-width: 16ch; }


/* ── One anchor line for all three cards.
   Bottom-aligning the body made every card's title depend on how much
   sat beneath it, so 02 (three nested themes, three-line title) never
   matched 01 and 03. Anchoring the body at a FIXED offset from the top
   puts numeral and title on one line and lets 02 simply run longer. ── */
.ag-theme {
  display: block;
  position: relative;
  min-height: clamp(420px, 60vh, 640px);
}
.ag-theme__img { position: absolute; inset: 0 0 auto 0; height: 46%; z-index: 0; }
.ag-theme__body {
  position: absolute; inset: auto 0 0 0;
  top: 46%;
  display: flex; flex-direction: column; gap: 12px;
  padding: clamp(22px, 2.8vh, 34px) clamp(20px, 1.9vw, 32px) clamp(24px, 3vh, 36px);
  justify-content: flex-start;
}
.ag-theme__name { min-height: 0; }
.ag-sub { margin-top: auto; }

/* The rule between the theme heading and its three sub-items added a
   division the card did not need — spacing already separates them. */
.ag-sub { border-top: 0; padding-top: 4px; }

/* ── Scale-up, 23 Sep ─────────────────────────────────────────
   The agenda opens the session on a large screen with a room
   reading from the back, and it was typeset for a laptop. The
   chrome diet (topbar.css --headerH) freed the height to pay for
   this, so it is a redistribution rather than a squeeze. */
.ag-item__t   { font-size: clamp(23px, 2.45vw, 40px); }
.ag-item__d   { font-size: var(--t-300); }
.ag-item__n   { font-size: var(--t-100); }
.ag-rail__t   { font-size: clamp(17px, 1.35vw, 22px); }
.ag-theme__t  { font-size: clamp(27px, 2.9vw, 46px); }
.ag-theme__go { font-size: var(--t-200); }
.ag__kicker   { font-size: var(--t-200); }
