/* =========================================================
   香港職業技能培訓有限公司 — HKVST
   Warm, community-focused one-page site
   ========================================================= */

:root {
  /* palette — tuned to the HKVST logo (blue + green) */
  --primary: #0070BB;
  --primary-dark: #0049AC;
  --primary-soft: #D6E9F7;
  --secondary: #46AD6A;
  --secondary-dark: #2E7D4B;
  --accent: #3DB8C4;
  --bg: #F5F9FC;
  --bg-alt: #E9F1F8;
  --surface: #FFFFFF;
  --ink: #17324A;
  --muted: #5C7488;
  --line: #DBE6F0;
  --shadow-sm: 0 4px 14px rgba(23, 50, 74, .07);
  --shadow-md: 0 14px 38px rgba(23, 50, 74, .12);

  /* type */
  --font-sans: "Noto Sans TC", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang TC", "Microsoft JhengHei", sans-serif;
  --font-serif: "Noto Serif TC", Georgia, "PingFang TC", "Microsoft JhengHei", serif;

  /* metrics */
  --radius: 18px;
  --radius-sm: 12px;
  --container: 1140px;
  --header-h: 76px;
  --ease: cubic-bezier(.4, 0, .2, 1);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.8;
  color: var(--ink);
  background: var(--bg);
}

img { max-width: 100%; display: block; }
a { color: var(--primary-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--font-serif); line-height: 1.3; margin: 0 0 .5em; }

.container { width: min(100% - 2.5rem, var(--container)); margin-inline: auto; }

.skip-link {
  position: absolute; left: 1rem; top: -60px; z-index: 999;
  background: var(--ink); color: #fff; padding: .6rem 1rem; border-radius: 0 0 10px 10px;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 0; }

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

/* ============ HEADER ============ */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--header-h);
  background: rgba(245, 249, 252, .85);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease), background .3s var(--ease);
}
.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 4px 20px rgba(23, 50, 74, .06);
}
.header-inner { height: 100%; display: flex; align-items: center; gap: 1rem; }

.brand { display: flex; align-items: center; gap: .7rem; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-mark { flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-family: var(--font-serif); font-size: 1.02rem; font-weight: 700; }
.brand-text small { font-size: .68rem; color: var(--muted); letter-spacing: .02em; }

.nav { margin-left: auto; display: flex; gap: .25rem; }
.nav a {
  color: var(--ink); font-weight: 500; font-size: .95rem;
  padding: .5rem .8rem; border-radius: 999px; transition: background .2s var(--ease), color .2s var(--ease);
}
.nav a:hover { background: var(--bg-alt); text-decoration: none; }
.nav a.is-active { color: var(--primary-dark); background: var(--primary-soft); }

.header-actions { display: flex; align-items: center; gap: .6rem; }

.lang-toggle {
  display: flex; align-items: center; gap: .25rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  padding: .3rem .55rem; cursor: pointer; font: inherit; font-size: .85rem; font-weight: 700;
  color: var(--muted);
}
.lang-opt { padding: 0 .15rem; transition: color .2s var(--ease); }
.lang-opt.is-active { color: var(--primary-dark); }
.lang-sep { color: var(--line); }

.menu-toggle {
  display: none; flex-direction: column; gap: 5px; justify-content: center;
  width: 44px; height: 44px; border: 1px solid var(--line); background: var(--surface);
  border-radius: 12px; cursor: pointer; padding: 0 11px;
}
.menu-toggle span { height: 2px; background: var(--ink); border-radius: 2px; transition: transform .3s var(--ease), opacity .3s var(--ease); }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============ HERO ============ */
.hero { position: relative; padding: calc(var(--header-h) + 3.5rem) 0 5rem; overflow: hidden; }
.hero-bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 80% at 85% 10%, rgba(61, 184, 196, .30), transparent 60%),
    radial-gradient(50% 70% at 5% 90%, rgba(70, 173, 106, .28), transparent 60%),
    linear-gradient(180deg, #EAF3FB 0%, var(--bg) 100%);
}
.hero-inner { display: grid; grid-template-columns: 1.15fr .85fr; gap: 3rem; align-items: center; }

.badge {
  display: inline-block; font-size: .82rem; font-weight: 700; letter-spacing: .02em;
  color: var(--primary-dark); background: var(--primary-soft);
  padding: .35rem .9rem; border-radius: 999px; margin: 0 0 1.1rem;
}
.hero-title { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 900; letter-spacing: .04em; margin-bottom: .4em; }
.hero-lead { font-size: 1.1rem; color: var(--muted); max-width: 34ch; margin: 0 0 1.8rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-bottom: 2rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font: inherit; font-weight: 700; font-size: .98rem; cursor: pointer;
  padding: .8rem 1.6rem; border-radius: 999px; border: 2px solid transparent;
  transition: transform .18s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease), color .2s var(--ease);
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 10px 24px rgba(0, 112, 187, .33); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary-dark); }
.btn-block { width: 100%; }

.hero-stats { list-style: none; display: flex; gap: 2.4rem; padding: 0; margin: 0; }
.hero-stats li { display: flex; flex-direction: column; }
.stat-num { font-family: var(--font-serif); font-size: 1.7rem; font-weight: 900; color: var(--primary-dark); line-height: 1; }
.stat-label { font-size: .82rem; color: var(--muted); margin-top: .35rem; }

.hero-art { position: relative; height: 360px; }
.art-blob {
  position: absolute; inset: 12% 8%; border-radius: 50% 42% 58% 48% / 46% 54% 46% 54%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 55%, var(--secondary) 100%);
  opacity: .22; filter: blur(2px); animation: blob 12s ease-in-out infinite;
}
@keyframes blob {
  0%, 100% { border-radius: 50% 42% 58% 48% / 46% 54% 46% 54%; transform: rotate(0); }
  50% { border-radius: 44% 56% 44% 56% / 56% 44% 56% 44%; transform: rotate(8deg); }
}
.art-card {
  position: absolute; display: grid; place-items: center;
  width: 132px; height: 132px; border-radius: 26px;
  background: var(--surface); box-shadow: var(--shadow-md);
  animation: float 6s ease-in-out infinite;
}
.art-1 { top: 6%; left: 8%; animation-delay: 0s; }
.art-2 { top: 34%; right: 4%; width: 150px; height: 150px; animation-delay: -2s; }
.art-3 { bottom: 4%; left: 22%; animation-delay: -4s; }
.art-ico { font-size: 3rem; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }

/* ============ SECTION ============ */
.section { padding: 5.5rem 0; }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 720px; margin-bottom: 2.8rem; }
.section-head.center { margin-inline: auto; text-align: center; }
.eyebrow {
  display: inline-block; font-size: .85rem; font-weight: 700; letter-spacing: .12em;
  color: var(--secondary-dark); text-transform: uppercase; margin: 0 0 .6rem;
}
.section-title { font-size: clamp(1.7rem, 3.4vw, 2.4rem); font-weight: 900; margin-bottom: .4em; }
.section-sub { color: var(--muted); font-size: 1.02rem; margin: 0; }
.sub-title { font-size: 1.15rem; font-weight: 700; margin-bottom: 1rem; }

/* ============ ABOUT ============ */
.about-grid { display: grid; grid-template-columns: 1fr; gap: 2.6rem; align-items: start; }
.about-main { max-width: 760px; }
.about-main > p { color: var(--muted); }
.mission { margin-top: 2rem; }
.mission-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.mission-list li { display: flex; gap: 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 1.1rem 1.2rem; box-shadow: var(--shadow-sm); }
.mission-list strong { display: block; font-size: 1.02rem; }
.mission-list p { margin: .1rem 0 0; font-size: .95rem; color: var(--muted); }
.m-ico { flex: none; font-family: var(--font-serif); font-weight: 900; font-size: 1.1rem; color: var(--primary); background: var(--primary-soft); width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; }

/* ============ COURSES ============ */
.filters { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 2rem; }
.filter {
  font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer;
  padding: .5rem 1.1rem; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--muted); transition: all .2s var(--ease);
}
.filter:hover { border-color: var(--primary); color: var(--primary-dark); }
.filter.is-active { background: var(--primary); border-color: var(--primary); color: #fff; }

.course-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.course-card {
  text-align: left; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; cursor: pointer; padding: 0;
  font: inherit; color: inherit; box-shadow: var(--shadow-sm);
  transition: transform .22s var(--ease), box-shadow .22s var(--ease);
  display: flex; flex-direction: column;
}
.course-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.course-card.is-hidden { display: none; }
.card-top { height: 96px; display: flex; align-items: center; gap: .8rem; padding: 0 1.3rem; color: #fff; }
.card-top .c-emoji { font-size: 2rem; }
.card-cat { font-size: .75rem; font-weight: 700; letter-spacing: .06em; opacity: .95; text-transform: uppercase; }
.card-body { padding: 1.1rem 1.3rem 1.3rem; display: flex; flex-direction: column; flex: 1; }
.card-title { font-family: var(--font-serif); font-size: 1.08rem; font-weight: 700; margin: 0 0 .5rem; }
.card-desc { font-size: .92rem; color: var(--muted); margin: 0 0 1rem; flex: 1; }
.card-more { font-size: .85rem; font-weight: 700; color: var(--primary-dark); }

.cat-cert .card-top { background: linear-gradient(135deg, #0070BB, #0049AC); }
.cat-lang .card-top { background: linear-gradient(135deg, #46AD6A, #2E7D4B); }
.cat-senior .card-top { background: linear-gradient(135deg, #3DB8C4, #1E8A97); }
.cat-art .card-top { background: linear-gradient(135deg, #8A6BC8, #6A4BA0); }
.cat-career .card-top { background: linear-gradient(135deg, #4A6FA5, #2F4E78); }

/* ============ COMMUNITY ============ */
.community-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 1.4rem; margin-bottom: 2.4rem; }
.feature-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 2rem; box-shadow: var(--shadow-sm); }
.feature-mark { font-size: 2.2rem; margin-bottom: .6rem; }
.feature-card h3 { font-size: 1.25rem; }
.feature-card p { color: var(--muted); margin-bottom: 1rem; }
.pill { display: inline-block; font-size: .8rem; font-weight: 700; color: var(--secondary-dark); background: rgba(70,173,106,.16); padding: .25rem .8rem; border-radius: 999px; }

.partners { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem 2rem; box-shadow: var(--shadow-sm); }
.partners-label { display: block; font-size: .85rem; font-weight: 700; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; margin-bottom: .9rem; }
.partner-list { list-style: none; display: flex; flex-wrap: wrap; gap: .6rem; padding: 0; margin: 0; }
.partner-list li { background: var(--bg-alt); border: 1px solid var(--line); border-radius: 999px; padding: .45rem 1rem; font-size: .9rem; font-weight: 600; }

/* ============ NEWS ============ */
.news-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.news-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem 1.7rem; box-shadow: var(--shadow-sm); transition: transform .2s var(--ease); }
.news-item:hover { transform: translateX(4px); }
.news-meta { display: flex; align-items: center; gap: .8rem; margin-bottom: .5rem; }
.news-tag { font-size: .76rem; font-weight: 700; color: #fff; background: var(--secondary); padding: .2rem .7rem; border-radius: 999px; }
.news-meta time { font-size: .82rem; color: var(--muted); }
.news-item h3 { font-size: 1.15rem; margin-bottom: .3rem; }
.news-item p { margin: 0; color: var(--muted); font-size: .95rem; }

/* ============ SUPPORT ============ */
.support-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.support-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 2rem; box-shadow: var(--shadow-sm); text-align: center; transition: transform .2s var(--ease); }
.support-card:hover { transform: translateY(-5px); }
.support-ico { font-size: 2.4rem; margin-bottom: .6rem; }
.support-card h3 { font-size: 1.15rem; }
.support-card p { color: var(--muted); font-size: .95rem; margin: 0; }

/* ============ CONTACT ============ */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2.4rem; align-items: start; }
.contact-list { list-style: none; padding: 0; margin: 0 0 1.6rem; display: grid; gap: 1rem; }
.contact-list li { display: flex; gap: .9rem; }
.contact-list strong { display: block; font-size: .82rem; color: var(--muted); font-weight: 700; letter-spacing: .04em; }
.contact-list p { margin: 0; }
.c-ico { flex: none; font-size: 1.2rem; width: 44px; height: 44px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.map-wrap { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.map-wrap iframe { width: 100%; height: 260px; border: 0; display: block; }

.contact-form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 2rem; box-shadow: var(--shadow-sm); }
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-size: .88rem; font-weight: 700; margin-bottom: .4rem; }
.field input, .field textarea {
  width: 100%; font: inherit; font-size: .98rem; color: var(--ink);
  padding: .75rem .9rem; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--bg); transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,112,187,.18); }
.field textarea { resize: vertical; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-note { margin: .9rem 0 0; font-size: .9rem; font-weight: 600; min-height: 1.2em; }
.form-note.ok { color: var(--secondary-dark); }
.form-note.err { color: var(--primary-dark); }

/* ============ FOOTER ============ */
.site-footer { background: var(--ink); color: rgba(255,255,255,.82); padding: 3rem 0 1.5rem; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2rem; padding-bottom: 2rem; border-bottom: 1px solid rgba(255,255,255,.12); }
.footer-brand { display: flex; gap: 1rem; align-items: flex-start; }
.footer-brand strong { font-family: var(--font-serif); color: #fff; font-size: 1.05rem; }
.footer-brand p { margin: .3rem 0 0; font-size: .88rem; color: rgba(255,255,255,.6); max-width: 34ch; }
.footer-brand img { flex: none; background: #fff; border-radius: 10px; padding: 4px 6px; box-sizing: content-box; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 1.2rem; align-content: flex-start; }
.footer-nav a { color: rgba(255,255,255,.8); font-size: .92rem; }
.footer-nav a:hover { color: #fff; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; padding-top: 1.5rem; font-size: .82rem; color: rgba(255,255,255,.55); }
.footer-bottom p { margin: 0; }

/* ============ FLOATERS ============ */
.floaters { position: fixed; right: 1.1rem; bottom: 1.1rem; z-index: 90; display: flex; flex-direction: column; gap: .6rem; }
.floater {
  width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface); color: var(--primary-dark); border: 1px solid var(--line);
  box-shadow: var(--shadow-md); cursor: pointer; transition: transform .2s var(--ease), background .2s var(--ease), color .2s var(--ease);
}
.floater:hover { transform: translateY(-3px); text-decoration: none; }
.floater svg { fill: currentColor; }
.floater-email { background: var(--secondary); color: #fff; border-color: var(--secondary); }
.floater-top { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ============ MODAL ============ */
.modal { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 1.2rem; }
.modal[hidden] { display: none; }
.modal-overlay { position: absolute; inset: 0; background: rgba(23,50,74,.55); backdrop-filter: blur(3px); animation: fade .25s var(--ease); }
@keyframes fade { from { opacity: 0; } }
.modal-panel {
  position: relative; width: min(560px, 100%); max-height: 88vh; overflow: auto;
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-md);
  animation: pop .28s var(--ease);
}
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(.97); } }
.modal-hero { height: 120px; display: grid; place-items: center; color: #fff; }
.modal-hero.cat-cert { background: linear-gradient(135deg, #0070BB, #0049AC); }
.modal-hero.cat-lang { background: linear-gradient(135deg, #46AD6A, #2E7D4B); }
.modal-hero.cat-senior { background: linear-gradient(135deg, #3DB8C4, #1E8A97); }
.modal-hero.cat-art { background: linear-gradient(135deg, #8A6BC8, #6A4BA0); }
.modal-hero.cat-career { background: linear-gradient(135deg, #4A6FA5, #2F4E78); }
.modal-hero-ico { font-size: 3rem; }
.modal-close {
  position: absolute; top: .8rem; right: .9rem; z-index: 2;
  width: 38px; height: 38px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(255,255,255,.85); color: var(--ink); font-size: 1.4rem; line-height: 1;
}
.modal-body { padding: 1.6rem 1.9rem 2rem; }
.modal-cat { font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--secondary-dark); }
.modal-body h3 { font-size: 1.35rem; margin: .3rem 0 .7rem; }
.modal-desc { color: var(--muted); margin-bottom: 1.3rem; }
.modal-facts { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; margin-bottom: 1.6rem; }
.fact { background: var(--bg-alt); border-radius: var(--radius-sm); padding: .7rem .9rem; }
.fact span { display: block; font-size: .76rem; color: var(--muted); font-weight: 700; letter-spacing: .04em; }
.fact strong { font-size: .95rem; }

/* ============ REVEAL ============ */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .art-card, .art-blob { animation: none; }
}

/* ============ RESPONSIVE ============ */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-art { height: 260px; order: -1; }
  .about-grid { grid-template-columns: 1fr; }
  .course-grid { grid-template-columns: repeat(2, 1fr); }
  .community-grid { grid-template-columns: 1fr; }
  .support-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .menu-toggle { display: flex; }
  .nav {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; gap: .2rem; padding: 1rem 1.25rem 1.4rem;
    background: var(--surface); border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md); transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: opacity .25s var(--ease), transform .25s var(--ease);
  }
  .nav.is-open { transform: none; opacity: 1; pointer-events: auto; }
  .nav a { padding: .75rem .8rem; border-radius: var(--radius-sm); }
  .brand-text small { display: none; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .container { width: calc(100% - 2rem); }
  .section { padding: 4rem 0; }
  .course-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 1.5rem; }
  .modal-facts { grid-template-columns: 1fr; }
  .brand-text strong { font-size: .92rem; }
}
