/* =========================================================
   LP制作ポートフォリオ — hitsuji works
   配色：単色（ネイビー）＋1アクセント（ブロンズ）／脱AI感ルール準拠
   ========================================================= */

:root {
  --navy:      #131a2e;   /* ベース（濃紺） */
  --navy-deep: #0d1322;   /* さらに沈めた紺（コントラスト用） */
  --ink:       #1c2233;   /* 紙面のテキスト */
  --paper:     #f6f3ec;   /* 温かみのあるオフホワイト（純白を避ける） */
  --paper-2:   #efeae0;   /* 面の差し替え用 */
  --line:      #d9d3c6;   /* 紙面のヘアライン */
  --line-dk:   rgba(246,243,236,.16); /* 濃紺面のヘアライン */
  --muted:     #6c7180;   /* 補助テキスト */
  --muted-lt:  rgba(246,243,236,.62); /* 濃紺面の補助テキスト */
  --accent:    #c08a4e;   /* 唯一のアクセント（ブロンズ） */
  --accent-dk: #a9743b;

  --maxw: 1180px;
  --gut: clamp(22px, 5vw, 80px);

  --ff-jp: "Zen Kaku Gothic New", system-ui, sans-serif;
  --ff-en: "Space Grotesk", "Zen Kaku Gothic New", sans-serif;

  --ease: cubic-bezier(.22, .61, .36, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--ff-jp);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.85;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
em { font-style: normal; }

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

/* ---------- reveal（スクロール表示・上品なフェード） ----------
   隠すのは .js（JS有効）のときだけ。JSが無効/失敗なら中身は最初から見える。 */
.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
  will-change: opacity, transform;
}
.js .reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .05s; }
.reveal.d2 { transition-delay: .15s; }
.reveal.d3 { transition-delay: .28s; }
.reveal.d4 { transition-delay: .42s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .work-shot, .btn-primary svg { transition: none !important; }
}

/* =========================================================
   NAV
   ========================================================= */
#nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px var(--gut);
  transition: background .5s var(--ease), padding .5s var(--ease), box-shadow .5s var(--ease);
}
#nav.scrolled {
  background: rgba(19, 26, 46, .92);
  backdrop-filter: blur(10px);
  padding-top: 14px;
  padding-bottom: 14px;
  box-shadow: 0 1px 0 var(--line-dk);
}

.nav-logo { display: flex; align-items: center; gap: 11px; color: var(--paper); }
.nav-logo-mark {
  font-family: var(--ff-en);
  font-weight: 600;
  font-size: 19px;
  color: var(--navy);
  background: var(--accent);
  width: 30px; height: 30px;
  display: grid; place-items: center;
  letter-spacing: -.04em;
}
.nav-logo-text { font-family: var(--ff-en); font-weight: 500; letter-spacing: .04em; font-size: 15px; }

.nav-links { display: flex; gap: 30px; }
.nav-links a {
  color: var(--muted-lt);
  font-size: 14px;
  letter-spacing: .03em;
  position: relative;
  transition: color .35s var(--ease);
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -5px;
  width: 100%; height: 1px; background: var(--accent);
  transform: scaleX(0); transform-origin: left; transition: transform .4s var(--ease);
}
.nav-links a:hover { color: var(--paper); }
.nav-links a:hover::after { transform: scaleX(1); }

.nav-cta {
  color: var(--paper);
  font-size: 14px;
  letter-spacing: .03em;
  padding: 10px 22px;
  border: 1px solid var(--accent);
  transition: background .4s var(--ease), color .4s var(--ease);
}
.nav-cta:hover { background: var(--accent); color: var(--navy); }

/* =========================================================
   HERO
   ========================================================= */
#hero {
  position: relative;
  background: var(--navy);
  color: var(--paper);
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 160px var(--gut) 120px;
  overflow: hidden;
}
/* 微細なノイズ（フラットな質感を消す。グラデは使わない） */
.hero-grain, .contact-grain {
  position: absolute; inset: 0; pointer-events: none; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
/* 右上に1本だけ走るアクセントのヘアライン（非対称の差し色） */
#hero::after {
  content: ""; position: absolute; top: 0; right: 18%;
  width: 1px; height: 46%;
  background: linear-gradient(var(--accent), transparent);
  opacity: .5;
}

.hero-inner { position: relative; max-width: var(--maxw); width: 100%; margin: 0 auto; }

.hero-eyebrow {
  font-family: var(--ff-en);
  font-size: 13px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--accent);
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 34px;
}
.eyebrow-line { width: 54px; height: 1px; background: var(--accent); opacity: .6; }

.hero-title {
  font-weight: 900;
  font-size: clamp(2.3rem, 6.6vw, 5rem);
  line-height: 1.2;
  letter-spacing: -.01em;
}
.hero-title span { display: block; }
.hero-title em {
  color: var(--accent);
  position: relative;
}
.hero-title em::after {
  content: ""; position: absolute; left: 0; bottom: .08em;
  width: 100%; height: .09em; background: var(--accent); opacity: .3;
}

.hero-sub {
  margin-top: 34px;
  max-width: 44em;
  color: var(--muted-lt);
  font-size: clamp(.95rem, 1.4vw, 1.08rem);
  line-height: 2;
}

.hero-actions { margin-top: 48px; display: flex; flex-wrap: wrap; gap: 16px 26px; align-items: center; }

.btn-primary {
  display: inline-flex; align-items: center; gap: 12px;
  background: var(--accent);
  color: var(--navy);
  font-weight: 700;
  font-size: 15px;
  padding: 16px 30px;
  transition: background .4s var(--ease);
}
.btn-primary svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .4s var(--ease); }
.btn-primary:hover { background: #d49a5b; }
.btn-primary:hover svg { transform: translateX(5px); }
.btn-primary.large { padding: 19px 40px; font-size: 16px; }

.btn-ghost {
  font-size: 15px; color: var(--paper);
  padding: 16px 4px;
  border-bottom: 1px solid var(--line-dk);
  transition: border-color .4s var(--ease), color .4s var(--ease);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.hero-scroll {
  position: absolute; left: var(--gut); bottom: 38px;
  display: flex; align-items: center; gap: 14px;
  font-family: var(--ff-en); font-size: 12px; letter-spacing: .18em;
  text-transform: uppercase; color: var(--muted-lt);
}
.scroll-bar { width: 50px; height: 1px; background: var(--muted-lt); position: relative; overflow: hidden; }
.scroll-bar::after {
  content: ""; position: absolute; inset: 0; width: 40%;
  background: var(--accent);
  animation: scrollSlide 2.2s var(--ease) infinite;
}
@keyframes scrollSlide { 0% { transform: translateX(-120%); } 100% { transform: translateX(280%); } }

/* =========================================================
   共通：セクション見出し
   ========================================================= */
section { padding: clamp(80px, 11vw, 150px) var(--gut); }

.section-head { max-width: var(--maxw); margin: 0 auto clamp(48px, 6vw, 80px); }
.section-label {
  font-family: var(--ff-en);
  font-size: 13px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
  display: flex; align-items: center; gap: 14px;
}
.section-label::before { content: ""; width: 30px; height: 1px; background: var(--accent); }
.section-label.light { color: var(--accent); }

.section-title {
  font-weight: 900;
  font-size: clamp(1.7rem, 4vw, 3rem);
  line-height: 1.32;
  letter-spacing: -.01em;
  word-break: keep-all;        /* 和文を文節（読点）単位で折り返し、語末1文字落ちを防ぐ */
  overflow-wrap: anywhere;     /* 文節が長すぎてもはみ出さない保険 */
}
.section-lead { margin-top: 22px; max-width: 40em; color: var(--muted); font-size: 1rem; }

/* =========================================================
   WORKS
   ========================================================= */
#works { background: var(--paper); }

.work-grid {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(26px, 3vw, 44px) clamp(22px, 2.5vw, 36px);
}
/* 非対称：先頭カードだけ大きく */
.work-card:first-child { grid-column: span 2; }
.work-card:first-child .work-window { height: clamp(300px, 38vw, 470px); }

.work-card { cursor: default; }

.work-window {
  position: relative;
  height: clamp(280px, 30vw, 360px);
  overflow: hidden;
  background: var(--paper-2);
  border: 1px solid var(--line);
}
.work-shot {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center top;
  transition: background-position 5s var(--ease);
}
/* ホバーで縦長スクショ全体をゆっくり“スクロール”して見せる（目的のある動き） */
.work-card:hover .work-shot { background-position: center bottom; }
/* 黒基調のLP（Mugen等）は上端が真っ黒なので、明るい中段を初期表示にする */
.work-shot.pos-mid { background-position: center 58%; }

.work-view {
  position: absolute; left: 16px; bottom: 16px;
  font-size: 12px; letter-spacing: .04em;
  color: var(--navy); background: var(--paper);
  padding: 7px 14px;
  opacity: 0; transform: translateY(8px);
  transition: opacity .4s var(--ease), transform .4s var(--ease);
}
.work-card:hover .work-view { opacity: 1; transform: none; }

.work-meta { display: flex; gap: 16px; align-items: baseline; margin-top: 20px; }
.work-num {
  font-family: var(--ff-en); font-size: 13px; color: var(--accent);
  letter-spacing: .05em; padding-top: 4px;
}
.work-meta h3 { font-size: 1.18rem; font-weight: 700; letter-spacing: .01em; }
.work-meta p { font-size: .86rem; color: var(--muted); margin-top: 2px; }

/* =========================================================
   FEATURES
   ========================================================= */
#features { background: var(--paper-2); }

.feature-list { max-width: var(--maxw); margin: 0 auto; }
.feature-row {
  display: grid;
  grid-template-columns: 78px 64px 1fr;
  gap: 28px;
  align-items: start;
  padding: clamp(38px, 4.5vw, 56px) 0;
  border-top: 1px solid var(--line);
}
.feature-row:last-child { border-bottom: 1px solid var(--line); }
.feature-index {
  font-family: var(--ff-en); font-size: 1rem; color: var(--accent);
  letter-spacing: .04em; padding-top: 8px;
}
.feature-icon { color: var(--navy); }
.feature-icon svg { width: 48px; height: 48px; }
.feature-body h3 { font-size: clamp(1.15rem, 2vw, 1.5rem); font-weight: 700; line-height: 1.5; margin-bottom: 14px; }
.feature-body p { color: var(--ink); opacity: .82; max-width: 46em; }

/* =========================================================
   PROMISE
   ========================================================= */
#promise { background: var(--navy); color: var(--paper); }
.promise-inner { max-width: var(--maxw); margin: 0 auto; }
#promise .section-title { color: var(--paper); }
#promise .section-lead { color: var(--muted-lt); }

.promise-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line-dk);
  border: 1px solid var(--line-dk);
}
.promise-card {
  background: var(--navy);
  padding: clamp(34px, 4vw, 50px) clamp(26px, 3vw, 40px);
}
.promise-icon { color: var(--accent); margin-bottom: 26px; }
.promise-icon svg { width: 46px; height: 46px; }
.promise-num {
  font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; line-height: 1.1;
  letter-spacing: .01em;
}
.promise-num strong {
  font-family: var(--ff-en); font-weight: 600;
  font-size: clamp(2.6rem, 6vw, 4rem);
  color: var(--accent);
  margin: 0 .06em;
  vertical-align: -.04em;
}
.promise-card h3 { font-size: 1.05rem; font-weight: 500; color: var(--muted-lt); margin-top: 4px; margin-bottom: 20px; }
.promise-text { font-size: .92rem; color: var(--muted-lt); line-height: 1.95; }

/* =========================================================
   FLOW
   ========================================================= */
#flow { background: var(--paper); }
.flow-list {
  max-width: var(--maxw); margin: 0 auto;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(20px, 2.5vw, 36px);
}
.flow-step { position: relative; padding-top: 34px; }
.flow-step::before {
  content: ""; position: absolute; top: 0; left: 0;
  width: 100%; height: 1px; background: var(--line);
}
.flow-step::after {
  content: ""; position: absolute; top: -3px; left: 0;
  width: 36px; height: 5px; background: var(--accent);
}
.flow-num {
  font-family: var(--ff-en); font-size: 13px; color: var(--accent);
  letter-spacing: .05em;
}
.flow-step h3 { font-size: 1.15rem; font-weight: 700; line-height: 1.45; margin: 14px 0 12px; }
.flow-step p { font-size: .9rem; color: var(--muted); line-height: 1.9; }

/* =========================================================
   CONTACT
   ========================================================= */
#contact { position: relative; background: var(--navy-deep); color: var(--paper); text-align: center; overflow: hidden; }
#contact::after {
  content: ""; position: absolute; left: 50%; top: 0;
  width: 1px; height: 64px; background: var(--accent); transform: translateX(-50%);
}
.contact-inner { position: relative; max-width: 760px; margin: 0 auto; }
#contact .section-label { justify-content: center; }
#contact .section-label::before { display: none; }
.contact-title {
  font-weight: 900;
  font-size: clamp(1.7rem, 4.4vw, 3rem);
  line-height: 1.42;
  margin-bottom: 26px;
}
.contact-title em { color: var(--accent); }
.contact-lead { color: var(--muted-lt); margin: 0 auto 44px; max-width: 34em; }

/* ---------- 埋め込みフォーム（Formspree） ---------- */
.contact-form { max-width: 540px; margin: 0 auto; text-align: left; }
.field { margin-bottom: 22px; }
.field label {
  display: block;
  font-size: 13px; letter-spacing: .05em;
  color: var(--muted-lt);
  margin-bottom: 9px;
}
.field input,
.field textarea {
  width: 100%;
  background: rgba(246, 243, 236, .04);
  border: 1px solid var(--line-dk);
  color: var(--paper);
  font-family: var(--ff-jp);
  font-size: 15px; line-height: 1.7;
  padding: 13px 15px;
  transition: border-color .35s var(--ease), background .35s var(--ease);
}
.field textarea { resize: vertical; min-height: 132px; }
.field input::placeholder,
.field textarea::placeholder { color: rgba(246, 243, 236, .3); }
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(246, 243, 236, .07);
}

.contact-form .btn-primary {
  margin-top: 6px;
  border: none;
  cursor: pointer;
  font-family: var(--ff-jp);
}

/* スパムよけの隠しフィールド */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.form-status {
  margin-top: 20px;
  font-size: 14px;
  min-height: 1.3em;
  color: var(--muted-lt);
}
.form-status.ok  { color: var(--accent); }
.form-status.err { color: #e29384; }

/* =========================================================
   FOOTER
   ========================================================= */
footer { background: var(--navy-deep); color: var(--muted-lt); padding: 38px var(--gut); border-top: 1px solid var(--line-dk); }
.footer-inner {
  max-width: var(--maxw); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
}
.footer-logo { display: flex; align-items: center; gap: 11px; color: var(--paper); font-family: var(--ff-en); font-size: 15px; letter-spacing: .04em; }
.footer-copy { font-size: 13px; letter-spacing: .03em; }

/* =========================================================
   レスポンシブ
   ========================================================= */
.pc-only { display: inline; }

@media (max-width: 920px) {
  .nav-links { display: none; }
  .work-grid { grid-template-columns: repeat(2, 1fr); }
  .work-card:first-child { grid-column: span 2; }
  .flow-list { grid-template-columns: repeat(2, 1fr); gap: 36px 24px; }
}

@media (max-width: 600px) {
  .pc-only { display: none; }

  #nav { padding: 14px var(--gut); gap: 12px; }
  .nav-cta { padding: 9px 15px; font-size: 12.5px; white-space: nowrap; }
  .nav-logo { gap: 9px; }
  .nav-logo-mark { width: 27px; height: 27px; font-size: 17px; }
  .nav-logo-text { font-size: 13px; }

  #hero { padding: 130px var(--gut) 110px; min-height: auto; }
  .hero-scroll { display: none; }

  .work-grid { grid-template-columns: 1fr; }
  .work-card:first-child { grid-column: span 1; }
  .work-card:first-child .work-window { height: clamp(260px, 70vw, 360px); }
  .work-window { height: clamp(240px, 64vw, 340px); }

  .feature-row { grid-template-columns: 1fr; gap: 14px; }
  .feature-index { padding-top: 0; }
  .feature-icon svg { width: 42px; height: 42px; }

  .promise-grid { grid-template-columns: 1fr; }

  .flow-list { grid-template-columns: 1fr; gap: 30px; }
}
