/*
Theme Name: MIT Collegiate
Theme URI: https://meatindustrytraining.au
Author: Zendaita
Author URI: https://www.zendaita.com
Description: Bespoke theme for Meat Industry Training (MIT) — an Australian RTO for the meat processing and inspection sectors. Editorial authority, Swiss-grid discipline, collegiate slab voice. Built to the Zendaita Design System v2.
Version: 1.2.0
Requires at least: 6.5
Tested up to: 7.0
Requires PHP: 8.1
License: Proprietary — Zendaita
Text Domain: mit
*/

/* ============================================================= TOKENS */
:root {
  --bg: #FBFAF8;
  --surface: #FFFFFF;
  --surface-2: #F3F0EA;
  --ink: #0A0A0A;
  --ink-soft: #37373A;
  --muted: #6B6B70;
  --red: #CA0711;
  --red-deep: #9E040D;
  --line: rgba(10, 10, 10, 0.10);
  --line-strong: rgba(10, 10, 10, 0.18);
  --shadow-card: 0 18px 40px -24px rgba(10, 10, 10, 0.28);
  --shadow-crest: 0 30px 80px -40px rgba(158, 4, 13, 0.30);
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --container: 1200px;
  --gutter: clamp(1.25rem, 5vw, 3rem);
  --radius-btn: 4px;
  --radius-card: 6px;
  --radius-plate: 14px;
  --font-display: "Zilla Slab", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0C0C0D;
    --surface: #141416;
    --surface-2: #1B1B1F;
    --ink: #F4F1EC;
    --ink-soft: #CBC8C2;
    --muted: #9A9A9F;
    --red: #F03340;
    --red-deep: #C50A16;
    --line: rgba(255, 255, 255, 0.10);
    --line-strong: rgba(255, 255, 255, 0.18);
    --shadow-card: 0 18px 44px -22px rgba(0, 0, 0, 0.7);
    --shadow-crest: 0 30px 90px -40px rgba(240, 51, 64, 0.28);
  }
}
[data-theme="dark"] {
  --bg: #0C0C0D;
  --surface: #141416;
  --surface-2: #1B1B1F;
  --ink: #F4F1EC;
  --ink-soft: #CBC8C2;
  --muted: #9A9A9F;
  --red: #F03340;
  --red-deep: #C50A16;
  --line: rgba(255, 255, 255, 0.10);
  --line-strong: rgba(255, 255, 255, 0.18);
  --shadow-card: 0 18px 44px -22px rgba(0, 0, 0, 0.7);
  --shadow-crest: 0 30px 90px -40px rgba(240, 51, 64, 0.28);
}

/* ============================================================= RESET */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; margin: 0; color: var(--ink); }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

/* ============================================================= LAYOUT */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(4.5rem, 9vw, 8rem); position: relative; scroll-margin-top: 84px; }
.section--tight { padding-block: clamp(3.5rem, 6vw, 5.5rem); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 0.75rem;
  font-size: 0.82rem; font-weight: 600; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--red); margin-bottom: 1.1rem;
}
.eyebrow::before { content: ""; width: 34px; height: 3px; background: var(--red); display: inline-block; }
.section__head { max-width: 720px; margin-bottom: clamp(2.5rem, 5vw, 3.5rem); }
.section__head h2 { font-size: clamp(2rem, 3.6vw, 3.1rem); line-height: 1.05; letter-spacing: -0.01em; }
.section__head p { margin-top: 1.1rem; color: var(--muted); font-size: clamp(1.02rem, 1.4vw, 1.18rem); }

/* ============================================================= BUTTONS */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  padding: 0.9rem 1.6rem; border-radius: var(--radius-btn); font-weight: 600; font-size: 0.98rem;
  border: 1.5px solid transparent; transition: all 0.25s var(--ease); line-height: 1; min-height: 48px;
}
.btn--primary { background: var(--red); color: #fff; border-color: var(--red); }
.btn--primary:hover { background: var(--red-deep); border-color: var(--red-deep); transform: translateY(-2px); box-shadow: 0 12px 24px -12px rgba(158, 4, 13, 0.55); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn--ghost:hover { border-color: var(--red); color: var(--red); transform: translateY(-2px); }
.btn--ondark { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.35); }
.btn--ondark:hover { border-color: var(--red); background: var(--red); }
.btn .arrow { transition: transform 0.25s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

.link-underline { position: relative; color: var(--ink); font-weight: 600; padding-bottom: 2px; }
.link-underline::after { content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 2px; background: var(--red); transform: scaleX(0); transform-origin: left; transition: transform 0.3s var(--ease); }
.link-underline:hover::after { transform: scaleX(1); }

/* ============================================================= HEADER */
.site-header {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 100;
  transition: background 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
.header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; height: 76px; }
.brand { display: flex; align-items: center; gap: 0.7rem; }
.brand img { height: 46px; width: auto; }
.brand__text { display: flex; flex-direction: column; line-height: 1; }
.brand__text b { font-family: var(--font-display); font-weight: 700; font-size: 1.02rem; letter-spacing: -0.01em; white-space: nowrap; }
.brand__text span { white-space: nowrap; }
.brand__text span { font-size: 0.82rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }

.nav { display: flex; align-items: center; gap: 2rem; }
.nav a.nav__link { font-size: 0.95rem; font-weight: 500; color: var(--ink-soft); position: relative; white-space: nowrap; }
.nav a.nav__link::after { content: ""; position: absolute; left: 0; bottom: -6px; width: 100%; height: 2px; background: var(--red); transform: scaleX(0); transform-origin: left; transition: transform 0.28s var(--ease); }
.nav a.nav__link:hover::after { transform: scaleX(1); }
.header__actions { display: flex; align-items: center; gap: 0.9rem; }

.student-login {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.62rem 1rem; border: 1.5px solid var(--line-strong); border-radius: var(--radius-btn);
  font-size: 0.9rem; font-weight: 600; color: var(--ink-soft); transition: all 0.25s var(--ease); position: relative; white-space: nowrap;
}
.student-login:hover { border-color: var(--red); color: var(--red); }
.student-login .soon {
  font-size: 0.6rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  background: var(--surface-2); color: var(--muted); padding: 2px 6px; border-radius: 3px;
}
.student-login__hint {
  position: absolute; top: calc(100% + 10px); right: 0; white-space: nowrap;
  background: var(--ink); color: var(--bg); font-size: 0.82rem; font-weight: 500; letter-spacing: 0;
  padding: 0.5rem 0.75rem; border-radius: 5px; opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: all 0.25s var(--ease); pointer-events: none; box-shadow: var(--shadow-card);
}
.student-login:hover .student-login__hint, .student-login:focus-visible .student-login__hint { opacity: 1; visibility: visible; transform: translateY(0); }

.nav-toggle { display: none; flex-direction: column; gap: 5px; width: 44px; height: 44px; align-items: center; justify-content: center; background: transparent; border: 1px solid var(--line-strong); border-radius: var(--radius-btn); }
.nav-toggle span { width: 20px; height: 2px; background: var(--ink); transition: all 0.3s var(--ease); }

/* ============================================================= HERO */
.hero { position: relative; padding-top: 150px; padding-bottom: clamp(4rem, 8vw, 7rem); overflow: hidden; }
.hero__grid-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: 0.5; }
.hero__grid-bg::before {
  content: ""; position: absolute; inset: -2px;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 70% 20%, #000 0%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 70% 20%, #000 0%, transparent 75%);
}
.hero__inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.hero__eyebrow { display: inline-flex; align-items: center; gap: 0.75rem; font-size: 0.83rem; font-weight: 600; letter-spacing: 0.15em; text-transform: uppercase; color: var(--red); margin-bottom: 1.4rem; }
.hero__eyebrow::before { content: ""; width: 34px; height: 3px; background: var(--red); }
.hero h1 { font-size: clamp(2.6rem, 6vw, 5rem); line-height: 1.02; letter-spacing: -0.015em; }
.hero h1 .accent { color: var(--red); }
.hero__lead { margin-top: 1.6rem; font-size: clamp(1.05rem, 1.6vw, 1.3rem); line-height: 1.6; color: var(--ink-soft); max-width: 40ch; }
.hero__cta { margin-top: 2.2rem; display: flex; flex-wrap: wrap; gap: 1rem; }
.hero__meta { margin-top: 2.6rem; display: flex; flex-wrap: wrap; gap: 1.4rem 2.2rem; border-top: 1px solid var(--line); padding-top: 1.6rem; }
.hero__meta-item { display: flex; flex-direction: column; gap: 2px; }
.hero__meta-item b { font-family: var(--font-display); font-size: 1.05rem; }
.hero__meta-item span { font-size: 0.85rem; color: var(--muted); letter-spacing: 0.01em; }

/* Hero photographic visual */
.hero__visual { display: flex; justify-content: center; }
.hero__photo { position: relative; margin: 0; max-width: 460px; width: 100%; }
.hero__photo picture { display: block; }
.hero__photo img { width: 100%; height: auto; border-radius: var(--radius-plate); box-shadow: var(--shadow-crest); }
.hero__photo::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius-plate); border: 1px solid rgba(202, 7, 17, 0.14); pointer-events: none; }
.hero__photo-badge {
  position: absolute; left: -18px; bottom: -18px; background: #fff; border: 1px solid var(--line);
  border-radius: 12px; padding: 8px; box-shadow: var(--shadow-card); line-height: 0;
}
.hero__photo-badge img { height: 64px; width: auto; border-radius: 0; box-shadow: none; }

/* ============================================================= PROGRAMS */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1rem, 2vw, 1.6rem); }
.card {
  position: relative; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-card); padding: 0; overflow: hidden;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}
.card::before { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 3px; background: var(--red); transform: scaleX(0); transform-origin: left; transition: transform 0.35s var(--ease); z-index: 2; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card); border-color: transparent; }
.card:hover::before { transform: scaleX(1); }
.card__media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.card__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.6s var(--ease); }
.card:hover .card__media img { transform: scale(1.045); }
.card__chip {
  position: absolute; top: 12px; left: 12px; z-index: 1; font-family: var(--font-display);
  font-weight: 700; font-size: 0.82rem; color: #fff; background: rgba(10, 10, 10, 0.78);
  padding: 3px 10px; border-radius: 4px; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.card__body { padding: 1.7rem 1.8rem 1.9rem; }
.card h3 { font-size: 1.35rem; margin-bottom: 0.6rem; }
.card p { color: var(--muted); font-size: 0.98rem; }

.note-inline { margin-top: 2rem; font-size: 0.9rem; color: var(--muted); display: flex; gap: 0.6rem; align-items: flex-start; }
.note-inline svg { flex-shrink: 0; margin-top: 2px; color: var(--red); }

/* ============================================================= WHY / PILLARS */
.why { background: var(--surface-2); }
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.4rem, 3vw, 2.5rem); }
.pillar { padding-top: 1.6rem; border-top: 3px solid var(--ink); }
.pillar__k { font-family: var(--font-display); font-size: 0.85rem; letter-spacing: 0.02em; color: var(--red); font-weight: 700; margin-bottom: 0.9rem; }
.pillar h3 { font-size: 1.5rem; margin-bottom: 0.7rem; }
.pillar p { color: var(--muted); }

/* ============================================================= CREDIBILITY BAND (dark in both modes) */
.credibility { background: #0A0A0A; color: #F4F1EC; }
.credibility .eyebrow { color: #F03340; }
.credibility .eyebrow::before { background: #F03340; }
.cred__grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(2.5rem, 5vw, 5rem); align-items: center; }
.cred__lead h2 { color: #fff; font-size: clamp(1.9rem, 3.2vw, 2.8rem); line-height: 1.08; }
.cred__lead p { color: rgba(244, 241, 236, 0.72); margin-top: 1.2rem; font-size: 1.08rem; line-height: 1.65; }
.cred__lead .highlight { color: #fff; font-weight: 600; }
.cred__facts { display: flex; flex-direction: column; gap: 0; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: var(--radius-plate); overflow: hidden; }
.cred__fact { padding: 1.5rem 1.7rem; border-bottom: 1px solid rgba(255, 255, 255, 0.10); display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.cred__fact:last-child { border-bottom: 0; }
.cred__fact .k { font-size: 0.82rem; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(244, 241, 236, 0.6); }
.cred__fact .v { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; color: #fff; text-align: right; }
.cred__fact .v.rto { color: #F03340; }
.cred__fact .v small { display: block; font-family: var(--font-body); font-weight: 400; font-size: 0.72rem; color: rgba(244,241,236,0.5); letter-spacing: 0; }

/* ============================================================= CONTACT */
.contact__grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(2.5rem, 5vw, 4.5rem); }
.contact__intro h2 { font-size: clamp(2rem, 3.4vw, 2.9rem); line-height: 1.06; }
.contact__intro p { margin-top: 1.2rem; color: var(--muted); font-size: 1.05rem; }
.contact__reassure { margin-top: 2rem; display: flex; flex-direction: column; gap: 1rem; }
.contact__reassure li { display: flex; gap: 0.7rem; align-items: flex-start; list-style: none; color: var(--ink-soft); font-size: 0.98rem; }
.contact__reassure svg { flex-shrink: 0; color: var(--red); margin-top: 3px; }
.contact__reassure ul { margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1rem; }

.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-plate); padding: clamp(1.8rem, 3vw, 2.6rem); box-shadow: var(--shadow-card); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.field { margin-bottom: 1.1rem; display: flex; flex-direction: column; }
.field label { font-size: 0.85rem; font-weight: 600; color: var(--ink-soft); margin-bottom: 0.4rem; }
.field label .req { color: var(--red); }
.field input, .field textarea, .field select {
  font-family: inherit; font-size: 1rem; color: var(--ink); background: var(--bg);
  border: 1.5px solid var(--line); border-radius: var(--radius-btn); padding: 0.8rem 0.9rem; width: 100%;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease); min-height: 48px;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(202, 7, 17, 0.12); }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-actions { display: flex; align-items: center; gap: 1rem; margin-top: 0.4rem; flex-wrap: wrap; }
.form-note { font-size: 0.82rem; color: var(--muted); }
.form-status { margin-top: 1rem; font-size: 0.95rem; padding: 0.9rem 1.1rem; border-radius: var(--radius-btn); display: none; }
.form-status.show { display: block; }
.form-status.ok { background: rgba(45, 140, 60, 0.12); color: #1f7a2e; border: 1px solid rgba(45, 140, 60, 0.3); }
.form-status.err { background: rgba(202, 7, 17, 0.10); color: var(--red-deep); border: 1px solid rgba(202, 7, 17, 0.3); }
[data-theme="dark"] .form-status.ok, :root:not([data-theme="light"]) .form-status.ok { color: #6ee787; }
.btn[disabled] { opacity: 0.6; pointer-events: none; }

/* ============================================================= FOOTER */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); padding-block: clamp(3rem, 5vw, 4.5rem) 2rem; }
.footer__top { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 2.5rem; padding-bottom: 2.5rem; border-bottom: 1px solid var(--line); }
.footer__brand .chip { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 0.8rem; display: inline-block; box-shadow: var(--shadow-card); }
.footer__brand .chip img { height: 84px; width: auto; }
.footer__brand p { margin-top: 1.2rem; color: var(--muted); font-size: 0.95rem; max-width: 34ch; }
.footer__col h4 { font-family: var(--font-body); font-size: 0.82rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 1.1rem; font-weight: 600; }
.footer__col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.4rem; }
.footer__col a, .footer__col span { color: var(--ink-soft); font-size: 0.95rem; display: inline-flex; align-items: center; min-height: 44px; }
.footer__col a:hover { color: var(--red); }
.footer__bottom { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; padding-top: 1.8rem; font-size: 0.85rem; color: var(--muted); }
.footer__bottom .abn { font-weight: 500; }
.footer__bottom .rto-badge { color: var(--ink-soft); }
.footer__bottom .rto-badge b { color: var(--red); font-family: var(--font-display); }

/* Theme toggle */
.theme-toggle { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; background: transparent; border: 1.5px solid var(--line-strong); border-radius: var(--radius-btn); color: var(--ink); transition: all 0.25s var(--ease); }
.theme-toggle:hover { border-color: var(--red); color: var(--red); }
.theme-toggle svg { width: 18px; height: 18px; }

/* ============================================================= REVEAL ANIM */
[data-animate] { opacity: 0; }
.no-js [data-animate] { opacity: 1; }

/* ============================================================= RESPONSIVE */
@media (max-width: 1024px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__visual { margin-top: 1.5rem; }
  .crest-plate { max-width: 320px; }
  .cred__grid, .contact__grid { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .nav, .header__actions .student-login, .header__actions .btn { display: none; }
  .nav-toggle { display: flex; }
  .header__actions { gap: 0.5rem; }
  .pillars, .card-grid { grid-template-columns: 1fr; }
  .footer__top { grid-template-columns: 1fr; gap: 2rem; }
  .form-row { grid-template-columns: 1fr; }
  .hero { padding-top: 120px; }
  .brand__text span { display: none; }
  .mobile-nav__head .brand { display: inline-flex; align-items: center; min-width: 44px; min-height: 44px; }

  /* Mobile nav overlay */
  .mobile-nav { position: fixed; inset: 0; z-index: 200; background: var(--bg); transform: translateX(100%); transition: transform 0.35s var(--ease); display: flex; flex-direction: column; padding: var(--gutter); }
  .mobile-nav.open { transform: translateX(0); }
  .mobile-nav__head { display: flex; justify-content: space-between; align-items: center; height: 76px; }
  .mobile-nav__close { width: 44px; height: 44px; border: 1px solid var(--line-strong); border-radius: var(--radius-btn); background: transparent; color: var(--ink); font-size: 1.4rem; }
  .mobile-nav__links { display: flex; flex-direction: column; gap: 0.4rem; margin-top: 2rem; }
  .mobile-nav__links a { font-family: var(--font-display); font-size: 1.7rem; font-weight: 700; padding: 0.6rem 0; border-bottom: 1px solid var(--line); }
  .mobile-nav__actions { margin-top: auto; display: flex; flex-direction: column; gap: 0.9rem; padding-bottom: 1rem; }
  .mobile-nav__actions .btn, .mobile-nav__actions .student-login { display: inline-flex; width: 100%; }
}
@media (min-width: 761px) { .mobile-nav { display: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  [data-animate] { opacity: 1 !important; transform: none !important; }
  .hero__grid-bg { opacity: 0.3; }
}

/* =============================================================================
   v1.1.0 — COURSE PAGES, STUDENT HANDBOOK, COMPLIANCE BLOCK
   Appended after the responsive section, so each new component carries its own
   breakpoints below rather than relying on the earlier media queries.
   ========================================================================== */

/* ------------------------------------------------------------- NAV DENSITY */
.nav { gap: 1.6rem; }

/* --------------------------------------------------------- PROGRAM CARDS */
.card-grid--two { grid-template-columns: repeat(2, 1fr); }
.card__link { display: block; color: inherit; height: 100%; }
.card__code {
  display: block; font-family: var(--font-body); font-size: 0.8rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--red); margin-bottom: 0.35rem;
}
.card__tag {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 0.32rem 0.65rem; border-radius: 3px; margin-bottom: 0.9rem; border: 1px solid transparent;
}
.card__tag--qualification { background: rgba(202, 7, 17, 0.09); color: var(--red-deep); border-color: rgba(202, 7, 17, 0.28); }
.card__tag--skill-set { background: var(--surface-2); color: var(--muted); border-color: var(--line-strong); }
[data-theme="dark"] .card__tag--qualification, :root:not([data-theme="light"]) .card__tag--qualification { color: var(--red); }
.card__cta {
  display: inline-flex; align-items: center; gap: 0.45rem; margin-top: 1.1rem;
  font-size: 0.92rem; font-weight: 600; color: var(--red);
}
.card__cta .arrow { transition: transform 0.25s var(--ease); }
.card:hover .card__cta .arrow { transform: translateX(4px); }

/* ------------------------------------------------------------- PAGE HERO */
.page-hero { position: relative; padding-top: 132px; padding-bottom: clamp(2.5rem, 5vw, 4rem); overflow: hidden; }
.page-hero__inner { position: relative; z-index: 1; }
.page-hero__grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; margin-top: 1.8rem; }
.page-hero__grid--single { grid-template-columns: 1fr; max-width: 760px; }
.page-hero__copy h1 { font-size: clamp(2.1rem, 4.4vw, 3.5rem); line-height: 1.04; letter-spacing: -0.015em; }
.page-hero__code {
  display: block; font-family: var(--font-body); font-size: 0.9rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--red); margin-bottom: 0.6rem;
}
.page-hero__lead { margin-top: 1.4rem; font-size: clamp(1.02rem, 1.5vw, 1.2rem); line-height: 1.6; color: var(--ink-soft); max-width: 52ch; }
.page-hero__visual { display: flex; justify-content: center; }
.page-hero__photo { margin: 0; position: relative; width: 100%; max-width: 460px; }
.page-hero__photo img { width: 100%; height: auto; border-radius: var(--radius-plate); box-shadow: var(--shadow-crest); }
.page-hero__photo::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius-plate); border: 1px solid rgba(202, 7, 17, 0.14); pointer-events: none; }

/* ------------------------------------------------------------ BREADCRUMBS */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 0.55rem; font-size: 0.85rem; color: var(--muted); }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--red); }
.crumbs [aria-current="page"] { color: var(--ink-soft); font-weight: 500; }

/* ----------------------------------------------------------- COURSE BODY */
.course__grid { display: grid; grid-template-columns: 1.35fr 0.65fr; gap: clamp(2rem, 4vw, 3.5rem); align-items: start; }
.course__block { margin-top: clamp(2.2rem, 4vw, 3rem); }
.course__block h3 { font-size: 1.45rem; margin-bottom: 0.9rem; }

.prose { color: var(--ink-soft); font-size: 1.05rem; line-height: 1.75; max-width: 68ch; }
.prose--note { margin-top: 1rem; font-size: 0.95rem; color: var(--muted); font-style: italic; }

.tick-list { list-style: none; margin: 1rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 0.85rem; }
.tick-list li { display: flex; gap: 0.7rem; align-items: flex-start; color: var(--ink-soft); font-size: 1rem; }
.tick-list svg { flex-shrink: 0; color: var(--red); margin-top: 4px; }

.pill-list { list-style: none; margin: 1rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.6rem; }
.pill-list li {
  border: 1px solid var(--line-strong); border-radius: 999px; padding: 0.45rem 1rem;
  font-size: 0.92rem; font-weight: 500; color: var(--ink-soft); background: var(--surface);
}

.unit-list { list-style: none; margin: 1rem 0 0; padding: 0; border-top: 1px solid var(--line); }
.unit-list li { display: flex; gap: 1rem; align-items: baseline; padding: 0.85rem 0; border-bottom: 1px solid var(--line); }
.unit-list__code { font-family: var(--font-display); font-weight: 700; color: var(--red); min-width: 110px; flex-shrink: 0; }
.unit-list__title { color: var(--ink-soft); }

/* -------------------------------------------------------- SPEC SIDE CARD */
.course__aside { position: sticky; top: 100px; }
.spec-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-plate); padding: clamp(1.5rem, 2.5vw, 2rem); box-shadow: var(--shadow-card); }
.spec-card__title { font-size: 1.15rem; margin-bottom: 1.2rem; padding-bottom: 1rem; border-bottom: 2px solid var(--ink); }
.spec-list { margin: 0; }
.spec-list__row { padding: 0.9rem 0; border-bottom: 1px solid var(--line); }
.spec-list__row:last-child { border-bottom: 0; }
.spec-list dt { font-size: 0.76rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-bottom: 0.35rem; }
.spec-list dd { margin: 0; color: var(--ink-soft); font-size: 0.96rem; line-height: 1.6; }
.spec-card__cta { width: 100%; margin-top: 1.4rem; }

/* ------------------------------------------------- COMPLIANCE POINTS (dark) */
.cred__points {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(1.5rem, 3vw, 2.5rem);
  margin-top: clamp(2.8rem, 5vw, 4rem); padding-top: clamp(2.5rem, 4vw, 3.5rem);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.cred__point { padding-top: 1.2rem; border-top: 3px solid #F03340; }
.cred__point h3 { color: #fff; font-size: 1.18rem; margin-bottom: 0.7rem; line-height: 1.25; }
.cred__point p { color: rgba(244, 241, 236, 0.68); font-size: 0.95rem; line-height: 1.65; }
.cred__point a { color: #fff; font-weight: 600; border-bottom: 1px solid rgba(255, 255, 255, 0.4); }
.cred__point a:hover { color: #F03340; border-bottom-color: #F03340; }

/* -------------------------------------------------------------- HANDBOOK */
.handbook__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(1.2rem, 2.5vw, 2rem); }
.handbook__item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); padding: clamp(1.4rem, 2.5vw, 1.9rem); }
.handbook__item h3 { font-size: 1.2rem; margin-bottom: 0.6rem; }
.handbook__item p { color: var(--muted); font-size: 0.97rem; line-height: 1.65; }
.handbook__item--key { grid-column: 1 / -1; border-color: rgba(202, 7, 17, 0.35); background: linear-gradient(180deg, rgba(202, 7, 17, 0.05), transparent 60%), var(--surface); }
.handbook__item--key h3 { color: var(--red-deep); }
[data-theme="dark"] .handbook__item--key h3, :root:not([data-theme="light"]) .handbook__item--key h3 { color: var(--red); }

/* ---------------------------------------------------------------- FOOTER */
.footer__top { grid-template-columns: 1.4fr 1fr 1fr 1fr; }

/* ----------------------------------------------------------- RESPONSIVE */
@media (max-width: 1120px) {
  .nav { gap: 1.1rem; }
  .nav a.nav__link { font-size: 0.88rem; }
  .nav__link--secondary { display: none; }
  .header__actions .btn { padding: 0.9rem 1.1rem; }
}
@media (max-width: 1024px) {
  .page-hero__grid { grid-template-columns: 1fr; }
  .page-hero__visual { margin-top: 0.5rem; }
  .course__grid { grid-template-columns: 1fr; }
  .course__aside { position: static; }
  .cred__points { grid-template-columns: repeat(2, 1fr); }
  .footer__top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .card-grid--two, .handbook__grid, .cred__points { grid-template-columns: 1fr; }
  .card__tag { font-size: 0.67rem; letter-spacing: 0.06em; }
  .handbook__item--key { grid-column: auto; }
  .footer__top { grid-template-columns: 1fr; }
  .page-hero { padding-top: 108px; }
  .unit-list li { flex-direction: column; gap: 0.2rem; }
}
