/* =========================================
   Muto Town Portfolio
   目次: 変数 / ベース / 共通 / ヘッダー / FV / About / Skills
        / 数字帯 / Works / FAQ / Contact / フッター / モーダル / アニメーション
   ========================================= */

/* ---------- 変数 ---------- */
:root {
  --color-bg: #FFFFFF;
  --color-bg-sub: #F5F5F5;
  --color-primary: #111111;
  --color-accent: #FF4B2B;
  --color-marker: #FF4B2B;
  --color-text: #1A1A1A;
  --color-text-sub: #6B6B6B;
  --color-border: #E5E5E5;

  --font-ja: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  --font-en: "Montserrat", "Noto Sans JP", sans-serif;

  --header-h: 72px;
  --radius: 8px;
  --shadow: 0 2px 16px rgba(17, 17, 17, .08);
  --ease: 0.3s ease;
}

/* ---------- ベース ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
  margin: 0;
  font-family: var(--font-ja);
  font-size: 16px;
  line-height: 1.9;
  letter-spacing: 0.04em;
  color: var(--color-text);
  background: var(--color-bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p, dl, dd { margin: 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 3px; }

@media (max-width: 768px) { body { font-size: 15px; } }

/* ---------- 共通 ---------- */
.container { width: 100%; max-width: 1168px; margin: 0 auto; padding: 0 24px; }
.container--narrow { max-width: 848px; }
@media (max-width: 768px) { .container { padding: 0 20px; } }

.section { padding: 120px 0; }
.section--sub { background: var(--color-bg-sub); }
@media (max-width: 768px) { .section { padding: 72px 0; } }

.section__head { text-align: center; margin-bottom: 64px; }
.section__en {
  font-family: var(--font-en);
  font-weight: 700;
  font-size: clamp(2.25rem, 6vw, 4rem);
  letter-spacing: 0.16em;
  line-height: 1.2;
  color: var(--color-primary);
}
.section__ja {
  margin-top: 8px;
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 700;
  color: var(--color-text-sub);
}
.section__head--light .section__en { color: #fff; }
.section__head--light .section__ja { color: rgba(255, 255, 255, .7); }
@media (max-width: 768px) { .section__head { margin-bottom: 40px; } }

.btn {
  display: inline-block;
  padding: 16px 40px;
  background: var(--color-primary);
  color: #fff;
  font-weight: 700;
  border: 2px solid var(--color-primary);
  border-radius: 999px;
  cursor: pointer;
  transition: background var(--ease), color var(--ease), transform var(--ease);
  text-align: center;
}
.btn:hover { background: var(--color-accent); border-color: var(--color-accent); transform: translateY(-2px); }
.btn--small { padding: 10px 24px; font-size: .875rem; }
.btn--large { padding: 22px 64px; font-size: 1.125rem; }
.btn--white { background: #fff; color: var(--color-primary); border-color: #fff; }
.btn--white:hover { background: var(--color-accent); color: #fff; }

.text-link {
  font-weight: 700;
  border-bottom: 2px solid var(--color-marker);
  padding-bottom: 2px;
  transition: color var(--ease);
}
.text-link:hover { color: var(--color-accent); }

.placeholder { width: 100%; height: 100%; object-fit: cover; background: var(--color-border); }

.card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform var(--ease), box-shadow var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: 0 8px 28px rgba(17, 17, 17, .12); }

/* ---------- ヘッダー ---------- */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--header-h);
  background: transparent;
  transition: background var(--ease), box-shadow var(--ease);
}
.header.is-scrolled { background: #fff; box-shadow: 0 2px 12px rgba(17, 17, 17, .08); }
.header__inner {
  max-width: 1168px; height: 100%; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.header__logo-text { font-family: var(--font-en); font-weight: 700; font-size: 1.25rem; letter-spacing: 0.08em; }
.nav { display: flex; align-items: center; gap: 32px; }
.nav__list { display: flex; gap: 28px; }
.nav__link { font-family: var(--font-en); font-weight: 600; font-size: .875rem; letter-spacing: 0.1em; position: relative; padding: 4px 0; }
.nav__link::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 0; height: 2px;
  background: var(--color-accent); transition: width var(--ease);
}
.nav__link:hover::after { width: 100%; }

.hamburger { display: none; width: 44px; height: 44px; background: none; border: 0; cursor: pointer; position: relative; }
.hamburger span {
  position: absolute; left: 10px; width: 24px; height: 2px; background: var(--color-primary);
  transition: transform var(--ease), opacity var(--ease), top var(--ease);
}
.hamburger span:nth-child(1) { top: 14px; }
.hamburger span:nth-child(2) { top: 21px; }
.hamburger span:nth-child(3) { top: 28px; }
.hamburger[aria-expanded="true"] span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3) { top: 21px; transform: rotate(-45deg); }

@media (max-width: 768px) {
  .header__inner { padding: 0 20px; }
  .header { background: #fff; }
  .hamburger { display: block; }
  .nav {
    position: fixed; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; padding: 8px 20px 28px;
    box-shadow: 0 8px 16px rgba(17, 17, 17, .08);
    transform: translateY(-120%); visibility: hidden;
    transition: transform var(--ease), visibility var(--ease);
  }
  .nav.is-open { transform: translateY(0); visibility: visible; }
  .nav__list { flex-direction: column; gap: 0; }
  .nav__link { display: block; padding: 16px 0; border-bottom: 1px solid var(--color-border); }
  .nav__link::after { display: none; }
  .nav__cta { margin-top: 20px; }
}

/* ---------- FV ---------- */
.fv { position: relative; min-height: 100vh; display: flex; align-items: center; padding: calc(var(--header-h) + 40px) 0 100px; }
.fv__inner { display: grid; grid-template-columns: 1.15fr 1fr; gap: 64px; align-items: center; }
.fv__eyebrow { font-family: var(--font-en); font-weight: 600; letter-spacing: 0.24em; font-size: .875rem; color: var(--color-text-sub); }
.fv__title {
  margin-top: 16px;
  font-size: clamp(2.5rem, 6.4vw, 5rem);
  font-weight: 700; line-height: 1.3; letter-spacing: 0.02em;
}
.fv__title-dot { background: linear-gradient(transparent 68%, var(--color-marker) 68%, var(--color-marker) 92%, transparent 92%); }
.fv__name { margin-top: 32px; font-size: 1.125rem; }
.fv__role { display: block; font-size: .875rem; color: var(--color-text-sub); }
.fv__lead { margin-top: 20px; max-width: 34em; color: var(--color-text); }
.fv__actions { margin-top: 40px; display: flex; flex-wrap: wrap; align-items: center; gap: 28px; }
.fv__visual { display: flex; align-items: center; justify-content: center; }
.fv__img { width: 100%; height: auto; max-height: 70vh; object-fit: contain; }

.scroll {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  font-family: var(--font-en); font-size: .6875rem; letter-spacing: 0.24em; color: var(--color-text-sub);
}
.scroll__icon { animation: bounce 1.8s ease-in-out infinite; }
@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(8px); } }

@media (max-width: 1024px) { .fv__inner { gap: 40px; } }
@media (max-width: 768px) {
  .fv { min-height: auto; padding-bottom: 96px; }
  .fv__inner { grid-template-columns: 1fr; }
  .fv__visual { order: -1; }
  .fv__img { max-height: 280px; }
  .fv__actions { gap: 20px; }
}

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: 340px 1fr; gap: 64px; align-items: start; }
.about__photo { aspect-ratio: 1 / 1; border-radius: var(--radius); overflow: hidden; }
.about__img { width: 100%; height: 100%; object-fit: cover; }
.about__text { font-size: 1.0625rem; }
.about__list { margin-top: 32px; border-top: 1px solid var(--color-border); }
.about__list li { position: relative; padding: 16px 0 16px 28px; border-bottom: 1px solid var(--color-border); font-weight: 500; }
.about__list li::before { content: ""; position: absolute; left: 4px; top: 27px; width: 10px; height: 10px; background: var(--color-accent); border-radius: 50%; }
@media (max-width: 1024px) { .about { grid-template-columns: 260px 1fr; gap: 40px; } }
@media (max-width: 768px) {
  .about { grid-template-columns: 1fr; gap: 32px; }
  .about__photo { max-width: 280px; margin: 0 auto; width: 100%; }
}

/* ---------- Skills ---------- */
.skills { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.skill { padding: 36px 28px; }
.skill__icon { color: var(--color-primary); }
.skill__title { margin-top: 20px; font-size: 1.125rem; font-weight: 700; line-height: 1.5; }
.skill__text { margin-top: 12px; font-size: .9375rem; color: var(--color-text-sub); }
@media (max-width: 1024px) { .skills { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px) { .skills { grid-template-columns: 1fr; } }

/* ---------- 数字帯（Works導入） ---------- */
.band { background: var(--color-primary); color: #fff; padding: 96px 0; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; text-align: center; }
.stats__item { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px 0; }
.stats__label { font-size: .875rem; color: rgba(255, 255, 255, .7); }
.stats__num {
  font-family: var(--font-en); font-weight: 700;
  font-size: clamp(3.5rem, 9vw, 6.5rem); line-height: 1.1; letter-spacing: 0;
  color: #fff;
}
.stats__num small { font-size: .4em; margin-left: 4px; color: var(--color-accent); }
.stats__note { margin-top: 16px; text-align: center; font-size: .75rem; color: rgba(255, 255, 255, .6); }
@media (max-width: 768px) {
  .band { padding: 72px 0; }
  .stats { grid-template-columns: 1fr; gap: 8px; }
  .stats__item { border-bottom: 1px solid rgba(255, 255, 255, .15); }
  .stats__item:last-child { border-bottom: 0; }
}

/* ---------- Works ---------- */
.works { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.work { overflow: hidden; cursor: pointer; display: flex; flex-direction: column; text-align: left; padding: 0; border: 0; width: 100%; }
.work__thumb { aspect-ratio: 16 / 9; background: var(--color-border); overflow: hidden; }
.work__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.work:hover .work__thumb img { transform: scale(1.04); }
.work__body { padding: 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.work__cat { align-self: flex-start; font-size: .75rem; font-weight: 700; padding: 2px 12px; border-radius: 999px; background: var(--color-primary); color: #fff; letter-spacing: 0.08em; }
.work__title { font-size: 1.0625rem; font-weight: 700; line-height: 1.6; }
.work__summary { font-size: .9375rem; color: var(--color-text-sub); }
.work__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 8px; }
.tag { font-size: .75rem; padding: 2px 10px; border: 1px solid var(--color-border); border-radius: 4px; color: var(--color-text-sub); background: #fff; }
@media (max-width: 1024px) { .works { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px) { .works { grid-template-columns: 1fr; gap: 24px; } }

/* ---------- FAQ ---------- */
.faq__item { border-bottom: 1px solid var(--color-border); background: #fff; }
.faq__item:first-child { border-top: 1px solid var(--color-border); }
.faq__q { font-size: 1rem; font-weight: 700; }
.faq__btn {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 24px 24px; background: none; border: 0; cursor: pointer; text-align: left; line-height: 1.6;
}
.faq__btn:hover { color: var(--color-accent); }
.faq__icon { position: relative; flex: none; width: 20px; height: 20px; transition: transform var(--ease); }
.faq__icon::before, .faq__icon::after { content: ""; position: absolute; background: currentColor; top: 50%; left: 50%; }
.faq__icon::before { width: 20px; height: 2px; margin: -1px 0 0 -10px; }
.faq__icon::after { width: 2px; height: 20px; margin: -10px 0 0 -1px; }
.faq__btn[aria-expanded="true"] .faq__icon { transform: rotate(45deg); }
.faq__a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--ease); }
.faq__a.is-open { grid-template-rows: 1fr; }
.faq__a-inner { overflow: hidden; }
.faq__a-inner p { padding: 0 24px 24px; color: var(--color-text-sub); }

/* ---------- Contact ---------- */
.band--contact { padding: 120px 0; text-align: center; }
.contact { display: flex; flex-direction: column; align-items: center; }
.contact__lead { margin-bottom: 40px; max-width: 32em; }
.sns { display: flex; gap: 32px; margin-top: 56px; }
.sns__link { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-en); font-weight: 600; font-size: .9375rem; transition: color var(--ease); }
.sns__link:hover { color: var(--color-accent); }
@media (max-width: 768px) {
  .band--contact { padding: 72px 0; }
  .btn--large { padding: 20px 40px; width: 100%; }
}

/* ---------- フッター ---------- */
.footer { padding: 32px 0; background: #fff; border-top: 1px solid var(--color-border); }
.footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.footer__logo { font-family: var(--font-en); font-weight: 700; letter-spacing: 0.08em; }
.footer__copy { font-size: .8125rem; color: var(--color-text-sub); }
.pagetop {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--color-primary);
  transition: background var(--ease), color var(--ease);
}
.pagetop:hover { background: var(--color-primary); color: #fff; }
@media (max-width: 480px) { .footer__inner { flex-wrap: wrap; justify-content: center; } }

/* ---------- モーダル ---------- */
.modal { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal__overlay { position: absolute; inset: 0; background: rgba(17, 17, 17, .7); }
.modal__panel {
  position: relative; width: 100%; max-width: 760px; max-height: calc(100vh - 40px); overflow-y: auto;
  background: #fff; border-radius: var(--radius);
  animation: modalIn 0.3s ease;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.modal__close {
  position: absolute; top: 12px; right: 12px; z-index: 1;
  width: 40px; height: 40px; border-radius: 50%; border: 0; background: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow);
}
.modal__image { aspect-ratio: 16 / 9; background: var(--color-border); }
.modal__image img { width: 100%; height: 100%; object-fit: cover; }
.modal__body { padding: 32px; }
.modal__cat { font-size: .75rem; font-weight: 700; color: var(--color-accent); letter-spacing: 0.1em; }
.modal__title { margin: 4px 0 20px; font-size: 1.375rem; line-height: 1.5; }
.modal__list { display: grid; grid-template-columns: 7em 1fr; gap: 12px 16px; margin-bottom: 28px; font-size: .9375rem; }
.modal__list dt { font-weight: 700; }
.modal__list dd { color: var(--color-text-sub); }
@media (max-width: 480px) {
  .modal__body { padding: 24px 20px; }
  .modal__list { grid-template-columns: 1fr; gap: 2px; }
  .modal__list dd { margin-bottom: 12px; }
}

/* ---------- アニメーション ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
