/* MT3 Academy — mt3academy.org
   Static, dependency-free stylesheet. Fonts are self-hosted (SIL OFL 1.1). */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("assets/fonts/inter-latin-wght.woff2") format("woff2");
}

@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("assets/fonts/source-serif-4-latin-wght.woff2") format("woff2");
}

:root {
  color-scheme: light;

  --navy: #14253d;
  --navy-hover: #0d1a2c;
  --slate: #52657f;
  --off-white: #f5f8fc;
  --white: #ffffff;
  --blue: #1f5fd1;        /* text-safe accent: 5.6:1 on white */
  --blue-bright: #2b6be6; /* matches the hero curve */
  --cyan: #0ea5c6;        /* decorative accent only */
  --pale-blue: #eaf1fb;
  --line: #dde5ef;
  --line-strong: #c9d5e5;

  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Source Serif 4", "Iowan Old Style", "Palatino Linotype", Georgia, Cambria, "Times New Roman", serif;

  --container: 1120px;
  --gutter: clamp(20px, 4vw, 32px);
  --section-space: clamp(64px, 9vw, 112px);
  --radius: 16px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(20, 37, 61, 0.06), 0 1px 1px rgba(20, 37, 61, 0.04);
  --shadow-md: 0 1px 2px rgba(20, 37, 61, 0.05), 0 10px 30px -12px rgba(20, 37, 61, 0.16);
  --shadow-lg: 0 2px 4px rgba(20, 37, 61, 0.04), 0 24px 60px -24px rgba(20, 37, 61, 0.28);
  --focus: 0 0 0 3px var(--white), 0 0 0 5px var(--blue);
}

/* ---------- Base ---------- */

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--white);
  color: var(--slate);
  font-family: var(--font-sans);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.7;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  margin: 0;
  color: var(--navy);
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

h2 { font-size: clamp(1.75rem, 1.35rem + 1.7vw, 2.6rem); }
h3 { font-size: 1.25rem; line-height: 1.3; }

p { margin: 0 0 1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

strong { color: var(--navy); font-weight: 650; }

img { display: block; max-width: 100%; height: auto; }
picture { display: block; }
figure { margin: 0; }

:where(ul[role="list"], ol[role="list"]) { list-style: none; margin: 0; padding: 0; }

a { color: var(--blue); text-underline-offset: 0.18em; }

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
  border-radius: 6px;
}

.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.icon {
  width: 1.5rem;
  height: 1.5rem;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nowrap { white-space: nowrap; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: 12px; left: 12px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--navy);
  color: var(--white);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-160%);
}
.skip-link:focus { transform: none; }

.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Shared typographic elements ---------- */

.overline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  color: var(--blue);
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 650;
  line-height: 1.4;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.overline::before {
  content: "";
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--blue-bright), var(--cyan));
  flex: none;
}

.section-head { max-width: 720px; margin-bottom: clamp(32px, 5vw, 52px); }
.section-head h2 + p { margin-top: 20px; }
.section-head--center { margin-inline: auto; text-align: center; }
/* Centred overlines: accent rule sits above the text so wrapped lines stay balanced */
.section-head--center .overline,
.cta .overline { display: block; text-align: center; }
.section-head--center .overline::before,
.cta .overline::before { display: block; margin: 0 auto 12px; }

.prose h2 { margin-bottom: 22px; }
.prose--wide { max-width: 760px; }
.prose--center { max-width: 760px; margin-bottom: 0; }

.section-intro { margin-top: 18px; font-size: 1.125rem; }

/* ---------- Header ---------- */

.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  flex-wrap: wrap;
  min-height: 76px;
  padding-block: 14px;
}

.brand {
  display: inline-flex;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
  line-height: 1.2;
}
.brand__name {
  color: var(--navy);
  font-family: var(--font-serif);
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.brand__subtitle {
  margin-top: 3px;
  color: var(--slate);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.site-header__values {
  margin: 0;
  color: var(--slate);
  font-size: 0.8125rem;
  font-weight: 550;
  letter-spacing: 0.06em;
}
.site-header__values .sep { margin-inline: 0.45em; color: var(--blue-bright); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(48px, 7vw, 96px) clamp(64px, 9vw, 112px);
  background-color: var(--off-white);
  isolation: isolate;
}
/* Faint coordinate grid echoing the hero graph */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(to right, rgba(82, 101, 127, 0.075) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(82, 101, 127, 0.075) 1px, transparent 1px);
  background-size: 40px 40px;
  -webkit-mask-image: radial-gradient(ellipse 85% 75% at 70% 40%, #000 30%, transparent 78%);
  mask-image: radial-gradient(ellipse 85% 75% at 70% 40%, #000 30%, transparent 78%);
}

.hero__grid {
  display: grid;
  gap: clamp(40px, 6vw, 64px);
  align-items: center;
}

.hero__copy { max-width: 620px; }

.hero__title {
  margin-bottom: 24px;
  font-size: clamp(2.25rem, 1.3rem + 2.2vw, 3rem);
  font-weight: 650;
  line-height: 1.06;
  letter-spacing: -0.022em;
}
.hero__title-accent { display: block; color: var(--blue); }

.hero__lead {
  margin-bottom: 20px;
  color: var(--navy);
  font-family: var(--font-serif);
  font-size: clamp(1.2rem, 1.05rem + 0.6vw, 1.45rem);
  font-weight: 500;
  font-style: normal;
  line-height: 1.45;
}

.hero__visual {
  position: relative;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--off-white);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.hero__visual img {
  width: 100%;
  aspect-ratio: 2400 / 1792;
}

/* ---------- Sections ---------- */

.section { padding-block: var(--section-space); }
.section--white { background: var(--white); }
.section--tint {
  background: var(--off-white);
  border-block: 1px solid #ebf0f6;
}

.split {
  display: grid;
  gap: 28px clamp(40px, 6vw, 88px);
  align-items: start;
}

.prose > p:not(.overline),
.split__body > p { max-width: 62ch; }

.emphasis {
  margin-block: 28px !important;
  padding: 4px 0 4px 22px;
  border-left: 3px solid var(--blue-bright);
  color: var(--navy);
  font-family: var(--font-serif);
  font-size: clamp(1.2rem, 1.08rem + 0.5vw, 1.4rem);
  font-weight: 550;
  line-height: 1.45;
}

/* ---------- Cards ---------- */

.card-grid { display: grid; gap: 20px; }

.card {
  padding: clamp(24px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-md);
}
.card h3 { margin: 20px 0 10px; }
.card p { margin: 0; }

.card--row {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}
.card--row h3 { margin-top: 2px; }

.stack { display: grid; gap: 20px; }

.icon-badge {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  flex: none;
  border-radius: 14px;
  background: linear-gradient(145deg, #eef4fe, #e3edfb);
  box-shadow: inset 0 0 0 1px rgba(43, 107, 230, 0.12);
  color: var(--blue);
}
.icon-badge--sm { width: 44px; height: 44px; border-radius: 12px; }
.icon-badge--sm .icon { width: 1.3rem; height: 1.3rem; }

/* ---------- Syllabus list ---------- */

.syllabus {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.syllabus__row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 18px;
  align-items: center;
  padding: 22px clamp(20px, 3vw, 28px);
}
.syllabus__row + .syllabus__row { border-top: 1px solid var(--line); }
.syllabus__row .icon-badge { grid-row: span 2; }
.syllabus__name {
  color: var(--navy);
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.3;
}
.syllabus__code {
  justify-self: start;
  color: var(--slate);
  font-size: 0.875rem;
  font-weight: 550;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

/* ---------- Evidence screenshots ---------- */

.evidence { margin-top: clamp(40px, 6vw, 64px); }

.evidence__label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  color: var(--navy);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.evidence__label .icon { width: 1.35rem; height: 1.35rem; color: var(--blue); }

.shot { position: relative; }

.shot__frame { position: relative; }

.shot--portfolio .shot__frame {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.shot--portfolio img { width: 100%; aspect-ratio: 1905 / 1520; }

.shot__caption {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  margin-top: 16px;
  color: var(--slate);
  font-size: 0.9375rem;
}

/* Enlarge controls sit outside the screenshots so no evidence is covered. */
.zoom-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  color: var(--navy);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  cursor: zoom-in;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.zoom-btn .icon { width: 1.1rem; height: 1.1rem; color: var(--blue); }
.zoom-btn:hover { border-color: var(--blue); box-shadow: var(--shadow-md); }
.zoom-btn:focus-visible { outline: none; border-radius: 999px; box-shadow: var(--focus); }
.zoom-btn--icon { width: 44px; padding: 0; justify-content: center; flex: none; }

/* With script.js active, the screenshot itself is also a pointer target. */
.has-lightbox [data-lightbox-group] .shot__frame img { cursor: zoom-in; }

/* ---------- Feedback grid ---------- */

/* One readable column up to small-desktop widths; two columns from 1080px. */
.feedback-grid {
  display: grid;
  gap: 20px;
  max-width: 780px;
  margin-inline: auto;
}

.feedback {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: clamp(16px, 2.4vw, 22px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-md);
}

.feedback__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-left: 4px;
}
.feedback__title { font-size: 1.125rem; }
.feedback__title .feedback__dash { margin-inline: 0.1em; }
.feedback__num {
  color: var(--blue);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
}
.feedback__dash { color: var(--line-strong); font-family: var(--font-sans); font-weight: 400; }

.feedback .shot__frame { margin-block: auto; }
.feedback .shot__frame img { width: 100%; }

/* ---------- CTA ---------- */

.section--cta { padding-top: 0; }

.cta {
  position: relative;
  max-width: 880px;
  margin-inline: auto;
  padding: clamp(40px, 6vw, 64px) clamp(24px, 5vw, 64px);
  border: 1px solid #d8e3f3;
  border-radius: 28px;
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(43, 107, 230, 0.08), transparent 55%),
    radial-gradient(120% 140% at 100% 100%, rgba(14, 165, 198, 0.08), transparent 55%),
    var(--off-white);
  text-align: center;
  overflow: hidden;
}
.cta h2 { margin-bottom: 16px; }
.cta__text { max-width: 560px; margin: 0 auto 32px !important; font-size: 1.0625rem; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 14px 28px;
  border-radius: 999px;
  background: var(--navy);
  box-shadow: 0 10px 24px -10px rgba(20, 37, 61, 0.55);
  color: var(--white);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  transition: background-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.button .icon { width: 1.15rem; height: 1.15rem; transition: transform 0.15s ease; }
.button:hover { background: var(--navy-hover); box-shadow: 0 14px 28px -12px rgba(20, 37, 61, 0.6); }
.button:hover .icon { transform: translateX(3px); }
.button:focus-visible { outline: none; box-shadow: var(--focus); }

.cta__caption {
  margin-top: 16px;
  color: var(--slate);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--white);
}
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 28px;
  padding-block: 32px;
}
.site-footer p { margin: 0; }
.site-footer__name {
  color: var(--navy);
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 700;
}
.site-footer__tagline { font-size: 0.875rem; letter-spacing: 0.03em; }
.site-footer__tagline .sep { margin-inline: 0.35em 0.3em; color: var(--blue-bright); }
.site-footer__copy { font-size: 0.875rem; }
.site-footer__copy small { font-size: inherit; }

/* ---------- Lightbox ---------- */

.lightbox {
  width: 100vw;
  max-width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--white);
  overflow: hidden;
}
.lightbox[open] { display: flex; flex-direction: column; }
.lightbox::backdrop { background: rgba(9, 18, 32, 0.9); }

html:has(.lightbox[open]) { overflow: hidden; }

.lightbox__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px clamp(12px, 3vw, 24px);
  flex: none;
}
.lightbox__title {
  min-width: 0;
  overflow: hidden;
  color: var(--white);
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lightbox__actions { display: flex; gap: 8px; flex: none; }

.lightbox__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
}
.lightbox__btn .icon { width: 1.1rem; height: 1.1rem; }
.lightbox__btn:hover { background: rgba(255, 255, 255, 0.18); }
.lightbox__btn:focus-visible { outline: 3px solid #8fb6ff; outline-offset: 2px; }
.lightbox__btn[hidden] { display: none; }

.lightbox__stage {
  flex: 1;
  min-height: 0;
  display: flex;
  overflow: auto;
  padding: 0 clamp(12px, 3vw, 32px) clamp(12px, 3vw, 32px);
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.lightbox__stage:focus-visible { outline: 3px solid #8fb6ff; outline-offset: -3px; border-radius: 0; }

.lightbox__img {
  margin: auto;            /* centres when smaller, scrolls fully when larger */
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  border-radius: 10px;
  background: var(--white);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  cursor: zoom-in;
}
.lightbox.is-zoomed .lightbox__img {
  max-width: none;
  max-height: none;
  cursor: zoom-out;
}

/* ---------- Responsive ---------- */

@media (max-width: 599.98px) {
  .site-header__values { font-size: 0.75rem; letter-spacing: 0.04em; }
  .feedback { padding: 12px 8px 8px; gap: 10px; }
  .feedback__head { padding-left: 8px; }
  .feedback__title { font-size: 1.0625rem; }
  .site-footer__tagline { font-size: 0.8125rem; }
  .card--row { flex-direction: column; gap: 16px; }
  .card--row h3 { margin-top: 0; }
  /* Icon-only on phones; labels stay available to assistive technology */
  .lightbox__btn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .lightbox__btn { width: 44px; padding: 0; justify-content: center; }
}

@media (min-width: 720px) {
  .card-grid--3 { grid-template-columns: repeat(3, 1fr); }
  .card-grid--3 .card { display: flex; flex-direction: column; }

}

@media (min-width: 720px) and (max-width: 899.98px) {
  /* Three narrow cards at tablet width: tighten the copy slightly */
  .card-grid--3 { gap: 16px; }
  .card-grid--3 .card { padding: 22px; }
  .card-grid--3 h3 { font-size: 1.125rem; }
  .card-grid--3 p { font-size: 0.9375rem; }
}

@media (min-width: 1080px) {
  .feedback-grid { max-width: none; grid-template-columns: repeat(4, 1fr); gap: 24px; }
  .feedback { grid-column: span 2; }
  .feedback:last-child:nth-child(odd) { grid-column: 2 / span 2; }
}

@media (min-width: 900px) {
  .hero__grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 56px; }
  .split { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); }
  .split--even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; }
  .split__head { position: sticky; top: 32px; }
  .split__body { padding-top: 34px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
  .button:hover .icon { transform: none; }
}

@media print {
  .hero::before, .zoom-btn, .lightbox, .skip-link { display: none !important; }
  .section { padding-block: 32px; }
  .card, .feedback, .syllabus, .hero__visual, .shot--portfolio .shot__frame { box-shadow: none; }
}
