/* Material Design 3 - Main Stylesheet
   Import all M3 CSS modules in correct order */

/* 1. Design Tokens (CSS Custom Properties) */
@import url('m3-tokens.css');

/* 2. Reset and Base Styles */
@import url('m3-reset.css');

/* 3. Typography System */
@import url('m3-typography.css');

/* 4. Utility Classes */
@import url('m3-utilities.css');

/* 5. Motion System */
@import url('m3-motion.css');

/* 6. Base Footer Styles */
@import url('base-footer.css');

/* 7. Google Fonts - Including Comfortaa for rounded English text */
@import url('https://fonts.googleapis.com/css2?family=Comfortaa:wght@300;400;500;600;700&family=Noto+Sans+JP:wght@300;400;500;700&display=swap');

/* 8. Material Symbols */
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200');

/* Material Symbols Configuration */
.material-symbols-rounded {
  font-variation-settings:
    'FILL' 0,
    'wght' 400,
    'GRAD' 0,
    'opsz' 24;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'liga';
}

/* Icon size variants */
.material-symbols-rounded.md-18 { font-size: 18px; }
.material-symbols-rounded.md-24 { font-size: 24px; }
.material-symbols-rounded.md-36 { font-size: 36px; }
.material-symbols-rounded.md-48 { font-size: 48px; }

/* Icon fill variants */
.material-symbols-rounded.filled {
  font-variation-settings: 'FILL' 1;
}

/* Global Layout */
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
}

/* Section Spacing */
section {
  padding: 64px 0;
  position: relative;
}

@media (max-width: 599px) {
  section {
    padding: 48px 0;
  }
}

/* State Layer Effects */
.state-layer {
  position: relative;
  overflow: hidden;
}

.state-layer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: currentColor;
  opacity: 0;
  transition: opacity var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard);
  pointer-events: none;
}

.state-layer:hover::before {
  opacity: var(--md-sys-state-hover-opacity);
}

.state-layer:focus::before {
  opacity: var(--md-sys-state-focus-opacity);
}

.state-layer:active::before {
  opacity: var(--md-sys-state-pressed-opacity);
}

/* Ripple Effect Base */
.ripple {
  position: relative;
  overflow: hidden;
}

.ripple-effect {
  position: absolute;
  border-radius: 50%;
  background-color: currentColor;
  opacity: 0;
  animation: ripple-animation 600ms ease-out;
  pointer-events: none;
}

@keyframes ripple-animation {
  from {
    opacity: var(--md-sys-state-pressed-opacity);
    transform: scale(0);
  }
  to {
    opacity: 0;
    transform: scale(4);
  }
}

/* Focus Indicator */
.focus-indicator {
  position: relative;
}

.focus-indicator::after {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  border: 2px solid var(--md-sys-color-primary);
  border-radius: inherit;
  opacity: 0;
  transition: opacity var(--md-sys-motion-duration-short2) var(--md-sys-motion-easing-standard);
  pointer-events: none;
}

.focus-indicator:focus-visible::after {
  opacity: 1;
}

/* Loading States */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--md-sys-color-surface-variant) 0%,
    var(--md-sys-color-surface-container-high) 50%,
    var(--md-sys-color-surface-variant) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
  border-radius: var(--md-sys-shape-corner-small);
}

@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Smooth Scroll */
html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* Print Styles */
@media print {
  body {
    background-color: white;
    color: black;
  }
  
  .no-print {
    display: none !important;
  }
}