/* =========================================
   Global Variables & Ultra-Premium Design Tokens
   ========================================= */
:root {
  /* Colors - Highly Refined */
  --c-bg: #fafbfc; 
  --c-text: #111115;
  --c-text-light: #6a6a7c;
  --c-primary: #0052ff; 
  --c-primary-light: #2bc1ff;
  --c-bg-light: #ffffff;
  --c-border: rgba(0, 0, 0, 0.04);

  /* Premium Gradients */
  --gradient-accent: linear-gradient(135deg, var(--c-primary) 0%, var(--c-primary-light) 100%);
  --gradient-dark: linear-gradient(135deg, #111115 0%, #3a3a4c 100%);

  /* Typography */
  --font-en: 'Inter', sans-serif;
  --font-sans: 'Noto Sans JP', sans-serif;
  --font-serif: 'Shippori Mincho', serif;
  
  /* Layout */
  --max-width: 1100px;
  --header-height: 80px;
  
  /* GSAP-level Smooth Transitions */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: 0.3s var(--ease-out-expo);
  --transition-smooth: 0.6s var(--ease-out-expo);
  --transition-slow: 1.2s var(--ease-out-expo);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; scroll-padding-top: var(--header-height); }
body { 
  font-family: var(--font-sans); 
  color: var(--c-text); 
  background-color: var(--c-bg); 
  line-height: 1.8; 
  -webkit-font-smoothing: antialiased; 
  -moz-osx-font-smoothing: grayscale; 
  overflow-x: hidden; 
}
a { color: inherit; text-decoration: none; transition: opacity var(--transition-fast); }
a:hover { opacity: 0.7; }
li { list-style: none; }
img { max-width: 100%; height: auto; display: block; object-fit: cover; }

/* Font Families for English Headings */
h1, h2, h3, h4, h5, h6, .hero-title, .section-title, .scroll-text, .card-title, .company-table th {
  font-family: var(--font-en);
}
.mincho { font-family: var(--font-serif); }

.gradient-text { 
  background: var(--gradient-accent); 
  -webkit-background-clip: text; 
  -webkit-text-fill-color: transparent; 
}

/* =========================================
   Dynamic Premium Background 
   ========================================= */
#moving-bg {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background-color: var(--c-bg);
  background-image: 
    radial-gradient(circle at 15% 25%, rgba(0, 82, 255, 0.04) 0%, transparent 45%),
    radial-gradient(circle at 85% 75%, rgba(43, 193, 255, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.8) 0%, transparent 60%);
  z-index: -1; 
  animation: bgMove 20s infinite alternate cubic-bezier(0.4, 0.0, 0.2, 1);
}
@keyframes bgMove { 
  0% { transform: scale(1) translate(0, 0); } 
  100% { transform: scale(1.1) translate(-20px, 15px); } 
}

/* Sparkles (Bokeh Effect) Generated by JS */
.sparkle {
  position: absolute; bottom: -20px; 
  background: radial-gradient(circle, rgba(43,193,255,0.9) 0%, rgba(0,82,255,0.2) 60%, transparent 100%);
  border-radius: 50%;
  filter: blur(2px);
  opacity: 0; animation: floatUp linear infinite; pointer-events: none;
  mix-blend-mode: overlay;
}
@keyframes floatUp {
  0% { transform: translateY(0) scale(0.3); opacity: 0; }
  30% { opacity: 0.6; }
  70% { opacity: 0.6; }
  100% { transform: translateY(-120vh) scale(2); opacity: 0; }
}

/* =========================================
   Perfected Glassmorphism (Apple-tier) 
   ========================================= */
.glass-panel {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(24px) saturate(180%); 
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 
    0 10px 40px rgba(0, 0, 0, 0.03),
    inset 0 0 0 1px rgba(255, 255, 255, 0.5);
  border-radius: 24px;
}

/* =========================================
   Base Layout & Headers 
   ========================================= */
.section { padding: 160px 0; position: relative; }
@media (max-width: 768px) { .section { padding: 100px 0; } }
.section-container { max-width: var(--max-width); margin: 0 auto; padding: 0 5%; }

.section-header { margin-bottom: 80px; text-align: center; }
.section-title { 
  font-size: 2.8rem; font-weight: 800; letter-spacing: -0.04em; 
  margin-bottom: 12px; color: var(--c-primary); 
}
.section-subtitle { 
  font-size: 0.9rem; font-weight: 700; color: var(--c-text-light); 
  letter-spacing: 0.2em; text-transform: uppercase;
}

/* =========================================
   Header (shared: index / company / message)
   ========================================= */
.header {
  position: fixed; top: 0; left: 0; width: 100%; height: var(--header-height); z-index: 1000;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid transparent;
  transition: box-shadow var(--transition-smooth), background-color var(--transition-smooth);
}
.header-inner { max-width: 1200px; margin: 0 auto; height: 100%; padding: 0 5%; display: flex; justify-content: space-between; align-items: center; }
.logo { margin: 0; line-height: 1; }
.logo a { font-family: var(--font-en); font-size: 1.8rem; font-weight: 800; letter-spacing: -0.03em; color: var(--c-text); }
.gnav-list { display: flex; gap: 40px; align-items: center; }
.nav-link { font-size: 0.92rem; font-weight: 600; color: var(--c-text-light); position: relative; padding: 6px 0; transition: color var(--transition-fast); }
.nav-link::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; border-radius: 2px; background: var(--gradient-accent); transform: scaleX(0); transform-origin: right; transition: transform .45s var(--ease-out-expo); }
.nav-link:hover { color: var(--c-text); opacity: 1; }
.nav-link:hover::after, .nav-link[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }
.nav-link[aria-current="page"] { color: var(--c-text); }
.nav-link.is-cta { color: #fff; background: var(--c-text); padding: 11px 24px; border-radius: 100px; overflow: hidden; isolation: isolate; }
.nav-link.is-cta::after { inset: 0; height: auto; border-radius: inherit; z-index: -1; }
.nav-link.is-cta:hover { color: #fff; }
.menu-btn { display: none; }

/* Scroll progress bar */
.scroll-progress { position: fixed; top: 0; left: 0; width: 100%; height: 3px; z-index: 1100; background: var(--gradient-accent); transform-origin: 0 50%; transform: scaleX(0); pointer-events: none; }

@media (max-width: 768px) {
  :root { --header-height: 64px; }
  .logo a { font-size: 1.55rem; }
  .menu-btn { display: grid; grid-template-rows: repeat(3, 8px); align-content: center; justify-items: center; width: 44px; height: 44px; margin-right: -8px; border: 0; background: transparent; cursor: pointer; position: relative; z-index: 1002; }
  .menu-btn span { display: block; width: 22px; height: 2px; background: var(--c-text); border-radius: 2px; transition: transform .35s var(--ease-out-expo), opacity .2s; }
  .menu-open .menu-btn span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .menu-open .menu-btn span:nth-child(2) { opacity: 0; }
  .menu-open .menu-btn span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
  /* header has backdrop-filter, so fixed children are positioned against it: give explicit viewport height */
  .gnav { position: fixed; top: 0; left: 0; right: 0; height: 100vh; height: 100dvh; z-index: 1001; background: rgba(250, 251, 252, .97); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transition: opacity .35s var(--ease-out-expo), visibility .35s; }
  .menu-open .gnav { opacity: 1; visibility: visible; }
  .gnav-list { flex-direction: column; gap: 26px; }
  .gnav-list li { opacity: 0; transform: translateY(14px); transition: opacity .5s var(--ease-out-expo), transform .5s var(--ease-out-expo); }
  .menu-open .gnav-list li { opacity: 1; transform: none; }
  .menu-open .gnav-list li:nth-child(2) { transition-delay: .05s; }
  .menu-open .gnav-list li:nth-child(3) { transition-delay: .1s; }
  .menu-open .gnav-list li:nth-child(4) { transition-delay: .15s; }
  .gnav-list .nav-link { font-size: 1.15rem; font-weight: 700; color: var(--c-text); letter-spacing: .08em; }
  .gnav-list .nav-link.is-cta { color: #fff; padding: 14px 44px; margin-top: 8px; }
  html.menu-open { overflow: hidden; }
}

/* =========================================
   Hero Section 
   ========================================= */
.hero { height: 100vh; display: flex; align-items: center; justify-content: center; position: relative; }
.hero-content { text-align: center; padding: 0 5%; z-index: 1; }
.hero-title { 
  display: flex; flex-direction: column; 
  font-size: clamp(3.5rem, 8vw, 6rem); font-weight: 800; 
  line-height: 1.1; letter-spacing: -0.04em; margin-bottom: 24px; color: var(--c-text); 
}
.hero-subtitle { 
  font-size: 1.1rem; color: var(--c-text-light); font-weight: 600; letter-spacing: 0.3em; 
}
.scroll-indicator { position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 16px; }
.scroll-text { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.25em; color: var(--c-text-light); writing-mode: vertical-rl; }
.scroll-line { width: 1px; height: 70px; background: var(--c-border); position: relative; overflow: hidden; }
.scroll-line::after { 
  content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; 
  background: var(--gradient-accent); 
  animation: scrollLine 2s cubic-bezier(0.8, 0, 0.2, 1) infinite; 
}
@keyframes scrollLine { 0% { transform: translateY(-100%); } 100% { transform: translateY(100%); } }

/* =========================================
   Business Grid (Ultra Micro-Interactions) 
   ========================================= */
.business-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 60px; }
@media (max-width: 768px) { .business-grid { grid-template-columns: 1fr; gap: 40px; } }

.business-card { 
  padding: 50px; 
  transition: all var(--transition-smooth);
}
.business-card:hover { 
  transform: translateY(-8px) scale(1.02); 
  box-shadow: 
    0 24px 60px rgba(0, 82, 255, 0.08),
    inset 0 0 0 1px rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.85);
}

.card-image-wrapper { 
  width: 100%; height: 260px; border-radius: 16px; overflow: hidden; margin-bottom: 35px; 
}
.card-image { 
  width: 100%; height: 100%; object-fit: cover; 
  transition: transform var(--transition-slow); 
}
.business-card:hover .card-image { transform: scale(1.06); }

.card-title { 
  font-size: 1.8rem; font-weight: 800; margin-bottom: 20px; line-height: 1.4; color: var(--c-text); letter-spacing: -0.01em; 
}
.card-text { color: var(--c-text-light); line-height: 1.9; font-size: 1.05rem; }

/* =========================================
   Vision Quote & Text 
   ========================================= */
.vision-banner { border-radius: 24px; overflow: hidden; height: 500px; box-shadow: 0 20px 50px rgba(0,0,0,0.05); }
.banner-image { width: 100%; height: 100%; object-fit: cover; }
.vision-desc { font-size: 1.1rem; }

/* =========================================
   Contact Form (Apple-tier minimalism)
   ========================================= */
.contact-wrapper { max-width: 650px; margin: 0 auto; padding: 60px; }
@media (max-width: 768px) { .contact-wrapper { padding: 40px 25px; } }
.contact-form { display: flex; flex-direction: column; gap: 30px; }
.form-group { display: flex; flex-direction: column; gap: 12px; }
.form-group label { font-size: 0.95rem; color: var(--c-text); font-weight: 700; letter-spacing: 0.05em; }

.form-input, .form-textarea { 
  width: 100%; background: rgba(255,255,255,0.7); 
  border: 1px solid var(--c-border); border-radius: 16px; 
  padding: 18px 24px; font-size: 1.05rem; color: var(--c-text); 
  font-family: inherit; 
  transition: all var(--transition-fast); 
}
.form-input::placeholder, .form-textarea::placeholder { color: #aaa; transition: var(--transition-fast); }
.form-input:focus, .form-textarea:focus { 
  outline: none; background: #fff;
  border-color: var(--c-primary-light); 
  box-shadow: 0 0 0 4px rgba(43, 193, 255, 0.1); 
}
.form-input:focus::placeholder, .form-textarea:focus::placeholder { opacity: 0; transform: translateX(10px); }
.form-textarea { resize: vertical; min-height: 160px; }

.btn-submit { 
  background: var(--c-text); color: #fff; 
  border: none; border-radius: 100px; padding: 20px 40px; 
  font-size: 1.1rem; font-weight: 700; cursor: pointer; 
  transition: all var(--transition-smooth); 
  margin-top: 20px; font-family: var(--font-en); letter-spacing: 0.05em;
}
.btn-submit:hover { 
  transform: translateY(-4px); 
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15); 
  background: var(--c-primary);
}

/* =========================================
   Company Page 
   ========================================= */
.company-wrapper { max-width: 800px; margin: 0 auto; padding: 60px; }
@media (max-width: 768px) { .company-wrapper { padding: 40px 25px; } }
.company-table { width: 100%; border-collapse: collapse; }
.company-table th, .company-table td { 
  padding: 32px 20px; border-bottom: 1px solid var(--c-border); text-align: left; line-height: 1.8; 
}
.company-table tr:last-child th, .company-table tr:last-child td { border-bottom: none; }
.company-table th { width: 30%; font-weight: 700; color: var(--c-text-light); }
.company-table td { font-weight: 500; color: var(--c-text); font-size: 1.1rem; }
.tel-link { font-weight: 700; font-family: var(--font-en); color: var(--c-primary); transition: opacity var(--transition-fast); }
.tel-link:hover { opacity: 0.6; }

/* =========================================
   Footer (shared)
   ========================================= */
.footer { padding: 72px 0 44px; background: #0b0c10; color: #fff; text-align: center; position: relative; overflow: hidden; }
.footer::before { content: ""; position: absolute; left: 50%; top: 0; width: min(900px, 90%); height: 1px; transform: translateX(-50%); background: linear-gradient(90deg, transparent, rgba(43,193,255,.5), transparent); }
.footer-logo { font-size: 2.4rem; font-family: var(--font-en); font-weight: 800; letter-spacing: -0.05em; color: #fff; margin-bottom: 22px; }
.footer-nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px 32px; margin-bottom: 36px; }
.footer-nav a { font-size: .85rem; font-weight: 600; color: rgba(255,255,255,.6); letter-spacing: .06em; }
.footer-nav a:hover { color: #fff; opacity: 1; }
.copyright { font-size: 0.78rem; color: rgba(255,255,255,0.4); letter-spacing: 0.15em; font-family: var(--font-en); }
@media (max-width: 768px) { .footer { padding: 56px 0 36px; } .footer-logo { font-size: 2rem; } .footer-nav { gap: 10px 22px; } }

/* =========================================
   GSAP-Level Smooth Reveals 
   ========================================= */
.reveal { 
  opacity: 0; transform: translateY(40px); 
  transition: opacity 1.2s var(--ease-out-expo), transform 1.2s var(--ease-out-expo); 
}
.reveal.active { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  #moving-bg { animation: none; }
  .sparkle { display: none; }
}

/* =========================================
   Sub pages (service / company / message) shared
   ========================================= */
.container { max-width: 1160px; margin: 0 auto; padding: 0 5%; }
.page-hero { position: relative; overflow: hidden; isolation: isolate; padding: calc(var(--header-height) + 90px) 0 90px; background: #f5f8fd; text-align: center; }
.page-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(rgba(0,82,255,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(0,82,255,.07) 1px, transparent 1px); background-size: 56px 56px; -webkit-mask-image: radial-gradient(60% 80% at 50% 40%, #000, transparent 80%); mask-image: radial-gradient(60% 80% at 50% 40%, #000, transparent 80%); animation: phGrid 24s linear infinite; }
@keyframes phGrid { to { background-position: 56px 56px, 56px 56px; } }
.page-hero .net-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.ph-orb { position: absolute; border-radius: 50%; filter: blur(70px); z-index: -1; pointer-events: none; }
.ph-orb.o1 { width: 420px; height: 420px; left: -120px; top: -120px; background: rgba(0,82,255,.14); animation: phOrb 16s ease-in-out infinite alternate; }
.ph-orb.o2 { width: 380px; height: 380px; right: -100px; bottom: -160px; background: rgba(43,193,255,.2); animation: phOrb 20s ease-in-out infinite alternate-reverse; }
@keyframes phOrb { to { transform: translate(100px, 60px) scale(1.12); } }
.crumb { font-size: .78rem; color: var(--c-text-light); letter-spacing: .08em; margin-bottom: 26px; }
.crumb a { color: var(--c-primary); font-weight: 600; }
.crumb span { margin: 0 10px; opacity: .5; }
.ph-label { display: inline-flex; align-items: center; gap: 14px; font-family: var(--font-en); font-size: .78rem; font-weight: 800; letter-spacing: .3em; color: var(--c-primary); margin-bottom: 16px; }
.ph-label::before, .ph-label::after { content: ""; width: 28px; height: 2px; background: var(--gradient-accent); border-radius: 2px; }
.ph-title { font-family: var(--font-en); font-size: clamp(2.6rem, 6vw, 4.4rem); font-weight: 800; letter-spacing: -.045em; line-height: 1.05; overflow: hidden; padding-bottom: .06em; }
.ph-title > span { display: inline-block; transform: translateY(105%); animation: phUp 1.1s .1s var(--ease-out-expo) forwards; }
.ph-ja { font-size: .95rem; font-weight: 700; letter-spacing: .24em; color: var(--c-text-light); margin-top: 12px; opacity: 0; animation: phFade .9s .4s var(--ease-out-expo) forwards; }
.ph-lead { max-width: 640px; margin: 28px auto 0; color: var(--c-text-light); line-height: 2; opacity: 0; animation: phFade .9s .55s var(--ease-out-expo) forwards; }
@keyframes phUp { to { transform: none; } }
@keyframes phFade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.btn-primary { position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 14px; padding: 19px 44px; border-radius: 100px; background: var(--gradient-accent); color: #fff; font-weight: 700; letter-spacing: .08em; box-shadow: 0 12px 30px rgba(0, 82, 255, .28); transition: transform var(--transition-fast), box-shadow var(--transition-fast); }
.btn-primary:hover { opacity: 1; transform: translateY(-2px); box-shadow: 0 16px 36px rgba(0, 82, 255, .38); }
.btn-primary .arw { transition: transform var(--transition-fast); }
.btn-primary:hover .arw { transform: translateX(5px); }

.cta { position: relative; overflow: hidden; isolation: isolate; background: #07080c; color: #fff; padding: 96px 0; text-align: center; }
.cta::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(50% 80% at 15% 0%, rgba(0,82,255,.45), transparent 70%), radial-gradient(40% 70% at 90% 100%, rgba(43,193,255,.3), transparent 70%); }
.cta-en { font-family: var(--font-en); font-weight: 800; font-size: .8rem; letter-spacing: .3em; color: #2bc1ff; margin-bottom: 16px; }
.cta h2 { font-family: var(--font-sans); font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 700; line-height: 1.6; margin-bottom: 14px; }
.cta p { color: rgba(255,255,255,.7); margin-bottom: 36px; }

@media (max-width: 768px) {
  .page-hero { padding: calc(var(--header-height) + 56px) 0 60px; }
  .cta { padding: 72px 0; }
  .cta h2 br { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .ph-title > span { transform: none; animation: none; }
  .ph-ja, .ph-lead { opacity: 1; animation: none; }
}

/* =========================================
   LINE button (shared)
   ========================================= */
.btn-line { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 19px 36px; border-radius: 100px; background: #06C755; color: #fff; font-weight: 700; letter-spacing: .06em; box-shadow: 0 12px 28px rgba(6, 199, 85, .25); transition: transform var(--transition-fast), box-shadow var(--transition-fast); }
.btn-line:hover { opacity: 1; transform: translateY(-2px); box-shadow: 0 16px 34px rgba(6, 199, 85, .33); }
.btn-line svg { flex: none; }
.cta-btns { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }
@media (max-width: 768px) { .cta-btns { flex-direction: column; align-items: stretch; max-width: 340px; margin: 0 auto; } .cta-btns a { justify-content: center; } }
