/* ============================================
   一凡 SPACE — Base Styles
   ============================================ */

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-weight: var(--weight-regular);
  font-size: var(--text-body);
  line-height: 1.8;
  color: var(--color-bark);
  background-color: var(--color-cream);
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3 {
  font-family: var(--font-chinese);
  font-weight: var(--weight-light);
  line-height: 1.4;
  color: var(--color-wood);
}

h1 { font-size: var(--text-hero); }
h2 { font-size: var(--text-section); }
h3 { font-size: var(--text-body); }

p {
  max-width: 65ch;
  margin-bottom: 1em;
}

a {
  color: var(--color-wood);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-gentle);
}

a:hover {
  color: var(--color-ember);
}

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

/* Utility */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Selection */
::selection {
  background-color: rgba(230, 138, 120, 0.2);
  color: var(--color-bark);
}

/* Focus styles */
:focus-visible {
  outline: 2px solid var(--color-ember);
  outline-offset: 3px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
