/* =========
   common.css
   - LP横断で共通化できる基盤
   ========= */

:root {
  --bg: #ffffff;
  --fg: #0b1220;
  --muted: #5b6476;
  --line: rgba(13, 24, 48, .10);

  --brand: #1f6fff;
  --brand2: #2dd4ff;
  --accent: #0ea5e9;

  --shadow: 0 18px 60px rgba(10, 22, 54, .10);
  --shadow2: 0 10px 30px rgba(10, 22, 54, .08);
  --radius: 18px;
  --radius2: 26px;

  --container: 1140px;
  --gap: 22px;

  --h1: clamp(34px, 4.2vw, 56px);
  --h2: clamp(24px, 2.6vw, 34px);
  --h3: clamp(18px, 2.0vw, 22px);
  --p: clamp(15px, 1.4vw, 17px);

  --ease: cubic-bezier(.2, .8, .2, 1);
}

/* Reset-ish */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", "Hiragino Kaku Gothic ProN",
    "Noto Sans JP", "Meiryo", Arial, sans-serif;
  color: var(--fg);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
a.btn {
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid rgba(31, 111, 255, .35);
  outline-offset: 3px;
  border-radius: 10px;
}

.container {
  width: min(var(--container), calc(100% - 40px));
  margin: 0 auto;
}

.section {
  padding: clamp(54px, 7vw, 96px) 0;
  position: relative;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: .02em;
  color: rgba(31, 111, 255, .95);
  background: rgba(31, 111, 255, .08);
  border: 1px solid rgba(31, 111, 255, .15);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
}

.hr {
  height: 1px;
  width: 100%;
  background: var(--line);
}

/* Typography */
h1,
h2,
h3 {
  line-height: 1.15;
  margin: 0 0 12px;
}

h1 {
  font-size: var(--h1);
  letter-spacing: -.02em;
}

h2 {
  font-size: var(--h2);
  letter-spacing: -.01em;
}

h3 {
  font-size: var(--h3);
}

p {
  margin: 0 0 14px;
  font-size: var(--p);
  color: rgba(11, 18, 32, .92);
}

.lead {
  font-size: clamp(16px, 1.6vw, 19px);
  color: rgba(11, 18, 32, .86);
}

small,
.small {
  color: var(--muted);
  font-size: 13px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(13, 24, 48, .14);
  background: #fff;
  box-shadow: 0 10px 30px rgba(10, 22, 54, .06);
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), background .22s var(--ease), border-color .22s var(--ease);
  font-weight: 800;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 50px rgba(10, 22, 54, .12);
  border-color: rgba(31, 111, 255, .25);
}

.btn:active {
  transform: translateY(0px) scale(.99);
}

.btn-primary {
  border-color: rgba(31, 111, 255, .20);
  background: linear-gradient(135deg, rgba(31, 111, 255, 1), rgba(45, 212, 255, 1));
  color: #fff;
  box-shadow: 0 18px 60px rgba(31, 111, 255, .22);
}

.btn-primary:hover {
  box-shadow: 0 24px 80px rgba(31, 111, 255, .26);
}

.btn-ghost {
  background: rgba(11, 18, 32, .02);
  box-shadow: none;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(13, 24, 48, .14);
  background: rgba(255, 255, 255, .75);
  backdrop-filter: blur(10px);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
  color: rgba(11, 18, 32, .84);
}

/* Cards */
.card {
  border: 1px solid rgba(13, 24, 48, .12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .78);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow2);
}

.card.pad {
  padding: 18px;
}

.card.pad-lg {
  padding: 22px;
}

/* Grid helpers */
.grid {
  display: grid;
  gap: var(--gap);
}

@media (min-width: 980px) {
  .grid.cols-2 {
    grid-template-columns: 1fr 1fr;
  }

  .grid.cols-3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .grid.cols-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Reveal (scroll animation) */
html.js [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
  will-change: opacity, transform;
}

html.js [data-reveal].is-in {
  opacity: 1;
  transform: translateY(0);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(13, 24, 48, .08);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(31, 111, 255, 1), rgba(45, 212, 255, 1));
  box-shadow: 0 14px 40px rgba(31, 111, 255, .22);
}

.nav {
  display: none;
  gap: 16px;
  color: rgba(11, 18, 32, .86);
  font-weight: 700;
}

.nav a {
  padding: 8px 10px;
  border-radius: 999px;
}

.nav a:hover {
  background: rgba(31, 111, 255, .06);
}

@media (min-width: 980px) {
  .nav {
    display: flex;
  }
}

/* ===== Hamburger / Mobile Menu ===== */
.hamburger {
  display: none;
  /* PCでは非表示（SPのみ表示） */
  width: 44px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(13, 24, 48, .14);
  background: rgba(255, 255, 255, .75);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(10, 22, 54, .06);
  padding: 10px;
  position: relative;
}

/* ★確実に表示されるハンバーガーアイコン（3本線） */
.hamburger::before {
  content: "";
  display: block;
  width: 18px;
  height: 2px;
  background: rgba(11, 18, 32, .78);
  border-radius: 999px;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  box-shadow:
    0 -6px 0 rgba(11, 18, 32, .78),
    0 6px 0 rgba(11, 18, 32, .78);
}

/* span方式は無効化（競合回避） */
.hamburger span {
  display: none !important;
}

.mobile-menu {
  border-top: 1px solid rgba(13, 24, 48, .10);
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(14px);
}

.mobile-menu .container {
  padding: 12px 0 16px;
}

.mm-link {
  display: block;
  padding: 12px 10px;
  border-radius: 14px;
  font-weight: 900;
  color: rgba(11, 18, 32, .86);
}

.mm-link:hover {
  background: rgba(31, 111, 255, .06);
}

@media (max-width: 520px) {

  /* SPは「ブランド（左）＋ハンバーガー（右）」だけに詰める */
  .nav {
    display: none !important;
  }

  .site-header .wrap {
    justify-content: flex-start;
    /* space-between で間延びしない */
    gap: 10px;
    padding: 10px 0;
  }

  .brand {
    flex: 1 1 auto;
    min-width: 0;
    /* ellipsis を効かせる */
  }

  .brand-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    max-width: 72vw;
    font-size: 13px;
  }

  .hamburger {
    display: inline-flex;
    /* align-items: center;
    justify-content: center; */
    margin-left: auto;
    flex: 0 0 auto;
  }
}

/* Footer */
.site-footer {
  padding: 28px 0 80px;
  border-top: 1px solid rgba(13, 24, 48, .10);
  background: linear-gradient(180deg, rgba(11, 18, 32, .02), transparent);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  color: rgba(11, 18, 32, .78);
  font-weight: 700;
}

.footer-links a:hover {
  text-decoration: underline;
}

/* Sticky bottom CTA (mobile) */
.mobile-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  padding: 10px 12px;
  background: rgba(255, 255, 255, .78);
  backdrop-filter: blur(14px);
  border-top: 1px solid rgba(13, 24, 48, .10);
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.mobile-cta .note {
  font-size: 12px;
  color: rgba(11, 18, 32, .72);
  font-weight: 700;
}

@media (min-width: 980px) {
  .mobile-cta {
    display: none;
  }
}

/* Utilities */
.m0 {
  margin: 0;
}

.mt8 {
  margin-top: 8px;
}

.mt12 {
  margin-top: 12px;
}

.mt16 {
  margin-top: 16px;
}

.mt20 {
  margin-top: 20px;
}

.mt24 {
  margin-top: 24px;
}

.mt32 {
  margin-top: 32px;
}

.center {
  text-align: center;
}

.muted {
  color: var(--muted);
}

/* ===== Mobile Header 最適化 ===== */
@media (max-width: 520px) {

  /* ヘッダーを横並び固定 */
  .site-header .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }

  /* タイトルを改行させない */
  .brand {
    font-size: 13px;
    white-space: nowrap;
    /* ← 改行禁止 */
    overflow: hidden;
    text-overflow: ellipsis;
    /* 万一はみ出したら ... */
  }

  /* ロゴ少し小さく */
  .brand-mark {
    width: 24px;
    height: 24px;
  }

  /* CTAボタンを小さく */
  .site-header .btn {
    height: 32px;
    /* ← 小さく */
    padding: 0 10px;
    /* 横幅縮小 */
    font-size: 12px;
    white-space: nowrap;
    border-radius: 999px;
  }
}

/* ===== Hamburger (base) ===== */
.hamburger {
  display: none;
  /* PCは隠す */
  width: 42px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(13, 24, 48, .14);
  background: rgba(255, 255, 255, .75);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(10, 22, 54, .06);
  padding: 10px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.hamburger span {
  display: block;
  width: 18px;
  height: 2px;
  background: rgba(11, 18, 32, .76);
  border-radius: 99px;
  margin: 5px 0;
}

/* Mobile menu */
.mobile-menu {
  border-top: 1px solid rgba(13, 24, 48, .10);
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(14px);
}

.mobile-menu .container {
  padding: 12px 0 16px;
}

.mm-link {
  display: block;
  padding: 12px 10px;
  border-radius: 14px;
  font-weight: 900;
  color: rgba(11, 18, 32, .86);
}

.mm-link:hover {
  background: rgba(31, 111, 255, .06);
}

/* ===== Mobile header tuning ===== */
@media (max-width: 520px) {

  /* PC用ナビは隠す */
  .nav {
    display: none;
  }

  /* ブランドは1行固定（はみ出したら…） */
  .brand-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    max-width: 72vw;
    /* ハンバーガー分を残す */
    font-size: 13px;
  }

  /* ロゴを少し小さくして高さを締める */
  .brand-mark {
    width: 24px;
    height: 24px;
    border-radius: 10px;
  }

  /* ヘッダー全体の高さを締める */
  .site-header .wrap {
    padding: 10px 0;
    gap: 10px;
  }

  /* ハンバーガー表示 */
  .hamburger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
  }
}