/*
ELLEZ LLC - Brand Journal Design
Theme: Deep Ink Green & Champagne Gold
Version: 3.0
*/

:root {
  /* Color Palette */
  --bg-primary: #0E1614;    /* Deep Ink Green */
  --bg-secondary: #15201D;  /* Slightly lighter for contrast */
  --accent-gold: #D4C5A5;   /* Soft Champagne Gold */
  --accent-gold-dim: rgba(212, 197, 165, 0.15);
  
  --text-primary: #F5F5F0;  /* Warm Off-white */
  --text-secondary: #A0A0A0; /* Soft Gray */
  
  --card-bg: rgba(255, 255, 255, 0.03);
  --card-border: rgba(212, 197, 165, 0.1);
  --card-hover-border: rgba(212, 197, 165, 0.3);
  
  /* Spacing */
  --spacing-section: 8rem;
  --spacing-card: 2rem;
  
  /* Typography */
  --font-main: 'Inter', system-ui, -apple-system, sans-serif;
}

/* Layout safety */
*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: hidden; }
img, video, canvas, svg { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4, h5, h6, p, li { overflow-wrap: anywhere; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'Inter', 'Noto Sans TC', 'Noto Sans', Arial, sans-serif;
  margin: 0;
  padding: 0;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* Typography Overrides */
h1, h2 {
  font-family: 'Playfair Display', 'Noto Serif TC', 'Noto Serif', serif;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
}

h2 {
  font-size: clamp(2rem, 4vw, 2.5rem);
  color: var(--accent-gold);
  margin-bottom: 3rem;
}

h3, h4, h5, h6 {
  font-family: 'Inter', 'Noto Sans TC', 'Noto Sans', Arial, sans-serif;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 0;
  line-height: 1.2;
}

p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

a {
  color: var(--accent-gold);
  text-decoration: none;
  transition: opacity 0.3s ease;
}

a:hover {
  opacity: 0.8;
}

/* Utility Classes */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.fade-in-section {
  /* Always visible; animation is purely decorative */
  opacity: 1;
  transform: none;
  transition: none;
  animation: fadeSlideUp 1.1s cubic-bezier(0.22, 0.68, 0.52, 1.01) forwards;
  animation-delay: 0.2s;
}

.fade-in-section.visible { opacity: 1; transform: none; }

/* Animation Keyframes */
@keyframes fadeSlideUp {
  0% {
    opacity: 0;
    transform: translateY(40px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: rgba(14, 22, 20, 0.9);
  backdrop-filter: blur(10px);
  z-index: 1000;
  border-bottom: 1px solid var(--card-border);
  padding: 1rem 0;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-logo-img {
  height: 32px;
  width: auto;
}

.nav-logo-text {
  font-size: 1.2rem;
  color: var(--text-primary);
  font-weight: 500;
  letter-spacing: 0.05em;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 2.5rem;
  margin: 0;
  padding: 0;
}

.nav-links li a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  position: relative;
}

.nav-links li a:hover,
.nav-links li a.active {
  color: var(--accent-gold);
}

/* Hero Section */
.hero {
  min-height: 90vh;
  display: flex;
  align-items: center;
  padding-top: 80px; /* Offset for fixed nav */
  background: radial-gradient(circle at 80% 20%, rgba(212, 197, 165, 0.05) 0%, transparent 40%);
}

.hero-inner {
  /* match container spacing */
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.hero-title {
  font-family: 'Playfair Display', 'Noto Serif TC', 'Noto Serif', serif;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 0.9;
  /* Follow h1 size to match reference */
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin: 0 0 1rem 0;
}

.hero-content {
  max-width: 800px;
}

.hero-label {
  color: var(--accent-gold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
  display: block;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin-top: 2rem;
}

/* Principles Section (Values) */
.principles {
  padding: var(--spacing-section) 0;
  background-color: var(--bg-secondary);
}

.principles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 3rem;
}

.principle-card {
  padding: 2rem 0;
  border-top: 1px solid var(--card-border);
}

.principle-number {
  font-size: 0.9rem;
  color: var(--accent-gold);
  margin-bottom: 1rem;
  display: block;
  font-family: 'JetBrains Mono', 'Noto Sans Mono', 'Noto Sans TC', monospace;
}

.principle-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

/* Products Section */
.products {
  padding: var(--spacing-section) 0;
}

.product-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 4px;
  padding: 3rem;
  margin-bottom: 2rem;
  transition: all 0.4s ease;
  display: grid;
  grid-template-columns: 1fr 1.5fr; /* Z-layout within card if needed, or just block */
  gap: 3rem;
  align-items: center;
}

/* Language Switcher */
.lang-switcher {
  display: flex;
  align-items: center;
  margin-left: 1.5rem;
  font-family: 'Inter', 'Noto Sans TC', Arial, sans-serif;
}
.lang-btn {
  color: var(--text-secondary);
  background: none;
  border: none;
  font-size: 1rem;
  padding: 0.2em 0.7em;
  cursor: pointer;
  text-decoration: none;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
}
.lang-btn.active,
.lang-btn:hover {
  background: var(--accent-gold);
  color: var(--bg-primary);
  font-weight: 600;
}
.lang-divider {
  color: #b0b0b0;
  margin: 0 0.2em;
  user-select: none;
}

/* about-text uses default paragraph styles from reference */

.product-card:hover {
  border-color: var(--card-hover-border);
  transform: translateY(-5px);
}

/* Generic section helpers used by HTML */
.about,
.services,
.projects,
#updates {
  padding: var(--spacing-section) 0;
}

.section-title {
  font-family: 'Playfair Display', 'Noto Serif TC', 'Noto Serif', serif;
  font-weight: 700;
  color: var(--accent-gold);
  font-size: clamp(2rem, 4vw, 2.5rem);
  margin: 0 0 3rem 0;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.5rem;
}

.card-grid > * { /* default 3-up on desktop */
  grid-column: span 4;
}

@media (max-width: 1024px) {
  .card-grid > * { grid-column: span 6; }
}

@media (max-width: 640px) {
  .card-grid > * { grid-column: span 12; }
}

.service-card,
.project-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 6px;
  padding: 1.5rem;
  transition: border-color .2s ease, transform .2s ease;
}

.service-card:hover,
.project-card:hover {
  border-color: var(--card-hover-border);
  transform: translateY(-3px);
}

.fade-in-card {
  opacity: 1;
  transform: none;
  animation: fadeSlideUp .9s cubic-bezier(0.22, 0.68, 0.52, 1.01) forwards;
}

.product-info h3 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.product-meta {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border: 1px solid var(--accent-gold-dim);
  color: var(--accent-gold);
  font-size: 0.8rem;
  border-radius: 100px;
  margin-bottom: 1.5rem;
  font-family: 'JetBrains Mono', 'Noto Sans Mono', 'Noto Sans TC', monospace;
}

.product-links {
  margin-top: 2rem;
  display: flex;
  gap: 1.5rem;
}

.btn-link {
  color: var(--text-primary);
  border-bottom: 1px solid var(--accent-gold);
  padding-bottom: 2px;
  font-size: 0.9rem;
}

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

/* Updates Section */
.updates {
  padding: var(--spacing-section) 0;
  background-color: var(--bg-secondary);
}

.update-list {
  border-left: 1px solid var(--card-border);
  padding-left: 2rem;
}

.update-item {
  margin-bottom: 3rem;
  position: relative;
  cursor: pointer;
}

.update-item::before {
  content: '';
  position: absolute;
  left: -2.35rem;
  top: 0.5rem;
  width: 0.6rem;
  height: 0.6rem;
  background-color: var(--bg-primary);
  border: 1px solid var(--accent-gold);
  border-radius: 50%;
}

.update-date {
  font-family: monospace;
  color: var(--accent-gold);
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
  display: block;
}

.update-item h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  transition: color 0.3s;
}

.update-item:hover h3 { color: var(--accent-gold); }

.update-content-preview p {
  margin: 0;
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Prevent timeline bullets from causing horizontal scroll on small screens */
@media (max-width: 640px) {
  .update-list { border-left: none; padding-left: 0; }
  .update-item::before { display: none; }
}

/* Footer */
.site-footer {
  padding: 5rem 0;
  border-top: 1px solid var(--card-border);
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.footer-content { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

.product-showcase {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  padding: 1.25rem;
}

.footer-section { margin-top: 2rem; }

.footer-bottom { border-top: 1px solid var(--card-border); margin-top: 2rem; padding-top: 1.5rem; text-align: center; }

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 4rem;
  margin-bottom: 4rem;
}

.footer-brand h4 {
  color: var(--text-primary);
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.footer-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

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

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

/* About Card Section */
.about-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 6px;
  padding: 2.5rem 2rem;
  margin: 2rem auto 0 auto;
  max-width: 700px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
  color: var(--text-primary);
  font-size: 1.15rem;
  line-height: 1.8;
  animation: fadeSlideUp 1.2s cubic-bezier(0.22, 0.68, 0.52, 1.01) 0.3s both;
}

.about-card strong {
  color: var(--accent-gold);
  font-weight: 600;
}

@media (max-width: 768px) {
  .about-card {
    padding: 1.5rem 1rem;
    font-size: 1rem;
  }
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .product-card {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 2rem;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .nav-links {
    display: none; /* Simplified for now, assuming JS handles toggle */
  }
  
  /* Add mobile menu styles if needed, reusing existing logic */
  .nav-toggle:checked ~ .nav-links {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    box-sizing: border-box;
    background: var(--bg-primary);
    padding: 2rem;
    border-bottom: 1px solid var(--card-border);
  }
}

/* Hamburger Menu (Mobile Nav) - Re-adding essential styles */
.nav-toggle {
  display: none;
}

.nav-toggle-label {
  display: none;
  cursor: pointer;
  width: 30px;
  height: 20px;
  flex-direction: column;
  justify-content: space-between;
}

.nav-toggle-label span {
  display: block;
  height: 2px;
  width: 100%;
  background-color: var(--accent-gold);
  transition: all 0.3s ease;
}

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

/* Respect user motion preferences */
@media (prefers-reduced-motion: reduce) {
  .fade-in-section, .about-card {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* CJK fallback for Playfair Display */
@media (lang: zh-TW), (lang: zh-Hant) {
  h1, h2 {
    font-family: 'Playfair Display', 'Noto Serif TC', 'Noto Serif', serif;
  }
}

/* --- Functional Styles for Announcement Modal & Loading (from inline <style>) --- */
.announcement-page {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: var(--bg-primary); z-index: 2000;
  transform: translateY(100%);
  transition: transform 0.5s cubic-bezier(0.77, 0, 0.175, 1);
  display: flex; flex-direction: column; overflow-y: auto;
}
.announcement-page.active { transform: translateY(0); }
.page-header {
  padding: 24px 40px; display: flex; justify-content: flex-end; position: sticky; top: 0;
  background: rgba(14, 22, 20, 0.95); backdrop-filter: blur(5px); z-index: 10;
}
.close-btn { background: none; border: none; font-size: 2rem; color: var(--accent-gold); cursor: pointer; transition: transform 0.2s; }
.close-btn:hover { transform: rotate(90deg); }
.page-content-container { max-width: 800px; margin: 0 auto; padding: 40px 24px 100px; }
.page-meta { font-family: 'JetBrains Mono', monospace; color: var(--text-secondary); margin-bottom: 16px; display: block; }
#page-title { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 2rem; color: var(--text-primary); }
.article-body { margin-top: 40px; font-size: 1.1rem; color: var(--text-secondary); }
.article-body p { margin-bottom: 24px; color: var(--text-secondary); }
.article-body h3 { margin-top: 40px; color: var(--text-primary); }
.article-body ul { list-style: disc; padding-left: 20px; color: var(--text-secondary); }

.loading-text,
.error-text {
  color: var(--text-secondary);
  padding: 2rem;
  text-align: center;
  font-family: 'JetBrains Mono', monospace;
}
