/* =========================================================
   T Plus Plus Interactive — site styles
   ========================================================= */

/* ---------- tokens ---------- */
:root {
  --bg: #0a0b10;
  --bg-2: #0f1118;
  --surface: #141721;
  --surface-2: #1b1f2c;
  --border: rgb(255 255 255 / 0.08);
  --border-strong: rgb(255 255 255 / 0.16);
  --text: #eef0f6;
  --text-muted: #a0a7ba;
  --text-faint: #6f7689;

  --red: #ff3b3b;
  --brand-red: #e5262b;
  --orange: #ff8a1f;
  --yellow: #ffcc1a;
  --grad: linear-gradient(110deg, var(--red) 0%, var(--orange) 55%, var(--yellow) 100%);
  --glow: 0 0 0 1px rgb(255 59 59 / 0.25), 0 20px 60px -20px rgb(255 90 40 / 0.45);

  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --step--1: clamp(0.82rem, 0.8rem + 0.1vw, 0.88rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.08rem);
  --step-1: clamp(1.2rem, 1.1rem + 0.45vw, 1.45rem);
  --step-2: clamp(1.5rem, 1.3rem + 0.9vw, 2.1rem);
  --step-3: clamp(1.9rem, 1.5rem + 1.8vw, 3rem);
  --step-4: clamp(2.6rem, 1.8rem + 4vw, 5.6rem);

  --radius: 18px;
  --radius-sm: 10px;
  --container: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --section: clamp(72px, 10vw, 140px);
  --header-h: 72px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f7f7fa;
    --bg-2: #eef0f5;
    --surface: #ffffff;
    --surface-2: #f1f2f7;
    --border: rgb(10 12 20 / 0.08);
    --border-strong: rgb(10 12 20 / 0.16);
    --text: #10121a;
    --text-muted: #4d5366;
    --text-faint: #7a8093;
    --red: #e5262b;
    --orange: #f07a12;
    --yellow: #e8b100;
    --glow: 0 0 0 1px rgb(229 38 43 / 0.2), 0 20px 50px -24px rgb(229 38 43 / 0.35);
    color-scheme: light;
  }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--yellow); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.1; letter-spacing: -0.02em; font-weight: 600; text-wrap: balance; }
p { text-wrap: pretty; }
::selection { background: var(--red); color: #fff; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--yellow); color: #000; padding: 10px 16px; border-radius: 8px; font-weight: 600; }
.skip-link:focus { top: 12px; }

.container { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }
.section { padding-block: var(--section); position: relative; }
.section--tight { padding-block: calc(var(--section) * 0.6); }
.section--alt { background: var(--bg-2); border-block: 1px solid var(--border); }

.icon { width: 1.25em; height: 1.25em; flex: none; }
.icon--sm { width: 1em; height: 1em; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-size: var(--step--1); font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-muted);
}
.eyebrow::before { content: ""; width: 24px; height: 2px; background: var(--grad); border-radius: 2px; }
.text-grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: var(--step-1); color: var(--text-muted); line-height: 1.55; max-width: 60ch; }
.muted { color: var(--text-muted); }

.section-head { display: grid; gap: 16px; margin-bottom: clamp(36px, 5vw, 64px); max-width: 720px; }
.section-head h2 { font-size: var(--step-3); }
.section-head--split { max-width: none; grid-template-columns: 1fr auto; align-items: end; }
@media (max-width: 720px) { .section-head--split { grid-template-columns: 1fr; } }

/* ---------- buttons & links ---------- */
.btn {
  --btn-bg: var(--surface-2);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 24px; border-radius: 999px;
  font-weight: 600; font-size: 0.98rem; text-decoration: none; white-space: nowrap;
  background: var(--btn-bg); border: 1px solid var(--border-strong);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--grad); color: #140600; border: 0; box-shadow: 0 10px 30px -10px rgb(255 80 40 / 0.6); }
.btn--primary:hover { box-shadow: 0 16px 40px -12px rgb(255 80 40 / 0.75); }
.btn--ghost { background: transparent; }
.btn--ghost:hover { background: var(--surface-2); }
.btn--sm { min-height: 40px; padding: 8px 18px; font-size: 0.9rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

.link-arrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; text-decoration: none; color: var(--text); }
.link-arrow .icon { transition: transform 0.25s var(--ease); color: var(--orange); }
.link-arrow:hover .icon { transform: translateX(4px); }
.link-sub { display: inline-flex; align-items: center; gap: 6px; font-size: 0.9rem; color: var(--text-muted); text-decoration: none; }
.link-sub:hover { color: var(--text); }

/* ---------- header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--header-h);
  transition: background 0.3s, border-color 0.3s, backdrop-filter 0.3s;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled, .nav-open .site-header {
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-bottom-color: var(--border);
}
.site-header__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand img { width: auto; height: 46px; }
.nav { display: flex; align-items: center; gap: 28px; }
.nav__list { display: flex; gap: 4px; list-style: none; padding: 0; }
.nav__link {
  display: block; padding: 8px 14px; border-radius: 999px; text-decoration: none;
  font-size: 0.94rem; font-weight: 500; color: var(--text-muted); transition: color 0.2s, background 0.2s;
}
.nav__link:hover { color: var(--text); background: var(--surface-2); }
.nav__link[aria-current="page"] { color: var(--text); background: var(--surface-2); }
.nav-toggle { display: none; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--border-strong); background: var(--surface); place-items: center; }
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after {
  display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px; transition: transform 0.3s var(--ease), opacity 0.2s;
}
.nav-toggle__bars { position: relative; }
.nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after { top: 6px; }
.nav-open .nav-toggle__bars { background: transparent; }
.nav-open .nav-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
.nav-open .nav-toggle__bars::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 960px) {
  .nav-toggle { display: grid; }
  .nav {
    position: fixed; inset: var(--header-h) 0 0; overflow-y: auto; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 20px;
    padding: 20px var(--gutter) 28px; background: var(--bg); border-bottom: 1px solid var(--border);
    transform: translateY(-8px); opacity: 0; visibility: hidden; transition: all 0.3s var(--ease);
  }
  .nav-open .nav { transform: none; opacity: 1; visibility: visible; }
  /* a backdrop-filter on the header would become the containing block of the fixed menu and squash it to the header's height */
  .nav-open .site-header { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--bg); }
  .nav { height: calc(100dvh - var(--header-h)); bottom: auto; }
  .nav__list { flex-direction: column; }
  .nav__link { padding: 14px 16px; font-size: 1.1rem; border-radius: 12px; }
}

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: min(100svh, 920px); display: grid; align-items: center;
  padding: calc(var(--header-h) + 48px) 0 72px; overflow: hidden; isolation: isolate;
}
.hero__canvas { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 50% at 80% 30%, rgb(255 90 40 / 0.16), transparent 70%),
    radial-gradient(40% 40% at 10% 90%, rgb(255 204 26 / 0.08), transparent 70%),
    linear-gradient(to bottom, transparent 60%, var(--bg));
}
.hero__inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 48px; align-items: center; }
.hero h1 { font-size: var(--step-4); font-weight: 700; letter-spacing: -0.035em; line-height: 0.98; margin: 20px 0 24px; }
.hero h1 .strike { position: relative; color: var(--text-muted); }
.hero h1 .strike::after {
  content: ""; position: absolute; left: -2%; right: -2%; top: 54%; height: 0.09em; background: var(--grad); border-radius: 4px;
  transform-origin: left; animation: strike 0.9s 0.6s var(--ease) both;
}
@keyframes strike { from { transform: scaleX(0); } }
.hero .lead { margin-bottom: 36px; }
.hero__badge {
  display: grid; justify-items: center; gap: 12px; text-align: center; padding: 24px; width: 220px;
  border-radius: var(--radius); background: color-mix(in srgb, var(--surface) 70%, transparent);
  border: 1px solid var(--border); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.hero__badge img { width: 130px; }
.hero__badge p { font-size: 0.86rem; color: var(--text-muted); line-height: 1.45; }
.hero__scroll { position: absolute; left: 50%; bottom: 24px; translate: -50% 0; width: 26px; height: 42px; border: 2px solid var(--border-strong); border-radius: 14px; }
.hero__scroll::after { content: ""; position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--text-muted); animation: scrollcue 1.8s infinite; }
@keyframes scrollcue { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(12px); } }
@media (max-width: 860px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__badge { grid-template-columns: 72px 1fr; justify-items: start; text-align: left; width: auto; max-width: 420px; padding: 16px; }
  .hero__badge img { width: 72px; }
  .hero__scroll { display: none; }
}

/* page hero (inner pages) */
.page-hero { position: relative; padding: calc(var(--header-h) + clamp(56px, 9vw, 120px)) 0 clamp(48px, 7vw, 88px); overflow: hidden; isolation: isolate; }
.page-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(50% 70% at 85% 0%, rgb(255 90 40 / 0.18), transparent 70%),
    linear-gradient(var(--border) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(90deg, var(--border) 1px, transparent 1px) 0 0 / 56px 56px;
  mask-image: linear-gradient(to bottom, #000 30%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, #000 30%, transparent);
}
.page-hero h1 { font-size: var(--step-4); font-weight: 700; letter-spacing: -0.035em; margin: 18px 0 20px; max-width: 18ch; }
.page-hero .lead { max-width: 62ch; }

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.stat { padding: clamp(20px, 3vw, 36px); border-left: 1px solid var(--border); }
.stat:first-child { border-left: 0; }
.stat__num { font-family: var(--font-display); font-size: var(--step-3); font-weight: 700; letter-spacing: -0.03em; line-height: 1; }
.stat__label { margin-top: 10px; color: var(--text-muted); font-size: 0.92rem; }
@media (max-width: 760px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n + 3) { border-top: 1px solid var(--border); }
}

/* ---------- cards & grids ---------- */
.grid { display: grid; gap: clamp(16px, 2vw, 24px); }
.grid--services { grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.grid--projects { grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.grid--recent { grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }

.card {
  position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  transition: transform 0.35s var(--ease), border-color 0.35s, box-shadow 0.35s;
}
.card:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: var(--glow); }

.service { padding: 32px 28px; }
.service__icon {
  width: 52px; height: 52px; display: grid; place-items: center; border-radius: 14px; margin-bottom: 24px;
  background: linear-gradient(135deg, rgb(255 59 59 / 0.16), rgb(255 204 26 / 0.1)); color: var(--orange);
  border: 1px solid rgb(255 138 31 / 0.25);
}
.service__icon .icon { width: 26px; height: 26px; }
.service h3 { font-size: var(--step-1); margin-bottom: 10px; }
.service p { color: var(--text-muted); font-size: 0.97rem; }

.project { overflow: hidden; display: flex; flex-direction: column; }
.project__media { aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface-2); position: relative; }
.project__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.project__media img.fit-contain { object-fit: contain; padding: 16px; background: radial-gradient(circle at 50% 60%, rgb(255 138 31 / 0.25), transparent 70%); }
.project:hover .project__media img { transform: scale(1.04); }
.project__art {
  position: absolute; inset: 0; display: grid; place-items: center;
  background:
    radial-gradient(circle at 30% 20%, rgb(255 59 59 / 0.35), transparent 55%),
    radial-gradient(circle at 80% 90%, rgb(255 204 26 / 0.25), transparent 55%),
    linear-gradient(var(--border) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(90deg, var(--border) 1px, transparent 1px) 0 0 / 28px 28px,
    var(--surface-2);
}
.project__art[data-cat="VR / AR"] { background-color: #1a1430; }
.project__art[data-cat="Interactive Video"] { filter: hue-rotate(-25deg); }
.project__art-icon { width: 64px; height: 64px; color: var(--text); opacity: 0.85; transition: transform 0.6s var(--ease); }
.project:hover .project__art-icon { transform: scale(1.12) rotate(-6deg); }
.project__body { padding: 24px 24px 28px; display: grid; gap: 10px; align-content: start; flex: 1; }
.project__body h3 { font-size: var(--step-1); }
.project__body p { color: var(--text-muted); font-size: 0.95rem; }
.project__body .project__credit { font-size: 0.78rem; color: var(--text-faint); }
.project__links { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; margin-top: 6px; }
.tag {
  justify-self: start; font-size: 0.74rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px; color: var(--orange); background: rgb(255 138 31 / 0.1); border: 1px solid rgb(255 138 31 / 0.25);
}

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.chip { padding: 8px 18px; border-radius: 999px; border: 1px solid var(--border-strong); background: transparent; font-size: 0.92rem; font-weight: 500; color: var(--text-muted); transition: all 0.2s; }
.chip:hover { color: var(--text); }
.chip.is-active { background: var(--text); color: var(--bg); border-color: var(--text); }
.project.is-hidden { display: none; }

/* feature split (home slider replacement) */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.feature + .feature { margin-top: clamp(64px, 9vw, 120px); }
.feature--flip .feature__media { order: 2; }
.feature__media {
  position: relative; border-radius: calc(var(--radius) * 1.4); padding: clamp(20px, 3vw, 40px);
  background: radial-gradient(circle at 50% 40%, rgb(255 90 40 / 0.22), transparent 70%), var(--surface);
  border: 1px solid var(--border); display: grid; place-items: center; aspect-ratio: 1 / 1;
}
.feature__media img { max-height: 100%; width: auto; filter: drop-shadow(0 30px 40px rgb(0 0 0 / 0.45)); }
.feature__body h3 { font-size: var(--step-3); margin: 16px 0; }
.feature__body p { color: var(--text-muted); margin-bottom: 28px; max-width: 52ch; }
@media (max-width: 860px) {
  .feature { grid-template-columns: 1fr; }
  .feature--flip .feature__media { order: 0; }
  .feature__media { aspect-ratio: 4 / 3; }
}

/* ---------- clients marquee ---------- */
.marquee { display: flex; overflow: hidden; gap: 16px; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee__track { display: flex; gap: 16px; list-style: none; padding: 0; flex: none; animation: marquee 60s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(calc(-100% - 16px)); } }
.client { width: 150px; aspect-ratio: 1 / 1; border-radius: 16px; background: #fff; display: grid; place-items: center; overflow: hidden; flex: none; padding: 8px; }
.client img { width: 100%; height: 100%; object-fit: contain; }
@media (max-width: 560px) { .client { width: 120px; } }

/* ---------- youtube ---------- */
.yt { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #000; border: 1px solid var(--border); }
.yt img { width: 100%; height: 100%; object-fit: cover; opacity: 0.75; transition: opacity 0.3s, transform 0.6s var(--ease); }
.yt:hover img { opacity: 0.9; transform: scale(1.03); }
.yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.yt__play {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%; width: 76px; height: 76px; border-radius: 50%; border: 0;
  background: var(--grad); color: #140600; display: grid; place-items: center; box-shadow: 0 10px 40px rgb(0 0 0 / 0.5);
  transition: transform 0.3s var(--ease);
}
.yt__play .icon { width: 30px; height: 30px; margin-left: 4px; }
.yt:hover .yt__play { transform: scale(1.08); }
.yt__title { position: absolute; left: 20px; bottom: 16px; right: 20px; font-family: var(--font-display); font-weight: 600; color: #fff; text-shadow: 0 2px 12px rgb(0 0 0 / 0.8); }
.yt.is-playing .yt__play, .yt.is-playing .yt__title, .yt.is-playing img { display: none; }

/* ---------- about: process ---------- */
.process { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 0; border-top: 1px solid var(--border); }
.process__step { padding: 32px 28px 36px 0; border-bottom: 1px solid var(--border); display: grid; grid-template-columns: auto 1fr; gap: 20px; }
.process__num { font-family: var(--font-display); font-size: var(--step-2); font-weight: 700; line-height: 1; }
.process__step h3 { font-size: var(--step-1); margin-bottom: 8px; }
.process__step p { color: var(--text-muted); font-size: 0.97rem; }

.pillars { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 16px; }
.pillar { padding: 28px; }
.pillar h3 { font-size: var(--step-1); margin-bottom: 8px; }
.pillar p { color: var(--text-muted); }

.prose { max-width: 70ch; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: var(--step-2); margin-top: 2em; }
.prose h3, .prose h4 { font-size: var(--step-1); margin-top: 1.8em; }
.prose p, .prose li { color: var(--text-muted); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: 0.4em; }
.prose a { color: var(--text); }
.prose strong { color: var(--text); }
.prose a.btn { text-decoration: none; }
.prose a.btn--primary { color: #140600; }
.prose .callout { margin-top: 2.5em; }
.prose .course-when { font-family: var(--font-display); font-weight: 600; color: var(--orange); font-size: 0.95rem; line-height: 1.5; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.prose td, .prose th { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: top; color: var(--text-muted); }
.prose tr:last-child td { border-bottom: 0; }
.prose td:last-child { text-align: right; white-space: nowrap; color: var(--text); font-weight: 600; }
.prose td p { margin: 0; }

/* ---------- training ---------- */
.trainer { display: grid; grid-template-columns: minmax(240px, 380px) 1fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.trainer__photo-wrap { position: sticky; top: calc(var(--header-h) + 24px); }
.trainer__photo { border-radius: calc(var(--radius) * 1.4); overflow: hidden; border: 1px solid var(--border); }
.trainer__photo img { width: 100%; }
.trainer__badges { display: flex; gap: 12px; align-items: center; margin-top: 16px; }
.trainer__badges img { width: 88px; border-radius: 12px; }
@media (max-width: 860px) { .trainer { grid-template-columns: 1fr; } .trainer__photo-wrap { position: static; max-width: 360px; } }

.courses { display: grid; gap: 12px; }
.course { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; transition: border-color 0.3s; }
.course[open] { border-color: rgb(255 138 31 / 0.4); }
.course summary { list-style: none; display: grid; grid-template-columns: auto 1fr auto auto; gap: 20px; align-items: center; padding: 22px 26px; cursor: pointer; }
.course summary::-webkit-details-marker { display: none; }
.course summary::after { content: "+"; font-size: 1.6rem; line-height: 1; color: var(--text-muted); transition: transform 0.3s var(--ease); }
.course[open] summary::after { transform: rotate(45deg); }
.course__code { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--grad); color: #140600; }
.course__title { font-family: var(--font-display); font-weight: 600; font-size: var(--step-1); }
.course__meta { color: var(--text-muted); font-size: 0.9rem; }
.course__body { padding: 0 26px 28px; }
.course__facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 24px; }
.course__facts div { background: var(--surface-2); border-radius: var(--radius-sm); padding: 14px 16px; }
.course__facts dt { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-faint); }
.course__facts dd { font-weight: 600; margin-top: 4px; }
.course__topics { list-style: none; padding: 0; columns: 2 260px; column-gap: 32px; }
.course__topics li { break-inside: avoid; padding: 7px 0 7px 22px; position: relative; color: var(--text-muted); font-size: 0.96rem; }
.course__topics li::before { content: ""; position: absolute; left: 0; top: 16px; width: 8px; height: 8px; border-radius: 2px; background: var(--grad); }
@media (max-width: 640px) {
  .course summary { grid-template-columns: auto 1fr auto; padding: 18px; gap: 14px; }
  .course__meta { display: none; }
  .course__body { padding: 0 18px 22px; }
  .course__facts { grid-template-columns: 1fr; }
}

.langs { display: flex; flex-wrap: wrap; gap: 10px; }
.lang { padding: 10px 18px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); font-weight: 500; }

/* ---------- callouts, steps, contact ---------- */
.callout { padding: clamp(28px, 4vw, 48px); border-radius: calc(var(--radius) * 1.4); background: radial-gradient(80% 120% at 100% 0%, rgb(255 90 40 / 0.2), transparent 60%), var(--surface); border: 1px solid var(--border); }
.callout h2, .callout h3 { font-size: var(--step-2); margin-bottom: 12px; }
.callout p { color: var(--text-muted); margin-bottom: 24px; max-width: 60ch; }

.steps { list-style: none; padding: 0; counter-reset: step; display: grid; gap: 12px; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 44px 1fr; gap: 16px; align-items: start; padding: 18px 20px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--border); color: var(--text-muted); }
.steps li::before { content: counter(step); width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; background: var(--surface-2); color: var(--orange); }
.steps strong { color: var(--text); display: block; }

.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(24px, 4vw, 48px); align-items: start; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-cards { display: grid; gap: 12px; }
.contact-card { display: grid; grid-template-columns: 48px 1fr; gap: 16px; align-items: center; padding: 20px; text-decoration: none; }
.contact-card__icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--surface-2); color: var(--orange); }
.contact-card__label { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-faint); }
.contact-card__value { font-weight: 600; font-size: 1.05rem; overflow-wrap: anywhere; }
.map { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); aspect-ratio: 16 / 10; }
.map iframe { width: 100%; height: 100%; border: 0; filter: grayscale(0.4) contrast(1.05); }

.form { display: grid; gap: 16px; padding: clamp(24px, 3vw, 36px); }
.form h2 { font-size: var(--step-2); }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .form .row { grid-template-columns: 1fr; } }
.field { display: grid; gap: 6px; }
.field label { font-size: 0.88rem; font-weight: 500; color: var(--text-muted); }
.field input, .field textarea, .field select {
  width: 100%; font: inherit; color: var(--text); background: var(--bg-2); border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); padding: 12px 14px; transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgb(255 138 31 / 0.2); }
.form__note { font-size: 0.85rem; color: var(--text-faint); }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-2); padding-top: clamp(56px, 8vw, 96px); }
.footer-cta { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 32px; padding-bottom: clamp(48px, 7vw, 80px); border-bottom: 1px solid var(--border); }
.page-home .footer-cta, .page-contact .footer-cta { display: none; }
.page-home .site-footer, .page-contact .site-footer { padding-top: 0; }
.footer-cta__title { font-size: var(--step-3); margin-top: 16px; }
.footer-cta__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1.3fr; gap: 40px; padding-block: 56px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand p { color: var(--text-muted); margin: 16px 0; max-width: 40ch; font-size: 0.95rem; }
.footer-brand > img:first-child { height: 46px; width: auto; }
.footer-badge { width: 64px; }
.footer-title { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-faint); margin-bottom: 16px; font-family: var(--font-body); font-weight: 600; }
.footer-links { list-style: none; padding: 0; display: grid; gap: 10px; }
.footer-links a, .footer-links span { display: inline-flex; gap: 10px; align-items: flex-start; color: var(--text-muted); text-decoration: none; font-size: 0.95rem; }
.footer-links a:hover { color: var(--text); }
.footer-links .icon { margin-top: 3px; color: var(--orange); width: 1.05em; height: 1.05em; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; padding-block: 24px 32px; border-top: 1px solid var(--border); font-size: 0.86rem; color: var(--text-faint); }
.footer-legal { display: flex; flex-wrap: wrap; gap: 20px; list-style: none; padding: 0; }
.footer-legal a { color: var(--text-faint); text-decoration: none; }
.footer-legal a:hover { color: var(--text); }

/* ---------- brand duotone for photos (colour returns on hover) ---------- */
.project__media:has(> img:not(.fit-contain)), .trainer__photo, .yt { position: relative; isolation: isolate; }
.project__media:has(> img:not(.fit-contain)) > img, .trainer__photo > img, .yt > img {
  filter: grayscale(1) contrast(1.12) brightness(0.95);
  transition: filter 0.6s var(--ease), transform 0.6s var(--ease), opacity 0.3s;
}
.project__media:has(> img:not(.fit-contain))::after, .trainer__photo::after, .yt::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background: linear-gradient(135deg, #ff3b3b 0%, #ff8a1f 55%, #ffcc1a 100%);
  mix-blend-mode: color; opacity: 0.85; transition: opacity 0.6s var(--ease);
}
.project__media:has(> img:not(.fit-contain))::before, .trainer__photo::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 2;
  background: linear-gradient(to top, rgb(10 11 16 / 0.55), transparent 45%);
}
.project:hover .project__media > img, .trainer__photo:hover > img, .yt:hover > img { filter: none; }
.project:hover .project__media::after, .trainer__photo:hover::after, .yt:hover::after { opacity: 0; }
.yt > img { filter: grayscale(0.6) contrast(1.05); opacity: 0.85; }
.yt::after { opacity: 0.45; }
.yt::before { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; background: linear-gradient(to top, rgb(10 11 16 / 0.92) 0%, rgb(10 11 16 / 0.6) 22%, transparent 45%); }
.yt.is-playing::before { display: none; }
.yt__play, .yt__title { z-index: 3; }
.yt__play, .yt__title { z-index: 2; }
.yt.is-playing::after { display: none; }
.trainer__photo { box-shadow: 0 0 0 1px rgb(255 138 31 / 0.35), 0 30px 60px -25px rgb(255 59 59 / 0.45); }

/* ---------- hero latest-project card ---------- */
.hero__latest {
  display: grid; gap: 10px; width: 280px; padding: 24px; border-radius: var(--radius); text-decoration: none;
  background: color-mix(in srgb, var(--surface) 72%, transparent); border: 1px solid var(--border);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); transition: transform 0.35s var(--ease), box-shadow 0.35s, border-color 0.35s;
}
.hero__latest:hover { transform: translateY(-4px); box-shadow: var(--glow); border-color: var(--border-strong); }
.hero__latest-art {
  height: 120px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 6px;
  background: radial-gradient(circle at 30% 20%, rgb(255 59 59 / 0.4), transparent 60%), radial-gradient(circle at 80% 90%, rgb(255 204 26 / 0.3), transparent 60%), var(--surface-2);
}
.hero__latest-art .icon { width: 56px; height: 56px; }
.hero__latest-art:has(img) { height: auto; aspect-ratio: 16 / 10; overflow: hidden; background: none; }
.hero__latest-art img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.hero__latest:hover .hero__latest-art img { transform: scale(1.05); }
.hero__latest strong { font-family: var(--font-display); font-size: var(--step-1); }
.hero__latest .muted { font-size: 0.9rem; line-height: 1.5; }
@media (max-width: 860px) { .hero__latest { width: auto; max-width: 420px; } .hero__latest-art { display: none; } }

/* ---------- tags ---------- */
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag--muted { color: var(--text-muted); background: var(--surface-2); border-color: var(--border-strong); }
.tag--new { color: #140600; background: var(--grad); border-color: transparent; justify-self: start; }

/* ---------- engines ---------- */
.engines { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.engine { padding: 24px; display: grid; gap: 16px; align-content: start; }
.engine h3 { font-size: var(--step-1); margin-bottom: 6px; }
.engine p { color: var(--text-muted); font-size: 0.95rem; }
.engine__mark {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; background: var(--surface-2); border: 1px solid var(--border-strong);
}
.engine__marks { display: flex; gap: 8px; }
.engine__mark .engine__logo { width: 28px; height: 28px; }
.engine__mark--unreal, .engine__mark--unity, .engine__mark--three { background: #fff; color: #0a0b10; border-color: transparent; }
.engine__mark--godot { background: #478cbf; color: #fff; border-color: transparent; }
.engine__mark--gamemaker { background: #000; color: #fff; border-color: rgb(255 255 255 / 0.2); }
.engine__mark--webgl { background: #990000; color: #fff; border-color: transparent; }
.engine--primary { grid-column: 1 / -1; grid-template-columns: auto 1fr; align-items: center; gap: 24px; padding: 32px; background: radial-gradient(80% 140% at 100% 0%, rgb(255 90 40 / 0.18), transparent 60%), var(--surface); }
.engine--primary .engine__mark { width: 80px; height: 80px; border: 0; box-shadow: 0 0 0 4px rgb(255 138 31 / 0.35), 0 12px 30px -10px rgb(255 90 40 / 0.6); }
.engine--primary .engine__logo { width: 48px; height: 48px; }
.engine--primary h3 { font-size: var(--step-2); }
.engine--primary p { font-size: 1rem; max-width: 70ch; }
@media (max-width: 960px) { .engines { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .engines { grid-template-columns: 1fr; } .engine--primary { grid-template-columns: 1fr; } }

/* ---------- books ---------- */
.books { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 24px; }
.book { display: grid; grid-template-rows: auto 1fr; gap: 20px; }
.book__cover {
  aspect-ratio: 3 / 4; max-width: 220px; border-radius: 6px 14px 14px 6px; padding: 22px 20px; display: grid; grid-template-rows: auto 1fr auto; gap: 12px;
  background: linear-gradient(160deg, var(--accent), color-mix(in srgb, var(--accent) 35%, #0a0b10) 75%);
  color: #fff; box-shadow: inset 6px 0 0 rgb(0 0 0 / 0.25), 0 24px 50px -20px rgb(0 0 0 / 0.6);
  transition: transform 0.4s var(--ease);
}
.book__cover--img { display: block; padding: 0; aspect-ratio: auto; overflow: hidden; background: none; border-radius: 4px 10px 10px 4px; box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.08), 0 24px 50px -20px rgb(0 0 0 / 0.7), 0 0 0 1px color-mix(in srgb, var(--accent) 40%, transparent); }
.book__cover--img img { width: 100%; height: auto; }
.book:hover .book__cover { transform: translateY(-6px) rotate(-1.5deg); }
.book__pub { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.85; }
.book__title { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; line-height: 1.15; align-self: center; text-wrap: balance; }
.book__author { font-size: 0.8rem; opacity: 0.85; }
.book__body { display: grid; gap: 8px; align-content: start; }
.book__meta { font-size: 0.82rem; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.08em; }
.book__body h3 { font-size: var(--step-1); }
.book__body > p:not(.book__meta) { color: var(--text-muted); font-size: 0.95rem; }
.book__links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }

.training-note { margin: 24px 0 0 !important; padding-top: 20px; border-top: 1px solid var(--border); font-size: 0.92rem; color: var(--text-faint) !important; }

/* ---------- learning hub ---------- */
.engine__mark--blender { background: #e87d0d; color: #fff; border-color: transparent; }
.engine__mark--affinityphoto { background: #4e3188; color: #fff; border-color: transparent; }
.engine__mark--audacity { background: #0000cc; color: #fff; border-color: transparent; }
.engine__mark--arduino { background: #00878f; color: #fff; border-color: transparent; }
.engine__mark--raspberrypi { background: #a22846; color: #fff; border-color: transparent; }
.engine__mark--cplusplus { background: #00599c; color: #fff; border-color: transparent; }

.series-card { overflow: hidden; display: flex; flex-direction: column; text-decoration: none; }
.series-card__thumb { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #000; }
.series-card__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.series-card:hover .series-card__thumb img { transform: scale(1.04); }
.series-card__count { position: absolute; right: 12px; bottom: 12px; padding: 4px 10px; border-radius: 999px; font-size: 0.78rem; font-weight: 600; background: rgb(10 11 16 / 0.85); color: #fff; }
.series-card__body { padding: 22px 24px 26px; display: grid; gap: 10px; }
.series-card__body h3 { font-size: var(--step-1); }
.series-card__body p { color: var(--text-muted); font-size: 0.95rem; }

.series { padding-block: clamp(40px, 6vw, 72px); border-top: 1px solid var(--border); scroll-margin-top: calc(var(--header-h) + 8px); }
.series:first-of-type { border-top: 0; padding-top: 0; }
.series__head { margin-bottom: 24px; max-width: 70ch; }
.series__head h2 { font-size: var(--step-3); margin: 12px 0 8px; }
.series__body { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(260px, 1fr); gap: 20px; align-items: start; }
@media (max-width: 860px) { .series__body { grid-template-columns: 1fr; } }
.episodes { list-style: none; padding: 0; display: grid; gap: 8px; max-height: 480px; overflow-y: auto; }
.episode {
  width: 100%; display: grid; grid-template-columns: 96px 1fr; gap: 12px; align-items: center; text-align: left;
  padding: 8px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); font-size: 0.92rem; color: var(--text-muted);
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.episode img { width: 96px; height: 54px; object-fit: cover; border-radius: 8px; }
.episode:hover { color: var(--text); border-color: var(--border-strong); }
.episode.is-active { color: var(--text); border-color: rgb(255 138 31 / 0.6); background: var(--surface-2); }

.course-card { padding: 26px; display: grid; gap: 12px; align-content: start; }
.course-card__top { display: flex; gap: 14px; align-items: center; }
.course-card h3 { font-size: var(--step-1); }
.course-card p { color: var(--text-muted); font-size: 0.95rem; }
.course-card__actions { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; margin-top: 6px; }

/* ---------- 404 ---------- */
.notfound { min-height: 80svh; display: grid; place-items: center; text-align: center; padding: calc(var(--header-h) + 40px) 0 80px; }
.notfound__code { font-family: var(--font-display); font-size: clamp(6rem, 22vw, 14rem); font-weight: 700; line-height: 0.9; letter-spacing: -0.05em; }
.notfound p { color: var(--text-muted); margin: 16px auto 32px; max-width: 46ch; }
.notfound .btn-row { justify-content: center; }

/* ---------- reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .js .reveal { opacity: 1; transform: none; }
  .marquee__track { animation: none; }
  .marquee { overflow-x: auto; }
}

/* courses site brand tag + compact hero */
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand__tag { font-family: var(--font-display); font-weight: 600; font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; background: var(--grad); color: #140600; }
.hero--compact { min-height: min(86svh, 760px); }
@media (max-width: 420px) { .brand__tag { display: none; } }
.engine__mark--unrealengine { background: #fff; color: #0a0b10; border-color: transparent; }
.engine__mark--godotengine { background: #478cbf; color: #fff; border-color: transparent; }

/* ===== Metaphora page (Metaphora brand, scoped) ===== */
.page-metaphora{--mx-violet:#5340ec;--mx-fire:#e05237;--mx-dark:#101322;--mx-ink:#25284f;--mx-indigo:#494f9c;--mx-muted:#5c5f7e;--mx-soft:#f4f4fb;--mx-line:#e4e4f0}
.page-metaphora main{font-family:"Quicksand",system-ui,sans-serif;color:var(--mx-ink);background:#fff}
.mx-h1,.mx-h2,.page-metaphora main h3{font-family:"Oswald",sans-serif;font-weight:600;text-transform:uppercase;letter-spacing:.01em;line-height:1.05;margin:0}
.mx-h1{font-size:clamp(2.4rem,5.5vw,4.4rem);color:#fff;margin:.4em 0 .35em}
.mx-h1 span{color:var(--mx-fire)}
.mx-h2{font-size:clamp(1.9rem,3.6vw,2.8rem);color:var(--mx-ink)}
.page-metaphora main h3{font-size:1.5rem;color:var(--mx-ink);margin:.35em 0 .4em}
.mx-eyebrow{font-family:"IBM Plex Mono",monospace;font-size:.78rem;letter-spacing:.14em;text-transform:uppercase;color:#b9bdf5;margin:0 0 .8rem}
.mx-eyebrow--dark{color:var(--mx-violet)}
.mx-lead{font-size:1.15rem;line-height:1.65;color:#d6d8ef;max-width:38em;font-weight:500}
.mx-lead strong{color:#fff}
.mx-hero{background:radial-gradient(1200px 600px at 85% 10%,rgba(83,64,236,.35),transparent 60%),linear-gradient(160deg,#151a33,var(--mx-dark) 60%);padding:clamp(3rem,7vw,6rem) 0}
.mx-hero__inner{display:grid;grid-template-columns:1.15fr .85fr;gap:3rem;align-items:center}
.mx-hero__media img{width:100%;height:auto;border-radius:14px;box-shadow:0 30px 80px rgba(0,0,0,.45)}
.mx-logo{height:46px;width:auto}
.mx-actions{display:flex;flex-wrap:wrap;gap:.8rem;margin-top:1.8rem}
.mx-btn{display:inline-flex;align-items:center;gap:.5rem;padding:.85rem 1.4rem;border-radius:6px;font-family:"Quicksand",sans-serif;font-weight:600;text-decoration:none;border:1.5px solid rgba(255,255,255,.35);color:#fff;transition:background .2s,border-color .2s,transform .2s}
.mx-btn:hover{border-color:#fff;transform:translateY(-1px)}
.mx-btn--primary{background:var(--mx-violet);border-color:var(--mx-violet)}
.mx-btn--primary:hover{background:#4330d8;border-color:#4330d8}
.mx-btn svg{width:1em;height:1em}
.mx-band{background:var(--mx-violet);color:#fff;padding:2rem 0}
.mx-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:1.5rem}
.mx-stats strong{display:block;font-family:"Oswald",sans-serif;font-size:1.6rem;text-transform:uppercase}
.mx-stats span{font-size:.92rem;opacity:.9;line-height:1.45}
.mx-section{padding:clamp(3.5rem,7vw,6rem) 0}
.mx-section--soft{background:var(--mx-soft)}
.mx-split{display:grid;grid-template-columns:.8fr 1.2fr;gap:3rem}
.mx-prose p,.mx-sub,.mx-project p,.mx-card p,.mx-team p{color:var(--mx-muted);line-height:1.7;font-size:1.05rem;font-weight:500}
.mx-prose strong{color:var(--mx-ink)}
.mx-head{max-width:44em;margin-bottom:2.5rem}
.mx-project{display:grid;grid-template-columns:1fr 1fr;gap:2.5rem;align-items:center;background:#fff;border:1px solid var(--mx-line);border-radius:14px;padding:1.5rem;margin-bottom:1.5rem}
.mx-project img{width:100%;height:320px;object-fit:cover;border-radius:10px}
.mx-project--flip img{order:2}
.mx-tag{display:inline-block;font-family:"IBM Plex Mono",monospace;font-size:.72rem;letter-spacing:.12em;text-transform:uppercase;color:var(--mx-violet);background:rgba(83,64,236,.1);padding:.3em .7em;border-radius:4px}
.mx-tag--fire{color:var(--mx-fire);background:rgba(224,82,55,.1)}
.mx-link{display:inline-flex;align-items:center;gap:.4rem;color:var(--mx-violet);font-weight:600;text-decoration:none}
.mx-link:hover{text-decoration:underline}
.mx-link svg{width:1em;height:1em}
.mx-grid{display:grid;grid-template-columns:1fr 1fr;gap:1.5rem}
.mx-card{background:#fff;border:1px solid var(--mx-line);border-radius:14px;overflow:hidden}
.mx-card img{width:100%;height:220px;object-fit:cover;display:block}
.mx-card__body{padding:1.5rem}
.mx-team{display:grid;grid-template-columns:1fr 1fr;gap:1.5rem}
.mx-team__col{border-top:3px solid var(--mx-violet);padding-top:1rem}
.mx-team__col:last-child{border-color:var(--mx-fire)}
.mx-cta{background:linear-gradient(160deg,var(--mx-ink),var(--mx-dark));color:#fff;text-align:center;padding:clamp(3.5rem,7vw,6rem) 0}
.mx-cta .mx-h2{color:#fff;margin:1.2rem 0 .6rem}
.mx-cta .mx-lead{margin:0 auto}
.mx-cta .mx-actions{justify-content:center}
@media (max-width:860px){
  .mx-hero__inner,.mx-split,.mx-project,.mx-grid,.mx-team{grid-template-columns:1fr}
  .mx-project--flip img{order:0}
  .mx-stats{grid-template-columns:1fr 1fr}
  .mx-project img{height:220px}
}

/* ---------- youtube: clean thumbnails, titles below (thumbnails carry their own text) ---------- */
.yt > img, .yt:hover > img { filter: none; opacity: 1; }
.yt::after { display: none; }
.yt::before { background: linear-gradient(to top, rgb(10 11 16 / 0.35), transparent 40%); transition: opacity 0.3s; }
.yt:hover::before { opacity: 0; }
.yt__play { width: 56px; height: 56px; left: auto; top: auto; right: 14px; bottom: 14px; translate: none; box-shadow: 0 6px 24px rgb(0 0 0 / 0.55); }
.yt__play .icon { width: 22px; height: 22px; margin-left: 3px; }
.yt-card { margin: 0; display: flex; flex-direction: column; gap: 12px; }
.yt-card__title { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; line-height: 1.35; color: var(--text); }

/* ---------- gallery card calls to action ---------- */
.project__media--live { display: block; cursor: pointer; }
.project__badge {
  position: absolute; z-index: 2; left: 12px; top: 12px; display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px 6px 10px; border-radius: 999px; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  background: var(--grad); color: #140600; box-shadow: 0 6px 20px -6px rgb(255 80 40 / 0.8);
}
.project__badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #140600; animation: live-pulse 1.6s ease-in-out infinite; }
.project__badge .icon { display: none; }
@keyframes live-pulse { 50% { opacity: 0.25; } }
@media (prefers-reduced-motion: reduce) { .project__badge::before { animation: none; } }
.project__cta { gap: 8px; }
.project__cta.btn--ghost { border-color: rgb(255 138 31 / 0.55); color: var(--text); }
.project__cta.btn--ghost .icon { color: var(--orange); }
.project__cta.btn--ghost:hover { border-color: var(--orange); background: rgb(255 138 31 / 0.1); }
.project:hover .project__cta.btn--primary { box-shadow: 0 14px 36px -10px rgb(255 80 40 / 0.85); }

/* ---------- in-page video player ---------- */
.video-modal { margin: auto; width: min(1100px, calc(100vw - 32px)); max-width: none; max-height: calc(100dvh - 32px); padding: 0; border: 1px solid var(--border-strong); border-radius: 18px; background: #000; color: var(--text); overflow: hidden; box-shadow: 0 40px 100px -20px rgb(0 0 0 / 0.8), 0 0 0 1px rgb(255 138 31 / 0.15); }
.video-modal::backdrop { background: rgb(5 6 10 / 0.82); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.video-modal[open] { animation: video-in 0.35s var(--ease); }
@keyframes video-in { from { opacity: 0; transform: translateY(16px) scale(0.98); } }
.video-modal__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 10px 10px 18px; background: var(--surface); border-bottom: 1px solid var(--border); }
.video-modal__title { font-family: var(--font-display); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.video-modal__close { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text); cursor: pointer; }
.video-modal__close:hover { border-color: var(--orange); }
.video-modal__close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.video-modal__frame { aspect-ratio: 16 / 9; background: #000; }
.video-modal__frame iframe { display: block; width: 100%; height: 100%; border: 0; }
html.has-modal { overflow: hidden; }
@media (prefers-reduced-motion: reduce) { .video-modal[open] { animation: none; } }

/* hero latest-project card with video */
.hero__latest { text-decoration: none; }
.hero__latest:hover { transform: none; }
.hero__latest-art--video { position: relative; display: block; cursor: pointer; }
.hero__latest-play { position: absolute; inset: 0; margin: auto; width: 56px; height: 56px; display: grid; place-items: center; border-radius: 50%; background: var(--grad); color: #140600; box-shadow: 0 10px 30px -8px rgb(255 80 40 / 0.9); transition: transform 0.3s var(--ease); }
.hero__latest-play .icon { width: 22px; height: 22px; margin-left: 3px; }
.hero__latest-art--video:hover .hero__latest-play { transform: scale(1.1); }
.hero__latest-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 4px; }
@media (max-width: 860px) { .hero__latest-art--video { display: block; } }
