/* ========================================
   TSUMUGI STUDIO（ツムギスタジオ）サンプルLP
   濃紺 × 生成り × 茜（あかね）｜和モダン・一本の糸から物語を紡ぐ
   ======================================== */

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

:root {
  --navy: #0c1020;
  --navy-800: #131933;
  --navy-700: #1b2244;
  --navy-600: #262f56;
  --cream: #f4ecd8;
  --cream-dim: #cfc3a3;
  --cream-faint: rgba(244, 236, 216, 0.55);
  --akane: #b7282e;
  --akane-light: #d1613f;
  --akane-deep: #7c1f1f;
  --border-soft: rgba(244, 236, 216, 0.16);
  --serif: "Hiragino Mincho ProN", "YuMincho", "Yu Mincho", "Noto Serif JP", serif;
  --sans: "Hiragino Sans", "Yu Gothic", "Meiryo", sans-serif;
  --en: "Helvetica Neue", Arial, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  color: var(--cream);
  background: var(--navy);
  line-height: 1.9;
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input, textarea { font: inherit; color: inherit; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.container-sm { max-width: 640px; }
.container-wide { max-width: 1280px; }

.section { position: relative; padding: 96px 0; }

/* --- Title box (shared) --- */
.title-box { margin-bottom: 48px; }
.title-box-center { text-align: center; }
.title-box-label {
  display: inline-block;
  font-family: var(--en);
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  color: var(--akane-light);
  font-weight: 700;
  margin-bottom: 14px;
}
.title-box h2 {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 4.4vw, 2.6rem);
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.02em;
}
.works-hint {
  margin-top: 12px;
  font-size: 0.78rem;
  color: var(--cream-dim);
  letter-spacing: 0.04em;
}

/* --- Reveal on scroll (JS 実行時のみ初期非表示。JS無効時はフォールバックで常時表示) --- */
.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s cubic-bezier(0.16, 0.84, 0.44, 1), transform 0.8s cubic-bezier(0.16, 0.84, 0.44, 1);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .js .reveal { transition: none; opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* ========================================
   Side nav（番号付き固定サイドナビ）
   ======================================== */
.side-nav {
  position: fixed;
  top: 50%;
  right: 20px;
  transform: translateY(-50%);
  z-index: 200;
}
.side-nav-list { display: flex; flex-direction: column; gap: 18px; align-items: flex-end; }
.side-nav-list a {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--en);
  transition: opacity 0.25s ease, background 0.25s ease;
  opacity: 0.5;
  background: rgba(12, 16, 32, 0.78); /* backdrop-filter は動く canvas 上で iOS がチラつくため不使用 */
  padding: 6px 14px;
  border-radius: 999px;
}
.side-nav-list a:hover,
.side-nav-list a.is-active { opacity: 1; }
.side-nav-num {
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  color: var(--cream-dim);
  transition: color 0.25s ease;
}
.side-nav-list a.is-active .side-nav-num { color: var(--akane-light); }
.side-nav-label {
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  color: var(--cream-dim);
  writing-mode: horizontal-tb;
}
.side-nav-list a.is-active .side-nav-label { color: var(--cream); }
.side-nav-list a::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--cream-dim);
  transition: background 0.25s ease, transform 0.25s ease;
}
.side-nav-list a.is-active::before {
  background: var(--akane-light);
  transform: scale(1.4);
}

@media (max-width: 767px) {
  .side-nav { right: 6px; }
  .side-nav-label { display: none; }
  .side-nav-list { gap: 12px; }
  .side-nav-list a { padding: 5px 9px; }
  .side-nav-num { font-size: 0.6rem; }
  /* サイドナビ（固定表示）と本文が衝突しないよう右側にセーフエリアを確保
     ※ .hero-content 側の上書きは後方の @media (max-width: 767px) 定義で行う
       （このブロックより後ろにある .hero-content 基本ルールに勝つ必要があるため） */
  .container { padding-right: 68px; }
}

/* ========================================
   01 HERO
   ======================================== */
.hero {
  height: 100vh;
  min-height: 560px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--navy);
}
.hero-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block;
}
.hero-vignette {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, rgba(12,16,32,0.15) 0%, rgba(12,16,32,0.65) 72%, rgba(12,16,32,0.92) 100%);
  pointer-events: none;
  z-index: 1;
}
.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 24px;
  max-width: 900px;
  will-change: transform;
}
.hero-kicker {
  font-family: var(--en);
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  color: var(--akane-light);
  font-weight: 700;
  margin-bottom: 28px;
}
.hero-title {
  font-family: var(--serif);
  font-weight: 700;
  line-height: 1.4;
}
.hero-title-line {
  display: block;
  font-size: clamp(1.9rem, 6vw, 3.6rem);
  letter-spacing: 0.03em;
}
.hero-title-accent {
  font-size: clamp(2.8rem, 9.5vw, 5.6rem);
  color: var(--akane-light);
  margin-top: 6px;
}
.hero-lead {
  margin-top: 32px;
  font-size: 0.98rem;
  color: var(--cream-faint);
  letter-spacing: 0.03em;
  line-height: 2;
}
.hero-scroll {
  position: absolute;
  bottom: 40px; left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.hero-scroll-text {
  font-family: var(--en);
  font-size: 0.66rem;
  letter-spacing: 0.32em;
  color: var(--cream-dim);
}
.hero-scroll-line {
  width: 1px; height: 44px;
  background: linear-gradient(to bottom, var(--akane-light), transparent);
  position: relative;
  overflow: hidden;
}
.hero-scroll-line::after {
  content: "";
  position: absolute; top: -100%; left: 0;
  width: 100%; height: 100%;
  background: var(--cream);
  animation: scroll-drip 2.2s ease-in-out infinite;
}
@keyframes scroll-drip {
  0% { top: -100%; }
  60% { top: 100%; }
  100% { top: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-scroll-line::after { animation: none; display: none; }
}

@media (max-width: 767px) {
  .hero-lead-br { display: none; }
  /* サイドナビ（固定表示）と衝突しないよう右側にセーフエリアを確保 */
  .hero-content { padding-right: 62px; }
}

/* ========================================
   02 ABOUT
   ======================================== */
.about { background: var(--navy); }
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: start;
}
.about-body p { color: var(--cream-faint); margin-bottom: 20px; letter-spacing: 0.02em; }
.about-body p:last-child { margin-bottom: 0; }
.about-numbers {
  margin-top: 64px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  border-top: 1px solid var(--border-soft);
  padding-top: 40px;
}
.about-num { text-align: center; }
.about-num-value {
  display: block;
  font-family: var(--en);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  color: var(--cream);
}
.about-num-plus { color: var(--akane-light); }
.about-num-label {
  display: block;
  margin-top: 8px;
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  color: var(--cream-dim);
}

@media (min-width: 768px) {
  .about-grid { grid-template-columns: 0.9fr 1.1fr; gap: 64px; }
}

/* ========================================
   03 SERVICES
   ======================================== */
.services { background: var(--navy-800); }
.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
.service-card {
  background: var(--navy-700);
  border: 1px solid var(--border-soft);
  border-radius: 4px;
  padding: 36px 28px;
  transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}
.service-card:hover {
  transform: translateY(-8px);
  border-color: var(--akane-deep);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
}
.service-icon {
  width: 48px; height: 48px;
  color: var(--akane-light);
  margin-bottom: 24px;
}
.service-icon svg { width: 100%; height: 100%; }
.service-en {
  font-family: var(--en);
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  color: var(--cream-dim);
  margin-bottom: 6px;
}
.service-card h3 {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 14px;
}
.service-desc { color: var(--cream-faint); font-size: 0.86rem; letter-spacing: 0.02em; }

@media (min-width: 640px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .services-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ========================================
   04 WORKS（横ドラッグスライダー）
   ======================================== */
.works { background: var(--navy); overflow: hidden; position: relative; }
.works::after {
  content: "";
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 96px;
  background: linear-gradient(to right, rgba(12, 16, 32, 0), var(--navy) 92%);
  pointer-events: none;
  z-index: 5;
}
@media (max-width: 767px) {
  .works::after { width: 56px; }
}
.works-track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding: 8px 24px 24px;
  cursor: grab;
  scrollbar-width: thin;
  scrollbar-color: var(--akane-deep) transparent;
  -webkit-overflow-scrolling: touch;
  user-select: none;
}
.works-track.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.works-track::-webkit-scrollbar { height: 6px; }
.works-track::-webkit-scrollbar-thumb { background: var(--akane-deep); border-radius: 3px; }
.works-track::-webkit-scrollbar-track { background: transparent; }

.work-card {
  flex: 0 0 auto;
  width: 78vw;
  max-width: 340px;
  scroll-snap-align: start;
  background: var(--navy-700);
  border: 1px solid var(--border-soft);
  border-radius: 4px;
  overflow: hidden;
}
.work-thumb {
  position: relative;
  aspect-ratio: 10 / 7;
  background: linear-gradient(135deg, var(--navy-600) 0%, var(--akane-deep) 100%);
}
.work-thumb-02 { background: linear-gradient(135deg, var(--akane-deep) 0%, var(--navy-600) 100%); }
.work-thumb-03 { background: linear-gradient(135deg, var(--navy-700) 0%, var(--navy-600) 60%, var(--akane-deep) 100%); }
.work-thumb-04 { background: linear-gradient(135deg, var(--akane-deep) 0%, var(--navy-700) 70%); }
.work-thumb-05 { background: linear-gradient(135deg, var(--navy-600) 0%, var(--navy-700) 50%, var(--akane-deep) 100%); }
.work-thumb-06 { background: linear-gradient(135deg, var(--akane-deep) 0%, var(--navy-600) 40%, var(--navy-700) 100%); }
.work-pattern { position: absolute; inset: 0; width: 100%; height: 100%; }
.photo-label {
  position: absolute; bottom: 8px; right: 8px;
  font-size: 0.6rem;
  letter-spacing: 0.04em;
  background: rgba(12, 16, 32, 0.6);
  color: var(--cream-faint);
  padding: 3px 8px;
  border-radius: 2px;
  pointer-events: none;
}
.work-body { padding: 22px 24px 26px; }
.work-tag {
  display: inline-block;
  font-family: var(--en);
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  color: var(--akane-light);
  margin-bottom: 10px;
}
.work-body h3 { font-family: var(--serif); font-size: 1.05rem; font-weight: 700; margin-bottom: 8px; }
.work-body p { font-size: 0.82rem; color: var(--cream-dim); }

@media (min-width: 768px) {
  .work-card { width: 40vw; }
}
@media (min-width: 1024px) {
  .work-card { width: 320px; }
}

/* ========================================
   05 PROCESS
   ======================================== */
.process { background: var(--navy-800); }
.process-steps { position: relative; }
.process-step {
  position: relative;
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 20px;
  padding-bottom: 48px;
}
.process-step:last-child { padding-bottom: 0; }
.process-step::before {
  content: "";
  position: absolute;
  left: 27px; top: 56px; bottom: 0;
  width: 1px;
  background: var(--border-soft);
}
.process-step:last-child::before { display: none; }
.process-num {
  font-family: var(--en);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--navy);
  background: var(--akane-light);
  width: 56px; height: 56px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  z-index: 1;
}
.process-body h3 { font-family: var(--serif); font-size: 1.2rem; font-weight: 700; margin-bottom: 8px; padding-top: 12px; }
.process-body p { color: var(--cream-faint); font-size: 0.86rem; }

@media (min-width: 768px) {
  .process-step { grid-template-columns: 72px 1fr; gap: 32px; }
  .process-num { width: 72px; height: 72px; font-size: 1.1rem; }
  .process-step::before { left: 35px; top: 72px; }
}

/* ========================================
   06 NEWS
   ======================================== */
.news { background: var(--navy); }
.news-list { border-top: 1px solid var(--border-soft); }
.news-item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 14px;
  padding: 22px 4px;
  border-bottom: 1px solid var(--border-soft);
}
.news-date { font-family: var(--en); font-size: 0.82rem; color: var(--cream-dim); letter-spacing: 0.03em; }
.news-badge {
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  color: var(--akane-light);
  border: 1px solid var(--akane-deep);
  padding: 2px 8px;
  border-radius: 2px;
}
.news-text { flex: 1 1 100%; font-size: 0.92rem; color: var(--cream); }

@media (min-width: 640px) {
  .news-text { flex: 1 1 auto; }
}

/* ========================================
   07 FAQ
   ======================================== */
.faq { background: var(--navy-800); }
.faq-list { border-top: 1px solid var(--border-soft); }
.faq-item { border-bottom: 1px solid var(--border-soft); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-question {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 22px 4px;
  cursor: pointer;
  font-size: 0.94rem;
  color: var(--cream);
  position: relative;
}
.faq-q-mark {
  font-family: var(--en);
  font-weight: 700;
  color: var(--akane-light);
  flex-shrink: 0;
}
.faq-icon { margin-left: auto; position: relative; width: 16px; height: 16px; flex-shrink: 0; }
.faq-icon::before, .faq-icon::after {
  content: "";
  position: absolute;
  background: var(--cream-dim);
  transition: transform 0.3s ease;
}
.faq-icon::before { left: 0; top: 7px; width: 16px; height: 1px; }
.faq-icon::after { left: 7px; top: 0; width: 1px; height: 16px; }
.faq-item.is-open .faq-icon::after { transform: rotate(90deg); opacity: 0; }
.faq-answer-wrap { height: 0; overflow: hidden; transition: height 0.35s ease; }
/* 開状態の保持は is-open が担う(インライン height 撤去後に 0 へ潰れるバグの根治・2026-07-08) */
.faq-item.is-open .faq-answer-wrap { height: auto; }
.faq-answer {
  display: flex;
  gap: 14px;
  padding: 0 4px 24px 4px;
  font-size: 0.86rem;
  color: var(--cream-faint);
}
.faq-a-mark { font-family: var(--en); font-weight: 700; color: var(--akane-deep); flex-shrink: 0; }

/* ========================================
   08 CONTACT
   ======================================== */
.contact { background: var(--navy); }
.contact-form { display: flex; flex-direction: column; gap: 22px; }
.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-group label { font-size: 0.8rem; letter-spacing: 0.04em; color: var(--cream-dim); }
.req { color: var(--akane-light); font-size: 0.68rem; }
.form-group input,
.form-group textarea {
  background: var(--navy-700);
  border: 1px solid var(--border-soft);
  border-radius: 3px;
  padding: 13px 16px;
  transition: border-color 0.25s ease;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--akane-light);
}
.form-group textarea { resize: vertical; min-height: 120px; }
.btn-submit {
  margin-top: 8px;
  background: var(--akane);
  color: var(--cream);
  padding: 16px;
  font-size: 0.92rem;
  letter-spacing: 0.08em;
  font-weight: 700;
  border-radius: 3px;
  transition: background 0.25s ease, transform 0.25s ease;
}
.btn-submit:hover { background: var(--akane-light); transform: translateY(-2px); }
.form-note {
  text-align: center;
  font-size: 0.78rem;
  color: var(--cream-dim);
  min-height: 1.2em;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.form-note.is-visible { opacity: 1; }

/* ========================================
   09 FOOTER
   ======================================== */
.footer { background: var(--navy-800); padding: 64px 0 32px; border-top: 1px solid var(--border-soft); }
.footer-top {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border-soft);
}
.footer-logo { font-family: var(--en); font-size: 1.1rem; font-weight: 700; letter-spacing: 0.08em; }
.footer-sub { margin-top: 8px; font-size: 0.8rem; color: var(--cream-dim); }
.footer-address { margin-top: 12px; font-size: 0.76rem; color: var(--cream-dim); }
.footer-nav { display: flex; flex-wrap: wrap; gap: 20px; }
.footer-nav a { font-size: 0.76rem; letter-spacing: 0.08em; color: var(--cream-dim); transition: color 0.2s ease; }
.footer-nav a:hover { color: var(--cream); }
.footer-bottom { padding-top: 28px; display: flex; flex-direction: column; gap: 8px; }
.footer-bottom p { font-size: 0.72rem; color: var(--cream-dim); }
.footer-credit { color: var(--cream-faint) !important; }
.footer-notice { color: var(--cream-dim); }

@media (min-width: 768px) {
  .footer-top { flex-direction: row; justify-content: space-between; align-items: flex-end; }
}

/* ========================================
   Responsive: 375px を一級市民に
   ======================================== */
@media (max-width: 480px) {
  .section { padding: 72px 0; }
  .container { padding: 0 68px 0 20px; }
  .about-numbers { grid-template-columns: 1fr; gap: 28px; }
  .process-step { grid-template-columns: 44px 1fr; gap: 16px; }
  .process-num { width: 44px; height: 44px; font-size: 0.8rem; }
  .process-step::before { left: 21px; top: 44px; }
}
