/* front-page.css — トップページ専用スタイル（Introオーバーレイ / Hero / About短縮 / Service短縮 / News）。トップ表示時のみ読み込み。 */

/* ================================================
   Intro Overlay（初回訪問のイントロアニメーション）
   ================================================ */
/*
  タイプライター → カーソル点滅 → 右スライドアウト の順に動く。
  主な調整つまみ:
    CHAR_SPEED_MIN / MAX（intro.js）: タイプ速度のランダム幅（増やすと遅くなる）
    CURSOR_WAIT（intro.js）         : タイプ完了後にカーソルが点滅し続ける時間
    transition-duration 0.7s        : スライドアウトの長さ（速いほどキレよく消える）
    cubic-bezier(0.76,0,0.24,1)     : イーズイン寄り。終盤に加速してページに抜ける感じ
*/
.intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000; /* ヘッダー(200)・モバイルメニュー(190)より前面 */
  background: var(--color-teal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-5);
  /* スライドアウト: 右へ退場 */
  transition: transform 0.7s cubic-bezier(0.76, 0, 0.24, 1);
}

.intro-overlay.is-exiting {
  transform: translateX(100%);
}

.intro-overlay__text {
  font-size: clamp(1.5rem, 4vw, 2.75rem); /* 画面幅に応じてスケール（増やすと大きくなる） */
  font-weight: var(--fw-bold);
  color: var(--color-white);
  letter-spacing: -0.02em;
  line-height: 1.3;
  text-align: center;
  max-width: 800px;
}

.intro-overlay__cursor {
  display: inline-block;
  width: 2px;        /* カーソルの太さ（太くするとターミナル感が増す） */
  height: 1em;
  background: var(--color-white);
  vertical-align: text-bottom;
  margin-left: 3px;
  border-radius: 1px;
  animation: introCursorBlink 0.8s step-end infinite; /* step-endでハードな点滅 */
}

@keyframes introCursorBlink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  /* 「動きを減らす」設定時はオーバーレイ自体を非表示（インラインスクリプト側でも制御済み） */
  .intro-overlay { display: none; }
}

/* ================================================
   Hero
   ================================================ */
.section-hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  background: var(--color-white);
  position: relative;
  overflow: hidden;
  padding-top: var(--header-height);
}

/* 波パーティクル Canvas。コンテンツより背面（z-index:0）に配置し、クリックを透過させる */
.section-hero__wave-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;           /* bg-accentと同層。コンテンツ（z-index:1）の背面 */
  pointer-events: none; /* マウス・タッチイベントをページ本体に透過 */
  display: block;       /* inline要素のデフォルト余白を消す */
}

.section-hero__bg-accent {
  position: absolute;
  top: -20%;
  right: -10%;
  width: 60vw;
  max-width: 700px;
  aspect-ratio: 1;
  background: radial-gradient(circle at 60% 40%, rgba(42, 157, 143, 0.08) 0%, transparent 70%);
  pointer-events: none;
  border-radius: 50%;
}

.section-hero__inner {
  position: relative;
  z-index: 1;
  padding-block: var(--space-9);
  max-width: 800px;
}

.section-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.8125rem;
  font-weight: var(--fw-semibold);
  color: var(--color-teal);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: var(--space-4);
}

.section-hero__eyebrow::before {
  content: '';
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-teal);
  flex-shrink: 0;
}

.section-hero__title {
  font-size: clamp(2.75rem, 8vw, 5rem);
  font-weight: var(--fw-bold);
  color: var(--color-navy);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.section-hero__title em {
  font-style: normal;
  color: var(--color-teal);
}

.section-hero__subtitle {
  margin-top: var(--space-4);
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--color-gray-sub);
  line-height: 1.8;
  max-width: 520px;
}

.section-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-6);
}

.section-hero__scroll-hint {
  position: absolute;
  bottom: var(--space-5);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.6875rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-gray-sub);
}

.section-hero__scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--color-teal), transparent);
  animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
  0%   { transform: scaleY(0); transform-origin: top; }
  50%  { transform: scaleY(1); transform-origin: top; }
  51%  { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

@media (prefers-reduced-motion: reduce) {
  .section-hero__scroll-line { animation: none; }
}

/* ================================================
   About short
   ================================================ */
.section-about-short {
  position: relative;
  background: var(--color-gray-light);
  overflow: hidden;
}

/* ロゴを背景ウォーターマークとして表示。下記4つが主な調整つまみ。 */
.section-about-short__watermark {
  position: absolute;
  top: 50%;                 /* 上下位置。50%=中央、小さいほど上 */
  left: 70%;                /* 左右位置。50%=中央、大きいほど右 */
  transform: translate(-50%, -50%);
  width: min(560px, 78%);   /* ロゴの大きさ。560pxを増減（78%は画面幅に対する上限） */
  aspect-ratio: 1 / 0.82;   /* ロゴ画像の縦横比。差し替え時は実画像に合わせる */
  background-image: url('../../images/logo/logo.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  mix-blend-mode: multiply; /* 白背景ロゴを地のグレーに馴染ませる（白を透過させる効果） */
  opacity: 0.08;            /* 濃さ（モバイル）。上げると濃く／下げると薄く */
  pointer-events: none;
  user-select: none;
}

@media (min-width: 768px) {
  .section-about-short__watermark {
    opacity: 0.1;           /* 濃さ（デスクトップ）。モバイルよりやや濃いめ */
  }
}

.section-about-short__inner {
  position: relative;
  z-index: 1;
}

.section-about-short__body {
  max-width: 860px; /* 文字の横幅。増やすと1行が長く、減らすと短く */
}

.section-about-short__body p {
  color: var(--color-gray-body);
  line-height: 1.85;
  font-size: 1.0625rem;
}

.section-about-short__body p + p {
  margin-top: var(--space-3);
}

.section-about-short__action {
  margin-top: var(--space-5);
}

/* ================================================
   Service short
   ================================================ */
.section-service-short {
  background: var(--color-white);
}

.section-service-short__header {
  margin-bottom: var(--space-6);
}

@media (min-width: 768px) {
  .section-service-short__header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
  }
}

.section-service-short__grid {
  display: grid;
  gap: var(--space-4);
}

@media (min-width: 768px) {
  .section-service-short__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.service-card {
  display: block;
  text-decoration: none;
  background: var(--color-gray-light);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  border: 1px solid var(--color-gray-border);
  transition: transform var(--duration-base) var(--easing),
              box-shadow var(--duration-base) var(--easing),
              border-color var(--duration-base) var(--easing);
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-teal);
}

.service-card__icon {
  width: 48px;
  height: 48px;
  background: var(--color-navy);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-4);
  flex-shrink: 0;
}

.service-card__icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: var(--color-teal);
  stroke-width: 1.5;
}

.service-card__title {
  font-size: 1.125rem;
  font-weight: var(--fw-semibold);
  color: var(--color-navy);
  margin-bottom: var(--space-2);
}

.service-card__desc {
  font-size: 0.9375rem;
  color: var(--color-gray-sub);
  line-height: 1.75;
}

.service-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

.service-card__tag {
  font-size: 0.75rem;
  font-weight: var(--fw-medium);
  color: var(--color-teal);
  background: rgba(42, 157, 143, 0.08);
  border-radius: var(--radius-full);
  padding: 3px 10px;
}

/* ================================================
   News (front-page section wrapper)
   ================================================ */
.section-news {
  background: var(--color-gray-light);
}

.section-news__header {
  margin-bottom: var(--space-5);
}
