/**
 * Co.Lab 創思共享 - Base Styles
 * Modern Consultative Design v2.0.0
 */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

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

  /* Disable animations for accessibility */
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 374px) {
  html {
    font-size: 15px;
  }
}

@media (min-width: 1200px) {
  html {
    font-size: 17px;
  }
}

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

/* Animated gradient background overlay */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(213, 106, 62, 0.15), transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(217, 178, 95, 0.15), transparent 50%);
  animation: pulse 8s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

/* ===== Animation Keyframes ===== */

@keyframes pulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.6; }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-50px, 50px) scale(1.1); }
}

@keyframes glow {
  0%, 100% { box-shadow: var(--glow-orange); }
  50% { box-shadow: 0 0 60px rgba(213, 106, 62, 0.6); }
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading-en);
  font-weight: var(--font-black);
  line-height: var(--line-height-tight);
  color: var(--text-primary);
  margin-bottom: var(--space-4);
}

h1 {
  font-size: var(--font-h1);
  letter-spacing: var(--letter-spacing-tight);
  line-height: 1.1;
}

h2 {
  font-size: var(--font-h2);
  letter-spacing: var(--letter-spacing-normal);
  line-height: 1.2;
}

h3 {
  font-size: var(--font-h3);
  font-weight: var(--font-bold);
  line-height: var(--line-height-normal);
  letter-spacing: 0;
}

h4 {
  font-size: var(--font-h4);
  font-weight: var(--font-semibold);
  line-height: var(--line-height-normal);
}

p {
  margin-bottom: var(--space-4);
  line-height: var(--line-height-loose);
}

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

a:hover {
  color: var(--brick-orange);
}

ul, ol {
  list-style-position: inside;
}

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

/* ===== Container ===== */
.container {
  width: 100%;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 1;
}

@media (min-width: 375px) {
  .container {
    padding: 0 24px;
  }
}

@media (min-width: 768px) {
  .container {
    max-width: var(--container-md);
    padding: 0 32px;
  }
}

@media (min-width: 1024px) {
  .container {
    max-width: var(--container-lg);
    padding: 0 40px;
  }
}

@media (min-width: 1280px) {
  .container {
    max-width: var(--container-xl);
  }
}

@media (min-width: 1440px) {
  .container {
    max-width: var(--container-xxl);
    padding: 0 60px;
  }
}

/* ===== Sections ===== */
section {
  padding: 80px 32px;
  position: relative;
}

@media (min-width: 768px) {
  section {
    padding: 100px 32px;
  }
}

@media (min-width: 1024px) {
  section {
    padding: 120px 32px;
  }
}

.section-header {
  max-width: 800px;
  margin: 0 auto 80px;
  text-align: center;
}

.section-tag {
  display: inline-block;
  padding: 8px 20px;
  background: linear-gradient(135deg, var(--brick-orange), var(--deep-orange));
  border-radius: 20px;
  font-size: var(--font-tiny);
  font-weight: var(--font-bold);
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-wider);
  margin-bottom: 24px;
  color: var(--white);
}

.section-title {
  font-family: var(--font-heading-en);
  font-size: var(--font-h2);
  line-height: 1.2;
  font-weight: var(--font-black);
  margin-bottom: 24px;
  letter-spacing: var(--letter-spacing-normal);
}

.section-title .highlight {
  background: linear-gradient(135deg, var(--brick-orange), var(--champagne-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-description {
  font-size: var(--font-body-large);
  line-height: var(--line-height-loose);
  color: var(--light-gray);
}

/* Dark section variants */
.section-dark {
  background: var(--dark-charcoal);
}

.section-alt {
  background: var(--charcoal);
}

/* ===== Utility Classes ===== */
.text-center {
  text-align: center;
}

.text-muted {
  color: var(--text-secondary);
}

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

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

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--space-1); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-5 { margin-bottom: var(--space-5); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-5 { margin-top: var(--space-5); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }

/* ===== Responsive Utilities ===== */
@media (max-width: 767px) {
  .hide-mobile {
    display: none !important;
  }
}

@media (min-width: 768px) {
  .hide-desktop {
    display: none !important;
  }
}

/* ===== 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: 0;
}

/* ===== Focus Styles (Dark Mode) ===== */
*:focus {
  outline: 2px solid var(--brick-orange);
  outline-offset: 2px;
}

*:focus:not(:focus-visible) {
  outline: none;
}

*:focus-visible {
  outline: 2px solid var(--brick-orange);
  outline-offset: 2px;
}

/* ===== Selection (Dark Mode) ===== */
::selection {
  background: var(--brick-orange);
  color: var(--white);
}

::-moz-selection {
  background: var(--brick-orange);
  color: var(--white);
}
