/* ==========================================
   Healing / Apothecary Theme
   阿尔米奥锡安的医术师 — Healer of Armion Sion
   Sage greens, herb tones, soft golds, mortar-and-pestle motifs
   Clean medicinal aesthetic on light background
   ========================================== */

/* --- CSS Custom Properties --- */
:root {
  --bg: #fafaf7;
  --bg-cream: #f5f2ea;
  --bg-card: #ffffff;
  --bg-hero: linear-gradient(160deg, #eef4e8 0%, #f5f2ea 35%, #fafaf7 65%, #f0efe5 100%);
  --text: #3d3a30;
  --text-muted: #7a7568;
  --text-light: #b0aca0;
  --heading: #2d2a20;
  --accent: #7d9b5a;
  --accent-hover: #5e7a3e;
  --accent-light: #e4ede0;
  --accent-soft: #f2f7ee;
  --gold: #c9a96e;
  --gold-hover: #b8934f;
  --gold-light: #f5edd8;
  --gold-soft: #faf5eb;
  --border: #e6e2d6;
  --border-light: #f0ece3;
  --shadow-sm: 0 1px 3px rgba(61,58,48,0.05);
  --shadow: 0 2px 12px rgba(61,58,48,0.07);
  --shadow-lg: 0 8px 30px rgba(61,58,48,0.09);
  --shadow-card: 0 2px 8px rgba(61,58,48,0.04);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --font: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
  --max-width: 1100px;
  --nav-height: 64px;
  --transition: 0.25s ease;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

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

h1, h2, h3, h4 { color: var(--heading); line-height: 1.3; font-weight: 600; }
h1 { font-size: 2.4rem; margin-bottom: 1rem; }
h2 { font-size: 1.8rem; margin-bottom: 0.8rem; }
h3 { font-size: 1.3rem; margin-bottom: 0.5rem; }
p { margin-bottom: 1rem; }
ul, ol { padding-left: 1.5rem; margin-bottom: 1rem; }
li { margin-bottom: 0.4rem; }

/* --- Utility Classes --- */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1.5rem; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.pt-2 { padding-top: 2rem; }
.pt-3 { padding-top: 3rem; }
.pb-2 { padding-bottom: 2rem; }
.pb-3 { padding-bottom: 3rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.section-title { text-align: center; margin-bottom: 2.5rem; }
.section-subtitle { text-align: center; color: var(--text-muted); font-size: 1.05rem; margin-top: -1.5rem; margin-bottom: 2.5rem; }

/* --- Skip Link --- */
.skip-link {
  position: absolute; top: -100px; left: 1rem;
  background: var(--accent); color: #fff; padding: 0.5rem 1rem;
  border-radius: var(--radius-sm); z-index: 1000; font-weight: 600;
}
.skip-link:focus { top: 0.5rem; }

/* --- Header / Navigation --- */
header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(250,250,247,0.92);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  height: var(--nav-height);
}
header .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 100%; max-width: var(--max-width);
}
.logo {
  display: flex; align-items: center; gap: 0.6rem;
  font-size: 1.15rem; font-weight: 700; color: var(--heading);
  white-space: nowrap;
}
.logo .logo-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; color: #fff;
}
nav { display: flex; align-items: center; gap: 0.3rem; }
nav a {
  color: var(--text); padding: 0.5rem 1rem;
  border-radius: var(--radius-sm); font-size: 0.95rem;
  font-weight: 500; transition: all var(--transition);
}
nav a:hover, nav a.active { background: var(--accent-soft); color: var(--accent); }

.nav-cta {
  background: linear-gradient(135deg, var(--gold), #b8934f) !important;
  color: #fff !important;
  padding: 0.55rem 1.3rem !important;
  border-radius: 20px !important;
  font-weight: 600 !important;
  margin-left: 0.5rem;
  transition: all var(--transition) !important;
  box-shadow: 0 2px 10px rgba(201,169,110,0.35);
}
.nav-cta:hover {
  background: linear-gradient(135deg, var(--gold-hover), #a07d3d) !important;
  color: #fff !important;
  box-shadow: 0 4px 16px rgba(201,169,110,0.5);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none; background: none; border: none; cursor: pointer;
  padding: 0.4rem; font-size: 1.5rem; color: var(--text); line-height: 1;
}

/* --- Hero Section --- */
.hero {
  background: var(--bg-hero);
  padding: 5rem 0 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -30%;
  left: -20%;
  width: 140%;
  height: 160%;
  background:
    radial-gradient(ellipse at 25% 40%, rgba(125,155,90,0.06) 0%, transparent 55%),
    radial-gradient(ellipse at 75% 60%, rgba(201,169,110,0.08) 0%, transparent 55%),
    radial-gradient(ellipse at 50% 30%, rgba(150,180,120,0.05) 0%, transparent 60%);
  pointer-events: none;
}
/* Mortar and pestle decorative elements */
.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 6px;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--accent) 20%,
    var(--gold) 35%,
    transparent 50%,
    var(--gold) 65%,
    var(--accent) 80%,
    transparent 100%
  );
  opacity: 0.5;
}
.hero-content { position: relative; z-index: 1; }
.hero h1 {
  font-size: 2.8rem; margin-bottom: 1.2rem;
  background: linear-gradient(135deg, #5e7a3e 0%, #7d9b5a 40%, #c9a96e 70%, #b8934f 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero .subtitle {
  font-size: 1.15rem; color: var(--text-muted); max-width: 620px;
  margin: 0 auto 2rem; line-height: 1.8;
}
/* Hero Image */
.hero-img {
  max-width: 600px; margin: 2rem auto 0;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  height: auto;
}

/* --- CTA Button --- */
.btn {
  display: inline-block; padding: 0.8rem 2rem;
  font-size: 1.05rem; font-weight: 600; border-radius: 25px;
  transition: all var(--transition); cursor: pointer;
  border: none; text-align: center;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: #fff;
  box-shadow: 0 4px 16px rgba(125,155,90,0.35);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--accent-hover), #4a6a2e);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(125,155,90,0.5);
}
.btn-gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-hover));
  color: #fff;
  box-shadow: 0 4px 16px rgba(201,169,110,0.35);
}
.btn-gold:hover {
  background: linear-gradient(135deg, var(--gold-hover), #a07d3d);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(201,169,110,0.5);
}
.btn-secondary {
  background: var(--bg-card); color: var(--accent);
  border: 2px solid var(--accent-light);
  box-shadow: var(--shadow-sm);
}
.btn-secondary:hover {
  background: var(--accent-soft); color: var(--accent-hover);
  border-color: var(--accent);
}

/* --- Page Header (inner pages) --- */
.page-header {
  background: var(--bg-hero);
  padding: 3rem 0 2rem;
  text-align: center;
  position: relative;
}
.page-header::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; width: 100%; height: 4px;
  background: linear-gradient(90deg,
    transparent 0%, var(--accent) 25%, var(--gold) 50%, var(--accent) 75%, transparent 100%
  );
  opacity: 0.4;
}
.page-header h1 {
  font-size: 2.2rem;
  background: linear-gradient(135deg, #5e7a3e 0%, #7d9b5a 50%, #c9a96e 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.page-header p { color: var(--text-muted); font-size: 1.05rem; max-width: 600px; margin: 0 auto; }

/* Sub-page header image */
.page-header-img {
  max-width: 700px; width: 100%; height: auto;
  margin: 1.5rem auto 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* Guide section image */
.guide-img {
  max-width: 100%; height: auto;
  margin: 0 0 1rem 0;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}

/* Story section image */
.story-img {
  max-width: 100%; height: auto;
  margin: 0 0 1.5rem 0;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}

/* --- Sections --- */
section { padding: 4rem 0; }
section:nth-child(even) { background: var(--bg-cream); }

/* --- Info Cards Grid --- */
.info-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.2rem; margin-top: 2rem;
}
.info-card {
  background: var(--bg-card); border-radius: var(--radius);
  padding: 1.5rem; text-align: center;
  box-shadow: var(--shadow-card); border: 1px solid var(--border-light);
  transition: transform var(--transition), box-shadow var(--transition);
}
.info-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.info-card .icon { font-size: 2rem; margin-bottom: 0.6rem; }
.info-card h3 { font-size: 1.05rem; margin-bottom: 0.3rem; }
.info-card p { font-size: 0.92rem; color: var(--text-muted); margin-bottom: 0; }

/* --- Feature Cards --- */
.feature-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}
.feature-card {
  background: var(--bg-card); border-radius: var(--radius);
  padding: 2rem; box-shadow: var(--shadow-card);
  border: 1px solid var(--border-light);
  display: flex; gap: 1rem; align-items: flex-start;
}
.feature-card .feature-icon {
  font-size: 2rem; flex-shrink: 0;
  width: 50px; height: 50px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-soft); border-radius: var(--radius-sm);
}
.feature-card h3 { font-size: 1.15rem; margin-bottom: 0.4rem; }
.feature-card p { font-size: 0.95rem; color: var(--text-muted); margin-bottom: 0; }

/* --- Story Content --- */
.story-block {
  background: var(--bg-card); border-radius: var(--radius);
  padding: 2rem; margin-bottom: 2rem;
  box-shadow: var(--shadow-card);
  border-left: 4px solid var(--accent);
}
.story-block h3 { color: var(--accent); margin-bottom: 0.5rem; }
.story-block p:last-child { margin-bottom: 0; }

.story-quote {
  background: var(--gold-soft);
  border-radius: var(--radius);
  padding: 2rem 2.5rem; text-align: center;
  font-size: 1.1rem; color: var(--heading); font-style: italic;
  margin: 2rem 0;
  border: 1px solid var(--gold-light);
  border-left: 4px solid var(--gold);
}

/* --- Character Cards --- */
.char-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}
.char-card {
  background: var(--bg-card); border-radius: var(--radius);
  padding: 2rem; text-align: center;
  box-shadow: var(--shadow-card); border: 1px solid var(--border-light);
  transition: transform var(--transition), box-shadow var(--transition);
}
.char-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.char-avatar {
  width: 100px; height: 100px; border-radius: 50%;
  margin: 0 auto 1rem;
  background: linear-gradient(135deg, var(--accent-soft), var(--gold-light));
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem; overflow: hidden;
  border: 3px solid var(--accent-light);
}
.char-card h3 { font-size: 1.2rem; margin-bottom: 0.3rem; }
.char-card .char-role { color: var(--accent); font-size: 0.9rem; font-weight: 600; margin-bottom: 0.8rem; }
.char-card p { font-size: 0.93rem; color: var(--text-muted); margin-bottom: 0; }

.char-traits {
  display: flex; flex-wrap: wrap; gap: 0.4rem; justify-content: center;
  margin-top: 0.8rem;
}
.char-trait {
  background: var(--accent-soft); color: var(--accent);
  padding: 0.25rem 0.7rem; border-radius: 15px;
  font-size: 0.8rem; font-weight: 600;
}

/* --- Guide Steps --- */
.guide-steps { counter-reset: step; max-width: 800px; margin: 0 auto; }
.guide-step {
  background: var(--bg-card); border-radius: var(--radius);
  padding: 2rem 2rem 2rem 5rem; position: relative;
  margin-bottom: 1.5rem; box-shadow: var(--shadow-card);
  border: 1px solid var(--border-light);
  counter-increment: step;
}
.guide-step::before {
  content: counter(step);
  position: absolute; left: 1.5rem; top: 1.8rem;
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1.1rem;
}
.guide-step h3 { margin-bottom: 0.5rem; }
.guide-step p:last-child { margin-bottom: 0; }
.guide-tip {
  background: var(--gold-soft); border-radius: var(--radius-sm);
  padding: 0.7rem 1rem; margin-top: 0.8rem;
  font-size: 0.9rem; color: var(--gold-hover);
  border-left: 3px solid var(--gold);
}

/* --- FAQ Accordion --- */
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item {
  background: var(--bg-card); border-radius: var(--radius);
  margin-bottom: 0.8rem; box-shadow: var(--shadow-card);
  border: 1px solid var(--border-light);
  overflow: hidden;
}
.faq-question {
  width: 100%; text-align: left; padding: 1.2rem 1.5rem;
  background: none; border: none; cursor: pointer;
  font-size: 1.05rem; font-weight: 600; color: var(--heading);
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font); transition: background var(--transition);
}
.faq-question:hover { background: var(--accent-soft); }
.faq-question .arrow {
  font-size: 0.8rem; transition: transform var(--transition);
  color: var(--accent); flex-shrink: 0; margin-left: 1rem;
}
.faq-question.active .arrow { transform: rotate(180deg); }
.faq-answer {
  max-height: 0; overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
  padding: 0 1.5rem;
}
.faq-answer.open {
  max-height: 500px;
  padding: 0 1.5rem 1.2rem;
}
.faq-answer p { font-size: 0.95rem; color: var(--text-muted); margin-bottom: 0; }

/* --- Screenshot Gallery --- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}
.gallery-item {
  border-radius: var(--radius); overflow: hidden;
  cursor: pointer; box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
  aspect-ratio: 16/9;
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.gallery-item:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow);
}
.gallery-item .gallery-placeholder {
  font-size: 2.5rem;
  opacity: 0.6;
}

/* --- Lightbox --- */
.lightbox {
  display: none; position: fixed; top: 0; left: 0;
  width: 100%; height: 100%; background: rgba(30,25,20,0.92);
  z-index: 9999; justify-content: center; align-items: center;
  cursor: pointer;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 90%; max-height: 85vh; border-radius: var(--radius); }
.lightbox-close {
  position: absolute; top: 1.5rem; right: 2rem;
  font-size: 2.5rem; color: #fff; cursor: pointer;
  opacity: 0.8; transition: opacity var(--transition);
}
.lightbox-close:hover { opacity: 1; }

/* --- Tags --- */
.tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.5rem; }
.tag {
  background: var(--accent-soft); color: var(--accent);
  padding: 0.3rem 0.8rem; border-radius: 15px;
  font-size: 0.85rem; font-weight: 500;
}
.tag-gold {
  background: var(--gold-soft); color: var(--gold-hover);
  padding: 0.3rem 0.8rem; border-radius: 15px;
  font-size: 0.85rem; font-weight: 500;
}

/* --- Breadcrumbs --- */
.breadcrumbs {
  padding: 0.8rem 0; font-size: 0.9rem; color: var(--text-muted);
}
.breadcrumbs a { color: var(--accent); }
.breadcrumbs span { color: var(--text-light); }

/* --- CTA Banner --- */
.cta-banner {
  background: var(--bg-hero); border-radius: var(--radius-lg);
  padding: 3rem 2rem; text-align: center;
  margin: 2rem 0;
  border: 1px solid var(--accent-light);
  position: relative;
  overflow: hidden;
}
.cta-banner::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--gold), var(--accent));
  opacity: 0.6;
}
.cta-banner h2 { margin-bottom: 0.6rem; }
.cta-banner p { color: var(--text-muted); max-width: 500px; margin: 0 auto 1.5rem; }

/* --- Herb Divider --- */
.herb-divider {
  text-align: center; padding: 1rem 0; font-size: 1.5rem;
  color: var(--accent); opacity: 0.5;
  letter-spacing: 0.5rem;
}

/* --- Stats Row --- */
.stats-row {
  display: flex; flex-wrap: wrap; gap: 2rem; justify-content: center;
  margin: 2rem 0;
}
.stat-item {
  text-align: center; min-width: 100px;
}
.stat-value {
  font-size: 2rem; font-weight: 700;
  background: linear-gradient(135deg, var(--accent), var(--gold));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-label { font-size: 0.9rem; color: var(--text-muted); }

/* --- Footer --- */
footer {
  background: var(--bg-cream); border-top: 1px solid var(--border-light);
  padding: 2rem 0; text-align: center;
}
footer p { color: var(--text-light); font-size: 0.88rem; margin-bottom: 0; }

/* --- Responsive --- */
@media (max-width: 768px) {
  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.4rem; }
  .hero { padding: 3rem 0 2rem; }
  .hero h1 { font-size: 2rem; }
  .hero .subtitle { font-size: 1rem; }
  .menu-toggle { display: block; }
  nav {
    display: none; position: absolute; top: var(--nav-height);
    left: 0; width: 100%; background: rgba(250,250,247,0.98);
    backdrop-filter: blur(12px); flex-direction: column;
    padding: 1rem 1.5rem; gap: 0.3rem;
    border-bottom: 1px solid var(--border-light);
    box-shadow: var(--shadow);
  }
  nav.open { display: flex; }
  nav a { width: 100%; padding: 0.7rem 1rem; }
  .nav-cta { margin-left: 0; text-align: center; }
  .feature-grid { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr; }
  .info-grid { grid-template-columns: repeat(2, 1fr); }
  .char-grid { grid-template-columns: 1fr; }
  .guide-step { padding: 1.5rem 1.5rem 1.5rem 4rem; }
  .guide-step::before { left: 1rem; top: 1.3rem; width: 34px; height: 34px; font-size: 1rem; }
}
@media (max-width: 480px) {
  .info-grid { grid-template-columns: 1fr; }
}
