/* スマホのみ改行 */
.sp-block { display: inline; }
@media (max-width: 600px) { .sp-block { display: block; } }

:root {
  /* Brand Colors */
  --navy: #001D42;
  --navy-deep: #000F22;
  --gold: #C5A059;
  --gold-light: #D9BC7E;
  
  /* Neutral Colors */
  --white: #FFFFFF;
  --black: #000000;
  --text-dark: #1A1A1A;
  --text-mute: #6B6B6B;
  --bg-light: #F0F2F5; /* facts section background */
  --bg-ig: #F0F0F0;    /* instagram post placeholder */
  
  /* Alpha Navy Colors */
  --navy-alpha-0: rgba(0, 29, 66, 0);
  --navy-alpha-04: rgba(0, 29, 66, 0.04);
  --navy-alpha-12: rgba(0, 29, 66, 0.12); /* line */
  --navy-alpha-85: rgba(0, 29, 66, 0.85);

  /* Alpha Deep Navy (Hero / Overlays) */
  --navy-deep-alpha-25: rgba(0, 15, 34, 0.25);
  --navy-deep-alpha-55: rgba(0, 15, 34, 0.55);
  --navy-deep-alpha-70: rgba(0, 15, 34, 0.70);
  --navy-deep-alpha-85: rgba(0, 15, 34, 0.85);

  /* Alpha White Colors */
  --white-alpha-05: rgba(255, 255, 255, 0.05);
  --white-alpha-08: rgba(255, 255, 255, 0.08);
  --white-alpha-22: rgba(255, 255, 255, 0.22);
  --white-alpha-40: rgba(255, 255, 255, 0.40);
  --white-alpha-50: rgba(255, 255, 255, 0.50);
  --white-alpha-60: rgba(255, 255, 255, 0.60);
  --white-alpha-70: rgba(255, 255, 255, 0.70);
  --white-alpha-75: rgba(255, 255, 255, 0.75);
  --white-alpha-85: rgba(255, 255, 255, 0.85);
  --white-alpha-96: rgba(255, 255, 255, 0.96);
  
  /* Accent/Specific Section Colors */
  --blue-strip: #233E73; /* service-strip bg text */

  /* Legacy variables for compatibility */
  --base: var(--white);
  --line: var(--navy-alpha-12);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: 'Noto Sans JP', 'Montserrat', sans-serif;
  background: var(--base);
  color: var(--text-dark);
  overflow-x: hidden;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--gold);
  color: var(--navy);
}

/* ======== NAV ======== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 48px;
  transition: all .4s ease;
  background: transparent;
}

.nav.tinted {
  background: rgba(0,15,40,0.62);
  backdrop-filter: blur(6px);
}

.nav.scrolled {
  background: var(--white-alpha-96);
  backdrop-filter: blur(12px);
  mix-blend-mode: normal;
  border-bottom: 1px solid var(--line);
  padding: 16px 48px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  font-size: 22px;
  letter-spacing: .04em;
  color: var(--white);
  line-height: 1;
}

.nav-logo img {
  height: 44px;
  width: auto;
  display: block;
  filter: brightness(0) invert(1);
}

.nav.scrolled .nav-logo img {
  filter: none;
}

.nav.scrolled .nav-logo {
  color: var(--navy);
}

.nav-logo span {
  display: none;
}

.nav-menu {
  display: flex;
  gap: 36px;
  align-items: center;
}

.nav-menu a {
  color: var(--white);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .08em;
  position: relative;
}

.nav.scrolled .nav-menu a {
  color: var(--navy);
}

.nav-menu a:hover::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--gold);
}

.nav-cta {
  padding: 10px 20px;
  border: 1px solid var(--white);
  color: var(--white);
  font-size: 12px;
  letter-spacing: .1em;
  transition: .3s;
}

.nav.scrolled .nav-cta {
  border-color: var(--navy);
  color: var(--navy);
}

.nav-cta:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--navy);
}



.nav-ctas {
  display: flex;
  gap: 12px;
  align-items: center;
}

/* ======== HERO ======== */
.hero {
  position: relative;
  height: 100vh;
  min-height: 720px;
  overflow: hidden;
  clip-path: inset(0 0 0 0);
  background: var(--navy);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('./images/opt/hero.webp');
  background-size: cover;
  background-position: center;
  transform: scale(1.05);
  will-change: transform;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--navy-deep-alpha-55) 0%, var(--navy-deep-alpha-25) 40%, var(--navy-deep-alpha-70) 100%);
}

.hero-mega-text {
  position: absolute;
  bottom: 0; /* 文字下端をセクション下端にぴったり揃える */
  left: -3vw;
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  font-size: 28vw;
  line-height: .85;
  color: var(--white-alpha-22);
  text-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  letter-spacing: -0.04em;
  pointer-events: none;
  white-space: nowrap;
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 48px;
}

.hero-eyebrow {
  color: var(--gold);
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  letter-spacing: .4em;
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.hero-eyebrow::before {
  content: '';
  width: 48px;
  height: 1px;
  background: var(--gold);
}

.hero-headline {
  color: var(--white);
  font-weight: 900;
  font-size: clamp(48px, 8vw, 128px);
  line-height: 1.1;
  letter-spacing: -0.04em;
  margin-bottom: 32px;
}
/* General Line Reveal Animation */
.line-wrapper {
  display: block;
  overflow: hidden;
  margin-bottom: 4px;
}
.line-text {
  display: block;
  transform: translateX(-105%);
  opacity: 0;
  transition: transform 1.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 1.4s ease;
}
/* Base override for Right/Bottom reveal */
.reveal-right .line-text { transform: translateX(105%); }
.reveal-bottom .line-text { transform: translateY(105%); }

/* Active state (Must come AFTER base states) */
.in .line-text {
  transform: translateX(0);
  opacity: 1;
}
.reveal-bottom.in .line-text { transform: translateY(0); }
/* Staggered Delays */
.in .line-wrapper:nth-of-type(1) .line-text { transition-delay: 0.2s; }
.in .line-wrapper:nth-of-type(2) .line-text { transition-delay: 1.2s; }
.in .line-wrapper:nth-of-type(3) .line-text { transition-delay: 2.2s; }

.hero-headline .line-text {
  animation: revealLine 1.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.hero-headline .line-wrapper:nth-child(1) .line-text{ animation-delay: 0.5s; }
.hero-headline .line-wrapper:nth-child(2) .line-text{ animation-delay: 1.5s; }

@keyframes revealLine {
  to { transform:translateX(0); opacity:1; }
}

.hero-headline .accent {
  color: var(--gold);
}

.hero-sub {
  color: var(--white-alpha-85);
  max-width: 800px;
  font-size: 19px;
  line-height: 1.8;
  font-weight: 500;
  letter-spacing: 0.02em;
  margin-bottom: 48px;
  margin-left: 20px;
  opacity: 0;
  animation: fadeIn 1.2s ease forwards;
  animation-delay: 2.2s;
  text-shadow:
    0 2px 8px rgba(0, 0, 0, 0.85),
    0 4px 20px rgba(0, 0, 0, 0.7),
    0 8px 40px rgba(0, 0, 0, 0.5);
}

@keyframes fadeIn {
  to { opacity: 1; transform: translateY(0); }
}

@media(max-width:960px){
  .hero-sub{ font-size:15px; margin-left:0; max-width:100%; }
}

.hero-meta {
  position: absolute;
  bottom: 48px;
  left: 48px;
  right: 48px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  color: var(--white);
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  letter-spacing: .2em;
  z-index: 3;
}

.hero-meta-block span {
  display: block;
  color: var(--gold);
  margin-bottom: 6px;
}

.scroll-cue {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  writing-mode: vertical-rl;
}

.scroll-cue::after {
  content: '';
  width: 1px;
  height: 60px;
  background: linear-gradient(180deg, var(--gold) 0%, transparent 100%);
  animation: scroll-down 2.4s infinite;
}

@keyframes scroll-down {
  0% {
    transform: scaleY(0);
    transform-origin: top;
  }

  50% {
    transform: scaleY(1);
    transform-origin: top;
  }

  51% {
    transform-origin: bottom;
  }

  100% {
    transform: scaleY(0);
    transform-origin: bottom;
  }
}

/* ======== SECTION COMMON ======== */
section {
  padding: 160px 48px;
  position: relative;
}

.section-label {
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  letter-spacing: .4em;
  color: var(--gold);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.section-label::before {
  content: '';
  width: 32px;
  height: 1px;
  background: var(--gold);
}

.section-title {
  font-weight: 900;
  font-size: clamp(40px, 5.5vw, 84px);
  line-height: 1.05;
  letter-spacing: -0.04em;
  color: var(--navy);
  margin-bottom: 48px;
}

/* ======== ABOUT (NEXT 100 YEARS) ======== */
.about {
  background: var(--base);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 80px;
  align-items: start;
  max-width: 1440px;
  margin: 0 auto;
}

.about-mega {
  position: absolute;
  top: 50%;
  right: -5vw;
  transform: translateY(-50%);
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  font-size: 38vw;
  line-height: .85;
  color: var(--navy-alpha-04);
  letter-spacing: -0.05em;
  pointer-events: none;
  white-space: nowrap;
}

.about-img {
  position: relative;
  height: 600px;
  background-image: url('./images/opt/about.webp');
  background-size: cover;
  background-position: center;
  margin-top: 60px;
}

.about-img::before {
  content: '';
  position: absolute;
  inset: -1px;
  border: 1px solid var(--gold);
  transform: translate(20px, 20px);
}

.about-text p {
  font-size: 15px;
  line-height: 2.2;
  color: var(--text-mute);
  margin-bottom: 24px;
  max-width: 480px;
}

/* ======== FACTS (NUMBERS) ======== */
.facts {
  background: var(--bg-light);
  padding: 100px 48px;
  color: var(--navy);
  border-bottom: 1px solid var(--line);
}

.facts-grid {
  display: flex;
  justify-content: space-around;
  align-items: baseline;
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.stat-num {
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  font-size: clamp(64px, 8.5vw, 128px);
  color: var(--navy);
  letter-spacing: -0.03em;
  line-height: 0.9;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  display: inline-flex;
  align-items: baseline;
  min-width: 3.2em;
}

.stat-num small {
  font-size: 0.25em;
  color: var(--gold);
  margin-left: 8px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.stat-num small.unit-plus {
  font-size: 0.45em;
  margin-left: -2px;
  font-weight: 900;
  vertical-align: baseline;
  position: relative;
  top: 0;
}

.stat-label {
  font-size: 12px;
  letter-spacing: .3em;
  color: var(--text-mute);
  margin-top: 20px;
  font-weight: 700;
}

/* ======== SYNERGY (5 COMPANIES) ======== */
.synergy {
  background: var(--navy);
  color: var(--white);
  border-bottom: 1px solid var(--navy-deep);
  overflow: hidden;
}

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

.synergy-mega {
  position: absolute;
  top: 20px;
  left: 0;
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  font-size: 22vw;
  line-height: .85;
  color: var(--white-alpha-05);
  text-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  letter-spacing: -0.05em;
  white-space: nowrap;
  pointer-events: none;
}

.synergy-inner {
  position: relative;
  max-width: 1440px;
  margin: 0 auto;
  z-index: 2;
}

.synergy-diagram {
  position: relative;
  width: 100%;
  max-width: 900px;
  aspect-ratio: 1 / 1;
  margin: 60px auto 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.synergy-main-svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Animation Styles */
@keyframes gear-rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}


.synergy-intro {
  max-width: 560px;
  color: var(--white-alpha-75);
  font-size: 15px;
  line-height: 2.1;
}

@media (max-width: 960px) {
  .synergy-diagram {
    max-width: 640px;
    margin-top: 40px;
  }
}

@media (max-width: 600px) {
  .synergy-diagram {
    max-width: 100%;
    transform: scale(1.0);
  }
}

/* ======== PAGE HERO（サブページ共通） ======== */
.page-hero {
  position: relative;
  height: 36vh;
  min-height: 300px;
  background: var(--navy);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: 0;
}
.page-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 40%;
}
.page-hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,15,34,0.4) 0%, rgba(0,15,34,0.75) 100%);
}
.page-hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 48px 72px;
}
.page-hero-eyebrow {
  color: var(--gold);
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  letter-spacing: .5em;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.page-hero-eyebrow::before {
  content: '';
  width: 32px;
  height: 1px;
  background: var(--gold);
}
.page-hero h1 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  font-size: clamp(30px, 3.5vw, 54px);
  color: var(--white);
  letter-spacing: -0.04em;
  line-height: 1;
}
.page-hero-mega {
  position: absolute;
  right: -2vw;
  bottom: -10px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  font-size: 20vw;
  color: rgba(255,255,255,0.06);
  letter-spacing: -0.05em;
  line-height: 0.85;
  pointer-events: none;
  white-space: nowrap;
  z-index: 1;
}
@media (max-width: 960px) {
  .page-hero-content { padding: 0 24px 60px; }
}
@media (max-width: 600px) {
  .page-hero-content { padding: 0 16px 48px; }
  .page-hero { min-height: 220px; }
  .page-hero-mega { font-size: 28vw; }
}

/* ======== WORKS ======== */
.works {
  background: var(--base);
  border-bottom: 1px solid var(--line);
}

.works-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding-top: 40px;
  margin-bottom: 80px;
  max-width: 1440px;
  margin-left: auto;
  margin-right: auto;
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  max-width: 1440px;
  margin: 0 auto;
}

.work-card {
  position: relative;
  aspect-ratio: 4/5;
  background: var(--white);
  overflow: hidden;
  cursor: pointer;
}

.work-card-img {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 1s cubic-bezier(.2, .8, .2, 1);
}

.work-card:hover .work-card-img {
  transform: scale(1.08);
}

.work-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 30%, var(--navy-deep-alpha-85) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 32px;
  color: var(--white);
  transition: .4s;
}

.work-card-num {
  font-family: 'Montserrat', sans-serif;
  color: var(--gold);
  font-size: 11px;
  letter-spacing: .3em;
  margin-bottom: 12px;
}

.work-card h3 {
  font-weight: 900;
  font-size: 22px;
  line-height: 1.3;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.work-card-meta {
  font-size: 11px;
  letter-spacing: .15em;
  color: var(--white-alpha-70);
  opacity: 0;
  transform: translateY(10px);
  transition: .4s;
}

.work-card:hover .work-card-meta {
  opacity: 1;
  transform: translateY(0);
}

/* ======== INSTAGRAM ======== */
.instagram {
  background: var(--base);
  padding: 140px 48px;
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}

.instagram-mega {
  position: absolute;
  top: 60px; right: 0;
  font-family: 'Montserrat', sans-serif;
  font-weight: 900; font-size: 12vw;
  color: var(--navy-alpha-04);
  letter-spacing: -0.04em;
  line-height: .85;
  pointer-events: none;
  white-space: nowrap;
}

.instagram-inner {
  position: relative;
  max-width: 1440px;
  margin: 0 auto;
}

.instagram-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 64px;
  gap: 40px;
  flex-wrap: wrap;
}

.instagram-header h2 {
  display: flex;
  align-items: center;
  font-weight: 900;
  font-size: clamp(34px, 5vw, 76px);
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--navy);
}
.instagram-header h2 .accent { color: var(--gold); }

.instagram-title-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 0.86em;
  height: 0.86em;
  margin-right: 0.18em;
  color: var(--navy);
  flex-shrink: 0;
  transition: color .3s;
}
.instagram-title-icon svg {
  width: 100%;
  height: 100%;
}
.instagram-title-icon:hover {
  color: var(--gold);
}

.instagram-handle {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--navy);
  text-decoration: none;
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  letter-spacing: .12em;
  padding: 14px 24px;
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: .3s;
}
.instagram-handle:hover {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}
.instagram-handle .ig-icon {
  width: 20px; height: 20px;
  flex-shrink: 0;
}

/* マンガバナー（.admanga-inner: max-width 840 / 96px→24px→16px）と
   同じサイズ・左右位置になるよう、.instagram の左右padding(48px→24px)を
   打ち消してから同じpaddingを付け直す */
.instagram-banner-wrap {
  margin: 0 -48px;
  padding: 0 96px;
}
.instagram-banner {
  display: block;
  max-width: 840px;
  margin: 0 auto;
  line-height: 0;
  transition: transform .3s ease, filter .3s ease;
}
.instagram-banner img {
  width: 100%;
  height: auto;
  display: block;
}
.instagram-banner:hover {
  transform: translateY(-4px);
  filter: drop-shadow(0 16px 32px rgba(0,29,66,0.22));
}

@media (max-width: 960px) {
  .instagram-banner-wrap { padding: 0 24px; }
}
@media (max-width: 600px) {
  .instagram { padding: 80px 24px; }
  .instagram-header { margin-bottom: 40px; }
  .instagram-banner-wrap { margin: 0 -24px; padding: 0 16px; }
}

/* ======== SERVICE STRIP ======== */
.service-strip {
  background: var(--navy);
  color: var(--blue-strip);
  padding: 100px 48px;
  border-bottom: 1px solid var(--navy-deep);
  overflow: hidden;
  position: relative;
}

.marquee {
  display: flex;
  width: max-content;
  will-change: transform;
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  font-size: 12vw;
  color: var(--blue-strip);
  line-height: 1;
  letter-spacing: -0.04em;
  white-space: nowrap;
  animation: scroll-left 20s linear infinite;
}

.marquee-group {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.marquee span {
  display: inline-block;
}

.marquee .dot-space {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.25em;
}

.marquee .dot {
  display: block;
  width: 0.15em;
  height: 0.15em;
  background: var(--white-alpha-40);
  border-radius: 50%;
  margin: 0 auto;
}

@keyframes scroll-left {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

/* ======== CTA ======== */
.cta {
  position: relative;
  background-image: url('./images/opt/cta.webp');
  background-size: cover;
  background-position: center;
  padding: 200px 48px;
  text-align: center;
  color: var(--white);
}

.cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 15, 34, 0.35);
}

.cta-inner {
  position: relative;
  z-index: 2;
  max-width: 920px;
  margin: 0 auto;
}

.cta h2 {
  font-weight: 900;
  font-size: clamp(36px, 5vw, 72px);
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin-bottom: 32px;
}

.cta p {
  font-size: 15px;
  line-height: 2;
  color: var(--white-alpha-85);
  margin-bottom: 48px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.btn-primary {
  display: inline-block;
  padding: 20px 48px;
  background: var(--gold);
  color: var(--navy);
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .2em;
  border: 1px solid var(--gold);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: background .3s, color .3s;
}
.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(120deg, transparent, var(--white-alpha-60), transparent);
  transform: skewX(-20deg);
}
.btn-primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: -80%;
  width: 80%;
  height: 100%;
  background: linear-gradient(120deg, transparent 30%, var(--white-alpha-50) 45%, var(--white-alpha-50) 55%, transparent 70%);
  transform: skewX(-20deg);
  animation: idleShine 6.5s linear infinite;
}
.btn-primary:hover {
  background: transparent;
  color: var(--white);
}
.btn-primary:hover::before {
  animation: shine 0.6s forwards;
}
.btn-primary:hover::after {
  animation: none;
}
@keyframes shine {
  from { left: -100%; }
  to { left: 100%; }
}
@keyframes idleShine {
  0%   { left: -80%; opacity: 1; }
  16%  { left: 100%; opacity: 1; }
  100% { left: 100%; opacity: 0; }
}

/* ======== FOOTER ======== */
footer {
  background: var(--navy);
  color: var(--white);
  padding: 80px 48px 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  max-width: 1440px;
  margin: 0 auto 64px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--white-alpha-08);
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  font-size: 32px;
  letter-spacing: .04em;
  margin-bottom: 16px;
  color: var(--white);
  line-height: 1;
}

.footer-logo img {
  height: 65px;
  width: auto;
  display: block;
  filter: brightness(0) invert(1);
}

.footer-logo span {
  display: none;
}

.footer-tag {
  color: var(--white-alpha-60);
  font-size: 13px;
  line-height: 2;
  margin-bottom: 24px;
  max-width: 320px;
}

.footer-col h4 {
  font-family: 'Montserrat', sans-serif;
  color: var(--gold);
  font-size: 11px;
  letter-spacing: .3em;
  margin-bottom: 20px;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 10px;
}

.footer-col a {
  color: var(--white-alpha-70);
  text-decoration: none;
  font-size: 13px;
}

.footer-col a:hover {
  color: var(--gold);
}

.footer-bottom {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  color: var(--white-alpha-40);
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  letter-spacing: .15em;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 10px;
  cursor: pointer;
  z-index: 1000;
  padding: 10px;
}

.nav-toggle span {
  display: block;
  width: 28px;
  height: 2px;
  background: var(--white);
  transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
}

.nav.scrolled .nav-toggle span {
  background: var(--navy);
}

.nav-toggle.active span {
  background: var(--white) !important;
}

.nav-toggle.active span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
  transform: translateY(-6px) rotate(-45deg);
}

.mobile-menu {
  position: fixed;
  inset: 0;
  background: var(--navy-deep);
  z-index: 999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 32px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.5s cubic-bezier(0.77, 0, 0.175, 1);
  padding: 48px;
}

.mobile-menu.active {
  opacity: 1;
  visibility: visible;
}

.mobile-menu a {
  color: var(--white);
  text-decoration: none;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.15em;
  font-family: 'Montserrat', sans-serif;
  transform: translateY(20px);
  opacity: 0;
  transition: 0.4s;
}

.mobile-menu.active a {
  transform: translateY(0);
  opacity: 1;
}

.mobile-menu a:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu a:nth-child(2) { transition-delay: 0.2s; }
.mobile-menu a:nth-child(3) { transition-delay: 0.3s; }
.mobile-menu a:nth-child(4) { transition-delay: 0.4s; }
.mobile-menu a:nth-child(5) { transition-delay: 0.5s; }
.mobile-menu a:nth-child(6) { transition-delay: 0.6s; }

/* ======== RESPONSIVE ======== */
@media(max-width:960px) {

  .nav,
  .hero-content,
  section,
  .cta,
  footer {
    padding-left: 24px;
    padding-right: 24px;
  }

  section:not(.hero):not(.page-hero) {
    padding-top: 80px;
    padding-bottom: 80px;
  }

  .nav {
    padding: 16px 24px;
  }

  .nav-menu {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .about-img {
    height: 400px;
  }

  .about-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }

  .stat-num {
    font-size: 32px;
  }

  .works-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 8px;
  }

  .synergy-diagram {
    height: 480px;
    transform: scale(.85);
  }

  .hero-meta {
    display: none;
  }
}

@media(max-width:600px) {
  .works-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  section:not(.hero):not(.page-hero) {
    padding-top: 56px;
    padding-bottom: 56px;
  }

  /* ---- スマホ文字落ち防止 ---- */
  .hero-content {
    padding-left: 16px;
    padding-right: 16px;
  }
  .hero-headline {
    font-size: clamp(28px, 9.5vw, 40px);
    letter-spacing: -0.02em;
  }
  .hero-sub {
    font-size: 14px !important;
    margin-left: 0;
  }
  .section-title {
    font-size: clamp(24px, 8vw, 40px);
    letter-spacing: -0.02em;
  }
  .page-hero h1 {
    font-size: clamp(16px, 5.5vw, 30px);
    overflow-wrap: break-word;
    word-break: keep-all;
  }
}

/* ======== SCROLL REVEAL ======== */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 1s cubic-bezier(.2, .8, .2, 1);
}

.reveal.in {
  opacity: 1;
  transform: translateY(0);
}
.pc-only { display: block; }
@media(max-width:960px) {
  .pc-only { display: none; }
}

/* ======== FIXED BANNERS ======== */
.fixed-bnr-pc {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 900;
  width: 200px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.18);
  border-radius: 4px;
  overflow: hidden;
  transition: opacity .3s, transform .3s;
}
.fixed-bnr-pc a { display: block; line-height: 0; }
.fixed-bnr-pc img { width: 100%; height: auto; display: block; }
.fixed-bnr-pc:hover { transform: translateY(-3px); }

.fixed-bnr-sp {
  display: none;
}

@media (max-width: 960px) {
  .fixed-bnr-pc { display: none; }
  .fixed-bnr-sp {
    display: block;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 900;
    line-height: 0;
    box-shadow: 0 -2px 16px rgba(0,0,0,0.15);
  }
  .fixed-bnr-sp a { display: block; line-height: 0; }
  .fixed-bnr-sp img { width: 100%; height: auto; display: block; }
  /* スマホバナー分の余白 */
  body { padding-bottom: 20vw; }
}


/* ======== PERFORMANCE OPTIMIZATIONS ======== */

/* スクロール外セクションの描画を遅延 */
section:not(.hero) {
  content-visibility: auto;
  contain-intrinsic-size: auto 600px;
}

/* アニメーション要素のGPUレイヤー昇格 */
.gear-wrapper {
  will-change: transform;
}

/* モバイルでの固定背景を全て無効化（パフォーマンス） */
@media (max-width: 1024px) {
  .cta,
  section.works {
    background-attachment: scroll;
  }
}

/* 画像のデコードを非同期化 */
img:not([fetchpriority="high"]) {
  content-visibility: auto;
}

/* 高解像度デバイスのコンテンツ最適化 */
@media (prefers-reduced-motion: reduce) {
  .gear-wrapper,
  .synergy-card-item,
  .reveal {
    animation: none !important;
    transition: none !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
}
