/* ============================================================
   YOSSY式 トレーダー適性研究所 — layout.css
   役割：全ページ共通の骨格（Header / Footer / セクション見出し）
   ============================================================ */

/* ---------------------------------------------
   1. Site Header
--------------------------------------------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-header);
  padding: 18px var(--gutter) 0;
}

.site-header__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  border: 1px solid rgba(201, 170, 94, 0.16);
  border-radius: var(--radius-m);
  background: rgba(11, 13, 18, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.site-header__brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-header__mark {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
}

.site-header__mark-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 6px rgba(50, 200, 255, 0.25));
}

.site-header__wordmark {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.site-header__wordmark-en {
  font-family: var(--font-en);
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--color-gold);
}

.site-header__wordmark-ja {
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
}

.site-header__status {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-en);
  font-size: var(--fs-label-s);
  letter-spacing: var(--tracking-en);
  color: var(--color-text-faint);
}

.site-header__status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-neon);
  box-shadow: 0 0 8px 1px var(--color-neon-soft);
  animation: pulse-dot 2.4s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

@media (max-width: 560px) {
  .site-header__status {
    display: none;
  }
}

/* ---------------------------------------------
   2. Section Head (shared heading pattern)
   Used on the home page's researcher section and
   reused verbatim on question / result pages.
--------------------------------------------- */
/* 全セクション共通の縦リズム。--section-pad-y を1箇所変えれば
   ページ全体の呼吸が揃う。 */
.section {
  position: relative;
  padding: var(--section-pad-y) var(--gutter);
}

.section__inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

/* 読ませる文章中心のセクションは幅を絞る */
.section__inner--read {
  max-width: var(--max-width-read);
}

/* 全画面をひとつの舞台として使うレイアウト。
   Loading のような「そのページに1つの体験しかない」画面で使う。
   ヘッダー / フッターの高さぶんは padding で確保する。 */
.screen {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 112px var(--gutter) 80px;
  overflow: hidden;
  isolation: isolate;
}

.screen__inner {
  width: 100%;
  max-width: var(--max-width-read);
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* セクション間の仕切り（髪の毛一本ぶんの金線） */
.section--divided {
  border-top: 1px solid rgba(201, 170, 94, 0.1);
}

.section-head {
  text-align: center;
  max-width: var(--max-width-read);
  margin: 0 auto var(--space-8);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.section-head__eyebrow {
  font-family: var(--font-en);
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: var(--tracking-en-wide);
  color: var(--color-gold);
  margin-bottom: var(--space-4);
}

.section-head__title {
  font-size: var(--fs-h2);
  font-weight: 700;
  line-height: 1.6;
  letter-spacing: var(--tracking-ja);
  margin-bottom: var(--space-4);
  /* 行末に1〜2文字だけ取り残されるのを防ぐ */
  text-wrap: balance;
  line-break: strict;
}

.section-head__lead {
  font-size: var(--fs-body-s);
  color: var(--color-text-muted);
  line-height: 2.1;
  text-wrap: pretty;
  line-break: strict;
}

/* 狭い画面では強制改行を無効化し、自然な折り返しに任せる */
@media (max-width: 700px) {
  .section-head__break {
    display: none;
  }
}

/* ---------------------------------------------
   3. Site Footer
--------------------------------------------- */
.site-footer {
  border-top: 1px solid rgba(201, 170, 94, 0.12);
  padding: 40px var(--gutter) 48px;
}

.site-footer__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}

.site-footer__brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-footer__mark {
  width: 22px;
  height: 22px;
}

.site-footer__mark-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 5px rgba(50, 200, 255, 0.2));
}

.site-footer__name {
  font-size: var(--fs-body-s);
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
}

/* 免責。目立たせないが、必ず読める濃さにする。 */
.site-footer__note {
  max-width: 34em;
  font-size: var(--fs-caption);
  line-height: 1.9;
  letter-spacing: 0.03em;
  color: var(--color-text-faint);
  text-wrap: pretty;
  line-break: strict;
}

/* 狭い画面では、2文の切れ目の明示的な改行をやめる（折り返しに任せる） */
@media (max-width: 560px) {
  .site-footer__break {
    display: none;
  }
}

.site-footer__copy {
  font-family: var(--font-en);
  font-size: var(--fs-label);
  letter-spacing: 0.06em;
  color: var(--color-text-faint);
}

/* ---------------------------------------------
   4. Responsive fine-tuning (layout-level)
--------------------------------------------- */
@media (min-width: 1440px) {
  :root {
    --max-width: 1280px;
  }
}
