/* ================================================================
   JINSHEN PAPER INDUSTRIES — Custom CSS
   Supplements Tailwind CDN with component styles, animations,
   and contextual theme tokens.
================================================================ */

/* ── Google Fonts already loaded via <link> in base.html ── */

/* ── Root Variables ── */
:root {
  --pine-950:  #071812;
  --pine-900:  #0f291f;
  --pine-800:  #163b2d;
  --pine-700:  #1e4e3c;
  --gold-400:  #e4bc4c;
  --gold-500:  #c9a84c;
  --gold-600:  #a88030;
  --cream:     #faf8f4;
  --cream-100: #f5f0e8;
}

/* ================================================================
   TYPOGRAPHY
================================================================ */
body {
  font-family: "Noto Sans TC", system-ui, sans-serif;
  background-color: var(--cream);
  color: #1c1917;
}

h1, h2, h3, .font-serif {
  font-family: "Noto Serif TC", Georgia, serif;
}

.font-display {
  font-family: "Playfair Display", "Noto Serif TC", serif;
}

/* ================================================================
   NAVIGATION
================================================================ */
#navbar {
  background: transparent;
}

#navbar.scrolled {
  background: rgba(250, 248, 244, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(220, 200, 175, 0.4);
  box-shadow: 0 2px 24px rgba(0, 0, 0, 0.06);
}

/* Logo SVG — transparent nav (dark background): show as-is (light colors) */
#navbar:not(.scrolled) .nav-logo-svg {
  filter: none;
}

/* Logo SVG — scrolled nav (cream background): darken the light logo so it's readable */
#navbar.scrolled .nav-logo-svg {
  filter: brightness(0) sepia(1) saturate(1.2) hue-rotate(5deg);
}

/* Footer logo — dark background: show as-is (light colors), slightly transparent */
.footer-logo-svg {
  filter: none;
  opacity: 0.88;
}

/* Nav links */
#navbar:not(.scrolled) .nav-link {
  color: rgba(255, 255, 255, 0.8);
}
#navbar:not(.scrolled) .nav-link:hover,
#navbar:not(.scrolled) .nav-link.nav-link-active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

#navbar.scrolled .nav-link {
  color: #44403c;
}
#navbar.scrolled .nav-link:hover,
#navbar.scrolled .nav-link.nav-link-active {
  color: #0f291f;
  background: rgba(15, 41, 31, 0.06);
}

/* Language switcher */
#navbar:not(.scrolled) .lang-switcher {
  color: rgba(255,255,255,0.75);
  border-color: rgba(255,255,255,0.25);
}
#navbar:not(.scrolled) .lang-switcher:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}
#navbar.scrolled .lang-switcher {
  color: #57534e;
  border-color: #d6d3d1;
}
#navbar.scrolled .lang-switcher:hover {
  background: #f5f0e8;
  color: #0f291f;
}

/* Mobile menu button */
#navbar:not(.scrolled) .nav-mobile-btn { color: rgba(255,255,255,0.9); }
#navbar.scrolled      .nav-mobile-btn { color: #1c1917; }

/* Mobile menu panel */
.mobile-menu-panel {
  background: rgba(250, 248, 244, 0.98);
  backdrop-filter: blur(16px);
}
.mobile-nav-link       { color: #44403c; }
.mobile-nav-link:hover { background: #f5f0e8; color: #0f291f; }
.mobile-nav-active     { background: #f5f0e8; color: #0f291f; font-weight: 600; }

/* ================================================================
   BUTTONS
================================================================ */
.btn-gold {
  background: linear-gradient(135deg, #c9a84c 0%, #e4bc4c 100%);
  color: #0f291f;
  font-weight: 600;
}
.btn-gold:hover {
  background: linear-gradient(135deg, #b89040 0%, #d4aa3a 100%);
  transform: translateY(-1px);
}
.btn-gold:active {
  transform: translateY(0);
}

/* ================================================================
   SECTION LABELS & HEADINGS
================================================================ */
.section-label {
  display: inline-block;
  padding: 0.375rem 1rem;
  border-radius: 9999px;
  background: rgba(201, 168, 76, 0.1);
  border: 1px solid rgba(201, 168, 76, 0.3);
  color: #a88030;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-title {
  font-family: "Noto Serif TC", Georgia, serif;
  font-weight: 700;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  color: #0f291f;
  line-height: 1.25;
}

.section-subtitle {
  color: #78716c;
  font-size: 0.9375rem;
  max-width: 36rem;
  margin: 0.75rem auto 0;
  line-height: 1.7;
}

/* ================================================================
   CARDS
================================================================ */
.feature-card {
  padding: 1.75rem;
  border-radius: 1.25rem;
  background: #ffffff;
  border: 1px solid #ece4d4;
  transition: all 0.3s ease;
}
.feature-card:hover {
  box-shadow: 0 10px 40px rgba(15, 41, 31, 0.08);
  transform: translateY(-3px);
  border-color: rgba(201, 168, 76, 0.3);
}

.cert-card {
  transition: all 0.3s ease;
}
.cert-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(15, 41, 31, 0.06);
}

/* ================================================================
   FORMS
================================================================ */
.form-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #44403c;
  margin-bottom: 0.375rem;
  letter-spacing: 0.02em;
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  border: 1.5px solid #e7e0d4;
  background: #faf8f4;
  color: #1c1917;
  font-size: 0.875rem;
  font-family: "Noto Sans TC", system-ui, sans-serif;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  outline: none;
  appearance: none;
}
.form-input::placeholder {
  color: #a8a29e;
}
.form-input:focus {
  border-color: #c9a84c;
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.12);
  background: #ffffff;
}
select.form-input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23a8a29e'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.875rem center;
  background-size: 1.1rem;
  padding-right: 2.5rem;
}

/* ================================================================
   BACKGROUNDS & TEXTURES
================================================================ */
.bg-pine-gradient {
  background: linear-gradient(135deg, #0f291f 0%, #1e4e3c 50%, #163b2d 100%);
}
.bg-gold-gradient {
  background: linear-gradient(135deg, #c9a84c 0%, #e4bc4c 100%);
}
.bg-cream-gradient {
  background: linear-gradient(180deg, #faf8f4 0%, #f5f0e8 100%);
}

.hero-texture {
  background-image:
    radial-gradient(circle at 2px 2px, rgba(255,255,255,0.08) 1px, transparent 0);
  background-size: 32px 32px;
}

/* ================================================================
   ANIMATIONS
================================================================ */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes bounceSlow {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(-8px); }
}

.animate-fade-in {
  opacity: 0;
  animation: fadeIn 0.8s ease forwards;
}
.animate-fade-in-up {
  opacity: 0;
  animation: fadeInUp 0.8s ease forwards;
}
.animate-bounce-slow {
  animation: bounceSlow 2.5s ease-in-out infinite;
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ================================================================
   PRODUCT CARDS
================================================================ */
.product-card {
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.product-card:hover {
  transform: translateY(-4px);
}

/* line-clamp */
.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ================================================================
   SCROLLBAR
================================================================ */
::-webkit-scrollbar        { width: 6px; }
::-webkit-scrollbar-track  { background: #f5f0e8; }
::-webkit-scrollbar-thumb  { background: #c9a84c; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #a88030; }

/* ================================================================
   UTILITY
================================================================ */
html { scroll-behavior: smooth; }

*:focus-visible {
  outline: 2px solid #c9a84c;
  outline-offset: 2px;
}
