/* 季風HP 別デザインの検証。値はデザインシステム「季風 ロゴの土台」と同じ */
:root {
  --kifu-navy: #0d2b51;
  --kifu-teal: #48a8ab;
  --kifu-teal-text: #1d7f83;
  --kifu-rule: #6c7175;
  --paper: #ffffff;
  --kifu-wash: #eef2f7;
  --on-navy: #ffffff;
  --font-brand: Montserrat, "Noto Sans JP", "Hiragino Kaku Gothic ProN", sans-serif;
  --space-1: 8px; --space-2: 16px; --space-3: 32px; --space-4: 64px; --space-5: 120px;
  --radius-sm: 2px; --radius-pill: 999px;
  --margin: clamp(20px, 5vw, 64px);
  --h2: 36px;
  /* 動きの曲線:Emil Kowalski の基準(現れる・消える=ease-out、画面内の移動=ease-in-out。ease-in は使わない) */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --shape-0: 46% 54% 40% 60% / 55% 42% 58% 45%;
  --shape-1: 58% 42% 55% 45% / 45% 58% 42% 55%;
  --shape-2: 50% 50% 38% 62% / 60% 40% 60% 40%;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--kifu-navy);
  font-family: var(--font-brand); font-size: 16px; line-height: 1.9; letter-spacing: 0.02em;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--kifu-teal-text); outline-offset: 3px; }
::selection { background: var(--kifu-teal); color: var(--kifu-navy); }
h1, h2, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
h1, h2 { word-break: auto-phrase; text-wrap: balance; }
p { word-break: auto-phrase; }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--margin); }
.center { text-align: center; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 20; background: var(--paper); padding: 8px 16px; }

/* ボタン:写真の丸い形に合わせて丸く */
.btn {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 28px;
  background: var(--kifu-navy); color: var(--on-navy); text-decoration: none;
  font-size: 15px; font-weight: 700; border-radius: var(--radius-pill);
  transition: background-color .2s ease, transform 160ms var(--ease-out);
}
.btn:hover { background: var(--kifu-teal-text); }
.btn:active { transform: scale(0.97); }

/* 写真の形(丸いいびつな形を3つ順に) */
.shape-0 { border-radius: var(--shape-0); }
.shape-1 { border-radius: var(--shape-1); }
.shape-2 { border-radius: var(--shape-2); }

/* ---------- ヘッダー ---------- */
.site-header { position: sticky; top: 0; z-index: 10; background: var(--paper); }
.header-in { display: flex; align-items: center; justify-content: space-between; height: 88px; }
.logo img { height: 48px; width: auto; }
.gnav { display: flex; align-items: center; gap: 32px; font-size: 14px; }
.gnav a { text-decoration: none; padding: 12px 0; }
.gnav a:hover { color: var(--kifu-teal-text); }
.gnav .gnav-contact { padding: 10px 22px; background: var(--kifu-navy); color: var(--on-navy); border-radius: var(--radius-pill); font-weight: 700; }
.gnav .gnav-contact:hover { background: var(--kifu-teal-text); color: var(--on-navy); }
.menu-btn { display: none; }

/* ---------- 最初の画面 ---------- */
.fv {
  --u: min(1.05px, calc(100vw / 1280));
  --low: 0px;
  --copy-top: calc(232 * var(--u));
  position: relative;
  height: calc(700 * var(--u) + var(--low) + 24px);
  overflow: hidden;
}
.fv-band { position: absolute; inset: 0; }
.fv-track {
  position: absolute; left: 0; top: 0; height: 100%;
  width: calc(4960 * var(--u));
  animation: fv-flow 130s linear infinite;
}
.fv-track:has(.fv-tile:hover), .fv-track:has(:focus-visible) { animation-play-state: paused; }
@keyframes fv-flow { from { transform: translateX(0); } to { transform: translateX(calc(-2480 * var(--u))); } }
.fv-tile {
  position: absolute; overflow: hidden;
  left: calc(var(--x) * var(--u)); top: calc(var(--y) * var(--u));
  width: calc(var(--w) * var(--u)); height: calc(var(--h) * var(--u));
}
.fv-tile.is-low { top: calc(var(--y) * var(--u) + var(--low)); }
.fv-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform 400ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .fv-tile:hover img { transform: scale(1.04); } }
.fv-copy {
  position: absolute; left: var(--margin); right: var(--margin); top: var(--copy-top);
  display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center;
}
.fv-copy h1 { font-size: clamp(28px, 4.4vw, 64px); line-height: 1.45; font-weight: 700; letter-spacing: 0.03em; }
.fv-copy p { font-size: 16px; line-height: 1.8; max-width: 40em; word-break: auto-phrase; text-wrap: pretty; }

/* ---------- 理念(言葉だけ。風が吹き抜けた後に現れる) ---------- */
.about {
  position: relative; overflow: hidden;
  min-height: 100svh; display: grid; align-items: center;
  padding: var(--space-5) 0;
}
.about-wash {
  position: absolute; left: -48px; right: -48px; top: -12%; bottom: -12%;
  background: url("../img/watercolor-wind-x2.webp") center / cover no-repeat;
  will-change: transform;
}
.about-in {
  position: relative; max-width: 880px;
  display: flex; flex-direction: column; align-items: center; gap: 32px; text-align: center;
}
.about h2 { font-size: 40px; line-height: 1.5; margin-bottom: 8px; }
.about-lead { font-weight: 700; max-width: 34em; }
.about-in p { font-size: 16px; line-height: 2.1; max-width: 40em; }
.about-in .about-lead { font-size: 22px; line-height: 2; }
.about-in p:last-child { margin-top: 16px; }

/* 理念:背景の水彩が先に浮かび、続いて見出し→文章→ボタンが順に浮かび上がる(JSが有効なときだけ隠す) */
.js .about-wash { opacity: 0; scale: 1.04; transition: opacity 900ms var(--ease-out), scale 1200ms var(--ease-out); }
.about.is-blown .about-wash { opacity: 1; scale: 1; }
.js .about-item { opacity: 0; transform: translateY(12px); filter: blur(6px); transition: opacity 700ms var(--ease-out), transform 800ms var(--ease-out), filter 700ms var(--ease-out); }
.about.is-blown .about-item { opacity: 1; transform: none; filter: none; }
.about.is-blown .about-item:nth-child(1) { transition-delay: 350ms; }
.about.is-blown .about-item:nth-child(2) { transition-delay: 430ms; }
.about.is-blown .about-item:nth-child(3) { transition-delay: 510ms; }
.about.is-blown .about-item:nth-child(4) { transition-delay: 590ms; }

/* ---------- ページ全体の背景(見比べ用 bg-a.html / bg-b.html) ---------- */
.page-wind { display: none; }
.bg-a .about-wash, .bg-b .about-wash { display: none; }
/* A:水彩を画面の後ろに固定し、スクロールに合わせて左へゆっくりずらす */
.bg-a .page-wind {
  display: block; position: fixed; top: 0; left: 0; width: 140vw; height: 100vh; z-index: -1;
  background: url("../img/watercolor-wind-x2.webp") center / cover no-repeat;
  will-change: transform;
}
/* B:1本の風が、ページの上から下まで後ろを流れる(ページと一緒に動く) */
.bg-b { position: relative; }
.bg-b .page-wind {
  display: block; position: absolute; inset: 0; z-index: -1;
  background: url("../img/wind-path-v2.webp") top center / 100% 100% no-repeat;
  /* 風らしく:ゆっくり左右に揺れる(画面内の往復なので ease-in-out)。スクロールのひと吹きは main.js が transform で足す */
  animation: wind-sway 9s var(--ease-in-out) infinite alternate;
}
@keyframes wind-sway { from { translate: 1.6vw 0; } to { translate: -1.6vw 0; } }

/* C:細い線の軌跡で風が流れる(wind.js が canvas を画面の後ろに固定して描く) */
.bg-c .about-wash { display: none; }
.wind-canvas { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: -1; pointer-events: none; }

/* D:途切れた・横向きの・かすれた風の筋が、ページのあちこちで右から左へ流れる(2026-11-20) */
.bg-d { position: relative; }
.bg-d .about-wash { display: none; }
.bg-d .page-wind { display: block; position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.page-wind-in { position: absolute; inset: 0; will-change: transform; }
.wisp {
  position: absolute; top: var(--t); left: var(--l); width: var(--w); aspect-ratio: var(--ar);
  background: center / 100% 100% no-repeat;
  opacity: 0;
  /* 一定の速さで流れ続ける動きは linear(Emil Kowalski の基準) */
  animation: wisp var(--dur) linear var(--delay) infinite;
}
.wisp.is-flip { scale: 1 -1; }
@keyframes wisp {
  0% { transform: translateX(12vw); opacity: 0; }
  12% { opacity: .6; }
  82% { opacity: .6; }
  100% { transform: translateX(-12vw); opacity: 0; }
}

/* ---------- 事業紹介(5つを一目で) ---------- */
.biz { padding: var(--space-5) 0; }
.biz h2 { font-size: var(--h2); line-height: 1.4; margin-bottom: var(--space-4); }
.biz-list { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 28px; margin-bottom: var(--space-4); }
/* 風の通り道:5枚を1つのゆるい波の上に置く(ジグザグにしない) */
.biz-item:nth-child(1) { margin-top: 0; }
.biz-item:nth-child(2) { margin-top: 52px; }
.biz-item:nth-child(3) { margin-top: 88px; }
.biz-item:nth-child(4) { margin-top: 64px; }
.biz-item:nth-child(5) { margin-top: 12px; }
.biz-item a { display: flex; flex-direction: column; gap: 8px; text-decoration: none; }
.biz-photo { display: block; overflow: hidden; aspect-ratio: 1 / 1; margin-bottom: 8px; }
.biz-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 400ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .biz-item a:hover img { transform: scale(1.04); } }
.biz-name { font-size: 18px; font-weight: 700; line-height: 1.5; }
.biz-more { font-size: 14px; color: var(--kifu-teal-text); font-weight: 700; }

/* ---------- お知らせ ---------- */
.news { padding: var(--space-4) 0 var(--space-5); }
.news-in { display: grid; grid-template-columns: 3fr 8fr; gap: 56px; }
.news h2 { font-size: var(--h2); line-height: 1.4; }
.news-body { display: flex; flex-direction: column; gap: 32px; }
.news-list { display: flex; flex-direction: column; gap: 8px; }
.news-list a {
  display: grid; grid-template-columns: 9em 1fr; gap: 4px 24px; padding: 18px 24px;
  background: var(--kifu-wash); text-decoration: none; border-radius: var(--radius-pill);
  transition: background-color .2s ease;
}
.news-list a:hover { background: #e2e9f1; }
.news-list time { font-size: 14px; color: var(--kifu-navy); font-family: Montserrat, sans-serif; }

/* ---------- フッター ---------- */
.site-footer { background: var(--kifu-navy); color: var(--on-navy); padding: 72px 0 32px; }
.footer-in { display: grid; grid-template-columns: 6fr 3fr 3fr; gap: 48px; }
.footer-logo { width: 180px; filter: brightness(0) invert(1); margin-bottom: 20px; }
.footer-co p { font-size: 14px; line-height: 1.9; }
.footer-nav { display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.footer-nav a { text-decoration: none; padding: 6px 0; }
.footer-nav a:hover { color: var(--kifu-teal); }
.footer-head { font-weight: 700; margin-bottom: 8px; }
.copy { margin-top: 56px; font-size: 13px; }

/* ---------- 登場の動き(JSが有効なときだけ) ---------- */
/* ページ全体の登場(Emil Kowalski の作法):ぼかし6px→焦点、12px上がる、ease-out、80ms刻みで順に */
.js .reveal {
  opacity: 0; transform: translateY(12px); filter: blur(6px);
  transition: opacity 700ms var(--ease-out), transform 800ms var(--ease-out), filter 700ms var(--ease-out);
}
.js .reveal.drift { transform: translateX(16px); }
.js .reveal.is-in { opacity: 1; transform: none; filter: none; }

/* 最初の画面:読み込んだとき、写真が左から順に、続いて見出し→説明文が現れる */
.js .fv-tile { opacity: 0; transform: scale(.96); transition: opacity 900ms var(--ease-out), transform 1000ms var(--ease-out); transition-delay: calc(min(var(--i), 12) * 40ms); }
.js .fv.is-ready .fv-tile { opacity: 1; transform: none; }
.js .fv-in { opacity: 0; transform: translateY(12px); filter: blur(6px); transition: opacity 800ms var(--ease-out), transform 900ms var(--ease-out), filter 800ms var(--ease-out); }
.js .fv.is-ready h1.fv-in { opacity: 1; transform: none; filter: none; transition-delay: 250ms; }
.js .fv.is-ready p.fv-in { opacity: 1; transform: none; filter: none; transition-delay: 330ms; }

/* ---------- タブレット・スマホ ---------- */
@media (max-width: 900px) {
  :root { --h2: 24px; }
  .header-in { height: 68px; }
  .logo img { height: 40px; }
  .menu-btn {
    display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px;
    border: 0; border-radius: var(--radius-pill); background: var(--kifu-navy); color: var(--on-navy);
    font: inherit; font-size: 14px; font-weight: 700;
  }
  .gnav {
    display: none; position: absolute; left: 0; right: 0; top: 68px;
    flex-direction: column; align-items: stretch; gap: 0; padding: 8px var(--margin) 24px;
    background: var(--kifu-navy); font-size: 16px;
  }
  .gnav.is-open { display: flex; }
  .gnav a { color: var(--on-navy); padding: 14px 0; }
  .gnav .gnav-contact { margin-top: 12px; text-align: center; background: var(--kifu-teal); color: var(--kifu-navy); }

  .fv { --u: 0.72px; --low: 40px; --copy-top: calc(200 * var(--u) + 40px); }
  .fv-copy { gap: 14px; }
  .fv-copy h1 { font-size: min(5.5vw, 40px); letter-spacing: 0.02em; }

  .about { padding: var(--space-5) 0; min-height: 90svh; }
  .about-in { gap: 24px; }
  .about h2 { font-size: 26px; }
  .about-in .about-lead { font-size: 18px; }

  .biz { padding: var(--space-4) 0; }
  .biz-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 20px; }
  .biz-item:nth-child(n) { margin-top: 0; }
  .biz-item:nth-child(even) { margin-top: 40px; }

  .news-in { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .news-list a { grid-template-columns: minmax(0, 1fr); border-radius: 28px; }

  .footer-in { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .footer-co { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  .about h2 { font-size: 22px; }
  .about-in .about-lead { font-size: 17px; }
  .fv { --u: 0.52px; --low: 100px; --copy-top: calc(200 * var(--u) + 48px); } /* メッセージを20px下げた(2026-11-20 本人) */
}

@media (prefers-reduced-motion: reduce) {
  .wisp { animation: none; opacity: .6; }
  .bg-b .page-wind { animation: none; }
  .fv-track { animation: none; }
  .js .reveal, .js .reveal.drift, .js .fv-in, .js .fv-tile { transform: none; filter: none; transition: opacity 300ms ease; transition-delay: 0s; }
  .fv-tile img, .biz-photo img { transition: none; }
  .js .about-wash { scale: 1; transition: opacity 400ms ease; }
  .js .about-item { transform: none; filter: none; transition: opacity 400ms ease; }
}
