:root {
  --band-a: #fad483;
  --band-m: #f5b592;
  --band-b: #f19598;
  --foot-a: #00acec;
  --foot-b: #0057a9;
  --teal: #00a29a;
  --ink: #231f20;
  --hdr: 76px;
  /* Content column shared by the top bar, news and footer: it matches the
     poster's content, which spans 20%–80% of the artwork. */
  --col: max(calc(var(--pw) * .6), min(100% - 32px, 560px));
  /* Poster width on desktop: as wide as the viewport, but never taller than
     the space left under the top bar, so the whole artwork fits on screen. */
  --pw: min(100%, max(720px, calc((100vh - var(--hdr)) * 16 / 9)));
}
@supports (height: 100svh) {
  :root { --pw: min(100%, max(720px, calc((100svh - var(--hdr)) * 16 / 9))); }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
}

img { display: block; max-width: 100%; height: auto; }
h1, h2, p, dl, dd { margin: 0; }
a { color: inherit; }

.wrap { width: min(1000px, 100%); margin: 0 auto; padding: 0 16px; }

/* Top bar: its content lines up with the poster's content column,
   which spans 20%–80% of the artwork's width. */
.topbar { background: #fff; }
.topbar-inner {
  container-type: inline-size;
  display: flex; flex-wrap: wrap; align-items: center; row-gap: 4px;
  width: var(--col);
  height: var(--hdr);
  padding: 0;
}
.company { flex: none; }
.company-name { font-size: 22.500px; font-weight: 300; line-height: 1.15; }
.company-en { margin-top: 1px; font: 700 12.700px/1.2 Arial, Helvetica, sans-serif; letter-spacing: .85px; }
.tagline { margin-left: 24px; color: var(--teal); font-size: 21px; font-weight: 300; line-height: 1; white-space: nowrap; }
.tagline span { margin-left: 16px; }
@container (max-width: 720px) { .tagline { margin-left: 16px; font-size: 16px; } .tagline span { margin-left: 8px; } }
@container (max-width: 540px) { .tagline { order: 3; flex-basis: 100%; margin-left: 0; font-size: 15px; } }
.icons { display: flex; gap: 16px; margin-left: auto; }
.icons a { display: block; width: 48px; height: 48px; border-radius: 50%; }
.icons a { transition: transform .15s ease; }
.icons a:hover { transform: translateY(-2px); }
.icons a:focus-visible, .footer a:focus-visible { outline: 3px solid #005dad; outline-offset: 3px; }

/* Stage: the poster with real, clickable buttons laid over the buttons
   painted in it. Button positions are % of the 3840x2160 artwork. */
.stage {
  position: relative;
  padding-bottom: 53px;
  background: linear-gradient(90deg, var(--band-a), var(--band-m) 50%, var(--band-b));
}
.hero { position: relative; overflow: hidden; background: #145f78; }
/* When the poster is narrower than the window, a blurred copy fills the sides. */
.hero::before {
  content: "";
  position: absolute;
  inset: -80px;
  background: url("assets/poster-1920.jpg") center / cover no-repeat;
  filter: blur(40px);
}
.poster { position: relative; width: var(--pw); margin: 0 auto; }
.poster-canvas { position: relative; }
.poster-bg {
  width: 100%;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.poster-btn {
  position: absolute;
  top: 32.407%;
  width: 28.75%;
  display: block;
  overflow: hidden;
  border-radius: 8.6% / 13%;
  transition: transform .15s ease, filter .15s ease;
}
.poster-btn img { width: 100%; }
.btn-watch { left: 20%; }
.btn-aivue { left: 51.25%; }
.poster-btn:hover { transform: translateY(-1.5%) scale(1.025); filter: brightness(1.05) drop-shadow(0 8px 16px rgba(0, 20, 40, .35)); }
.poster-btn:active { transform: scale(.995); }
.poster-btn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

.news { position: relative; width: var(--col); margin: 26px auto 0; }
.news-tab {
  position: relative;
  display: inline-block;
  height: 37px;
  padding: 0 40px 0 13px;
  color: #fff;
  font-size: 22px;
  font-weight: 300;
  line-height: 37px;
  background: linear-gradient(90deg, #005dad, #00a7e8);
  clip-path: polygon(0 0, calc(100% - 13px) 0, 100% 100%, 0 100%);
}
.news-tab::after {
  content: "";
  position: absolute;
  inset: 0 0 0 auto;
  width: 13px;
  background: #9fd9f3;
  clip-path: polygon(0 0, 3px 0, 100% 100%, 10px 100%);
}
.news-box {
  margin-top: 10px;
  min-height: 84px;
  padding: 10px 8px 14px 13px;
  background: #fff;
  border-radius: 8px;
  font-size: 22px;
  font-weight: 400;
  line-height: 27px;
  letter-spacing: 5px;
}

/* Footer */
.footer { background: linear-gradient(90deg, var(--foot-a), #0083cb 50%, var(--foot-b)); color: #fff; }
.footer-inner { width: var(--col); display: flex; flex-wrap: wrap; align-items: center; gap: 12px 40px; min-height: 84px; padding: 14px 0; }
.foot-items { flex: 1 1 480px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; }
.foot-logo { flex: none; display: block; }
.foot-logo img { width: auto; height: 52px; }
.foot-item { display: flex; align-items: center; gap: 10px; }
.foot-icon { flex: none; width: 24px; height: 32px; fill: currentColor; }
.foot-icon.mail { width: 25px; height: 19px; }
.footer dl { font-size: 13px; font-weight: 300; line-height: 23px; letter-spacing: .85px; }
.footer dl > div { display: flex; gap: 18px; }
.footer dt { flex: none; }
.footer dd a { text-decoration: none; }
.footer dd a:hover { text-decoration: underline; }
.footer dd a[href*="twedu"] { text-decoration: underline; }

@media (min-width: 1000px) {
  .footer dd { white-space: nowrap; }
}

/* Phones and portrait tablets: crop the empty sides of the poster
   (keep 16%–84% across, 7%–88% down) so the buttons stay big enough
   to tap. The top bar's 5.88% side padding lines it up with the
   poster's content in this crop. */
@media (max-width: 760px), (max-width: 1100px) and (orientation: portrait) {
  .topbar-inner { width: 100%; height: auto; min-height: 64px; padding: 8px 5.88%; }
  .poster { width: 100%; aspect-ratio: 100 / 67; overflow: hidden; }
  .poster-canvas { position: absolute; top: 0; left: -23.53%; width: 147.06%; margin-top: -5.79%; }
  .poster-bg { -webkit-mask-image: none; mask-image: none; }
  .news, .footer-inner { width: 88.24%; }
}

/* Tablet: stack the footer */
@media (max-width: 760px) {
  .footer-inner { flex-direction: column; flex-wrap: nowrap; align-items: flex-start; gap: 14px; padding: 18px 0; }
  .foot-items { flex: none; flex-direction: column; align-items: flex-start; gap: 10px; }
}

/* Phone */
@media (max-width: 560px) {
  .company-name { font-size: 18px; }
  .company-en { font-size: 10.200px; letter-spacing: .68px; }
  .icons { gap: 10px; }
  .icons a { width: 40px; height: 40px; }
  .foot-logo img { height: 44px; }
  .stage { padding-bottom: 32px; }
  .news { margin-top: 18px; }
  .news-tab { font-size: 18px; }
  .news-box { padding: 10px 13px 14px; font-size: 16px; line-height: 25px; letter-spacing: 1.500px; }
  .footer dl > div { gap: 10px; }
  .footer dl { font-size: 13px; letter-spacing: .3px; }
}
