/* ==========================================================
   Home visual lift — 2026-07-28
   CSPの勢いとSchoolWithの写真リズムを、既存デザインへ限定導入。
   scope: body.home のみ。共通ページには影響させない。
   ========================================================== */

.home {
  --cebu-sky: #f6fbfd;
  --cebu-sky-mid: #ddeef6;
  --cebu-sky-rich: #bbddeb;
  --cebu-ocean: #3e91b3;
  --cebu-deep: #0d4662;
  --cebu-ink: #173a4c;
  --cebu-copy: #4b6877;
  --cebu-link: #175f7b;
}

.home .home-purpose-section {
  padding-top: 34px;
}

.home .home-h2 {
  color: var(--navy);
  font-size: clamp(24px, 2.5vw, 32px);
  font-weight: 900;
  line-height: 1.38;
  letter-spacing: -.025em;
}

.home .home-h2 em {
  color: var(--cebu-link);
  font-style: normal;
  padding: 0 .05em;
  background: linear-gradient(transparent 72%, rgba(62, 145, 179, .22) 72%);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.home .home-section-heading {
  max-width: 760px;
  margin: 0 auto 32px;
  text-align: center;
}

.home .home-section-heading .section-kicker {
  margin-bottom: 7px;
}

.home .home-section-heading > p {
  max-width: 660px;
  margin: 10px auto 0;
  color: var(--ink-weak);
  font-size: 13.5px;
  line-height: 1.8;
}

.home .home-section-head-row {
  align-items: flex-end;
  margin-bottom: 22px;
}

.home .home-section-head-row--small .home-h2 {
  font-size: clamp(21px, 2vw, 27px);
}

/* 目的検索: 既存カードの情報量は保ち、入口として目に止まる面にする */
.home .home-purpose-card {
  position: relative;
  display: grid;
  grid-template-areas:
    "head photo"
    "chips photo";
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  gap: 17px 28px;
  overflow: hidden;
  padding: 26px 28px;
  border-color: rgba(31, 113, 143, .14);
  background: linear-gradient(135deg, #fff 0%, #f0f7fa 100%);
  box-shadow: 0 14px 34px rgba(15, 70, 94, .08);
}

.home .home-purpose-card .section-head-row {
  position: relative;
  z-index: 1;
  grid-area: head;
  align-items: flex-end;
  margin-bottom: 0;
}

.home .home-purpose-card nav {
  position: relative;
  z-index: 1;
  grid-area: chips;
  align-self: start;
}

.home .home-purpose-photo {
  position: relative;
  isolation: isolate;
  grid-area: photo;
  overflow: hidden;
  min-height: 174px;
  border: 1px solid rgba(255, 255, 255, .82);
  border-radius: 14px;
  color: #fff;
  background: var(--cebu-sky-mid);
  box-shadow: 0 16px 34px rgba(13, 70, 96, .16);
}

.home .home-purpose-photo::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(180deg, transparent 52%, rgba(7, 34, 49, .86) 100%);
}

.home .home-purpose-photo img {
  position: absolute;
  z-index: -2;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
  transition: transform .45s ease, filter .45s ease;
}

.home .home-purpose-photo__caption {
  position: absolute;
  inset: auto 15px 13px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-shadow: 0 2px 12px rgba(5, 24, 36, .55);
}

.home .home-purpose-photo__caption small {
  color: rgba(226, 247, 255, .92);
  font-family: var(--font-num);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .13em;
}

.home .home-purpose-photo__caption strong {
  color: #fff;
  font-size: 15px;
  font-weight: 900;
}

@media (hover: hover) {
  .home .home-purpose-photo:hover {
    color: #fff;
  }

  .home .home-purpose-photo:hover img {
    filter: saturate(1.04) brightness(1.03);
    transform: scale(1.025);
  }
}

.home .home-purpose-card nav .chip {
  border-color: rgba(13, 148, 148, .2);
  background: rgba(255, 255, 255, .88);
  box-shadow: 0 4px 12px rgba(11, 34, 57, .05);
}

.home .home-purpose-card nav .chip::before {
  display: none;
}

.home .home-purpose-card nav .chip:hover {
  color: var(--navy);
  border-color: rgba(13, 148, 148, .42);
  transform: translateY(-1px);
}

/* 写真ストーリー: 1枚を主役に、校舎・寮・周辺環境を編集的に見せる */
.home .home-photo-section {
  padding-top: 54px;
}

.home .home-photo-shell {
  position: relative;
  overflow: hidden;
  padding: clamp(28px, 4.4vw, 52px);
  border: 1px solid rgba(24, 87, 113, .14);
  border-radius: 20px;
  color: var(--cebu-ink);
  background:
    linear-gradient(115deg, rgba(255, 255, 255, .82) 0%, rgba(255, 255, 255, .24) 34%, transparent 47%),
    linear-gradient(145deg, #fff 0%, #f5fafc 52%, #e6f1f6 100%);
  box-shadow:
    0 28px 65px rgba(15, 70, 94, .14),
    inset 0 1px 0 rgba(255, 255, 255, .78);
}

.home .home-photo-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .55;
  background: linear-gradient(164deg, transparent 0 56%, rgba(255, 255, 255, .3) 56.2%, transparent 76%);
}

.home .home-section-heading--light {
  position: relative;
  z-index: 1;
}

.home .home-section-heading--light .section-kicker {
  color: var(--cebu-link);
}

.home .home-section-heading--light .home-h2,
.home .home-section-heading--light .home-h2 em {
  color: var(--cebu-ink);
}

.home .home-section-heading--light .home-h2 em {
  color: var(--cebu-link);
  background: linear-gradient(transparent 72%, rgba(62, 145, 179, .22) 72%);
}

.home .home-section-heading--light > p {
  color: var(--cebu-copy);
}

.home .home-photo-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-rows: 166px;
  gap: 14px;
}

.home .home-photo-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  grid-column: span 5;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 16px;
  color: #fff;
  background: var(--cebu-sky-rich);
  box-shadow: 0 18px 40px rgba(10, 52, 72, .2);
  transform: translateZ(0);
}

.home .home-photo-card--featured {
  grid-column: span 7;
  grid-row: span 2;
}

.home .home-photo-card--third {
  grid-column: span 4;
}

.home .home-photo-card--half {
  grid-column: span 6;
}

.home .home-photo-card::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(7, 34, 49, .88) 100%);
}

.home .home-photo-card img {
  position: absolute;
  z-index: -2;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  object-fit: cover;
  transition: transform .45s ease, filter .45s ease;
}

.home .home-photo-card:nth-child(1) img {
  object-position: center 58%;
}

.home .home-photo-card:nth-child(3) img {
  object-position: center 42%;
}

.home .home-photo-card__content {
  position: absolute;
  inset: auto 16px 14px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-shadow: 0 2px 16px rgba(4, 21, 35, .5);
}

.home .home-photo-card__content small {
  margin-bottom: 4px;
  color: #d9ffff;
  font-family: var(--font-num);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .16em;
}

.home .home-photo-card__content strong {
  color: #fff;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: .01em;
}

.home .home-photo-card--featured .home-photo-card__content {
  inset: auto 22px 20px;
}

.home .home-photo-card--featured .home-photo-card__content strong {
  font-size: clamp(23px, 2.5vw, 32px);
}

.home .home-photo-card__content > span {
  margin-top: 4px;
  color: rgba(255, 255, 255, .86);
  font-size: 11px;
  font-weight: 700;
}

.home .home-photo-card:hover {
  color: #fff;
}

.home .home-photo-card:hover img {
  filter: saturate(1.08) brightness(1.04);
  transform: scale(1.035);
}

.home .home-photo-foot {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-top: 14px;
}

.home .home-photo-foot p {
  color: var(--cebu-copy);
  font-size: 10.5px;
}

.home .home-photo-foot a {
  padding: 3px 0;
  border: 0;
  border-radius: 0;
  color: var(--cebu-link);
  background: transparent;
  font-size: 12.5px;
  font-weight: 800;
}

/* 主要H2だけ帯にして、写真・口コミの入口を明確にする */
.home .home-popular-section .home-section-head-row,
.home .home-voices-section .home-section-head-row {
  position: relative;
  overflow: hidden;
  padding: 21px 25px;
  border: 1px solid rgba(24, 87, 113, .12);
  border-left: 3px solid var(--cebu-ocean);
  border-radius: 15px;
  background: linear-gradient(105deg, #f2f8fb 0%, #dcecf4 58%, #c3dfeb 100%);
  box-shadow:
    0 14px 34px rgba(15, 70, 94, .1),
    inset 0 1px 0 rgba(255, 255, 255, .72);
}

.home .home-popular-section .home-section-head-row::after,
.home .home-voices-section .home-section-head-row::after {
  content: "";
  position: absolute;
  right: -8%;
  top: -120%;
  width: 48%;
  height: 340%;
  border: 0;
  border-radius: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .48) 48%, transparent 66%);
  transform: skewX(-12deg);
  pointer-events: none;
}

.home .home-popular-section .home-section-head-row > *,
.home .home-voices-section .home-section-head-row > * {
  position: relative;
  z-index: 1;
}

.home .home-popular-section .section-kicker,
.home .home-voices-section .section-kicker {
  color: var(--cebu-link);
}

.home .home-popular-section .home-h2,
.home .home-popular-section .home-h2 em,
.home .home-voices-section .home-h2,
.home .home-voices-section .home-h2 em {
  color: var(--cebu-ink);
}

.home .home-popular-section .home-h2 em,
.home .home-voices-section .home-h2 em {
  color: var(--cebu-link);
  background: linear-gradient(transparent 72%, rgba(62, 145, 179, .22) 72%);
}

.home .home-popular-section .home-section-head-row .link-more,
.home .home-voices-section .home-section-head-row .link-more {
  padding: 8px 13px;
  border: 1px solid rgba(31, 113, 143, .2);
  border-radius: 10px;
  color: var(--cebu-link);
  background: rgba(255, 255, 255, .72);
}

/* 学校カード写真の比率を上げ、一覧でも写真から選べるようにする */
.home .home-popular-section .school-card {
  padding: 19px;
  overflow: visible;
}

.home .home-popular-section .school-card::before {
  content: "実際の校舎写真";
  position: absolute;
  z-index: 3;
  top: 10px;
  right: 10px;
  padding: 3px 8px;
  border: 1px solid rgba(255, 255, 255, .56);
  border-radius: 8px;
  color: #fff;
  background: rgba(11, 34, 57, .68);
  box-shadow: 0 5px 14px rgba(11, 34, 57, .18);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  font-size: 9px;
  font-weight: 800;
}

.home .home-popular-section .school-photo.sm {
  width: calc(100% + 38px);
  max-width: none;
  height: auto;
  aspect-ratio: 3 / 2;
  margin: -19px -19px 14px;
  border-radius: 17px 17px 10px 10px;
  object-fit: cover;
}

.home .home-popular-section .no1-ribbon {
  z-index: 4;
}

/* 下層の見出しは白地に短いティール線を置き、情報密度を保つ */
.home .home-media-section .home-section-head-row,
.home .home-section-head-row--small {
  padding-left: 15px;
  border-left: 5px solid var(--teal);
}

.home .home-media-section .media-card {
  border-top: 3px solid transparent;
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(90deg, var(--teal), var(--cyan), var(--amber)) border-box;
}

.home .home-features-section .feature-card {
  position: relative;
  overflow: hidden;
  border-top: 3px solid rgba(20, 184, 196, .42);
}

.home .home-features-section .feature-card:nth-child(2) {
  border-top-color: rgba(240, 96, 77, .55);
}

.home .home-features-section .feature-card:nth-child(4) {
  border-top-color: rgba(240, 162, 49, .6);
}

.home .home-next-action-card {
  display: flex;
  align-items: center;
  gap: 18px;
  max-width: 820px;
  margin: 0 auto;
  border-color: rgba(24, 87, 113, .16);
  background: linear-gradient(120deg, #fff 0%, #f1f8fb 100%);
  box-shadow: 0 14px 34px rgba(15, 70, 94, .08);
}

.home .avatar-brand {
  aspect-ratio: auto;
}

@media (max-width: 960px) {
  .home .home-photo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 190px;
  }

  .home .home-photo-card,
  .home .home-photo-card--third,
  .home .home-photo-card--half {
    grid-column: span 1;
  }

  .home .home-photo-card--featured {
    grid-column: 1 / -1;
    grid-row: span 2;
  }

  .home .home-photo-card:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .home .home-h2 {
    font-size: 23px;
    line-height: 1.46;
  }

  .home .home-section-heading {
    margin-bottom: 22px;
    text-align: left;
  }

  .home .home-section-heading > p {
    margin-top: 7px;
    font-size: 12.5px;
  }

  .home .home-purpose-section {
    padding-top: 24px;
  }

  .home .home-purpose-card {
    grid-template-areas:
      "head"
      "photo"
      "chips";
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 20px 18px;
    border-radius: 16px;
  }

  .home .home-purpose-card .section-head-row {
    gap: 8px 12px;
  }

  .home .home-purpose-card nav {
    gap: 7px !important;
  }

  .home .home-purpose-photo {
    min-height: 172px;
  }

  .home .home-purpose-card nav .chip {
    padding: 8px 12px;
    font-size: 11.5px;
  }

  .home .home-photo-section {
    padding-top: 40px;
  }

  .home .home-photo-shell {
    padding: 26px 18px 22px;
    border-radius: 16px;
  }

  .home .home-section-heading--light {
    text-align: left;
  }

  .home .home-photo-grid {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    margin-right: -18px;
    padding: 2px 18px 12px 2px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .home .home-photo-grid::-webkit-scrollbar {
    display: none;
  }

  .home .home-photo-card,
  .home .home-photo-card--featured,
  .home .home-photo-card--third,
  .home .home-photo-card--half,
  .home .home-photo-card:last-child {
    flex: 0 0 min(80vw, 310px);
    height: 238px;
    border-width: 1px;
    border-radius: 13px;
    scroll-snap-align: start;
  }

  .home .home-photo-card--featured {
    flex-basis: min(84vw, 330px);
  }

  .home .home-photo-card__content,
  .home .home-photo-card--featured .home-photo-card__content {
    inset: auto 16px 15px;
  }

  .home .home-photo-card--featured .home-photo-card__content strong {
    font-size: 22px;
  }

  .home .home-photo-foot {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
    margin-top: 3px;
  }

  .home .home-popular-section .home-section-head-row,
  .home .home-voices-section .home-section-head-row {
    align-items: flex-start;
    padding: 18px;
    border-radius: 12px;
  }

  .home .home-popular-section .home-section-head-row .link-more,
  .home .home-voices-section .home-section-head-row .link-more {
    margin-top: 5px;
    padding: 6px 11px;
  }

  .home .home-popular-section .school-card {
    padding: 16px;
  }

  .home .home-popular-section .school-photo.sm {
    width: calc(100% + 32px);
    margin: -16px -16px 13px;
    border-radius: 15px 15px 9px 9px;
  }

  .home .home-media-section .home-section-head-row,
  .home .home-section-head-row--small {
    padding-left: 12px;
    border-left-width: 4px;
  }

  .home .home-next-action-card {
    align-items: flex-start;
    padding: 19px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home .home-purpose-photo img,
  .home .home-photo-card img,
  .home .home-purpose-card nav .chip {
    transition: none;
  }

  .home .home-purpose-photo:hover img,
  .home .home-photo-card:hover img,
  .home .home-purpose-card nav .chip:hover {
    transform: none;
  }
}
