* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Hiragino Sans', 'Meiryo', 'Helvetica Neue', sans-serif;
  background: #0a0a14;
  color: #e8e8e8;
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* ===== Background Aurora (ページ全体に漂うオーブ) ===== */
.bg-aurora {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.32;
  will-change: transform;
}

.bg-orb-1 {
  width: 520px; height: 520px;
  background: radial-gradient(circle, #ff7eb6 0%, transparent 70%);
  top: -8%; left: -8%;
  animation: bg-float-1 24s ease-in-out infinite;
}
.bg-orb-2 {
  width: 620px; height: 620px;
  background: radial-gradient(circle, #ffb86c 0%, transparent 70%);
  top: 18%; right: -10%;
  animation: bg-float-2 28s ease-in-out infinite;
}
.bg-orb-3 {
  width: 480px; height: 480px;
  background: radial-gradient(circle, #8be9fd 0%, transparent 70%);
  top: 48%; left: 22%;
  animation: bg-float-3 26s ease-in-out infinite;
}
.bg-orb-4 {
  width: 460px; height: 460px;
  background: radial-gradient(circle, #5fd97b 0%, transparent 70%);
  top: 70%; right: 18%;
  animation: bg-float-4 30s ease-in-out infinite;
}
.bg-orb-5 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, #b48cff 0%, transparent 70%);
  top: 35%; left: 55%;
  animation: bg-float-5 22s ease-in-out infinite;
}

@keyframes bg-float-1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(80px, 60px) scale(1.1); }
  66%      { transform: translate(-40px, 30px) scale(0.95); }
}
@keyframes bg-float-2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(-100px, 80px) scale(1.15); }
}
@keyframes bg-float-3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25%      { transform: translate(60px, -50px) scale(0.9); }
  75%      { transform: translate(-70px, 40px) scale(1.05); }
}
@keyframes bg-float-4 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  40%      { transform: translate(70px, -40px) scale(1.08); }
  80%      { transform: translate(-50px, 60px) scale(0.92); }
}
@keyframes bg-float-5 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(40px, -70px) scale(1.1); }
}

/* z-index レイヤー: タイトル(50) > カード(30) > container(2) > AIくん(chat-fab:1) > 背景 */
.container,
.hero { position: relative; z-index: 2; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 24px;
}

/* ===== Global Site Header (グラスモーフィズム ダーク) ===== */
.site-header {
  background: rgba(10, 10, 20, 0.55);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.02), 0 6px 24px rgba(0, 0, 0, 0.35);
  position: sticky;
  top: 0;
  z-index: 100;
}

/* ロゴはダーク背景に溶け込むよう白モノトーン化 */
.site-logo img {
  filter: brightness(0) invert(1);
  opacity: 0.92;
  transition: opacity 0.2s;
}
.site-logo:hover img {
  opacity: 1;
}

/* ハンバーガーボタン (PC では非表示) */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 50px;
  height: 50px;
  padding: 0;
  background: rgba(255, 255, 255, 0.16);
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  margin-right: 4px;
  flex-shrink: 0;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.hamburger:hover,
.hamburger:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2.5px;
  background: #fff;
  margin: 0 auto;
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.hamburger.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger.is-open span:nth-child(2) {
  opacity: 0;
}
.hamburger.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.site-header-inner {
  width: 100%;
  margin: 0;
  padding: 0 30px;
  display: flex;
  align-items: stretch;
  gap: 0;
}

.site-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  padding: 10px 0;
  margin-right: 20px;
}

.site-logo img {
  height: 80px;
  width: auto;
  display: block;
}

.site-nav {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  align-items: stretch;
}

.site-nav ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 45px;
  align-items: stretch;
}

.site-nav li {
  display: flex;
  align-items: center;
}

.site-nav a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.site-nav a:hover {
  color: #3fd9a6;
}

.site-nav a.active {
  color: #3fd9a6;
  border-bottom-color: #3fd9a6;
}

.site-nav li.contact-item {
  margin-left: 16px;
}

.site-nav a.contact-btn {
  background: rgba(63, 217, 166, 0.08);
  color: #3fd9a6 !important;
  padding: 0 30px;
  height: 48px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  border: 1px solid rgba(63, 217, 166, 0.35) !important;
  border-radius: 999px;
  margin: 0 4px;
  box-shadow: none;
  align-self: center;
}

.site-nav a.contact-btn:hover {
  background: rgba(63, 217, 166, 0.18);
  border-color: rgba(63, 217, 166, 0.6) !important;
  color: #fff !important;
}

/* スマホ・タブレット: ハンバーガーメニュー */
@media (max-width: 992px) {
  .site-header-inner {
    padding: 0 16px;
    justify-content: space-between;
  }
  .site-logo {
    padding: 10px 0;
    margin-right: 0;
  }
  .site-logo img {
    height: 48px;
  }
  .hamburger {
    display: flex;
  }

  /* ナビは drawer として右からスライドイン (ダーク + glass) */
  .site-nav {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    max-width: 80vw;
    height: 100vh;
    background: rgba(15, 15, 28, 0.92);
    backdrop-filter: blur(24px) saturate(160%);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.5);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 200;
    display: block;
    flex: none;
    padding-top: 70px;
    overflow-y: auto;
  }
  .site-nav.is-open {
    transform: translateX(0);
  }

  /* drawer 内のメニュー縦並び */
  .site-nav ul {
    display: block;
    padding: 0;
    margin: 0;
    width: 100%;
  }
  .site-nav li {
    display: block;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }
  .site-nav a {
    display: block;
    width: 100%;
    padding: 16px 24px;
    font-size: 14px;
    border-bottom: none;
    text-align: left;
  }
  .site-nav a.active {
    color: #3fd9a6;
    background: rgba(34, 168, 127, 0.15);
    border-bottom-color: transparent;
  }
  .site-nav li.contact-item {
    margin-left: 0;
    padding: 12px 16px;
    border-bottom: none;
  }
  .contact-btn {
    display: flex;
    justify-content: center;
    padding: 14px;
    width: 100%;
    border-radius: 4px;
  }

  /* drawer が開いている時の背景オーバーレイ */
  .site-nav.is-open::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: -1;
    transform: translateX(-100%);
    width: 100vw;
  }
}

/* ===== Hero ===== */
.hero {
  position: relative;
  text-align: center;
  margin: 0 -24px 40px;  /* container の padding を相殺して画面端まで広げる */
  padding: 95px 24px 55px;
  min-height: 40vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
}

/* ===== ページロード時の登場アニメーション ===== */
@keyframes intro-fade {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
/* 背景 OYOYO: はっきり出て、タイトル登場と同時に薄める */
@keyframes intro-bg-text {
  0%   {
    opacity: 0;
    color: rgba(255, 255, 255, 0);
    -webkit-text-stroke-color: rgba(255, 255, 255, 0);
  }
  40%  {
    opacity: 1;
    color: rgba(255, 255, 255, 0.55);
    -webkit-text-stroke-color: rgba(255, 255, 255, 0.95);
  }
  60%  {
    opacity: 1;
    color: rgba(255, 255, 255, 0.55);
    -webkit-text-stroke-color: rgba(255, 255, 255, 0.95);
  }
  100% {
    opacity: 1;
    color: rgba(255, 255, 255, 0.015);
    -webkit-text-stroke-color: rgba(255, 255, 255, 0.08);
  }
}

/* 背景の巨大な英字「OYOYO」 */
.hero-bg-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: clamp(110px, 22vw, 280px);
  opacity: 0;
  animation: intro-bg-text 2.3s ease-out 0.5s forwards;
  font-weight: 900;
  letter-spacing: -0.04em;
  font-family: 'Helvetica Neue', 'Arial', sans-serif;
  color: rgba(255, 255, 255, 0.015);
  -webkit-text-stroke: 2px rgba(255, 255, 255, 0.08);
  white-space: nowrap;
  user-select: none;
  pointer-events: none;
  z-index: 0;
  line-height: 1;
}

/* 浮遊するグラデーションオーブ */
.hero-orbs {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.45;
  will-change: transform;
}

.orb-1 {
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, #ff7eb6 0%, transparent 70%);
  top: 5%;
  left: 8%;
  animation: float-1 14s ease-in-out infinite;
}

.orb-2 {
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, #ffb86c 0%, transparent 70%);
  bottom: 0%;
  right: 5%;
  animation: float-2 18s ease-in-out infinite;
}

.orb-3 {
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, #8be9fd 0%, transparent 70%);
  top: 40%;
  right: 35%;
  animation: float-3 16s ease-in-out infinite;
}

@keyframes float-1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(60px, -40px) scale(1.1); }
  66%      { transform: translate(-30px, 30px) scale(0.95); }
}
@keyframes float-2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(-80px, -60px) scale(1.15); }
}
@keyframes float-3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25%      { transform: translate(40px, 50px) scale(0.9); }
  75%      { transform: translate(-50px, -30px) scale(1.05); }
}

/* ヒーローのテキストコンテンツ */
.hero-content {
  position: relative;
  z-index: 50;
  opacity: 0;
  animation: intro-fade 1.0s ease-out 1.8s forwards;
}

/* スクロール促進マーク */
.hero-scroll {
  position: absolute;
  bottom: 18px;
  left: 50%;
  font-size: 11px;
  letter-spacing: 6px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
  z-index: 2;
  font-family: 'Helvetica Neue', sans-serif;
  pointer-events: none;
  opacity: 0;
  transform: translateX(-50%);
  /* 3.2s 遅延でフェードイン、その後バウンス開始 */
  animation:
    intro-fade-scroll 0.8s ease-out 3.2s forwards,
    scroll-bounce 2.4s ease-in-out 4.0s infinite;
}

@keyframes intro-fade-scroll {
  from { opacity: 0; transform: translateX(-50%) translateY(20px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes scroll-bounce {
  /* opacity は触らず、transform のみ (intro-fade-scroll と競合させない) */
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%      { transform: translateX(-50%) translateY(8px); }
}

.hero h1 {
  font-size: 56px;
  font-weight: bold;
  letter-spacing: 4px;
  background: linear-gradient(90deg, #ff7eb6, #ffb86c, #8be9fd, #5fd97b);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 8s linear infinite;
  margin-bottom: 12px;
}

@keyframes shimmer {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}

.hero .subtitle {
  font-size: 14px;
  color: #999;
  letter-spacing: 4px;
  margin-bottom: 16px;
}

.hero .intro {
  font-size: 14px;
  color: #ccc;
  max-width: 500px;
  margin: 0 auto;
}

/* ===== Section ===== */
.section {
  margin-bottom: 56px;
  position: relative;
  z-index: 30;
}

.section:last-child {
  margin-bottom: 0;
}

.section-heading {
  font-size: 18px;
  font-weight: bold;
  letter-spacing: 4px;
  color: #ccc;
  margin: 0 0 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid #2a2a40;
  position: relative;
}

.section-heading::before {
  content: '';
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, #ff7eb6, #ffb86c);
}

/* ===== Sites Grid ===== */
.sites {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.loading {
  text-align: center;
  color: #666;
  padding: 40px;
}

.card {
  /* A: グラスモーフィズム */
  background: linear-gradient(180deg, rgba(22, 22, 40, 0.55), rgba(26, 26, 46, 0.65));
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  /* スクロールフェードイン初期状態 */
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 1.2s ease-out, transform 1.0s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.25s, box-shadow 0.3s;
}

/* C: 上端を流れるグラデーションライン */
.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--accent, #5b9bff) 50%,
    transparent 100%
  );
  background-size: 200% 100%;
  background-position: 200% 0;
  animation: card-top-stream 4.5s linear infinite;
  z-index: 5;
  opacity: 0.55;
  transition: opacity 0.3s, height 0.3s;
}

@keyframes card-top-stream {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}

.card.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* B: 光るホバー + 立体浮上 */
.card.is-visible:hover {
  transform: translateY(-6px);
  border-color: var(--accent, #888);
  box-shadow:
    0 0 0 1px var(--accent, rgba(255, 255, 255, 0.1)),
    0 20px 48px rgba(0, 0, 0, 0.55),
    0 0 80px -16px var(--accent, transparent);
}

.card.is-visible:hover::before {
  opacity: 1;
  height: 3px;
}

/* セクション見出しもフェードイン */
.section-heading {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.9s ease-out, transform 0.9s ease-out;
}

.section-heading.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* アクセシビリティ: アニメーション低減設定なら無効化 */
@media (prefers-reduced-motion: reduce) {
  .card,
  .section-heading,
  .hero-bg-text,
  .hero-content,
  .hero-scroll {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
    transition: none;
  }
  .hero-bg-text {
    transform: translate(-50%, -50%) !important;
  }
}

.card-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #0f0f1e;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-thumb.placeholder {
  background: linear-gradient(135deg, var(--accent, #5b9bff) 0%, transparent 70%);
}

.card-thumb-emoji {
  font-size: 80px;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.5));
}

.card-body {
  padding: 14px 18px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-title {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 2px;
  color: #fff;
}

.card-tagline {
  font-size: 11px;
  color: var(--accent, #888);
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.card-description {
  font-size: 12px;
  color: #bbb;
  line-height: 1.6;
  margin-bottom: 0;
  flex: 1;
}

.card-tags {
  display: none;
}

.card-tag {
  font-size: 11px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid #333;
  border-radius: 999px;
  padding: 3px 10px;
  color: #ccc;
}

.card-meta {
  display: none;
}

.card-stack {
  display: none;
}

.card-arrow {
  color: var(--accent, #888);
  font-size: 16px;
  transition: transform 0.2s;
}

.card:hover .card-arrow {
  transform: translateX(4px);
}

.card-note {
  font-size: 10px;
  color: #666;
  margin-top: 4px;
  text-align: right;
}

/* ===== Footer ===== */
footer {
  text-align: center;
  margin-top: 80px;
  padding: 20px;
  color: #444;
  font-size: 12px;
}

/* ===== Responsive (スマホ追加調整) ===== */
@media (max-width: 600px) {
  .site-logo img {
    height: 36px;
  }
  .site-header-inner {
    padding: 0 12px;
  }

  /* ヒーロー: タイトル縮小 + 余白縮小 + オーブ縮小 */
  .container {
    padding: 24px 16px;
  }
  .hero {
    margin: 0 -16px 32px;
    padding: 60px 16px 90px;
    min-height: 50vh;
  }
  .hero h1 {
    font-size: 30px;
    letter-spacing: 1px;
    line-height: 1.3;
    word-break: keep-all;
    max-width: 100%;
  }
  .hero .subtitle {
    font-size: 12px;
    letter-spacing: 2px;
  }
  .orb-1, .orb-2, .orb-3 {
    width: 220px;
    height: 220px;
    filter: blur(50px);
  }
  .orb-1 { top: 5%; left: -10%; }
  .orb-2 { bottom: 5%; right: -10%; }
  .orb-3 { top: 40%; right: 10%; }
  .hero-bg-text {
    -webkit-text-stroke-width: 1px;
    color: rgba(255, 255, 255, 0.04);
    -webkit-text-stroke-color: rgba(255, 255, 255, 0.08);
  }
  .hero-scroll {
    font-size: 10px;
    letter-spacing: 4px;
    bottom: 24px;
  }

  /* 背景オーラもスマホ用に縮小 */
  .bg-orb {
    filter: blur(60px);
    opacity: 0.25;
  }
  .bg-orb-1, .bg-orb-2, .bg-orb-3, .bg-orb-4, .bg-orb-5 {
    width: 320px;
    height: 320px;
  }

  /* カード: 1 列 + コンパクト化 */
  .sites {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .section {
    margin-bottom: 40px;
  }
  .section-heading {
    font-size: 15px;
    letter-spacing: 3px;
    margin-bottom: 14px;
  }
  .card-body {
    padding: 16px 18px 18px;
  }
  .card-title {
    font-size: 18px;
  }
  .card-description {
    font-size: 12px;
  }
}
