/* ============================================================
   Amane Kanata — 天界学園放送部 Archive
   Môn: Dịch vụ Web · Bài thực hành 1
   Ý tưởng: trang như kho lưu trữ của câu lạc bộ phát thanh đã đóng cửa.
   ============================================================ */

/* ---------- 1. Token ---------- */
:root {
  /* Màu lấy từ thiết kế nhân vật, không phải màu tự nghĩ ra */
  --ink: #0e1430;          /* navy thiên hà — nền hero, footer */
  --ink-2: #18203f;        /* navy nhạt hơn — bề mặt nổi trên nền tối */
  --cobalt: #2b5ce6;       /* tóc lớp trong, nơ cổ, tất */
  --cobalt-deep: #1b40ad;
  --halo: #f2c14e;         /* hào quang vàng 4 cánh */
  --blush: #f4a7c0;        /* highlight hồng trên tóc */
  --silver: #d9dee9;       /* tóc bạc */
  --paper: #f7f8fc;        /* nền sáng phần thân */
  --white: #ffffff;

  --text: #141a33;
  --text-soft: #59617d;
  --text-on-ink: #c8cfe4;
  --line: #e3e7f2;
  --line-ink: rgba(217, 222, 233, 0.16);

  /* Chữ. Glyph Latin lấy từ font đầu, glyph Nhật tự rơi xuống Zen Maru Gothic */
  --font-body: "Be Vietnam Pro", "Zen Maru Gothic", system-ui, sans-serif;
  --font-jp: "Zen Maru Gothic", "Be Vietnam Pro", sans-serif;
  --font-mono: "JetBrains Mono", "Consolas", monospace;

  --shadow-sm: 0 1px 2px rgba(14, 20, 48, 0.06), 0 4px 12px rgba(14, 20, 48, 0.05);
  --shadow-md: 0 8px 28px rgba(14, 20, 48, 0.1);
  --shadow-lg: 0 24px 60px rgba(14, 20, 48, 0.22);

  --r-sm: 6px;
  --r-md: 14px;
  --r-lg: 26px;

  --header-h: 68px;
  --maxw: 1180px;
}

/* ---------- 2. Reset ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.72;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
ul { list-style: none; }

a {
  color: var(--cobalt-deep);
  text-decoration: none;
  transition: color 0.18s ease;
}
a:hover { color: var(--cobalt); }

:focus-visible {
  outline: 2px solid var(--cobalt);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ---------- 3. Tiện ích ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 88px 0; }
.section--alt { background: var(--white); }

.section--ink {
  background: var(--ink);
  color: var(--text-on-ink);
}
.section--ink .section-title { color: var(--white); }
.section--ink .section-sub { color: var(--text-on-ink); }

.section-head { margin-bottom: 52px; }

/* Nhãn mono — chất "nhật ký phát sóng" */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cobalt);
  margin-bottom: 14px;
}

.section--ink .eyebrow { color: var(--halo); }

.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: currentColor;
}

.section-title {
  font-size: clamp(1.7rem, 3.4vw, 2.45rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.15;
  position: relative;
  padding-bottom: 16px;
}

/*
  Nơ cổ của Kanata trong thiết kế gốc luôn lệch — biến chi tiết đó thành
  ngôn ngữ đồ hoạ: gạch chân cố tình lệch trục, không căn giữa.
*/
.section-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 78px;
  height: 3px;
  background: var(--cobalt);
}

.section-title::before {
  content: "";
  position: absolute;
  left: 86px;
  bottom: 0;
  width: 22px;
  height: 3px;
  background: var(--halo);
}

.section-sub {
  margin-top: 16px;
  max-width: 58ch;
  color: var(--text-soft);
}

/* Trích dẫn dẫn đề — dùng cho câu chào chính thức của Kanata */
.lead-quote {
  margin-top: 20px;
  padding-left: 20px;
  border-left: 3px solid var(--halo);
  max-width: 58ch;
}

.lead-quote q {
  font-size: 1.22rem;
  font-weight: 700;
  font-style: normal;
  letter-spacing: -0.015em;
  color: var(--text);
}

.lead-quote cite {
  display: block;
  margin-top: 7px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-style: normal;
  letter-spacing: 0.06em;
  color: var(--text-soft);
}

.section--ink .lead-quote q { color: var(--white); }

.jp { font-family: var(--font-jp); }

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* Ngôi sao 4 cánh — yếu tố chữ ký, dùng lại ở 5 chỗ */
.halo {
  width: 1em;
  height: 1em;
  flex: none;
  fill: currentColor;
}

/* Nút */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border: 1.5px solid transparent;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.93rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease,
    background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.btn:hover { transform: translateY(-2px); }

.btn--primary {
  background: var(--cobalt);
  color: var(--white);
  box-shadow: 0 6px 18px rgba(43, 92, 230, 0.32);
}
.btn--primary:hover {
  background: var(--cobalt-deep);
  color: var(--white);
  box-shadow: 0 10px 26px rgba(43, 92, 230, 0.42);
}

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

/* Nút ghost đặt trên nền tối */
.on-ink .btn--ghost {
  border-color: rgba(217, 222, 233, 0.32);
  color: var(--silver);
}
.on-ink .btn--ghost:hover {
  border-color: var(--halo);
  color: var(--halo);
}

/* ---------- 4. Thanh thông tin sinh viên ---------- */
.student-bar {
  background: var(--ink);
  color: var(--silver);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
}

.student-bar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 9px;
  padding-bottom: 9px;
}

.student-bar strong {
  color: var(--halo);
  font-weight: 700;
}

.student-bar__course { color: var(--text-soft); }

/* ---------- 5. Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(247, 248, 252, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.nav {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: 1.02rem;
}
.nav__logo:hover { color: var(--text); }

.nav__logo-mark {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  color: var(--halo);
  font-size: 32px;
}

.nav__logo-sub {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  color: var(--text-soft);
  text-transform: uppercase;
}

.nav__list {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav__link {
  display: block;
  padding: 8px 15px;
  border-radius: 999px;
  font-size: 0.91rem;
  font-weight: 600;
  color: var(--text-soft);
}
.nav__link:hover {
  background: rgba(43, 92, 230, 0.08);
  color: var(--cobalt-deep);
}

.nav__link.active {
  background: var(--ink);
  color: var(--white);
}

.nav__toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 11px 9px;
}

.nav__toggle span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.28s ease, opacity 0.18s ease;
}
.nav__toggle span + span { margin-top: 6px; }
.nav__toggle.is-open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav__toggle.is-open span:nth-child(2) { opacity: 0; }
.nav__toggle.is-open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- 5. Hero ---------- */
.hero {
  position: relative;
  background: var(--ink);
  color: var(--text-on-ink);
  overflow: hidden;
  padding: 72px 0 0;
}

/* Vòng hào quang lớn xoay rất chậm phía sau */
.hero__halo {
  position: absolute;
  top: 50%;
  right: 16%;
  width: min(760px, 92vw);
  aspect-ratio: 1;
  transform: translate(50%, -50%);
  color: rgba(242, 193, 78, 0.13);
  animation: spin 90s linear infinite;
  pointer-events: none;
}

.hero__halo svg { width: 100%; height: 100%; fill: currentColor; }

@keyframes spin { to { transform: translate(50%, -50%) rotate(360deg); } }

/* Quầng sáng cobalt mờ sau nhân vật */
.hero::before {
  content: "";
  position: absolute;
  right: 4%;
  top: 8%;
  width: 46%;
  height: 84%;
  background: radial-gradient(
    ellipse at center,
    rgba(43, 92, 230, 0.42) 0%,
    rgba(43, 92, 230, 0) 68%
  );
  pointer-events: none;
}

.hero__inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: end;
  min-height: calc(100vh - var(--header-h) - 190px);
}

.hero__body { padding-bottom: 88px; }

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 15px 6px 11px;
  border-radius: 999px;
  border: 1px solid rgba(242, 193, 78, 0.34);
  background: rgba(242, 193, 78, 0.08);
  color: var(--halo);
  font-family: var(--font-mono);
  font-size: 0.71rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* Chấm đỏ "hết sóng" — đứng yên, không nhấp nháy */
.hero__badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--blush);
}

.hero__jp {
  font-family: var(--font-jp);
  font-size: clamp(3.2rem, 9vw, 6.4rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: 0.01em;
  color: var(--white);
  margin: 22px 0 6px;
}

.hero__title {
  font-size: clamp(1.05rem, 2.4vw, 1.5rem);
  font-weight: 700;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--halo);
}

.hero__tagline {
  max-width: 44ch;
  margin: 28px 0 36px;
  color: var(--text-on-ink);
  font-size: 1.04rem;
  line-height: 1.8;
}

.hero__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero__figure {
  position: relative;
  align-self: end;
  justify-self: center;
}

.hero__figure img {
  width: 100%;
  max-width: 460px;
  height: auto;
  filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.45));
}

/* Dải số liệu chạy dọc đáy hero */
.stat-strip {
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--line-ink);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.stat-strip__item {
  padding: 22px 8px 24px;
  border-right: 1px solid var(--line-ink);
}
.stat-strip__item:last-child { border-right: none; }

.stat-strip__num {
  display: block;
  font-family: var(--font-mono);
  font-size: 1.32rem;
  font-weight: 700;
  color: var(--white);
  font-variant-numeric: tabular-nums;
}

.stat-strip__label {
  display: block;
  margin-top: 3px;
  font-size: 0.78rem;
  color: var(--text-soft);
  letter-spacing: 0.02em;
}

/* ---------- 6. Tiêu đề trang con ---------- */
.page-hero {
  position: relative;
  background: var(--ink);
  color: var(--text-on-ink);
  padding: 62px 0 58px;
  overflow: hidden;
}

.page-hero::after {
  content: "";
  position: absolute;
  right: -60px;
  top: -70px;
  width: 300px;
  height: 300px;
  background: radial-gradient(
    circle,
    rgba(43, 92, 230, 0.4) 0%,
    rgba(43, 92, 230, 0) 70%
  );
}

.page-hero > .container { position: relative; z-index: 1; }

.page-hero__title {
  font-size: clamp(1.9rem, 5vw, 2.9rem);
  font-weight: 800;
  letter-spacing: -0.028em;
  color: var(--white);
}

.page-hero__desc {
  margin-top: 14px;
  max-width: 56ch;
  color: var(--text-on-ink);
}

.breadcrumb {
  margin-top: 20px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  color: var(--text-soft);
}
.breadcrumb a { color: var(--silver); }
.breadcrumb a:hover { color: var(--halo); }

/* ---------- 7. Lưới & thẻ ---------- */
.grid { display: grid; gap: 22px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 28px 26px 30px;
  transition: transform 0.24s ease, box-shadow 0.24s ease,
    border-color 0.24s ease;
}

.card:hover {
  transform: translateY(-5px);
  border-color: rgba(43, 92, 230, 0.36);
  box-shadow: var(--shadow-md);
}

/*
  Hàng thẻ lệch trục — nối tiếp ý "bất đối xứng" của nhân vật.
  Dùng margin-top chứ không dùng transform, để không xung đột với
  hiệu ứng .reveal (vốn đã chiếm dụng thuộc tính transform).
*/
.grid--stagger > *:nth-child(2) { margin-top: 26px; }
.grid--stagger > *:nth-child(3) { margin-top: 52px; }

/* Thẻ đặt trên nền tối */
.card--ink {
  background: var(--ink-2);
  border-color: var(--line-ink);
}

.card--ink:hover {
  border-color: rgba(242, 193, 78, 0.5);
  box-shadow: none;
}

.card--ink .card__title { color: var(--white); }
.card--ink .card__text { color: var(--text-on-ink); }

.card__link {
  display: inline-block;
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
}

.card__icon {
  width: 46px;
  height: 46px;
  border-radius: var(--r-sm);
  background: rgba(43, 92, 230, 0.08);
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  margin-bottom: 18px;
}

.card__title {
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin-bottom: 9px;
}

.card__text {
  color: var(--text-soft);
  font-size: 0.94rem;
}

/* Khối 2 cột */
.split {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 54px;
  align-items: center;
}

/*
  Dùng khi cột chữ dài hơn hẳn cột ảnh (ví dụ bảng thông số ở trang hồ sơ).
  Căn hai cột về đỉnh rồi ghim ảnh lại, tránh để ảnh trôi xuống giữa và
  chừa một mảng trống lớn phía trên.
*/
.split--top {
  align-items: start;
  grid-template-columns: 0.82fr 1.18fr;
}

.split--top .split__media {
  position: sticky;
  top: calc(var(--header-h) + 28px);
}

.split__media {
  position: relative;
  border-radius: var(--r-lg);
  background: linear-gradient(165deg, var(--ink) 0%, var(--cobalt-deep) 100%);
  padding: 26px 18px 0;
  overflow: hidden;
}

.split__media::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 50% 30%,
    rgba(242, 193, 78, 0.2) 0%,
    rgba(242, 193, 78, 0) 62%
  );
}

.split__media img {
  position: relative;
  width: 100%;
  height: auto;
}

.split__body p + p { margin-top: 15px; }
.split__body .btn { margin-top: 26px; }

/* ---------- 8. Bảng thông tin ---------- */
.info-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
}

.info-table caption {
  caption-side: top;
  text-align: left;
  padding: 0 0 14px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.info-table th,
.info-table td {
  padding: 13px 18px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  font-size: 0.93rem;
  vertical-align: top;
}

.info-table th {
  width: 32%;
  font-weight: 600;
  color: var(--text-soft);
  background: rgba(43, 92, 230, 0.03);
}

.info-table td { font-weight: 500; }

.info-table tr:last-child th,
.info-table tr:last-child td { border-bottom: none; }

/* Bảng đặt trong thẻ nền tối */
.info-table--ink {
  background: transparent;
  border: none;
}

.info-table--ink th,
.info-table--ink td {
  border-bottom-color: var(--line-ink);
  padding: 11px 0;
}

.info-table--ink th {
  background: none;
  color: var(--text-soft);
  width: 30%;
  padding-right: 16px;
}

.info-table--ink td { color: var(--silver); }

/* ---------- 9. Timeline = nhật ký phát sóng ---------- */
.timeline {
  position: relative;
  padding-left: 36px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 10px;
  bottom: 10px;
  width: 1px;
  background: var(--line);
}

.timeline__item {
  position: relative;
  padding-bottom: 34px;
}
.timeline__item:last-child { padding-bottom: 0; }

/* Dấu đầu dòng là ngôi sao 4 cánh */
.timeline__item::before {
  content: "";
  position: absolute;
  left: -36px;
  top: 6px;
  width: 15px;
  height: 15px;
  background: var(--cobalt);
  clip-path: polygon(
    50% 0%, 60% 40%, 100% 50%, 60% 60%,
    50% 100%, 40% 60%, 0% 50%, 40% 40%
  );
}

.timeline__item:last-child::before { background: var(--halo); }

.timeline__date {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--cobalt);
}

.timeline__title {
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 3px 0 5px;
}

.timeline__text {
  color: var(--text-soft);
  font-size: 0.93rem;
  max-width: 62ch;
}

/* ---------- 10. Gallery ---------- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 30px;
}

.filter-btn {
  padding: 8px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--text-soft);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: all 0.18s ease;
}

.filter-btn:hover {
  border-color: var(--cobalt);
  color: var(--cobalt);
}

.filter-btn__n {
  opacity: 0.55;
  margin-left: 4px;
}

.filter-btn.active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--white);
}

.gallery-count {
  margin-bottom: 26px;
  font-size: 0.9rem;
  color: var(--text-soft);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(225px, 1fr));
  gap: 16px;
}

.gallery__item {
  position: relative;
  border: 1px solid var(--line);
  padding: 0;
  aspect-ratio: 3 / 4;
  border-radius: var(--r-md);
  overflow: hidden;
  cursor: pointer;
  background: linear-gradient(170deg, #eef1f8 0%, #dfe4f2 100%);
  transition: transform 0.24s ease, box-shadow 0.24s ease,
    border-color 0.24s ease;
}

.gallery__item:hover {
  transform: translateY(-4px);
  border-color: var(--cobalt);
  box-shadow: var(--shadow-md);
}

.gallery__item.is-hidden { display: none; }

.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  transition: transform 0.4s ease;
}

.gallery__item:hover img { transform: scale(1.04); }

/* Ngôi sao 4 cánh làm chỉ báo hover */
.gallery__item::after {
  content: "";
  position: absolute;
  top: 12px;
  right: 12px;
  width: 16px;
  height: 16px;
  background: var(--halo);
  clip-path: polygon(
    50% 0%, 60% 40%, 100% 50%, 60% 60%,
    50% 100%, 40% 60%, 0% 50%, 40% 40%
  );
  opacity: 0;
  transform: rotate(-45deg) scale(0.6);
  transition: opacity 0.24s ease, transform 0.24s ease;
}

.gallery__item:hover::after,
.gallery__item:focus-visible::after {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

.gallery__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 28px 14px 12px;
  background: linear-gradient(transparent, rgba(14, 20, 48, 0.88));
  color: var(--white);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  text-align: left;
  opacity: 0;
  transition: opacity 0.24s ease;
}

.gallery__item:hover .gallery__caption,
.gallery__item:focus-visible .gallery__caption { opacity: 1; }

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  place-items: center;
  background: rgba(8, 11, 26, 0.94);
  padding: 28px;
}
.lightbox.is-open { display: grid; }

.lightbox__figure {
  max-width: 820px;
  width: 100%;
  text-align: center;
}

.lightbox__img {
  width: auto;
  max-width: 100%;
  max-height: 74vh;
  margin: 0 auto;
  border-radius: var(--r-md);
}

.lightbox__cap {
  margin-top: 16px;
  color: var(--silver);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.05em;
}

.lightbox__btn,
.lightbox__close {
  position: absolute;
  border: 1px solid rgba(217, 222, 233, 0.22);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: var(--white);
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.lightbox__btn:hover,
.lightbox__close:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: var(--halo);
}

.lightbox__btn {
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  font-size: 1.4rem;
}
.lightbox__btn--prev { left: 22px; }
.lightbox__btn--next { right: 22px; }

.lightbox__close {
  top: 22px;
  right: 22px;
  width: 44px;
  height: 44px;
  font-size: 1.2rem;
}

/* ---------- 11. Nhạc ---------- */
.track-list { display: grid; gap: 10px; }

.track {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 20px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.track:hover { box-shadow: var(--shadow-sm); }

.track.is-playing {
  border-color: var(--cobalt);
  box-shadow: 0 0 0 3px rgba(43, 92, 230, 0.1);
}

.track__play {
  flex: none;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: var(--ink);
  color: var(--white);
  font-size: 0.85rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.18s ease, transform 0.18s ease;
}

.track__play:hover { background: var(--cobalt); transform: scale(1.06); }
.track.is-playing .track__play { background: var(--cobalt); }

.track__info { flex: 1 1 auto; min-width: 0; }

.track__name {
  font-weight: 600;
  font-size: 0.97rem;
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.track__meta {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  color: var(--text-soft);
}

.track__bar {
  height: 3px;
  margin-top: 9px;
  border-radius: 2px;
  background: var(--line);
  overflow: hidden;
}

.track__fill {
  height: 100%;
  width: 0;
  background: var(--cobalt);
  transition: width 0.25s linear;
}

.track__time {
  flex: none;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-soft);
  font-variant-numeric: tabular-nums;
}

/* Danh sách bài hát dạng gọn — dùng cho các mục dài hàng chục bài */
.song-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 0 40px;
}

.song-list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.93rem;
}

.song-list__name { min-width: 0; flex: 1 1 auto; }

/*
  Tracklist album dùng <ol> vì thứ tự bài là thông tin thật.
  Số hiệu do CSS counter sinh ra nên không phải gõ tay vào HTML.
*/
ol.song-list {
  list-style: none;
  counter-reset: track;
}

ol.song-list li { counter-increment: track; }

ol.song-list li::before {
  content: counter(track, decimal-leading-zero);
  flex: none;
  min-width: 2ch;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-soft);
}

.song-list__sub {
  display: block;
  font-size: 0.79rem;
  color: var(--text-soft);
  margin-top: 1px;
}

.song-list__time {
  flex: none;
  font-family: var(--font-mono);
  font-size: 0.79rem;
  color: var(--text-soft);
  font-variant-numeric: tabular-nums;
}

.section--ink .song-list li { border-bottom-color: var(--line-ink); }
.section--ink .song-list__name { color: var(--silver); }

/* Album: bìa bên trái, tracklist bên phải */
.album {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 32px;
  align-items: start;
}

.album + .album { margin-top: 48px; }

.album__cover {
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--line);
}

.album__cover img { width: 100%; aspect-ratio: 1; object-fit: cover; }

.album__title {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.album__meta {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--text-soft);
  margin: 4px 0 18px;
}

/* Lưới bìa nhạc */
.cover-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
  gap: 18px;
}

.cover {
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--ink-2);
  border: 1px solid var(--line-ink);
}

.cover img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.cover:hover img { transform: scale(1.05); }

.cover__name {
  padding: 11px 13px 13px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--white);
  line-height: 1.4;
}

.cover__meta {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--text-soft);
  margin-top: 3px;
}

/* ---------- 12. Khung nhúng ---------- */
.embed {
  position: relative;
  padding-top: 56.25%;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--ink);
}

.embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ---------- 13. Ghi chú ---------- */
.note {
  margin-top: 22px;
  padding: 15px 19px;
  border-left: 3px solid var(--halo);
  background: rgba(242, 193, 78, 0.07);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  font-size: 0.89rem;
  color: var(--text-soft);
  max-width: 78ch;
}

.section--ink .note {
  background: rgba(242, 193, 78, 0.07);
  color: var(--text-on-ink);
}

code {
  font-family: var(--font-mono);
  font-size: 0.87em;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(43, 92, 230, 0.09);
  color: var(--cobalt-deep);
}

.section--ink code {
  background: rgba(255, 255, 255, 0.09);
  color: var(--silver);
}

/* ---------- 14. Form ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 36px;
  align-items: start;
}

.form {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 32px;
}

.field { margin-bottom: 19px; }

.field label {
  display: block;
  margin-bottom: 7px;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.field .req { color: #d64550; }

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font-family: inherit;
  font-size: 0.94rem;
  color: var(--text);
  background: var(--paper);
  transition: border-color 0.18s ease, box-shadow 0.18s ease,
    background 0.18s ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--cobalt);
  box-shadow: 0 0 0 3px rgba(43, 92, 230, 0.14);
  background: var(--white);
}

.field textarea { resize: vertical; min-height: 128px; }

.field.has-error input,
.field.has-error select,
.field.has-error textarea {
  border-color: #d64550;
  background: #fff7f7;
}

.field__error {
  display: none;
  margin-top: 6px;
  font-size: 0.82rem;
  color: #c0343f;
}
.field.has-error .field__error { display: block; }

.field__hint {
  text-align: right;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-soft);
  margin-top: 5px;
}

.form__alert {
  display: none;
  margin-bottom: 20px;
  padding: 14px 18px;
  border-radius: var(--r-sm);
  font-size: 0.91rem;
}
.form__alert.is-visible { display: block; }

.form__alert--ok {
  background: rgba(43, 92, 230, 0.07);
  border: 1px solid rgba(43, 92, 230, 0.3);
  color: var(--cobalt-deep);
}

.contact-side .card + .card { margin-top: 18px; }

.contact-list li {
  display: flex;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.91rem;
}
.contact-list li:last-child { border-bottom: none; }
.contact-list .ico { width: 22px; text-align: center; flex: none; }

/* ---------- 15. Footer ---------- */
.site-footer {
  background: var(--ink);
  color: var(--text-soft);
  padding: 62px 0 26px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 34px;
  border-bottom: 1px solid var(--line-ink);
}

.site-footer h4 {
  color: var(--white);
  font-size: 0.78rem;
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.site-footer p,
.site-footer li { font-size: 0.89rem; }
.site-footer li { padding: 4px 0; }
.site-footer a { color: var(--silver); }
.site-footer a:hover { color: var(--halo); }

.social { display: flex; gap: 9px; margin-top: 18px; }

.social a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line-ink);
  display: grid;
  place-items: center;
  font-size: 0.92rem;
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.social a:hover {
  border-color: var(--halo);
  color: var(--halo);
  transform: translateY(-3px);
}

.footer-bottom {
  padding-top: 22px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: #5b6484;
}

.footer-bottom .disclaimer {
  margin-top: 7px;
  max-width: 76ch;
  line-height: 1.7;
}

/* ---------- 16. Back to top ---------- */
.to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 90;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: var(--ink);
  color: var(--halo);
  font-size: 1rem;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.28s ease;
}

.to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { background: var(--cobalt); color: var(--white); }

/* ---------- 17. Reveal khi cuộn ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal.is-visible { opacity: 1; transform: none; transition: none; }
  .hero__halo { animation: none; }
  html { scroll-behavior: auto; }
  * { transition-duration: 0.01ms !important; }
}
