/* ========================================
   LibreMorph / 中版国际 — Design System
   ======================================== */

/* ---------- Google Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display&family=Noto+Sans+SC:wght@400;500&family=Noto+Serif+SC:wght@200;400;500&display=swap');

/* ---------- CSS Variables ---------- */
:root {
  --bg-primary:    #F7F4EF;
  --bg-secondary:  #F0EDE7;
  --bg-card:       #FFFFFF;
  --bg-dark:       #1C1C1A;
  --bg-dark-card:  #2A2A28;
  --text-primary:  #1C1C1A;
  --text-secondary:#5C5A56;
  --text-light:    #9C9A96;
  --text-inverse:  #F7F4EF;
  --text-inverse-dim: rgba(247,244,239,0.60);
  --accent:        #2D5A3D;
  --accent-hover:  #234830;
  --accent-light:  #EAF2ED;
  --accent-text:   #1A4028;
  --border:        #E0DDD8;
  --border-light:  #EEEAE4;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Noto Sans SC", sans-serif;
  font-size: 16px;
  line-height: 1.9;
  color: var(--text-primary);
  background: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: inherit;
  text-decoration: none;
}

/* ---------- Layout ---------- */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 40px;
}

.section {
  padding: 96px 0;
}

.section-sm {
  padding: 64px 0;
}

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

.section-secondary {
  background: var(--bg-secondary);
}

@media (max-width: 768px) {
  .container {
    padding: 0 20px;
  }
  .section {
    padding: 64px 0;
  }
}

/* ---------- Card ---------- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  padding: 36px;
  box-shadow: 0 2px 16px rgba(28,28,26,0.05);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.card:hover {
  box-shadow: 0 6px 28px rgba(28,28,26,0.10);
  transform: translateY(-2px);
}

.card-dark {
  background: var(--bg-dark-card);
  border-color: rgba(247,244,239,0.08);
}

/* ---------- Tag ---------- */
.tag {
  display: inline-block;
  background: var(--accent-light);
  color: var(--accent-text);
  font-size: 12px;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: 100px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.tag-dark {
  background: rgba(45,90,61,0.25);
  color: rgba(234,242,237,0.90);
}

.tag-orange {
  background: #FFF0E6;
  color: #A0522D;
}

/* ---------- Button ---------- */
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  font-family: inherit;
  border: none;
  line-height: 1.5;
}

.btn-primary {
  background: var(--accent);
  color: var(--text-inverse);
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-ghost {
  border: 1px solid var(--border);
  color: var(--text-primary);
  background: transparent;
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-ghost-light {
  border: 1px solid rgba(247,244,239,0.30);
  color: var(--text-inverse);
  background: transparent;
}

.btn-ghost-light:hover {
  border-color: var(--text-inverse);
}

/* ---------- Navigation ---------- */
nav {
  position: sticky;
  top: 0;
  background: rgba(247,244,239,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  z-index: 100;
  height: 60px;
}

.nav-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 40px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: "Noto Serif SC", serif;
  font-size: 18px;
  font-weight: 400;
  color: var(--text-primary);
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
}

.nav-links a {
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: none;
  margin-left: 32px;
  letter-spacing: 0.04em;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--text-primary);
}

/* ---------- Hamburger Menu ---------- */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}

.nav-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile nav overlay */
.nav-mobile {
  display: none;
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(247,244,239,0.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 99;
  flex-direction: column;
  padding: 32px 40px;
  gap: 8px;
}

.nav-mobile.open {
  display: flex;
}

.nav-mobile a {
  font-size: 17px;
  color: var(--text-primary);
  padding: 14px 0;
  border-bottom: 1px solid var(--border-light);
  letter-spacing: 0.04em;
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  .nav-toggle {
    display: flex;
  }
}

/* ---------- FAQ Accordion ---------- */
.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 24px 0;
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  user-select: none;
}

.faq-question::after {
  content: '+';
  font-size: 22px;
  font-weight: 300;
  color: var(--text-light);
  transition: transform 0.25s;
}

.faq-item.open .faq-question::after {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.25s ease;
  font-size: 15px;
  line-height: 1.9;
  color: var(--text-secondary);
}

.faq-item.open .faq-answer {
  max-height: 600px;
  padding-top: 16px;
}

/* ---------- Video ---------- */
.video-wrapper {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg-dark-card);
}

.video-wrapper iframe,
.video-wrapper video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.video-placeholder {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%,-50%);
  text-align: center;
  color: rgba(247,244,239,0.40);
}

/* ---------- Gallery ---------- */
.gallery {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-snap-type: x mandatory;
}

.gallery-item {
  flex: 0 0 280px;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  scroll-snap-align: start;
}

.gallery-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.3s;
}

.gallery-item:hover img {
  transform: scale(1.03);
}

/* ---------- Scene Card (Sonos-style) ---------- */
.scene-card {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 48px;
  align-items: center;
  padding: 48px 0;
  border-bottom: 1px solid var(--border-light);
}

.scene-stat {
  background: var(--bg-secondary);
  border-radius: 14px;
  padding: 32px;
  text-align: center;
}

.scene-stat .number {
  font-family: "DM Serif Display", serif;
  font-size: 52px;
  font-weight: 400;
  color: var(--accent);
  line-height: 1;
}

.scene-stat .label {
  font-size: 13px;
  color: var(--text-light);
  margin-top: 8px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

@media (max-width: 768px) {
  .scene-card {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

/* ---------- Form ---------- */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-card);
  font-size: 15px;
  color: var(--text-primary);
  transition: border-color 0.2s;
  box-sizing: border-box;
  font-family: inherit;
}

.form-input:focus {
  outline: none;
  border-color: var(--accent);
}

textarea.form-input {
  resize: vertical;
  min-height: 100px;
}

.form-radio-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.form-radio {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 15px;
}

.form-radio input[type="radio"] {
  accent-color: var(--accent);
}

.form-success {
  display: none;
  padding: 16px;
  background: var(--accent-light);
  color: var(--accent-text);
  border-radius: 8px;
  text-align: center;
}

.form-success.show {
  display: block;
}

/* ---------- Float Button ---------- */
.float-btn {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--text-inverse);
  border: none;
  cursor: pointer;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(45,90,61,0.35);
  transition: transform 0.2s;
  font-size: 24px;
}

.float-btn:hover {
  transform: scale(1.08);
}

/* ---------- Modal ---------- */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(28,28,26,0.60);
  z-index: 300;
  align-items: center;
  justify-content: center;
}

.modal-overlay.open {
  display: flex;
}

.modal {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 40px;
  max-width: 480px;
  width: 90%;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: var(--text-light);
  line-height: 1;
}

/* ---------- Footer ---------- */
footer {
  background: var(--bg-dark);
  color: var(--text-inverse);
  padding: 64px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand {
  font-family: "Noto Serif SC", serif;
  font-size: 18px;
  margin-bottom: 12px;
}

.footer-desc {
  font-size: 14px;
  color: var(--text-inverse-dim);
  line-height: 1.8;
}

.footer-label {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-inverse-dim);
  margin-bottom: 16px;
}

.footer-nav a {
  display: block;
  font-size: 14px;
  color: var(--text-inverse-dim);
  text-decoration: none;
  margin-bottom: 10px;
  transition: color 0.2s;
}

.footer-nav a:hover {
  color: var(--text-inverse);
}

.footer-bottom {
  border-top: 1px solid rgba(247,244,239,0.10);
  padding-top: 24px;
  font-size: 13px;
  color: var(--text-inverse-dim);
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

/* ---------- Typography Helpers ---------- */
h1, h2, h3, h4, h5, h6 {
  font-family: "Noto Serif SC", serif;
  font-weight: 400;
  line-height: 1.35;
  color: var(--text-primary);
}

.serif {
  font-family: "Noto Serif SC", serif;
}

.display {
  font-family: "DM Serif Display", serif;
}

.text-gradient {
  background: linear-gradient(135deg, var(--accent) 0%, #4A8B5F 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

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

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