/* ============================================
   Perlart 手作理想国 — 基础样式 & CSS Reset
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Noto+Serif+SC:wght@400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,600;1,400&display=swap');

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-weight: var(--font-normal);
  line-height: var(--leading-normal);
  color: var(--color-ink);
  background-color: var(--color-cream);
  overflow-x: hidden;
}

/* === Typography === */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: var(--leading-tight);
  color: var(--color-ink);
  font-weight: var(--font-semibold);
}

h1 { font-size: var(--text-5xl); }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-base); }

p {
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  color: var(--color-ink-light);
}

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

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

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

ul, ol {
  list-style: none;
}

button, input, textarea, select {
  font: inherit;
  color: inherit;
  border: none;
  outline: none;
  background: none;
}

button {
  cursor: pointer;
}

/* === Utility Classes === */
.container {
  width: 100%;
  max-width: var(--container-xl);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

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

.section {
  padding: var(--space-24) 0;
}

.section-sm {
  padding: var(--space-16) 0;
}

.text-center {
  text-align: center;
}

.text-gold {
  color: var(--color-gold);
}

/* === Section Title Pattern === */
.section-header {
  text-align: center;
  margin-bottom: var(--space-16);
}

.section-header .section-label {
  font-family: var(--font-accent);
  font-size: var(--text-sm);
  font-weight: var(--font-normal);
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--color-gold);
  display: block;
  margin-bottom: var(--space-3);
}

.section-header h2 {
  font-size: var(--text-4xl);
  margin-bottom: var(--space-4);
  position: relative;
  display: inline-block;
}

.section-header .section-divider {
  width: 60px;
  height: 2px;
  background: var(--gradient-gold);
  margin: var(--space-4) auto var(--space-6);
  border-radius: var(--radius-full);
}

.section-header p {
  max-width: 600px;
  margin: 0 auto;
  font-size: var(--text-lg);
  color: var(--color-warm-gray);
}

/* === Button Styles === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-8);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  letter-spacing: 1px;
  border-radius: var(--radius-full);
  transition: all var(--transition-base);
  text-transform: uppercase;
  white-space: nowrap;
  min-height: 48px;
}

.btn-primary {
  background: var(--gradient-gold);
  color: #fff;
  box-shadow: var(--shadow-gold);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(201,169,110,0.35);
  color: #fff;
}

.btn-outline {
  border: 1.5px solid var(--color-gold);
  color: var(--color-gold);
  background: transparent;
}

.btn-outline:hover {
  background: var(--color-gold);
  color: #fff;
  transform: translateY(-2px);
}

.btn-white {
  background: rgba(255,255,255,0.9);
  color: var(--color-ink);
  backdrop-filter: blur(10px);
}

.btn-white:hover {
  background: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: var(--color-ink);
}

/* === Divider Patterns === */
.divider-stitch {
  width: 100%;
  height: 20px;
  background-image: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 8px,
    var(--color-gold-light) 8px,
    var(--color-gold-light) 20px,
    transparent 20px,
    transparent 28px
  );
  background-size: 28px 2px;
  background-repeat: repeat-x;
  background-position: center;
  opacity: 0.4;
}

/* === Scroll Animation Classes === */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

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

.fade-in-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.fade-in-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.scale-in {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.scale-in.visible {
  opacity: 1;
  transform: scale(1);
}

/* Stagger delay utility */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }
.delay-6 { transition-delay: 0.6s; }

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

/* === Selection === */
::selection {
  background: rgba(201, 169, 110, 0.2);
  color: var(--color-ink);
}

/* === Scrollbar === */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-cream);
}

::-webkit-scrollbar-thumb {
  background: var(--color-gold-light);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-gold);
}
