/* ============================================================
   DIGITAS — common.css
   共通スタイル（リセット・変数・ナビ・フッター・アニメーション）
   ============================================================ */

/* RESET & VARIABLES */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --navy: #0D1B2A;
  --navy-mid: #162539;
  --gold: #E8A020;
  --gold-light: #F5C55A;
  --gold-muted: #B8811A;
  --white: #FFFFFF;
  --off-white: #F8F6F2;
  --light: #EEF0F4;
  --gray: #8A94A0;
  --body: #2C3540;
  --blue: #1A7FC4;
  --green: #2E7D32;
  --red: #C0392B;
}
html { scroll-behavior: smooth; }
body { font-family: 'DM Sans','Noto Sans JP',sans-serif; color: var(--body); background: var(--white); overflow-x: hidden; }

/* ── NAVIGATION (transparent over hero video) ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 5vw; height: 66px;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.nav-logo { display: flex; align-items: center; text-decoration: none; }
.nav-logo-img { height: 32px; width: auto; display: block; filter: drop-shadow(0 2px 6px rgba(0,0,0,0.35)); }
.nav-links, .nav-center { display: flex; gap: 26px; list-style: none; }
.nav-links a, .nav-center a {
  font-size: 0.84rem; color: rgba(255,255,255,0.85); text-decoration: none;
  transition: color .2s; text-shadow: 0 1px 4px rgba(0,0,0,0.35);
}
.nav-links a:hover, .nav-center a:hover { color: var(--gold-light); }
.nav-cta { background: var(--gold); color: var(--navy) !important; padding: 9px 20px; border-radius: 7px; font-weight: 600 !important; transition: background .2s !important; text-shadow: none !important; }
.nav-cta:hover { background: var(--gold-light) !important; }
.nav-back { font-size: 0.82rem; color: rgba(255,255,255,0.7); text-decoration: none; display: flex; align-items: center; gap: 6px; }
.nav-back:hover { color: var(--white); }

/* ── HERO COMMON ── */
.hero-grid { position: absolute; inset: 0; opacity: 0.03; pointer-events: none; background-image: linear-gradient(rgba(255,255,255,.8) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.8) 1px, transparent 1px); background-size: 80px 80px; z-index: 2; }
.hero-glow { position: absolute; top: -100px; right: -60px; width: 500px; height: 500px; border-radius: 50%; background: radial-gradient(circle, rgba(232,160,32,0.1) 0%, transparent 70%); pointer-events: none; z-index: 2; }
.hero-eyebrow { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold-light); margin-bottom: 20px; position: relative; z-index: 3; text-shadow: 0 2px 10px rgba(0,0,0,0.5); }
.hero-title { font-family: 'DM Serif Display', serif; color: var(--white); position: relative; z-index: 3; text-shadow: 0 4px 24px rgba(0,0,0,0.6); }
.hero-title em { font-style: italic; color: var(--gold-light); }
.hero-lead { font-weight: 400; color: rgba(255,255,255,0.88); line-height: 1.9; position: relative; z-index: 3; text-shadow: 0 2px 12px rgba(0,0,0,0.55); }

/* ── HERO BACKGROUND VIDEO ── */
.hero { position: relative; overflow: hidden; }
.hero > * { position: relative; z-index: 4; }
.hero > .hero-video,
.hero > .hero-poster,
.hero > .hero-video-overlay,
.hero > .hero-grid,
.hero > .hero-glow,
.hero > .hero-glow-l,
.hero > .hero-glow-r { position: absolute; }
.hero > .hero-grid, .hero > .hero-glow, .hero > .hero-glow-l, .hero > .hero-glow-r { z-index: 3; }
.hero > .hero-video { z-index: 0; }
.hero > .hero-poster { z-index: 1; }
.hero > .hero-video-overlay { z-index: 2; }
.hero-video {
  position: absolute; top: 0; left: 0; right: 0;
  width: 100%; height: 100vh; max-height: 100vh;
  object-fit: cover; object-position: center;
  pointer-events: none;
  background-color: var(--navy); /* fallback while loading */
}
/* Poster fallback (shown when video is hidden — mobile / reduced-motion) */
.hero-poster {
  position: absolute; top: 0; left: 0; right: 0;
  height: 100vh; max-height: 100vh;
  pointer-events: none;
  background-color: var(--navy);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: none;
}
/* Dark gradient overlay — sits over video & poster for text readability */
.hero-video-overlay {
  position: absolute; top: 0; left: 0; right: 0;
  height: 100vh; max-height: 100vh;
  pointer-events: none;
  background:
    linear-gradient(180deg,
      rgba(13,27,42,0.20) 0%,
      rgba(13,27,42,0.30) 55%,
      rgba(13,27,42,0.55) 100%);
}
/* Mobile: keep video playing, use contain so left/right are not cropped */
@media (max-width: 768px) {
  .hero-video {
    display: block;
    object-fit: contain;
    object-position: center top;
    height: auto;
    max-height: 56.25vw; /* 16:9 of viewport width */
    background-color: var(--navy);
  }
  .hero-video-overlay {
    height: 56.25vw; max-height: 56.25vw;
  }
  .hero-poster { display: none; }
}
/* Respect reduced motion preference (still hide video for users who request it) */
@media (prefers-reduced-motion: reduce) {
  .hero-video { display: none; }
  .hero-poster { display: block; }
}

/* ── HERO OVERLAY CARDS (glassmorphism over video) ── */
.hero .hero-trust > div,
.hero .hero-nums .hero-num-item,
.hero .hero-scroll .scroll-item,
.hero .device-card,
.hero .calc-card {
  background: rgba(13,27,42,0.70) !important;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.14) !important;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}
.hero .hero-tags .tag,
.hero .hero-badges .badge,
.hero .hero-industry-strip .industry-chip,
.hero .moto-badge {
  background: rgba(13,27,42,0.65) !important;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.18) !important;
  color: var(--white) !important;
  box-shadow: 0 4px 14px rgba(0,0,0,0.2);
}
.hero .btn-outline, .hero .btn-outline-w {
  background: rgba(13,27,42,0.55) !important;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}

/* ── SECTION LABELS ── */
.sec-label { font-size: 0.71rem; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold-muted); margin-bottom: 16px; }
.sec-title { font-family: 'DM Serif Display', serif; font-size: clamp(1.9rem, 3.5vw, 2.7rem); line-height: 1.22; color: var(--navy); max-width: 700px; margin-bottom: 20px; }
.sec-lead { font-size: 1rem; color: var(--gray); line-height: 1.85; max-width: 560px; margin-bottom: 56px; }

/* ── BUTTONS ── */
.btn-gold { display: inline-flex; align-items: center; gap: 8px; background: var(--gold); color: var(--navy); padding: 14px 28px; border-radius: 8px; font-weight: 600; font-size: 0.92rem; text-decoration: none; transition: all .2s; border: none; cursor: pointer; font-family: inherit; }
.btn-gold:hover { background: var(--gold-light); transform: translateY(-2px); }
.btn-navy { display: inline-flex; align-items: center; gap: 10px; background: var(--navy); color: var(--white); padding: 16px 36px; border-radius: 8px; font-weight: 600; font-size: 1rem; text-decoration: none; transition: all .2s; border: none; cursor: pointer; font-family: inherit; }
.btn-navy:hover { background: #0a1520; transform: translateY(-2px); }
.btn-outline-w { display: inline-flex; align-items: center; gap: 8px; background: transparent; color: rgba(255,255,255,0.7); padding: 14px 24px; border-radius: 8px; font-size: 0.92rem; text-decoration: none; border: 1px solid rgba(255,255,255,0.2); transition: all .2s; }
.btn-outline-w:hover { border-color: rgba(255,255,255,0.5); color: var(--white); }

/* ── CTA SECTION (gold bg) ── */
.cta-sec { background: var(--gold); padding: 88px 5vw; text-align: center; }
.cta-title { font-family: 'DM Serif Display', serif; font-size: clamp(1.9rem, 3.8vw, 3rem); color: var(--navy); line-height: 1.2; max-width: 680px; margin: 0 auto 16px; }
.cta-sub { font-size: 1rem; color: rgba(13,27,42,0.65); max-width: 480px; margin: 0 auto 36px; line-height: 1.8; }

/* ── FOOTER (shared layout) ── */
footer { background: var(--navy); border-top: 1px solid rgba(255,255,255,0.06); }
.footer-top { max-width: 1100px; margin: 0 auto; padding: 56px 5vw 40px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 40px; }
.footer-brand-name { font-weight: 700; font-size: 1.1rem; letter-spacing: 0.16em; color: var(--white); margin-bottom: 8px; }
.footer-tagline { font-family: 'DM Serif Display', serif; font-style: italic; font-size: 0.82rem; color: rgba(255,255,255,0.3); }
.footer-links { display: flex; gap: 56px; flex-wrap: wrap; }
.footer-col h4 { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(255,255,255,0.4); margin-bottom: 16px; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { font-size: 0.84rem; color: rgba(255,255,255,0.55); text-decoration: none; transition: color .2s; }
.footer-col a:hover { color: var(--gold-light); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.06); padding: 20px 5vw; text-align: center; }
.footer-copy { font-size: 0.72rem; color: rgba(255,255,255,0.2); letter-spacing: 0.06em; }

/* ── FADE ANIMATION ── */
.fade { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.fade.in { opacity: 1; transform: translateY(0); }

/* ── HAMBURGER MENU ── */
.hamburger {
  display: none; background: none; border: none; cursor: pointer;
  width: 44px; height: 44px; position: relative; z-index: 210;
  padding: 0; flex-shrink: 0;
}
.hamburger span {
  display: block; width: 22px; height: 2px; background: var(--white);
  position: absolute; left: 11px; transition: all .3s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.4);
}
.hamburger span:nth-child(1) { top: 14px; }
.hamburger span:nth-child(2) { top: 21px; }
.hamburger span:nth-child(3) { top: 28px; }
.hamburger.active span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { top: 21px; transform: rotate(-45deg); }

/* ── MOBILE DRAWER ── */
.mobile-drawer {
  position: fixed; top: 0; right: 0; width: 300px; height: 100vh;
  background: var(--white); z-index: 199;
  transform: translateX(100%); transition: transform .35s cubic-bezier(.4,0,.2,1);
  padding: 90px 32px 40px; overflow-y: auto;
  box-shadow: -8px 0 40px rgba(0,0,0,0.12);
}
.mobile-drawer.open { transform: translateX(0); }
.mobile-drawer a {
  display: block; font-size: 1rem; color: var(--body); text-decoration: none;
  padding: 14px 0; border-bottom: 1px solid rgba(0,0,0,0.06);
  transition: color .2s;
}
.mobile-drawer a:hover { color: var(--gold-muted); }
.mobile-drawer .drawer-cta {
  display: block; margin-top: 24px; background: var(--gold); color: var(--navy);
  text-align: center; padding: 15px; border-radius: 8px; font-weight: 600;
  border-bottom: none;
}
.mobile-drawer .drawer-cta:hover { background: var(--gold-light); }
.mobile-drawer .drawer-phone {
  display: block; margin-top: 12px; text-align: center;
  font-size: 0.88rem; color: var(--gray); border-bottom: none; padding: 10px 0;
}
.drawer-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 198;
  opacity: 0; pointer-events: none; transition: opacity .3s;
}
.drawer-overlay.open { opacity: 1; pointer-events: auto; }

/* ── NAV SCROLL EFFECT (becomes solid after scrolling past hero) ── */
nav.scrolled {
  background: rgba(13,27,42,0.92);
  backdrop-filter: blur(14px);
  border-bottom-color: rgba(255,255,255,0.06);
  box-shadow: 0 2px 20px rgba(0,0,0,0.25);
}
nav.scrolled .hamburger span { background: var(--white); box-shadow: none; }

/* ── BACK TO TOP ── */
.back-to-top {
  position: fixed; bottom: 28px; right: 28px; z-index: 100;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--navy); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: translateY(16px); pointer-events: none;
  transition: all .3s ease; box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
.back-to-top.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.back-to-top:hover { background: var(--gold); transform: translateY(-2px); }
.back-to-top svg { width: 20px; height: 20px; stroke: var(--white); stroke-width: 2; fill: none; }
.back-to-top:hover svg { stroke: var(--navy); }

/* ── RESPONSIVE (共通) ── */
@media (max-width: 960px) {
  .nav-links, .nav-center { display: none; }
  .hamburger { display: flex; align-items: center; justify-content: center; }
  .footer-top { flex-direction: column; }
}
@media (max-width: 640px) {
  .footer-links { flex-direction: column; gap: 32px; }
  .back-to-top { bottom: 20px; right: 20px; width: 42px; height: 42px; }
}
