/* The Learning Centre - landing page and category pages (built by tools/build_learning_centre.py). */

/* ---------- Hero: light photograph, so text sits on a cream wash, header stays solid ---------- */
.lc-hero {
  position: relative; overflow: hidden; background: var(--cream);
  padding: calc(var(--header-h) + clamp(40px, 6vw, 88px)) 0 clamp(56px, 7vw, 96px);
}
.lc-hero-bg { position: absolute; inset: 0; }
.lc-hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: 78% 60%; }
.lc-hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, var(--cream) 0%, rgba(247, 244, 237, 0.94) 34%, rgba(247, 244, 237, 0.35) 64%, rgba(247, 244, 237, 0) 82%);
}
.lc-hero-inner { position: relative; }
.lc-hero-inner > * { max-width: 620px; }
.lc-title {
  margin: 12px 0 0; font-family: var(--font-display); font-weight: 500;
  font-size: clamp(2.5rem, 5.2vw, 4.2rem); line-height: 1.04; letter-spacing: -0.01em; color: var(--ink);
}
.lc-motto {
  margin: 14px 0 0; font-family: var(--font-display); font-style: italic;
  font-size: clamp(1.2rem, 2.1vw, 1.55rem); color: var(--sage-dk);
}
.lc-lede {
  margin: 18px 0 0; max-width: 34em; font-family: var(--font-serif); font-weight: 300;
  font-size: 1.08rem; line-height: 1.75; color: var(--ink-2);
}
.lc-crumbs { display: flex; gap: 10px; align-items: center; margin-bottom: 18px; font-family: var(--font-ui); font-size: 0.82rem; color: var(--muted); }
.lc-crumbs a { color: var(--sage-dk); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Label colours (text tones chosen to pass AA on their tints) ---------- */
.lc-page { --lc-learn: #3e5042; --lc-learn-bg: rgba(111, 130, 109, 0.15);
           --lc-practice: #7d5835; --lc-practice-bg: rgba(169, 121, 78, 0.15);
           --lc-reflect: #465563; --lc-reflect-bg: rgba(82, 96, 109, 0.13); }

/* ---------- Landing ---------- */
.lc-section { padding-top: clamp(56px, 7vw, 96px); }
.lc-legend-heading {
  margin: 0 0 20px; text-align: center; font-family: var(--font-ui); font-size: 0.78rem;
  font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted);
}
.lc-legend { list-style: none; padding: 0; margin: 0 auto clamp(56px, 7vw, 88px); max-width: 940px;
             display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.lc-legend-item {
  display: flex; align-items: center; gap: 14px; padding: 18px 20px;
  background: var(--white); border: 1px solid var(--line-2); border-radius: var(--r-md);
  font-family: var(--font-ui); font-size: 0.9rem; color: var(--muted); line-height: 1.45;
}
.lc-legend-item strong { display: block; color: var(--ink); font-size: 1rem; }
.lc-legend-icon { flex: none; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; }
.lc-legend-icon svg { width: 20px; height: 20px; }
.lc-legend-item--learn .lc-legend-icon { background: var(--lc-learn-bg); color: var(--lc-learn); }
.lc-legend-item--practice .lc-legend-icon { background: var(--lc-practice-bg); color: var(--lc-practice); }
.lc-legend-item--reflect .lc-legend-icon { background: var(--lc-reflect-bg); color: var(--lc-reflect); }

.lc-cats-heading {
  margin: 0 0 32px; text-align: center; font-family: var(--font-display); font-weight: 500;
  font-size: clamp(2rem, 3.6vw, 2.9rem); line-height: 1.1;
}
.lc-cats { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; grid-template-columns: repeat(4, 1fr); }
.lc-cat {
  display: flex; flex-direction: column; height: 100%; padding: 26px 24px 20px;
  background: var(--white); border: 1px solid var(--line-2); border-radius: var(--r-lg);
  color: var(--ink); text-decoration: none;
  transition: transform 260ms var(--ease), box-shadow 260ms var(--ease), border-color 260ms var(--ease);
}
.lc-cat:hover { transform: translateY(-3px); box-shadow: 0 16px 34px rgba(27, 26, 23, 0.08); border-color: var(--sage-line); }
.lc-cat:focus-visible { outline: 2px solid var(--clay); outline-offset: 3px; }
.lc-cat-num { font-family: var(--font-ui); font-size: 0.74rem; font-weight: 700; letter-spacing: 0.16em; color: var(--lc-practice); }
.lc-cat-title { margin: 14px 0 8px; font-family: var(--font-display); font-size: 1.32rem; line-height: 1.2; }
.lc-cat-tag { flex: 1; font-family: var(--font-serif); font-weight: 300; font-size: 0.95rem; line-height: 1.6; color: var(--muted); }
.lc-cat-foot {
  display: flex; align-items: center; justify-content: space-between; margin-top: 22px; padding-top: 14px;
  border-top: 1px solid var(--line-2); font-family: var(--font-ui); font-size: 0.84rem; font-weight: 600; color: var(--sage-dk);
}
.lc-cat-foot svg { width: 18px; height: 18px; transition: transform 260ms var(--ease); }
.lc-cat:hover .lc-cat-foot svg { transform: translateX(3px); }

/* ---------- Category pages ---------- */
.lc-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 28px; }
.lc-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.lc-filters[hidden] { display: none; }
.lc-filters button {
  min-height: 40px; padding: 0 16px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: var(--white); color: var(--ink);
  font-family: var(--font-ui); font-size: 0.88rem; font-weight: 600;
  transition: background 200ms var(--ease-out), color 200ms var(--ease-out), border-color 200ms var(--ease-out);
}
.lc-filters button span { margin-left: 4px; color: var(--muted); font-weight: 500; }
.lc-filters button[aria-pressed="true"] { background: var(--sage-dk); border-color: var(--sage-dk); color: #fff; }
.lc-filters button[aria-pressed="true"] span { color: rgba(255, 255, 255, 0.78); }
.lc-filters button:focus-visible { outline: 2px solid var(--clay); outline-offset: 3px; }
.lc-count { margin: 0; font-family: var(--font-ui); font-size: 0.86rem; color: var(--muted); }

.lc-grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.lc-card {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--white); border: 1px solid var(--line-2); border-radius: var(--r-md);
}
.lc-card[hidden] { display: none; }
.lc-preview {
  aspect-ratio: 595 / 842; display: grid; place-items: center; overflow: hidden;
  background: var(--cream); border-bottom: 1px solid var(--line-2);
}
.lc-preview img { width: 100%; height: 100%; object-fit: cover; }
.lc-preview-empty {
  width: 72%; height: 78%; display: grid; place-items: center; text-align: center;
  border: 1px dashed rgba(62, 80, 66, 0.22); border-radius: 6px; background: rgba(255, 255, 255, 0.55);
  font-family: var(--font-ui); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted);
}
.lc-card-body { flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 16px 18px 18px; }
.lc-card-body h3 { flex: 1; margin: 0; font-family: var(--font-display); font-size: 1.08rem; font-weight: 500; line-height: 1.3; }
.lc-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 8px; border-radius: 999px;
  font-family: var(--font-ui); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
}
.lc-chip svg { width: 14px; height: 14px; }
.lc-chip--learn { background: var(--lc-learn-bg); color: var(--lc-learn); }
.lc-chip--practice { background: var(--lc-practice-bg); color: var(--lc-practice); }
.lc-chip--reflect { background: var(--lc-reflect-bg); color: var(--lc-reflect); }
.lc-download {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px;
  border-radius: 999px; background: var(--sage-dk); color: #fff; text-decoration: none;
  font-family: var(--font-ui); font-size: 0.88rem; font-weight: 600; transition: background 200ms var(--ease-out);
}
a.lc-download:hover { background: var(--sage-deep); }
a.lc-download:focus-visible { outline: 2px solid var(--clay); outline-offset: 3px; }
.lc-download.is-soon { background: transparent; color: var(--muted); border: 1px dashed var(--line); cursor: default; }
.lc-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.lc-pager { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; margin-top: 56px;
            padding-top: 28px; border-top: 1px solid var(--line-2); font-family: var(--font-ui); }
.lc-pager a { color: var(--ink); text-decoration: none; font-weight: 600; }
.lc-pager a span { display: block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.lc-pager a:hover { color: var(--sage-dk); }
.lc-next { grid-column: 3; text-align: right; }
.lc-prev { grid-column: 1; }
.lc-all { grid-column: 2; padding: 10px 18px; border: 1px solid var(--line); border-radius: 999px; font-size: 0.88rem; }

.lc-note-wrap { background: var(--paper); padding: 0 var(--gutter) clamp(64px, 8vw, 104px); }
.lc-note {
  max-width: 760px; margin: 0 auto; padding: 14px 20px; border-left: 3px solid var(--clay-soft);
  font-family: var(--font-serif); font-style: italic; font-weight: 300; font-size: 0.92rem; line-height: 1.7; color: var(--muted);
}
.lc-note a { color: var(--sage-dk); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) { .lc-cats { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 760px) {
  .lc-hero-bg img { object-position: 82% 50%; }
  .lc-hero-bg::after { background: linear-gradient(180deg, rgba(247, 244, 237, 0.96) 0%, rgba(247, 244, 237, 0.9) 60%, rgba(247, 244, 237, 0.7) 100%); }
  .lc-legend { grid-template-columns: 1fr; }
  .lc-filters button { min-height: 44px; }
  .lc-pager { grid-template-columns: 1fr 1fr; }
  .lc-all { grid-column: 1 / -1; grid-row: 2; justify-self: center; }
}
@media (max-width: 560px) { .lc-cats { grid-template-columns: 1fr; } .lc-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; } }
@media (prefers-reduced-motion: reduce) {
  .lc-cat, .lc-cat-foot svg, .lc-filters button, .lc-download { transition: none; }
  .lc-cat:hover { transform: none; }
}
