:root {
  color-scheme: dark;
  --bg: #020309;
  --bg-deep: #080510;
  --panel: #0a0717;
  --panel-2: #120538;
  --panel-3: #29282d;
  --text: #f1edf8;
  --muted: #d6cedf;
  --quiet: #a99fb5;
  --heading: linear-gradient(96deg, #a875ff 8%, #8ddfff 92%);
  --accent: #a875ff;
  --accent-2: #8ddfff;
  --line: rgba(255, 255, 255, 0.1);
  --button-text: #08040f;
  --soft-shadow: 0 28px 80px rgba(0, 0, 0, 0.28);
  --section-pad: clamp(52px, 6vw, 88px);
  --content: min(1034px, calc(100vw - 48px));
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f7f9ff;
  --bg-deep: #ffffff;
  --panel: #f0f4ff;
  --panel-2: #e8dcff;
  --panel-3: #eef1f8;
  --text: #0b0c16;
  --muted: #313447;
  --quiet: #5d6173;
  --heading: linear-gradient(96deg, #6d3cff 6%, #007d9f 94%);
  --accent: #7445ec;
  --accent-2: #0186a8;
  --line: rgba(8, 12, 30, 0.13);
  --button-text: #08040f;
  --soft-shadow: 0 28px 80px rgba(66, 79, 122, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Noto Sans TC", Inter, system-ui, sans-serif;
  font-size: 18px;
  line-height: 1.55;
  transition: background-color 220ms ease, color 220ms ease;
}

main {
  flex: 1 0 auto;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 14% 18%, rgba(106, 65, 255, 0.22), transparent 28%),
    radial-gradient(circle at 85% 12%, rgba(104, 223, 255, 0.13), transparent 30%),
    var(--bg);
}

:root[data-theme="light"] body::before {
  background:
    radial-gradient(circle at 10% 10%, rgba(123, 92, 255, 0.16), transparent 30%),
    radial-gradient(circle at 84% 4%, rgba(88, 210, 239, 0.22), transparent 28%),
    var(--bg);
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: Sora, "Noto Sans TC", system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.16;
}

h1,
h2 {
  background: var(--heading);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

h1 {
  font-size: clamp(26px, 3vw, 42px);
  max-width: 600px;
}

h1 span {
  display: block;
}

h2 {
  font-size: clamp(24px, 2.8vw, 38px);
}

h3 {
  color: var(--text);
  font-size: clamp(17px, 1.6vw, 22px);
}

p {
  margin: 0;
  color: var(--muted);
}

strong {
  color: var(--text);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 36px;
  padding: 12px max(28px, calc((100vw - 1160px) / 2));
  min-height: 76px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.brand img {
  width: 54px;
  height: 54px;
  object-fit: contain;
}

:root[data-theme="light"] .brand img {
  filter: invert(1);
}

.brand span {
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 700;
  line-height: 1;
}

.nav {
  display: flex;
  gap: 28px;
  align-items: center;
  font-size: 16px;
  color: var(--muted);
}

.nav a {
  position: relative;
  padding: 9px 0;
  text-decoration: none;
  transition: color 160ms ease, transform 180ms cubic-bezier(0.23, 1, 0.32, 1);
}

.nav a:hover {
  transform: translateY(-1px);
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 240ms cubic-bezier(0.23, 1, 0.32, 1);
}

.nav a:hover::after,
.nav a.active::after {
  transform: scaleX(1);
}

.nav a.active {
  color: color-mix(in srgb, var(--accent-2) 58%, var(--text));
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0;
  width: max-content;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px;
  background: color-mix(in srgb, var(--panel-3) 72%, transparent);
  color: var(--text);
  font: 700 13px/1 "Noto Sans TC", system-ui, sans-serif;
  cursor: pointer;
  flex-shrink: 0;
  margin-left: auto;
}

.toggle-label {
  display: none;
}

.toggle-track {
  position: relative;
  width: 45px;
  height: 25px;
  border-radius: 999px;
  background: linear-gradient(90deg, #2d2445, #4b365d);
  box-shadow: inset 0 0 0 1px var(--line);
}

.toggle-thumb {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #fff;
  transition: transform 180ms ease;
}

:root[data-theme="light"] .toggle-track {
  background: linear-gradient(90deg, #a875ff, #8ddfff);
}

:root[data-theme="light"] .toggle-thumb {
  transform: translateX(20px);
}

.section {
  padding: var(--section-pad) max(24px, calc((100vw - 1034px) / 2));
  background: var(--bg);
}

.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(36px, 6vw, 72px);
  align-items: stretch;
}

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

.hero-copy {
  padding-top: 0;
}

.hero-media {
  margin: 0;
  display: flex;
}

.hero-media img {
  width: 100%;
  height: 100%;
  min-height: 360px;
  object-fit: cover;
  object-position: center top;
  border-radius: 10px;
  box-shadow: var(--soft-shadow);
  display: block;
}

.wide {
  max-width: var(--content);
}

.intro-section {
  border-top: 1px solid var(--line);
}

.intro-section .copy {
  gap: 28px;
}

.feature-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 54px);
  margin-top: 46px;
}

.feature-row article {
  display: grid;
  align-content: start;
  gap: 18px;
}

.ribbon {
  position: relative;
  display: grid;
  place-items: center;
  height: 72px;
  background: var(--panel-3);
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 50%, calc(100% - 18px) 100%, 0 100%, 18px 50%);
}

.ribbon img,
.icon-row article > img {
  width: 38px;
  height: 38px;
  opacity: 0.92;
  filter: brightness(0) invert(1);
}

:root[data-theme="light"] .ribbon img,
:root[data-theme="light"] .icon-row article > img {
  filter: none;
  opacity: 0.9;
}

.plain-row {
  margin-top: 82px;
}

.plain-row h3,
.icon-row h3 {
  color: color-mix(in srgb, var(--accent) 72%, var(--accent-2));
}

.purple-section {
  background: linear-gradient(180deg, var(--panel-2), color-mix(in srgb, var(--panel-2) 88%, var(--bg)));
}

.purple-section h2 {
  margin-bottom: 42px;
}

.icon-row article {
  grid-template-columns: 42px 1fr;
  gap: 14px 18px;
}

.icon-row article p {
  grid-column: 2;
}

.icon-row article > img {
  align-self: start;
  padding: 5px;
  background: color-mix(in srgb, var(--text) 10%, transparent);
}

.outro {
  margin-top: 42px;
}

.standards {
  background: #9bb7f5;
  color: #050609;
}

:root[data-theme="light"] .standards {
  background: #dce7ff;
}

.standards h2,
.standards h3,
.standards p {
  color: #050609;
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
}

.standards h2 {
  max-width: 900px;
}

.standards-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 440px);
  gap: clamp(40px, 8vw, 94px);
  align-items: start;
  margin-top: 56px;
}

.standards-grid img {
  width: 100%;
  aspect-ratio: 1.43;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 24px 60px rgba(40, 54, 104, 0.22);
}

.timeline {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
  margin-top: 72px;
  padding-top: 0;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 21px;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(4, 5, 10, 0.56);
}

.timeline article {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  padding-top: 62px;
}

.timeline span,
.number-row span {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 3px;
  background: #292934;
  color: #f4f1f7;
  font: 700 27px/1 Sora, system-ui, sans-serif;
}

.timeline span {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
}


.partnership {
  background: linear-gradient(180deg, var(--panel-2), color-mix(in srgb, var(--panel-2) 92%, var(--bg)));
}

.number-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(34px, 5vw, 70px);
  margin-top: 54px;
}

.number-row article {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 14px 18px;
}

.number-row article p {
  grid-column: 2;
}

.image-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 32px;
}

.image-grid img {
  width: 100%;
  aspect-ratio: 1.2;
  object-fit: cover;
  border-radius: 2px;
}

.revolution {
  background: var(--panel-2);
}

.revolution-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 390px);
  gap: clamp(32px, 6vw, 72px);
  align-items: start;
  margin-top: 52px;
}

.mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px 42px;
}

.mini-grid article {
  display: grid;
  gap: 14px;
}

.mini-grid h3 {
  color: color-mix(in srgb, var(--accent) 74%, var(--accent-2));
}

.revolution-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: var(--soft-shadow);
}

.shape-next {
  display: grid;
  gap: 18px;
  max-width: 820px;
  margin-top: 54px;
}

.shape-next h3 {
  color: color-mix(in srgb, var(--accent-2) 68%, var(--text));
}

.page-title {
  display: grid;
  min-height: 190px;
  padding-top: clamp(34px, 5vw, 56px);
  padding-bottom: clamp(34px, 5vw, 56px);
  place-items: center;
  text-align: center;
  background: var(--panel-2);
}

.page-title h1 {
  font-size: clamp(38px, 4.6vw, 64px);
}

.vision-outcomes,
.transform,
.courses,
.leadership,
.contact-hero {
  background: var(--bg);
}

.vision-outcomes,
.courses,
.leadership {
  padding-top: clamp(36px, 5vw, 64px);
}

.outcome-grid,
.dual-copy,
.image-card-grid,
.course-grid {
  display: grid;
  gap: 22px;
  margin-top: 46px;
}

.outcome-grid {
  grid-template-columns: 1.3fr 1fr 1fr;
}

.outcome-grid article,
.dual-copy article,
.image-card-grid article,
.course-grid article {
  display: grid;
  align-content: start;
  gap: 16px;
  padding: 22px;
  background: color-mix(in srgb, var(--panel-3) 48%, transparent);
  border: 1px solid var(--line);
  border-radius: 2px;
}

.split-panel,
.leader-grid,
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 440px);
  gap: clamp(36px, 7vw, 80px);
  align-items: start;
}

.vision-outcomes .split-panel {
  margin-top: 54px;
}

.split-panel img,
.leader-grid img {
  width: 100%;
  border-radius: 2px;
  object-fit: cover;
  box-shadow: var(--soft-shadow);
}

.split-panel img,
.leader-grid img {
  aspect-ratio: 1.15;
}

.dual-copy {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.transform {
  background: linear-gradient(180deg, var(--bg), var(--panel-2));
}

.image-card-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.image-card-grid img,
.course-grid img {
  width: 100%;
  aspect-ratio: 1.2;
  object-fit: cover;
  border-radius: 2px;
}

.courses h1 {
  margin-bottom: 44px;
}

.course-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.course-grid article {
  padding: 14px;
}

.course-grid h3 {
  font-size: 22px;
}

.course-grid p {
  font-size: 16px;
}

.crisis {
  background: var(--panel-2);
}

.leadership {
  min-height: 760px;
}

.leader-grid img {
  aspect-ratio: 0.82;
  object-position: center top;
}

.contact-grid {
  align-items: start;
  grid-template-columns: minmax(0, 0.85fr) minmax(300px, 410px);
  gap: clamp(24px, 5vw, 56px);
}

.contact-hero {
  padding-top: clamp(28px, 4vw, 48px);
  padding-bottom: clamp(24px, 4vw, 46px);
}

.contact-hero .copy {
  gap: 14px;
}

.contact-hero h1 {
  font-size: clamp(26px, 3vw, 42px);
  max-width: 500px;
}

.contact-hero .mail-link {
  margin-top: 26px;
}

.mail-link {
  width: max-content;
  color: color-mix(in srgb, var(--accent-2) 62%, var(--text));
  font-weight: 700;
  font-size: clamp(15px, 1.3vw, 18px);
}

.contact-form {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 16px 18px 18px;
  background: color-mix(in srgb, var(--panel-3) 48%, transparent);
  border: 1px solid var(--line);
  border-radius: 2px;
}

.contact-form label {
  display: grid;
  gap: 6px;
  color: var(--text);
  font-size: clamp(13px, 1.1vw, 15px);
  font-weight: 600;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 2px;
  min-height: 38px;
  padding: 8px 10px;
  background: color-mix(in srgb, var(--bg) 82%, var(--text) 4%);
  color: var(--text);
  font: inherit;
}

.contact-form textarea {
  min-height: 84px;
  resize: vertical;
}

.contact-form .button {
  border: 0;
  width: 160px;
  cursor: pointer;
}

.site-footer {
  position: relative;
  flex-shrink: 0;
  display: grid;
  grid-template-columns: 1.3fr 0.8fr 1fr;
  gap: 42px;
  min-height: 230px;
  padding: 42px max(24px, calc((100vw - 1034px) / 2));
  overflow: hidden;
  background: var(--bg);
  border-top: 1px solid var(--line);
}

.footer-brand,
.footer-cta,
.footer-nav {
  display: grid;
  align-content: start;
  gap: 16px;
}

.footer-brand .brand {
  margin-bottom: 4px;
}

.footer-brand a:not(.brand) {
  width: max-content;
  color: color-mix(in srgb, var(--accent-2) 52%, var(--text));
  font-weight: 700;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-nav a {
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  transition: color 180ms ease;
}

.footer-nav a:hover {
  color: var(--accent-2);
}

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 178px;
  min-height: 42px;
  border-radius: 2px;
  background: linear-gradient(96deg, #a875ff, #8ddfff);
  color: var(--button-text);
  font-weight: 800;
  text-align: center;
  text-decoration: none;
  transition: transform 160ms cubic-bezier(0.23, 1, 0.32, 1), opacity 160ms ease;
}

.button:hover {
  opacity: 0.9;
}

.button:active {
  transform: scale(0.97);
}

.linkedin-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: max-content;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 2px;
  background: #0a66c2;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  transition: opacity 160ms ease, transform 160ms cubic-bezier(0.23, 1, 0.32, 1);
}

.linkedin-button svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  flex-shrink: 0;
}

.linkedin-button:hover {
  opacity: 0.9;
}

.linkedin-button:active {
  transform: scale(0.97);
}

@media (max-width: 960px) {
  body {
    font-size: 17px;
  }

  .site-header {
    flex-wrap: wrap;
    gap: 8px 16px;
  }

  .nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .theme-toggle {
    order: 2;
    margin-left: auto;
  }

  .hero,
  .standards-grid,
  .revolution-grid,
  .site-footer,
  .split-panel,
  .leader-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 0;
    align-items: start;
  }

  .hero-media img {
    height: auto;
    min-height: 0;
    aspect-ratio: 16 / 9;
  }

  .feature-row,
  .number-row,
  .image-grid,
  .outcome-grid,
  .dual-copy,
  .image-card-grid,
  .course-grid {
    grid-template-columns: 1fr;
  }

  .timeline {
    grid-template-columns: 1fr;
    gap: 42px;
    padding-top: 0;
  }

  .timeline::before {
    left: 20px;
    right: auto;
    top: 0;
    bottom: 0;
    width: 2px;
    height: auto;
  }

  .timeline article,
  .timeline article:nth-child(even) {
    padding: 0 0 0 72px;
    text-align: left;
    align-items: flex-start;
  }

  .timeline span {
    top: 0;
    left: 0;
    transform: none;
  }
}

@media (max-width: 640px) {
  :root {
    --section-pad: 52px;
  }

  .site-header {
    gap: 14px;
    padding: 12px 18px;
  }

  .brand span {
    font-size: 20px;
  }

  .brand img {
    width: 44px;
    height: 44px;
  }

  .theme-toggle {
    padding-right: 7px;
  }

  .toggle-label {
    display: none;
  }

  .nav {
    gap: 18px;
    font-size: 15px;
  }

  .section {
    padding-left: 20px;
    padding-right: 20px;
  }

  .mini-grid {
    grid-template-columns: 1fr;
  }

  .icon-row article,
  .number-row article {
    grid-template-columns: 1fr;
  }

  .icon-row article p,
  .number-row article p {
    grid-column: auto;
  }
}

/* ──────────────────────────────────────────────────────────
   Motion system — Emil Kowalski principles
   Only transform + opacity (GPU-only, no layout/paint)
   ────────────────────────────────────────────────────────── */

:root {
  --ease-out:    cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
}

/* ── Hero entrance ────────────────────────────────────────
   Plays once on page load. Staggered so copy arrives first,
   then the image follows 120ms later. */
@keyframes vt-fade-up {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0);    }
}

.hero-copy {
  animation: vt-fade-up 600ms var(--ease-out) both;
}

.hero-media {
  animation: vt-fade-up 600ms var(--ease-out) 120ms both;
}

/* ── Hero image float ─────────────────────────────────────
   Gentle, slow float — decorative, never distracting. */
@keyframes vt-float {
  0%, 100% { transform: translateY(0);    }
  50%       { transform: translateY(-10px); }
}

.hero-media img {
  animation: vt-float 7s ease-in-out infinite;
}

/* ── Scroll reveal ────────────────────────────────────────
   Applied via JS IntersectionObserver. Elements start
   invisible and slide up; .is-visible plays them in. */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity  520ms var(--ease-out),
    transform 520ms var(--ease-out);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger delays — applied to direct children of .stagger-group */
.stagger-group .reveal:nth-child(1) { transition-delay:   0ms; }
.stagger-group .reveal:nth-child(2) { transition-delay:  70ms; }
.stagger-group .reveal:nth-child(3) { transition-delay: 140ms; }
.stagger-group .reveal:nth-child(4) { transition-delay: 210ms; }
.stagger-group .reveal:nth-child(5) { transition-delay: 280ms; }
.stagger-group .reveal:nth-child(6) { transition-delay: 350ms; }

/* ── Ribbon icon hover ────────────────────────────────────
   Small scale on the icon container; the parent article
   gets a border glow already via existing styles, this
   adds a tactile icon response. */
.ribbon {
  transition: transform 220ms var(--ease-out);
}

article:hover .ribbon {
  transform: scale(1.1);
}

/* ── Footer brand hover ───────────────────────────────────
   Subtle scale so the logo feels clickable. */
.footer-brand a {
  display: inline-block;
  transition: transform 200ms var(--ease-out), opacity 200ms ease;
}

.footer-brand a:hover {
  transform: scale(1.04);
  opacity: 0.85;
}

/* ── Theme toggle pop ─────────────────────────────────────
   Quick press feedback on the toggle. */
.theme-toggle:active {
  transform: scale(0.92);
}

.theme-toggle {
  transition: transform 120ms var(--ease-out), opacity 160ms ease;
}

/* ── prefers-reduced-motion ───────────────────────────────
   Reduced motion ≠ no motion. Keep opacity fades (they
   aid comprehension); remove all translate/scale motion. */
@media (prefers-reduced-motion: reduce) {
  .hero-copy,
  .hero-media {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .hero-media img {
    animation: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: opacity 220ms ease;
  }

  .stagger-group .reveal:nth-child(n) {
    transition-delay: 0ms;
  }

  .ribbon {
    transition: none;
  }

  .nav a {
    transition: color 160ms ease;
  }

}
