/* =========================================================
   0) Reset / Base（軽量）
========================================================= */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

html {
  scroll-behavior: smooth;
}

:root {
  --sa-top: env(safe-area-inset-top);
  --sa-bottom: env(safe-area-inset-bottom);

  --text: #222;
  --bg: #fcf7f5;
  --line: rgba(0, 0, 0, 0.08);

  --brand-deep: #000820;
  --nav-bg: #ffffff;

  --shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans JP", sans-serif;
  color: var(--text);
  background: var(--bg);
}

/* ページ全体：PCは横幅を抑えて見やすく */
.page {
  width: min(980px, 100%);
  margin: 0 auto;
  padding-top: 72px; /* fixed header 分 */
}

/* =========================================================
   1) Header（固定）
========================================================= */
.global-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1000;
  background: #fef9f9;
  padding: calc(8px + var(--sa-top)) 16px 8px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.header-logo img {
  height: 48px;
  width: auto;
}

.hamburger {
  background: none;
  border: none;
  padding: 6px;
  cursor: pointer;
}

.hamburger img {
  width: 40px;
  height: 40px;
}

/* =========================================================
   2) Drawer Navigation（必要最小限）
========================================================= */
.global-nav {
  position: fixed;
  inset: 0 0 0 auto;
  width: 78%;
  max-width: 420px;
  background: #fef9f9;
  color: #333;

  transform: translateX(100%);
  transition: transform 0.25s ease;
  z-index: 1100;

  padding: calc(16px + var(--sa-top)) 20px 20px;
}

.global-nav.open {
  transform: translateX(0);
}

.nav-close {
  position: absolute;
  top: calc(10px + var(--sa-top));
  right: 12px;
  background: none;
  border: none;
  color: #333;
  font-size: 28px;
  cursor: pointer;
}

.global-nav ul {
  list-style: none;
  margin-top: 40px;
  display: grid;
  gap: 18px;
}

.global-nav a {
  color: #333;
  text-decoration: none;
  font-weight: 800;
  font-size: 30px;
  letter-spacing: 0.02em;
}

.global-nav img {
  height: 28px;
  width: auto;
}

/* スマホ：ドロワーを全画面に */
@media (max-width: 768px) {
  .global-nav {
    width: 100%;
    max-width: none;
  }
  .global-nav ul {
    text-align: center;
  }
}

/* =========================================================
   3) To Top ボタン（右下固定）
========================================================= */
.to-top {
  position: fixed;
  right: 16px;
  bottom: calc(16px + var(--sa-bottom));
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;

  border-radius: 50%;
  background: #fcf7fb;
  color: #605653;
  text-decoration: none;
  font-weight: 900;
  font-size: 18px;

  box-shadow: var(--shadow);

  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 1200;
}

.to-top.is-show {
  opacity: 1;
  pointer-events: auto;
}

.to-top:hover {
  transform: translateY(-2px);
}

/* =========================================================
   4) Hero（画像5枚スライド / CSSのみ）
   - スマホ：縦長でも破綻しないよう cover
   - PC：最大幅 980px の中で見やすい比率に
========================================================= */

.hero {
  width: 100%;
  background: #f8f6f6;
  border-radius: 10px;
  overflow: hidden;
}

/* 5枚を縦に並べる */
.hero-stack {
  display: grid;
  gap: 0; /* 画像同士をピッタリ繋げる */
}

.hero-stack img {
  width: 100%;
  height: auto;
  display: block;
}

/* PC：横長でも見やすい比率に寄せる */
@media (min-width: 900px) {
  .hero-slides {
    aspect-ratio: 16 / 9;
  }
}

/* =========================================================
   5) Design（タブ式スライダー）
========================================================= */
.design-sec {
  background: #f8f1f2;
  padding: 40px 16px 48px;
}

.design-inner {
  width: 100%;
  margin: 0 auto;
}

.design-title {
  text-align: center;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: #222;
  font-size: clamp(22px, 6vw, 36px);
  margin-bottom: 18px;
}

.design-tab {
  display: none;
}

.design-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.design-btn {
  display: grid;
  place-items: center;
  height: 46px;

  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: #fff;

  font-weight: 800;
  color: #222;
  cursor: pointer;
  user-select: none;
}

.design-slider {
  position: relative;
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
  background: #e9ecef;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);

  /* これをやめる（見切れの原因） */
  /* aspect-ratio: 16 / 9; */

  /* 代わりに「高さを可変」にする */
  height: clamp(360px, 70vh, 760px);
}

.design-slider .slide {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;

  opacity: 0;
  transform: scale(1.01);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.design-slider .slide img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* ★全体が入る */
  border-radius: 10px;
  box-shadow: none; /* もし重いなら消す（軽量化） */
}

/* 表示切替 */
#tab-site:checked ~ .design-slider .slide-site,
#tab-logo:checked ~ .design-slider .slide-logo,
#tab-banner:checked ~ .design-slider .slide-banner,
#tab-flyer:checked ~ .design-slider .slide-flyer {
  opacity: 1;
  transform: none;
}

/* アクティブ見た目（軽量：枠だけ） */
#tab-site:checked ~ .design-tabs [for="tab-site"],
#tab-logo:checked ~ .design-tabs [for="tab-logo"],
#tab-banner:checked ~ .design-tabs [for="tab-banner"],
#tab-flyer:checked ~ .design-tabs [for="tab-flyer"] {
  outline: 3px solid rgba(19, 107, 191, 0.22);
  border-color: rgba(19, 107, 191, 0.45);
}

/* 矢印（labelでタブを切替） */
.nav-arrows label {
  position: absolute;
  top: 50%;
  width: 44px;
  height: 44px;
  margin-top: -22px;

  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
  cursor: pointer;
  display: none;
}

.nav-arrows .prev { left: 12px; }
.nav-arrows .next { right: 12px; }

.nav-arrows .prev::after,
.nav-arrows .next::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 10px;
  height: 10px;
  border: 3px solid #222;
  border-top-color: transparent;
  border-right-color: transparent;
  transform: rotate(45deg);
}

.nav-arrows .next::after {
  transform: rotate(-135deg);
}

#tab-site:checked ~ .design-slider .nav-arrows .from-site,
#tab-logo:checked ~ .design-slider .nav-arrows .from-logo,
#tab-banner:checked ~ .design-slider .nav-arrows .from-banner,
#tab-flyer:checked ~ .design-slider .nav-arrows .from-flyer {
  display: block;
}

/* タブ：極小端末の圧迫を軽減 */
@media (max-width: 360px) {
  .design-tabs {
    gap: 8px;
  }
  .design-btn {
    font-size: 14px;
  }
}

/* =========================================================
   6) Demo（画像羅列：軽量）
   - PCでも大きすぎないよう page 幅に合わせる
========================================================= */
.demo {
  background: #eaeaea;
  padding: 0;
}

.demo a img {
  display: block;
}

/* =========================================================
   PC表示：1枚キャンバス化（marugame風）
   ・スマホはそのまま
   ・外側に薄いベージュ
   ・中央に白い細い1カラム
========================================================= */

@media (min-width: 1024px) {

  /* 外側背景 */
  body {
    background: #f3ede7; /* 薄いベージュ */
  }

  /* 中央キャンバス */
  .page {
    max-width: 720px;       /* 細く */
    width: 100%;
    margin: 40px auto;      /* 上下に余白をつくる */
    background: #ffffff;    /* 白い1カラム */
    border-radius: 16px;    /* 少し丸み */
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.08);
    overflow: hidden;       /* 角丸維持 */
  }

  /* ヘッダーもキャンバス幅に揃える */
  .global-header {
    max-width: 720px;
    margin: 0 auto;
    left: 0;
    right: 0;
    border-radius: 16px 16px 0 0;
  }

  /* Heroや各セクションの左右余白を少し整える */
  .hero,
  .design-sec,
  .demo {
    padding-left: 24px;
    padding-right: 24px;
  }

}
