/* ===================================================================
   TactoWay — Global Stylesheet
   =================================================================== */

/* ===== Base ===== */
html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', 'Noto Sans JP', sans-serif;
  background: #F8FAFC;
  color: #0F172A;
}

/* ===== Dark theme ===== */
body.theme-dark {
  background: #0F172A;
  color: #F8FAFC;
}

/* ===== Glass header — light ===== */
.glass-header {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  transition: background 0.3s;
}

/* ===== Glass header — dark ===== */
body.theme-dark .glass-header {
  background: rgba(15, 23, 42, 0.82);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* ===== Text gradient ===== */
.text-gradient {
  background: linear-gradient(135deg, #3B82F6 0%, #22D3EE 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

/* ===== Glass cards (dark pages) ===== */
.card-glass {
  background: rgba(30, 41, 59, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

/* ===== Hero bg gradient (light pages) ===== */
.hero-bg {
  background: radial-gradient(circle at 50% 50%, #EFF6FF 0%, #FFFFFF 70%);
}

/* ===================================================================
   Homepage Hero — Video + Fallback
   =================================================================== */
.hero-video-wrap {
  position: relative;
  width: 100%;
  min-height: 100vh;
  overflow: hidden;
  background: #0F172A;
}

.hero-video-wrap video {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  object-fit: cover;
}

.hero-video-wrap .hero-fallback-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  transition: opacity 0.8s ease;
}

.hero-video-wrap .hero-fallback-img.fade-out {
  opacity: 0;
  pointer-events: none;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(15, 23, 42, 0.55) 0%,
    rgba(15, 23, 42, 0.70) 100%
  );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 6rem 1.5rem 4rem;
}

/* ===== Hero glass card ===== */
.glass-card {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

/* ===================================================================
   Mobile Navigation
   =================================================================== */
.mobile-menu {
  display: none;
  flex-direction: column;
}

.mobile-menu.open {
  display: flex;
}

/* Hamburger button animation helper */
.hamburger-icon {
  display: inline-block;
  transition: transform 0.2s ease;
}

.hamburger-icon.is-open {
  transform: rotate(90deg);
}

/* ===================================================================
   Accessibility
   =================================================================== */

/* Skip-to-content link */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: #2563EB;
  color: #fff;
  padding: 0.75rem 1.5rem;
  z-index: 200;
  font-weight: 700;
  font-size: 0.875rem;
  border-radius: 0 0 0.5rem 0;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 0;
}

/* Keyboard focus ring */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #3B82F6;
  outline-offset: 2px;
}

/* ===================================================================
   Utility animations
   =================================================================== */
@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.anim-fade-in-up {
  animation: fade-in-up 0.7s ease both;
}

.anim-delay-1 { animation-delay: 0.1s; }
.anim-delay-2 { animation-delay: 0.25s; }
.anim-delay-3 { animation-delay: 0.4s; }
.anim-delay-4 { animation-delay: 0.55s; }
