/* ===================================================
   top.css - トップページ専用スタイル
   CENTURY21ココカラ
   =================================================== */

/* ===== Hero Section ===== */
.hero {
  height: 100vh;
  min-height: 700px;
  position: relative;
  overflow: hidden;
  color: #fff;
}
.hero-slider {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  z-index: -2;
}
.hero-slide {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.5s ease;
  transform: scale(1);
}
.hero-slide.active {
  opacity: 1;
  animation: subtleZoom 8s infinite alternate linear;
}
@keyframes subtleZoom {
  0% { transform: scale(1.0); }
  100% { transform: scale(1.08); }
}
.hero-overlay {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(to bottom, rgba(0,0,0,0.1), rgba(0,0,0,0.3));
  z-index: -1;
}
.hero::after {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
  background:
    linear-gradient(to right, var(--bg-body, #FAFAF8) 0%, transparent 10%),
    linear-gradient(to left,  var(--bg-body, #FAFAF8) 0%, transparent 10%);
  opacity: 0;
  transition: opacity 0.3s;
}
@media (min-width: 1280px) {
  .hero::after {
    opacity: 1;
  }
}
.hero-content-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 1600px;
  margin: 0 auto;
}

/* キャッチコピー */
.hero-catch {
  position: absolute;
  left: 70%;
  top: 25%;
  writing-mode: vertical-rl;
  text-orientation: upright;
  font-family: var(--font-serif);
  font-size: clamp(32px, 4vw, 56px);
  line-height: 2.2;
  letter-spacing: 0.2em;
  font-weight: 700;
  text-shadow: 0 4px 24px rgba(0,0,0,0.5);
  height: auto;
}
.catch-line {
  display: inline-block;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1s ease, transform 1s ease;
}
.hero-loaded .catch-line:nth-child(1) { transition-delay: 0.5s; opacity: 1; transform: translateY(0); }
.hero-loaded .catch-line:nth-child(2) { transition-delay: 1.2s; opacity: 1; transform: translateY(0); }
.hero-loaded .catch-line:nth-child(3) { transition-delay: 1.9s; opacity: 1; transform: translateY(0); }

.hero-news {
  position: absolute;
  left: 5%;
  bottom: 8%;
  width: 600px;
  max-width: 85vw;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: var(--radius-md);
  padding: 24px 28px;
  font-size: 14px;
  color: #fff;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1s ease 2.8s, transform 1s ease 2.8s;
}
.hero-loaded .hero-news { opacity: 1; transform: translateY(0); }

.hero-news ul { list-style: none; margin: 0; padding: 0; }
.hero-news li { margin-bottom: 12px; }
.hero-news li:last-child { margin-bottom: 0; }
.hero-news a { display: flex; align-items: center; gap: 16px; color: #fff; width: 100%; font-weight: 500; }
.hero-news a:hover { opacity: 0.8; text-decoration: underline; }

.news-badge {
  flex: 0 0 80px; text-align: center; background: var(--accent);
  padding: 4px 0; border-radius: 4px; font-size: 11px; font-weight: 700;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.news-date { flex: 0 0 90px; font-size: 13px; font-family: var(--font-sans); opacity: 1; font-weight: 700; }
.news-title { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }

/* インジケーター位置調整 */
.hero-bg-indicators {
  position: absolute;
  left: auto;
  right: 18%;
  bottom: 10%;
  display: flex;
  flex-direction: row;
  gap: 16px;
  z-index: 10;
}
.bg-indicator {
  width: 40px;
  height: 3px;
  background: rgba(255,255,255,0.3);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: background 0.3s;
}
.bg-indicator::after {
  content: '';
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 100%;
  background: #fff;
  transform: translateX(-100%);
  transition: transform 0s;
}
.bg-indicator.active::after {
  transform: translateX(0);
  transition: transform 6s linear;
}
.bg-indicator:hover {
  background: rgba(255,255,255,0.6);
}

.scroll-down {
  position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: #fff; font-size: 12px; letter-spacing: 0.1em; opacity: 0.9; font-weight: 700;
  animation: float 2s infinite; z-index: 2;
}
.scroll-line { width: 2px; height: 40px; background: #fff; }
@keyframes float { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 10px); } }

/* ===== Concept ===== */
.concept {
  padding: 180px 0;
  position: relative;
  background-image: url('../images/about_eyecatch.png');
  background-attachment: fixed;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  background-color: #333;
  color: #fff;
}
.concept::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.55);
}
.concept-container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.concept-content-wrapper {
  max-width: 640px;
  padding: 40px 0;
}
.concept-label {
  display: block;
  font-size: 14px;
  letter-spacing: 0.25em;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 30px;
  opacity: 0.9;
}
.concept-heading {
  font-family: var(--font-serif);
  font-size: 40px;
  line-height: 1.6;
  letter-spacing: 0.08em;
  margin-bottom: 40px;
  color: #fff;
  font-weight: 700;
  text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}
.concept-body {
  font-size: 16px;
  line-height: 2.2;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 30px;
}
.concept-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,0.8);
  padding-bottom: 4px;
  transition: opacity 0.3s, gap 0.3s;
  margin-top: 20px;
}
.concept-link:hover {
  opacity: 0.8;
  gap: 20px;
  border-bottom-color: #fff;
}

/* ===== Services (Playful Collage Ver.) ===== */
.services { background: #fff; overflow: hidden; padding-bottom: 160px; }

.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: 320px;
  gap: 30px;
}

/* 3つのカードは横並び */
.bento-item { grid-column: span 1; }

/* 共通カードスタイル */
.bento-item {
  display: block;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.4s;
  box-shadow: 0 10px 30px rgba(0,0,0,0.06);
  border: 1px solid rgba(0,0,0,0.03);
}

.bento-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.12);
}

/* 形状のバリエーション */
.bento-item.buy { border-radius: 60px 4px 60px 4px; }
.bento-item.sell { border-radius: 140px 140px 4px 4px; }
.bento-item.reno { border-radius: 4px 4px 4px 60px; }
.bento-item.other { border-radius: 30px; }

/* 背景画像設定 */
.bento-bg {
  width: 100%; height: 100%;
  background-size: cover; background-position: center;
  position: relative;
  transition: transform 0.6s ease;
}
.bento-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: background 0.4s ease;
  z-index: 1;
}
.bento-item:hover .bento-bg { transform: scale(1.08); }
.bento-item:hover .bento-bg::after { background: rgba(255,255,255,0.15); }

/* コンテンツ配置とオーバーレイ */
.bento-content {
  position: absolute; inset: 0;
  padding: 30px;
  display: flex; flex-direction: column; justify-content: flex-end;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 10%, transparent 60%);
  z-index: 2;
  transition: background 0.3s;
}

/* 巨大数字 */
.bento-big-num {
  position: absolute;
  top: -15px; left: 10px;
  font-size: 140px;
  font-weight: 900;
  line-height: 0.8;
  font-family: var(--font-sans);
  color: rgba(255,255,255,0.15);
  pointer-events: none;
  z-index: 1;
  transform: rotate(-5deg);
}

/* テープ風ラベル */
.bento-tape {
  position: absolute;
  top: 20px; right: 20px;
  background: #fff;
  color: var(--text-main);
  padding: 6px 16px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  box-shadow: 2px 2px 5px rgba(0,0,0,0.1);
  transform: rotate(2deg);
  z-index: 3;
}
.bento-item.sell .bento-tape { top: 40px; right: 50%; transform: translateX(50%) rotate(0deg); }

/* テキストスタイル */
.bento-title {
  font-family: var(--font-serif);
  font-size: 28px; font-weight: 700; margin-bottom: 8px; color: #fff;
  position: relative; z-index: 3;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}
.bento-desc {
  font-size: 13px; font-weight: 500; color: rgba(255,255,255,0.9); line-height: 1.6;
  position: relative; z-index: 3;
}

/* 矢印アイコン */
.bento-arrow {
  margin-top: 15px;
  font-size: 14px; color: #fff;
  font-family: var(--font-sans);
  font-weight: 700;
  transform: translateX(0);
  transition: transform 0.3s;
}
.bento-item:hover .bento-arrow { transform: translateX(10px); }

/* ===== Responsive (Top) ===== */
@media (max-width: 1024px) {
  .hero-catch {
    left: auto; right: 5%;
    font-size: 36px;
  }
  .hero-news { width: 500px; }
}

@media (max-width: 768px) {
  /* Hero SP Layout Order */
  .hero-content-wrapper {
    display: flex; flex-direction: column; justify-content: flex-end; padding-bottom: 80px;
  }
  /* 1. Catch Copy */
  .hero-catch {
    position: relative; left: auto; top: auto; right: auto; bottom: auto;
    writing-mode: horizontal-tb; text-orientation: unset;
    text-align: center; width: 100%; margin-bottom: 24px;
    font-size: 28px; line-height: 1.6; order: 1;
  }
  .catch-line { display: block; transform: translateY(10px); }

  /* 2. News */
  .hero-news {
    position: relative; left: auto; bottom: auto;
    width: 100%; margin: 0 auto 24px;
    order: 2;
    font-size: 12px; padding: 16px;
  }
  .news-title { white-space: normal; }

  /* 3. Indicators (Under News) */
  .hero-bg-indicators {
    position: relative;
    left: auto; right: auto; bottom: auto;
    justify-content: center; margin-bottom: 20px;
    order: 3;
  }

  /* Concept Responsive */
  .concept { padding: 100px 0; }
  .concept-content-wrapper {
    padding: 20px; text-align: center;
  }
  .concept-heading { font-size: 28px; }
  .concept-link { justify-content: center; }

  .bento-grid { grid-template-columns: 1fr; grid-template-rows: auto; }
  .bento-item { min-height: 240px; grid-column: auto !important; grid-row: auto !important; }

  /* SP: 右寄せ */
  .bento-arrow { text-align: right; }

  /* Bento SP */
  .bento-grid { grid-template-columns: 1fr; grid-template-rows: auto; }
  .bento-item { min-height: 220px; border-radius: 24px !important; }
  .bento-item.buy { min-height: 240px; }
  .bento-item.sell { min-height: 300px; }
  .bento-item.reno { min-height: 300px; }
  .bento-big-num { font-size: 100px; top: 0; left: 0; }
  .bento-item.sell .bento-tape { top: 20px; right: 20px; transform: rotate(2deg); }
}
