@font-face {
  font-family: "Academy Headings";
  src: url("/fonts/course-headings.woff2") format("woff2");
  font-weight: 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  color: #f7f1e7;
  background: #07121e;
  --ink: #07121e;
  --panel: #101f2d;
  --gold: #e7c58c;
  --pale-gold: #f5dbac;
  --dim: #b5c1ca;
  --line: #30404d;
  --gold-line: #6c5739;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
[hidden] { display: none !important; }
body { margin: 0; font-size: 1rem; line-height: 1.75; }
a { color: inherit; text-decoration: none; }
a, button, input { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--pale-gold); outline-offset: 5px; }
img { display: block; max-width: 100%; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .56; }
h1, h2, h3, p { margin: 0; }
h1, h2 { font-family: "Academy Headings", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif; font-weight: 900; line-height: 1.27; }
h2 { font-size: clamp(1.85rem, 3.4vw, 3rem); letter-spacing: -.035em; }
h3 { line-height: 1.5; }
p { color: var(--dim); }
section[id] { scroll-margin-top: 1.5rem; }
.shell { width: min(100% - 3rem, 77rem); margin-inline: auto; }
.section { padding-block: clamp(3.75rem, 7vw, 7.5rem); }

.site-header { position: relative; z-index: 1; border-bottom: 1px solid #c5a66b36; background: #0b1824; }
.masthead { min-height: 5.25rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .75rem; flex-shrink: 0; font-size: 1.04rem; font-weight: 800; line-height: 1.4; letter-spacing: .08em; }
.brand img { object-fit: contain; }
.brand small, .footer small { display: block; color: var(--gold); font-family: Georgia, serif; font-size: .78rem; font-weight: 400; letter-spacing: .035em; }
.nav, .hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: clamp(1rem, 2.6vw, 2.2rem); }
.nav > a:not(.button), .text-link { color: #d8dce0; font-size: .94rem; }
.nav > a:hover, .text-link:hover { color: var(--pale-gold); }
.text-link { text-decoration: underline; text-underline-offset: .35em; }
.button { display: inline-flex; justify-content: center; align-items: center; min-height: 2.85rem; padding: .64rem 1.28rem; color: #151309; background: linear-gradient(110deg, #f5dba9, #d6ae6d); border: 1px solid transparent; border-radius: .35rem; font-weight: 800; text-align: center; transition: filter .2s, border-color .2s, background-color .2s; }
.button:hover { filter: brightness(1.11); }
.button-outline, .button-secondary { background: transparent; border-color: var(--gold-line); color: var(--pale-gold); }
.button-outline:hover, .button-secondary:hover { border-color: var(--gold); background-color: #dfba7812; }

.hero { overflow: hidden; position: relative; background: radial-gradient(ellipse at 72% 45%, #192931, var(--ink) 64%); border-bottom: 1px solid #c5a66b33; }
.hero-grid { display: grid; grid-template-columns: 46% 54%; align-items: center; min-height: 35rem; padding-block: 4.5rem; isolation: isolate; }
.hero-copy { position: relative; z-index: 1; }
.accent-rule { width: 4.2rem; height: 2px; margin-bottom: 1.65rem; background: linear-gradient(90deg, var(--gold), #e7c58c1a); transform-origin: left; }
.hero h1 { font-size: clamp(2.65rem, 5.3vw, 5.1rem); letter-spacing: -.065em; }
.hero h1 span { color: var(--pale-gold); }
.hero p { max-width: 26rem; margin-block: 1.45rem 1.85rem; font-size: clamp(1rem, 1.4vw, 1.13rem); line-height: 1.85; color: #d2d9de; }
.hero-art { position: relative; align-self: stretch; min-height: 27rem; margin-right: -2.4rem; }
.hero-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 54% center; border-radius: .3rem; }
.hero-art::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, #07121e78, transparent 29%), linear-gradient(0deg, #09152165, transparent 25%); }
.hero-art::after { content: ""; position: absolute; inset: .75rem; z-index: 1; border: 1px solid #e7c58c65; border-radius: .2rem; }
.hero-art i { position: absolute; right: .75rem; top: .75rem; z-index: 2; width: 3.8rem; height: 3.8rem; border-top: 1px solid var(--gold); border-right: 1px solid var(--gold); }

.benefits h2 { max-width: 28ch; }
.benefit-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-top: 2rem; }
.benefit-grid article { padding: clamp(1.25rem, 2.65vw, 2.35rem); border: 1px solid #88735053; border-top-color: #b898626e; background: linear-gradient(140deg, #142230, #0b1723); border-radius: .35rem; }
.benefit-grid h3 { color: var(--pale-gold); font-size: clamp(1.12rem, 1.8vw, 1.42rem); margin: 1.05rem 0 .52rem; }
.benefit-grid p, .story p { line-height: 1.85; }
.benefit-mark { width: 1.7rem; height: 1.7rem; color: var(--gold); position: relative; display: grid; place-items: center; }
.benefit-mark::before, .benefit-mark::after { content: ""; display: block; position: absolute; border: 1px solid currentColor; }
.mark-building::before { inset: 0 .28rem 0 0; transform: skewY(-9deg); }
.mark-building::after { inset: .48rem 0 0 .62rem; background: #142230; }
.mark-plan::before { inset: .18rem; transform: rotate(45deg); }
.mark-plan::after { inset: .54rem; transform: rotate(45deg); }
.mark-window::before { inset: 0; }
.mark-window::after { inset: .05rem .57rem; border-block: 0; }

.story { display: grid; grid-template-columns: .95fr 1fr; align-items: center; gap: clamp(1.5rem, 5vw, 5.1rem); border-top: 1px solid var(--line); }
.story-photo { position: relative; }
.story-photo img { width: 100%; height: clamp(19rem, 33vw, 32.5rem); object-fit: cover; border-radius: .35rem; }
.story-photo::after { content: ""; position: absolute; inset: .65rem; border: 1px solid #f9d79b9c; border-radius: .15rem; pointer-events: none; }
.story-copy > p { margin-top: 1rem; }
.learning-note { margin-top: 1.4rem; padding: .2rem 0 .2rem 1.1rem; border-left: 2px solid #b69256; }
.learning-note h3 { color: var(--pale-gold); margin-bottom: .35rem; }

.registration { background: radial-gradient(ellipse at 12% 0%, #142532, transparent 42%), #0b1722; border-block: 1px solid #b690563d; }
.registration-layout { display: grid; grid-template-columns: minmax(12rem, .7fr) minmax(0, 1.8fr); align-items: start; gap: clamp(1.5rem, 4vw, 4.5rem); }
.registration-intro p { max-width: 21rem; margin-top: 1rem; }
.form-card { min-width: 0; border: 1px solid #8d77535e; background: var(--panel); border-radius: .5rem; padding: clamp(1.25rem, 3.2vw, 2.75rem); box-shadow: 0 1.1rem 2.5rem #00000021; }
.form-heading h3, .question legend { font-size: 1.15rem; font-weight: 800; }
.form-heading p { margin-top: .28rem; }
.contacts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; margin-top: 1.1rem; }
.text-field { display: grid; gap: .35rem; min-width: 0; font-weight: 700; }
.text-field input { width: 100%; min-width: 0; min-height: 2.85rem; padding: .62rem .75rem; color: #fff9ed; background: #0a1723; border: 1px solid #50606e; border-radius: .3rem; font-weight: 400; }
.text-field input::placeholder { color: #a1aeb8; }
.question { min-width: 0; border: 0; border-bottom: 1px solid var(--line); margin: 0; padding: 0 0 1.35rem; }
.question { margin-top: 1.45rem; }
.question legend { padding: 0; line-height: 1.5; }
.question-hint { display: inline-block; margin-left: .65rem; color: var(--gold); font-weight: 500; font-size: .875rem; }
.options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; padding-top: .65rem; }
.option { min-height: 2.75rem; display: flex; align-items: center; gap: .55rem; padding: .5rem .65rem; border: 1px solid #3c4e5d; border-radius: .3rem; background: #0b1926; cursor: pointer; }
.option:hover { border-color: #a18454; }
.option:has(input:checked) { color: var(--pale-gold); border-color: #be985b; background: #332a1c; }
input:is([type="checkbox"], [type="radio"]) { width: 1.05rem; height: 1.05rem; margin: 0; flex-shrink: 0; accent-color: #dfba79; }
.other { margin-top: .7rem; }
.honeypot { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
.consent { display: flex; gap: .65rem; align-items: flex-start; margin-block: 1.45rem; font-size: .94rem; color: #d3dce3; cursor: pointer; }
.consent input { margin-top: .3rem !important; }
.button-submit { width: 100%; min-height: 3.1rem; }
.form-message { margin-top: 1rem; margin-bottom: .7rem; }
.form-message.error { color: #ffb4ac; }
.success { padding-block: 1.7rem; }
.success h3 { font-size: 1.5rem; margin-bottom: .5rem; color: var(--pale-gold); }
.footer .shell { display: flex; gap: .65rem 1rem; flex-wrap: wrap; align-items: baseline; padding-block: 1.65rem; font-weight: 800; }

.admin-shell { display: grid; gap: 1rem; padding-block: clamp(2rem, 6vw, 5rem); }
.admin-shell h1 { font-size: clamp(1.7rem, 4.5vw, 3.2rem); }
.card-heading p { margin-top: .7rem; }
.admin-login { display: flex; align-items: end; gap: .75rem; margin-top: 1.25rem; }
.admin-login .text-field { width: min(25rem, 100%); }
.admin-toolbar, .admin-actions, .admin-paging { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.admin-toolbar { justify-content: space-between; padding-bottom: 1.3rem; }
.admin-paging { justify-content: center; padding-top: 1.15rem; color: var(--dim); }
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; }
th, td { padding: .82rem .65rem; text-align: start; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
th { font-size: .9rem; min-width: 10.5rem; background: #0a1723; color: var(--pale-gold); }
td { font-size: .94rem; }

.opening { display: none; }
.is-opening .opening { position: fixed; inset: 0; z-index: 10; display: grid; place-items: center; background: radial-gradient(ellipse at 50% 43%, #193143, #07121e 65%); pointer-events: none; animation: opening-exit 3s both; }
.is-opening .opening-inner { display: grid; gap: 1.7rem; place-items: center; animation: opening-brand 2.7s ease-out both; }
.opening-inner img { width: min(70vw, 19rem); height: auto; }
.opening-line { display: block; width: min(42vw, 10rem); height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent); animation: opening-rule 1.75s .28s both; }
@keyframes opening-exit { 0%, 77% { opacity: 1; } 100% { opacity: 0; } }
@keyframes opening-brand { 0% { opacity: 0; transform: translateY(.55rem) scale(.94); } 38%, 100% { opacity: 1; transform: none; } }
@keyframes opening-rule { 0% { scale: 0 1; } 100% { scale: 1 1; } }
.hero-copy > * { animation: arrive .75s both; }
.hero-copy > :nth-child(2) { animation-delay: .1s; }
.hero-copy > :nth-child(3) { animation-delay: .18s; }
.hero-copy > :nth-child(4) { animation-delay: .27s; }
.is-opening .hero-copy > * { animation-play-state: paused; }
.options-entered .option { animation: arrive .38s both; animation-delay: calc(var(--position) * 35ms); }
@keyframes arrive { from { opacity: 0; transform: translateY(.5rem); } to { opacity: 1; transform: none; } }

@media (max-width: 56rem) {
  .hero-grid { grid-template-columns: 1fr 1fr; min-height: 30rem; padding-block: 3rem; }
  .hero-art { min-height: 22rem; margin-right: -1.2rem; }
  .registration-layout { grid-template-columns: 1fr; }
}
@media (max-width: 43rem) {
  .shell { width: calc(100% - 2rem); }
  .masthead { min-height: 4.55rem; }
  .brand { gap: .45rem; font-size: .91rem; }
  .brand img { width: 2.55rem; height: 2.25rem; }
  .brand small { font-size: .68rem; }
  .nav > a:not(.button) { display: none; }
  .nav .button { padding-inline: .65rem; font-size: .88rem; }
  .hero-grid { grid-template-columns: 1fr; gap: 1.65rem; padding-block: 2.7rem 1.2rem; }
  .hero-art { min-height: clamp(13rem, 56vw, 23rem); margin-right: 0; }
  .hero h1 { font-size: clamp(2.2rem, 9.4vw, 3.85rem); }
  .hero p { margin-block: 1rem 1.3rem; }
  .accent-rule { margin-bottom: 1.05rem; }
  .benefit-grid, .story, .contacts { grid-template-columns: 1fr; }
  .benefit-grid { margin-top: 1.25rem; }
  .story-photo { order: 2; }
  .story-photo img { height: clamp(14rem, 54vw, 21rem); }
  .admin-login { align-items: stretch; flex-direction: column; }
}
@media (max-width: 28rem) {
  .options { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
  .is-opening .opening { display: none; }
}
