/* ============================================
   Zen Puzzle Tales — Technical Support Website
   East Asian Pan-Cultural LIGHT Theme
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Noto+Serif+SC:wght@400;600;700&display=swap');

/* --- Design Tokens --- */
:root {
  /* Colors — Warm Rice Paper */
  --bg-deep: #FAF7F2;
  --bg-surface: #FFFFFF;
  --bg-card: #FFFFFF;
  --bg-card-hover: #FDF9F4;

  /* Accent — Warm Gold & Ink */
  --gold: #B08930;
  --gold-light: #C9A84C;
  --gold-glow: rgba(176, 137, 48, 0.08);
  --gold-border: rgba(176, 137, 48, 0.2);

  /* Text */
  --text-primary: #2C2820;
  --text-secondary: #6B6458;
  --text-muted: #9E978A;

  /* Accent complementary */
  --jade: #4E8B7C;
  --jade-glow: rgba(78, 139, 124, 0.06);
  --cinnabar: #C25050;
  --ink-blue: #3E6683;

  /* Layout */
  --max-width: 1100px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(44, 40, 32, 0.06);
  --shadow-md: 0 4px 16px rgba(44, 40, 32, 0.08);
  --shadow-lg: 0 12px 40px rgba(44, 40, 32, 0.1);

  /* Transitions */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
}

a {
  color: var(--gold);
  text-decoration: none;
  transition: color 0.25s var(--ease-out);
}

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

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

/* --- Background Texture --- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 600px 400px at 15% 10%, var(--gold-glow), transparent),
    radial-gradient(ellipse 500px 500px at 85% 80%, var(--jade-glow), transparent);
  pointer-events: none;
  z-index: 0;
}

/* --- Container --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* --- Navigation --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 0;
  background: rgba(250, 247, 242, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(176, 137, 48, 0.12);
  transition: background 0.3s;
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: 'Noto Serif SC', serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.02em;
}

.logo span {
  color: var(--gold);
}

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.25s var(--ease-out);
}

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

/* --- Hero Section --- */
.hero {
  padding: 160px 0 100px;
  text-align: center;
}

.hero-badge {
  display: inline-block;
  padding: 6px 18px;
  background: var(--gold-glow);
  border: 1px solid var(--gold-border);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--gold);
  margin-bottom: 28px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero h1 {
  font-family: 'Noto Serif SC', serif;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 20px;
  background: linear-gradient(135deg, var(--text-primary) 30%, var(--gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-secondary);
  max-width: 580px;
  margin: 0 auto 44px;
  line-height: 1.8;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.3s var(--ease-out);
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold), #9A7528);
  color: #FFFFFF;
  box-shadow: 0 4px 20px rgba(176, 137, 48, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(176, 137, 48, 0.35);
  color: #FFFFFF;
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid rgba(44, 40, 32, 0.15);
}

.btn-secondary:hover {
  border-color: var(--gold-border);
  color: var(--gold);
  transform: translateY(-2px);
}

/* --- Section Shared --- */
.section {
  padding: 90px 0;
}

.section-title {
  font-family: 'Noto Serif SC', serif;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.section-desc {
  text-align: center;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto 56px;
  font-size: 0.95rem;
}

/* --- Decorative Divider --- */
.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 0 auto;
  max-width: 240px;
  padding-bottom: 56px;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-border), transparent);
}

.divider-icon {
  color: var(--gold);
  font-size: 1.1rem;
  opacity: 0.6;
}

/* --- Features Grid --- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid rgba(44, 40, 32, 0.06);
  border-radius: var(--radius-md);
  padding: 36px 28px;
  transition: all 0.35s var(--ease-out);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

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

.feature-card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-4px);
  border-color: var(--gold-border);
  box-shadow: var(--shadow-lg);
}

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

.feature-icon {
  font-size: 2rem;
  margin-bottom: 18px;
  display: block;
}

.feature-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.feature-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* --- About Section --- */
.about-content {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.about-content p {
  font-size: 1.02rem;
  color: var(--text-secondary);
  line-height: 1.85;
  margin-bottom: 18px;
}

/* --- Contact Section --- */
.contact {
  text-align: center;
  padding: 90px 0 60px;
}

.contact-card {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 32px;
  background: var(--bg-card);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-md);
  margin-bottom: 36px;
  transition: all 0.3s var(--ease-out);
  box-shadow: var(--shadow-sm);
}

.contact-card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.contact-card .icon {
  font-size: 1.3rem;
}

.contact-card .email {
  color: var(--text-primary);
  font-weight: 500;
}

.contact-links {
  display: flex;
  gap: 32px;
  justify-content: center;
  margin-top: 12px;
}

.contact-links a {
  color: var(--text-muted);
  font-size: 0.88rem;
  transition: color 0.25s;
}

.contact-links a:hover {
  color: var(--gold);
}

/* --- Footer --- */
.footer {
  padding: 32px 0;
  text-align: center;
  border-top: 1px solid rgba(44, 40, 32, 0.06);
  color: var(--text-muted);
  font-size: 0.82rem;
}

/* --- Legal Pages (Privacy / Terms) --- */
.legal-page {
  padding: 120px 0 80px;
}

.legal-page .container {
  max-width: 780px;
}

.legal-page h1 {
  font-family: 'Noto Serif SC', serif;
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.legal-page .last-updated {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-bottom: 40px;
}

.legal-page .intro {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: 48px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(44, 40, 32, 0.08);
}

.legal-page h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 48px;
  margin-bottom: 16px;
  color: var(--gold);
}

.legal-page h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-top: 28px;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.legal-page p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.85;
  margin-bottom: 14px;
}

.legal-page ul {
  list-style: none;
  padding-left: 0;
  margin-bottom: 16px;
}

.legal-page ul li {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.8;
  padding-left: 20px;
  position: relative;
  margin-bottom: 6px;
}

.legal-page ul li::before {
  content: '·';
  position: absolute;
  left: 4px;
  color: var(--gold);
  font-weight: 700;
}

.legal-page .contact-info {
  margin-top: 24px;
  padding: 20px 24px;
  background: var(--bg-card);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}

.legal-page .contact-info a {
  color: var(--gold);
}

.legal-footer {
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px solid rgba(44, 40, 32, 0.08);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 32px;
  color: var(--text-muted);
  font-size: 0.88rem;
  transition: color 0.25s;
}

.back-link:hover {
  color: var(--gold);
}

/* --- Animations --- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-in {
  animation: fadeInUp 0.7s var(--ease-out) both;
}

.delay-1 {
  animation-delay: 0.1s;
}

.delay-2 {
  animation-delay: 0.2s;
}

.delay-3 {
  animation-delay: 0.3s;
}

.delay-4 {
  animation-delay: 0.4s;
}

.delay-5 {
  animation-delay: 0.5s;
}

.delay-6 {
  animation-delay: 0.6s;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .features-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .hero {
    padding: 130px 0 70px;
  }

  .nav-links {
    display: none;
  }

  .section {
    padding: 60px 0;
  }

  .feature-card {
    padding: 28px 22px;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .contact-links {
    flex-direction: column;
    gap: 12px;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}