/* ============================================
   Next Lab - 共通CSS
   ============================================ */

/* ---- Google Fonts ---- */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700;900&display=swap');

/* ---- CSS Variables ---- */
:root {
  --color-primary: #2563EB;
  --color-primary-dark: #1D4ED8;
  --color-primary-light: #EFF6FF;
  --color-accent: #F97316;
  --color-accent-light: #FFF7ED;
  --color-success: #16A34A;
  --color-base: #F9FAFB;
  --color-gray-100: #F3F4F6;
  --color-gray-200: #E5E7EB;
  --color-gray-300: #D1D5DB;
  --color-gray-400: #9CA3AF;
  --color-gray-500: #6B7280;
  --color-gray-700: #374151;
  --color-gray-900: #111827;

  --font-base: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --shadow-sm: 0 1px 4px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.05);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.10), 0 4px 12px rgba(0,0,0,0.06);

  --transition: all 0.25s ease;

  --header-height: 68px;
}

/* ---- Reset & Base ---- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-base);
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-gray-700);
  background: #FFFFFF;
  overflow-x: hidden;
  word-break: auto-phrase;
  overflow-wrap: break-word;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

ul, ol { list-style: none; }

button { cursor: pointer; }

/* ---- Utility ---- */
.hidden-sm { display: none; }
.show-sm { display: inline; }

@media (min-width: 768px) {
  .hidden-sm { display: inline; }
  .show-sm { display: none; }
}

/* ============================================
   HEADER
   ============================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-gray-200);
  transition: box-shadow 0.3s ease;
  height: var(--header-height);
}

.site-header.scrolled {
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 24px;
}

.header-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.header-logo img {
  height: 36px;
  width: auto;
}

.global-nav {
  display: none;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

@media (min-width: 1024px) {
  .global-nav { display: flex; }
}

.global-nav a {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--color-gray-700);
  transition: var(--transition);
  white-space: nowrap;
}

.global-nav a:hover,
.global-nav a.active {
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-weight: 700;
}

.header-cta {
  display: none;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

@media (min-width: 1024px) {
  .header-cta { display: flex; margin-left: 0; }
}

.btn-tel {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--color-gray-700);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.btn-tel:hover {
  background: var(--color-base);
  color: var(--color-primary);
}

.btn-contact {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--color-accent);
  color: white;
  font-size: 14px;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  transition: var(--transition);
  white-space: nowrap;
  min-height: 44px;
  box-shadow: 0 2px 8px rgba(249,115,22,0.3);
}

.btn-contact:hover {
  background: #EA6C0A;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(249,115,22,0.4);
}

/* ---- Hamburger ---- */
.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  padding: 8px;
  border-radius: var(--radius-sm);
  margin-left: auto;
  flex-shrink: 0;
}

@media (min-width: 1024px) {
  .hamburger { display: none; }
}

.hamburger span {
  display: block;
  height: 2px;
  background: var(--color-gray-700);
  border-radius: 2px;
  transition: var(--transition);
  transform-origin: center;
}

.hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---- Mobile Menu ---- */
.mobile-menu {
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: white;
  z-index: 999;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.mobile-menu.open {
  transform: translateX(0);
}

.mobile-menu nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mobile-menu nav a {
  display: block;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  font-size: 17px;
  font-weight: 500;
  color: var(--color-gray-700);
  border: 1.5px solid var(--color-gray-200);
  transition: var(--transition);
}

.mobile-menu nav a:hover,
.mobile-menu nav a.active {
  background: var(--color-primary-light);
  color: var(--color-primary);
  border-color: var(--color-primary);
  font-weight: 700;
}

.mobile-menu-cta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--color-gray-200);
}

.btn-apply {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-accent);
  color: white;
  font-size: 16px;
  font-weight: 700;
  padding: 16px 20px;
  border-radius: var(--radius-lg);
  min-height: 56px;
  box-shadow: 0 4px 12px rgba(249,115,22,0.3);
  transition: var(--transition);
}

.btn-apply:hover {
  background: #EA6C0A;
}

.btn-tel-m {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--color-base);
  color: var(--color-gray-700);
  font-size: 16px;
  font-weight: 700;
  padding: 16px 20px;
  border-radius: var(--radius-lg);
  border: 2px solid var(--color-gray-200);
  min-height: 56px;
  transition: var(--transition);
}

.btn-tel-m:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* ============================================
   PAGE BODY
   ============================================ */
.page-body {
  padding-top: var(--header-height);
}

/* ============================================
   PAGE HERO (Inner Pages)
   ============================================ */
.page-hero {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  padding: 48px 20px;
  text-align: center;
  color: white;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 70% 50%, rgba(255,255,255,0.06) 0%, transparent 60%);
}

.page-hero h1 {
  font-size: clamp(24px, 5vw, 40px);
  font-weight: 900;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
}

.page-hero p {
  font-size: 16px;
  opacity: 0.85;
  position: relative;
  z-index: 1;
}

/* ============================================
   SECTION COMMON
   ============================================ */
.section-label {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--color-primary);
  text-transform: uppercase;
  background: var(--color-primary-light);
  padding: 4px 12px;
  border-radius: 100px;
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(22px, 4vw, 36px);
  font-weight: 900;
  color: var(--color-gray-900);
  line-height: 1.35;
  margin-bottom: 12px;
  word-break: auto-phrase;
}

.accent-line {
  display: block;
  width: 48px;
  height: 4px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  border-radius: 2px;
  margin-bottom: 24px;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: var(--radius-lg);
  font-size: 16px;
  font-weight: 700;
  font-family: var(--font-base);
  transition: var(--transition);
  min-height: 48px;
  cursor: pointer;
  border: 2px solid transparent;
  white-space: nowrap;
  text-decoration: none;
}

.btn-primary {
  background: var(--color-accent);
  color: white;
  box-shadow: 0 4px 16px rgba(249,115,22,0.3);
}

.btn-primary:hover {
  background: #EA6C0A;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(249,115,22,0.4);
}

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn-outline:hover {
  background: var(--color-primary-light);
}

.btn-lg {
  padding: 18px 32px;
  font-size: 17px;
  min-height: 56px;
  border-radius: var(--radius-xl);
}

/* ============================================
   BADGES
   ============================================ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 700;
}

.badge-primary {
  background: var(--color-primary-light);
  color: var(--color-primary);
}

.badge-accent {
  background: var(--color-accent-light);
  color: var(--color-accent);
}

/* ============================================
   STEP NUMBER
   ============================================ */
.step-number {
  width: 40px;
  height: 40px;
  background: var(--color-primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 900;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(37,99,235,0.3);
}

/* ============================================
   MASCOT BLOCK
   ============================================ */
.mascot-block {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.mascot-img {
  width: 56px;
  flex-shrink: 0;
  animation: mascot-float 3s ease-in-out infinite;
}

.mascot-balloon {
  background: white;
  border: 2px solid var(--color-primary);
  border-radius: 0 var(--radius-lg) var(--radius-lg) var(--radius-lg);
  padding: 12px 16px;
  font-size: 14px;
  color: var(--color-gray-700);
  line-height: 1.7;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.mascot-balloon::before {
  content: '';
  position: absolute;
  top: 0;
  left: -10px;
  width: 0;
  height: 0;
  border-top: 10px solid var(--color-primary);
  border-left: 10px solid transparent;
}

.mascot-balloon em {
  color: var(--color-primary);
  font-style: normal;
  font-weight: 700;
}

/* ============================================
   SCROLL REVEAL
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ============================================
   MASCOT ANIMATION
   ============================================ */
@keyframes mascot-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes wave {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(20deg); }
  75% { transform: rotate(-10deg); }
}

.mascot-wave.wave-active {
  animation: wave 0.8s ease-in-out 3;
}

/* ============================================
   STICKY BOTTOM CTA
   ============================================ */
.sticky-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 900;
  background: white;
  border-top: 1px solid var(--color-gray-200);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 -4px 16px rgba(0,0,0,0.08);
}

@media (min-width: 768px) {
  .sticky-cta { display: none; }
}

.sticky-mascot img {
  width: 36px;
  flex-shrink: 0;
  animation: mascot-float 3s ease-in-out infinite;
}

.sticky-cta-buttons {
  display: flex;
  gap: 8px;
  flex: 1;
}

.sticky-btn-apply {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--color-accent);
  color: white;
  font-size: 14px;
  font-weight: 700;
  padding: 12px 8px;
  border-radius: var(--radius-md);
  min-height: 48px;
  transition: var(--transition);
  box-shadow: 0 2px 8px rgba(249,115,22,0.3);
}

.sticky-btn-apply:hover {
  background: #EA6C0A;
}

.sticky-btn-tel {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--color-primary);
  color: white;
  font-size: 14px;
  font-weight: 700;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  min-height: 48px;
  transition: var(--transition);
  white-space: nowrap;
}

.sticky-btn-tel:hover {
  background: var(--color-primary-dark);
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background: #1E293B;
  color: rgba(255,255,255,0.8);
  padding-bottom: 60px; /* space for sticky CTA on mobile */
}

@media (min-width: 768px) {
  .site-footer { padding-bottom: 0; }
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.footer-top {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  padding: 48px 0 40px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

@media (min-width: 640px) {
  .footer-top { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .footer-top { grid-template-columns: 2fr 1fr 1.5fr; }
}

.footer-brand img {
  height: 56px;
  width: auto;
  max-width: 200px;
  margin-bottom: 16px;
  opacity: 1;
}

.footer-brand p {
  font-size: 14px;
  line-height: 1.8;
  opacity: 0.75;
}

.footer-nav h4,
.footer-info h4 {
  font-size: 13px;
  font-weight: 700;
  color: white;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.footer-nav ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-nav ul li a {
  font-size: 14px;
  opacity: 0.75;
  transition: var(--transition);
}

.footer-nav ul li a:hover {
  opacity: 1;
  color: white;
}

.footer-info p {
  font-size: 14px;
  line-height: 1.9;
  opacity: 0.75;
}

.footer-info a {
  color: rgba(255,255,255,0.9);
  font-weight: 700;
}

.footer-info a:hover {
  color: white;
  text-decoration: underline;
}

.footer-bottom {
  padding: 20px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
  align-items: center;
}

.footer-bottom p {
  font-size: 12px;
  opacity: 0.5;
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */
@media (max-width: 639px) {
  .btn-lg {
    width: 100%;
    justify-content: center;
  }
}
