/* =========================================
   基本設定
   ========================================= */
:root {
  --text-main: #222;
  --text-sub: #666;
  --accent: #00a2ff;
  --accent-gradient: linear-gradient(90deg, #00a2ff, #00eaff);
  --bg-color: #f9f9f9;
  --noah-brand: #521b92; /* Noah.Q ブランドカラー */

  /* ヘッダー含め「常に同じ」にしたい基準フォント */
  --font-ui:
    system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans",
    "Noto Sans JP", "Yu Gothic", "Meiryo", sans-serif;

  /* 本文フォント（デフォルトはUIと同じ） */
  --font-content: var(--font-ui);

  /* 既存の var(--font-family) 参照を壊さない互換エイリアス */
  --font-family: var(--font-content);

  /* 中国語本文用（同梱フォント優先） */
  --font-cn:
    "YJ-NotoSansSC", "PingFang SC", "Microsoft YaHei", "Heiti SC",
    "Noto Sans SC", sans-serif;

  /* 韓国語本文用（必要なら） */
  --font-kr:
    system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Malgun Gothic",
    "Apple SD Gothic Neo", Arial, sans-serif;
}

/* =========================================
   Webfont（中国語を確実に統一：同梱 woff2）
   ========================================= */
@font-face {
  font-family: "YJ-NotoSansSC";
  src: url("fonts/YJ-NotoSansSC-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "YJ-NotoSansSC";
  src: url("fonts/YJ-NotoSansSC-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* 中国語フォント優先設定 */
body.lang-cn #main-wrapper {
  --font-content: var(--font-cn);
}
body.lang-kr #main-wrapper {
  --font-content: var(--font-kr);
}
html {
  overflow-x: clip;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-ui);
  color: var(--text-main);
  background-color: var(--bg-color);
  background-image:
    radial-gradient(circle at 2px 2px, #ddd 1px, transparent 0),
    radial-gradient(circle at 17px 17px, #ddd 1px, transparent 0);
  background-size: 32px 32px;
  word-break: keep-all;
  overflow-x: clip; /* ← これを追加 */
}

::-webkit-scrollbar {
  display: none;
}
body {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* アニメーション定義 */
@keyframes marqueeLoopLeft {
  0% {
    transform: rotate(-30deg) translateX(0);
  }
  100% {
    transform: rotate(-30deg) translateX(-50%);
  }
}
@keyframes entryLeft {
  0% {
    transform: rotate(-30deg) translateX(50%);
    opacity: 0;
  }
  20% {
    transform: rotate(-30deg) translateX(-5%);
    opacity: 1;
    animation-timing-function: cubic-bezier(0.25, 1, 0.5, 1);
  }
  100% {
    transform: rotate(-30deg) translateX(0);
  }
}

@keyframes marqueeLoopRight {
  0% {
    transform: rotate(-30deg) translateX(-50%);
  }
  100% {
    transform: rotate(-30deg) translateX(0);
  }
}
@keyframes entryRight {
  0% {
    transform: rotate(-30deg) translateX(-100%);
    opacity: 0;
  }
  20% {
    transform: rotate(-30deg) translateX(-45%);
    opacity: 1;
    animation-timing-function: cubic-bezier(0.25, 1, 0.5, 1);
  }
  100% {
    transform: rotate(-30deg) translateX(-50%);
  }
}

/* カードリンク */
.card-link {
  text-decoration: none;
  color: inherit;
  display: block;
  transition: transform 0.2s ease-out;
  outline: none;
}
.card-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 24px;
}
.card-link:hover {
  transform: translateY(-8px);
}
.card-link:active {
  transform: translateY(-4px);
}

/* 機能 */
#loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #fff;
  z-index: 20000;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition:
    opacity 0.8s ease,
    visibility 0.8s ease;
  animation: loaderAutoHide 2s ease 1.8s forwards;
}
#loading-screen.loaded {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  animation: none;
}
.loading-logo {
  font-size: 3rem;
  font-weight: bold;
  font-family: var(--font-family);
  color: #333;
  margin-bottom: 20px;
  opacity: 0;
  animation: logoFadeIn 1s ease forwards;
}
.loading-bar {
  width: 0;
  height: 3px;
  background: var(--accent);
  animation: barGrow 1.5s ease-in-out forwards;
}
@keyframes logoFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes barGrow {
  0% {
    width: 0;
  }
  100% {
    width: 60px;
  }
}

@keyframes loaderAutoHide {
  0% {
    opacity: 1;
    visibility: visible;
  }
  90% {
    opacity: 1;
    visibility: visible;
  }
  100% {
    opacity: 0;
    visibility: hidden;
  }
}

/* デザイン */
.background-shapes {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
  filter: blur(90px);
}
.shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.8;
  animation: hugeMorph 25s infinite ease-in-out alternate;
  mix-blend-mode: multiply;
}
.shape-1 {
  top: -10%;
  left: -10%;
  width: 40vw;
  height: 40vw;
  background: #c4e0ff;
  animation-duration: 16s;
}
.shape-2 {
  bottom: -10%;
  right: -10%;
  width: 45vw;
  height: 45vw;
  background: #e6dfff;
  animation-duration: 10s;
  animation-delay: -5s;
}
.shape-3 {
  top: 30%;
  left: 30%;
  width: 30vw;
  height: 30vw;
  background: #ffe3e3;
  animation-duration: 13s;
  animation-delay: -10s;
}
@keyframes hugeMorph {
  0% {
    transform: translate(0, 0) scale(1) rotate(0deg);
  }
  50% {
    transform: translate(30vw, 20vh) scale(1.2) rotate(180deg);
  }
  100% {
    transform: translate(-30vw, -30vh) scale(0.8) rotate(360deg);
  }
}

/* ヘッダー */
.header {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 15px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-sizing: border-box;
  z-index: 9999;
  transition:
    background-color 0.4s ease,
    box-shadow 0.4s ease;
}

.header.scrolled {
  background: rgba(255, 255, 255, 0.6);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}
.header-progress-bg {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: rgba(0, 162, 255, 0.8);
  z-index: -1;
  pointer-events: none;
  transition: width 0.1s linear;
}
.logo {
  font-weight: bold;
  font-size: 24px;
  font-family: var(--font-family) !important;
  z-index: 2;
  position: relative;
}
.lang-switcher-container {
  position: relative;
  display: flex;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 30px;
  padding: 5px;
  z-index: 2;
}
.sliding-pill {
  position: absolute;
  top: 5px;
  left: 5px;
  width: 40px;
  height: 26px;
  background: var(--text-main);
  border-radius: 20px;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  z-index: 1;
}
.lang-btn {
  position: relative;
  border: none;
  background: transparent;
  padding: 5px 12px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-family) !important;
  color: var(--text-main);
  z-index: 2;
  transition: color 0.3s;
  outline: none;
}
.lang-switcher-container {
  padding: 4px;
}
.lang-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.lang-btn.active {
  color: white;
}
.lang-btn:hover:not(.active) {
  color: var(--accent);
}

/* コンテンツ */
#main-wrapper {
  font-family: var(--font-content);
  transition:
    opacity 0.5s ease,
    filter 0.5s ease;
  opacity: 1;
}
#main-wrapper.vanishing {
  opacity: 0;
  filter: blur(20px);
}

section {
  max-width: 1000px;
  margin: 0 auto;
  padding: 100px 20px;
}
.sub-section {
  padding-top: 120px; /* ヘッダーの高さを考慮 */
}
.section-header {
  position: relative;
  text-align: center;
  margin-bottom: 80px;
  padding-top: 40px;
}
.section-title {
  position: relative;
  font-size: 2.2rem;
  font-weight: 700;
  z-index: 2;
  margin: 0;
  letter-spacing: 0.05em;
}

/* ヒーローアニメーション */
.hero-title,
.hero-sub {
  opacity: 0;
  transform: translateY(30px);
  transition: 1s cubic-bezier(0.16, 1, 0.3, 1);
}
.hero-title.start,
.hero-sub.start {
  opacity: 1;
  transform: translateY(0);
}
.hero-sub.start {
  transition-delay: 0.2s;
}

.fade-up {
  opacity: 0;
  transform: translateY(40px);
  transition: 1s cubic-bezier(0.16, 1, 0.3, 1);
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}
/* スライドインアニメーション（右から） */
.slide-in-right {
  opacity: 0;
  transform: translateX(100px);
  transition: 1s cubic-bezier(0.16, 1, 0.3, 1);
}
.slide-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.slide-in-left {
  opacity: 0;
  transform: translateX(-100px);
  transition: 1s cubic-bezier(0.16, 1, 0.3, 1);
}
.slide-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

/* スクロール連動のスライド演出を無効化する（カード類は対象外） */
.fade-up:not(.feature-card),
.slide-in-right:not(.feature-card),
.slide-in-left:not(.feature-card) {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}

.delay-1 {
  transition-delay: 0.2s;
}
.delay-2 {
  transition-delay: 0.4s;
}
.delay-3 {
  transition-delay: 0.6s;
}

/* HERO */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  box-sizing: border-box;
  padding-top: 15vh;
}
.hero h1 {
  font-size: 4rem;
  margin: 0;
  background: linear-gradient(45deg, #000, #555);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero p {
  font-size: 1.2rem;
  color: var(--text-sub);
  margin-top: 20px;
}

/* SERVICES & NUMBERS */
/* カード 6 枚を並べるコンテナ */
/* SERVICES & NUMBERS */
.unified-grid {
  display: grid;
  grid-template-columns: repeat(
    3,
    minmax(0, 300px)
  ); /* 最大 300px、画面に合わせて縮む */
  justify-content: center; /* 全体を中央寄せ */
  gap: 30px; /* カード間の余白 */
  margin-bottom: 40px;
}

@media (max-width: 1024px) {
  .unified-grid {
    grid-template-columns: repeat(2, minmax(0, 300px));
  }
}

/* 1 枚分のカードの「横幅」を固定する */
.card-link {
  display: block;
  width: 100%;
  max-width: 300px;
  text-decoration: none;
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.card {
  background: #fff;
  padding: 30px;
  border-radius: 24px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.07);
  border: 1px solid #eee;
  width: 100%;
  max-width: 300px;
  height: 260px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}

.animated-border::before {
  content: "";
  position: absolute;
  z-index: -2;
  left: -50%;
  top: -50%;
  width: 200%;
  height: 200%;
  background-color: transparent;
  background-repeat: no-repeat;
  background-position: center;
  /* Comet-like gradient */
  background-image: conic-gradient(
    from 180deg,
    transparent 0,
    transparent 270deg,
    rgba(0, 234, 255, 0.5) 340deg,
    var(--accent) 358deg,
    white 360deg
  );
  animation: rotate 6s linear infinite;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  filter: blur(2px); /* Soft glow */
}

.animated-border:hover::before {
  opacity: 1;
}

.animated-border::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: 2px;
  top: 2px;
  width: calc(100% - 4px);
  height: calc(100% - 4px);
  background: white;
  border-radius: 22px;
}

/* デコレーション番号 */
.card-deco-number {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 3rem;
  font-weight: 900;
  color: rgba(0, 0, 0, 0.05);
  font-family: var(--font-family);
  pointer-events: none;
}

.card-link:hover .card {
  box-shadow: 0 25px 50px rgba(0, 113, 227, 0.2);
  border-color: rgba(0, 113, 227, 0.5);
}

/* カード共通の中身コンテナ */
.card-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
}

/* 上段 3 枚（説明テキスト付き）のカード：上揃え＋余白で位置固定 */
.card-content:not(.center-content) {
  justify-content: flex-start; /* 上揃え */
  padding-top: 40px; /* タイトルの高さを合わせるための固定余白 */
}

/* 下段 3 枚（数字カード）：これまで通り中央揃え */
.center-content {
  justify-content: center;
  align-items: center;
  text-align: center;
}

.auto-shrink-text {
  white-space: nowrap;
  display: inline-block;
  width: 100%;
  text-align: center;
  transform-origin: center;
}
.card h3 {
  font-family: var(--font-family);
  font-size: 1.8rem;
  font-weight: 700;
  margin: 0 0 15px 0;
  white-space: nowrap;
}
.card p {
  color: var(--text-main);
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ヒーロー下の 3 カードのタイトル用 */
.sync-card-title-size {
  color: var(--accent); /* 下段の「75億円+」などと同じ水色 */
}

.fit-desc {
  display: block;
}
.stat-number {
  font-weight: 900;
  color: var(--accent);
  font-family: var(--font-family);
  margin-bottom: 5px;
  font-size: 3.8rem;
  line-height: 1.1;
  white-space: nowrap;
}
.stat-label {
  color: var(--text-sub);
  font-weight: 700;
  font-size: 0.9rem;
  white-space: nowrap;
}

/* グラフ */
.chart-container {
  background: rgba(255, 255, 255, 0.7);
  border-radius: 24px;
  padding: 40px;
  backdrop-filter: blur(30px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.6);
  height: 450px;
}

.sales-chart {
  width: 100%;
  height: 100%;
}
.sales-chart svg {
  width: 100%;
  height: 100%;
}
/* OFFICES (New List Design) */
.office-list-container {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.office-card {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(30px);
  border-radius: 24px;
  padding: 30px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.6);
  transition: all 0.3s ease;
}

.office-card:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

.office-info h3 {
  font-size: 1.5rem;
  margin: 0 0 8px 0;
  color: var(--text-main);
  white-space: nowrap;
}

.office-info p {
  font-size: 1rem;
  color: var(--text-sub);
  margin: 0;
  font-weight: 500;
  white-space: nowrap;
}

.office-contact-group {
  display: flex;
  gap: 30px;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-main);
  font-size: 1rem;
  font-weight: 500;
  transition: color 0.2s ease;
  outline: none;
  border-radius: 4px;
  padding: 4px;
}

.contact-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.contact-link:hover {
  color: var(--accent);
}

.mini-icon {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.8;
}

/* Global Trading Section */
.trading-content {
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}
.text-block {
  text-align: left;
  max-width: 700px;
  margin: 0 auto 60px auto;
}
.main-copy {
  font-size: 1.3rem;
  font-weight: 500;
  line-height: 1.7;
  margin-bottom: 30px;
}
.main-copy .text-highlight {
  color: var(--accent);
  font-weight: 600;
}

.sub-copy {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-sub);
  margin-bottom: 0;
}
.no-wrap {
  white-space: nowrap;
}

/* 共通設定 */
.trading-grid {
  display: grid;
  gap: 30px;
  margin-bottom: 60px;
  perspective: 1000px;
}

.feature-card {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(30px);
  border-radius: 20px;
  padding: 30px;
  text-align: left;
  transition: transform 0.2s ease-out;
}

.feature-card-icon {
  margin-bottom: 15px;
}
.feature-card-icon svg {
  width: 36px;
  height: 36px;
  color: var(--accent);
}
/* OEMセクションのアイコンを小さく調整 */
.service-oem .feature-card-icon {
  margin-bottom: 10px; /* 余白も少しだけ詰める */
}

.service-oem .feature-card-icon svg {
  width: 24px;
  height: 24px;
}

/* OEM アイコンのサイズ調整 */
.oem-icon-wrapper {
  margin-bottom: 20px;
  display: flex;
  align-items: center;
}

.oem-icon {
  width: 28px; /* 好みで 24〜32px の間で調整OK */
  height: 28px;
  display: block;
}

.feature-card-title {
  margin: 0 0 10px 0;
  font-size: 1.1rem;
  font-weight: 700;
}
.feature-card-desc {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-sub);
  line-height: 1.6;
}

.text-feature-card {
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  min-height: auto;
  padding: 20px 30px;
}
.text-feature-card .text-block {
  margin: 0;
  max-width: 100%;
  text-align: center;
}
.text-feature-card .main-copy {
  margin-bottom: 20px;
}
.text-feature-card .sub-copy {
  margin-bottom: 0;
  font-size: 1.1rem;
  color: var(--text-main);
  font-weight: 500;
}

/* セクション個別マーキー用隠し要素（必要なら） */
.section-marquee {
  display: none; /* JSでdata属性から取得するため非表示 */
}

/* =========================================
   セクションごとの個別デザイン (遊び心)
   ========================================= */

/* ------------------------------------------
   Service 1: Global Trading (Sticky Side Scroll)
   ------------------------------------------ */
/* ベースレイアウトを2カラムに */
.service-trading .trading-content {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
  gap: 60px;
}

/* Global Trading カードの 3D チルト用設定 */
.service-trading .trading-grid {
  perspective: 1000px;
}

.service-trading .feature-card {
  transform-style: preserve-3d;
  will-change: transform;
}

/* 左側：テキストブロック（Sticky） */
.service-trading .text-block {
  position: sticky;
  top: 150px;
  flex: 0 0 40%;
  max-width: none;
  margin: 0;
  text-align: left;
}

/* 右側：カード群（縦スクロール） */
.service-trading .trading-grid {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 40px;
  margin-bottom: 0;
}

/* カードデザイン調整 */
.service-trading .feature-card {
  width: 100%; /* コンテナ幅いっぱい */
  box-sizing: border-box;
  transform-style: preserve-3d;
  will-change: transform;
}
.service-trading .text-feature-card {
  grid-column: auto;
  width: 100%;
  box-sizing: border-box;
}

/* OEM セクション全体 */
.service-oem {
  /* 幅まわりは section のデフォルトに揃える */
  max-width: 1000px;
  margin: 0 auto;
  padding: 120px 20px 100px 20px; /* 上だけ少し厚くしたければ 120px、他は section と揃える */

  position: relative;
}

/* OEM 横スクロール（縦スクロール連動 / CDN 依存なし）
   - セクション内の縦スクロール距離を、横方向の移動量に変換
   - いわゆる scrollytelling（スクロール連動演出）
*/
.oem-sticky-wrapper {
  position: relative;
  /* セクションの max-width 制約を解除してフルブリードにする */
  width: 100vw;
  margin-left: calc(50% - 50vw);
  /* 高さは JS で (viewport + 横移動距離) に自動調整 */
  min-height: 100vh;
  margin-top: 0;
}

.oem-sticky-inner {
  position: sticky;
  top: 90px; /* 固定ヘッダー分の逃げ（JSで再設定） */
  height: calc(100vh - 90px);
  overflow: visible; /* 左右を切らない */
}

.oem-horizontal-container {
  display: flex;
  gap: 40px;
  width: max-content;
  padding: 0;
  will-change: transform;
  transform: translate3d(0, 0, 0);
}

/* OEM: スクロール連動の見栄え調整 */
.oem-sticky-content {
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 18px; /* タイトル/本文 と カードの間隔 */
  padding: 24px 0;
}

.oem-text-wrap {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
}

.oem-text-wrap #oem-main-copy {
  margin: 12px 0 0 0; /* 余白を詰める */
}

.oem-horizontal-viewport {
  width: 100%;
  overflow: visible; /* 左右を切らない */
  /* テキストカラム（max-width 1000 + padding 20）に揃える */
  padding-left: max(20px, calc((100vw - 1000px) / 2 + 20px));
  padding-right: max(20px, calc((100vw - 1000px) / 2 + 20px));
}

/* セクション外の横スクロールは出さない（カードのはみ出しは表示） */
html,
body {
  overflow-x: clip;
}

.oem-detailed-card {
  flex: 0 0 300px;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 24px;
  padding: 30px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.07);
  height: auto;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.oem-detailed-card.animated-border::before {
  content: "";
  position: absolute;
  z-index: -2;
  left: -50%;
  top: -50%;
  width: 200%;
  height: 200%;
  background-color: transparent;
  background-repeat: no-repeat;
  background-position: center;
  /* Comet-like gradient */
  background-image: conic-gradient(
    from 180deg,
    transparent 0,
    transparent 270deg,
    rgba(0, 234, 255, 0.5) 340deg,
    var(--accent) 358deg,
    white 360deg
  );
  animation: rotate 6s linear infinite;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  filter: blur(2px); /* Soft glow */
}
.oem-detailed-card.animated-border:hover::before {
  opacity: 1;
}
.oem-detailed-card.animated-border::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: 3px;
  top: 3px;
  width: calc(100% - 6px);
  height: calc(100% - 6px);
  background: white;
  border-radius: 21px;
}

.oem-detailed-card .feature-card-icon {
  margin-bottom: 20px;
}
.oem-detailed-card .step-label {
  color: var(--text-sub);
}
.oem-detailed-card .feature-card-title {
  color: var(--accent);
  font-size: 1.5rem;
  margin-bottom: 15px;
}
.oem-detailed-card .feature-card-desc {
  color: var(--text-sub);
  flex-grow: 1;
}

/* ------------------------------------------
   Service 3: Brand "Noah.Q"
   ------------------------------------------ */

.service-brand {
  position: relative;
}

/* 全体ラッパー */
.noah-wrapper {
  max-width: 1100px;
  margin: 0 auto;
}

/* 上段：テキスト＋キービジュアル */
.noah-top-layout {
  display: flex;
  align-items: stretch;
  gap: 48px;
  margin-bottom: 48px;
}

/* 左側テキスト */
.noah-top-left {
  flex: 1.2;
}

.noah-top-left .main-copy {
  margin-bottom: 16px;
}

.noah-top-left .sub-copy {
  margin-top: 0;
  font-size: 0.95rem;
  color: var(--text-sub);
  max-width: 36em;
}

/* 公式サイト / Amazon ボタン */
.noah-link-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.noah-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 170px;
  padding: 10px 22px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: #ffffff;
  color: var(--text-main);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease,
    color 0.2s ease;
}

.noah-btn.primary {
  background: var(--noah-brand);
  color: #ffffff;
  border-color: var(--noah-brand);
}

.noah-btn.ghost {
  background: #ffffff;
  color: var(--noah-brand);
  border-color: rgba(82, 27, 146, 0.25);
}

.noah-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 35px rgba(0, 0, 0, 0.16);
}

/* 右側：写真キービジュアルカード */
.noah-key-visual-card {
  flex: 1;
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

/* アスペクト比を固定（画像が巨大化しないように） */
.noah-key-visual-card::before {
  content: "";
  display: block;
  padding-top: 75%; /* 縦横比 4:3 相当 */
}

/* 写真とオーバーレイ */
.noah-photo-wrapper {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.noah-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.08);
  animation: noah-photo-zoom 16s ease-in-out infinite alternate;
}

.noah-photo-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      circle at top left,
      rgba(82, 27, 146, 0.55),
      transparent 55%
    ),
    linear-gradient(135deg, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.4));
  mix-blend-mode: soft-light;
  pointer-events: none;
}

/* 下段：4つの機能カード */
.noah-feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.noah-feature-card {
  background: #ffffff;
  border-radius: 18px;
  padding: 20px 18px 22px;
  border: 1px solid rgba(0, 0, 0, 0.04);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  height: 100%;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.noah-feature-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.12);
  border-color: rgba(82, 27, 146, 0.25);
}

.noah-feature-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  margin-bottom: 8px;
  text-transform: uppercase;
}
.noah-card-title {
  margin: 0 0 10px 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--noah-brand);
}

/* タイトル / 説明文は既存の .feature-card-title / .feature-card-desc を流用 */

/* 画像のゆるいズームアニメーション */
@keyframes noah-photo-zoom {
  0% {
    transform: scale(1.05) translate3d(0, 0, 0);
  }
  50% {
    transform: scale(1.12) translate3d(4px, -4px, 0);
  }
  100% {
    transform: scale(1.05) translate3d(0, 0, 0);
  }
}

/* レスポンシブ調整 */
@media (max-width: 960px) {
  .noah-top-layout {
    flex-direction: column;
    gap: 32px;
  }

  .noah-key-visual-card {
    max-width: 520px;
    margin: 0 auto;
  }

  .noah-feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .noah-feature-grid {
    grid-template-columns: 1fr;
  }
}

/* その他 */
.value-prop-card {
  grid-column: span 2;
  grid-row: span 1;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  border-radius: 8px;
  padding: 20px;
}
.value-prop-text {
  font-size: 1.2rem;
  text-align: center;
  margin: 0;
  line-height: 1.7;
}
.outside-text {
  font-size: 1.5rem;
  text-align: center;
  margin: 0;
  line-height: 1.8;
}

.outside-text-container {
  margin-top: 20px;
  font-size: 1rem;
  color: var(--text-main);
  text-align: center;
}

@keyframes text-flow {
  0% {
    transform: translateX(2%);
  }
  100% {
    transform: translateX(-2%);
  }
}

.animated-text-flow {
  display: inline-block;
  animation: text-flow 10s ease-in-out infinite alternate;
  padding: 0 20px;
}

.stats-notes {
  font-size: 0.85rem;
  color: var(--text-sub);
  opacity: 0.8;
}

footer {
  text-align: center;
  padding: 60px;
  font-size: 12px;
  opacity: 0.6;
}

@media (max-width: 768px) {
  .header {
    padding: 12px 16px;
    gap: 12px;
  }
  .logo {
    font-size: 20px;
  }
  .lang-btn {
    padding: 4px 10px;
    font-size: 11px;
  }
  .hero {
    padding-top: 100px;
  }
  .hero h1 {
    font-size: 2.5rem;
  }
  .hero p {
    font-size: 1rem;
    padding: 0 20px;
  }
  .section-bg-text {
    font-size: 3rem;
  }
  .section-title {
    font-size: 1.8rem;
  }
  .unified-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .card-link {
    max-width: none;
  }
  .card {
    max-width: none;
  }
  .card,
  .number-card {
    height: auto;
    min-height: 200px;
    padding: 30px 20px;
  }
  .trading-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .feature-card {
    padding: 20px;
  }
  .value-prop-card {
    grid-column: span 1;
  }
  .value-prop-text {
    font-size: 1rem;
  }
  .outside-text {
    font-size: 1.2rem;
  }
  .outside-text-container {
    padding: 0 20px;
  }
  .text-block {
    padding: 0 20px;
  }
  .main-copy {
    font-size: 1.1rem;
  }
  .sub-copy {
    font-size: 0.95rem;
  }
  .office-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    padding: 25px 20px;
  }
  .office-contact-group {
    width: 100%;
    justify-content: flex-start;
    flex-direction: column;
    gap: 15px;
  }
  .contact-link {
    font-size: 0.9rem;
  }
  .chart-container {
    padding: 20px;
    height: 350px;
  }
  .stats-notes {
    font-size: 0.75rem;
    padding: 0 20px;
    text-align: center;
  }
}
