/* ======================================================================
   Seitaro Arai — Unified Stylesheet
   Path: /in/css/layout.css
   Purpose: Global layout helpers (container, sections, grids)
   ====================================================================== */


/* ======================================================================
   01) Container
   - ページの横幅を制限し中央寄せ
   - 左右パディングは流体値（clamp）
   ====================================================================== */
.container {
  max-width: var(--max);
  margin-top: 0;
  margin-right: auto;     /* margin-inline: auto をロングハンド化 */
  margin-bottom: 0;
  margin-left: auto;
  padding-top: 0;
  padding-right: clamp(16px, 4vw, 24px);  /* padding-inline をロングハンド化 */
  padding-bottom: 0;
  padding-left: clamp(16px, 4vw, 24px);
}


/* ======================================================================
   02) Section Blocks
   - セクション上下の共通パディング
   - 代替背景（.section.alt）
   ====================================================================== */
.section {
  padding-top: 84px;
  padding-right: 0;
  padding-bottom: 84px;
  padding-left: 0;
}

.section.alt {
  background-color: var(--bg-alt);
  background-image: none;
  background-repeat: no-repeat;
  background-position: 0% 0%;
  background-size: auto;
}


/* ======================================================================
   03) Grid System (Utility)
   - 共通グリッドと列バリエーション
   - PC 基準（≥1200px）を既定とし、下部の @media で縮小対応
   ====================================================================== */

/* 汎用グリッド（ギャップは固定24px） */
.grid {
  display: grid;
  gap: 24px;
  grid-auto-flow: row;
  grid-auto-rows: auto;
}

/* 2カラム */
.grid.two {
  grid-template-columns: 1fr 1fr;
}

/* 3カラム */
.grid.three {
  grid-template-columns: repeat(3, 1fr);
}


/* ======================================================================
   04) Media Queries（集約セクション）
   - 統一ルール：
     @media (max-width: 860px)       →  @media (max-width: 920px)
     @media (min-width: 921px)       →  @media (min-width: 920px)
     @media (max|min-width: 1100px)  →  @media (max-width: 1200px)
   - すべてのメディアクエリは「最下部」に集約
   - ここでは “PC基準からの縮小” を段階的に適用
   ====================================================================== */

/* < 1200px：3カラム → 2カラム、ヒーロー高の軽微調整 */
@media (max-width: 1200px) {
  .grid.three {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero {
    min-height: 56vh;
  }
}

/* < 920px：ナビ切替・サイドバー落とし（レイアウト列を単一化） */
@media (max-width: 920px) {
  /* 水平ナビを隠しハンバーガーを出す（責務は layout に集約） */
  .nav-links {
    display: none;
  }

  .hamburger {
    display: block;
  }
}

/* < 768px：すべて 1 カラム化、タイポ・スタックの最適化 */
@media (max-width: 768px) {
  .grid.two {
    grid-template-columns: 1fr;
  }

  .grid.three {
    grid-template-columns: 1fr;
  }

  /* 大見出しは可読行長を優先して少し縮小 */
  h1 {
    font-size: clamp(24px, 6vw, 32px);
    line-height: 1.20;
  }

  /* Cookie 内部の並びは縦積みに変更（視覚ノイズ低減） */
  .cookie-inner {
    display: flex;          /* 念のため明示 */
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 8px;
  }
}
