:root {
  --ink: #12151a;
  --muted: #5c6570;
  --paper: #f4f1ea;
  --white: #fff;
  --accent: #c45c26;
  --teal: #1f6f6a;
  --shadow: 0 18px 50px rgba(18,21,26,.18);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Noto Sans TC", "Noto Sans JP", "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.45;
}
img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.container { width: min(1180px, calc(100% - 2rem)); margin-inline: auto; }

.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(244,241,234,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(18,21,26,.08);
}
.nav-inner {
  display: flex; align-items: center; gap: 1rem;
  min-height: 84px;
}
.brand { display: flex; align-items: center; gap: .7rem; min-width: 0; }
.brand img { height: 64px; width: auto; max-width: 200px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; font-weight: 700; font-size: .92rem; }
.brand-text small { font-weight: 500; color: var(--muted); font-size: .68rem; }
.nav-links {
  list-style: none; display: flex; gap: .2rem; margin-left: auto; flex-wrap: wrap;
}
.nav-links a {
  display: block; padding: .4rem .7rem; border-radius: 999px; font-size: .85rem;
}
.nav-links a.active, .nav-links a:hover { background: var(--ink); color: #fff; }
.lang-switch { display: flex; gap: .25rem; font-size: .82rem; }
.lang-switch a {
  padding: .3rem .5rem; border-radius: 6px; border: 1px solid transparent;
}
.lang-switch a.active { border-color: var(--ink); font-weight: 700; }
.menu-btn {
  display: none; margin-left: auto; background: none; border: 0; font-size: 1.4rem; cursor: pointer;
}

.hero-full {
  position: relative; min-height: 88vh; overflow: hidden; color: #fff;
}
.hero-full video, .hero-full img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.hero-full::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(18,21,26,.15) 10%, rgba(18,21,26,.72) 100%);
}
.hero-caption {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; justify-content: flex-end;
  min-height: 88vh; padding: 2.5rem 0 3rem;
}
.eyebrow { letter-spacing: .18em; text-transform: uppercase; font-size: .72rem; opacity: .9; }
.hero-caption h1 { font-size: clamp(1.7rem, 4.4vw, 3.4rem); line-height: 1.12; max-width: 22ch; margin: .4rem 0 1rem; }
.hero-caption p { max-width: 36ch; font-size: 1.05rem; opacity: .92; }

.mosaic {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; grid-template-rows: 220px 220px; gap: 10px;
  padding: 10px;
}
.mosaic .tile { position: relative; overflow: hidden; border-radius: 18px; }
.mosaic .tile.wide { grid-column: 1 / 2; grid-row: 1 / 3; }
.mosaic img, .mosaic video { width: 100%; height: 100%; object-fit: cover; }
.cap {
  position: absolute; left: 12px; bottom: 12px; right: 12px;
  color: #fff; font-weight: 700; text-shadow: 0 2px 10px rgba(0,0,0,.45);
  font-size: .95rem;
}

.section { padding: 3.2rem 0; }
.section-head { margin-bottom: 1.4rem; }
.section-head h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
.section-head p { color: var(--muted); max-width: 52ch; margin-top: .4rem; }

.filmstrip {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
}
.clip {
  position: relative; border-radius: 20px; overflow: hidden; min-height: 240px;
  box-shadow: var(--shadow);
}
.clip video, .clip img { width: 100%; height: 100%; object-fit: cover; min-height: 240px; }
.clip .cap { font-size: 1.05rem; }

.stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(148px, 1fr)); gap: 12px;
}
.stat {
  background: #fff; border-radius: 18px; padding: 1.25rem 1rem; text-align: center;
}
.stat .n { font-size: clamp(1.7rem, 3.6vw, 2.5rem); font-weight: 800; color: var(--teal); letter-spacing: -.02em; }
.stat .l { color: var(--muted); font-size: .82rem; margin-top: .3rem; line-height: 1.35; }

.stories {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
}
.story { position: relative; min-height: 320px; border-radius: 22px; overflow: hidden; }
.story img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.story .copy {
  position: relative; z-index: 1; height: 100%; min-height: 320px;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 1.4rem; color: #fff;
  background: linear-gradient(180deg, transparent 30%, rgba(0,0,0,.7));
}
.story h3 { font-size: 1.35rem; }
.story p { opacity: .92; margin-top: .35rem; }

.people {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
}
.person { border-radius: 20px; overflow: hidden; background: #fff; }
.person img { height: 220px; width: 100%; object-fit: cover; }
.person .t { padding: 1rem 1.1rem 1.2rem; }
.person h3 { font-size: 1.05rem; }
.person p { color: var(--muted); font-size: .9rem; margin-top: .3rem; }

.program-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.prog { position: relative; min-height: 280px; border-radius: 20px; overflow: hidden; }
.prog img, .prog video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.prog .copy {
  position: relative; z-index: 1; min-height: 280px; padding: 1.3rem; color: #fff;
  display: flex; flex-direction: column; justify-content: flex-end;
  background: linear-gradient(180deg, transparent, rgba(18,21,26,.78));
}

.contact-bar {
  display: flex; flex-wrap: wrap; gap: .8rem; align-items: center;
  background: var(--ink); color: #fff; border-radius: 20px; padding: 1.4rem 1.6rem;
}
.site-footer { padding: 2rem 0 2.4rem; color: var(--muted); font-size: .85rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
.footer-grid h4 { color: var(--ink); margin-bottom: .4rem; }
.footer-grid ul { list-style: none; }
.footer-grid a:hover { text-decoration: underline; }
.footer-bottom { display: flex; justify-content: space-between; gap: 1rem; border-top: 1px solid rgba(0,0,0,.08); padding-top: 1rem; }

.page-hero { position: relative; min-height: 42vh; overflow: hidden; color: #fff; }
.page-hero > img, .page-hero > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.page-hero .inner { position: relative; z-index: 1; min-height: 42vh; display: flex; flex-direction: column; justify-content: flex-end; padding: 2.2rem 0; }
.page-hero::after { content:""; position:absolute; inset:0; background: linear-gradient(180deg, rgba(0,0,0,.1), rgba(0,0,0,.65)); }
.mascot-row {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 2.5rem;
}
.mascot-pic {
  flex: 0 0 340px;
  width: 340px;
  margin: 0;
  background: #fff;
  border-radius: 24px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.mascot-pic img {
  width: 100%;
  height: auto;
  display: block;
}
.mascot-copy { flex: 1 1 0; min-width: 0; }
.mascot-names { color: var(--teal); font-weight: 800; letter-spacing: .02em; margin: 0 0 .6rem; }
.mascot-names small { display: block; font-weight: 600; color: var(--muted); font-size: .9rem; margin-top: .2rem; }

.prose { max-width: 68ch; }
.prose p { margin: 0 0 1rem; color: var(--ink); }
.prose h2 { font-size: clamp(1.4rem, 3vw, 2rem); margin: 0 0 .8rem; }
.lede { font-size: 1.15rem; line-height: 1.55; max-width: 46ch; }
.two-col { display: grid; grid-template-columns: 1.1fr .9fr; gap: 1.4rem; align-items: center; }
.two-col img { width: 100%; border-radius: 18px; height: 320px; object-fit: cover; }
.two-col img[src*="igia_logo"],
.two-col img[src*="edu-port"] { height: auto; object-fit: contain; background: #fff; }
.mascot-copy p { margin: 0 0 1rem; color: var(--ink); }
.mascot-copy h2 { font-size: clamp(1.4rem, 3vw, 2rem); margin: 0 0 .8rem; }
.awards { display: grid; gap: 8px; margin-top: 1rem; }
.award {
  display: grid; grid-template-columns: 9.5rem 1fr; gap: .7rem;
  background: #fff; border-radius: 14px; padding: .85rem 1rem;
}
.award .tag { color: var(--teal); font-weight: 700; font-size: .86rem; }
.award p { margin: 0; color: var(--ink); font-size: .95rem; }
.card-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.idea {
  background: #fff; border-radius: 18px; padding: 1.2rem 1.25rem;
}
.idea h3 { font-size: 1.02rem; margin-bottom: .35rem; }
.idea p { color: var(--muted); font-size: .92rem; }
.cal { display: grid; gap: 10px; }
.cal-item {
  display: grid; grid-template-columns: 7.5rem 1fr; gap: 1rem;
  background: #fff; border-radius: 16px; padding: 1rem 1.1rem;
}
.cal-item .when { color: var(--teal); font-weight: 700; font-size: .88rem; }
.cal-item h3 { font-size: 1rem; }
.cal-item p { color: var(--muted); font-size: .9rem; margin-top: .25rem; }
.cal-hot {
  background: linear-gradient(135deg, #e7f4f2, #fff7ee);
  border: 2px solid var(--teal);
  box-shadow: 0 10px 28px rgba(31, 111, 106, .14);
}
.cal-hot .when { color: var(--accent); font-size: 1.15rem; font-weight: 800; }
.cal-hot h3 { color: var(--ink); }
.cal-cta { margin-top: .75rem; font-size: .88rem; padding: .5rem 1.05rem; }
.phase {
  display: grid; grid-template-columns: 5.5rem 1fr; gap: .8rem;
  padding: .9rem 0; border-bottom: 1px solid rgba(18,21,26,.08);
}
.phase:last-child { border-bottom: 0; }
.phase .n { color: var(--accent); font-weight: 800; }
.logo-wall {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; align-items: center;
}
.logo-card {
  background: #fff; border-radius: 16px; min-height: 110px;
  display: flex; align-items: center; justify-content: center; padding: 1rem;
}
.logo-card img { max-height: 64px; width: auto; max-width: 100%; object-fit: contain; }
.person .logo {
  height: 88px; object-fit: contain; background: #fff; padding: 12px;
}
.org {
  display: grid; grid-template-columns: .42fr 1fr; gap: 0;
  background: #fff; border-radius: 22px; overflow: hidden; margin-bottom: 1.2rem;
}
.org .cover { width: 100%; height: 100%; min-height: 280px; object-fit: cover; }
.org .body { padding: 1.35rem 1.5rem 1.55rem; }
.org .logo-inline { height: 40px; width: auto; max-width: 160px; object-fit: contain; margin-bottom: .7rem; }
.org h2 { font-size: 1.28rem; margin: 0 0 .55rem; }
.org p { color: var(--muted); margin: 0 0 .7rem; font-size: .95rem; }
.org p:last-child { margin-bottom: 0; }

@media (max-width: 900px) {
  .menu-btn { display: block; }
  .nav-links, .lang-switch { display: none; }
  .nav-inner.open .nav-links, .nav-inner.open .lang-switch {
    display: flex; flex-direction: column; width: 100%;
  }
  .nav-inner.open { flex-wrap: wrap; }
  .mosaic, .filmstrip, .stats, .stories, .people, .program-grid, .footer-grid,
  .two-col, .card-list, .logo-wall, .org {
    grid-template-columns: 1fr;
    grid-template-rows: none;
  }
  .mosaic .tile.wide { grid-column: auto; grid-row: auto; min-height: 280px; }
  .hero-full, .hero-caption { min-height: 72vh; }
  .cal-item, .award { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .mascot-row { flex-direction: column; align-items: stretch; }
  .mascot-pic { width: 100%; flex: 1 1 auto; max-width: 380px; margin: 0 auto; }
}

.invite-modal {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(18,21,26,.62);
  display: flex; align-items: center; justify-content: center;
  padding: 1.2rem;
}
.invite-modal[hidden] { display: none !important; }
.invite-panel {
  width: min(640px, 100%);
  max-height: min(86vh, 780px);
  overflow: auto;
  background: var(--paper);
  border-radius: 20px;
  padding: 1.4rem 1.5rem 1.5rem;
  box-shadow: var(--shadow);
  position: relative;
}
.invite-close {
  position: absolute; top: 10px; right: 12px;
  width: 36px; height: 36px; border: 0; background: transparent;
  font-size: 1.6rem; line-height: 1; cursor: pointer; color: var(--muted);
}
.invite-panel h2 { font-size: 1.2rem; line-height: 1.4; margin: 0 1.8rem .8rem 0; }
.invite-panel p, .invite-panel li { color: var(--ink); font-size: .95rem; margin: 0 0 .65rem; }
.invite-panel ul { margin: 0 0 1rem 1.1rem; }
.invite-meta { background: #fff; border-radius: 14px; padding: 1rem 1.1rem; margin: .8rem 0 1rem; }
.invite-meta p { margin: 0 0 .4rem; }
.invite-meta p:last-child { margin-bottom: 0; }
.invite-cta {
  display: inline-block; background: var(--ink); color: #fff;
  border-radius: 999px; padding: .65rem 1.2rem; font-weight: 700;
}
.invite-cta:hover { background: var(--teal); }
