/* ============================================
   Re•sonas Design System — base.css
   Minimal Resonance Design Tokens & Reset
   ============================================ */

/* --- CSS Custom Properties (Design Tokens) --- */
:root {
  /* Colors */
  --color-primary: #1a1a2e;
  --color-secondary: #16213e;
  --color-accent: #000000;
  --color-bg: #f9fafb;
  --color-white: #ffffff;
  --color-text: #1f2937;
  --color-text-light: #6b7280;
  --color-text-muted: #9ca3af;
  --color-border: #e5e7eb;
  --color-success: #10b981;
  --color-overlay: rgba(26, 26, 46, 0.6);

  /* Typography */
  --font-primary: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Cormorant Garamond', 'Times New Roman', serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 0.9375rem;
  --font-size-md: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.5rem;
  --font-size-2xl: 2rem;
  --font-size-3xl: 2.5rem;
  --font-size-4xl: 3.5rem;
  --font-size-hero: clamp(2.5rem, 5vw, 4.5rem);
  --line-height: 1.8;
  --line-height-tight: 1.3;
  --letter-spacing-wide: 0.08em;
  --letter-spacing-wider: 0.15em;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  --space-4xl: 96px;
  --space-section: clamp(64px, 10vw, 120px);

  /* Layout */
  --container-max: 1280px;
  --container-narrow: 800px;
  --container-padding: max(20px, 5vw);

  /* Transitions */
  --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);

  /* Shadows */
  --shadow-subtle: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.12);
  --shadow-elevated: 0 20px 60px rgba(0, 0, 0, 0.15);

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-full: 9999px;
}

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

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

body {
  font-family: var(--font-primary);
  font-size: var(--font-size-base);
  line-height: var(--line-height);
  color: var(--color-text);
  background-color: var(--color-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img,
picture,
video,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
  transition: opacity var(--transition-base);
}

a:hover {
  opacity: 0.7;
}

ul, ol {
  list-style: none;
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: var(--line-height-tight);
}

/* --- Utility Classes --- */

/* Container */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

.container--narrow {
  max-width: var(--container-narrow);
}

/* Section Spacing */
.section {
  padding-top: var(--space-section);
  padding-bottom: var(--space-section);
}

/* Text Utilities */
.text-center { text-align: center; }
.text-light { color: var(--color-text-light); }
.text-muted { color: var(--color-text-muted); }
.text-white { color: var(--color-white); }
.text-display {
  font-family: var(--font-display);
  font-weight: 300;
  letter-spacing: var(--letter-spacing-wide);
}

/* Spacing Utilities */
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mt-2xl { margin-top: var(--space-2xl); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }

/* Display Utilities */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --- Scroll Animation --- */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--transition-slow), transform var(--transition-slow);
}

.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Selection --- */
::selection {
  background-color: var(--color-primary);
  color: var(--color-white);
}
