:root {
  --ink: #2A1C12;
  --ink-2: #3E2E18;
  --ink-3: #6E5440;
  --paper: #FBF8F3;
  --tea: #C4864A;
  --chartreuse: #C8F04B;
  --cobalt: #2D47F5;
  --persimmon: #FF5A1F;
  --pink: #FF5C93;
  --muted: #8C8680;
  --shadow: 0 1px 0 rgba(42, 28, 18, 0.06), 0 20px 40px rgba(40, 22, 8, 0.18);
  --sans: 'Instrument Sans', 'Noto Sans JP', system-ui, sans-serif;
  --mono: 'JetBrains Mono', 'Noto Sans JP', ui-monospace, monospace;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--tea);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--ink); }
a:hover { color: #5A3416; }

h1, h2, h3, p { margin: 0; }

.sprite { position: absolute; }

#tea {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
  pointer-events: none;
}

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

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

/* ---------- link underlines in brand colors ---------- */

.u-chartreuse, .u-cobalt, .u-pink {
  text-decoration-thickness: 3px;
  text-underline-offset: 5px;
  font-weight: 600;
}
.u-chartreuse { text-decoration-color: var(--chartreuse); }
.u-cobalt { text-decoration-color: var(--cobalt); }
.u-pink { text-decoration-color: var(--pink); }

/* ---------- logo ---------- */

.logo {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 44px;
  text-decoration: none;
  color: var(--ink);
}
.logo-mark {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  filter: drop-shadow(0 1px 1.5px rgba(42, 28, 18, 0.35));
}
.logo-mark .bottle { width: 17px; height: 40px; }
.logo-mark--sm { gap: 2px; filter: none; }
.logo-mark--sm .bottle { width: 12px; height: 28px; color: #FFFFFF; }
.logo-text { font-size: 22px; font-weight: 600; letter-spacing: -0.03em; }
.logo--white { color: #FFFFFF; }
.logo--white .logo-text { font-size: 17px; letter-spacing: -0.02em; }

.c-chartreuse { color: var(--chartreuse); }
.c-cobalt { color: var(--cobalt); }
.c-persimmon { color: var(--persimmon); }
.c-pink { color: var(--pink); }

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

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding-top: 26px;
  padding-bottom: 26px;
}
.site-nav { display: flex; gap: 4px; font-size: 16px; }
.site-nav a { padding: 12px 14px; font-weight: 500; text-decoration-thickness: 4px; text-underline-offset: 7px; }

/* ---------- hero ---------- */

.hero {
  padding-top: clamp(24px, calc(9vw - 50px), 78px);
  padding-bottom: clamp(48px, calc(12vw - 50px), 118px);
}
.hero h1 {
  max-width: 1000px;
  font-size: clamp(46px, 8.4vw, 120px);
  line-height: 0.95;
  letter-spacing: -0.045em;
  font-weight: 600;
}
.hero p {
  margin-top: 28px;
  max-width: 540px;
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.55;
  font-weight: 500;
}

/* ---------- sections ---------- */

.section { padding-bottom: 120px; }
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 20px;
}
.section-head h2, .about-grid h2 {
  font-size: clamp(36px, 4.5vw, 52px);
  line-height: 1;
  letter-spacing: -0.035em;
  font-weight: 600;
}
.section-count { font-family: var(--mono); font-size: 13px; font-weight: 500; }
.section-intro {
  max-width: 640px;
  margin-bottom: 32px;
  font-size: 18px;
  line-height: 1.55;
  font-weight: 500;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: 24px;
}

.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
}

/* ---------- project cards ---------- */

.card {
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.card-shot {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  padding: 0;
  border: 0;
  background: #FFFFFF;
  cursor: zoom-in;
}
.card-shot-img { width: 100%; height: 100%; object-fit: cover; }
.card-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px 22px 24px;
  color: var(--ink);
}
.card--chartreuse .card-body { background: var(--chartreuse); }
.card--persimmon .card-body { background: var(--persimmon); }
.card-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.card-title {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.card-title:hover { text-decoration: underline; text-underline-offset: 4px; }
.card-desc { font-size: 15px; line-height: 1.55; }
.card-meta { margin-top: auto; padding-top: 4px; font-family: var(--mono); font-size: 12px; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; flex: 0 0 auto; }
.tag {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  border: 1.5px solid currentColor;
  border-radius: 999px;
  padding: 3px 9px;
}

/* ---------- contributors ---------- */

.person {
  display: flex;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.person-photo {
  flex: 0 0 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #FFFFFF;
}
.avatar {
  width: 76px;
  height: 76px;
  border-radius: 999px;
  background: #EFEAE3;
  font-size: 11px;
}
.person-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 22px;
  background: var(--pink);
}
.person-body h3, .join h3 { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; }
.person-body p, .join p { font-size: 15px; line-height: 1.5; }
.person-meta { margin-top: auto; font-family: var(--mono); font-size: 12px; }

.join {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 22px 24px;
  border-radius: 18px;
  border: 2px dashed rgba(42, 28, 18, 0.45);
  background: rgba(255, 255, 255, 0.35);
}
.join a { align-self: flex-start; display: inline-flex; align-items: center; min-height: 40px; }

/* ---------- about ---------- */

.about-wrap { padding-bottom: 48px; }
.about-card {
  padding: clamp(36px, 6vw, 72px) clamp(24px, 5vw, 64px) 28px;
  border-radius: 28px;
  background: var(--cobalt);
  color: #FFFFFF;
  box-shadow: 0 24px 60px rgba(30, 20, 80, 0.22);
}
.about-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 24px 40px;
}
.about-side { flex: 0 1 360px; display: flex; flex-direction: column; gap: 32px; }
.about-text {
  flex: 1 1 420px;
  max-width: 620px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.about-text p { font-size: 17px; line-height: 1.6; color: #E6E9FF; }
.about-text .lead { font-size: clamp(19px, 2vw, 23px); line-height: 1.45; font-weight: 500; color: #FFFFFF; }
.about-text a { align-self: flex-start; display: inline-flex; align-items: center; min-height: 44px; font-size: 17px; color: #FFFFFF; }
.site-footer {
  margin-top: clamp(56px, 7vw, 88px);
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.28);
}

/* ---------- expanded project ---------- */

.project-dialog {
  width: min(1040px, calc(100% - 24px));
  max-height: calc(100% - 24px);
  padding: 0;
  border: 0;
  border-radius: 24px;
  background: #FFFFFF;
  color: var(--ink);
  box-shadow: 0 30px 80px rgba(20, 10, 0, 0.35);
}
.project-dialog::backdrop {
  background: rgba(42, 28, 18, 0.42);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px 18px 28px;
}
.project-dialog[data-color="chartreuse"] .dialog-head,
.project-dialog[data-color="chartreuse"] .btn--color { background: var(--chartreuse); }
.project-dialog[data-color="persimmon"] .dialog-head,
.project-dialog[data-color="persimmon"] .btn--color { background: var(--persimmon); }
.dialog-head h2 { font-size: clamp(26px, 3.4vw, 36px); line-height: 1.1; letter-spacing: -0.03em; font-weight: 600; }
.dialog-close {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1.5px solid currentColor;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.dialog-gallery {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: clamp(16px, 3vw, 28px);
}
.dialog-main-img { width: 100%; aspect-ratio: 16 / 9; border-radius: 14px; background: #F4F1EC; object-fit: cover; }
.dialog-thumbs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.dialog-thumb { width: 100%; aspect-ratio: 4 / 3; border-radius: 10px; background: #F4F1EC; object-fit: cover; font-size: 12px; }
.dialog-body {
  display: flex;
  flex-wrap: wrap;
  gap: 32px 48px;
  padding: 8px clamp(16px, 3vw, 28px) clamp(24px, 4vw, 36px);
}
.dialog-main { flex: 1 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.dialog-desc { font-size: 20px; line-height: 1.45; font-weight: 500; }
.label { margin: 12px 0 8px; font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; }
.dialog-notes { font-size: 16px; line-height: 1.65; color: var(--ink-2); white-space: pre-line; }
.dialog-side { flex: 1 1 260px; display: flex; flex-direction: column; gap: 22px; }
.facts { margin: 0; display: grid; gap: 10px; font-size: 15px; }
.facts > div { display: grid; grid-template-columns: 90px 1fr; gap: 20px; }
.facts dt { font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); padding-top: 2px; }
.facts dd { margin: 0; }
.dialog-actions { display: flex; flex-direction: column; gap: 10px; }
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 50px;
  border-radius: 999px;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.btn--solid { background: var(--ink); color: var(--paper); border: 0; }
.btn--solid:hover { color: var(--paper); }
.btn--color { border: 0; color: var(--ink); }
.btn--outline { border: 1.5px solid var(--ink); background: transparent; }
[hidden] { display: none !important; }

/* ---------- now playing ---------- */

.now-playing { max-width: 340px; }
.np-title {
  margin-bottom: 14px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #E6E9FF;
}
.np-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 12px;
}
.np-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.np-art {
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  border-radius: 10px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.2);
}
.np-text { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.np-who {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  color: #E6E9FF;
}
.np-song {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 16px;
  font-weight: 600;
  color: #FFFFFF;
  text-decoration: none;
}
.np-song:hover { color: #FFFFFF; text-decoration: underline; text-decoration-color: var(--chartreuse); }
.np-artist { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 14px; color: #E6E9FF; }
.np-bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 11px; }
.np-bars i { width: 3px; height: 100%; background: var(--chartreuse); animation: np-bounce 0.9s ease-in-out infinite; }
.np-bars i:nth-child(2) { animation-delay: -0.3s; }
.np-bars i:nth-child(3) { animation-delay: -0.6s; }
@keyframes np-bounce { 0%, 100% { transform: scaleY(0.3); } 50% { transform: scaleY(1); } }
.np-bars i { transform-origin: bottom; }

@media (prefers-reduced-motion: reduce) {
  .np-bars i { animation: none; transform: scaleY(0.7); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* Japanese: break between phrases, not mid-word, and drop the tight Latin tracking on headings */
:lang(ja) { line-break: strict; word-break: auto-phrase; }
:lang(ja) h1, :lang(ja) h2, :lang(ja) h3 { letter-spacing: 0; }
:lang(ja) .label, :lang(ja) .facts dt { letter-spacing: 0.04em; }
:lang(ja) .hero h1 { max-width: none; font-size: clamp(30px, 7.4vw, 104px); line-height: 1.15; }
.phrase { display: inline-block; }
