*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #120507;
  --bg-deep: #090204;
  --ink: #f6ebe8;
  --muted: #c4a09a;
  --red: #e11d38;
  --red-deep: #8b0a1a;
  --red-hot: #ff3b4e;
  --red-soft: rgba(225, 29, 56, 0.18);
  --line: rgba(255, 180, 170, 0.14);
  --font: "Noto Sans TC", sans-serif;
  --display: "Syne", "Noto Sans TC", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

img { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 70% 45% at 50% -5%, rgba(225, 29, 56, 0.45), transparent 60%),
    radial-gradient(ellipse 40% 35% at 90% 40%, rgba(139, 10, 26, 0.35), transparent 55%),
    radial-gradient(ellipse 35% 30% at 5% 70%, rgba(255, 59, 78, 0.12), transparent 50%);
}

/* ── Hero ── */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding: 1.5rem clamp(1.25rem, 4vw, 3.5rem) 2.5rem;
  background:
    linear-gradient(180deg, transparent 55%, var(--bg) 100%),
    radial-gradient(ellipse 90% 70% at 50% 20%, rgba(225, 29, 56, 0.28), transparent 70%),
    linear-gradient(135deg, #2a0610 0%, #120507 45%, #1a0509 100%);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto;
  height: 70%;
  background:
    conic-gradient(from 210deg at 50% 50%, transparent 0deg, rgba(255, 59, 78, 0.2) 60deg, transparent 140deg, rgba(139, 10, 26, 0.25) 220deg, transparent 300deg);
  filter: blur(40px);
  animation: aurora 14s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes aurora {
  from { transform: translateY(0) rotate(0deg) scale(1); opacity: 0.7; }
  to { transform: translateY(4%) rotate(8deg) scale(1.08); opacity: 1; }
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 2;
}

.nav-brand {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  color: var(--ink);
}

.nav-socials {
  display: flex;
  gap: 0.75rem;
}

.nav-socials a {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  color: var(--muted);
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease), background 0.25s var(--ease);
}

.nav-socials a:hover {
  color: var(--ink);
  border-color: var(--red);
  background: var(--red-soft);
}

.hero-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  z-index: 2;
  max-width: 56rem;
  padding-block: 4rem 3rem;
}

.hero-kicker {
  font-size: 0.8rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--red-hot);
  margin-bottom: 1.25rem;
  animation: rise 0.9s var(--ease) both;
}

.hero-brand {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(5.5rem, 22vw, 12rem);
  line-height: 0.85;
  letter-spacing: -0.04em;
  color: var(--ink);
  text-shadow: 0 0 60px rgba(225, 29, 56, 0.45);
  animation: rise 1s var(--ease) 0.08s both;
}

.hero-line {
  margin-top: 1.5rem;
  font-size: clamp(1rem, 2.4vw, 1.25rem);
  color: var(--muted);
  font-weight: 300;
  max-width: 28rem;
  animation: rise 1s var(--ease) 0.16s both;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2.25rem;
  animation: rise 1s var(--ease) 0.24s both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .hero::before,
  .scroll-bar { animation: none; }
  .hero-kicker,
  .hero-brand,
  .hero-line,
  .hero-cta,
  .work,
  .modal-panel {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.5rem;
  background: var(--red);
  color: #fff;
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  border: 1px solid transparent;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.btn:hover {
  background: var(--red-hot);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(225, 29, 56, 0.35);
}

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}

.btn-ghost:hover {
  background: var(--red-soft);
  border-color: var(--red);
  box-shadow: none;
}

.hero-scroll {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

.scroll-bar {
  width: 48px;
  height: 1px;
  background: linear-gradient(90deg, var(--red), transparent);
  animation: pulse-bar 1.8s ease-in-out infinite;
}

@keyframes pulse-bar {
  0%, 100% { opacity: 0.35; transform: scaleX(0.7); transform-origin: left; }
  50% { opacity: 1; transform: scaleX(1); }
}

/* ── Works ── */
.main {
  position: relative;
  z-index: 1;
  padding: 4rem clamp(1.25rem, 4vw, 3.5rem) 5rem;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  margin-bottom: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
}

.section-title {
  font-family: var(--display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.section-desc {
  color: var(--muted);
  font-size: 0.9rem;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 1.35rem;
}

.work {
  cursor: pointer;
  background: transparent;
  border: 0;
  padding: 0;
  text-align: left;
  color: inherit;
  font: inherit;
  animation: rise 0.7s var(--ease) both;
}

.work:focus-visible {
  outline: 2px solid var(--red-hot);
  outline-offset: 4px;
}

.thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #1a080c;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease), filter 0.4s ease;
  filter: saturate(1.05) contrast(1.05);
}

.work:hover .thumb img {
  transform: scale(1.06);
  filter: saturate(1.15) contrast(1.08);
}

.thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(9, 2, 4, 0.75) 100%);
  pointer-events: none;
}

.rank {
  position: absolute;
  top: 0.7rem;
  left: 0.7rem;
  z-index: 2;
  font-family: var(--display);
  font-weight: 800;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: #fff;
  background: var(--red);
  padding: 0.3rem 0.55rem;
}

.badge {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  z-index: 2;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  background: rgba(9, 2, 4, 0.7);
  border: 1px solid var(--line);
  padding: 0.25rem 0.45rem;
}

.play {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.work:hover .play { opacity: 1; }

.play span {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  background: var(--red);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}

.meta {
  padding: 0.9rem 0.1rem 0.35rem;
}

.views {
  font-size: 0.75rem;
  color: var(--red-hot);
  letter-spacing: 0.04em;
  margin-bottom: 0.35rem;
}

.title {
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.channel {
  margin-top: 0.35rem;
  font-size: 0.78rem;
  color: var(--muted);
}

/* ── Footer ── */
.footer {
  position: relative;
  z-index: 1;
  padding: 3.5rem clamp(1.25rem, 4vw, 3.5rem) 2.5rem;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, transparent, rgba(139, 10, 26, 0.18));
  text-align: center;
}

.footer-brand {
  font-family: var(--display);
  font-weight: 800;
  font-size: 2rem;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}

.footer-socials {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.footer-socials a {
  color: var(--muted);
  font-size: 0.9rem;
  transition: color 0.25s ease;
}

.footer-socials a:hover { color: var(--red-hot); }

.footer-disclaimer {
  max-width: 36rem;
  margin: 0 auto 1.5rem;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.7;
}

.footer-copy {
  font-size: 0.75rem;
  color: rgba(196, 160, 154, 0.55);
}

/* ── Modal ── */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.modal[hidden] { display: none; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 1, 2, 0.86);
  backdrop-filter: blur(8px);
}

.modal-panel {
  position: relative;
  width: min(920px, 100%);
  background: #16060a;
  border: 1px solid var(--line);
  padding: 1rem;
  animation: rise 0.35s var(--ease);
}

.modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 2;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--line);
  color: var(--ink);
  cursor: pointer;
}

.modal-player {
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
}

.modal-player iframe,
.modal-player video {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.modal-meta {
  padding: 1.1rem 0.35rem 0.5rem;
}

.modal-views {
  color: var(--red-hot);
  font-size: 0.8rem;
  margin-bottom: 0.4rem;
}

.modal-title {
  font-family: var(--display);
  font-size: clamp(1.15rem, 3vw, 1.5rem);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.35rem;
}

.modal-channel {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 1.1rem;
}

@media (max-width: 640px) {
  .hero-stage { padding-block: 3rem 2rem; }
  .hero-brand { font-size: clamp(4.5rem, 24vw, 7rem); }
  .section-head { flex-direction: column; align-items: flex-start; }
}
