:root {
  --paper: #eceef2;
  --paper-2: #e2e5ea;
  --ink: #0b0d14;
  --ink-soft: #3a3f4c;
  --line: #1a1d27;
  --blue: #1f3cf0;
  --blue-deep: #1328c4;
  --blue-light: #4e6bff;
  --lime: #b8f36b;
  --grey-stripe: #c4c8d0;
  --pad: clamp(16px, 3vw, 44px);
  --skew: -18deg;
  --font-display: "Archivo", "Noto Sans TC", system-ui, sans-serif;
  --font-body: "Noto Sans TC", "Archivo", system-ui, sans-serif;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }

/* ---------- texture + background beams ---------- */
.grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 100; opacity: .35; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .55 0 0 0 .18 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.bg-beams { position: absolute; inset: 0 0 auto 0; height: 110vh; pointer-events: none; overflow: hidden; z-index: 0; }
.bg-beams span {
  position: absolute; top: -10%; height: 130%; width: 14vw; background: rgba(160, 166, 178, .22);
  transform: skewX(var(--skew)); animation: beam-in 1.4s var(--ease-out) both;
}
.bg-beams span:nth-child(1) { left: 34%; }
.bg-beams span:nth-child(2) { left: 58%; width: 9vw; animation-delay: .15s; background: rgba(160, 166, 178, .15); }
@keyframes beam-in { from { transform: skewX(var(--skew)) translateY(-40%); opacity: 0; } }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  margin: 0 var(--pad); padding: 18px 0;
  border-bottom: 2px solid var(--line);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(6px);
  animation: drop-in .8s var(--ease-out) both;
}
@keyframes drop-in { from { transform: translateY(-100%); opacity: 0; } }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { display: inline-flex; gap: 4px; }
.brand-mark i { display: block; width: 20px; height: 20px; background: var(--blue); transform: skewX(var(--skew)); }
.brand-mark i:last-child { width: 12px; height: 13px; align-self: flex-end; }
.brand-mark.small i { width: 12px; height: 12px; }
.brand-mark.small i:last-child { width: 7px; height: 8px; }
.brand:hover .brand-mark i:first-child { animation: nudge .5s var(--ease-out); }
@keyframes nudge { 50% { transform: skewX(var(--skew)) translateX(5px); } }
.brand-name { font-family: var(--font-display); font-weight: 800; font-size: 20px; letter-spacing: -.02em; }
.site-nav { display: flex; gap: clamp(20px, 4vw, 54px); }
.site-nav a { position: relative; font-family: var(--font-display); font-weight: 700; font-size: 17px; padding: 4px 0; }
.site-nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 3px; background: var(--blue);
  transform: scaleX(0) skewX(var(--skew)); transform-origin: left; transition: transform .35s var(--ease-out);
}
.site-nav a:hover::after, .site-nav a:focus-visible::after { transform: scaleX(1) skewX(var(--skew)); }
.nav-toggle { display: none; }

/* ---------- hero ---------- */
.hero {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  align-items: center; gap: 2vw;
  min-height: min(86vh, 820px);
  overflow-x: clip;
  padding: clamp(28px, 5vw, 64px) var(--pad) 40px;
}
.hero-copy { position: relative; z-index: 3; }
.hero-title {
  font-family: var(--font-display); font-style: italic; font-weight: 900;
  font-size: clamp(52px, 7.6vw, 136px); line-height: .86; letter-spacing: -.045em;
  text-transform: uppercase;
}
.hero-title .line { display: block; white-space: nowrap; overflow: hidden; padding: .02em .08em .04em 0; }
.hero-title .word { display: inline-block; margin-right: .16em; animation: word-up 1s var(--ease-out) both; }
.hero-title .line:nth-child(1) .word:nth-child(1) { animation-delay: .25s; }
.hero-title .line:nth-child(1) .word:nth-child(2) { animation-delay: .35s; }
.hero-title .line:nth-child(2) .word { animation-delay: .47s; }
@keyframes word-up { from { transform: translateY(105%) skewY(6deg); } }

.tagline {
  display: flex; align-items: center; gap: 16px;
  margin-top: clamp(22px, 3vw, 40px);
  font-weight: 700; font-size: clamp(19px, 2vw, 30px); letter-spacing: .04em;
  animation: fade-right .9s .75s var(--ease-out) both;
}
.tick { width: 9px; height: 36px; background: var(--lime); transform: skewX(var(--skew)); flex: none; }
@keyframes fade-right { from { opacity: 0; transform: translateX(-24px); } }

.btn-primary, .btn-light {
  position: relative; display: inline-flex; align-items: center; justify-content: space-between; gap: 48px;
  margin-top: clamp(26px, 3.4vw, 46px); padding: 18px 54px 18px 64px;
  font-family: var(--font-display); font-weight: 800; font-size: clamp(18px, 1.8vw, 26px);
  color: #fff; isolation: isolate; overflow: hidden;
  clip-path: polygon(22px 0, 100% 0, calc(100% - 22px) 100%, 0 100%);
  animation: fade-right .9s .9s var(--ease-out) both;
}
.btn-primary::before, .btn-light::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--blue-deep); transition: background .3s;
}
.btn-primary::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: -40%; width: 30%; z-index: -1;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent);
  transform: skewX(var(--skew)); animation: shine 3.6s 2s ease-in-out infinite;
}
@keyframes shine { 0%, 60% { left: -40%; } 100% { left: 130%; } }
.btn-primary svg, .btn-light svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 2.4; transition: transform .35s var(--ease-out); }
.btn-primary:hover::before { background: var(--blue); }
.btn-primary:hover svg, .btn-light:hover svg { transform: translateX(8px); }
.btn-primary:active, .btn-light:active { transform: translateY(2px); }

.slashes { display: inline-flex; gap: 6px; }
.slashes i { display: block; width: 22px; height: 18px; background: var(--blue-deep); transform: skewX(-30deg); }
.slashes-hero { margin-top: clamp(40px, 6vw, 80px); }
.slashes-hero i, .slashes-visual i { animation: blink 2.4s ease-in-out infinite; }
.slashes i:nth-child(2) { animation-delay: .2s; }
.slashes i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 70%, 100% { opacity: 1; } 35% { opacity: .25; } }
.slashes-grey i { background: var(--grey-stripe); width: 20px; height: 22px; }

/* hero visual */
.hero-visual { position: relative; aspect-ratio: 900 / 620; width: 112%; margin-left: -6%; }
.shape { position: absolute; background: var(--blue); transform: skewX(var(--skew)); }
.shape-a { left: -2%; bottom: -1%; width: 38%; height: 30%; animation: slide-up 1.1s .5s var(--ease-out) both; }
.shape-b { right: 2%; bottom: -1%; width: 52%; height: 22%; animation: slide-up 1.1s .65s var(--ease-out) both; }
.shape-c { right: -6%; top: 2%; width: 14%; height: 48%; animation: slide-down 1.1s .8s var(--ease-out) both; }
@keyframes slide-up { from { transform: skewX(var(--skew)) translateY(60%); opacity: 0; } }
@keyframes slide-down { from { transform: skewX(var(--skew)) translateY(-60%); opacity: 0; } }

.corner { position: absolute; width: 26px; height: 26px; border: 2px solid var(--line); animation: fade 1s 1.4s both; }
.corner-tr { top: 0; right: 0; border-left: 0; border-bottom: 0; }
.corner-br { bottom: 6%; right: 0; border-left: 0; border-top: 0; }
@keyframes fade { from { opacity: 0; } }

.orbit { position: absolute; left: -2%; top: 4%; width: 104%; height: 86%; z-index: 2; overflow: visible; pointer-events: none; }
.orbit path { fill: none; stroke: var(--line); stroke-width: 1.4; vector-effect: non-scaling-stroke; stroke-dasharray: 2600; stroke-dashoffset: 2600; animation: draw 2.2s 1s var(--ease-out) forwards; }
.orbit-dot { fill: var(--blue); animation: fade 1s 2s both; }
@keyframes draw { to { stroke-dashoffset: 0; } }

.crosshair {
  position: absolute; left: 8%; top: -2%; width: 19%; z-index: 4;
  transform: translate(var(--cx, 0px), var(--cy, 0px)); transition: transform .5s var(--ease-out);
}
.crosshair svg { width: 100%; display: block; fill: none; stroke: var(--line); stroke-width: 2.2; animation: crosshair-in 1.2s 1.1s var(--ease-out) both, spin 18s 2.3s linear infinite; }
@keyframes crosshair-in { from { opacity: 0; transform: scale(1.8) rotate(-90deg); } }
@keyframes spin { to { transform: rotate(360deg); } }

.arena { position: relative; z-index: 3; width: 100%; height: 100%; overflow: visible; }
.arena .box { animation: box-drop .9s var(--ease-out) both; animation-delay: calc(.4s + var(--i) * 35ms); }
.arena .box.float { animation: box-drop .9s var(--ease-out) both, bob 4s ease-in-out infinite; animation-delay: calc(.4s + var(--i) * 35ms), calc(2s + var(--i) * 100ms); }
@keyframes box-drop { from { opacity: 0; transform: translateY(-70px); } }
@keyframes bob { 50% { transform: translateY(-8px); } }
.arena .floor-mark { fill: none; stroke: var(--blue); stroke-width: 2; stroke-opacity: .7; animation: fade 1s 1.8s both, pulse 2.6s 2.8s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .4; } }
.arena .decal { fill: #fff; opacity: .9; }

.slashes-visual { position: absolute; right: 16%; bottom: 7%; z-index: 4; }
.slashes-visual i { background: #fff; width: 30px; height: 24px; }

/* ---------- strip ---------- */
.strip {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: 1.15fr 1fr;
  margin: 0 var(--pad); border-top: 2px solid var(--line);
}
.strip-project { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 30px 30px 30px clamp(60px, 7vw, 110px); border-right: 2px solid var(--line); }
.strip-flag { position: absolute; left: calc(var(--pad) * -1 - 10px); top: 28%; width: clamp(40px, 5vw, 80px); height: 60%; background: var(--blue); transform: skewX(var(--skew)); }
.eyebrow { font-family: var(--font-display); font-weight: 700; font-size: 13px; letter-spacing: .32em; display: flex; align-items: center; gap: 20px; }
.strip-project .eyebrow::after { content: ""; width: 120px; height: 1.5px; background: var(--line); }
.strip-title { font-family: var(--font-display); font-style: italic; font-weight: 900; font-size: clamp(28px, 3.5vw, 54px); letter-spacing: -.03em; line-height: 1.05; transition: color .3s; }
.strip-project:hover .strip-title { color: var(--blue-deep); }
.status-row { display: flex; align-items: center; gap: 12px; }
.badge {
  display: inline-flex; align-items: center; gap: 10px; padding: 6px 20px;
  background: var(--lime); font-weight: 900; font-size: 16px; letter-spacing: .08em;
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
}
.badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ink); animation: live 1.4s ease-in-out infinite; }
@keyframes live { 50% { opacity: .2; transform: scale(.6); } }

.strip-fair { display: flex; flex-direction: column; justify-content: center; gap: 14px; padding: 26px 0 26px clamp(24px, 3vw, 48px); }
.fair-title { display: flex; align-items: center; gap: 18px; font-family: var(--font-display); font-style: italic; font-weight: 900; font-size: clamp(32px, 4vw, 62px); letter-spacing: -.03em; }
.fair-title::after { content: ""; flex: 1; height: 1.5px; background: var(--line); margin-left: 10px; }
.slash { width: 16px; height: .8em; background: var(--blue); transform: skewX(var(--skew)); }
.fair-icons { display: flex; align-items: center; gap: clamp(16px, 3vw, 48px); list-style: none; margin: 0; padding: 0 0 0 clamp(0px, 3vw, 56px); font-weight: 900; font-size: clamp(18px, 1.9vw, 28px); letter-spacing: .08em; }
.fair-icons li { display: flex; align-items: center; gap: 14px; }
.fair-icons svg { width: 52px; height: 52px; fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }
.fair-icons .sep { font-weight: 300; font-size: 1.6em; color: var(--ink-soft); }
.fair-icons li:first-child svg { transform-origin: 50% 20%; animation: sway 3.2s ease-in-out infinite; }
@keyframes sway { 25% { transform: rotate(-6deg); } 75% { transform: rotate(6deg); } }
.fair-icons .check { stroke-dasharray: 30; stroke-dashoffset: 30; }
.strip-fair.in .check { animation: draw-check .8s .5s var(--ease-out) forwards; }
@keyframes draw-check { to { stroke-dashoffset: 0; } }

/* ---------- sections ---------- */
.section { position: relative; z-index: 2; padding: clamp(72px, 10vw, 140px) var(--pad) 0; }
.section-head { display: flex; flex-direction: column; gap: 16px; margin-bottom: clamp(32px, 4vw, 56px); }
.section-head .eyebrow::before { content: ""; width: 12px; height: 18px; background: var(--blue); transform: skewX(var(--skew)); }
.section-title { font-family: var(--font-display); font-weight: 900; font-size: clamp(32px, 4.6vw, 68px); letter-spacing: -.02em; line-height: 1.1; }

.project-card {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(24px, 4vw, 64px); align-items: center;
  padding: clamp(28px, 4vw, 56px); background: #fff; border: 2px solid var(--line);
  box-shadow: 12px 12px 0 var(--blue);
  transition: transform .4s var(--ease-out), box-shadow .4s var(--ease-out);
}
.project-card:hover { transform: translate(-4px, -4px); box-shadow: 16px 16px 0 var(--blue); }
.project-main { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.project-main h3 { font-family: var(--font-display); font-style: italic; font-weight: 900; font-size: clamp(30px, 3.6vw, 52px); letter-spacing: -.03em; line-height: 1.05; }
.project-main p { font-size: 17px; line-height: 1.8; color: var(--ink-soft); max-width: 42ch; }
.project-stripes { position: absolute; right: -30px; top: 0; bottom: 0; width: 70px; background: repeating-linear-gradient(-58deg, var(--paper-2) 0 12px, transparent 12px 24px); opacity: .9; }

.timeline { list-style: none; margin: 0; padding: 0 40px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); counter-reset: step; }
.timeline li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 14px; font-weight: 700; font-size: 15px; color: var(--ink-soft); counter-increment: step; }
.timeline li::before {
  content: counter(step, decimal-leading-zero); display: grid; place-items: center; width: 46px; height: 46px; position: relative; z-index: 1;
  font-family: var(--font-display); font-weight: 900; font-style: italic; font-size: 15px;
  background: var(--paper); border: 2px solid var(--line); transform: skewX(var(--skew));
}
.timeline li::after { content: ""; position: absolute; top: 23px; left: 50%; width: 100%; height: 2px; background: var(--grey-stripe); }
.timeline li:last-child::after { display: none; }
.timeline li.done::before { background: var(--ink); color: #fff; }
.timeline li.done::after { background: var(--ink); transform-origin: left; transform: scaleX(0); }
.project-card.in .timeline li.done::after { animation: grow .7s var(--ease-out) forwards; }
.project-card.in .timeline li.done:nth-child(2)::after { animation-delay: .5s; }
@keyframes grow { to { transform: scaleX(1); } }
.timeline li.current { color: var(--ink); }
.timeline li.current::before { background: var(--lime); animation: ping 1.6s ease-in-out infinite; }
@keyframes ping { 0%, 100% { box-shadow: 0 0 0 0 rgba(31, 60, 240, .5); } 60% { box-shadow: 0 0 0 12px rgba(31, 60, 240, 0); } }

.rules { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.rule {
  position: relative; display: flex; flex-direction: column; gap: 12px; min-height: 230px;
  padding: 28px 24px; background: #fff; border: 2px solid var(--line); overflow: hidden; isolation: isolate;
  transition: color .35s, transform .35s var(--ease-out);
}
.rule::before { content: ""; position: absolute; inset: 0 -30%; z-index: -1; background: var(--blue-deep); transform: skewX(var(--skew)) translateX(-110%); transition: transform .5s var(--ease-out); }
.rule:hover { color: #fff; transform: translateY(-6px); }
.rule:hover::before { transform: skewX(var(--skew)) translateX(0); }
.rule-no { font-family: var(--font-display); font-style: italic; font-weight: 900; font-size: 46px; line-height: 1; color: var(--blue); transition: color .35s; }
.rule:hover .rule-no { color: var(--lime); }
.rule h3 { font-size: 24px; font-weight: 900; letter-spacing: .06em; }
.rule p { font-size: 15px; line-height: 1.75; opacity: .85; }

/* ---------- CTA ---------- */
.cta { position: relative; z-index: 2; margin-top: clamp(80px, 11vw, 150px); background: var(--blue-deep); color: #fff; overflow: hidden; }
.cta::after { content: ""; position: absolute; right: -6%; top: 0; bottom: 0; width: 34%; background: var(--blue); transform: skewX(var(--skew)); }
.marquee { position: relative; z-index: 1; overflow: hidden; border-bottom: 2px solid rgba(255,255,255,.25); padding: 14px 0; }
.marquee-track { display: flex; width: max-content; animation: marquee 22s linear infinite; }
.marquee-track span { font-family: var(--font-display); font-style: italic; font-weight: 900; font-size: 22px; letter-spacing: .02em; padding-right: 40px; white-space: nowrap; }
.marquee-track span:nth-child(3n+2) { color: var(--lime); }
@keyframes marquee { to { transform: translateX(-50%); } }
.cta-inner { position: relative; z-index: 2; padding: clamp(56px, 8vw, 110px) var(--pad); display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.cta-inner h2 { font-size: clamp(44px, 7vw, 110px); font-weight: 900; letter-spacing: .02em; line-height: 1; }
.cta-inner p { font-size: clamp(16px, 1.5vw, 20px); opacity: .9; }
.btn-light { color: var(--ink); animation: none; }
.btn-light::before { background: #fff; }
.btn-light:hover::before { background: var(--lime); }

/* ---------- footer ---------- */
.site-footer { position: relative; z-index: 2; display: flex; align-items: center; gap: 14px; margin: 0 var(--pad); padding: 26px 0; font-family: var(--font-display); font-weight: 700; font-size: 14px; letter-spacing: .08em; }
.site-footer .slashes { margin-left: auto; }

/* ---------- scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); transition-delay: var(--rd, 0s); }
.reveal.in { opacity: 1; transform: none; }
.project-card.reveal.in:hover { transform: translate(-4px, -4px); }
.rule.reveal.in:hover { transform: translateY(-6px); }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; padding-top: 32px; }
  .hero-visual { width: 100%; margin: 0; }
  .slashes-hero { display: none; }
  .strip { grid-template-columns: 1fr; }
  .strip-project { border-right: 0; border-bottom: 2px solid var(--line); }
  .strip-fair { padding-left: 0; }
  .fair-icons { padding-left: 0; }
  .project-card { grid-template-columns: 1fr; }
  .timeline { padding-right: 30px; }
  .rules { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .site-nav {
    position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0;
    background: var(--paper); border-bottom: 2px solid var(--line);
    clip-path: inset(0 0 100% 0); transition: clip-path .4s var(--ease-out);
  }
  .site-nav.open { clip-path: inset(0 0 0 0); }
  .site-nav a { padding: 14px 0; font-size: 20px; }
  .nav-toggle { display: grid; gap: 6px; padding: 10px; background: none; border: 0; cursor: pointer; }
  .nav-toggle span { display: block; width: 26px; height: 3px; background: var(--ink); transform: skewX(var(--skew)); transition: transform .3s; }
  .nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(4.5px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4.5px) rotate(-45deg); }
  .brand-name { font-size: 17px; }
  .btn-primary, .btn-light { gap: 28px; padding: 16px 40px 16px 46px; }
  .strip-project { padding-left: 46px; padding-right: 0; }
  .strip-project .eyebrow::after { width: 60px; }
  .fair-icons { flex-wrap: wrap; gap: 14px 20px; }
  .fair-icons svg { width: 40px; height: 40px; }
  .timeline { padding-right: 0; }
  .timeline li { font-size: 13px; }
  .timeline li::before { width: 38px; height: 38px; }
  .timeline li::after { top: 19px; }
  .project-stripes { display: none; }
  .rules { grid-template-columns: 1fr; }
  .rule { min-height: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .orbit path { stroke-dashoffset: 0; }
}
