/* ============================================================
   海響みらい電力 — 共通スタイル v2
   カラー: ロゴ由来 Blue #0573ca / Teal #3ab1d9 / Green #9ff59a
   フォント: Outfit (EN) + Noto Sans JP (JA)
   ============================================================ */

/* ---------- Google Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Noto+Sans+JP:wght@300;400;500;700&family=Noto+Serif+JP:wght@300;400;500;600;700&display=swap');

/* ---------- CSS Variables ---------- */
:root {
  /* Brand colors — メリハリ型：明るいブルー×深いダーク */
  --blue:       #29b6e8;   /* 明るいスカイブルー（変更なし） */
  --blue-dark:  #1a9fd4;
  --teal:       #4dd4ec;   /* 明るいティール（変更なし） */
  --green:      #a0edd8;   /* ミントグリーン（変更なし） */
  --grad:       linear-gradient(135deg, #29b6e8 0%, #4dd4ec 55%, #a0edd8 100%);
  --grad-h:     linear-gradient(135deg, #1a9fd4 0%, #38c8e0 55%, #80e4cc 100%);

  /* Neutrals — 明るく・透明感ある配色 */
  --bg-dark:    #082d44;   /* 深いネイビーティール */
  --bg-light:   #f0f8fc;   /* 白に近い水色 */
  --white:      #ffffff;
  --text:       #333344;   /* ①青みのある深いグレー（純黒を廃止） */
  --text-sub:   #556677;   /* 読みやすい中間グレー */
  --border:     #c8e8f4;   /* 明るめのボーダー */

  /* Typography */
  --font-en:    'Outfit', sans-serif;
  --font-ja:    'Noto Sans JP', sans-serif;
  --font-serif: 'Noto Serif JP', 'Yu Mincho', 'YuMincho', serif;

  /* Spacing */
  --section-py: 9.6rem;
  --container:  120rem;
  --container-sm: 80rem;

  /* Effects */
  --radius:     0.8rem;
  --radius-lg:  1.6rem;
  --shadow:     0 4px 24px rgba(41,182,232,0.14);
  --shadow-lg:  0 12px 40px rgba(41,182,232,0.26);
  --transition: 0.25s ease;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 62.5%; scroll-behavior: smooth; }
body {
  font-family: var(--font-ja);
  font-size: 1.6rem;
  color: var(--text);
  background: var(--white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ---------- Container ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 4rem;
}
@media (max-width: 768px) {
  .container { padding: 0 2rem; }
}

/* ---------- Section ---------- */
.section {
  padding: var(--section-py) 0;
  position: relative;
}
.section-sm {
  padding: 5.6rem 0;
}
.section-light {
  background: var(--bg-light);
}
.section-dark {
  background: var(--bg-dark);
}

/* ---------- Section label ---------- */
.section-label {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  font-family: var(--font-en);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 1.2rem;
}
.section-label::before {
  content: '';
  display: block;
  width: 2.4rem;
  height: 2px;
  background: var(--grad);
  border-radius: 2px;
}

/* ---------- Section titles ---------- */
.section-title {
  font-family: var(--font-ja);
  font-size: clamp(2.4rem, 3.5vw, 3.6rem);
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
  margin-bottom: 2.4rem;
  letter-spacing: -0.01em;
}
.section-title-en {
  font-family: var(--font-en);
  font-size: clamp(1.4rem, 2vw, 1.8rem);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.8rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1.2rem 2.8rem;
  border-radius: 100vw;
  font-family: var(--font-ja);
  font-size: 1.5rem;
  font-weight: 500;
  transition: var(--transition);
  white-space: nowrap;
  cursor: pointer;
}
.btn-primary {
  background: var(--grad);
  color: var(--white);
  box-shadow: 0 4px 20px rgba(41,182,232,0.35);
}
.btn-primary:hover {
  background: var(--grad-h);
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(41,182,232,0.45);
}
.btn-outline {
  border: 1.5px solid var(--blue);
  color: var(--blue);
  background: transparent;
}
.btn-outline:hover {
  background: var(--blue);
  color: var(--white);
}
.btn-white {
  background: var(--white);
  color: var(--blue);
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}
.btn-white:hover {
  background: var(--bg-light);
  transform: translateY(-2px);
}
.btn-arrow::after {
  content: '→';
  font-family: var(--font-en);
  transition: transform var(--transition);
}
.btn-arrow:hover::after {
  transform: translateX(4px);
}

/* ---------- Tag ---------- */
.tag {
  display: inline-block;
  padding: 0.3rem 1rem;
  border-radius: 4px;
  font-size: 1.1rem;
  font-weight: 500;
  background: rgba(41,182,232,0.14);
  color: var(--blue);
  letter-spacing: 0.05em;
}
.tag-press {
  background: rgba(77,212,236,0.14);
  color: var(--teal);
}

/* ---------- Fade-in animation ---------- */
.fade-in {
  opacity: 0;
  transform: translateY(2.4rem);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}
.fade-in-delay-1 { transition-delay: 0.12s; }
.fade-in-delay-2 { transition-delay: 0.24s; }
.fade-in-delay-3 { transition-delay: 0.36s; }

/* ---------- Vertical label ---------- */
.vert-label {
  position: absolute;
  left: 2.4rem;
  top: 50%;
  transform: translateY(-50%) rotate(-90deg);
  transform-origin: center;
  font-family: var(--font-en);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(13,84,120,0.18);
  white-space: nowrap;
  pointer-events: none;
}
@media (max-width: 1200px) { .vert-label { display: none; } }

/* ---------- Wave divider ---------- */
.wave-divider {
  line-height: 0;
  overflow: hidden;
}
.wave-divider svg {
  display: block;
  width: 100%;
}

/* ---------- Scroll indicator ---------- */
.scroll-indicator {
  position: absolute;
  bottom: 3.2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  z-index: 1;
}
.scroll-indicator span {
  font-family: var(--font-en);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  color: rgba(255,255,255,0.5);
}
.scroll-indicator-line {
  width: 1px;
  height: 4.8rem;
  background: linear-gradient(to bottom, rgba(255,255,255,0.5), transparent);
  animation: scrollLine 1.8s ease-in-out infinite;
}
@keyframes scrollLine {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ---------- Header ---------- */
#site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: 7.2rem;
  display: flex;
  align-items: center;
  padding: 0 4rem;
  gap: 3.2rem;
  transition: background var(--transition), box-shadow var(--transition);
  background: transparent;
}
#site-header.hero-dark {
  background: transparent;
}
#site-header.scrolled {
  background: rgba(255,255,255,0.97);
  box-shadow: 0 2px 20px rgba(41,182,232,0.15);
  backdrop-filter: blur(8px);
}
.header-logo {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  flex-shrink: 0;
}
.header-logo img {
  width: 3.6rem;
  height: 3.6rem;
  object-fit: contain;
}
/* 横型ロゴ（logo-img-full）専用スタイル */
.header-logo img.logo-img-full {
  width: auto;
  height: 5.2rem;
  max-width: 28rem;
  object-fit: contain;
  transition: opacity var(--transition);
}
.header-logo-text {
  font-family: var(--font-ja);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--white);
  transition: color var(--transition);
  white-space: nowrap;
}
#site-header.scrolled .header-logo-text { color: var(--text); }
/* 横型ロゴ使用時はテキストを非表示 */
.header-logo:has(img.logo-img-full) .header-logo-text { display: none; }
.header-nav {
  display: flex;
  align-items: center;
  gap: 3.2rem;
  margin-left: auto;
}
.header-nav a {
  font-family: var(--font-en);
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.8);
  transition: color var(--transition);
  position: relative;
  padding-bottom: 0.4rem;
}
.header-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--grad);
  transform: scaleX(0);
  transition: transform var(--transition);
}
.header-nav a:hover,
.header-nav a.active { color: var(--white); }
.header-nav a:hover::after,
.header-nav a.active::after { transform: scaleX(1); }
#site-header.scrolled .header-nav a {
  color: var(--text-sub);
}
#site-header.scrolled .header-nav a:hover,
#site-header.scrolled .header-nav a.active {
  color: var(--blue);
}
.header-contact {
  flex-shrink: 0;
  padding: 0.8rem 2rem;
  border-radius: 100vw;
  font-family: var(--font-ja);
  font-size: 1.3rem;
  font-weight: 500;
  border: 1.5px solid rgba(255,255,255,0.5);
  color: var(--white);
  transition: var(--transition);
}
.header-contact:hover {
  background: var(--white);
  color: var(--blue);
  border-color: var(--white);
}
#site-header.scrolled .header-contact {
  border-color: var(--blue);
  color: var(--blue);
}
#site-header.scrolled .header-contact:hover {
  background: var(--blue);
  color: var(--white);
}
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 0.8rem;
  margin-left: auto;
}
.hamburger span {
  display: block;
  width: 2.4rem;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: var(--transition);
}
#site-header.scrolled .hamburger span { background: var(--text); }
@media (max-width: 900px) {
  .header-nav, .header-contact { display: none; }
  .hamburger { display: flex; }
  #site-header { padding: 0 2rem; }
}

/* ---------- Mobile nav ---------- */
.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: var(--bg-dark);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3.2rem;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.mobile-nav.open { transform: translateX(0); }
.mobile-nav a {
  font-family: var(--font-en);
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--white);
  transition: color var(--transition);
}
.mobile-nav a:hover { color: var(--teal); }
.mobile-nav-close {
  position: absolute;
  top: 2.4rem;
  right: 2.4rem;
  font-size: 2.4rem;
  color: var(--white);
  opacity: 0.6;
  transition: opacity var(--transition);
}
.mobile-nav-close:hover { opacity: 1; }

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  background: var(--bg-dark);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: 14rem 0 8rem;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  /* ②オーバーレイを軽量化：写真の明るさを活かす */
  background: linear-gradient(
    to bottom,
    rgba(8,45,68,0.45) 0%,
    rgba(8,45,68,0.25) 50%,
    rgba(8,45,68,0.45) 100%
  );
  z-index: 0;
}
/* 各ページ別背景画像 */
.page-about .page-hero   { background-image: url('/assets/img/hero-about.webp'); }
.page-service .page-hero { background-image: url('/assets/img/hero-plant.jpg'); }
.page-company .page-hero { background-image: url('/assets/img/hero-company.webp'); }
.page-terms .page-hero   { background-image: url('/assets/img/hero-terms.webp'); }
.page-topics .page-hero  { background-image: url('/assets/img/hero-topics.jpg'); }
.page-contact .page-hero { background-image: url('/assets/img/hero-strait.jpg'); }
.page-hero-vert {
  position: absolute;
  right: 2.4rem;
  top: 50%;
  transform: translateY(-50%) rotate(90deg);
  font-family: var(--font-en);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: rgba(255,255,255,0.12);
  white-space: nowrap;
}
.page-hero .container { position: relative; z-index: 1; }
@media (max-width: 900px) { .page-hero-vert { display: none; } }
.page-hero-label {
  font-family: var(--font-en);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 1.2rem;
  text-shadow: 0 1px 6px rgba(0,0,0,0.6);
}
.page-hero-title {
  font-family: var(--font-ja);
  font-size: clamp(4rem, 7vw, 8rem);
  font-weight: 700;
  line-height: 1.2;
  color: #ffffff;
  text-shadow: 0 2px 12px rgba(0,0,0,0.35);
  margin-bottom: 1.2rem;
}
.page-hero-subtitle {
  font-family: var(--font-ja);
  font-size: 1.6rem;
  color: rgba(255,255,255,0.95);
  text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 2.4rem;
  font-family: var(--font-en);
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.90);
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}
.breadcrumb a { color: rgba(255,255,255,0.90); transition: color var(--transition); }
.breadcrumb a:hover { color: var(--teal); }
.breadcrumb-sep { color: rgba(255,255,255,0.5); }

/* ---------- Footer ---------- */
#site-footer {
  /* ③フッター明色化：オフホワイト〜淡いブルー系 */
  background:
    radial-gradient(ellipse 70% 60% at 85% 10%, rgba(41,182,232,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 50% 50% at 10% 90%, rgba(77,212,236,0.08) 0%, transparent 55%),
    linear-gradient(160deg, #e8f5fb 0%, #f4fafd 50%, #e8f5fb 100%);
  padding: 6.4rem 0 0;
  position: relative;
  overflow: hidden;
}
#site-footer::before {
  content: '';
  position: absolute;
  inset: 0;
  /* 波紋状の同心円 */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='700' height='700'%3E%3Ccircle cx='350' cy='350' r='90' fill='none' stroke='rgba(77,212,236,0.05)' stroke-width='1'/%3E%3Ccircle cx='350' cy='350' r='170' fill='none' stroke='rgba(77,212,236,0.04)' stroke-width='1'/%3E%3Ccircle cx='350' cy='350' r='250' fill='none' stroke='rgba(77,212,236,0.03)' stroke-width='1'/%3E%3Ccircle cx='350' cy='350' r='330' fill='none' stroke='rgba(77,212,236,0.02)' stroke-width='1'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center bottom;
  background-size: 80%;
  z-index: 0;
  pointer-events: none;
}
#site-footer .container { position: relative; z-index: 3; }
.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 6.4rem;
  padding-bottom: 4.8rem;
  border-bottom: 1px solid rgba(41,182,232,0.18);
}
.footer-logo {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin-bottom: 2rem;
}
.footer-logo img {
  width: 3.6rem;
  height: 3.6rem;
  object-fit: contain;
}
/* 横型ロゴ（フッター）：明色フッターなのでカラーロゴをそのまま使用 */
.footer-logo img.logo-img-full {
  width: auto;
  height: 3.0rem;
  max-width: 16rem;
  object-fit: contain;
  filter: none;
}
.footer-logo-text {
  font-family: var(--font-ja);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
}
/* 横型ロゴ使用時はフッターテキストも非表示 */
.footer-logo:has(img.logo-img-full) .footer-logo-text { display: none; }
.footer-address {
  font-size: 1.3rem;
  color: var(--text-sub);
  line-height: 1.9;
}
.footer-nav-title {
  font-family: var(--font-en);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--blue-dark);
  margin-bottom: 1.6rem;
}
.footer-nav-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.footer-nav-list a {
  font-family: var(--font-en);
  font-size: 1.3rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--text-sub);
  transition: color var(--transition);
}
.footer-nav-list a:hover { color: var(--blue); }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2.4rem 0;
  font-family: var(--font-en);
  font-size: 1.1rem;
  color: var(--text-sub);
  flex-wrap: wrap;
  gap: 1.2rem;
}
.footer-bottom-links {
  display: flex;
  gap: 2.4rem;
}
.footer-bottom-links a {
  color: var(--text-sub);
  transition: color var(--transition);
}
.footer-bottom-links a:hover { color: var(--blue); }
@media (max-width: 900px) {
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 3.2rem; }
  .footer-brand { grid-column: 1 / 3; }
}
@media (max-width: 600px) {
  .footer-inner { grid-template-columns: 1fr; }
  .footer-brand { grid-column: 1; }
}

/* ---------- ④ 追従CTAボタン（画面右下固定） ---------- */
.floating-cta {
  position: fixed;
  bottom: 3.2rem;
  right: 2.4rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1.2rem;
  pointer-events: none;
}
.floating-cta-btn {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1.2rem 2.2rem;
  border-radius: 10rem;
  font-family: var(--font-ja);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  pointer-events: auto;
  transition: transform 0.22s ease, box-shadow 0.22s ease, opacity 0.22s ease;
  box-shadow: 0 6px 24px rgba(26,159,212,0.40);
  white-space: nowrap;
  opacity: 0;
  transform: translateY(12px);
}
.floating-cta-btn.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.floating-cta-btn--primary {
  background: linear-gradient(135deg, #29b6e8 0%, #1a9fd4 100%);
  color: #fff;
}
.floating-cta-btn--primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 32px rgba(26,159,212,0.55);
}
.floating-cta-btn--secondary {
  background: rgba(255,255,255,0.92);
  color: var(--blue-dark);
  border: 1.5px solid var(--border);
  box-shadow: 0 4px 16px rgba(41,182,232,0.18);
}
.floating-cta-btn--secondary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(41,182,232,0.28);
}
.floating-cta-icon {
  font-size: 1.6rem;
  line-height: 1;
}
@media (max-width: 768px) {
  .floating-cta {
    bottom: 2rem;
    right: 1.6rem;
    gap: 0.8rem;
  }
  .floating-cta-btn {
    padding: 1.0rem 1.8rem;
    font-size: 1.3rem;
  }
}

/* ---------- レスポンシブ表示切替ユーティリティ ---------- */
/* スマホ（767px以下）では非表示 */
.pc-only { display: none; }
/* sp-only: スマホでのみ表示（brタグ対応のためinline） */
.sp-only { display: inline; }
/* PC（768px以上）では pc-only を表示、sp-only を非表示 */
@media (min-width: 768px) {
  .pc-only { display: inline; }  /* <br class="pc-only"> 対応のためinline */
  .sp-only { display: none; }
}

/* ---------- Anchor offset (fixed header compensation) ---------- */
[id] {
  scroll-margin-top: 7.2rem;
}
