/* 一文創作全集 — evan.my
   Static rebuild. Design follows the original theme:
   Josefin Sans, #707070 body text, #171717 ink, #ef953e accent. */

:root {
  --ink: #171717;
  --body: #707070;
  --muted: #9a9a9a;
  --accent: #ef953e;
  --bg: #ffffff;
  --frame: 30px;
  --font: "Josefin Sans", "PingFang TC", "Hiragino Sans CNS", "Microsoft JhengHei",
    "Noto Sans TC", "Heiti TC", sans-serif;
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  color: var(--body);
  background: var(--bg);
  overflow-x: hidden;
}

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

a { color: var(--body); text-decoration: none; transition: color .2s ease; }
a:hover, a:focus-visible { color: var(--accent); }

h1, h2, h3, h4 {
  font-weight: 500;
  color: var(--ink);
  line-height: 1.3;
  margin: 0 0 .6em;
  letter-spacing: .02em;
}

h1 { font-size: clamp(28px, 4.4vw, 46px); }
h2 { font-size: clamp(24px, 3.2vw, 36px); }
h3 { font-size: clamp(19px, 2.2vw, 24px); }

p { margin: 0 0 1.6em; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--ink); color: #fff; padding: 12px 20px;
}
.skip-link:focus { left: 0; color: #fff; }

/* ---------- layout ---------- */

.site {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.main { flex: 1 0 auto; }

.wrap { width: 100%; max-width: 1170px; margin: 0 auto; padding: 0 24px; }
.wrap--narrow { max-width: 830px; }
.frame { padding: 0 var(--frame); }

.section-head {
  text-align: center;
  padding: 150px 0 60px;
}
.section-head h1 { margin-bottom: .35em; }
.section-head p {
  max-width: 700px;
  margin: 0 auto;
}

/* ---------- header / menu ---------- */

.site-header {
  position: fixed;
  top: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 30px;
  pointer-events: none;
}

.site-header > * { pointer-events: auto; }

.menu-toggle {
  width: 70px; height: 70px;
  flex: 0 0 70px;
  border: 0;
  background: #2b2b2b;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .25s ease;
}
.menu-toggle:hover { background: var(--accent); }
.menu-toggle span {
  display: block;
  position: relative;
  width: 24px; height: 2px;
  background: #fff;
}
.menu-toggle span::before,
.menu-toggle span::after {
  content: "";
  position: absolute; left: 0;
  width: 24px; height: 2px;
  background: #fff;
  transition: transform .25s ease, opacity .2s ease;
}
.menu-toggle span::before { top: -7px; }
.menu-toggle span::after { top: 7px; }

.site-header.is-open .menu-toggle span { background: transparent; }
.site-header.is-open .menu-toggle span::before { transform: translateY(7px) rotate(45deg); }
.site-header.is-open .menu-toggle span::after { transform: translateY(-7px) rotate(-45deg); }

.site-nav {
  display: flex;
  align-items: center;
  gap: 42px;
  height: 70px;
  padding: 0 46px 0 0;
  opacity: 0;
  visibility: hidden;
  transform: translateX(24px);
  transition: opacity .28s ease, transform .28s ease, visibility .28s;
}
.site-header.is-open .site-nav {
  opacity: 1;
  visibility: visible;
  transform: none;
}
.site-nav a {
  color: var(--ink);
  font-size: 17px;
  letter-spacing: .08em;
  white-space: nowrap;
}
.site-nav a[aria-current="page"] { color: var(--accent); }

@media (max-width: 860px) {
  .site-header { padding: 16px; }
  .menu-toggle { width: 56px; height: 56px; flex-basis: 56px; }
  .site-nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 100vh;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 90px 0 30px;
    background: #171717;
    transform: translateY(-100%);
  }
  .site-nav a {
    color: #fff;
    padding: 14px 0;
    font-size: 20px;
  }
  .site-header.is-open .site-nav { transform: none; }
}

/* ---------- footer ---------- */

.site-footer {
  flex: 0 0 auto;
  background: var(--ink);
  color: var(--muted);
  text-align: center;
  padding: 42px 24px;
  font-size: 14px;
  letter-spacing: .06em;
  margin-top: 90px;
}
.site-footer p { margin: 0; }
.site-footer a { color: #d0d0d0; }
.site-footer a:hover { color: var(--accent); }

/* ---------- home ---------- */

.home-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 24px 60px;
}
.home-logo { max-width: 720px; width: 100%; }
.home-main h1 {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- works grid (圖。集) ---------- */

.works-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
}
.work-tile {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--ink);
  aspect-ratio: 4 / 3;
}
.work-tile img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .8s ease, opacity .4s ease;
}
.work-tile:hover img, .work-tile:focus-visible img {
  transform: scale(1.05);
  opacity: .45;
}
.work-tile__caption {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 24px;
  text-align: center;
  color: #fff;
  background: rgba(23, 23, 23, .25);
  opacity: 0;
  transition: opacity .35s ease;
}
.work-tile:hover .work-tile__caption,
.work-tile:focus-visible .work-tile__caption { opacity: 1; }
.work-tile__caption h2 {
  color: #fff;
  font-size: clamp(20px, 2.4vw, 30px);
  margin: 0;
}
.work-tile__caption span {
  font-size: 14px;
  letter-spacing: .18em;
  text-transform: uppercase;
}

@media (max-width: 700px) {
  .works-grid { grid-template-columns: 1fr; }
  .work-tile__caption { opacity: 1; background: rgba(23, 23, 23, .35); }
}

/* ---------- album page ---------- */

.album-hero {
  margin-top: 130px;
}
.album-hero img { width: 100%; }

.album-intro { padding: 60px 0 20px; }
.album-intro .meta {
  color: var(--muted);
  font-size: 14px;
  letter-spacing: .18em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.album-gallery {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  padding: 30px 0 0;
}
.album-gallery figure { margin: 0; width: 100%; max-width: 770px; }
.album-gallery img { width: 100%; cursor: zoom-in; }

/* ---------- breadcrumb ---------- */

.crumbs {
  font-size: 13px;
  letter-spacing: .1em;
  color: var(--muted);
  padding: 26px 0 0;
}
.crumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0; padding: 0;
}
.crumbs li::after { content: "/"; padding-left: 8px; color: #ccc; }
.crumbs li:last-child::after { content: ""; }

/* ---------- songs ---------- */

.song {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
  padding: 60px 0;
}
.song + .song { border-top: 1px solid #efefef; }
.song__date {
  font-size: 14px;
  letter-spacing: .12em;
  color: var(--muted);
  margin-bottom: 10px;
}
.song h2 { color: var(--accent); }
.song__lyrics p { margin-bottom: 1.4em; }
.song__note { color: var(--body); }

@media (max-width: 860px) {
  .song { grid-template-columns: 1fr; gap: 30px; padding: 40px 0; }
}

/* ---------- video facade ---------- */

.video {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #111;
  border: 0;
  padding: 0;
  cursor: pointer;
  overflow: hidden;
  display: block;
}
.video img { width: 100%; height: 100%; object-fit: cover; transition: opacity .3s ease; }
.video:hover img { opacity: .8; }
.video__play {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 84px; height: 84px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .9);
  background: rgba(23, 23, 23, .35);
  display: flex; align-items: center; justify-content: center;
  transition: background .25s ease, transform .25s ease;
}
.video:hover .video__play { background: var(--accent); transform: translate(-50%, -50%) scale(1.06); }
.video__play::before {
  content: "";
  border-style: solid;
  border-width: 12px 0 12px 20px;
  border-color: transparent transparent transparent #fff;
  margin-left: 5px;
}
.video iframe { width: 100%; height: 100%; border: 0; display: block; }

.film { padding: 46px 0; }
.film + .film { border-top: 1px solid #efefef; }
.film__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 14px; margin-bottom: 18px; }
.film__head h2 { margin: 0; font-size: clamp(20px, 2.4vw, 28px); }
.film__year { color: var(--accent); font-size: 15px; letter-spacing: .12em; }
.film__desc { margin: 0 0 18px; }

/* ---------- paintings ---------- */

.paint-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.paint-grid figure { margin: 0; }
.paint-grid img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  cursor: zoom-in;
}
@media (max-width: 860px) { .paint-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .paint-grid { grid-template-columns: 1fr; } }

/* ---------- lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(17, 17, 17, .96);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.lightbox.is-open { display: flex; }
.lightbox img {
  max-width: 100%;
  max-height: calc(100vh - 120px);
  width: auto;
  object-fit: contain;
}
.lightbox__btn {
  position: absolute;
  background: none;
  border: 0;
  color: #fff;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  padding: 14px 18px;
  opacity: .7;
}
.lightbox__btn:hover { opacity: 1; color: var(--accent); }
.lightbox__close { top: 14px; right: 18px; font-size: 40px; }
.lightbox__prev { left: 6px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 6px; top: 50%; transform: translateY(-50%); }
.lightbox__count {
  position: absolute;
  bottom: 22px; left: 0; right: 0;
  text-align: center;
  color: #bbb;
  font-size: 14px;
  letter-spacing: .12em;
}

/* ---------- 404 ---------- */

.error-page { text-align: center; padding: 180px 24px 40px; }
.error-page .code { font-size: 92px; color: var(--accent); line-height: 1; margin: 0 0 10px; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
