/* ============================================
   异常咖啡机 - Coffee Shop Noir Theme
   Rich espresso browns, cream whites, steam motif accents
   Surreal coffee-machine aesthetics
   ============================================ */

:root {
  /* Core palette */
  --bg: #faf6ee;
  --bg-alt: #f0e8d6;
  --bg-steam: #f7f0e0;
  --text: #3c2415;
  --text-light: #5c3a21;
  --text-muted: #7a5c44;
  --primary: #4a2c1a;
  --primary-hover: #6f4e37;
  --primary-light: #8b7355;
  --accent: #b8956a;
  --accent-light: #d4b896;
  --accent-gold: #c9a84c;
  --card-bg: #fffcf5;
  --card-border: #e8dcc8;
  --card-shadow: rgba(60, 36, 21, 0.08);
  --nav-bg: #2c1a0e;
  --nav-text: #f5ede0;
  --nav-hover: #c9a84c;
  --border: #ddd0bb;
  --divider: #e5d8c0;
  --tag-bg: #ede0cc;
  --tag-text: #5c3a21;
  --hero-overlay: rgba(20, 10, 5, 0.55);
  --steam-color: rgba(180, 150, 110, 0.4);
  --max-width: 1100px;
  --radius: 8px;
  --radius-lg: 14px;
  --transition: 0.25s ease;
  --font-main: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', sans-serif;
  --font-display: 'Noto Serif SC', 'STSong', 'SimSun', serif;
}

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

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

body {
  font-family: var(--font-main);
  color: var(--text);
  background: var(--bg);
  line-height: 1.75;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

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

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

/* ===== NAVIGATION ===== */
.site-nav {
  background: var(--nav-bg);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--nav-text);
  letter-spacing: 0.04em;
}

.nav-logo:hover {
  color: var(--accent-gold);
}

.nav-logo .coffee-icon {
  font-size: 1.5rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}

.nav-links a {
  color: var(--nav-text);
  padding: 0.5rem 0.9rem;
  border-radius: 4px;
  font-size: 0.95rem;
  transition: background var(--transition), color var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  background: rgba(201, 168, 76, 0.18);
  color: var(--accent-gold);
}

.nav-cta {
  background: var(--accent-gold) !important;
  color: #1a0a00 !important;
  font-weight: 700 !important;
  padding: 0.5rem 1.2rem !important;
  border-radius: 6px !important;
  transition: background var(--transition), transform var(--transition) !important;
}

.nav-cta:hover {
  background: #d4b55c !important;
  color: #1a0a00 !important;
  transform: translateY(-1px);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 101;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--nav-text);
  border-radius: 1px;
  transition: var(--transition);
}

/* ===== HERO ===== */
.hero {
  position: relative;
  background: linear-gradient(135deg, #2c1a0e 0%, #4a2c1a 40%, #3c2415 100%);
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(ellipse at 30% 80%, rgba(201, 168, 76, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 20%, rgba(180, 150, 110, 0.08) 0%, transparent 50%);
  z-index: 1;
}

/* Steam effect overlay */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(ellipse at 20% 100%, rgba(245, 237, 224, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 90%, rgba(245, 237, 224, 0.04) 0%, transparent 40%);
  z-index: 2;
  pointer-events: none;
  animation: steamDrift 12s ease-in-out infinite alternate;
}

@keyframes steamDrift {
  0% { opacity: 0.6; transform: translateY(0); }
  50% { opacity: 0.9; transform: translateY(-4px); }
  100% { opacity: 0.6; transform: translateY(0); }
}

.hero-content {
  position: relative;
  z-index: 3;
  max-width: 800px;
  padding: 3rem 2rem;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: 2.8rem;
  font-weight: 800;
  color: #f5ede0;
  margin-bottom: 0.6rem;
  letter-spacing: 0.06em;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.hero .subtitle {
  font-size: 1.15rem;
  color: var(--accent-light);
  margin-bottom: 1rem;
  font-weight: 400;
}

.hero .tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.hero .tags span {
  background: rgba(255,255,255,0.12);
  color: #e8d8c0;
  padding: 0.3rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,0.1);
}

/* Hero image on index */
.hero-image {
  position: relative;
  z-index: 3;
  text-align: center;
}

.hero-image img {
  max-width: 90%;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 40px rgba(0,0,0,0.35);
  border: 3px solid rgba(201, 168, 76, 0.25);
}

/* ===== PAGE HEADER (non-index) ===== */
.page-header {
  background: linear-gradient(135deg, #3c2415 0%, #4a2c1a 60%, #2c1a0e 100%);
  padding: 3.5rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent-gold), transparent);
}

.page-header h1 {
  font-family: var(--font-display);
  font-size: 2.4rem;
  color: #f5ede0;
  margin-bottom: 0.5rem;
}

.page-header p {
  color: var(--accent-light);
  font-size: 1.05rem;
}

/* ===== MAIN CONTENT ===== */
main {
  flex: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 1.5rem;
  width: 100%;
}

/* ===== SECTIONS ===== */
.section {
  margin-bottom: 3.5rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--primary);
  margin-bottom: 1.5rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--divider);
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 60px;
  height: 2px;
  background: var(--accent-gold);
}

/* ===== FEATURE CARDS ===== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 1.8rem 1.5rem;
  transition: box-shadow var(--transition), transform var(--transition);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-gold), var(--accent));
  opacity: 0;
  transition: opacity var(--transition);
}

.feature-card:hover {
  box-shadow: 0 6px 24px var(--card-shadow);
  transform: translateY(-3px);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-card .icon {
  font-size: 2rem;
  margin-bottom: 0.8rem;
}

.feature-card h3 {
  font-size: 1.15rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ===== SCREENSHOT GALLERY ===== */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.2rem;
}

.gallery-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--card-border);
  transition: transform var(--transition), box-shadow var(--transition);
}

.gallery-item:hover {
  transform: scale(1.03);
  box-shadow: 0 8px 28px var(--card-shadow);
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}

.gallery-item .caption {
  padding: 0.5rem 0.8rem;
  background: var(--card-bg);
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ===== CONTENT CARDS / ARTICLES ===== */
.content-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 1.5rem;
}

.content-card h2 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--primary);
  margin-bottom: 1rem;
}

.content-card p {
  color: var(--text-light);
  margin-bottom: 1rem;
  line-height: 1.85;
}

/* ===== STATS BAR ===== */
.stats-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
  padding: 2rem;
  background: linear-gradient(135deg, #3c2415, #4a2c1a);
  border-radius: var(--radius-lg);
  margin-bottom: 2.5rem;
}

.stat-item {
  text-align: center;
  min-width: 120px;
}

.stat-number {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-gold);
}

.stat-label {
  font-size: 0.85rem;
  color: #c4b090;
  margin-top: 0.25rem;
}

/* ===== QUOTE BLOCK ===== */
.quote-block {
  background: linear-gradient(135deg, var(--bg-alt), var(--card-bg));
  border-left: 4px solid var(--accent-gold);
  padding: 1.5rem 2rem;
  margin: 2rem 0;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-family: var(--font-display);
  font-style: italic;
  color: var(--text-light);
  font-size: 1.1rem;
}

/* ===== FAQ ACCORDION ===== */
.faq-list {
  max-width: 800px;
}

.faq-item {
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  margin-bottom: 0.8rem;
  overflow: hidden;
  background: var(--card-bg);
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 1.1rem 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary);
  font-family: var(--font-main);
  transition: background var(--transition);
}

.faq-question:hover {
  background: var(--bg-alt);
}

.faq-question .arrow {
  font-size: 0.8rem;
  transition: transform var(--transition);
  color: var(--accent);
}

.faq-item.open .faq-question .arrow {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
}

.faq-item.open .faq-answer {
  max-height: 800px;
}

.faq-answer-inner {
  padding: 0 1.5rem 1.2rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.8;
}

/* ===== CTA SECTION ===== */
.cta-section {
  text-align: center;
  padding: 3rem 2rem;
  background: linear-gradient(135deg, var(--bg-alt), var(--card-bg));
  border-radius: var(--radius-lg);
  border: 2px dashed var(--accent-light);
  margin: 2.5rem 0;
}

.cta-section h2 {
  font-family: var(--font-display);
  color: var(--primary);
  margin-bottom: 0.8rem;
}

.cta-section p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.btn-primary {
  display: inline-block;
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: #f5ede0;
  font-weight: 700;
  padding: 0.85rem 2.5rem;
  border-radius: 30px;
  font-size: 1.05rem;
  transition: transform var(--transition), box-shadow var(--transition);
  border: none;
  cursor: pointer;
  letter-spacing: 0.03em;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(74, 44, 26, 0.3);
  color: #f5ede0;
}

/* ===== PAGE LIST ===== */
.page-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.page-list li a {
  display: inline-block;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  padding: 0.6rem 1.3rem;
  border-radius: 24px;
  font-size: 0.95rem;
  transition: all var(--transition);
}

.page-list li a:hover {
  background: var(--primary);
  color: #f5ede0;
  border-color: var(--primary);
}

/* ===== CHARACTER GRID ===== */
.char-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.char-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
}

.char-card:hover {
  box-shadow: 0 6px 24px var(--card-shadow);
  transform: translateY(-3px);
}

.char-card .char-img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  background: linear-gradient(135deg, #e8dcc8, #d4c5a9);
}

.char-card .char-info {
  padding: 1.3rem;
}

.char-card .char-info h3 {
  font-family: var(--font-display);
  color: var(--primary);
  margin-bottom: 0.4rem;
}

.char-card .char-info .role {
  color: var(--accent-gold);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
}

.char-card .char-info p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

/* ===== STEP / GUIDE LIST ===== */
.step-list {
  list-style: none;
  counter-reset: step;
}

.step-list li {
  counter-increment: step;
  position: relative;
  padding-left: 3rem;
  margin-bottom: 1.8rem;
}

.step-list li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 2rem;
  height: 2rem;
  background: var(--primary);
  color: #f5ede0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
}

.step-list li h3 {
  color: var(--primary);
  margin-bottom: 0.3rem;
}

.step-list li p {
  color: var(--text-muted);
  line-height: 1.7;
}

/* ===== STORY TIMELINE ===== */
.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent-gold), var(--accent));
}

.timeline-item {
  position: relative;
  padding-bottom: 2rem;
  padding-left: 1.5rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -2.35rem;
  top: 0.4rem;
  width: 12px;
  height: 12px;
  background: var(--accent-gold);
  border-radius: 50%;
  border: 2px solid var(--bg);
}

.timeline-item h3 {
  color: var(--primary);
  margin-bottom: 0.3rem;
}

.timeline-item p {
  color: var(--text-muted);
  line-height: 1.7;
}

/* ===== BREADCRUMB ===== */
.breadcrumb {
  padding: 0.8rem 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

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

.breadcrumb a:hover {
  color: var(--accent-gold);
}

.breadcrumb span {
  margin: 0 0.4rem;
}

/* ===== FOOTER ===== */
.site-footer {
  background: var(--nav-bg);
  color: #8a7a65;
  text-align: center;
  padding: 2rem 1.5rem;
  font-size: 0.85rem;
  margin-top: auto;
}

.site-footer p {
  margin: 0.25rem 0;
}

/* Steam motif devider in footer */
.site-footer .steam-divider {
  display: block;
  margin: 0.6rem auto;
  color: rgba(255,255,255,0.08);
  font-size: 0.7rem;
  letter-spacing: 0.5em;
}

/* ===== LIGHTBOX ===== */
.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 5, 2, 0.92);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.lightbox-overlay.active {
  display: flex;
}

.lightbox-overlay img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: var(--radius);
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
  border: 2px solid rgba(201,168,76,0.2);
}

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 2rem;
  font-size: 2rem;
  color: #f5ede0;
  cursor: pointer;
  z-index: 1001;
}

/* ===== UTILITY CLASSES ===== */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }
.pt-1 { padding-top: 1rem; }
.pt-2 { padding-top: 2rem; }
.pb-1 { padding-bottom: 1rem; }
.mx-auto { max-width: 800px; margin-left: auto; margin-right: auto; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  html { font-size: 15px; }

  .hamburger {
    display: flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--nav-bg);
    flex-direction: column;
    padding: 1rem;
    gap: 0;
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links a {
    padding: 0.8rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }

  .hero h1 { font-size: 2rem; }
  .page-header h1 { font-size: 1.8rem; }
  .section-title { font-size: 1.5rem; }
  .features-grid { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr 1fr; }
  .char-grid { grid-template-columns: 1fr 1fr; }
  .stats-bar { gap: 1rem; }
  .stat-number { font-size: 1.5rem; }
}

@media (max-width: 480px) {
  html { font-size: 14px; }
  .hero h1 { font-size: 1.6rem; }
  .gallery { grid-template-columns: 1fr; }
  .char-grid { grid-template-columns: 1fr; }
  .hero { min-height: 300px; }
  .nav-inner { padding: 0 1rem; }
  main { padding: 2rem 1rem; }
}

/* ===== SCHEMA.ORG ===== */
/* Hidden, for SEO only */
.schema-hidden {
  display: none;
}
