/* ============================================
   Chronos Sentinel - Main Stylesheet
   考古學極簡主義設計
   ============================================ */

:root {
  /* Color Palette */
  --basalt: #2F2F2F;
  --gold: #C5A059;
  --papyrus: #F2E8D5;
  --terracotta: #8B4513;
  --card-dark: #3A3A3A;
  --border-color: rgba(197, 160, 89, 0.2);
  --text-muted: #B8B8B8;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--basalt);
  color: var(--papyrus);
  font-family: 'Georgia', serif;
  line-height: 1.6;
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Georgia', serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

h1 {
  font-size: 3.5rem;
  line-height: 1.1;
}

h2 {
  font-size: 2.5rem;
  line-height: 1.2;
}

h3 {
  font-size: 1.75rem;
}

h4 {
  font-size: 1.5rem;
}

p {
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 1rem;
}

a {
  color: var(--gold);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #D4AF7A;
}

/* Navigation */
nav {
  background: linear-gradient(180deg, var(--basalt) 0%, var(--card-dark) 100%);
  border-bottom: 1px solid var(--border-color);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar {
  padding: 1rem 0;
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--papyrus) !important;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.navbar-brand-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--gold), var(--terracotta));
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.nav-link {
  color: var(--papyrus) !important;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.3s ease;
  margin: 0 0.5rem;
}

.nav-link:hover {
  color: var(--gold) !important;
}

/* Buttons */
.btn {
  font-family: 'Georgia', serif;
  font-weight: 600;
  letter-spacing: 0.05em;
  border-radius: 4px;
  transition: all 0.3s ease;
  border: none;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
}

.btn-primary {
  background-color: var(--gold);
  color: var(--basalt);
  border: 2px solid var(--gold);
}

.btn-primary:hover {
  background-color: #D4AF7A;
  border-color: #D4AF7A;
  color: var(--basalt);
}

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

.btn-outline:hover {
  background-color: rgba(197, 160, 89, 0.1);
  color: var(--gold);
}

/* Kintsugi Border Effect */
.kintsugi-border {
  position: relative;
  border: 2px solid transparent;
  background-image: linear-gradient(var(--basalt), var(--basalt)), 
                    linear-gradient(135deg, var(--gold), #D4AF7A, var(--gold));
  background-origin: border-box;
  background-clip: padding-box, border-box;
  transition: all 0.3s ease;
}

.kintsugi-border:hover {
  box-shadow: 0 0 20px rgba(197, 160, 89, 0.3), 
              inset 0 0 20px rgba(197, 160, 89, 0.1);
}

/* Hero Section */
.hero {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(135deg, var(--basalt) 0%, var(--card-dark) 100%);
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  z-index: 1;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, rgba(47, 47, 47, 0.8), transparent, rgba(47, 47, 47, 0.8));
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  text-align: center;
  max-width: 800px;
  animation: fadeInUp 1s ease-out;
}

.hero-title {
  font-size: 4rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--papyrus);
}

.hero-subtitle {
  font-size: 1.5rem;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.hero-tagline {
  font-size: 1.2rem;
  color: rgba(242, 232, 213, 0.8);
  margin-bottom: 2rem;
  font-style: italic;
}

/* Scan Line Animation */
.scan-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 2px;
  height: 100%;
  background: linear-gradient(to right, transparent, rgba(74, 222, 128, 0.8), transparent);
  box-shadow: 0 0 20px rgba(74, 222, 128, 0.5);
  animation: scan 3s linear infinite;
  z-index: 4;
}

@keyframes scan {
  0% { left: 0; }
  100% { left: 100%; }
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  animation: bounce 2s infinite;
}

.scroll-indicator svg {
  width: 32px;
  height: 32px;
  color: var(--gold);
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-10px); }
}

/* Heritage Section */
.heritage-section {
  position: relative;
  background: linear-gradient(135deg, var(--basalt) 0%, var(--card-dark) 100%);
  overflow: hidden;
}

.heritage-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(197, 160, 89, 0.03) 2px, rgba(197, 160, 89, 0.03) 4px),
    repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(197, 160, 89, 0.03) 2px, rgba(197, 160, 89, 0.03) 4px);
  pointer-events: none;
}

.heritage-content {
  position: relative;
  z-index: 1;
}

/* Card Styles */
.card {
  background-color: rgba(58, 58, 58, 0.5);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.card:hover {
  background-color: rgba(58, 58, 58, 0.8);
  border-color: rgba(197, 160, 89, 0.6);
  box-shadow: 0 0 20px rgba(197, 160, 89, 0.2);
}

.card-body {
  padding: 2rem;
}

.card-title {
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 1rem;
}

.card-text {
  color: rgba(242, 232, 213, 0.8);
  line-height: 1.8;
}

/* Icon Styles */
.icon-box {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--gold), var(--terracotta));
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin-bottom: 1rem;
  transition: all 0.3s ease;
}

.card:hover .icon-box {
  box-shadow: 0 0 20px rgba(197, 160, 89, 0.5);
  transform: translateY(-5px);
}

/* Section Spacing */
section {
  padding: 5rem 0;
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
  font-size: 2.5rem;
  color: var(--papyrus);
}

.section-subtitle {
  text-align: center;
  color: var(--gold);
  font-size: 1.2rem;
  margin-top: -1.5rem;
  margin-bottom: 2rem;
}

/* Form Styles */
.form-control {
  background-color: var(--basalt);
  border: 1px solid var(--border-color);
  color: var(--papyrus);
  border-radius: 4px;
  padding: 0.75rem 1rem;
  transition: all 0.3s ease;
}

.form-control:focus {
  background-color: var(--basalt);
  border-color: var(--gold);
  color: var(--papyrus);
  box-shadow: 0 0 10px rgba(197, 160, 89, 0.3);
}

.form-control::placeholder {
  color: rgba(242, 232, 213, 0.5);
}

.form-label {
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

/* Badge Styles */
.badge {
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.85rem;
}

.badge-stable {
  background-color: rgba(34, 197, 94, 0.2);
  color: #22C55E;
}

.badge-excavating {
  background-color: rgba(59, 130, 246, 0.2);
  color: #3B82F6;
}

.badge-reinforcing {
  background-color: rgba(234, 179, 8, 0.2);
  color: #EAB308;
}

/* Footer */
footer {
  background-color: var(--basalt);
  border-top: 1px solid var(--border-color);
  padding: 3rem 0;
  color: rgba(242, 232, 213, 0.7);
}

footer h5 {
  color: var(--gold);
  margin-bottom: 1rem;
}

footer a {
  color: rgba(242, 232, 213, 0.7);
}

footer a:hover {
  color: var(--gold);
}

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

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

.fade-in-up {
  animation: fadeInUp 0.8s ease-out;
}

.slide-in-left {
  animation: slideInLeft 0.8s ease-out;
}

.slide-in-right {
  animation: slideInRight 0.8s ease-out;
}

/* Responsive Design */
@media (max-width: 768px) {
  h1 {
    font-size: 2.5rem;
  }

  h2 {
    font-size: 1.75rem;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .hero-subtitle {
    font-size: 1.2rem;
  }

  .section-title {
    font-size: 1.75rem;
  }

  section {
    padding: 3rem 0;
  }

  .card-body {
    padding: 1.5rem;
  }
}

@media (max-width: 576px) {
  h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.3rem;
  }

  .hero-title {
    font-size: 1.75rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  p {
    font-size: 0.95rem;
  }

  section {
    padding: 2rem 0;
  }
}

/* Utility Classes */
.text-gold {
  color: var(--gold);
}

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

.bg-basalt {
  background-color: var(--basalt);
}

.bg-card-dark {
  background-color: var(--card-dark);
}

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

.mt-section {
  margin-top: 3rem;
}

.mb-section {
  margin-bottom: 3rem;
}

/* Loading Animation */
.spinner {
  border: 4px solid rgba(197, 160, 89, 0.2);
  border-top: 4px solid var(--gold);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
