/* ==========================================================================
   TunagariWeb / style.css
   ブレイクポイント: 1024px (≧1024 = PC, ＜1024 = SP)
   ========================================================================== */

:root{
  --cream: #F5F0E4;
  --paper: #FFFFFF;
  --ink: #17140F;
  --muted: #000;
  --line: #17140F;
  --radius: 15px;

  --font-jp: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', sans-serif;
  --font-en: 'Lato', 'Noto Sans JP', sans-serif;

  --sidebar-l: 340px;
  --sidebar-r: 240px;

  --ease: cubic-bezier(.65,0,.35,1);
}

/* ---------- Reset ---------- */
*, *::before, *::after{ box-sizing: border-box; }
html, body{ height: 100%; }
body{
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-jp);
  font-size: 15px;
  line-height: 1.9;
  -webkit-font-smoothing: antialiased;
}
ul{ list-style: none; margin: 0; padding: 0; }
a{ color: inherit; text-decoration: none; }
button{ font: inherit; background: none; border: none; cursor: pointer; color: inherit; }
h1,h2,h3,p,dl,dd{ margin: 0; }
input, textarea{ font: inherit; color: inherit; }

@media (prefers-reduced-motion: reduce){
  *, *::before, *::after{
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   レイアウト全体
   ========================================================================== */
.app{ position: relative; min-height: 100vh; }

/* ---------- 左サイドバー(固定) ---------- */
.sidebar--left{
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  width: var(--sidebar-l);
  display: flex;
  flex-direction: column;
  /* justify-content: center; */
  gap: 64px;
  padding-top: 80px;
  padding-left: clamp(40px, 6vw, 96px);
  z-index: 10;
}

.brand{ display: inline-flex; flex-direction: column; gap: 6px; width: fit-content; }
.brand__logo{
  font-family: var(--font-en);
  font-weight: 700;
  font-size: 48px;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.brand__tagline{
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  font-weight: 400;
  /* letter-spacing: .04em; */
}

.nav__list{ display: flex; flex-direction: column; gap: 28px; margin-left: 5px;}
.nav__link{
  position: relative;
  display: inline-block;
  font-size: 16px;
  /* opacity: .5; */
  transition: opacity .25s var(--ease), transform .25s var(--ease);
}
.nav__link::after {
  content: "";
  position: absolute;
  top: 55%;
  right: -16px;
  width: 10px;
  height: 1px;
  background: #000;
  transform: translateY(-50%) scaleX(0);
  transform-origin: left center;
  transition: transform .25s var(--ease);
}
.nav__link:hover{ opacity: .85; }
.nav__link:hover::after {
  transform: translateY(-50%) scaleX(1);
}
.nav__link.is-active{ opacity: 1; font-weight: 500; }
.nav__link.is-active::after {
  transform: translateY(-50%) scaleX(1);
}


/* ---------- 中央ステージ / カード ---------- */
.stage{
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px var(--sidebar-r) 5px var(--sidebar-l);
}

.card{
  width: 100%;
  max-width: 460px;
  height: min(84vh, 800px);
  background: var(--cream);
  border-radius: var(--radius);
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
  scroll-snap-type: y mandatory; /* 1セクションずつピタッと止める */
  padding: 0 44px; /* 縦のpaddingはpanel側に持たせる(理由は下記) */
  scrollbar-width: none;
}
.card::-webkit-scrollbar{ display: none; }
 
/*
  panel の min-height:100% は「.cardの高さ(padding抜き)」を基準に計算される。
  もし .card 側に縦paddingがあると、実際に見えているスクロール領域(.cardの高さそのもの)より
  panel の実高さが padding分だけ小さくなり、次のsectionが下にはみ出して見えてしまう。
  そのため縦の余白は panel 側(box-sizing:border-box)で持つ。
*/
.panel{
  min-height: 100%;
  box-sizing: border-box;
  padding: 56px 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}
.panel + .panel{ margin-top: 0; }
 
.panel__heading{
  font-family: var(--font-en);
  font-weight: 700;
  font-size: 26px;
  margin-bottom: 32px;
}
.panel__body{ display: flex; flex-direction: column; gap: 22px; }
.panel__body p{ font-size: 14px; }
.panel__label{
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  letter-spacing: .02em;
}
.panel__label+p{
  margin-bottom: 30px;
}
 
/* ---------- Home ---------- */
.panel--home{
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 28px;
}

.home__sub{
  font-size: 12px;
}

/* ---------- ボタン ---------- */
.btn{
  display: inline-block;
  background: var(--ink);
  color: #fff;
  font-size: 16px;
  letter-spacing: .5em;
  text-indent: .5em; /* letter-spacingの右余白をボタン中央に合わせる */
  padding: 10px 45px;
  border-radius: 8px;
  margin-top: 8px;
  transition: opacity .2s var(--ease), transform .2s var(--ease);
}
.btn:hover{ opacity: .85; transform: translateY(-1px); }
.btn--submit{ letter-spacing: .6em; align-self: center; margin-top: 12px; }

/* ---------- Works(横スクロール / ドラッグ&スワイプ) ---------- */
.panel--works{ justify-content: flex-start; }

.works-track{
  display: flex;
  gap: 48px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x proximity;
  cursor: grab;
  padding-bottom: 8px;
  margin: 50px -44px 0;
  padding-left: 44px;
  padding-right: 44px;
  scrollbar-width: none;
  user-select: none;
}
.works-track::-webkit-scrollbar{ display: none; }
.works-track.is-dragging{ cursor: grabbing; scroll-snap-type: none; }

.work-card{
  flex: 0 0 auto;
  width: 240px;
  scroll-snap-align: 44px;
}
.work-card__title{ font-size: 12px; margin-bottom: 5px; text-align: right;}
.work-card__thumb{
  width: 100%;
  /* aspect-ratio: 4 / 3; */
  /* background: linear-gradient(135deg, #ded4bd, #cbbfa2); */
  pointer-events: none;
  margin-bottom: -10px;
}
.work-card__thumb img{
  width: 240px;
  /* height: 184px; */
  border-radius: 3px;
  margin-bottom: 0;
}
.work-card__credit{ font-size: 11px; color: var(--muted); margin-top: 12px;
margin-bottom: -7px;}
.work-card__link{
  display: inline-flex;
  align-items: center;
  font-size: 11px;
}

.work-card__link img{margin-left: 5px;}

/* ---------- Profile ---------- */
.profile-list{ display: flex; flex-direction: column; gap: 16px; margin-top: 6px; }
.profile-list__row{
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 12px;
  font-size: 13px;
}
.profile-list__row dt{ color: var(--muted); }
.profile-list__row dd{ margin: 0; }
.profile-list__note{ font-size: 11px; color: var(--muted); }

/* ---------- Contact ---------- */
.contact-note{ font-size: 13px; color: var(--muted); }
.contact-form{ display: flex; flex-direction: column; gap: 20px; margin-top: 4px; }
.field-row{ display: flex; gap: 16px; }
.field-row .field{ flex: 1; min-width: 0; }
.field{ display: flex; flex-direction: column; gap: 8px; }
.field label{ font-size: 11px; color: var(--muted); }
.field input,
.field textarea{
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 12px;
  font-size: 13px;
  resize: vertical;
}
.field input:focus,
.field textarea:focus{ outline: 2px solid var(--ink); outline-offset: 1px; }

/* ---------- 右サイドバー(固定 / PCのみ) ---------- */
.credit--desktop{
  position: fixed;
  /* right: clamp(220px, 4vw, 500px); */
  bottom: 70px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  z-index: 10;
}
.copyright--desktop{
  position: fixed;
  right: 24px;
  top: 85%;
  transform: translateY(-50%) rotate(180deg);
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: .05em;
  z-index: 10;
}

/* ---------- モバイル専用フッター(PCでは非表示) ---------- */
.mobile-footer{ display: none; }

/* ==========================================================================
   ハンバーガー / sp-navi(SPのみ表示)
   ========================================================================== */
.hamburger{
  display: none;
  position: fixed;
  top: 28px; right: 28px;
  width: 44px; height: 32px;
  z-index: 210;
}
.hamburger span{
  position: absolute;
  left: 2px; right: 2px;
  height: 2px;
  background: var(--ink);
  transition: transform .4s var(--ease), opacity .3s var(--ease), top .4s var(--ease);
}
.hamburger span:nth-child(1){ top: 6px; }
.hamburger span:nth-child(2){ top: 22px; }

body.nav-open .hamburger span:nth-child(1){ top: 14px; transform: rotate(45deg); }
body.nav-open .hamburger span:nth-child(2){ top: 14px; transform: rotate(-45deg); }

.sp-navi{
  position: fixed;
  inset: 0;
  background: var(--paper);
  z-index: 200;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 100px 40px 48px;
  clip-path: circle(0px at calc(100% - 48px) 44px);
  transition: clip-path .65s var(--ease);
  pointer-events: none;
}
body.nav-open .sp-navi{
  clip-path: circle(150% at calc(100% - 48px) 44px);
  pointer-events: auto;
}

.sp-navi__list{ display: flex; flex-direction: column; gap: 26px; }
.sp-navi__list li{
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .45s var(--ease), transform .45s var(--ease);
}
body.nav-open .sp-navi__list li{
  opacity: 1;
  transform: translateY(0);
  transition-delay: calc(var(--i) * 70ms + 150ms);
}
.sp-navi__list a{ font-size: 22px; }
.sp-navi__list a.is-active{ font-weight: 700; }

.sp-navi__credit{
  /* display: inline-flex;
  align-items: center; */
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  opacity: 0;
  transition: opacity .4s var(--ease);
  transition-delay: 0s;
  text-align: right;
}
body.nav-open .sp-navi__credit{ opacity: 1; transition-delay: 500ms; }

/* ==========================================================================
   レスポンシブ切り替え (SP: 1023px以下)
   ========================================================================== */
@media (max-width: 1023px){

  html, body{ height: 100%; overflow: hidden; } /* .card側だけをスクロール領域にする */
  body{ background: var(--cream); }

  .sidebar--left,
  .credit--desktop,
  .copyright--desktop{ display: none; }

  .hamburger{ display: block; }

  /* PCの「中央カード」を画面いっぱいに広げて、同じ仕組み(1画面=1セクション)を再利用する */
  .stage{
    position: fixed;
    inset: 0;
    min-height: 0;
    padding: 0;
    display: block;
  }

  .card{
    max-width: none;
    width: 100%;
    height: 100vh;
    height: 100dvh; /* アドレスバー等の可変に対応 */
    border-radius: 0;
    background: var(--cream);
    padding: 0 28px;
  }

  .panel{
    min-height: 100vh;
    min-height: 100dvh;
    padding: 96px 0 40px;
  }

  .panel__heading{ font-size: 24px; }

  .works-track{ margin: 0 -28px; padding-left: 28px; padding-right: 28px; }
  .work-card{ width: 72vw; max-width: 300px; }

  .btn--submit{ align-self: stretch; text-align: center; }

  .mobile-footer{
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-top: auto; /* 画面下部に固定表示(Contact画面のみ) */
    padding-top: 40px;
  }
  .mobile-footer .credit{
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
  }
  .copyright--mobile{ font-size: 11px; color: var(--muted); }
}
