:root {
  --bg:        #1b1a1f;
  --bg-soft:   #25232b;
  --line:      #35323d;
  --text:      #f0eef3;
  --text-dim:  #a6a0b0;
  --accent:    #ef7ca3;
  --accent-soft: rgba(239,124,163,.15);

  --maxw: 1200px;
  --gap: clamp(20px, 4vw, 56px);
  --radius: 4px;

  /* 小標統一往右補多少，讓小標左緣對齊大標。大標(Space Grotesk)與小標(Noto Sans JP)
     字體左邊界不同，全部小標固定偏左，故統一右移。不夠就調大、過頭就調小（1rem≈16px）。 */
  --sub-shift: 0.4rem;

  --font-jp: "Noto Sans JP", sans-serif;
  --font-en: "Space Grotesk", "Noto Sans JP", sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-jp);
  font-weight: 300;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
  -webkit-user-drag: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

::selection { background: var(--accent); color: #000; }

.btn {
  display: inline-block;
  font-family: var(--font-en);
  font-size: .9rem;
  letter-spacing: .04em;
  padding: .85em 2em;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all .25s ease;
  background: none;
  color: var(--text);
}
.btn--primary {
  background: var(--accent);
  color: #1b1a1f;
  font-weight: 500;
}
.btn--primary:hover { filter: brightness(1.1); transform: translateY(-2px); }
.btn--ghost {
  border-color: var(--line);
  color: var(--text-dim);
  padding: .5em 1.1em;
  font-size: .8rem;
}
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 1.1rem var(--gap);
  background: rgba(27,26,31,0);
  backdrop-filter: blur(0px);
  transition: background .3s ease, backdrop-filter .3s ease, padding .3s ease;
}
.nav.is-scrolled {
  background: rgba(27,26,31,.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  padding-top: .85rem;
  padding-bottom: .85rem;
}
.nav__brand {
  font-family: var(--font-en);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: .02em;
  margin-right: auto;
}
.nav__links { display: flex; gap: 1.8rem; }
.nav__links a {
  font-family: var(--font-en);
  font-size: .9rem;
  color: var(--text-dim);
  letter-spacing: .03em;
  transition: color .2s ease;
}
.nav__links a:hover { color: var(--text); }

.lang { display: flex; gap: .15rem; }
.lang button {
  font-family: var(--font-en);
  font-size: .78rem;
  background: none;
  border: none;
  color: var(--text-dim);
  padding: .2em .5em;
  cursor: pointer;
  border-radius: 3px;
  transition: color .2s ease;
}
.lang button:hover { color: var(--text); }
.lang button.is-active { color: var(--accent); font-weight: 500; }

.nav__menu { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; }
.nav__menu span { width: 22px; height: 1.5px; background: var(--text); transition: .3s; }

.hero {
  position: relative;
  height: 100svh;
  min-height: 620px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.hero__slides { position: absolute; inset: 0; z-index: 0; }
.hero__slide {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 16%;
  transform-origin: center 20%;
  opacity: 0;
  transform: scale(1.05);
  transition: opacity 1.4s ease;
}
.hero__slide.is-active {
  opacity: .5;
  transform: scale(1);
  transition: opacity 1.4s ease, transform 7.5s ease;
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: radial-gradient(ellipse at center,
    rgba(27,26,31,.30) 0%, rgba(27,26,31,.78) 68%, rgba(27,26,31,.96) 100%);
}

.hero__inner {
  position: relative; z-index: 2;
  padding: 0 var(--gap);
  display: flex; flex-direction: column; align-items: center;
}
.hero__head { display: flex; align-items: center; gap: 1.2rem; margin-bottom: 1.5rem; }
.hero__avatar {
  width: 84px; height: 84px; border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 5px var(--accent-soft);
  flex-shrink: 0;
}
.hero__id { text-align: left; }
.hero__role {
  font-family: var(--font-en);
  font-size: .8rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--accent); margin-bottom: .35rem;
}
.hero__name {
  font-family: var(--font-en); font-weight: 700;
  font-size: clamp(2.2rem, 6.5vw, 4.6rem);
  line-height: 1.02; letter-spacing: .01em;
}

.hero__social { display: flex; gap: .85rem; }
.hero__social a {
  display: grid; place-items: center;
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--accent);
  background: rgba(27,26,31,.45);
  backdrop-filter: blur(4px);
  transition: color .22s ease, border-color .22s ease, transform .22s ease;
}
.hero__social a:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-3px); }
.hero__social svg { width: 18px; height: 18px; fill: currentColor; }
.social-icon--vgen {
  display: block;
  width: 20px;
  height: 20px;
  object-fit: contain;
  filter: brightness(0) saturate(100%) invert(64%) sepia(31%) saturate(1022%) hue-rotate(295deg) brightness(100%) contrast(88%);
}

@media (max-width: 480px) {
  .hero__head { flex-direction: column; gap: .8rem; }
  .hero__id { text-align: center; }
  .hero__avatar { width: 76px; height: 76px; }
}

.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(60px, 8vw, 118px) var(--gap);
}
/* 文字統一使用滿欄寬；text-wrap: pretty 改善斷行、避免句尾孤字。 */
p, li { text-wrap: pretty; }
/* 短的多行文字（標題、欄位內小描述）用 balance，讓各行字數平均、不留孤字 */
.section__title, .hero__name { text-wrap: balance; }
.section__head { margin-bottom: clamp(36px, 5vw, 64px); }
.section__title {
  font-family: var(--font-en);
  font-weight: 500;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  letter-spacing: .01em;
}
.section__sub {
  font-size: .85rem;
  letter-spacing: .2em;
  color: var(--accent);
  margin-top: .4rem;
  text-indent: var(--sub-shift);   /* 統一右移，對齊大標左緣 */
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin-bottom: 2.4rem;
}
.filters button {
  font-family: var(--font-en);
  font-size: .82rem;
  letter-spacing: .03em;
  background: none;
  border: 1px solid var(--line);
  color: var(--accent);
  padding: .45em 1.2em;
  border-radius: 100px;
  cursor: pointer;
  transition: all .2s ease;
}
.filters button:hover { color: var(--text); }
.filters button.is-active { background: var(--accent); border-color: var(--accent); color: #1b1a1f; }

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(10px, 1.4vw, 18px);
}
.card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--bg-soft);
  cursor: pointer;
  aspect-ratio: 3 / 4;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s ease, transform .6s ease;
}
.card.is-in { opacity: 1; transform: none; }
/* 全站共識：所有圖以 object-fit:cover 裁切，焦點固定偏上，直圖一律顯示上半部（臉/頭）。
   橫圖為例外，可在 works.js 用 focus 覆蓋（例：03 リバーレリオ 為橫圖設 center）。 */
.card img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 12%;
  transition: transform .6s ease;
}
.card:hover img { transform: scale(1.05); }
.card__overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 1.1rem;
  background: linear-gradient(transparent 40%, rgba(0,0,0,.8));
  opacity: 0;
  transition: opacity .3s ease;
}
.card:hover .card__overlay { opacity: 1; }
.card__title { font-size: .95rem; font-weight: 500; }
.card__meta { font-size: .78rem; color: var(--text-dim); font-family: var(--font-en); }

.works__nda {
  margin-top: 2.6rem;
  font-size: .82rem;
  color: var(--text-dim);
  text-align: center;
}

.contact__lead { color: var(--text-dim); margin-bottom: 2rem; }

.contact__mail {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  font-family: var(--font-en);
  font-size: 1.1rem;
  margin-bottom: 2.4rem;
  padding-bottom: 2.4rem;
  border-bottom: 1px solid var(--line);
}

.footer {
  border-top: 1px solid var(--line);
  padding: 3rem var(--gap);
  text-align: center;
}
.social { display: flex; justify-content: center; gap: 1.4rem; margin-bottom: 1.6rem; flex-wrap: wrap; }
.social a {
  font-family: var(--font-en);
  font-size: .82rem;
  letter-spacing: .05em;
  color: var(--text-dim);
  transition: color .2s ease;
}
.social a:hover { color: var(--accent); }
.footer__copy { font-size: .78rem; color: #5a5a64; }

.lb {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(18,17,21,.96);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 4vh 4vw;
}
.lb[hidden] { display: none; }
.lb__figure { max-width: 100%; max-height: 100%; text-align: center; }
.lb__figure img {
  max-width: 100%;
  max-height: 82vh;
  margin: 0 auto;
  border-radius: var(--radius);
}
.lb__figure figcaption {
  margin-top: 1rem;
  font-size: .9rem;
  color: var(--text-dim);
}
.lb__close, .lb__nav {
  position: absolute;
  background: none; border: none;
  color: var(--text-dim);
  cursor: pointer;
  transition: color .2s ease;
}
.lb__close:hover, .lb__nav:hover { color: var(--accent); }
.lb__close { top: 2vh; right: 3vw; font-size: 2.4rem; line-height: 1; }
.lb__nav { top: 50%; transform: translateY(-50%); font-size: 3.4rem; line-height: 1; padding: 0 1rem; }
.lb__prev { left: 1vw; }
.lb__next { right: 1vw; }

@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 680px) {
  .nav__links {
    position: fixed;
    top: 0; right: 0;
    height: 100svh;
    width: min(70vw, 280px);
    flex-direction: column;
    justify-content: center;
    gap: 2rem;
    padding: 0 2rem;
    background: rgba(18,18,22,.98);
    backdrop-filter: blur(12px);
    transform: translateX(100%);
    transition: transform .35s ease;
  }
  .nav__links.is-open { transform: translateX(0); }
  .nav__links a { font-size: 1.2rem; }
  .nav__menu { display: flex; }
  .hero::after {
    background: linear-gradient(0deg, rgba(27,26,31,.95) 0%, rgba(27,26,31,.5) 60%, rgba(27,26,31,.3) 100%);
  }
}
@media (max-width: 440px) {
  .grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .card { opacity: 1; transform: none; }
}
