:root {
  --bg: #000;
  --fg: #fff;
  --muted: rgba(255, 255, 255, 0.7);
  --border: rgba(255, 255, 255, 0.15);
  --header-h: 64px;
  --max-w: 1080px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  /*background: var(--bg);*/
  background: linear-gradient(
    180deg,
    #1b2f5a 0%,
    #18213a 22%,
    #131722 40%,
    #0d0d0d 70%,
    #000 100%
  );
  color: var(--fg);
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    sans-serif;
}

/* ===== Header ===== */
.header {
  position: sticky;
  top: 0;
  height: var(--header-h);
  z-index: 100;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: rgba(0, 0, 0, 0.55);
  border-bottom: 1px solid var(--border);
}

.header__inner {
  max-width: var(--max-w);
  height: 100%;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 14px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--fg);
  white-space: nowrap;
}

/* ===== Navigation ===== */
.nav {
  display: flex;
  gap: 24px;
}

.nav a {
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
  position: relative;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 1px;
  background: var(--fg);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}

.nav a:hover {
  color: var(--fg);
}
.nav a:hover::after {
  transform: scaleX(1);
}

/* ===== Mobile Menu ===== */
body.is-menu-open {
  position: fixed;
  inset: 0;
  width: 100%;
  overflow: hidden;
}
.menu-btn {
  display: none;
  background: none;
  border: 0;
  color: var(--fg);
  font-size: 12px;
  letter-spacing: 0.2em;
  position: relative; /* ← z-indexを効かせる */
  z-index: 200;
}

@media (max-width: 768px) {
  .nav {
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    height: 100dvh; /* ← iOS/Chromeの表示領域ズレ対策 */
    background: rgba(0, 0, 0, 0.96);
    z-index: 150;

    display: flex;
    flex-direction: column;
    align-items: center;

    /* 「中央」じゃなくて、ヘッダー下から積む（これが一番事故らない） */
    justify-content: flex-start;

    /* ヘッダー＋余白ぶん下げる */
    padding-top: calc(var(--header-h) + 56px);
    gap: 28px;

    /* 開閉 */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    pointer-events: none;

    transition:
      opacity 0.25s ease,
      transform 0.25s ease,
      visibility 0s linear 0.25s;
  }

  .nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
    transition-delay: 0s;
  }

  .nav a {
    font-size: 16px;
    line-height: 1; /* ← 余計な上はみ出しを防ぐ */
    padding: 10px 0; /* ← タップ領域確保 */
    z-index: 150;
    display: block;
    min-width: 70%;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent; /* iOSの青いハイライト消す */
  }

  .menu-btn {
    display: block;
  }
  /*下部メニューボタンは非表示*/
  .footer .menu-btn {
    display: none;
  }

  .nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.96);
    z-index: 140;
  }
  .nav-overlay.is-open {
    display: block;
    width: 100%;
    height: 100%;
  }
}

/* ===== Main ===== */
main {
  padding-top: var(--header-h);
}

/* ===== Footer ===== */
.footer {
  margin-top: clamp(80px, 16vh, 160px);
  padding: clamp(32px, 6vw, 64px) 20px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.85));
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.footer__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  gap: 28px;
}

.footer__brand {
  display: grid;
  gap: 6px;
}

.footer__logo {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.footer__tagline {
  margin: 0;
  font-size: 12px;
  opacity: 0.7;
}

.footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.footer__nav a {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
}

.footer__nav a:hover {
  color: #fff;
}

.footer__meta {
  display: grid;
  gap: 4px;
}

.footer__copy,
.footer__credit {
  margin: 0;
  font-size: 11px;
  opacity: 0.6;
}

/* スマホ最適化 */
@media (max-width: 600px) {
  .footer__nav {
    gap: 14px;
  }
}

/* =========================
   Links – Eclair
   ========================= */

/* 基本リンク */
a {
  color: inherit;
  text-decoration: none;
  text-underline-offset: 0.22em;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(255, 255, 255, 0.35);
  transition:
    text-decoration-color 0.25s ease,
    opacity 0.25s ease;
}

/* 文章中リンクは下線を出す（任意：本文だけにしたい場合は p a に変更） */
p a:link,
p a:visited {
  text-decoration: underline;
}

/* hover */
a:hover {
  text-decoration-color: rgba(255, 255, 255, 0.9);
}

/* focus（キーボード操作の視認性） */
a:focus {
  outline: none;
}
a:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.75);
  outline-offset: 3px;
  text-decoration: none;
}

/* アクティブ時（押した感じ） */
a:active {
  opacity: 0.7;
}

/* 外部リンクなどに使う：下線なしで“控えめ” */
a.link-muted {
  text-decoration: none;
  opacity: 0.9;
}
a.link-muted:hover {
  opacity: 1;
}

/* ボタン風リンク（CTA） */
a.link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.6rem;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: transparent;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.9rem;
  text-decoration: none;
  transition:
    background 0.25s ease,
    color 0.25s ease,
    border-color 0.25s ease,
    transform 0.25s ease;
}

a.link-btn:hover {
  background: #fff;
  color: #000;
  border-color: #fff;
  transform: translateY(-1px);
}

a.link-btn:active {
  transform: translateY(0);
  opacity: 0.9;
}

/* ナビ用（下線を消したい場合に） */
.nav a,
.gnav a {
  text-decoration: none;
}
.nav a:hover,
.gnav a:hover {
  opacity: 0.85;
}
