:root {
  --page: #fdf9ed;
  --surface: #fffdf8;
  --surface-soft: #fff1d8;
  --ink: #1b1c1e;
  --muted: #4e5155;
  --line: rgb(98 73 49 / 22%);
  --accent: #df6246;
  --accent-soft: #f3c3a6;
  --accent-ink: #fffaf7;
  --shadow: rgb(104 65 32 / 13%);
  --font-sans-tc: "Noto Sans TC", "Microsoft JhengHei", "微軟正黑體", sans-serif;
  --font-latin: "Poppins", "Noto Sans TC", sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font-sans-tc);
  font-weight: 400;
  font-synthesis: none;
  letter-spacing: .012em;
  line-height: 1.8;
  text-rendering: optimizeLegibility;
}
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }

.site-shell {
  min-height: 100dvh;
  overflow: clip;
  background: var(--page);
  transition: background-color 280ms ease, color 280ms ease;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 10px max(20px, calc((100vw - 1300px) / 2));
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--page) 90%, transparent);
  backdrop-filter: blur(16px);
}

.brand-lockup {
  display: block;
  flex: 0 0 auto;
  text-decoration: none;
}
.brand-lockup img { display: block; width: clamp(132px, 12vw, 176px); height: auto; }

.section-nav { display: flex; align-items: center; }
.section-nav {
  gap: clamp(12px, 2vw, 30px);
  overflow-x: auto;
  scrollbar-width: none;
  white-space: nowrap;
}
.section-nav::-webkit-scrollbar { display: none; }
.section-nav a {
  color: var(--muted);
  font-size: .83rem;
  font-weight: 400;
  text-decoration: none;
  transition: color 180ms ease;
}
.section-nav a.is-active { color: var(--accent); }
@media (hover: hover) {
  .section-nav a:hover { color: var(--accent); }
}
.section-nav a.is-active {
  padding: 0;
  margin: 0;
  background: transparent;
  box-shadow: inset 0 -2px 0 var(--accent);
  font-weight: 700;
}

.contact-button:focus-visible,
.section-nav a:focus-visible,
.program-list a:focus-visible,
.selection-stages a:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
.contact-button:active { transform: translateY(1px) scale(.98); }

.hero {
  position: relative;
  container-type: inline-size;
  width: min(1200px, 100%);
  aspect-ratio: 26 / 17;
  margin-inline: auto;
  overflow: hidden;
  background: var(--page);
}
.hero-background, .hero-copy {
  position: absolute;
  inset: 0;
  display: block;
}
.hero-background img {
  display: block;
  width: 100%;
}
.hero-background img { height: 100%; object-fit: cover; object-position: center; }
.hero-copy {
  z-index: 2;
  display: block;
  padding: 0;
  color: var(--accent);
  pointer-events: none;
}
.hero-title {
  position: absolute;
  top: clamp(56px, 12cqw, 154px);
  left: clamp(48px, 7cqw, 78px);
  display: flex;
  gap: .02em;
  margin: 0;
  font-family: var(--font-sans-tc);
  font-size: clamp(3.7rem, 8.7cqw, 6.25rem);
  font-weight: 700;
  letter-spacing: 0;
  line-height: .98;
  text-shadow: 0 1px 0 rgb(255 255 255 / 36%);
}
.hero-title span {
  display: block;
  letter-spacing: .075em;
  writing-mode: vertical-rl;
  text-orientation: upright;
  white-space: normal;
}
.hero-plan, .hero-message {
  position: absolute;
  top: 50%;
  margin: 0;
  font-family: var(--font-sans-tc);
  writing-mode: vertical-rl;
  text-orientation: mixed;
}
.hero-plan {
  left: 28%;
  display: grid;
  place-items: center;
  min-height: clamp(210px, 25vw, 280px);
  padding: .65em .42em;
  background: #10151c;
  color: #fff;
  font-size: clamp(.86rem, 1.3cqw, 1.27rem);
  font-weight: 500;
  letter-spacing: .1em;
  line-height: 1.25;
  text-align: center;
  transform: translateY(-50%);
}
.hero-message {
  left: 32.2%;
  color: var(--accent);
  font-size: clamp(1.05rem, 2.1cqw, 2.2rem);
  font-weight: 500;
  letter-spacing: .05em;
  line-height: 1.15;
  transform: translateY(-50%);
}

.content-section, .contact-section {
  width: min(1300px, calc(100% - 40px));
  margin-inline: auto;
}
.content-section {
  position: relative;
  padding: clamp(60px, 6.5vw, 96px) clamp(0px, 2vw, 28px);
  scroll-margin-top: 84px;
}
.section-heading { margin-bottom: clamp(32px, 3.5vw, 48px); }
.section-heading h2, .selection-stages h3, .contact-section p { margin: 0; }
.section-heading h2 {
  display: inline-block;
  position: relative;
  max-width: 100%;
  padding: .24em .72em .32em;
  border-radius: 2px 2px 2px 0;
  background: linear-gradient(105deg, #d95845 0%, #e97855 48%, #f0a76d 100%);
  box-shadow: 9px 9px 0 rgb(223 98 70 / 14%);
  color: #fffdf8;
  font-size: clamp(1.8rem, 3vw, 2.75rem);
  font-weight: 600;
  letter-spacing: -.025em;
  line-height: 1.25;
  text-shadow: 0 1px 1px rgb(115 48 33 / 18%);
}
.section-heading h2::after {
  position: absolute;
  top: 100%;
  left: 0;
  width: 18px;
  height: 18px;
  background: #a84235;
  clip-path: polygon(0 0, 100% 0, 100% 100%);
  content: "";
}

.decorative-illustration {
  position: absolute;
  z-index: 0;
  display: block;
  width: clamp(450px, 50vw, 750px);
  height: auto;
  opacity: .12;
  pointer-events: none;
  user-select: none;
  filter: saturate(.58) contrast(.9);
  transform: translate3d(0, 0, 0) rotate(var(--art-rotate, 0deg));
  transform-origin: center;
}
.section-heading, .section-layout { position: relative; z-index: 1; }
.illustration-origin { --art-rotate: 7deg; top: -4%; left: -20%; }
.illustration-program { --art-rotate: -8deg; top: -3%; right: -22%; width: clamp(440px, 60vw, 780px); }
.illustration-selection { --art-rotate: 6deg; top: 1%; right: -21%; width: clamp(500px, 55vw, 740px); }
.selection-illustration-sticky {
  position: sticky;
  z-index: 0;
  top: 108px;
  height: 0;
  pointer-events: none;
}
.selection-illustration-sticky .illustration-selection { top: -28px; }
.prose {
  color: var(--ink);
  font-family: var(--font-latin);
  font-size: clamp(1.06rem, 1.2vw, 1.18rem);
  font-weight: 400;
}
.prose p, .selection-stages p { margin: 0; }
.prose p + p { margin-top: 1.25em; }

.section-layout {
  display: grid;
  align-items: start;
  gap: clamp(28px, 4vw, 60px);
}
.origin-layout { grid-template-columns: minmax(0, 1fr) minmax(440px, .95fr); }
.program-layout { grid-template-columns: minmax(440px, .95fr) minmax(0, 1fr); }
.selection-layout {
  grid-template-columns: minmax(320px, .78fr) minmax(0, 1.22fr);
  gap: clamp(36px, 5vw, 76px);
}

.photo-gallery { min-width: 0; }
.gallery-stage {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  padding: 0;
  border: 0;
  aspect-ratio: 3 / 2;
  background: transparent;
  cursor: pointer;
}
.gallery-stage:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 5px;
}
.gallery-slide {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 900ms cubic-bezier(.16, 1, .3, 1);
}
.gallery-slide.is-active { opacity: 1; }

.program-content { display: grid; align-content: start; }
.program-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 28px);
  margin: clamp(26px, 3.5vw, 46px) 0 0;
  padding: 0;
  list-style: none;
}
.program-list li {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 10px;
  padding: 0 0 17px 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font-family: var(--font-latin);
  font-size: 1.02rem;
  font-weight: 400;
  line-height: 1.75;
}
.program-list h3 {
  align-self: start;
  margin: 0;
  width: fit-content;
  max-width: 100%;
  padding: .28em 1em .34em 1.5em;
  border-radius: 66px;
  background: linear-gradient(105deg, #d95845 0%, #e97855 48%, #f0a76d 100%);
  box-shadow: 5px 5px 0 rgb(223 98 70 / 14%);
  color: #fffdf8;
  font-size: clamp(1.06rem, 1.6vw, 1.6rem);
  font-weight: 600;
  letter-spacing: 0.4em;
  line-height: 1.35;
  text-shadow: 0 1px 1px rgb(115 48 33 / 18%);
  margin-bottom: 0.7em;
}
.program-list p { margin: 0; }
.program-list a, .selection-stages a {
  color: var(--accent);
  font-weight: 500;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  text-decoration-color: color-mix(in srgb, var(--accent) 48%, transparent);
  transition: color 180ms ease, box-shadow 180ms ease, text-decoration-color 180ms ease;
  text-align: justify;
}
.program-list a:hover, .selection-stages a:hover {
  box-shadow: inset 0 -.62em 0 rgb(240 167 109 / 36%);
  color: #b54534;
  text-decoration-color: currentColor;
}

.program-video-carousel {
  position: relative;
  margin-top: clamp(24px, 3vw, 40px);
}
.program-video-strip {
  display: flex;
  width: 100%;
  gap: 14px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  padding: 2px 0 12px;
  margin: 0;
  scroll-snap-type: inline proximity;
  scrollbar-color: color-mix(in srgb, var(--accent) 45%, transparent) transparent;
  scrollbar-width: thin;
}
.video-scroll-button {
  position: absolute;
  z-index: 2;
  top: calc(50% - 6px);
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--accent) 42%, var(--line));
  border-radius: 50%;
  background: var(--surface);
  color: var(--accent);
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}
.video-scroll-button.is-prev { left: -46px; }
.video-scroll-button.is-next { right: -46px; }
.video-scroll-button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }
.video-scroll-button:hover { background: var(--accent); color: #fffdf8; transform: translateY(-50%) scale(1.06); }
.video-scroll-button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.program-video-card {
  display: block;
  position: relative;
  flex: 0 0 clamp(230px, 22vw, 300px);
  overflow: hidden;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  scroll-snap-align: start;
  text-align: left;
  text-decoration: none;
}
.program-video-card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform 420ms cubic-bezier(.16, 1, .3, 1), filter 420ms cubic-bezier(.16, 1, .3, 1);
}
.video-card-action {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 6px 9px;
  background: rgb(18 28 45 / 86%);
  color: #fffdf8;
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .02em;
  line-height: 1;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 180ms ease, transform 180ms ease;
}
.program-video-card:hover img { filter: brightness(.82); transform: scale(1.025); }
.program-video-card:hover .video-card-action,
.program-video-card:focus-visible .video-card-action { opacity: 1; transform: translateY(0); }
.program-video-card:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }

.video-lightbox {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgb(14 20 30 / 78%);
  animation: lightbox-enter 220ms cubic-bezier(.16, 1, .3, 1);
}
.video-lightbox[hidden] { display: none; }
.video-lightbox-panel {
  position: relative;
  width: min(560px, calc((100svh - 48px) * 9 / 16), calc(100vw - 48px));
  aspect-ratio: 9 / 16;
  background: #101827;
  box-shadow: 0 24px 64px rgb(0 0 0 / 34%);
}
.video-lightbox iframe { display: block; width: 100%; height: 100%; border: 0; }
.video-lightbox-close {
  position: absolute;
  z-index: 1;
  top: -14px;
  right: -14px;
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
  color: #fffdf8;
  cursor: pointer;
  box-shadow: 0 8px 20px rgb(0 0 0 / 24%);
}
.video-lightbox-close svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-width: 2; }
.video-lightbox-close:focus-visible { outline: 3px solid #fffdf8; outline-offset: 3px; }
@keyframes lightbox-enter { from { opacity: 0; } to { opacity: 1; } }

.selection-visual { position: sticky; top: 108px; align-self: start; }
.selection-image-stack {
  position: relative;
  display: grid;
  gap: 12px;
  padding-right: clamp(34px, 4vw, 58px);
}
.selection-stage-photo { width: 100%; margin: 0; }
.selection-stage-photo + .selection-stage-photo { width: 86%; justify-self: end; }
.selection-stage-photo img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  background: transparent;
}
.selection-stage-index {
  position: absolute;
  z-index: 1;
  top: 50%;
  right: 0;
  display: grid;
  width: clamp(54px, 5.6vw, 78px);
  aspect-ratio: 1;
  place-items: center;
  background: linear-gradient(135deg, #d95745 0%, #ee8c62 56%, #f2b070 100%);
  box-shadow: 7px 8px 20px rgb(150 67 43 / 16%);
  color: #fffdf8;
  font-family: var(--font-latin);
  font-size: clamp(1.8rem, 3.2vw, 3.2rem);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.06em;
  line-height: 1;
  transform: translateY(-50%);
}
.selection-stages {
  display: grid;
  /* This is part of the grid track, so the sticky photo can remain through the final stage. */
  padding-bottom: clamp(500px, 58vh, 700px);
}
.selection-stages article {
  display: grid;
  min-height: min(54svh, 520px);
  align-content: center;
  padding: clamp(36px, 5vw, 64px) 0;
  scroll-margin-top: 102px;
}
.selection-stages article + article { border-top: 1px solid var(--line); }
.selection-stages h3 {
  margin-bottom: 12px;
  font-size: clamp(1.65rem, 2.1vw, 2rem);
  font-weight: 600;
  letter-spacing: -.035em;
  line-height: 1.3;
}
.selection-stages p {
  color: var(--ink);
  font-family: var(--font-latin);
  font-size: 1.04rem;
  font-weight: 400;
  line-height: 1.8;
}
.selection-mobile-gallery { display: none; }

.contact-section {
  display: grid;
  place-items: center;
  padding: clamp(72px, 9vw, 112px) 20px;
  border-top: 1px solid var(--line);
  text-align: center;
}
.contact-section p {
  max-width: 44em;
  font-size: clamp(1.02rem, 1.55vw, 1.42rem);
  font-weight: 500;
  letter-spacing: -.02em;
  line-height: 1.65;
}
.contact-section p span { display: block; }
.contact-button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  margin-top: 36px;
  padding: 12px 25px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  transition: box-shadow 180ms ease, transform 180ms ease;
}
.contact-button:hover { box-shadow: 0 10px 30px color-mix(in srgb, var(--accent) 24%, transparent); transform: translateY(-2px); }

@media (max-width: 980px) {
  .site-header { flex-wrap: nowrap; gap: 12px; padding-inline: 20px; }
  .section-nav {
    order: initial;
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    gap: clamp(10px, 2.5vw, 18px);
  }
  .section-layout { grid-template-columns: 1fr; }
  .selection-layout { grid-template-columns: 1fr; }
  .selection-stages { padding-bottom: 0; }
  .selection-visual { display: none; }
  .selection-stages article { min-height: 0; align-content: start; }
  .selection-mobile-gallery { display: block; margin-top: 28px; }
}

@media (max-width: 750px) {
  .brand-lockup img { width: 126px; }
  .hero { width: 100%; aspect-ratio: 750 / 1400; }
  .hero-background img { object-fit: cover; object-position: center; }
  .hero-copy { align-items: flex-start; padding: 0; }
  .hero-title {
    top: 6.5%;
    left: 10.5%;
    font-size: clamp(4rem, 20.5vw, 5.15rem);
  }
  .hero-plan {
    top: 9%;
    left: 54.5%;
    min-height: 0;
    padding: .62em .32em;
    font-size: clamp(.76rem, 3.55vw, 1rem);
    transform: none;
  }
  .hero-message {
    top: 9%;
    left: 64%;
    font-size: clamp(1rem, 5.2vw, 1.45rem);
    transform: none;
  }
  .content-section, .contact-section { width: min(100% - 32px, 1300px); }
  .contact-section [data-reveal] { opacity: 1; translate: 0; }
  .content-section { padding-block: 56px; padding-inline: 0; }
  .program-list { grid-template-columns: 1fr; gap: 10px; margin-top: 34px; }
  .program-list li { grid-template-rows: auto; gap: 7px; padding: 20px 18px; }
  .section-heading h2 {
    padding: .28em .62em .34em;
    font-size: clamp(1.55rem, 7vw, 2.2rem);
  }
  .program-video-strip {
    gap: 12px;
    padding-bottom: 10px;
  }
  .program-video-carousel { margin-inline: 44px; }
  .video-scroll-button { width: 38px; height: 38px; }
  .video-scroll-button.is-prev { left: -44px; }
  .video-scroll-button.is-next { right: -44px; }
  .program-video-card { flex-basis: min(78vw, 300px); }
  .video-lightbox { padding: 18px; }
  .video-lightbox-close { top: -12px; right: -4px; }
  .decorative-illustration { width: 145vw; opacity: .135; }
  .illustration-origin { top: 2%; right: -42%; left: auto; }
  .illustration-program { top: 1%; right: -44%; left: auto; width: 155vw; }
  .illustration-selection { top: 3%; right: -46%; width: 150vw; }
}

@media (prefers-reduced-motion: no-preference) {
  .site-header { animation: header-enter 640ms cubic-bezier(.16, 1, .3, 1) both; }
  .hero-copy { animation: hero-enter 800ms cubic-bezier(.16, 1, .3, 1) both; }
  [data-reveal] {
    opacity: 0;
    translate: 0 24px;
    transition: opacity 720ms cubic-bezier(.16, 1, .3, 1), translate 720ms cubic-bezier(.16, 1, .3, 1);
  }
  [data-reveal].is-visible { opacity: 1; translate: 0 0; }
  .decorative-illustration[data-reveal] { transition-delay: 90ms; }
  .decorative-illustration[data-reveal].is-visible { opacity: .17; }
  .program-list [data-reveal]:nth-child(2),
  .selection-stages [data-reveal]:nth-child(2) { transition-delay: 80ms; }
  .program-list [data-reveal]:nth-child(3),
  .selection-stages [data-reveal]:nth-child(3) { transition-delay: 160ms; }
}

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .decorative-illustration {
      animation: illustration-parallax linear both;
      animation-timeline: view(block);
      animation-range: entry -12% exit 112%;
      will-change: transform;
    }
    .selection-illustration-sticky .decorative-illustration {
      animation: none;
      will-change: auto;
    }
  }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
@keyframes hero-enter {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes header-enter {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes illustration-parallax {
  from { transform: translate3d(0, -7%, 0) rotate(var(--art-rotate, 0deg)) scale(.96); }
  to { transform: translate3d(0, 9%, 0) rotate(var(--art-rotate, 0deg)) scale(1.04); }
}
@media (max-width: 750px) and (prefers-reduced-motion: no-preference) {
  .decorative-illustration[data-reveal].is-visible { opacity: .135; }
}
