/* ===== Design Tokens ===== */
:root{
  --header-bg-1: rgba(11,15,20,.85);
  --header-bg-2: rgba(11,15,20,.65);

  --bg: #0b0f14;
  --bg-soft: #0d141c; /* ← common.css 内で参照されていたので定義 */
  --fg: #e8eef6;
  --muted: #9aa4b2;

  --accent: #6bd9a5;
  --accent-soft: rgba(107,217,165,.45);
  --accent-strong: #41c88d; /* btn-primary の gradient 用に定義 */

  --max-width: 1100px;

  /* Scrollbar */
  --sb-track: rgba(255,255,255,0.06);
  --sb-thumb: rgba(154,164,178,0.38);
  --sb-thumb-hover: rgba(154,164,178,0.55);
}

/* ===== Shared Base ===== */
*{ box-sizing: border-box; }
html{
  background: var(--bg-soft);
  color-scheme: dark; /* UA側のスクロール描画もダーク寄せ */
  scrollbar-gutter: stable;
}
body{
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", sans-serif;
  color: var(--text, var(--fg));
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;

  padding-top: 64px; /* ヘッダー固定ぶん */
}
a{ color: inherit; text-decoration: none; }
img{ max-width: 100%; display: block; }

.site-shell{
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main{
  flex: 1;
  padding-bottom: 2.5rem;
}
.container{
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ===== Scrollbar (Global / unified) ===== */
/* Firefox */
*{
  scrollbar-color: var(--sb-thumb) var(--sb-track);
  scrollbar-width: thin;
}
/* WebKit */
*::-webkit-scrollbar{ width: 10px; height: 10px; }
*::-webkit-scrollbar-track{ background: var(--sb-track); }
*::-webkit-scrollbar-thumb{
  background: var(--sb-thumb);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
*::-webkit-scrollbar-thumb:hover{ background: var(--sb-thumb-hover); }

/* ===== Loading Overlay ===== */
.loading{
  position: fixed;
  inset: 0;
  z-index: 99999;
  pointer-events: none; /* overlayは見せるだけ（クリックは通す） */
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;

  background: rgba(0,0,0,.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);

  color: var(--text, #fff);
  font-size: 1rem;
  letter-spacing: .12em;
}
.loading[hidden]{ display:none; }

.loading-dots{
  display: inline-flex;
  align-items: center;
  letter-spacing: 0;
  line-height: 1;
}
.loading-dots span{
  display:inline-block;
  width:.35em;
  text-align:center;
  opacity:.18;
  animation: loadingDot 1s infinite;
}
.loading-dots span:nth-child(2){ animation-delay:.15s; }
.loading-dots span:nth-child(3){ animation-delay:.30s; }

@keyframes loadingDot{
  0%, 60%, 100% { opacity:.18; transform: translateY(0); }
  30% { opacity:1; transform: translateY(-2px); }
}

body.is-loading{
  overflow: hidden;
  touch-action: none; /* iOS/スマホ対策 */
}
body.is-loading main{
  pointer-events: none; /* 本文は触れない */
}

/* ===== Header ===== */
.site-header{
  position: fixed;
  top: 0; left: 0; right: 0;

  /* loading(99999)より上へ */
  z-index: 100001;

  background: rgba(11, 15, 20, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 10px 30px rgba(0,0,0,0.18);
  transition: background .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.site-header.is-scrolled{
  background: rgba(11, 15, 20, 0.78);
  box-shadow: 0 14px 40px rgba(0,0,0,0.28);
  border-bottom-color: rgba(255,255,255,0.10);
}
body.is-loading .site-header{
  background: rgba(11, 15, 20, 0.82);
  border-bottom-color: rgba(255,255,255,0.12);
}

.nav-container{
  max-width: var(--max-width);
  margin: 0 auto;
  padding: .9rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
}

.brand{
  display: flex;
  gap: .6rem;
  align-items: center;
  color: var(--fg);
  text-decoration: none;
}
.brand-logo{
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(107,217,165,.18);
}
.brand-text-main{
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: .08em;
}
.brand-text-sub{
  font-size: .7rem;
  color: var(--muted);
}

/* ===== Nav ===== */
.nav-links{
  display: flex;
  gap: 1.1rem;
}
.nav-links a{
  color: var(--muted);
  text-decoration: none;
  padding-bottom: .15rem;
  border-bottom: 1px solid transparent;
}
.nav-links a:hover,
.nav-links a.is-active{
  color: var(--accent);
  border-color: var(--accent-soft);
}

/* ===== Social Links (explicit link styling) ===== */
.sns-link{
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  border-bottom: 0;
  opacity: .95;
}
.sns-link:hover{
  opacity: 1;
  text-decoration-thickness: 2px;
}
.sns-link.sns-youtube{ color: #ff6b6b; }
.sns-link.sns-instagram{ color: #c084fc; }

/* ===== Footer ===== */
.site-footer-wrap{
  background: var(--bg-soft);
  border-top: 1px solid rgba(255,255,255,0.10);
}

.site-footer{
  margin-top: 0;
  padding: .9rem 0 1.2rem;
  border-top: 0;
  opacity: .75;
  text-align: center;
  font-size: .86rem;
  color: rgba(154,164,178,0.65);
  letter-spacing: .04em;
}

/* footer_reviewed.html に合わせてリンクを当てる */
.footer-links nav{
  display: flex;
  gap: .9rem;
  flex-wrap: wrap;
  justify-content: center;
  padding: .35rem 0 .65rem;
}
.footer-links a{
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px dashed rgba(107,217,165,0.35);
}
.footer-links a:hover{
  border-bottom-style: solid;
}

/* ===== Sections / Hero (shared) ===== */
.section{
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 0;
}

.hero{
  padding-top: 3rem;
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2.2fr);
  gap: 2.2rem;
  align-items: start;
}

.hero-title{
  font-size: clamp(1.85rem, 2.8vw, 2.65rem);
  line-height: 1.15;
  margin: 0 0 .75rem;
  letter-spacing: -0.02em;
}
.hero-lead{
  margin: 0 0 1.25rem;
  color: var(--muted);
  max-width: 52ch;
}
.hero-actions{
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
  align-items: center;
}

.btn-primary,
.btn-ghost{
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .7rem 1rem;
  border-radius: 999px;
  font-weight: 650;
  border: 1px solid transparent;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease, border-color .12s ease;
}
.btn-primary{
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: #06121a;
  box-shadow: 0 14px 28px rgba(0,0,0,.32);
}
.btn-primary:hover{ transform: translateY(-1px); }
.btn-ghost{
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.16);
  color: var(--text, var(--fg));
}
.btn-ghost:hover{ background: rgba(255,255,255,.09); }

@media (max-width: 860px){
  .section{ padding: 2.2rem 1rem 0; }
  .grid-2{ grid-template-columns: 1fr; }

  .hero{ grid-template-columns: 1fr; padding-top: 2.4rem; }
  .site-header .nav-links{ display: none; }
}

/* ===== Responsive base tweaks ===== */
.container{
  padding: 0 clamp(0.9rem, 3.5vw, 1.25rem);
}

.section{
  padding-left: clamp(0.9rem, 3.5vw, 1.25rem);
  padding-right: clamp(0.9rem, 3.5vw, 1.25rem);
  padding-top: clamp(1.8rem, 4.5vw, 2.5rem);
}

/* ===== Header: mobile menu button ===== */
.nav-toggle{
  display: none;
  width: 44px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.06);
  color: var(--fg);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.nav-toggle:hover{
  background: rgba(255,255,255,0.09);
}
.nav-toggle-bar{
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: rgba(232,238,246,0.85);
}

/* ===== Mobile menu overlay ===== */
.mobile-menu[hidden]{ display:none; }
.mobile-menu{
  position: fixed;
  inset: 0;
  z-index: 120000; /* header(100001)より上 */
  display: grid;
  place-items: start center;
}
.mobile-menu-backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.62);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.mobile-menu-panel{
  position: relative;
  width: min(520px, 100vw);
  max-height: calc(100vh - 16px);
  margin-top: calc(12px + env(safe-area-inset-top));
  background: rgba(11,15,20,0.92);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 0 0 18px 18px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.55);
  padding: 1rem 1rem 1.1rem;
  margin: 0;

  opacity: 0;
  transform: translateY(-14px);
  transition: opacity 220ms ease, transform 220ms cubic-bezier(.2,.8,.2,1);
  will-change: opacity, transform;
}
.mobile-menu.is-open .mobile-menu-panel{
  opacity: 1;
  transform: translateY(0);
}
.mobile-menu-head{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: .75rem;
  padding-bottom: .6rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: .75rem;
}
.mobile-menu-title{
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--fg);
  font-size: .9rem;
}
.mobile-menu-close{
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.06);
  color: var(--fg);
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
}
.mobile-menu-close:hover{ background: rgba(255,255,255,0.09); }

.mobile-menu-links{
  display: grid;
  gap: .55rem;
}
.mobile-menu-links a{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .9rem .95rem;
  border-radius: 14px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--fg);
}
.mobile-menu-links a::after{
  content: "›";
  opacity: .7;
}
.mobile-menu-links a:hover{
  background: rgba(255,255,255,0.08);
}
.mobile-menu-links a.is-active{
  border-color: rgba(107,217,165,0.35);
}

body.menu-open{
  overflow: hidden;
  touch-action: none;
}

/* ===== Small screens ===== */
@media (max-width: 860px){
  body{ padding-top: 60px; }
  .nav-container{ padding: .8rem 1rem; }
  .brand-text-sub{ display:none; }

  .site-header .nav-links{ display: none; }
  .nav-toggle{ display: inline-flex; flex-direction: column; }
}
