/* ========== Top Page Styles (Metra Capital) ========== */
:root {
  --color-white: #FFFFFF;
  --color-black: #0A0A0A;
  --color-dark: #1A1A1A;
  --color-gray-800: #222;
  --color-gray-600: #555;
  --color-gray-500: #777;
  --color-gray-400: #999;
  --color-gray-300: #CCC;
  --color-gray-200: #E5E5E5;
  --color-gray-100: #F5F5F5;
  --color-primary: #0E3A5F;
  --color-primary-light: #1E5F8C;
  --font-en: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-jp: 'Noto Sans JP', 'Hiragino Sans', sans-serif;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html, body {
  overflow: hidden;
  height: 100%;
  width: 100%;
  font-family: var(--font-jp);
  color: var(--color-white);
  background: var(--color-black);
  cursor: none;
}

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

/* ========== Custom Cursor (Designer) ========== */
.cursor {
  position: fixed;
  top: 0; left: 0;
  width: 30px;
  height: 30px;
  border: 1.5px solid #FFFFFF;
  border-radius: 50%;
  pointer-events: none;
  z-index: 100001;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.25), 0 0 12px rgba(0,0,0,0.3);
  transition: width 0.35s var(--ease-out-expo),
              height 0.35s var(--ease-out-expo),
              border-color 0.3s ease,
              background 0.3s ease,
              opacity 0.3s ease;
}
.cursor::before {
  content: '';
  position: absolute;
  inset: -6px;
  border: 1px dashed rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  animation: cursorSpin 10s linear infinite;
  transition: opacity 0.3s, inset 0.4s var(--ease-out-expo);
}
@keyframes cursorSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.cursor-dot {
  position: fixed;
  top: 0; left: 0;
  width: 5px;
  height: 5px;
  background: #FFFFFF;
  border-radius: 50%;
  pointer-events: none;
  z-index: 100002;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.25), 0 0 6px rgba(255,255,255,0.6);
}
.cursor-trail {
  position: fixed;
  top: 0; left: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1E5F8C, #0E3A5F);
  pointer-events: none;
  z-index: 100000;
  transform: translate(-50%, -50%);
  opacity: 0.5;
  filter: blur(3px);
  transition: opacity 0.3s;
}
.cursor.hovered {
  width: 52px;
  height: 52px;
  border-color: #FFFFFF;
  background: rgba(255, 255, 255, 0.15);
}
.cursor.hovered::before {
  inset: -3px;
  border-color: rgba(255, 255, 255, 0.8);
  animation-duration: 4s;
}
.cursor.hovered::after {
  content: 'VIEW';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-en);
  font-size: 0.52rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  color: #FFFFFF;
}
.cursor.pressed {
  width: 18px;
  height: 18px;
  background: #FFFFFF;
  border-color: #FFFFFF;
}
@media (max-width: 1024px) {
  html, body { cursor: auto; }
  a { cursor: pointer; }
  .cursor, .cursor-dot, .cursor-trail { display: none; }
}

/* ========== Loader (Designer) ========== */
.loader {
  position: fixed;
  inset: 0;
  background: #050505;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: opacity 0.9s var(--ease-out-expo), visibility 0.9s var(--ease-out-expo);
}
.loader-bg {
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(circle at 20% 30%, rgba(30, 95, 140, 0.25), transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(14, 58, 95, 0.3), transparent 45%);
  filter: blur(40px);
  animation: bgFloat 8s ease-in-out infinite alternate;
}
@keyframes bgFloat {
  from { transform: scale(1) rotate(0deg); }
  to { transform: scale(1.15) rotate(8deg); }
}

/* Sweeping grid lines */
.loader-grid {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  pointer-events: none;
}
.loader-grid span {
  border-right: 1px solid rgba(255, 255, 255, 0.04);
  position: relative;
  overflow: hidden;
}
.loader-grid span:last-child { border-right: none; }
.loader-grid span::after {
  content: '';
  position: absolute;
  top: -100%;
  left: 0;
  right: 0;
  height: 30%;
  background: linear-gradient(180deg, transparent, rgba(30, 95, 140, 0.5), transparent);
  animation: gridSweep 3s var(--ease-out-expo) infinite;
}
.loader-grid span:nth-child(1)::after { animation-delay: 0s; }
.loader-grid span:nth-child(2)::after { animation-delay: 0.15s; }
.loader-grid span:nth-child(3)::after { animation-delay: 0.3s; }
.loader-grid span:nth-child(4)::after { animation-delay: 0.45s; }
.loader-grid span:nth-child(5)::after { animation-delay: 0.6s; }
.loader-grid span:nth-child(6)::after { animation-delay: 0.75s; }
.loader-grid span:nth-child(7)::after { animation-delay: 0.9s; }
.loader-grid span:nth-child(8)::after { animation-delay: 1.05s; }
.loader-grid span:nth-child(9)::after { animation-delay: 1.2s; }
.loader-grid span:nth-child(10)::after { animation-delay: 1.35s; }
.loader-grid span:nth-child(11)::after { animation-delay: 1.5s; }
.loader-grid span:nth-child(12)::after { animation-delay: 1.65s; }
@keyframes gridSweep {
  0% { top: -100%; }
  60%, 100% { top: 200%; }
}

.loader-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  padding: 40px;
}

/* Brand mark reveal */
.loader-brand {
  position: relative;
  overflow: hidden;
  padding: 0;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}
.loader-brand::before {
  content: '';
  position: absolute;
  inset: 0;
  background: #050505;
  animation: brandReveal 1.4s var(--ease-out-expo) 0.3s forwards;
  z-index: 2;
}
@keyframes brandReveal {
  0% { transform: translateX(0); }
  100% { transform: translateX(105%); }
}
.loader-brand img {
  height: 52px;
  width: auto;
  display: block;
  opacity: 0;
  filter: drop-shadow(0 2px 8px rgba(255,255,255,0.2));
  animation: brandFade 0.4s ease 0.9s forwards;
}
@keyframes brandFade {
  to { opacity: 1; }
}

/* Tagline letter stagger */
.loader-tagline {
  display: flex;
  gap: 1px;
  overflow: hidden;
}
.loader-tagline span {
  display: inline-block;
  font-family: var(--font-en);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.35em;
  color: rgba(255, 255, 255, 0.7);
  opacity: 0;
  transform: translateY(18px);
  animation: taglineIn 0.6s var(--ease-out-expo) forwards;
}
@keyframes taglineIn {
  to { opacity: 1; transform: translateY(0); }
}
.loader-tagline span:nth-child(1) { animation-delay: 1.1s; }
.loader-tagline span:nth-child(2) { animation-delay: 1.14s; }
.loader-tagline span:nth-child(3) { animation-delay: 1.18s; }
.loader-tagline span:nth-child(4) { animation-delay: 1.22s; }
.loader-tagline span:nth-child(5) { animation-delay: 1.26s; }
.loader-tagline span:nth-child(6) { animation-delay: 1.30s; }
.loader-tagline span:nth-child(7) { animation-delay: 1.34s; }
.loader-tagline span:nth-child(8) { animation-delay: 1.38s; }
.loader-tagline span:nth-child(9) { animation-delay: 1.42s; }
.loader-tagline span:nth-child(10) { animation-delay: 1.46s; }
.loader-tagline span:nth-child(11) { animation-delay: 1.50s; }
.loader-tagline span:nth-child(12) { animation-delay: 1.54s; }
.loader-tagline span:nth-child(13) { animation-delay: 1.58s; }
.loader-tagline span:nth-child(14) { animation-delay: 1.62s; }
.loader-tagline span:nth-child(15) { animation-delay: 1.66s; }
.loader-tagline span:nth-child(16) { animation-delay: 1.70s; }
.loader-tagline span:nth-child(17) { animation-delay: 1.74s; }
.loader-tagline span:nth-child(18) { animation-delay: 1.78s; }
.loader-tagline span:nth-child(19) { animation-delay: 1.82s; }
.loader-tagline span:nth-child(20) { animation-delay: 1.86s; }
.loader-tagline span:nth-child(n+21) { animation-delay: 1.90s; }

/* Progress bar + counter */
.loader-progress {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 16px;
  width: 340px;
  max-width: 70vw;
  opacity: 0;
  animation: brandFade 0.5s ease 1s forwards;
}
.loader-bar {
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}
.loader-bar i {
  position: absolute;
  left: 0; top: 0;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary-light), #5BA3D0);
  animation: loaderFill 2.2s cubic-bezier(0.4, 0, 0.2, 1) 0.8s forwards;
  box-shadow: 0 0 12px rgba(91, 163, 208, 0.5);
}
.loader-bar::before {
  content: '';
  position: absolute;
  left: 0; top: -1px;
  width: 2px; height: 3px;
  background: #5BA3D0;
  box-shadow: 0 0 8px rgba(91, 163, 208, 0.8);
  animation: loaderHead 2.2s cubic-bezier(0.4, 0, 0.2, 1) 0.8s forwards;
}
@keyframes loaderFill { to { width: 100%; } }
@keyframes loaderHead { to { left: calc(100% - 2px); } }
.loader-count {
  font-family: var(--font-en);
  font-size: 0.85rem;
  font-weight: 300;
  letter-spacing: 0.15em;
  color: rgba(255, 255, 255, 0.85);
  min-width: 50px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.loader-count em {
  font-style: normal;
  font-weight: 400;
}
.loader-count span {
  opacity: 0.5;
  margin-left: 2px;
}

/* Meta info */
.loader-meta {
  position: fixed;
  left: 0; right: 0;
  bottom: 30px;
  display: flex;
  justify-content: space-between;
  padding: 0 40px;
  font-family: var(--font-en);
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  color: rgba(255, 255, 255, 0.35);
  opacity: 0;
  animation: brandFade 0.6s ease 1.4s forwards;
  z-index: 2;
}

/* Corner marks */
.loader-inner::before,
.loader-inner::after {
  content: '';
  position: fixed;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  opacity: 0;
  animation: brandFade 0.5s ease 1.2s forwards;
}
.loader-inner::before {
  top: 30px; left: 30px;
  border-right: none;
  border-bottom: none;
}
.loader-inner::after {
  bottom: 70px; right: 30px;
  border-left: none;
  border-top: none;
}

.loader.hidden {
  opacity: 0;
  visibility: hidden;
  transform: scale(1.02);
}
@media (max-width: 768px) {
  .loader-brand img { height: 40px; }
  .loader-tagline span { font-size: 0.6rem; letter-spacing: 0.2em; }
  .loader-progress { width: 260px; }
  .loader-meta { padding: 0 20px; font-size: 0.6rem; }
}

/* ========== Hero ========== */
.hero {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}
.hero-slider {
  position: absolute;
  inset: 0;
}
.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.5s ease;
}
.hero-slide.active {
  opacity: 1;
  animation: kenBurns 8s ease-out forwards;
}
@keyframes kenBurns {
  from { transform: scale(1.05); }
  to { transform: scale(1.15); }
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.15) 50%, rgba(0,0,0,0.6) 100%);
  z-index: 1;
}

/* ========== Top Header (SYLA-style) ========== */
.hero-header {
  position: absolute;
  top: 0; left: 0; right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 48px;
  z-index: 10;
}
.hero-header-left {
  display: flex;
  align-items: center;
  gap: 32px;
}
.hero-header-right {
  display: flex;
  align-items: center;
  gap: 22px;
}
.hero-header-div {
  width: 1px;
  height: 36px;
  background: rgba(255,255,255,0.35);
}
.hero-logo {
  display: inline-flex;
  align-items: center;
  padding: 0;
  background: transparent;
  border-radius: 0;
  transition: opacity 0.3s ease;
}
.hero-logo:hover {
  opacity: 0.85;
}
.hero-logo img {
  height: 38px;
  width: auto;
  display: block;
  filter: drop-shadow(0 2px 8px rgba(255,255,255,0.25)) drop-shadow(0 0 18px rgba(255,255,255,0.15));
}
.hero-nav {
  display: flex;
  gap: 34px;
  align-items: center;
}
.hero-nav a {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  color: var(--color-white);
  position: relative;
  padding: 4px 0;
}
.hero-nav a .en {
  font-family: var(--font-en);
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  line-height: 1;
}
.hero-nav a .jp {
  font-family: var(--font-jp);
  font-size: 0.64rem;
  font-weight: 300;
  letter-spacing: 0.12em;
  opacity: 0.82;
  line-height: 1;
}
.hero-nav a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -6px;
  width: 0;
  height: 1px;
  background: var(--color-white);
  transition: width 0.35s var(--ease-out-expo);
}
.hero-nav a:hover::after { width: 100%; }
.hero-lang {
  display: flex;
  gap: 10px;
  font-family: var(--font-en);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  align-items: center;
  color: var(--color-white);
}
.hero-lang .active { opacity: 1; font-weight: 500; }
.hero-lang span:not(.active) { opacity: 0.55; }
.hero-lang .sep { opacity: 0.4; font-weight: 300; }

/* ========== Hamburger ========== */
.hamburger {
  width: 28px;
  height: 20px;
  position: relative;
  cursor: pointer;
  margin-left: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.hamburger span {
  display: block;
  width: 100%;
  height: 1.5px;
  background: var(--color-white);
  transition: all 0.4s;
}
.hamburger span:nth-child(2) { width: 70%; margin-left: auto; }
.hamburger.open span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* ========== Drawer ========== */
.drawer {
  position: fixed;
  inset: 0;
  background: #0a0a0a;
  z-index: 600;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s ease;
  color: var(--color-white);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  padding: 140px 90px 80px;
  overflow-y: auto;
}
.drawer.open { opacity: 1; visibility: visible; }
.drawer-close {
  position: absolute;
  top: 32px; right: 60px;
  width: 32px; height: 32px;
  cursor: pointer;
  transition: transform 0.3s ease, opacity 0.2s ease;
}
.drawer-close:hover { transform: rotate(90deg); opacity: 0.75; }
.drawer-close::before, .drawer-close::after {
  content:''; position:absolute; left:0; top:50%;
  width:100%; height:1px; background: var(--color-white);
}
.drawer-close::before { transform: rotate(45deg); }
.drawer-close::after { transform: rotate(-45deg); }
.drawer-col h4 {
  font-family: var(--font-en);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.32em;
  color: rgba(255,255,255,0.4);
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.drawer-nav {
  list-style: none;
  margin-bottom: 56px;
}
.drawer-nav li {
  margin-bottom: 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.drawer-nav a {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: var(--font-en);
  font-size: 1.35rem;
  font-weight: 300;
  letter-spacing: 0.14em;
  color: var(--color-white);
  padding: 18px 0;
  transition: padding-left 0.35s var(--ease-out-expo), opacity 0.3s ease;
  line-height: 1.1;
}
.drawer-nav a:hover { padding-left: 12px; opacity: 0.75; }
.drawer-nav a .jp {
  font-family: var(--font-jp);
  font-size: 0.7rem;
  font-weight: 300;
  color: rgba(255,255,255,0.45);
  letter-spacing: 0.2em;
  line-height: 1;
}
.drawer-legal {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 4px;
}
.drawer-legal a {
  font-family: var(--font-en);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  color: rgba(255,255,255,0.5);
  transition: color 0.3s ease;
}
.drawer-legal a:hover { color: var(--color-white); }

/* ========== Hero Copy ========== */
.hero-content {
  position: absolute;
  bottom: 18%;
  left: 60px;
  z-index: 5;
  max-width: 900px;
}
.hero-eyebrow {
  font-family: var(--font-en);
  font-size: 0.75rem;
  letter-spacing: 0.35em;
  color: var(--color-white);
  opacity: 0;
  margin-bottom: 24px;
  animation: fadeIn 1s ease 2.5s forwards;
}
.hero-title {
  font-family: var(--font-jp);
  font-weight: 200;
  font-size: clamp(2.2rem, 5.5vw, 5rem);
  line-height: 1.3;
  color: var(--color-white);
  letter-spacing: 0.05em;
}
.hero-char {
  display: inline-block;
  opacity: 0;
  transform: translateY(40px);
  animation: charIn 1s var(--ease-out-expo) forwards;
}
.hero-sub {
  font-family: var(--font-en);
  font-size: 0.95rem;
  font-weight: 300;
  letter-spacing: 0.3em;
  color: var(--color-white);
  opacity: 0;
  margin-top: 32px;
  animation: fadeIn 1.2s ease 3.2s forwards;
}
@keyframes charIn {
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  to { opacity: 1; }
}

/* ========== Hero Footer ========== */
.hero-footer {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 60px;
  z-index: 10;
  opacity: 0;
  animation: fadeIn 1s ease 3.5s forwards;
}
.hero-footer-links {
  display: flex;
  gap: 28px;
}
.hero-footer-links a {
  font-family: var(--font-en);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  color: rgba(255,255,255,0.75);
  transition: color 0.3s;
}
.hero-footer-links a:hover { color: var(--color-white); }
.hero-footer-copy {
  font-family: var(--font-en);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: rgba(255,255,255,0.55);
}

/* ========== Scroll Indicator ========== */
.scroll-indicator {
  position: absolute;
  bottom: 80px;
  right: 60px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  opacity: 0;
  animation: fadeIn 1s ease 3.8s forwards;
}
.scroll-indicator span {
  font-family: var(--font-en);
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  color: var(--color-white);
  writing-mode: vertical-rl;
}
.scroll-line {
  width: 1px;
  height: 60px;
  background: rgba(255,255,255,0.3);
  position: relative;
  overflow: hidden;
}
.scroll-line::after {
  content: '';
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 40%;
  background: var(--color-white);
  animation: scrollDot 2.4s ease-in-out infinite;
}
@keyframes scrollDot {
  0% { top: -40%; }
  100% { top: 100%; }
}

/* Slider Indicators */
.slider-indicators {
  position: absolute;
  bottom: 80px;
  left: 60px;
  z-index: 10;
  display: flex;
  gap: 8px;
}
.slider-indicators span {
  width: 30px;
  height: 2px;
  background: rgba(255,255,255,0.3);
  transition: background 0.3s;
}
.slider-indicators span.active { background: var(--color-white); }

/* ========== Responsive ========== */
/* Hide/show helpers for top-page header */
.hero-header-right.mobile-only { display: none; }
.hero-header .hamburger { margin-left: 0; }

@media (max-width: 1024px) {
  .hero-header, .hero-footer { padding: 18px 24px; }
  .hero-header-left { gap: 16px; }
  .hero-header-div { display: none; }
  .hero-logo img { height: 30px; }
  .hero-content { left: 24px; right: 24px; bottom: 22%; }
  .hero-nav { display: none; }
  .hero-header-right.mobile-only { display: flex; align-items: center; }
  .scroll-indicator { display: none; }
  .slider-indicators { left: 24px; bottom: 70px; }
  .drawer { padding: 110px 36px 60px; grid-template-columns: 1fr; gap: 40px; }
  .drawer-close { top: 26px; right: 28px; width: 28px; height: 28px; }
  .drawer-col h4 { margin-bottom: 24px; padding-bottom: 14px; }
  .drawer-nav { margin-bottom: 36px; }
  .drawer-nav a { font-size: 1.2rem; padding: 16px 0; letter-spacing: 0.16em; }
  .drawer-nav a .jp { font-size: 0.66rem; letter-spacing: 0.22em; }
}
@media (max-width: 768px) {
  .hero-header { padding: 14px 18px; }
  .hero-logo img { height: 26px; }
  .hero-header .hamburger { width: 24px; height: 18px; }
  .drawer { padding: 90px 24px 48px; gap: 32px; }
  .drawer-close { top: 22px; right: 22px; }
  .drawer-nav a { font-size: 1.1rem; padding: 14px 0; }
  .hero-footer {
    flex-direction: column;
    gap: 10px;
    padding: 16px 20px;
    text-align: center;
  }
  .hero-footer-links { flex-wrap: wrap; justify-content: center; gap: 14px; }
  .hero-content { left: 20px; right: 20px; bottom: 25%; }
  .hero-title { font-size: 2rem; }
  .hero-sub { font-size: 0.8rem; margin-top: 20px; }
  .loader-logo { font-size: 1.8rem; }
  .slider-indicators { left: 20px; bottom: 110px; }
}
