/* =========================================================
   仙人森林 · IMMORTAL FOREST
   Premium corporate site — design system
   ========================================================= */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ---------- Theme tokens ---------- */
:root {
  --font-display: "Space Grotesk", "Outfit", system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: "Outfit", system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;

  --maxw: 1240px;
  --radius: 22px;
  --radius-sm: 14px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  /* brand accents (shared) */
  --emerald: #2bd47d;
  --emerald-bright: #4dffa6;
  --teal: #1fb6a6;
  --lime: #b6f24a;
  --accent-grad: linear-gradient(120deg, #2bd47d 0%, #1fb6a6 45%, #b6f24a 100%);
}

/* DARK (default) — forest night */
html[data-theme="dark"] {
  --bg: #04100b;
  --bg-2: #071a12;
  --surface: rgba(255,255,255,0.04);
  --surface-2: rgba(255,255,255,0.06);
  --border: rgba(255,255,255,0.10);
  --border-strong: rgba(255,255,255,0.18);
  --text: #eafff4;
  --text-soft: rgba(234,255,244,0.72);
  --text-dim: rgba(234,255,244,0.45);
  --glow: rgba(43,212,125,0.45);
  --aurora-1: rgba(43,212,125,0.22);
  --aurora-2: rgba(31,182,166,0.18);
  --aurora-3: rgba(182,242,74,0.12);
  --nav-bg: rgba(4,16,11,0.55);
  --shadow: 0 30px 80px -20px rgba(0,0,0,0.7);
  color-scheme: dark;
}

/* LIGHT — paper & moss */
html[data-theme="light"] {
  --bg: #f3f8f3;
  --bg-2: #e7f1ea;
  --surface: rgba(255,255,255,0.7);
  --surface-2: rgba(255,255,255,0.85);
  --border: rgba(7,26,18,0.10);
  --border-strong: rgba(7,26,18,0.18);
  --text: #06170f;
  --text-soft: rgba(6,23,15,0.70);
  --text-dim: rgba(6,23,15,0.45);
  --glow: rgba(31,182,166,0.35);
  --aurora-1: rgba(43,212,125,0.28);
  --aurora-2: rgba(31,182,166,0.22);
  --aurora-3: rgba(182,242,74,0.18);
  --nav-bg: rgba(243,248,243,0.65);
  --shadow: 0 30px 70px -25px rgba(7,26,18,0.25);
  color-scheme: light;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background .5s var(--ease), color .5s var(--ease);
  -webkit-font-smoothing: antialiased;
}

/* ambient aurora backdrop */
body::before {
  content: "";
  position: fixed;
  inset: -20%;
  z-index: -2;
  background:
    radial-gradient(40% 50% at 18% 12%, var(--aurora-1), transparent 70%),
    radial-gradient(45% 55% at 85% 20%, var(--aurora-2), transparent 70%),
    radial-gradient(50% 60% at 60% 95%, var(--aurora-3), transparent 70%);
  filter: blur(40px);
  animation: auroraDrift 22s var(--ease) infinite alternate;
  pointer-events: none;
}
@keyframes auroraDrift {
  0%   { transform: translate3d(0,0,0) scale(1); }
  100% { transform: translate3d(-4%, 3%, 0) scale(1.12); }
}

a { color: inherit; text-decoration: none; }
img, svg, canvas { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul { list-style: none; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 24px; }
.section { position: relative; padding: clamp(72px, 11vw, 140px) 0; }
.section-head { max-width: 720px; margin-bottom: 56px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .8rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--text-soft); font-weight: 600;
  padding: 7px 14px; border: 1px solid var(--border); border-radius: 100px;
  background: var(--surface); backdrop-filter: blur(10px);
}
.eyebrow::before { content:""; width:7px; height:7px; border-radius:50%; background: var(--emerald); box-shadow: 0 0 12px var(--glow); }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.05; letter-spacing: -0.02em; }
.section-title { font-size: clamp(2rem, 5vw, 3.4rem); margin: 18px 0 16px; }
.section-sub { color: var(--text-soft); font-size: 1.06rem; max-width: 60ch; }

/* ---------- Buttons ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 26px; border-radius: 100px; font-weight: 600; font-size: .98rem;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), background .35s var(--ease);
  will-change: transform;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary {
  background: var(--accent-grad); color: #04130c;
  box-shadow: 0 10px 30px -8px var(--glow);
}
.btn-primary:hover { box-shadow: 0 16px 44px -8px var(--glow); }
.btn-ghost { border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); backdrop-filter: blur(10px); }
.btn-ghost:hover { border-color: var(--emerald); }

/* ---------- Glass card ---------- */
.glass {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(22px) saturate(160%);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,0.08);
}

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--nav-bg);
  backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid transparent;
  transition: border-color .4s var(--ease), background .4s var(--ease);
}
.nav.scrolled { border-bottom-color: var(--border); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 74px; }
.brand { display: flex; align-items: center; gap: 12px; font-family: var(--font-display); font-weight: 700; font-size: 1.18rem; letter-spacing: -0.01em; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 12px; flex: none;
  background: var(--accent-grad); display: grid; place-items: center;
  box-shadow: 0 8px 22px -6px var(--glow);
}
.brand-mark svg { width: 22px; height: 22px; color: #04130c; }
.brand small { display:block; font-size:.62rem; letter-spacing:.32em; color: var(--text-dim); font-weight:600; text-transform:uppercase; }

.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a {
  padding: 9px 16px; border-radius: 100px; font-size: .95rem; font-weight: 500; color: var(--text-soft);
  transition: color .3s, background .3s;
}
.nav-links a:hover { color: var(--text); background: var(--surface); }
.nav-links a.active { color: var(--text); background: var(--surface-2); }

.nav-actions { display: flex; align-items: center; gap: 12px; }

/* language switch */
.lang-switch {
  display: inline-flex; align-items: center; padding: 8px 14px; border-radius: 100px;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-soft);
  font-weight: 600; font-size: .82rem; letter-spacing: .04em;
  transition: color .3s var(--ease), border-color .3s var(--ease);
}
.lang-switch:hover { color: var(--text); border-color: var(--emerald); }

/* product export spec line */
.prod .spec { margin-top: 10px; font-size: .82rem; color: var(--text-dim); line-height: 1.5; }
.prod .spec b { color: var(--emerald); font-weight: 600; }

/* contact channels (WhatsApp / Messenger) */
.chan-row { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 10px; }
.chan {
  display: inline-flex; align-items: center; gap: 9px; padding: 12px 18px; border-radius: 100px;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  font-weight: 600; font-size: .92rem; transition: border-color .3s var(--ease), transform .3s var(--ease);
}
.chan:hover { border-color: var(--emerald); }
.chan svg { width: 20px; height: 20px; color: var(--emerald); }

/* theme toggle */
.theme-toggle {
  position: relative; width: 64px; height: 34px; border-radius: 100px;
  background: var(--surface-2); border: 1px solid var(--border); padding: 4px;
  display: flex; align-items: center; justify-content: space-between;
}
.theme-toggle .knob {
  position: absolute; top: 3px; left: 3px; width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent-grad); transition: transform .4s var(--ease);
  box-shadow: 0 4px 12px -2px var(--glow);
}
html[data-theme="light"] .theme-toggle .knob { transform: translateX(30px); }
.theme-toggle .ico { width: 16px; height: 16px; color: var(--text-dim); z-index:1; }
.theme-toggle .ico.sun { margin-left: 5px; }
.theme-toggle .ico.moon { margin-right: 5px; }

.nav-burger { display: none; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); place-items: center; }
.nav-burger svg { width: 22px; height: 22px; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 92vh; display: flex; align-items: center; padding-top: 40px; overflow: hidden; }
#hero-canvas { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; }
.hero-inner { position: relative; z-index: 2; max-width: 880px; }
.hero h1 {
  font-size: clamp(2.7rem, 7vw, 5.6rem); letter-spacing: -0.03em; margin: 22px 0 22px;
}
.hero h1 .grad {
  background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p.lead { font-size: clamp(1.05rem, 2vw, 1.35rem); color: var(--text-soft); max-width: 56ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 38px; }
.hero-stats { display: flex; gap: 44px; margin-top: 64px; flex-wrap: wrap; }
.hero-stats .stat .num { font-family: var(--font-display); font-size: clamp(1.8rem,4vw,2.8rem); font-weight: 700; }
.hero-stats .stat .lbl { color: var(--text-dim); font-size: .9rem; letter-spacing: .04em; }
.scroll-hint { position:absolute; bottom: 26px; left: 50%; transform: translateX(-50%); z-index:2; color: var(--text-dim); font-size:.78rem; letter-spacing:.2em; text-transform:uppercase; display:flex; flex-direction:column; align-items:center; gap:8px;}
.scroll-hint .line { width:1px; height:38px; background: linear-gradient(var(--text-dim), transparent); animation: scrollPulse 2s var(--ease) infinite; }
@keyframes scrollPulse { 0%,100%{opacity:.3; transform:scaleY(.6)} 50%{opacity:1; transform:scaleY(1)} }

/* marquee */
.marquee { border-block: 1px solid var(--border); padding: 22px 0; overflow: hidden; }
.marquee-track { display: flex; gap: 64px; width: max-content; animation: marquee 28s linear infinite; }
.marquee-track span { font-family: var(--font-display); font-size: 1.15rem; font-weight:600; color: var(--text-soft); display:flex; align-items:center; gap:14px; white-space:nowrap;}
.marquee-track span::before{ content:""; width:8px; height:8px; border-radius:50%; background:var(--emerald); box-shadow:0 0 12px var(--glow);}
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Feature grid ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.feature {
  padding: 30px; position: relative; overflow: hidden;
  transition: transform .5s var(--ease), border-color .5s var(--ease);
}
.feature::after {
  content:""; position:absolute; inset:0; border-radius:inherit; padding:1px;
  background: linear-gradient(140deg, var(--emerald), transparent 40%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; opacity:0; transition:opacity .5s var(--ease);
}
.feature:hover { transform: translateY(-6px); }
.feature:hover::after { opacity: 1; }
.feature .ic {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  background: var(--surface-2); border: 1px solid var(--border); margin-bottom: 20px; color: var(--emerald);
}
.feature .ic svg { width: 26px; height: 26px; }
.feature h3 { font-size: 1.3rem; margin-bottom: 10px; }
.feature p { color: var(--text-soft); font-size: .98rem; }

/* ---------- Split feature ---------- */
.split { display: grid; grid-template-columns: 1.1fr .9fr; gap: 60px; align-items: center; }
.split.reverse { direction: rtl; } .split.reverse > * { direction: ltr; }
.visual-card { aspect-ratio: 4/3; position: relative; overflow: hidden; display:grid; place-items:center; }
.visual-card .ring { position:absolute; border:1px solid var(--border); border-radius:50%; }
.visual-card .orbit { position:absolute; border-radius:50%; background: var(--accent-grad); box-shadow:0 0 30px var(--glow); }

/* ---------- Timeline ---------- */
.timeline { position: relative; padding-left: 30px; }
.timeline::before { content:""; position:absolute; left:7px; top:6px; bottom:6px; width:2px; background: linear-gradient(var(--emerald), transparent); }
.tl-item { position: relative; padding-bottom: 38px; }
.tl-item::before { content:""; position:absolute; left:-30px; top:4px; width:16px; height:16px; border-radius:50%; background: var(--bg); border:3px solid var(--emerald); box-shadow:0 0 14px var(--glow); }
.tl-item .yr { font-family: var(--font-display); font-weight:700; color: var(--emerald); font-size:1.05rem; }
.tl-item h4 { font-size:1.15rem; margin:4px 0 6px; }
.tl-item p { color: var(--text-soft); font-size:.96rem; }

/* ---------- Products ---------- */
.filter-bar { display:flex; flex-wrap:wrap; gap:10px; margin-bottom: 36px; }
.filter {
  padding: 10px 20px; border-radius: 100px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-soft); font-weight: 500; font-size: .92rem;
  transition: all .3s var(--ease);
}
.filter:hover { color: var(--text); border-color: var(--border-strong); }
.filter.active { background: var(--accent-grad); color:#04130c; border-color: transparent; box-shadow: 0 8px 22px -8px var(--glow); }

.prod-grid { display:grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.prod {
  position: relative; padding: 26px; border-radius: var(--radius); overflow: hidden;
  background: var(--surface); border: 1px solid var(--border);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
  transform-style: preserve-3d;
}
.prod:hover { box-shadow: var(--shadow); }
.prod .thumb { height: 150px; border-radius: var(--radius-sm); margin-bottom: 20px; position: relative; overflow:hidden; display:grid; place-items:center; background: var(--bg-2); border:1px solid var(--border); }
.prod .thumb svg { width: 64px; height: 64px; color: var(--emerald); opacity:.9; }
.prod .tag { font-size:.72rem; letter-spacing:.14em; text-transform:uppercase; color: var(--emerald); font-weight:600; }
.prod h3 { font-size:1.22rem; margin:8px 0 8px; }
.prod p { color: var(--text-soft); font-size:.93rem; }
.prod .price { margin-top:16px; font-family:var(--font-display); font-weight:700; font-size:1.05rem; }
.prod.hide { display:none; }

/* spotlight */
.spotlight { position: relative; }
.spotlight::before {
  content:""; position:absolute; inset:0; border-radius:inherit; opacity:0; transition:opacity .4s;
  background: radial-gradient(420px circle at var(--mx,50%) var(--my,50%), rgba(43,212,125,0.16), transparent 60%);
  pointer-events:none;
}
.spotlight:hover::before { opacity:1; }

/* ---------- CTA band ---------- */
.cta-band { text-align:center; padding: clamp(56px,8vw,90px) 32px; position:relative; overflow:hidden; }
.cta-band h2 { font-size: clamp(2rem,5vw,3.2rem); margin-bottom:16px; }
.cta-band p { color: var(--text-soft); max-width: 52ch; margin: 0 auto 32px; }
.cta-band .btn-row { display:flex; gap:14px; justify-content:center; flex-wrap:wrap; }

/* ---------- Contact ---------- */
.contact-grid { display:grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items:start; }
.form-field { margin-bottom: 20px; }
.form-field label { display:block; font-size:.9rem; font-weight:600; margin-bottom:8px; color: var(--text-soft); }
.form-field input, .form-field textarea, .form-field select {
  width:100%; padding: 14px 16px; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  font: inherit; transition: border-color .3s, box-shadow .3s;
}
.form-field input:focus, .form-field textarea:focus, .form-field select:focus {
  outline:none; border-color: var(--emerald); box-shadow: 0 0 0 4px var(--glow);
}
.form-field textarea { min-height: 130px; resize: vertical; }
.form-field .err { color: #ff6b6b; font-size:.82rem; margin-top:6px; display:none; }
.form-field.invalid .err { display:block; }
.form-field.invalid input, .form-field.invalid textarea { border-color:#ff6b6b; }

.form-status { margin-top:14px; font-size:.92rem; font-weight:600; }
.form-status.ok { color: var(--emerald); }
.form-status.bad { color:#ff6b6b; }

.info-row { display:flex; gap:14px; padding: 18px 0; border-bottom:1px solid var(--border); }
.info-row:last-child { border-bottom:none; }
.info-row .ic { width:44px; height:44px; flex:none; border-radius:12px; background:var(--surface-2); border:1px solid var(--border); display:grid; place-items:center; color:var(--emerald); }
.info-row .ic svg { width:22px; height:22px; }
.info-row .k { font-size:.8rem; color:var(--text-dim); letter-spacing:.06em; text-transform:uppercase; }
.info-row .v { font-weight:600; }

/* FAQ */
.faq-item { border:1px solid var(--border); border-radius: var(--radius-sm); margin-bottom:12px; overflow:hidden; background: var(--surface); }
.faq-q { width:100%; text-align:left; padding:18px 22px; display:flex; justify-content:space-between; align-items:center; gap:16px; font-weight:600; font-size:1rem; }
.faq-q .plus { width:22px; height:22px; flex:none; color:var(--emerald); transition: transform .35s var(--ease); }
.faq-item.open .faq-q .plus { transform: rotate(45deg); }
.faq-a { max-height:0; overflow:hidden; transition: max-height .45s var(--ease); }
.faq-a p { padding: 0 22px 20px; color: var(--text-soft); }

/* ---------- Footer ---------- */
.footer { border-top:1px solid var(--border); padding: 64px 0 40px; background: var(--bg-2); }
.footer-grid { display:grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 36px; }
.footer h5 { font-family:var(--font-display); font-size:.82rem; letter-spacing:.14em; text-transform:uppercase; color:var(--text-dim); margin-bottom:16px; }
.footer a { display:block; color: var(--text-soft); padding:5px 0; font-size:.94rem; transition: color .3s; }
.footer a:hover { color: var(--emerald); }
.footer .desc { color: var(--text-soft); font-size:.94rem; max-width: 34ch; margin-top:14px; }
.footer-bottom { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:16px; margin-top:48px; padding-top:24px; border-top:1px solid var(--border); color: var(--text-dim); font-size:.86rem; }

/* ---------- Reveal animation ----------
   Progressive enhancement: content is visible by default.
   JS adds "js" class to <html>, enabling fade-in on scroll.
   If JS fails, all content stays visible — no blank pages. */
.reveal { opacity: 1; transform: none; }
html.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
html.js .reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"]{ transition-delay:.08s; }
.reveal[data-delay="2"]{ transition-delay:.16s; }
.reveal[data-delay="3"]{ transition-delay:.24s; }
.reveal[data-delay="4"]{ transition-delay:.32s; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .grid-3, .prod-grid { grid-template-columns: repeat(2, 1fr); }
  .split, .contact-grid { grid-template-columns: 1fr; gap: 36px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .nav-links, .nav-actions .btn { display: none; }
  .nav-burger { display: grid; }
  .nav.menu-open .nav-links {
    display: flex; flex-direction: column; align-items: stretch; gap:4px;
    position: absolute; top: 74px; left: 0; right: 0; padding: 16px 24px 24px;
    background: var(--nav-bg); backdrop-filter: blur(20px); border-bottom:1px solid var(--border);
  }
  .nav.menu-open .nav-links a { padding: 14px 16px; }
  .grid-3, .prod-grid, .grid-2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 28px; }
}
