/* Trainings — index + individual training pages.
   Relies on /styles.css for the design tokens, body, buttons, nav and footer. */

/* ---------- Shared hero ---------- */
.tr-hero { padding: 56px 0 28px; text-align: center; }
.tr-eyebrow { color: var(--mauve); font-size: 13px; text-transform: uppercase; letter-spacing: .18em; font-weight: 800; margin: 0 0 18px; }
.tr-hero h1 { font-size: clamp(38px, 5.4vw, 68px); margin: 0 auto 16px; max-width: 22ch; letter-spacing: -.045em; line-height: 1; }
.tr-lead { font-size: clamp(17px, 2vw, 20px); color: var(--soft-ink); max-width: 60ch; margin: 0 auto; line-height: 1.6; }

/* The training's own logo, sitting in place of a text headline. */
.tr-logo { max-width: min(420px, 76vw); margin: 0 auto 22px; }
/* On Unlimited the logo IS the h1, which makes `.tr-hero h1` above win on
   specificity — and its `max-width: 22ch` resolves off the huge heading
   font-size, so the logo rendered ~20% wider there than on [re]storied, and
   at a different width per viewport. Pin it, and drop the inherited text
   metrics it has no use for. */
.tr-hero .tr-logo { max-width: min(420px, 76vw); font-size: 0; line-height: 0; }
.tr-logo img { width: 100%; height: auto; }

/* ---------- Index cards ---------- */
.tr-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; max-width: 900px; margin: 8px auto 0; }
.tr-card {
  display: flex; flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 28px 26px;
  box-shadow: 0 12px 34px rgba(40, 34, 28, .06);
  position: relative; overflow: hidden;
  transition: transform .14s ease, box-shadow .2s ease;
}
a.tr-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.tr-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 5px; background: var(--accent, var(--green)); opacity: .75; }
.tr-card .tr-card-logo { height: 52px; margin-bottom: 18px; display: flex; align-items: center; }
.tr-card .tr-card-logo img { max-height: 52px; width: auto; }
.tr-card h2 { font-size: 26px; margin: 0 0 10px; letter-spacing: -.035em; }
.tr-card p { color: var(--muted); font-size: 15px; line-height: 1.55; margin: 0 0 18px; }
.tr-card .more { margin-top: auto; font-weight: 700; font-size: 14px; color: var(--accent, var(--green)); }

/* Sub-title under a training's name (its own strapline). */
.tr-tagline { font-family: var(--serif); font-style: italic; font-size: clamp(19px, 2.4vw, 26px); color: var(--green); margin: 0 auto 20px; max-width: 30ch; line-height: 1.2; }

/* "From the last one" caveat above a schedule we can't promise verbatim. */
.tr-note { color: var(--muted); font-size: 14px; font-style: italic; margin: -6px 0 18px; }

/* Time-stamped running order. */
.tr-schedule { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.tr-schedule li {
  display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 14px;
  align-items: baseline; padding: 9px 0; border-bottom: 1px solid var(--line);
  color: var(--soft-ink); font-size: 16px;
}
.tr-schedule li:last-child { border-bottom: 0; }
.tr-schedule .t { font-size: 12.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--mauve); }
.tr-schedule em { color: var(--muted); font-style: normal; font-size: 14px; }

/* ---------- Scheduling status ---------- */
/* No dates on the calendar yet. Says so plainly rather than showing an empty
   "Upcoming" heading, and gives people a way to be told when there is one. */
.tr-dates {
  max-width: 620px; margin: 30px auto 0;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px 24px;
  text-align: center;
}
.tr-dates h2 { font-size: 21px; margin: 0 0 8px; letter-spacing: -.02em; }
.tr-dates p { color: var(--muted); font-size: 15px; line-height: 1.55; margin: 0 auto; max-width: 46ch; }
.tr-dates .button { margin-top: 18px; }
.tr-dates a.inline { color: var(--green); font-weight: 700; }

/* ---------- Facts block (dates / tuition / certification) ---------- */
/* For a training that IS on the calendar — the counterpart to .tr-dates. */
.tr-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; max-width: 900px; margin: 30px auto 0; }
.tr-fact {
  background: rgba(255, 255, 255, .82);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 24px 22px;
  text-align: left;
}
.tr-fact h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .14em; font-weight: 800; color: var(--mauve); margin: 0 0 14px; font-family: var(--sans); }
.tr-fact .big { font-family: var(--serif); font-size: 27px; letter-spacing: -.03em; line-height: 1.05; color: var(--ink); margin: 0 0 6px; }
.tr-fact p { color: var(--soft-ink); font-size: 15px; line-height: 1.5; margin: 0 0 8px; }
.tr-fact p:last-child { margin-bottom: 0; }
.tr-fact .sub { color: var(--muted); font-size: 13.5px; }
.tr-fact .weekend { display: block; margin-bottom: 10px; }
.tr-fact .weekend span { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; color: var(--muted); }
.tr-fact .weekend b { font-family: var(--serif); font-weight: 500; font-size: 19px; letter-spacing: -.02em; }

.tr-cta { text-align: center; margin: 32px auto 0; }
.tr-cta .note { color: var(--muted); font-size: 13.5px; margin: 12px auto 0; max-width: 46ch; }

/* "What sets us apart" — headed blocks rather than bare bullets. */
.tr-apart { display: grid; gap: 14px; }
.tr-apart article { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 20px 22px; }
.tr-apart h3 { margin: 0 0 8px; font-size: 20px; }
.tr-apart p { margin: 0; font-size: 16px; }

/* ---------- Body sections ---------- */
.tr-section { padding: 44px 0; }
.tr-section + .tr-section { border-top: 1px solid var(--line); }
.tr-section.wrap { width: min(700px, calc(100% - 40px)); }
.tr-section h2 { font-size: clamp(27px, 3.6vw, 40px); margin: 0 0 18px; letter-spacing: -.038em; }
.tr-section h3 { font-size: 20px; margin: 26px 0 8px; letter-spacing: -.02em; }
.tr-section p { color: var(--soft-ink); font-size: 16.5px; line-height: 1.65; margin: 0 0 16px; }

/* Day-by-day breakdown */
.tr-day { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 22px 24px; margin-bottom: 14px; }
.tr-day .when { display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--mauve); margin-bottom: 10px; }
.tr-day h3 { margin: 0 0 10px; font-size: 22px; }
.tr-day p:last-child { margin-bottom: 0; }

/* Simple feature list (what's included) */
.tr-includes { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.tr-includes li { position: relative; padding-left: 26px; color: var(--soft-ink); font-size: 16px; line-height: 1.5; }
.tr-includes li::before {
  content: ""; position: absolute; left: 5px; top: .55em;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent, var(--green)); opacity: .8;
}

/* Callout for "bring this to your community" */
.tr-callout {
  background: linear-gradient(110deg, rgba(75, 124, 155, .1), rgba(77, 116, 75, .09) 50%, rgba(143, 99, 132, .1));
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 24px 26px;
  text-align: center;
}
.tr-callout p { margin: 0 auto; max-width: 50ch; color: var(--soft-ink); }
.tr-callout a { color: var(--green); font-weight: 700; }

/* ---------- Team ---------- */
.tr-team-wrap { background: var(--paper-2); }
.tr-team-wrap h2 { text-align: center; margin-bottom: 28px; }
.tr-team { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; max-width: 940px; margin: 0 auto; }
/* With bios the cards get tall, so drop to two-up for readability. */
.tr-team.has-bios { grid-template-columns: repeat(2, 1fr); max-width: 820px; }
/* Odd count leaves a straggler — centre it instead of stranding it left. */
.tr-team.has-bios > .tr-person:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  justify-self: center;
  width: calc(50% - 8px);
}
.tr-person {
  background: rgba(255, 255, 255, .82);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 24px 20px;
  text-align: center;
}
.tr-person img {
  width: 96px; height: 96px; border-radius: 50%;
  object-fit: cover; margin: 0 auto 14px;
  border: 3px solid #fff;
  box-shadow: 0 8px 20px rgba(40, 34, 28, .12);
}
.tr-person h3 { font-size: 20px; margin: 0 0 4px; letter-spacing: -.025em; }
.tr-person .role { color: var(--mauve); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; margin: 0 0 10px; line-height: 1.4; }
.tr-person .bio { color: var(--muted); font-size: 14.5px; line-height: 1.55; margin: 0; text-align: left; }
.tr-team:not(.has-bios) .tr-person .role { margin-bottom: 0; }

@media (max-width: 900px) {
  .tr-team { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .tr-list { grid-template-columns: 1fr; }
  .tr-team, .tr-team.has-bios { grid-template-columns: 1fr; max-width: 380px; }
}
