@charset "UTF-8";

/* =========================================================
   EVENT MYSTAR - style.css
   デザイントークンは Studio 版の定義をそのまま引き継いでいます。
   ========================================================= */

:root {
  /* --- Brand colors（Studio の色定義と同一） --- */
  --ems-purple: #4600be;
  --ems-pink: #cc2071;
  --ems-navy: #0f193c;
  --ems-gold: #bea064;
  --ems-purple-light: #a7a7ee;
  --ems-mint: #b4fff5;
  --ems-grey: rgb(103, 104, 125);
  --ems-white: #ffffff;
  --ems-gradation-01: linear-gradient(0deg, #0f193c, #4600be);
  --ems-gradation-02: linear-gradient(0deg, #8287c3, #4600be);

  /* --- Fonts --- */
  --font-jp: "M PLUS 1p", "Hiragino Kaku Gothic ProN", "Hiragino Sans",
    "Yu Gothic", meiryo, sans-serif;
  --font-en: "Lato", var(--font-jp);

  /* --- Layout --- */
  --container: 1000px;
  --header-h: 80px;
  --section-gap: 240px;
  --section-pad-top: 100px;
}

/* =========================================================
   Reset / base
   ========================================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  /* sticky ヘッダーの下にアンカー先が隠れないようにする */
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ems-navy);
  color: var(--ems-white);
  font-family: var(--font-jp);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

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

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1,
h2,
h3,
p {
  margin: 0;
}

:focus-visible {
  outline: 2px solid var(--ems-purple-light);
  outline-offset: 3px;
}

/* キーボード操作でヘッダーを読み飛ばすためのリンク。
   フォーカスされたときだけ表示される。 */
.skip-link {
  position: absolute;
  top: -100px;
  left: 8px;
  z-index: 100;
  padding: 12px 20px;
  border-radius: 0 0 4px 4px;
  background: var(--ems-purple);
  color: var(--ems-white);
  font-size: 14px;
  font-weight: 700;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* =========================================================
   Header / navigation
   ========================================================= */

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(6px);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 90%;
  height: 100%;
  margin-inline: auto;
}

.header__logo img {
  width: 160px;
  height: auto;
}

.gnav__list {
  display: flex;
  align-items: center;
  gap: 40px;
}

.gnav__link {
  color: var(--ems-navy);
  font-family: var(--font-en);
  font-size: 20px;
  font-weight: 400;
  line-height: 1.4;
  white-space: nowrap;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.gnav__link:hover {
  color: var(--ems-purple);
}

/* --- Hamburger（840px 以下で表示） --- */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--ems-navy);
  cursor: pointer;
}

.nav-toggle__bar {
  position: relative;
  display: block;
  width: 24px;
  height: 2px;
  background: currentColor;
  transition: background 0.2s ease;
}

.nav-toggle__bar::before,
.nav-toggle__bar::after {
  content: "";
  position: absolute;
  left: 0;
  width: 24px;
  height: 2px;
  background: currentColor;
  transition: transform 0.25s ease;
}

.nav-toggle__bar::before {
  top: -8px;
}

.nav-toggle__bar::after {
  top: 8px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar::before {
  transform: translateY(8px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar::after {
  transform: translateY(-8px) rotate(-45deg);
}

/* =========================================================
   Hero
   ========================================================= */

.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  /* ヘッダー分を差し引いて画面ぴったりに収める */
  height: calc(100svh - var(--header-h));
  min-height: 480px;
  overflow: hidden;
}

.hero__media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Studio 版と同じ色調補正 */
  filter: brightness(85%) contrast(125%);
  z-index: 0;
}

.hero__title {
  position: relative;
  z-index: 1;
  padding-inline: 5%;
  color: var(--ems-white);
  font-size: clamp(20px, 2.5vw, 36px);
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.05em;
  text-align: center;
  text-shadow: 0 0 40px var(--ems-navy);
}

/* =========================================================
   Section 共通
   ========================================================= */

.sections {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--section-gap);
  padding-bottom: 200px;
}

.section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  width: min(var(--container), 90%);
  padding-top: var(--section-pad-top);
  scroll-margin-top: var(--header-h);
}

.section__title {
  color: var(--ems-purple-light);
  font-family: var(--font-en);
  /* 原版は 4vw 固定。小画面で潰れないよう下限・上限を付与 */
  font-size: clamp(32px, 4vw, 58px);
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.05em;
  text-align: center;
}

.section__lead {
  font-size: clamp(15px, 1.4vw, 20px);
  font-weight: 400;
  line-height: 1.8;
  text-align: center;
}

.section__lead--left {
  text-align: left;
}

.section__subtitle {
  font-size: clamp(17px, 1.4vw, 20px);
  font-weight: 700;
  letter-spacing: 0.25em;
  line-height: 1.5;
  text-align: center;
}

/* スクロールインで浮かび上がる（Studio の &appear と同じ挙動） */
.reveal {
  opacity: 0;
  translate: 0 40px;
  transition: opacity 800ms ease-in-out, translate 800ms ease-in-out;
}

.reveal.is-visible {
  opacity: 1;
  translate: 0 0;
}

/* =========================================================
   NEWS
   ========================================================= */

.news__list {
  width: 80%;
  padding: 10px;
}

.news__item {
  display: flex;
  flex-wrap: wrap;
  gap: 0 24px;
  padding: 12px 0;
  border-top: 1px solid var(--ems-grey);
}

.news__date {
  flex: none;
  width: 160px;
  font-size: clamp(16px, 1.4vw, 20px);
  font-weight: 700;
  line-height: 1.5;
}

.news__title {
  font-size: clamp(15px, 1.4vw, 20px);
  font-weight: 400;
  line-height: 1.4;
}

.news__empty {
  color: var(--ems-grey);
}

/* =========================================================
   MEMBER
   ========================================================= */

.member__cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

.member__card {
  display: block;
  flex: none;
  width: 240px;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  transition: scale 300ms ease-in-out;
}

.member__card:hover,
.member__card:focus-visible {
  scale: 1.05;
}

.member__card img {
  width: 100%;
  height: auto;
}

/* =========================================================
   VISION / BUSINESS
   ========================================================= */

.figure {
  width: 100%;
}

/* VISION の図は原版と同じく 800px 幅に収める */
.figure--vision {
  width: 800px;
  max-width: 100%;
}

.figure img {
  width: 100%;
  height: auto;
}

.figure--vision img {
  /* width/height 属性で領域を先に確保し、読み込み時のガタつきを防ぐ */
  aspect-ratio: 680 / 530;
}

/* =========================================================
   CONTACT（Google フォーム埋め込み）
   ========================================================= */

.contact__form-wrap {
  width: 100%;
  border-radius: 8px;
  background: var(--ems-white);
  overflow: hidden;
}

.contact__iframe {
  display: block;
  width: 100%;
  /* Google フォームの項目数に合わせて調整してください */
  height: 1200px;
  border: 0;
}

.contact__fallback {
  font-size: 14px;
  line-height: 1.8;
  text-align: center;
  color: var(--ems-purple-light);
}

.contact__fallback a {
  text-decoration: underline;
}

/* =========================================================
   COMPANY
   ========================================================= */

.company__table {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 80%;
  margin: 0;
}

.company__row {
  display: flex;
  gap: 20px;
  width: 100%;
}

.company__label {
  flex: none;
  width: 20%;
  font-size: clamp(15px, 1.4vw, 20px);
  font-weight: 700;
  line-height: 1.5;
}

.company__value {
  width: 80%;
  margin: 0;
  font-size: clamp(15px, 1.4vw, 20px);
  font-weight: 400;
  line-height: 1.5;
}

/* =========================================================
   規約 / プライバシーポリシー（スクロールボックス）
   ========================================================= */

.legal {
  width: 100%;
  height: 160px;
  padding: 32px;
  border-radius: 4px;
  background: var(--ems-grey);
  overflow-y: auto;
  overscroll-behavior: contain;
  font-size: 16px;
  line-height: 1.5;
}

.legal > * + * {
  margin-top: 1em;
}

.legal__heading {
  font-weight: 700;
}

/* =========================================================
   Footer
   ========================================================= */

.footer {
  padding: 32px 0 40px;
  background: var(--ems-navy);
  text-align: center;
}

.footer__copy {
  font-family: var(--font-en);
  font-size: 12px;
  line-height: 1.5;
  color: var(--ems-purple-light);
}

/* =========================================================
   MEMBER モーダル
   Studio 版の実測値に合わせている:
     backdrop rgba(0,0,0,.16) / パネル 1000x600 #0f193c r10
     名刺 280x460 r8 / 矢印 40px / CTA 280x60 r32 / × 36px
   ========================================================= */

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.16);
}

.modal[hidden] {
  display: none;
}

.modal__panel {
  /* 開くときに横へ広がるアニメーションで使う目標幅 */
  --panel-width: min(1000px, 100% - 40px);

  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  width: var(--panel-width);
  height: 600px;
  max-height: calc(100% - 40px);
  border-radius: 10px;
  background: var(--ems-navy);
  box-shadow: 0 6px 15px 0 rgba(0, 0, 0, 0.2);
  overflow: hidden;
  animation: modal-unfold 600ms ease-in-out;
}

@keyframes modal-unfold {
  from {
    width: 0;
  }
  to {
    width: var(--panel-width);
  }
}

.modal__row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
}

.modal__image {
  flex: none;
  width: 280px;
  height: 460px;
  border: 1px solid var(--ems-grey);
  border-radius: 8px;
  object-fit: cover;
}

.modal__nav {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ems-white);
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.modal__nav svg {
  width: 40px;
  height: 40px;
}

.modal__nav:hover {
  opacity: 0.6;
}

.modal__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 280px;
  height: 60px;
  border: 1px solid var(--ems-grey);
  border-radius: 32px;
  background: var(--ems-gradation-01);
  color: var(--ems-white);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.5;
  transition: background 500ms ease;
}

.modal__cta:hover {
  background: var(--ems-gradation-02);
}

.modal__close {
  position: absolute;
  top: 5px;
  right: 20px;
  /* 見た目の位置は原版どおりに保ったまま、タップ領域だけ広げる */
  padding: 6px 12px;
  margin: -6px -12px;
  border: 0;
  background: transparent;
  color: var(--ems-grey);
  font-family: var(--font-jp);
  font-size: 36px;
  font-weight: 700;
  line-height: 1.4;
  cursor: pointer;
  transition: color 0.2s ease;
}

.modal__close:hover {
  color: var(--ems-white);
}

/* =========================================================
   Responsive
   ========================================================= */

/* --- tablet 以下：グローバルナビをハンバーガーに --- */
@media (max-width: 840px) {
  :root {
    --section-gap: 140px;
    --section-pad-top: 60px;
  }

  .nav-toggle {
    display: flex;
  }

  .gnav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 8px 24px rgba(15, 25, 60, 0.16);
    /* 閉じている間は完全に非表示（タブ移動もさせない） */
    display: none;
  }

  .gnav.is-open {
    display: block;
  }

  .gnav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .gnav__link {
    display: block;
    padding: 16px 5%;
    border-bottom: 1px solid rgba(15, 25, 60, 0.1);
  }

  .news__list {
    width: 100%;
    padding: 0;
  }

  .contact__iframe {
    height: 1400px;
  }

  .company__table {
    width: 90%;
  }
}

/* --- mobile --- */
@media (max-width: 540px) {
  .news__date {
    width: 100%;
  }

  .company__row {
    flex-direction: column;
    gap: 4px;
  }

  .company__table {
    width: 100%;
  }

  .company__label,
  .company__value {
    width: 100%;
  }

  .legal {
    height: 220px;
    padding: 20px;
  }

  /* パネルが狭く矢印が入りきらないので、名刺の左右に重ねて出す
     （原版はここで矢印が見切れて操作できなくなっていた） */
  .modal__row {
    position: relative;
    gap: 0;
  }

  .modal__nav {
    position: absolute;
    top: 50%;
    translate: 0 -50%;
    border-radius: 50%;
    background: rgba(15, 25, 60, 0.55);
  }

  .modal__nav--prev {
    left: -4px;
  }

  .modal__nav--next {
    right: -4px;
  }
}

/* --- モーションを減らす設定の利用者には控えめに --- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    translate: none;
    transition: none;
  }

  .member__card {
    transition: none;
  }
}
