@charset "UTF-8";

/* ==========================================================================
  Reset & Base Settings
  =========================================================================== */
:root {
  /* Colors - Monochrome (Black & Gray) Palette */
  --primary-blue: #1a1a1a;
  --dark-blue: #111111;
  --light-blue: #f5f5f5;
  --accent-gold: #fcdb0f;
  --accent-red: #af0005;
  --text-dark: #333333;
  --text-light: #ffffff;
  --bg-gray: #f5f5f5;
  --border-color: #dddddd;

  /* Font Sizes */
  --font-size-base: 16px;
  
  /* Type variants */
  --type-green: #43a047;
  --type-purple: #673ab7;
  --type-orange: #ff9800;
  --type-blue: #555555;
}

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

html {
  font-size: var(--font-size-base);
  font-family: 'Noto Sans JP', sans-serif;
  color: var(--text-dark);
  scroll-behavior: smooth;
}

body {
  line-height: 1.6;
  background-color: var(--bg-gray);
  /* 保険。overflow-x:hidden は position:sticky を壊す環境があるため clip を使う */
  overflow-x: clip;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: opacity 0.3s;
}

a:hover {
  opacity: 0.8;
}

ul, ol {
  list-style: none;
}

/* ==========================================================================
  Typography
  =========================================================================== */
.txt-sm { font-size: 0.875rem; }
.txt-md { font-size: 1rem; }
.txt-lg { font-size: 1.125rem; }
.txt-xl { font-size: 1.5rem; }
.txt-bold { font-weight: 700; }
.txt-center { text-align: center; }
.txt-blue { color: var(--primary-blue); }

/* ==========================================================================
  Layout Components
  =========================================================================== */
.wrapper {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}

.inner {
  width: 100%;
  max-width: 1010px;
  padding: 0 20px;
  margin: 0 auto;
}

.section {
  padding: 4rem 0;
}

.section-ttl {
  text-align: center;
  margin-bottom: 2.5rem;
  font-size: 2rem;
  font-weight: bold;
}

.section-ttl span {
  display: block;
}

/* 見出しの下に添える説明行。
   元サイトの「海外FX10社の安全性比較表／ライセンス番号・資金管理・金融庁リスト」
   と同じ、メイン＋サブの2段構成をつくる。 */
.section-ttl--sub {
  display: block;
  font-size: 0.9375rem;
  font-weight: 500;
  color: #666;
  letter-spacing: 0.02em;
  margin-top: 0.75rem;
  line-height: 1.6;
}

/* 表の1列目に添えるロゴ。4つの比較表で同じ見た目に揃える。 */
.cell-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.cell-logo {
  flex-shrink: 0;
  width: 72px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid #ececec;
  border-radius: 6px;
  padding: 3px 5px;
}

.cell-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.cell-name {
  min-width: 0;
}

@media (max-width: 768px) {
  .cell-logo {
    width: 56px;
    height: 26px;
  }
}

/* リード文とイラストを横に並べる導入ブロック。
   元サイトの z-block（画像とテキストを左右に置く作り）を、
   セクション冒頭向けに軽くしたもの。 */
.section-intro {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  max-width: 940px;
  margin: 0 auto 2.5rem;
}

.section-intro__text {
  flex: 1;
  min-width: 0;
  line-height: 1.95;
}

.section-intro__visual {
  width: 34%;
  flex-shrink: 0;
}

.section-intro__visual img {
  width: 100%;
  height: auto;
  display: block;
}

.section-intro--reverse {
  flex-direction: row-reverse;
}

/* 横長の写真バナー */
.banner-photo {
  max-width: 940px;
  margin: 0 auto 2.5rem;
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  aspect-ratio: 850 / 300;
}

.banner-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 900px) {
  .section-intro {
    flex-direction: column;
    gap: 1.5rem;
  }

  .section-intro--reverse {
    flex-direction: column;
  }

  .section-intro__visual {
    width: 70%;
    max-width: 320px;
    margin: 0 auto;
  }

  .banner-photo {
    aspect-ratio: 16 / 9;
    border-radius: 10px;
  }
}

/* ステップ見出し。元サイトの「安全性を確認する4つの手順」の作りを踏襲する。 */
.step-head {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin: 2.75rem 0 1.25rem;
}

.step-head__num {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--dark-blue);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.0625rem;
  font-family: 'Inter', sans-serif;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.18);
}

/* ステップ見出しに添える小さなアイコン */
.step-head__icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.step-head__icon img {
  width: 90%;
  height: 90%;
  object-fit: contain;
}

.step-head__ttl {
  flex: 1;
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--primary-blue);
  line-height: 1.55;
  padding-bottom: 0.5rem;
  border-bottom: 1px dashed #d6d6d6;
  align-self: center;
}

@media (max-width: 768px) {
  .step-head {
    gap: 0.75rem;
  }

  .step-head__num {
    width: 32px;
    height: 32px;
    font-size: 0.9375rem;
  }

  .step-head__icon {
    display: none;
  }

  .step-head__ttl {
    font-size: 1.125rem;
  }
}

/* セクション見出し。
   以前はこの2クラスが配信されない src/styles/global.css 側にしか無く、
   index.astro の scoped style だけが効いていたため、各コンポーネントの
   「＼ 〇〇 ／」が未装飾のまま出ていた。全セクションで揃うようここに置く。 */
.section-title-wrapper {
  text-align: center;
  margin-bottom: 3.5rem;
}

.sub-ttl {
  display: block;
  font-size: 0.9375rem;
  font-weight: 800;
  color: var(--primary-blue);
  letter-spacing: 0.12em;
  margin-bottom: 0.75rem;
}

/* ==========================================================================
  Decorations
  元テンプレの装飾語彙。複数のセクションで使い回す。
  =========================================================================== */

/* 見出しの上に置く短いアクセント線 */
.accent-line {
  display: block;
  width: 48px;
  height: 4px;
  background: var(--primary-blue);
  border-radius: 999px;
  margin: 2.75rem 0 1rem;
}

.accent-line--center {
  margin-left: auto;
  margin-right: auto;
}

/* 本文中のマーカー下線 */
.marker-blue {
  background: linear-gradient(transparent 60%, #e4e4e4 60%);
  font-weight: 700;
  color: var(--text-dark);
}

/* 背景に敷く大きな連番 */
.ghost-number {
  position: absolute;
  top: -2.25rem;
  left: -0.5rem;
  font-size: 5rem;
  font-weight: 900;
  font-family: 'Inter', sans-serif;
  color: #f0f0f0;
  line-height: 1;
  z-index: 0;
  pointer-events: none;
  user-select: none;
}

/* 角に敷くドット模様 */
.dot-decoration {
  position: absolute;
  width: 100px;
  height: 100px;
  background-image: radial-gradient(#c9c9c9 2px, transparent 2px);
  background-size: 16px 16px;
  z-index: 0;
  pointer-events: none;
}

.dot-decoration--tl {
  top: -14px;
  left: -14px;
}

.dot-decoration--br {
  right: -14px;
  bottom: -14px;
}

/* リボン型のラベル */
.ribbon {
  position: relative;
  display: inline-flex;
  justify-content: center;
  margin-bottom: 0.75rem;
}

.ribbon span {
  background: var(--primary-blue);
  color: #fff;
  font-weight: 700;
  font-size: 0.8rem;
  padding: 0.35rem 2rem;
  letter-spacing: 0.15em;
  position: relative;
  z-index: 2;
}

.ribbon::before,
.ribbon::after {
  content: '';
  position: absolute;
  top: 8px;
  z-index: 0;
  border-style: solid;
  border-color: var(--primary-blue);
}

.ribbon::before {
  left: -14px;
  border-width: 12px 10px 12px 14px;
  border-left-color: transparent;
}

.ribbon::after {
  right: -14px;
  border-width: 12px 14px 12px 10px;
  border-right-color: transparent;
}

/* ==========================================================================
  Common Components
  =========================================================================== */
.btn-main {
  display: inline-block;
  background-color: var(--accent-red);
  color: var(--text-light);
  padding: 1rem 2rem;
  border-radius: 8px;
  font-weight: bold;
  text-align: center;
  box-shadow: 0 4px 0 #8b0000;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.btn-main:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

.btn-main:active {
  transform: translateY(1px);
  box-shadow: 0 2px 0 #8b0000;
}

.btn-main--blue {
  background-color: var(--primary-blue);
  box-shadow: 0 4px 0 #000000;
}

/* Symbol Icons */
.symbol {
  font-size: 1.25rem;
  font-weight: bold;
}
.symbol-double { color: var(--accent-red); } /* ◎ */
.symbol-circle { color: var(--primary-blue); } /* ○ */
.symbol-triangle { color: #b26a00; } /* △ */
.symbol-cross { color: #999999; } /* × */

.ad-label {
  display: inline-block;
  background: #999;
  color: #fff;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 2px;
  line-height: 1;
}

/* ==========================================================================
  Scroll Reveal
  Layout.astro の IntersectionObserver が .is-active を付ける。

  重要: 隠す指定は html.js-reveal が付いているときだけ効かせる。
  JS が動かない環境や監視が発火しなかった場合に、本文が永久に
  opacity:0 のまま消えるのを防ぐため。
  =========================================================================== */
.js-reveal .reveal {
  opacity: 0;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.js-reveal .reveal-up {
  transform: translateY(24px);
}

.js-reveal .reveal.is-active {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .js-reveal .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ==========================================================================
  Responsive Utilities
  =========================================================================== */
@media (max-width: 768px) {
  .section {
    padding: 2.5rem 0;
  }

  .ghost-number {
    font-size: 3.5rem;
    top: -1.75rem;
  }

  .dot-decoration {
    width: 70px;
    height: 70px;
  }
}
