/* =========================================================
   CCL v2 — Japanese Minimal Editorial × Street Culture
   暖白 / 炭黑為底，青綠・藍・紫・橘點綴
   ========================================================= */
:root {
  color-scheme: light;
  --paper: #f5f2eb;
  --paper-2: #ece7dc;
  --card: #fbf9f4;
  --ink: #1d1d1b;
  --ink-2: #47453f;
  --muted: #77736a;
  --line: #d8d1c3;

  --teal: #11a08a;
  --blue: #2c5be0;
  --purple: #7a55d3;
  --orange: #f06a22;

  /* 舊名稱的別名（後台共用） */
  --bg: var(--paper);
  --bg-alt: var(--paper-2);
  --text: var(--ink);
  --accent: var(--orange);
  --accent-hover: #ff7b35;

  --radius: 6px;
  --font: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  --font-en: "Archivo", "Noto Sans TC", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);

  /* 紙張顆粒材質 */
  --grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .07 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

.c-teal   { --c: var(--teal); }
.c-blue   { --c: var(--blue); }
.c-purple { --c: var(--purple); }
.c-orange { --c: var(--orange); }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0;
  background-color: var(--paper);
  background-image: var(--grain);
  color: var(--ink);
  font-family: var(--font);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
::selection { background: var(--teal); color: #fff; }
.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(245, 242, 235, .9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--ink);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; }
.brand img { width: 40px; height: 40px; border-radius: 3px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; white-space: nowrap; }
.brand-text b { font-weight: 900; font-size: 15px; letter-spacing: .04em; }
.brand-text small { font-family: var(--font-mono); font-size: 10px; letter-spacing: .2em; color: var(--muted); }
.nav { display: flex; gap: 2px; }
.nav a {
  position: relative; text-decoration: none; font-weight: 700; font-size: 14px;
  padding: 8px 10px; white-space: nowrap; display: inline-flex; align-items: baseline; gap: 6px;
}
.nav-num { font-family: var(--font-mono); font-size: 11px; color: var(--muted); font-weight: 400; }
.nav a::after {
  content: ""; position: absolute; left: 10px; right: 10px; bottom: 4px; height: 2px;
  background: var(--orange); transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease);
}
.nav a:hover::after { transform: scaleX(1); }
@media (max-width: 600px) {
  .brand-text { display: none; }
  .nav-num { display: none; }
  .nav a { font-size: 14px; padding: 8px 7px; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 22px; border-radius: 4px;
  font: 700 15px/1 var(--font); text-decoration: none; cursor: pointer;
  border: 1.5px solid var(--ink); color: var(--ink); background: transparent;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), background .18s;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--ink); }
.btn:active { transform: translate(0, 0); box-shadow: none; }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { box-shadow: 4px 4px 0 var(--orange); }
.btn-accent { background: var(--orange); border-color: var(--ink); color: var(--ink); }
.btn-ghost:hover { background: var(--card); box-shadow: 4px 4px 0 var(--teal); }
.btn[aria-disabled="true"] { background: var(--paper-2); color: var(--muted); border-color: var(--line); pointer-events: none; }
.btn-sm { min-height: 40px; padding: 0 14px; font-size: 14px; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; padding: 48px 0 56px;
  background-image: radial-gradient(var(--line) 1px, transparent 1px);
  background-size: 22px 22px;
  background-position: -11px -11px;
}
.hero::before { /* 淡化網點，讓左側文字更乾淨 */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, var(--paper) 30%, rgba(245, 242, 235, .4) 75%, rgba(245, 242, 235, .1));
}
.hero-grid { position: relative; display: grid; gap: 40px; align-items: center; }
.kicker {
  display: inline-flex; align-items: center; gap: 10px; margin: 0 0 18px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .14em; color: var(--ink-2);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); }
.hero h1 { margin: 0 0 20px; line-height: 1; }
.h1-zh { display: block; font-size: clamp(28px, 5vw, 44px); font-weight: 900; letter-spacing: .06em; margin-bottom: 8px; }
.h1-en {
  display: block; font-family: var(--font-en); font-weight: 900; letter-spacing: -.02em;
  font-size: clamp(56px, 13vw, 128px); line-height: .92;
}
.lead { color: var(--ink-2); font-size: 17px; margin: 0 0 28px; max-width: 32em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 28px; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; }
.chip {
  font-family: var(--font-mono); font-size: 12px; padding: 5px 10px;
  border: 1px solid var(--ink); border-radius: 999px; background: var(--card);
  display: inline-flex; align-items: center; gap: 6px;
}
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }

.hero-visual { position: relative; width: min(100%, 420px); aspect-ratio: 1; margin: 0 auto; }
.logo-tile {
  position: absolute; inset: 12% 12% 12% 12%; margin: 0;
  box-shadow: 10px 10px 0 var(--ink); transition: transform .4s var(--ease);
}
.logo-tile img { width: 100%; height: 100%; object-fit: cover; }
.hero-visual:hover .logo-tile { transform: rotate(-1.5deg) translate(-3px, -3px); }
.shape { position: absolute; display: block; transition: transform .6s var(--ease); }
.s-square { width: 30%; height: 30%; left: 0; top: 2%; background: var(--orange); }
.s-circle { width: 26%; aspect-ratio: 1; right: 0; bottom: 4%; border-radius: 50%; background: var(--blue); }
.s-stripes {
  width: 34%; height: 18%; right: 2%; top: 4%;
  background: repeating-linear-gradient(-45deg, var(--teal) 0 6px, transparent 6px 14px);
}
.s-tri { width: 20%; height: 20%; left: 4%; bottom: 2%; background: var(--purple); clip-path: polygon(0 100%, 50% 0, 100% 100%); }
.s-dots {
  width: 22%; height: 22%; left: -2%; top: 46%;
  background-image: radial-gradient(var(--ink) 2px, transparent 2px); background-size: 12px 12px;
}
.hero-visual:hover .s-square { transform: translate(-6px, -6px); }
.hero-visual:hover .s-circle { transform: translate(6px, 6px); }
.hero-visual:hover .s-tri { transform: rotate(-12deg); }
.v-label {
  position: absolute; right: -4px; top: 50%; margin: 0;
  transform: translate(50%, -50%) rotate(90deg); transform-origin: center;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .3em; color: var(--ink-2); white-space: nowrap;
}
.est {
  position: absolute; left: 12%; bottom: 3%; margin: 0;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; color: var(--ink-2);
  background: var(--paper); padding: 2px 6px; transform: translateY(100%);
}
@media (max-width: 819px) { .v-label { display: none; } }
@media (min-width: 820px) {
  .hero { padding: 80px 0 96px; }
  .hero-grid { grid-template-columns: 1.15fr .85fr; gap: 56px; }
}

/* ---------- Ticker ---------- */
.ticker { overflow: hidden; background: var(--ink); color: var(--paper); border-block: 1px solid var(--ink); }
.ticker-track {
  display: flex; width: max-content; gap: 22px; padding: 12px 0;
  font-family: var(--font-en); font-weight: 800; font-size: 15px; letter-spacing: .08em; white-space: nowrap;
  animation: marquee 38s linear infinite;
}
.ticker-track i { font-style: normal; font-size: 9px; align-self: center; }
.ticker-track i:nth-of-type(4n+1) { color: var(--teal); }
.ticker-track i:nth-of-type(4n+2) { color: var(--blue); }
.ticker-track i:nth-of-type(4n+3) { color: var(--purple); }
.ticker-track i:nth-of-type(4n)   { color: var(--orange); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section-alt { background-color: var(--paper-2); border-block: 1px solid var(--line); }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; margin-bottom: 32px; }
.sec-title { display: flex; align-items: flex-end; gap: 16px; }
.sec-num {
  font-family: var(--font-en); font-weight: 900; font-size: clamp(52px, 9vw, 80px); line-height: .8;
  color: transparent; -webkit-text-stroke: 1.5px var(--ink);
}
.sec-en { margin: 0 0 2px; font-family: var(--font-mono); font-size: 12px; letter-spacing: .24em; color: var(--muted); }
.section h2 { margin: 0; font-size: clamp(24px, 4vw, 34px); font-weight: 900; letter-spacing: .06em; line-height: 1.2; }

/* ---------- Tabs ---------- */
.tabs { display: inline-flex; gap: 20px; border-bottom: 1px solid var(--line); }
.tab {
  position: relative; font: 700 15px var(--font); color: var(--muted); background: none; border: 0;
  padding: 8px 2px 10px; cursor: pointer; transition: color .2s;
}
.tab::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--ink);
  transform: scaleX(0); transition: transform .25s var(--ease);
}
.tab:hover { color: var(--ink); }
.tab.is-active { color: var(--ink); }
.tab.is-active::after { transform: scaleX(1); }

/* ---------- Next battle ---------- */
.next-section { padding: 56px 0 0; }
.next-card {
  position: relative; display: grid; gap: 24px; padding: 28px 22px;
  background: var(--card); border: 1.5px solid var(--ink); border-radius: var(--radius);
  box-shadow: 8px 8px 0 var(--teal); overflow: hidden;
}
.next-card::before {
  content: ""; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%;
  background: repeating-linear-gradient(45deg, var(--orange) 0 5px, transparent 5px 12px); opacity: .35;
}
.next-label {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 10px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .2em;
}
.next-label::before { content: ""; width: 10px; height: 10px; background: var(--orange); border-radius: 50%; animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(.6); opacity: .5; } }
.next-date { font-family: var(--font-en); font-weight: 900; line-height: .85; font-size: clamp(64px, 14vw, 120px); letter-spacing: -.03em; }
.next-week { display: inline-block; margin-top: 10px; font-family: var(--font-mono); font-size: 13px; letter-spacing: .14em; padding: 3px 8px; background: var(--ink); color: var(--paper); }
.next-info .badge { position: static; display: inline-block; margin-bottom: 12px; }
.next-info h3 { margin: 0 0 12px; font-size: clamp(22px, 3.4vw, 30px); line-height: 1.3; font-weight: 900; }
.next-info .meta { margin-bottom: 20px; }
.next-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.next-poster { display: none; }
@media (min-width: 900px) {
  .next-card { grid-template-columns: auto 1fr 200px; align-items: center; gap: 40px; padding: 36px 40px; }
  .next-poster { display: block; border: 1.5px solid var(--ink); transform: rotate(2deg); transition: transform .3s var(--ease); cursor: zoom-in; padding: 0; background: none; }
  .next-poster:hover { transform: rotate(0) scale(1.02); }
  .next-poster img { width: 100%; aspect-ratio: 5 / 7; object-fit: cover; object-position: top; }
}

/* ---------- Event cards ---------- */
.event-grid { display: grid; gap: 28px 22px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.event-card {
  position: relative; display: flex; flex-direction: column; background: var(--card);
  border: 1.5px solid var(--ink); border-radius: var(--radius); overflow: hidden;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.event-card::before { content: ""; height: 6px; background: var(--c); }
.event-card:hover { transform: translate(-3px, -3px); box-shadow: 6px 6px 0 var(--c); }
.poster-btn { display: block; width: 100%; padding: 0; border: 0; border-bottom: 1.5px solid var(--ink); background: var(--paper-2); cursor: zoom-in; position: relative; overflow: hidden; }
.poster-btn img, .poster-fallback { width: 100%; aspect-ratio: 5 / 7; object-fit: cover; object-position: top; transition: transform .5s var(--ease); }
.event-card:hover .poster-btn img { transform: scale(1.03); }
.poster-fallback { display: grid; place-items: center; background: var(--ink); }
.poster-fallback img { width: 64%; aspect-ratio: 1; object-fit: contain; }
.badge {
  position: absolute; top: 12px; left: 12px; z-index: 1;
  font: 700 12px/1 var(--font); letter-spacing: .04em; padding: 7px 10px; border-radius: 3px;
  background: var(--orange); color: var(--ink); border: 1.5px solid var(--ink);
}
.badge.soon { background: var(--teal); color: #fff; }
.badge.closed { background: var(--paper-2); color: var(--ink-2); }
.badge.ended { background: var(--card); color: var(--muted); border-color: var(--line); }
.card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-date { display: flex; align-items: baseline; gap: 8px; }
.d-num { font-family: var(--font-en); font-weight: 900; font-size: 30px; line-height: 1; letter-spacing: -.02em; }
.d-week { font-family: var(--font-mono); font-size: 12px; padding: 2px 6px; background: var(--c); color: #fff; letter-spacing: .1em; }
.d-year { font-family: var(--font-mono); font-size: 12px; color: var(--muted); margin-left: auto; }
.card-title { margin: 0; font-size: 18px; line-height: 1.45; font-weight: 900; }
.card-summary { margin: 0; color: var(--ink-2); font-size: 14px; line-height: 1.7; flex: 1; }
.card-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.card-actions .btn { flex: 1; }

.empty {
  grid-column: 1 / -1; text-align: center; color: var(--muted);
  padding: 56px 16px; border: 1.5px dashed var(--line); border-radius: var(--radius); background: var(--card);
}

/* ---------- About ---------- */
.about-grid { display: grid; gap: 0; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); border-top: 1.5px solid var(--ink); }
.about-item { position: relative; padding: 28px 24px 32px 0; border-bottom: 1px solid var(--line); }
.about-item::before { content: ""; position: absolute; left: 0; top: -1.5px; width: 56px; height: 4px; background: var(--c); }
.about-num { font-family: var(--font-en); font-weight: 900; font-size: 44px; line-height: 1; color: var(--c); }
.about-item h3 { margin: 12px 0 8px; font-size: 20px; font-weight: 900; }
.about-item p { margin: 0; color: var(--ink-2); max-width: 26em; }
@media (min-width: 760px) {
  .about-item { border-bottom: 0; padding-left: 24px; border-left: 1px solid var(--line); }
  .about-item:first-child { padding-left: 0; border-left: 0; }
  .about-item:not(:first-child)::before { left: 24px; }
}

/* ---------- Contact ---------- */
.contact-lead { margin-top: -8px; }
.contact-grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.contact-card {
  position: relative; padding: 26px 24px; background: var(--card);
  border: 1.5px solid var(--ink); border-radius: var(--radius); overflow: hidden;
}
.contact-card[hidden] { display: none; }
.contact-card.gym::after {
  content: ""; position: absolute; right: 0; top: 0; width: 64px; height: 64px;
  background: var(--orange); clip-path: polygon(100% 0, 0 0, 100% 100%);
}
.contact-label { font-family: var(--font-mono); font-size: 12px; letter-spacing: .16em; color: var(--muted); }
.contact-card h3 { margin: 8px 0 4px; font-size: 22px; font-weight: 900; }
.contact-card p { margin: 0 0 20px; color: var(--ink-2); font-size: 16px; }
.contact-actions:empty { display: none; }
.social { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.social:empty::before { content: "（社群連結尚未設定）"; color: var(--muted); }
.social-link {
  display: flex; align-items: center; gap: 12px; padding: 13px 16px; text-decoration: none;
  border: 1px solid var(--line); border-radius: 4px; background: var(--paper);
  transition: border-color .2s, background .2s;
}
.social-link:hover { border-color: var(--ink); background: var(--card); }
.social-name { font-weight: 900; font-family: var(--font-en); letter-spacing: .02em; }
.social-handle { color: var(--muted); font-size: 13px; font-family: var(--font-mono); min-width: 0; overflow-wrap: anywhere; }
.social-arrow { margin-left: auto; transition: transform .2s var(--ease); }
.social-link:hover .social-arrow { transform: translate(3px, -3px); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--paper); padding: 56px 0 48px; margin-top: 24px; }
.footer-grid { display: grid; gap: 28px; align-items: center; }
.footer-logo { width: 96px; height: 96px; box-shadow: 6px 6px 0 var(--orange); }
.footer-big { margin: 0 0 18px; font-family: var(--font-en); font-weight: 900; font-size: clamp(36px, 7vw, 72px); line-height: .95; letter-spacing: -.02em; }
.footer-meta { margin: 0; font-family: var(--font-mono); font-size: 12px; letter-spacing: .06em; color: #b9b4a8; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: auto 1fr; gap: 40px; } .footer-logo { width: 120px; height: 120px; } }

/* ---------- Dialog ---------- */
.dialog {
  width: min(980px, calc(100vw - 24px)); max-height: calc(100dvh - 24px);
  padding: 0; border: 1.5px solid var(--ink); border-radius: var(--radius);
  background: var(--card); color: var(--ink); overflow: auto;
}
.dialog::backdrop { background: rgba(29, 29, 27, .6); backdrop-filter: blur(3px); }
.dialog[open] { animation: pop .3s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(12px); } }
.dialog-close {
  position: sticky; top: 10px; float: right; margin: 10px 10px 0 0; z-index: 2;
  width: 40px; height: 40px; border-radius: 4px; border: 1.5px solid var(--ink);
  background: var(--card); color: var(--ink); font-size: 24px; line-height: 1; cursor: pointer;
}
.dialog-close:hover { background: var(--ink); color: var(--paper); }
.dialog-body { display: grid; }
.dialog-poster { background: var(--paper-2); border-bottom: 1.5px solid var(--ink); }
.dialog-poster a { display: block; cursor: zoom-in; }
.dialog-poster img { width: 100%; height: auto; }
.dialog-info { padding: 22px 20px 28px; }
.dialog-info h3 { margin: 10px 0 16px; font-size: 24px; line-height: 1.35; font-weight: 900; }
.dialog-info .badge { position: static; display: inline-block; }
.meta { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0 0 18px; font-size: 15px; }
.meta dt { font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; color: var(--muted); padding-top: 3px; }
.meta dd { margin: 0; }
.content { white-space: pre-line; color: var(--ink-2); font-size: 15px; border-top: 1px solid var(--line); padding-top: 16px; }
.dialog-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
@media (min-width: 820px) {
  .dialog-body { grid-template-columns: 1fr 1fr; }
  .dialog-poster { border-bottom: 0; border-right: 1.5px solid var(--ink); }
  .dialog-info { padding: 32px 30px 34px; }
}

/* ---------- 進場動畫（尊重「減少動態效果」設定） ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
