/* ============================================================
   DIFO — common.css  全ページ共通スタイル
   Blue-Teal Theme
   ============================================================ */

@import url("../common/loading.css");
@import url("../common/app-modal.css");
@import url("./cookie/cookie-consent.css");

/* ── RESET ── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

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

ul,
ol {
  list-style: none;
}

address {
  font-style: normal;
}

/* ── DESIGN TOKENS ── */
:root {
  /* 主色調 */
  --primary-color: #2f7ab6;
  --primary-light: #cce0f5;
  --primary-hover: #28b5c2;

  /* 辅助色 */
  --secondary-color: #256d85;
  --accent-color: #23d6c9;

  /* 中性色 */
  --neutral-dark: #2c3a45;
  --neutral-medium: #5a7080;
  --neutral-light: #f0f5f8;
  --white: #ffffff;

  /* 派生 tokens */
  --primary-pale: #e3f0fa;
  --primary-bg: #f0f7fd;
  --secondary-pale: #dff5f7;
  --shadow-sm: 0 2px 8px rgba(47, 122, 182, 0.08);
  --shadow-md: 0 6px 24px rgba(47, 122, 182, 0.12);
  --shadow-lg: 0 16px 48px rgba(47, 122, 182, 0.15);

  /* Typography */
  --font-display: 'Outfit', 'Noto Sans JP', sans-serif;
  --font-body: 'Noto Sans JP', 'Outfit', sans-serif;

  /* Layout */
  --container-w: 1240px;
  --container-px: 48px;
  --nav-h: 72px;
  --section-py: 96px;
  --radius: 14px;
  --radius-sm: 8px;
  --radius-pill: 100px;

  /* Motion */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── BASE ── */
html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background: var(--white);
  color: var(--neutral-dark);
  line-height: 1.75;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── LAYOUT ── */
.container {
  width: 100%;
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 var(--container-px);
}

.section {
  padding: var(--section-py) 0;
}

/* ── TYPE UTILS ── */
.section-eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent-color);
  background: rgba(35, 214, 201, 0.12);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  margin-bottom: 14px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 3.5vw, 2.75rem);
  font-weight: 700;
  color: var(--neutral-dark);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 48px;
}

.section-title--white {
  color: var(--white);
}

.section-header {
  margin-bottom: 60px;
}

.hide-sp {
  display: inline;
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 0.25s var(--ease);
  border: none;
  white-space: nowrap;
}

.btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.btn--primary {
  background: var(--primary-color);
  color: var(--white);
  box-shadow: 0 4px 16px rgba(47, 122, 182, 0.25);
}

.btn--primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(47, 122, 182, 0.35);
}

.btn--primary:active {
  transform: translateY(0);
}

.btn--outline {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.btn--outline:hover {
  background: var(--primary-pale);
  transform: translateY(-2px);
}

.btn--white {
  background: var(--white);
  color: var(--primary-color);
  font-weight: 700;
}

.btn--white:hover {
  background: var(--primary-light);
  transform: translateY(-2px);
}

/* btn--nav: standalone（.btn なしでも動作） */
.btn--nav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 22px;
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  background: var(--primary-color);
  color: var(--white);
  border: none;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}

.btn--nav:hover {
  background: var(--primary-hover);
}

.btn--lg {
  padding: 16px 36px;
  font-size: 1rem;
}

/* ── REVEAL ── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
}

.reveal--d1 {
  transition-delay: 0.08s;
}

.reveal--d2 {
  transition-delay: 0.16s;
}

.reveal--d3 {
  transition-delay: 0.24s;
}

.reveal--d4 {
  transition-delay: 0.32s;
}

.reveal--d5 {
  transition-delay: 0.40s;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ============================================================
   HEADER
   ============================================================ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  transition: background 0.35s, box-shadow 0.35s;
}

.header.scrolled {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.07);
}

/* page-hero（深色背景）があるページ: スクロール前のヘッダー文字を白に */
/* デスクトップナビ限定。モバイルメニューは白背景なのでデフォルト色を維持。 */
body:has(.page-hero) .header:not(.scrolled) .header__nav .nav-link {
  color: rgba(255, 255, 255, 0.75);
}

body:has(.page-hero) .header:not(.scrolled) .header__nav .nav-link:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
}

body:has(.page-hero) .header:not(.scrolled) .header__nav .nav-link.active {
  color: var(--white);
  background: rgba(255, 255, 255, 0.15);
}

body:has(.page-hero) .header:not(.scrolled) .btn--nav {
  background: rgba(255, 255, 255, 0.15);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

body:has(.page-hero) .header:not(.scrolled) .btn--nav:hover {
  background: rgba(255, 255, 255, 0.28);
}

body:has(.page-hero) .header:not(.scrolled) .header__burger span {
  background: var(--white);
}

.header__inner {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 32px;
}

.header__logo {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.header__logo-img {
  height: 36px;
  width: auto;
  display: block;
}

/* テキストロゴ用（フォールバック） */
.logo-mark {
  width: 28px;
  height: 28px;
  background: var(--primary-color);
  border-radius: 8px;
  position: relative;
}

.logo-mark::after {
  content: '';
  position: absolute;
  inset: 5px;
  background: var(--white);
  border-radius: 3px;
  clip-path: polygon(0 100%, 50% 0, 100% 100%);
}

.logo-text {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary-color);
  letter-spacing: -0.03em;
}

.header__nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  padding: 8px 16px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--neutral-medium);
  border-radius: var(--radius-pill);
  transition: all 0.2s;
}

.nav-link:hover {
  color: var(--primary-color);
  background: var(--primary-pale);
}

.nav-link.active {
  color: var(--primary-color);
  font-weight: 600;
  background: var(--primary-pale);
}

/* ── Mobile burger ── */
.header__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  margin-left: auto;
}

.header__burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--neutral-dark);
  border-radius: 2px;
  transition: all 0.3s;
}

.header__burger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.header__burger.open span:nth-child(2) {
  opacity: 0;
}

.header__burger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.header__mobile {
  display: none;
  flex-direction: column;
  background: var(--white);
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  padding: 12px 20px 20px;
  gap: 2px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  max-height: calc(100vh - var(--nav-h));
  overflow-y: auto;
}

.header__mobile.open {
  display: flex;
}

.header__mobile .nav-link {
  display: block;
  padding: 14px 16px;
  font-size: 0.95rem;
  border-radius: var(--radius-sm);
  color: var(--neutral-dark);
}

.header__mobile .nav-link:hover {
  color: var(--primary-color);
  background: var(--primary-pale);
}

.header__mobile .nav-link.active {
  color: var(--primary-color);
  background: var(--primary-pale);
  font-weight: 600;
}

/* メニューが開いている間は header を白背景に固定（透明背景での視覚崩れを防止） */
.header:has(.header__mobile.open) {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.07);
}

body:has(.page-hero) .header:has(.header__mobile.open) .header__burger span {
  background: var(--neutral-dark);
}

/* ============================================================
   FOOTER（全ページ共通・ライトテーマ）
   ============================================================ */
.footer {
  background: linear-gradient(145deg, var(--primary-bg) 0%, var(--white) 55%, var(--secondary-pale) 100%);
  padding: 60px 0 32px;
}

.footer__top {
  display: grid;
  grid-template-columns: minmax(220px, max-content) 1fr;
  gap: 60px;
  margin-bottom: 48px;
}

.footer__brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.footer__logo-img {
  height: 40px;
  width: auto;
  display: block;
  margin-bottom: 8px;
  align-self: flex-start;
}

.footer__tagline {
  font-size: 0.78rem;
  color: var(--neutral-medium);
  line-height: 1.5;
  white-space: nowrap;
}

.footer__partner-link {
  display: inline-block;
  margin-top: 16px;
}

.footer__partner-logo {
  height: 36px;
  width: auto;
  display: block;
}

.footer__cols {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
}

.footer__col-title {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--secondary-color);
  margin-bottom: 16px;
}

.footer__col ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer__col ul a,
.footer__col address a,
.footer__col address p {
  font-size: 0.82rem;
  color: var(--neutral-medium);
  transition: color 0.2s;
  line-height: 1.6;
}

.footer__col ul a:hover,
.footer__col address a:hover {
  color: var(--primary-color);
}

/* ポリシー欄：Cookie 再設定（リンクと同系の見た目） */
.footer__col ul .footer__col-btn {
  display: inline;
  padding: 0;
  margin: 0;
  border: none;
  background: none;
  font: inherit;
  font-size: 0.82rem;
  color: var(--neutral-medium);
  cursor: pointer;
  text-align: left;
  transition: color 0.2s;
}

.footer__col ul .footer__col-btn:hover {
  color: var(--primary-color);
}

.footer__col ul .footer__col-btn:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
  border-radius: 2px;
}

.footer__address-street {
  white-space: nowrap;
}

.footer__sns-wrap {
  border: 1px solid rgba(47, 122, 182, 0.15);
  border-radius: 10px;
  padding: 10px 14px 12px;
  background: rgba(47, 122, 182, 0.03);
}

.footer__sns-notice {
  margin: 0 0 8px;
  font-size: 0.75rem;
  color: var(--neutral-medium);
  text-align: center;
}

.footer__sns {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.footer__sns-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(47, 122, 182, 0.07);
  border: 1px solid rgba(47, 122, 182, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--neutral-medium);
  cursor: default;
}

.footer__sns-icon svg {
  width: 16px;
  height: 16px;
}

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(47, 122, 182, 0.12);
  padding-top: 28px;
}

.footer__copy {
  font-size: 0.75rem;
  color: rgba(44, 58, 69, 0.45);
}

.footer__related {
  font-size: 0.75rem;
  color: var(--neutral-medium);
  transition: color 0.2s;
}

.footer__related:hover {
  color: var(--primary-color);
}

/* ============================================================
   PAGE HERO（サブページ共通）
   ============================================================ */
.page-hero {
  position: relative;
  padding: calc(var(--nav-h) + 72px) 0 80px;
  background: linear-gradient(135deg, #0e2a40 0%, #1a4a6e 45%, #1e6b7a 100%);
  overflow: hidden;
}

.page-hero__blob {
  position: absolute;
  fill: rgba(255, 255, 255, 0.04);
  pointer-events: none;
}

.page-hero__blob--1 {
  width: 480px;
  top: -80px;
  right: -60px;
}

.page-hero__blob--2 {
  width: 340px;
  bottom: -60px;
  left: -40px;
}

.page-hero__dots {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}

.page-hero__inner {
  position: relative;
  z-index: 1;
}

.page-hero__breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 20px;
}

.page-hero__breadcrumb a {
  color: rgba(255, 255, 255, 0.55);
  transition: color 0.2s;
}

.page-hero__breadcrumb a:hover {
  color: var(--accent-color);
}

.page-hero__breadcrumb span {
  color: rgba(255, 255, 255, 0.35);
}

.page-hero__breadcrumb strong {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
}

.page-hero__eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent-color);
  background: rgba(35, 214, 201, 0.15);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  margin-bottom: 16px;
}

.page-hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 16px;
}

.page-hero__title span {
  color: var(--accent-color);
}

.page-hero__subtitle {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.65);
  max-width: 480px;
  line-height: 1.7;
}

.page-hero__wave {
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
}

.page-hero__wave svg {
  width: 100%;
  display: block;
}

/* ── Responsive: 共通 ── */
@media (max-width: 1024px) {
  .footer__top {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .footer__cols {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }
}

@media (max-width: 900px) {
  .header__nav {
    display: none;
  }

  .header__burger {
    display: flex;
  }

  .header.scrolled {
    background: rgba(255, 255, 255, 0.98);
  }
}

@media (max-width: 1024px) {
  :root {
    --container-px: 32px;
  }
}

@media (max-width: 768px) {
  :root {
    --section-py: 64px;
    --container-px: 20px;
  }

  .hide-sp {
    display: none;
  }

  .header__nav {
    display: none;
  }

  .header__burger {
    display: flex;
  }

  .section-title {
    margin-bottom: 32px;
  }

  .section-header {
    margin-bottom: 40px;
  }

  .btn {
    padding: 12px 22px;
    font-size: 0.85rem;
  }

  .btn--lg {
    padding: 14px 26px;
    font-size: 0.95rem;
  }

  .footer {
    padding: 48px 0 24px;
  }

  .footer__top {
    gap: 32px;
    margin-bottom: 32px;
  }

  .footer__tagline {
    white-space: normal;
  }

  .footer__address-street {
    white-space: normal;
  }
}

@media (max-width: 480px) {
  :root {
    --section-py: 48px;
    --container-px: 16px;
  }

  .footer__cols {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .footer__bottom {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
    text-align: left;
  }
}

@media (max-width: 560px) {
  .page-hero {
    padding-top: calc(var(--nav-h) + 48px);
    padding-bottom: 56px;
  }

  .page-hero__title {
    font-size: 2rem;
  }

  .page-hero__subtitle {
    font-size: 0.88rem;
  }
}