:root {
  --bg: #F3FAFF;
  --bg-alt: #13b6f2;
  --surface: #ffffff;
  --surface-soft: #f8fbf9;
  --ink: #333333;
  --muted: #003c84;
  --line: #003c84;
  --accent: #003c84;
  --accent-2: #e12526;
  --radius: 20px;
  --radius-sm: 16px;
  --max-width: 1200px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: #fff;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Noto Sans JP", sans-serif;
  font-weight: 500;
  font-style: normal;
  letter-spacing: 0;
  overflow-x: hidden;
  font-size: 14px;
  background: var(--bg);
}

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

.logo {
  max-width: 150px;
  min-width: 150px;
}

.companyLogoLink {
  display: block;
  width: fit-content;
  margin: 0 auto;
}

button,
a {
  font: inherit;
}

button {
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

main {
  display: block;
}

/* ファーストビュー上にロゴを重ねるページ共通ヘッダー */
.siteHeader {
  position: absolute;
  inset: 0 auto auto 0;
  z-index: 3;
  width: 100%;
  pointer-events: none;
}

.hero {
  position: relative;
  padding: clamp(7rem, 8vw, 6rem) 1rem 0;
}

.hero__shell {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.hero__cornerLogo {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 3;
  width: auto;
  /* 背景は画面端に接着し、ロゴだけを端末の安全領域より内側に置く */
  padding:
    calc(28px + env(safe-area-inset-top, 0px)) 40px 28px max(16px, env(safe-area-inset-left, 0px));
  border-radius: 0 0 40px 0;
  background: #fff;
  pointer-events: auto;
}

.hero__center {
  display: grid;
  justify-items: center;
  gap: 1.375rem;
  text-align: center;
}

.hero__title {
  display: flex;
  justify-content: center;
  width: 100%;
  margin: 0;
}

.hero__brandLogo {
  width: min(100%, clamp(303px, calc(14.37vw + 246.1px), 522px));
}

.hero__lede {
  max-width: 50rem;
  margin: 0;
  color: var(--muted);
  font-size: clamp(12px, calc(0.13vw + 13.5px), 16px);
  line-height: 1.6;
}


.chipButton:hover,
.chipButton:focus-visible,
.topButton:hover,
.topButton:focus-visible,
.videoCard:hover,
.videoCard:focus-visible {
  transform: translateY(-3px);
}

.section {
  padding: 1.5rem 1rem 0;
}

.section__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: center;
}

.section__title {
  display: inline-flex;
  align-items: center;
  text-align: center;
  gap: 1rem;
  margin: 0;
  font-size: clamp(24px, calc(0.9vw + 18.6px), 36px);
  line-height: 1.2;
  color: var(--muted);
}

.section__title span {
  font-family: "Montserrat", sans-serif;
  font-optical-sizing: auto;
  font-weight: 800;
  font-style: normal;
}

.section__titleIcon {
  width: 25px;
  height: auto;
}

.section__lead {
  margin: 0.4rem 0 0;
  color: var(--ink);
  line-height: 1.6;
  font-weight: 700;
}

.section--videos {
  padding-top: 3rem;
}

.section--videos .section__inner {
  text-align: left;
}

.section--category .section__inner,
.section--watch .section__inner {
  display: grid;
  justify-items: center;
  text-align: center;
}

.section--category .section__inner {
  width: min(100%, var(--max-width));
  max-width: var(--max-width);
  margin-inline: auto;
  row-gap: 0;
}

.section--category {
  padding-top: clamp(56px, 8vw, 100px);
}

.section--category .filterPanel {
  margin-top: 28px;
}

.section--watch {
  position: relative;
  z-index: 0;
  --watch-dome-width: 170vw;
  /* SPのデザイン幅375pxに合わせたドーム高さ */
  --watch-dome-height: 700px;
  /* SPではセクション上端から40pxの位置にドーム頂点を置く */
  --watch-dome-top: 30px;
  margin-top: 70px;
  /* デザイン上の556pxにはフッター下の安全領域を含めない */
  min-height: calc(556px + env(safe-area-inset-bottom, 0px));
  /* SPのデザイン上余白 */
  padding-top: 115px;
  padding-bottom: 36px;
  background: var(--bg);
  overflow: hidden;
}

.section--watch::before {
  content: "";
  position: absolute;
  left: 50%;
  top: var(--watch-dome-top);
  z-index: 0;
  width: var(--watch-dome-width);
  height: var(--watch-dome-height);
  transform: translateX(-50%);
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  background: var(--surface);
  pointer-events: none;
}

.section--watch::after {
  content: "";
  position: absolute;
  top: calc(var(--watch-dome-top) + var(--watch-dome-height) - 1px);
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 0;
  background: var(--surface);
  pointer-events: none;
}

.section--watch .section__inner {
  position: relative;
  z-index: 1;
  padding: clamp(1rem, 3.2vw, 1.5rem) 0 0;
  background: transparent;
}

.chipRow {
  display: grid;
  gap: 0.65rem;
  margin-top: 1rem;
}

.filterPanel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(24px, 9vw, 113px);
  width: 100%;
  max-width: var(--max-width);
  margin-top: 2rem;
}

.filterControl {
  display: grid;
  gap: 0.8rem;
  width: 100%;
  color: #003c84;
  font-size: 16px;
  font-weight: 700;
  text-align: left;
}

.filterControl__label {
  white-space: nowrap;
}

.filterDropdown {
  position: relative;
  min-width: 0;
}

.filterDropdown__button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  min-height: 2.75rem;
  padding: 0.5rem 0.75rem;
  border: 1.5px solid #003c8434;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--muted);
  font-weight: 700;
  line-height: 1.3;
  cursor: pointer;
  text-align: left;
  /* 変化を0.5秒かけてスムーズにする*/
  transition: all 0.3s;
}

.filterDropdown__button:hover,
.filterDropdown__button:focus-visible,
.filterControl.is-open .filterDropdown__button {
  border-color: var(--accent);
}

.filterDropdown__arrow {
  flex: 0 0 auto;
  width: 0.8rem;
  height: 0.8rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-0.05rem) rotate(45deg);
  transition: transform 0.2s ease;
}

.filterControl.is-open .filterDropdown__arrow {
  transform: translateY(0.18rem) rotate(225deg);
}

.filterDropdown__menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 0.45rem);
  z-index: 20;
  display: grid;
  gap: 0.2rem;
  max-height: min(18rem, 52vh);
  margin: 0;
  padding: 0.35rem;
  overflow-y: auto;
  border: 1.5px solid rgb(0, 74, 144);
  border-radius: 6px;
  background: var(--surface);
  box-shadow: 0 14px 32px rgba(0, 74, 144, 0.16);
  list-style: none;
}

.filterDropdown__menu[hidden] {
  display: none;
}

/* ドロップダウンを開くときだけ、短いフェードと移動を加える */
.filterControl.is-open .filterDropdown__menu {
  animation: dropdown-open 0.18s ease-out;
}

@keyframes dropdown-open {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.filterDropdown__option {
  display: block;
  width: 100%;
  min-height: 2.35rem;
  padding: 0.55rem 0.4rem;
  border-radius: 3px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  text-align: left;
  /* 変化を0.5秒かけてスムーズにする*/
  transition: all 0.3s;
}

.filterDropdown__option:hover,
.filterDropdown__option:focus-visible {
  background: var(--bg);
  outline: none;
}

.filterDropdown__option.is-selected {
  background: var(--bg);
  color: var(--accent);
}

/* hover中は選択中の別項目から背景色を外し、hover項目だけを強調する */
.filterDropdown__menu:has(.filterDropdown__option:hover) .filterDropdown__option.is-selected:not(:hover) {
  background: transparent;
}

.chipButton {
  display: flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-width: 0;
  padding: 4px 1rem;
  border: 1px solid var(--muted);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--muted);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
  font-size: 16px;
}

.chipButton.is-active,
.chipButton[aria-pressed="true"] {
  border-color: var(--muted);
  background: var(--muted);
  color: var(--surface);
}

.videoGroup {
  margin-top: 64px;
  scroll-margin-top: 1.25rem;
}

.videoGroup__title {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0;
  font-size: clamp(18px, 2.9vw, 22px);
  line-height: 1.35;
  font-weight: 700;
  color: var(--accent);
  white-space: normal;
}

.videoGroup__title::before {
  content: "";
  flex: 0 0 auto;
  width: 8px;
  height: 44px;
  margin-top: 0.12em;
  background: var(--accent);
}

.videoGroup__videos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  row-gap: 40px;
  column-gap: 12px;
  margin-top: 34px;
}

.videoGroups__emptyState {
  width: min(100%, 720px);
  margin: 4.25rem auto 0;
  padding: 1.75rem 1rem;
  /* border: 1px solid rgba(0, 74, 144, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92); */
  color: var(--accent);
  font-size: clamp(14px, 1.6vw, 16px);
  font-weight: 700;
  line-height: 1.8;
  text-align: center;
  white-space: pre-line;
}

#videoGroups.is-filter-animating {
  animation: filter-results-in 0.22s ease-out;
}

@keyframes filter-results-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ↓動画カードすべて。.videoCard[hidden]：その中で hidden 属性があるカードだけ。.videoCard[hidden] のほうが詳細度（優先度）が高い */
.videoCard {
  display: grid;
  align-content: start;
  gap: 0.85rem;
  min-width: 0;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

/* 　.videoCard の display: grid が hidden の非表示を上書きしていた */
.videoCard[hidden] {
  display: none;
}

.videoCard__media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #003c84, #13b6f2);
}

.videoCard__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.videoCard__veil {
  position: absolute;
  inset: 0;
  background: #003c8437;
}

.videoCard__play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-size: clamp(24px, calc(0.39vw + 22.54px), 30px);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.videoCard__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  min-width: 0;
  text-align: left;
}

.videoCard__date {
  font-size: 16px;
  font-weight: 700;
  color: var(--accent);
  /* color: var(--ink); */
}

.videoCard__name {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.45;
  text-align: left;
  overflow-wrap: anywhere;
}

.watchGrid {
  display: grid;
  gap: 0;
  width: 100%;
  /* margin-top: 1rem; */
}

.watchItem {
  container-type: inline-size;
  display: grid;
  gap: 10px;
  padding-top: 36px;
  padding-bottom: 62px;
  min-width: 0;
}

.watchItem+.watchItem {
  position: relative;
  border-top: 0;
}

.watchItem+.watchItem::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: repeating-linear-gradient(to right,
      #003c84 0 5px,
      transparent 5px 10px);
  pointer-events: none;
}

.watchItem__head {
  display: flex;
  align-items: center;
  gap: clamp(0.6rem, 1.8cqw, 0.9rem);
}

.watchItem__media {
  display: grid;
  place-items: center;
  width: clamp(2.5rem, 10cqw, 4rem);
  height: clamp(2.5rem, 10cqw, 4rem);

}

.watchItem__media img {
  width: auto;
  height: clamp(1.25rem, 5cqw, 1.75rem);
}

.watchItem__head h2 {
  margin: 0;
  color: var(--accent);
  font-size: clamp(1rem, 4.2cqw, 1.25rem);
  line-height: 1.35;
}

.watchItem>p {
  margin: clamp(0.35rem, 1.2cqw, 0.6rem) 0 0;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.6;
  text-align: left;
}

/* 白いドームと一体化して表示するページ共通フッター */
.siteFooter {
  /* 通常端末では0、ホームインジケータがある端末だけ下余白を確保する */
  padding: 0.15rem 0 env(safe-area-inset-bottom, 0px);
  background: transparent;
  text-align: center;
  color: var(--line);
  font-size: 10px;
}

.siteFooter p {
  margin: 12px 0 0;
}

.topButton {
  position: fixed;
  /* 端末の右端・下端の安全領域を避けて固定する */
  right: calc(1rem + env(safe-area-inset-right, 0px));
  bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  z-index: 30;
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--line);
  color: var(--surface);

  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.topButton.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.topButton::before {
  content: "";
  position: relative;
  top: 2px;
  width: 0.65rem;
  height: 0.65rem;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(-45deg);
}

@media (min-width: 720px) {

  .section--watch .section__title,
  .section--watch .section__lead {
    transform: translateY(6px);
  }

  .section__lead {
    margin: 1rem 0;
    font-size: 16px;
  }

  .hero {
    padding: 5rem 1.25rem 0;
  }

  .hero__shell {
    gap: 1.25rem;
  }

  .section {
    padding-inline: 1.25rem;
  }

  .section--watch {
    --watch-dome-width: 120vw;
    /* PCのデザイン幅1920pxに合わせたドーム高さ */
    --watch-dome-height: 518px;
    /* PCではセクション上端から120pxの位置にドーム頂点を置く */
    --watch-dome-top: 68px;
    /* デザイン上の390pxにはフッター下の安全領域を含めない */
    min-height: calc(390px + env(safe-area-inset-bottom, 0px));
    /* PCのデザイン上余白 */
    padding-top: 120px;
    margin-top: 50px;
  }

  .section--watch .section__inner {
    padding: clamp(1.2rem, 2.4vw, 2rem) 0 0;
  }


  .videoGroup__videos {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .videoGroups__emptyState {
    padding: 2rem 1.25rem;
  }

  .watchGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 24px 0px 36px 0px;
  }

  .watchItem {
    padding: clamp(1.05rem, 2.6cqw, 1.45rem) clamp(1rem, 2.6cqw, 1.5rem);
  }

  /* 左カラムは中央の区切り線側だけに余白を設ける */
  .watchItem:first-child {
    padding-left: 0;
    padding-right: 50px;
  }

  /* 右カラムは中央の区切り線側だけに余白を設ける */
  .watchItem:last-child {
    padding-left: 50px;
    padding-right: 0;
  }

  .watchItem+.watchItem {
    position: relative;
    border-top: 0;
    border-left: 0;
  }

  /* PCの左右カラムを区切る点線を180pxで中央配置する */
  .watchItem+.watchItem::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    width: 1px;
    height: 180px;
    transform: translateY(-50%);
    background: repeating-linear-gradient(to bottom,
        #003c84 0 5px,
        transparent 5px 10px);
    pointer-events: none;
  }


  .siteFooter p {
    font-size: 14px;
  }

  .videoGroup__title {
    gap: 18px;
  }

  .videoGroup__title::before {
    height: 40px;
  }
}

@media (max-width: 719px) {
  .videoCard__date {
    font-size: 14px;
  }

  .filterDropdown__arrow {
    width: 0.5rem;
    height: 0.5rem;
  }

  .section--watch .section__title,
  .section--watch .section__lead {
    transform: translateY(-4px);
  }

  .watchGrid {
    width: 90%;
    margin-inline: auto;
  }

  .section--videos {
    padding-top: 0;
  }

  .videoGroup__title {
    white-space: pre-line;
  }

  .section--category .filterPanel {
    margin-top: 30px;
  }

  .section__titleIcon {
    width: 15px;
    height: auto;
  }

  .filterPanel {
    grid-template-columns: 1fr;
    gap: 20px;
    width: 100%;
    margin-top: 3rem;
  }

  .filterControl {
    gap: 11px;
    font-size: 16px;
  }

  .filterDropdown__button {
    min-height: 42px;
    padding: 0.5rem 0.7rem;
    border-radius: 6px;
    font-size: 14px;
  }

  .filterDropdown__menu {
    top: calc(100% + 0.55rem);
    max-height: 16rem;
    border-radius: 6px;
  }

  .filterDropdown__option {
    min-height: 2.75rem;
    padding: 0.75rem 0.3rem;
  }


  .section--watch {
    --watch-dome-width: 240vw;
    padding-bottom: 36px;
  }

  .videoCard__media {
    aspect-ratio: 165 / 140;
  }


  .section--watch .section__inner {
    padding: 0;
  }
}

@media (min-width: 720px) and (max-width: 1024px) {
  .filterDropdown__button {
    font-size: 14px;
  }
}

@media (min-width: 1025px) {
  .filterDropdown__option {
    font-size: 16px;
  }
}

@media (max-width: 375px) {
  /* .hero__lede {
    font-feature-settings: "halt";

  } */
}

@media (min-width: 1100px) {
  .videoGroup__videos {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}


@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
