/*
 * site.css — NextForward メインスタイル
 * 対象: index.html（および全サイト共通）
 * 構成: BASE / PRELOADER / NAVBAR / HERO / SECTION / FEATURED /
 *       SUCCESS-CASES / PRICING / COMPANY / CONTACT / FOOTER
 */

/* ============================================================
   BASE
============================================================ */
iframe { width: 100%; height: 100%; }

/* ============================================================
   PRELOADER
============================================================ */
.preloader {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: #ffffff;
  display: flex; justify-content: center; align-items: center;
  z-index: 9999;
  opacity: 1; visibility: visible;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
.preloader.hide { opacity: 0; visibility: hidden; }

.preloader-content {
  position: relative; text-align: center; padding: 20px;
  width: 100%; max-width: 100vw;
}
.preloader-title {
  font-size: clamp(24px, 8.2vw, 72px);
  font-weight: 900; margin: 0; letter-spacing: -0.3px; min-height: 60px;
  display: flex; align-items: center; justify-content: center;
  gap: clamp(6px, 1.6vw, 14px); flex-wrap: nowrap; white-space: nowrap;
  position: relative; z-index: 2;
}
.preloader-word {
  display: inline-block;
  padding-inline: clamp(1px, 0.35vw, 4px);
  color: #0f172a;
  transform: translateY(14px) scale(0.9); opacity: 0.2; filter: blur(1.5px);
  text-shadow: 0 2px 8px rgba(15, 23, 42, 0.14);
  animation: preloaderWordReveal 2.8s ease-in-out infinite;
}
.preloader-word-ai     { animation-delay: 0s; }
.preloader-word-seo    { animation-delay: 0.28s; }
.preloader-word-design { animation-delay: 0.56s; }

.preloader-divider {
  display: inline-block; color: #64748b; font-size: 0.46em;
  transform: translateY(2px); opacity: 0.7;
  animation: dividerPulse 2.8s ease-in-out infinite;
}
.preloader-caption {
  margin-top: 16px; margin-bottom: 0; color: #475569;
  font-size: clamp(12px, 1.8vw, 15px); letter-spacing: 0.18em;
  text-transform: uppercase; opacity: 0.8;
  animation: captionFade 2.8s ease-in-out infinite;
  position: relative; z-index: 2;
}
.preloader-glow {
  position: absolute;
  width: clamp(160px, 26vw, 320px); height: clamp(160px, 26vw, 320px);
  border-radius: 999px; filter: blur(20px);
  pointer-events: none; z-index: 1;
  animation: glowDrift 5.2s ease-in-out infinite;
}
.preloader-glow-left {
  top: -28%; left: -10%;
  background: radial-gradient(circle, rgba(148,163,184,.32) 0%, rgba(148,163,184,0) 68%);
}
.preloader-glow-right {
  bottom: -34%; right: -8%;
  background: radial-gradient(circle, rgba(71,85,105,.24) 0%, rgba(71,85,105,0) 72%);
  animation-delay: 1.1s;
}

@keyframes preloaderWordReveal {
  0%, 100% {
    transform: translateY(14px) scale(0.9);
    opacity: 0.2; filter: blur(1.5px);
    text-shadow: 0 2px 8px rgba(15,23,42,.12);
  }
  35% {
    transform: translateY(-2px) scale(1.06);
    opacity: 1; filter: blur(0);
    text-shadow: 0 10px 22px rgba(15,23,42,.28), 0 2px 8px rgba(15,23,42,.18);
  }
  65% { transform: translateY(0) scale(1.02); opacity: 0.9; filter: blur(0); }
}
@keyframes dividerPulse {
  0%, 100% { opacity: 0.35; }
  50%       { opacity: 0.9; }
}
@keyframes captionFade {
  0%, 100% { opacity: 0.45; transform: translateY(4px); }
  50%       { opacity: 0.95; transform: translateY(0); }
}
@keyframes glowDrift {
  0%, 100% { transform: translate3d(0,0,0) scale(0.92); opacity: 0.5; }
  50%       { transform: translate3d(6px,-10px,0) scale(1.08); opacity: 0.95; }
}

@media (max-width: 767.98px) {
  .preloader-content { padding: 16px 14px; }
  .preloader-title   { font-size: clamp(23px,7.4vw,40px); gap: clamp(5px,1.8vw,10px); letter-spacing: -0.15px; }
  .preloader-word    { padding-inline: clamp(1px,.6vw,3px); }
  .preloader-caption { letter-spacing: 0.15em; }
}
@media (max-width: 420px) {
  .preloader-content { padding: 14px 12px; }
  .preloader-title   { font-size: clamp(21px,7vw,31px); letter-spacing: -0.08px; gap: clamp(4px,2vw,8px); }
  .preloader-caption { font-size: 11px; letter-spacing: 0.12em; }
}

/* ============================================================
   NAVBAR
============================================================ */
.navbar-main {
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  position: sticky; top: 0; z-index: 1000;
  box-shadow: 0 1px 3px rgba(0,0,0,.1);
}

.navbar-brand { display: inline-flex; align-items: center; text-decoration: none; }

.brand-hover-sync,
.brand-hover-sync:hover,
.brand-hover-sync:focus,
.brand-hover-sync:active {
  display: inline-flex; align-items: center; position: relative; padding-bottom: 2px;
  transform: none !important; top: 0 !important; margin-top: 0 !important;
  line-height: 1 !important; text-decoration: none !important; animation: none !important;
}
.brand-hover-sync::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
  background: #334155; transform: scaleX(0); transform-origin: center;
  transition: transform 0.28s ease, opacity 0.28s ease; opacity: 0.6;
}
.brand-hover-sync:hover::after,
.brand-hover-sync:focus::after { transform: scaleX(1); opacity: 1; }

.brand-hover-sync > span {
  display: inline-block; font-size: 20px; font-weight: 700; letter-spacing: -0.5px;
  line-height: 1.2; vertical-align: middle;
  transform: none !important; top: 0 !important; margin-top: 0 !important;
  color: #0f172a !important; opacity: 0.96;
  text-shadow: 0 0 0 rgba(15,23,42,0);
  transition: color 0.28s ease, opacity 0.28s ease, text-shadow 0.28s ease;
}
.brand-hover-sync:hover > span,
.brand-hover-sync:focus > span {
  transform: none !important; top: 0 !important; margin-top: 0 !important;
  color: #1f2937 !important; opacity: 1;
  text-shadow: 0 3px 14px rgba(31,41,55,.22);
}

.navbar-nav-center  { justify-content: center; flex-grow: 1; }
.navbar-collapse    { justify-content: center; }
.nav-link-menu      { color: #1f2937 !important; transition: all 0.3s ease; font-weight: 500; }
.nav-link-cta {
  background: linear-gradient(135deg, #374151 0%, #1f2937 100%);
  color: white; padding: 10px 24px; border-radius: 6px;
  font-weight: 600; margin-left: 16px; transition: all 0.3s ease;
}
.nav-link-cta:hover { transform: translateY(-2px); box-shadow: 0 8px 16px rgba(0,0,0,.2); }

.navbar-light .navbar-toggler       { border: 1px solid #d1d5db; padding: .25rem .5rem; }
.navbar-light .navbar-toggler:focus { box-shadow: 0 0 0 .25rem rgba(55,65,81,.25); outline: none; }
.navbar-light .navbar-toggler-icon {
  width: 1.5em; height: 1.5em;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%231f2937' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
  background-repeat: no-repeat; background-position: center; background-size: 100%;
}

@media (max-width: 991.98px) {
  #navbarNav                          { text-align: center; }
  #navbarNav .navbar-nav              { width: 100%; align-items: center; }
  #navbarNav .nav-item                { width: 100%; }
  #navbarNav .nav-link                { display: inline-block; text-align: center; }
  #navbarNav .nav-link-cta            { margin: 12px auto 0 !important; display: inline-block; }
  .nav-link-cta                       { margin-left: auto !important; }
}

/* ============================================================
   HERO SECTION
============================================================ */
.hero-section-bg {
  position: relative; min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, #ffffff 0%, #f9fafb 100%);
  overflow: hidden;
}

/* Spline 3D iframe — fills the entire section */
.hero-bg-layer {
  position: absolute; inset: 0; z-index: 1;
}
.hero-bg-layer iframe {
  width: 100%; height: 100%;
  border: none; background: transparent;
}

/* 薄いオーバーレイ（テキスト可読性のみ） */
.hero-overlay {
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, .08);
  z-index: 2; pointer-events: none;
}

/* コンテンツラッパー（section の flex 子要素として幅のみ管理） */
.hero-container {
  position: relative;
  z-index: 3;
  pointer-events: none;
  width: 100%;
  padding-top: 80px;    /* ナビバー高さ分のオフセット */
  padding-bottom: 40px;
}
.hero-row { pointer-events: none; width: 100%; }

/* ── コンテンツボックス ── */
.hero-content-box {
  max-width: 810px;        /* 900 × 0.9 */
  margin: 0 auto;
  background: linear-gradient(
    180deg,
    rgba(0,0,0,.18) 0%,
    rgba(0,0,0,.06) 50%,
    rgba(0,0,0,.18) 100%
  );
  padding: 54px 36px;      /* 60 × 0.9 / 40 × 0.9 */
  border-radius: 14px;
  backdrop-filter: blur(1px);
  pointer-events: none;
}
@media (max-width: 575.98px) {
  .hero-content-box { padding: 36px 18px; }
}

/* ── ブランドアニメーション ── */
.hero-brand-animated {
  font-size: clamp(36px, 9vw, 58px);   /* 元値 × 0.9 */
  color: #f1f5f9; -webkit-text-fill-color: #f1f5f9;
  text-shadow:
    0 0  4px rgba(255,255,255,.5),
    0 0 10px rgba(255,255,255,.32),
    0 0 20px rgba(203,213,225,.3),
    0 2px 10px rgba(0,0,0,.35);
  filter: drop-shadow(0 0 8px rgba(255,255,255,.2));
  animation: heroBrandGlow 3.8s ease-in-out infinite;
}
@keyframes heroBrandGlow {
  0%, 100% {
    color: #cbd5e1; -webkit-text-fill-color: #cbd5e1;
    text-shadow:
      0 0  1px rgba(0,0,0,.55),
      0 0  8px rgba(0,0,0,.5),
      0 0 16px rgba(0,0,0,.42),
      0 3px 14px rgba(0,0,0,.65);
    filter: drop-shadow(0 0 8px rgba(0,0,0,.42)); opacity: 0.8;
  }
  50% {
    color: #ffffff; -webkit-text-fill-color: #ffffff;
    text-shadow:
      0 0 10px rgba(255,255,255,.9),
      0 0 22px rgba(255,255,255,.62),
      0 0 36px rgba(203,213,225,.52),
      0 4px 14px rgba(0,0,0,.45);
    filter: drop-shadow(0 0 14px rgba(255,255,255,.38)); opacity: 1;
  }
}

/* ── タイトル / サブタイトル ── */
.hero-title-main {
  color: #ffffff;
  font-size: clamp(29px, 7.2vw, 51px);  /* 元値 × 0.9 */
  font-weight: 900; line-height: 1.3;
  margin-bottom: 22px;
  text-shadow: 0 4px 16px rgba(0,0,0,.5), 0 2px 8px rgba(0,0,0,.3);
  letter-spacing: 0.5px;
}
.hero-subtitle-main {
  color: #ffffff;
  margin-top: 22px;
  font-size: clamp(14px, 3.6vw, 18px);  /* 元値 × 0.9 */
  line-height: 1.8; font-weight: 500;
  text-shadow:
    0 1px 3px rgba(0,0,0,.7),
    0 3px 10px rgba(0,0,0,.5);
  pointer-events: none; user-select: none;
}

/* ── CTAボタン群 ── */
.hero-cta-wrap {
  margin-top: 36px;
  display: flex; gap: 11px; justify-content: center; flex-wrap: wrap;
}
.hero-btn-primary {
  background: #374151; border: none;
  padding: clamp(11px, 2.7vw, 14px) clamp(22px, 4.5vw, 32px);
  font-size: clamp(13px, 2.7vw, 14px);
  font-weight: 600; border-radius: 8px;
  box-shadow: 0 4px 12px rgba(55,65,81,.2);
  transition: all 0.3s ease; white-space: nowrap;
  cursor: pointer; pointer-events: auto;
}
.hero-btn-outline {
  border: 2px solid #d1d5db; color: #1f2937;
  padding: clamp(11px, 2.7vw, 13px) clamp(18px, 4.5vw, 31px);
  font-size: clamp(13px, 2.7vw, 14px);
  font-weight: 600; background: #ffffff; border-radius: 8px;
  transition: all 0.3s ease; white-space: nowrap;
  cursor: pointer; pointer-events: auto;
}

/* ============================================================
   SECTION COMMON
============================================================ */
.section-white      { background: #ffffff; padding: 80px 0; }
.section-gray       { background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%); padding: 80px 0; }
.section-light      { background: linear-gradient(180deg, #f9fafb 0%, #ffffff 100%); padding: 80px 0; }
.section-rel-hidden { position: relative; overflow: hidden; }
.section-z1         { position: relative; z-index: 1; }

/* 装飾用 radial blob */
.deco-blob-tr {
  position: absolute; top: -50%; right: -10%;
  width: 600px; height: 600px; border-radius: 50%; z-index: 0;
  background: radial-gradient(circle, rgba(107,114,128,.05) 0%, transparent 70%);
}
.deco-blob-bl {
  position: absolute; bottom: -50%; left: -10%;
  width: 600px; height: 600px; border-radius: 50%; z-index: 0;
  background: radial-gradient(circle, rgba(59,130,246,.1) 0%, transparent 70%);
}

/* セクション見出し */
.section-h2      { color: #0f172a; font-size: 36px; font-weight: 800; }
.section-h2-lg   { color: #111827; margin-bottom: 16px; font-size: 40px; font-weight: 800; line-height: 1.3; }
.h2-highlight    { color: #111827; font-size: inherit; font-weight: inherit; }
.section-sub     { color: #6b7280; font-size: 16px; margin-top: 16px; }
.section-sub-dark{ color: #475569; line-height: 1.8; font-size: 15px; }
.link-accent     { color: #007bff; }

/* アクセントバー */
.accent-bar {
  width: 60px; height: 4px;
  background: linear-gradient(135deg, #374151, #1f2937);
  margin: 0 auto; border-radius: 2px;
}

/* ============================================================
   FEATURED SECTION（3つの強み）
============================================================ */
.feat-flex-start { display: flex; align-items: flex-start; }
.service-f-grid  { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; width: 100%; }

/* サービスカード */
.featured-service-item {
  margin-bottom: 28px; padding: 32px;
  background: white; border-left: 4px solid #1f2937; border-radius: 12px;
  box-shadow: 0 4px 12px rgba(31,41,55,.1);
  transition: all 0.8s cubic-bezier(0.23, 1, .32, 1);
  cursor: pointer; opacity: 0; transform: translateY(30px);
}
.featured-service-item.animated {
  opacity: 1 !important; transform: translateY(0) !important;
}
.featured-service-item:hover {
  transform: translateY(-8px) !important;
  box-shadow: 0 12px 28px rgba(31,41,55,.2);
  border-left-color: #60a5fa;
}
.featured-service-item:hover > div > div:first-child {
  transform: scale(1.1) rotate(5deg);
  background: linear-gradient(135deg, #60a5fa, #3b82f6);
}

/* 番号バッジ */
.feat-num-badge {
  background: linear-gradient(135deg, #374151, #1f2937);
  color: white; width: 50px; height: 50px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; margin-right: 20px; flex-shrink: 0;
  font-size: 20px; transition: all 0.3s ease;
}

/* カード内テキスト */
.feat-h3    { color: #0f172a; font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.feat-h3-lg { color: #0f172a; font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.feat-p     { color: #475569; margin: 0; line-height: 1.6; font-size: 15px; }

/* アイコン付きサービスアイテム */
.icon-circle {
  background: linear-gradient(135deg, #374151, #1f2937);
  color: white; width: 60px; height: 60px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; margin-bottom: 16px; flex-shrink: 0;
}
.service-item-f {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; padding: 0;
}
.svc-strong { color: #0f172a; font-size: 16px; margin-bottom: 8px; }
.svc-p      { color: #475569; font-size: 14px; line-height: 1.6; margin: 0; }

/* ============================================================
   SUCCESS CASES — 自動スクロールカルーセル
============================================================ */
.carousel-outer      { position: relative; width: 100%; }
.carousel-track-wrap { position: relative; width: 100%; overflow: hidden; background: white; }

@keyframes scroll-left {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
#success-carousel {
  display: flex; gap: 14px; padding: 20px 60px;
  width: fit-content; will-change: transform;
  animation: scroll-left 32s linear infinite;
}

/* カードリンク */
.case-link {
  text-decoration: none; display: block; cursor: pointer;
  flex-shrink: 0; width: 280px; margin-right: 12px;
}

/* カードベース */
.success-case-item {
  background: white; border-radius: 16px; overflow: hidden;
  box-shadow: 0 4px 16px rgba(31,41,55,.15);
  height: 100%; display: flex; flex-direction: column;
  padding: 8px; gap: 8px; width: 280px; cursor: pointer;
}
.success-case-item.success-case-animated {
  opacity: 1 !important; transform: translateY(0) !important;
}
.success-case-item:hover {
  box-shadow: 0 12px 32px rgba(31,41,55,.2) !important;
  transform: scale(1.02) !important;
}

/* カード内レイアウト */
.case-img-wrap  { display: flex; justify-content: center; align-items: center; }
.case-img-inner {
  border-radius: 12px; width: 100%; max-width: 228px; height: 390px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; position: relative;
}
.case-img-inner img { width: 100%; height: 110%; object-fit: cover; object-position: top; }
.case-info         { display: flex; flex-direction: column; gap: 6px; }
.case-result-box   { display: grid; grid-template-columns: 1fr; gap: 6px; font-size: 11px; }
.case-result-inner { padding: 6px; border-radius: 6px; }
.case-tags         { display: flex; flex-wrap: wrap; gap: 4px; }
.case-tag          { padding: 3px 8px; border-radius: 20px; font-size: 9px; font-weight: 600; }
.case-h3           { color: #0f172a; font-size: 16px; font-weight: 700; margin-bottom: 2px; }

#success-cases .success-case-item h3 { font-size: 18px !important; line-height: 1.35 !important; text-align: center !important; }
#success-cases .success-case-item p  { font-size: 14px !important; line-height: 1.45 !important; }

/* ============================================================
   PRICING TABLE
============================================================ */
.pricing-table { border-collapse: collapse; width: 100%; }
.pt-empty      { width: 50%; }
.pt-label      { width: 50%; text-align: center; }
.pt-price      { width: 50%; text-align: center; }
.pt-h5-center  { text-align: center; }

.pricing-detail-toggle {
  font-weight: 600; border: 1px solid #374151; color: #374151;
  background: #ffffff; border-radius: 8px; padding: 10px 22px;
  transition: all 0.25s ease; box-shadow: 0 2px 8px rgba(31,41,55,.1);
}
.pricing-detail-toggle:hover,
.pricing-detail-toggle:focus {
  color: #ffffff; background: #374151; border-color: #374151;
  box-shadow: 0 8px 18px rgba(31,41,55,.22);
}
.pricing-detail-toggle:not(.collapsed) {
  color: #ffffff; background: #1f2937; border-color: #1f2937;
  box-shadow: 0 8px 18px rgba(31,41,55,.24);
}
.pricing-detail-toggle:active { transform: translateY(0); }

/* ============================================================
   COMPANY INFO
============================================================ */
.company-img { border-radius: 16px; box-shadow: 0 20px 60px rgba(31,41,55,.25); }

/* ============================================================
   CONTACT FORM
============================================================ */
.contact-form-wrap  { background: #f3f4f6; padding: 20px; border-radius: 12px; box-shadow: 0 1px 3px rgba(0,0,0,.05); }
.c-form__label-color{ color: #374151; }
.c-input-styled     { background: #ffffff; border: 1px solid #e5e7eb; color: #374151; border-radius: 6px; padding: 10px 12px; }
.c-textarea         { min-height: 120px; resize: vertical; }
.c-submit-btn {
  background: linear-gradient(135deg, #374151 0%, #1f2937 100%); border: none;
  padding: 12px 32px; font-size: 16px; font-weight: 600; color: white;
  border-radius: 6px; cursor: pointer; transition: all 0.3s ease; width: 100%;
}

/* ============================================================
   MAP
============================================================ */
.map-height-fixed { height: 544px; }
@media (max-width: 991px)  { .map-container-responsive { height: 300px !important; } }
@media (min-width: 992px)  { .map-container-responsive { height: 544px !important; } }

/* ============================================================
   FOOTER
============================================================ */
.site-footer.footer-modern               { background: #ffffff; border-top: 1px solid #e5e7eb; border-bottom: 0; }
.site-footer.footer-modern::after        { display: none; }
.site-footer.footer-modern .site-footer-title { color: #0f172a; font-weight: 700; font-size: 14px; }
.site-footer.footer-modern .site-footer-link  { color: #475569; font-size: 14px; transition: color 0.3s ease; }
.site-footer.footer-modern .site-footer-link:hover { color: #1f2937; }
.site-footer.footer-modern .copyright-text     { color: #64748b; font-size: 12px; }
