:root {
  --paper: #f7f5ef;
  --white: #fffefb;
  --ink: #123438;
  --muted: #62777a;
  --blue: #61d0df;
  --deep: #168f9f;
  --gold: #c99a42;
  --coral: #e96f51;
  --line: rgba(18, 52, 56, 0.14);
  --shadow: 0 24px 70px rgba(14, 67, 73, 0.13);
  --display: "Noto Serif TC", "Songti TC", "STSong", serif;
  --body: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 8%, rgba(97, 208, 223, .22), transparent 28rem),
    radial-gradient(circle at 92% 22%, rgba(201, 154, 66, .13), transparent 24rem),
    var(--paper);
  font-family: var(--body);
}
a { color: inherit; }
button, input { font: inherit; }

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 20;
  opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.6'/%3E%3C/svg%3E");
}

.shell { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: .02em;
}
.brand-mark {
  width: 38px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--white);
  background: var(--ink);
  font-family: var(--display);
}
.topnav { display: flex; gap: 8px; align-items: center; }
.topnav a, .back-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
}
.topnav a:hover, .back-link:hover { color: var(--ink); background: rgba(255,255,255,.7); }

.eyebrow {
  display: inline-flex;
  gap: 9px;
  align-items: center;
  color: var(--deep);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--gold); }
h1, h2, h3, p { margin-top: 0; }
h1, h2 { font-family: var(--display); }
h1 { font-size: clamp(47px, 7.5vw, 105px); line-height: .98; letter-spacing: -.055em; }
h2 { font-size: clamp(34px, 4.4vw, 64px); line-height: 1.08; letter-spacing: -.035em; }
p { line-height: 1.8; }

.hero {
  min-height: 70vh;
  display: grid;
  grid-template-columns: 1.35fr .65fr;
  gap: 60px;
  align-items: center;
  padding: 64px 0 90px;
}
.hero h1 span { color: var(--deep); }
.hero-copy { max-width: 730px; font-size: 18px; color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.btn {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 12px 20px;
  color: var(--ink);
  background: rgba(255,255,255,.72);
  text-decoration: none;
  font-weight: 850;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(18,52,56,.12); }
.btn.primary { color: white; background: var(--ink); border-color: var(--ink); }
.btn.blue { color: var(--ink); background: var(--blue); border-color: transparent; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }

.orbit {
  position: relative;
  min-height: 390px;
  display: grid;
  place-items: center;
}
.orbit::before, .orbit::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(22, 143, 159, .25);
  border-radius: 50%;
  animation: spin 18s linear infinite;
}
.orbit::before { width: 310px; height: 310px; border-style: dashed; }
.orbit::after { width: 220px; height: 220px; animation-direction: reverse; animation-duration: 12s; }
.orb-core {
  width: 144px;
  aspect-ratio: 1;
  border-radius: 36% 64% 58% 42%;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: linear-gradient(145deg, #a7edf3, var(--blue));
  box-shadow: 0 30px 70px rgba(22, 143, 159, .28);
  animation: morph 8s ease-in-out infinite;
  font-family: var(--display);
  font-size: 32px;
}
.orbit-note {
  position: absolute;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.82);
  box-shadow: 0 10px 30px rgba(18,52,56,.08);
  font-size: 13px;
  font-weight: 800;
}
.orbit-note:nth-of-type(1) { top: 36px; left: 0; }
.orbit-note:nth-of-type(2) { top: 105px; right: -8px; }
.orbit-note:nth-of-type(3) { bottom: 55px; left: 5px; }

.section { padding: 80px 0 110px; }
.section-head { display: flex; justify-content: space-between; gap: 50px; align-items: end; margin-bottom: 38px; }
.section-head p { max-width: 440px; color: var(--muted); margin-bottom: 4px; }
.portal-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 18px; }
.portal-card {
  position: relative;
  min-height: 310px;
  padding: 30px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255,254,251,.86);
  box-shadow: 0 18px 55px rgba(18,52,56,.08);
  text-decoration: none;
  transition: transform .25s ease, box-shadow .25s ease;
}
.portal-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.portal-card:nth-child(1), .portal-card:nth-child(2) { grid-column: span 6; }
.portal-card:nth-child(n+3) { grid-column: span 4; }
.portal-card.dark { color: var(--ink); background: var(--white); border-top: 5px solid var(--blue); }
.portal-card.blue { background: var(--blue); }
.portal-card.gold { background: #e6c989; }
.card-index { font-size: 13px; font-weight: 900; letter-spacing: .14em; opacity: .65; }
.portal-card h3 { margin: 64px 0 10px; font-family: var(--display); font-size: clamp(28px, 3vw, 43px); line-height: 1.15; }
.portal-card p { margin: 0; max-width: 430px; opacity: .78; }
.card-arrow {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 20px;
}
.card-status { position: absolute; left: 30px; bottom: 26px; font-size: 12px; font-weight: 900; letter-spacing: .08em; }

.page-hero { padding: 78px 0 60px; }
.page-hero h1 { max-width: 980px; font-size: clamp(46px, 7vw, 88px); }
.page-hero p { max-width: 720px; font-size: 18px; color: var(--muted); }
.content-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 18px; padding-bottom: 90px; }
.panel {
  grid-column: span 6;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255,255,255,.78);
}
.panel.full { grid-column: 1 / -1; }
.panel.third { grid-column: span 4; }
.panel h3 { font-size: 22px; margin-bottom: 10px; }
.panel p { color: var(--muted); margin-bottom: 0; }
.meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; }
.tag { padding: 7px 10px; border-radius: 999px; background: rgba(22,143,159,.1); color: var(--deep); font-size: 12px; font-weight: 800; }

.form-card { max-width: 720px; padding: 34px; border: 1px solid var(--line); border-radius: 24px; background: white; box-shadow: var(--shadow); }
.field { display: grid; gap: 8px; margin-bottom: 18px; }
.field label { font-weight: 850; }
.field input {
  width: 100%;
  min-height: 50px;
  padding: 12px 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: var(--paper);
}
.notice {
  padding: 18px 20px;
  border-left: 4px solid var(--gold);
  border-radius: 4px 14px 14px 4px;
  background: rgba(201,154,66,.12);
  color: #6a5229;
}
.locked { filter: saturate(.5); }

.site-footer {
  padding: 30px 0 42px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.reveal { opacity: 0; transform: translateY(20px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes morph {
  0%,100% { border-radius: 36% 64% 58% 42%; transform: rotate(-4deg); }
  50% { border-radius: 62% 38% 44% 56%; transform: rotate(5deg); }
}

@media (max-width: 820px) {
  .shell { width: min(100% - 28px, 680px); }
  .topnav a:not(:last-child) { display: none; }
  .hero { grid-template-columns: 1fr; min-height: auto; padding: 48px 0 70px; }
  .orbit { min-height: 300px; }
  .orbit::before { width: 260px; height: 260px; }
  .orbit::after { width: 185px; height: 185px; }
  .section-head { display: block; }
  .portal-card, .portal-card:nth-child(1), .portal-card:nth-child(2), .portal-card:nth-child(n+3),
  .panel, .panel.third { grid-column: 1 / -1; }
  .portal-card { min-height: 270px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
