/* ========================================
   Thriving Enterprises — Polished Theme
   ======================================== */

/* --- Design Tokens --- */
:root {
  /* Brand */
  --primary: #0A6E59;
  --primary-light: #0f8a70;
  --primary-dark: #075342;
  --primary-glow: rgba(10, 110, 89, 0.08);
  --accent: #F5A623;
  --accent-light: #f7b84d;
  --accent-dark: #d48c0f;

  /* Neutrals */
  --bg: #F8F5F0;
  --bg-alt: #ffffff;
  --bg-warm: #FDFCFA;
  --text: #1A1A2E;
  --text-secondary: #4a4a5e;
  --text-muted: #8888a0;
  --border: #E8E4DE;
  --border-light: #F0EDE8;

  /* Cards & Surfaces */
  --card-bg: #ffffff;
  --card-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.02);
  --card-shadow-hover: 0 8px 30px rgba(10,110,89,0.10), 0 2px 8px rgba(10,110,89,0.04);
  --card-radius: 12px;
  --img-bg: #F4F1EC;

  /* Typography */
  --font-display: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;

  /* Layout */
  --container: 1200px;
  --section-gap: 5rem;
}

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

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

::selection {
  background: var(--primary);
  color: white;
}

/* --- Base --- */
body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  font-size: 1rem;
}

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

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

/* --- Container --- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 2rem;
}

/* ==========================================
   HEADER
   ========================================== */
.site-header {
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  padding: 0.75rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  transition: box-shadow 0.3s;
}

.site-header.scrolled {
  box-shadow: 0 1px 8px rgba(0,0,0,0.06);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.logo {
  text-decoration: none;
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  flex-shrink: 0;
}

.logo-text {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.03em;
  transition: color 0.2s;
}

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

.logo-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 500;
}

/* Navigation */
.main-nav ul {
  list-style: none;
  display: flex;
  gap: 0.25rem;
}

.main-nav a {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s;
  position: relative;
}

.main-nav a:hover {
  color: var(--primary);
  background: var(--primary-glow);
}

/* ==========================================
   HERO
   ========================================== */
.hero {
  background:
    radial-gradient(ellipse 80% 60% at 20% 80%, rgba(10,110,89,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 90% 20%, rgba(245,166,35,0.08) 0%, transparent 50%),
    linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 40%, var(--primary-light) 100%);
  color: white;
  padding: 5rem 0;
  min-height: 500px;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

/* Subtle dot pattern overlay */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}

.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  text-align: left;
  position: relative;
  z-index: 1;
}

.hero-content h1 {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.035em;
  margin-bottom: 1rem;
  line-height: 1.15;
}

.hero-content .hero-sub {
  font-size: 1.1rem;
  opacity: 0.88;
  max-width: 480px;
  margin: 0 0 2rem 0;
  line-height: 1.65;
  font-weight: 400;
}

.hero-ctas {
  display: flex;
  gap: 1rem;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-product-img {
  max-width: 100%;
  max-height: 360px;
  object-fit: contain;
  filter: drop-shadow(0 12px 40px rgba(0,0,0,0.25));
}

/* ==========================================
   BUTTONS
   ========================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 2rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  border: 2px solid transparent;
  line-height: 1.4;
}

.btn-primary {
  background: var(--accent);
  color: var(--text);
  border-color: var(--accent);
  box-shadow: 0 4px 14px rgba(245,166,35,0.35);
}

.btn-primary:hover {
  background: var(--accent-light);
  border-color: var(--accent-light);
  box-shadow: 0 6px 20px rgba(245,166,35,0.45);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: transparent;
  color: white;
  border-color: rgba(255,255,255,0.35);
  backdrop-filter: blur(4px);
}

.btn-secondary:hover {
  border-color: rgba(255,255,255,0.7);
  background: rgba(255,255,255,0.08);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 14px rgba(10,110,89,0.25);
  transform: translateY(-1px);
}

/* ==========================================
   SECTIONS
   ========================================== */
.section {
  padding: var(--section-gap) 0;
}

.section + .section {
  border-top: 1px solid var(--border-light);
}

.section h2 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 3rem;
  letter-spacing: -0.025em;
  color: var(--text);
  position: relative;
}

/* Subtle decorative accent under section headings */
.section h2::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
  margin: 0.75rem auto 0;
}

/* ==========================================
   FEATURES GRID
   ========================================== */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  padding: 2rem;
  box-shadow: var(--card-shadow);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

/* Decorative left accent */
.feature-card::before {
  content: '';
  position: absolute;
  top: 1.5rem;
  left: 1.5rem;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--primary-glow);
  opacity: 0;
  transition: opacity 0.3s;
}

.feature-card:hover {
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-3px);
  border-color: var(--primary);
}

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

.feature-card h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
  color: var(--primary);
  letter-spacing: -0.01em;
}

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

/* ==========================================
   PRODUCT GRID
   ========================================== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.product-card {
  display: block;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover {
  border-color: var(--primary);
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-4px);
}

.product-card-img {
  background: var(--img-bg);
  padding: 2rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 220px;
  transition: background 0.3s;
}

.product-card:hover .product-card-img {
  background: #EDE9E2;
}

.product-card-img img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover .product-card-img img {
  transform: scale(1.06);
}

.product-card-body {
  padding: 1.5rem;
}

.product-card-body h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.4rem;
  letter-spacing: -0.01em;
  transition: color 0.2s;
}

.product-card:hover .product-card-body h3 {
  color: var(--primary);
}

.product-card-body p {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.55;
  margin: 0;
}

/* ==========================================
   PRODUCT DETAIL PAGE
   ========================================== */
.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.product-detail-img {
  background: var(--img-bg);
  border-radius: var(--card-radius);
  padding: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 320px;
  border: 1px solid var(--border-light);
}

.product-detail-img img {
  max-width: 100%;
  max-height: 360px;
  object-fit: contain;
}

.product-detail-body h1 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  letter-spacing: -0.025em;
}

.product-detail-desc {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.65;
}

.product-detail-body .content {
  max-width: 100%;
  margin-bottom: 2rem;
}

.product-detail-body .content p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 1rem;
}

/* ==========================================
   CONTENT PAGES
   ========================================== */
.content {
  max-width: 760px;
  line-height: 1.8;
}

.content p {
  margin-bottom: 1.25rem;
  color: var(--text-secondary);
}

.content h2 {
  font-family: var(--font-display);
  text-align: left;
  font-size: 1.5rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.content h2::after { display: none; }

.content h3 {
  margin-top: 2rem;
  font-size: 1.2rem;
  font-weight: 600;
}

.content ul, .content ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
  color: var(--text-secondary);
}

.content li {
  margin-bottom: 0.5rem;
}

/* ==========================================
   TEXT UTILITIES
   ========================================== */
.text-center {
  text-align: center;
  margin-top: 2.5rem;
}

/* ==========================================
   FOOTER
   ========================================== */
.site-footer {
  background: var(--text);
  color: rgba(255,255,255,0.6);
  padding: 4rem 0 1.5rem;
  margin-top: 2rem;
  position: relative;
}

/* Subtle top border glow */
.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.3;
}

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

.footer-col h4 {
  color: white;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  opacity: 0.7;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 0.6rem;
}

.footer-col a {
  color: rgba(255,255,255,0.55);
  font-size: 0.9rem;
  transition: all 0.2s;
}

.footer-col a:hover {
  color: white;
  padding-left: 3px;
}

.contact-info li {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.55);
  line-height: 1.6;
}

.contact-info a {
  color: rgba(255,255,255,0.7);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.35);
}

/* ==========================================
   LIST PAGES (generic fallback)
   ========================================== */
.list-item {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-light);
}

.list-item:last-child { border-bottom: none; }

.list-item h2 {
  font-family: var(--font-display);
  text-align: left;
  margin-bottom: 0.5rem;
  font-size: 1.3rem;
}

.list-item h2::after { display: none; }

.list-item h2 a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s;
}

.list-item h2 a:hover {
  color: var(--primary);
}

.list-item p {
  color: var(--text-secondary);
  font-size: 0.92rem;
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 1024px) {
  .hero .container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }
  .hero-content .hero-sub {
    margin: 0 auto 2rem;
    max-width: 520px;
  }
  .hero-ctas { justify-content: center; }
  .hero-content h1 { font-size: 2.5rem; }
  .hero-product-img { max-height: 260px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}

@media (max-width: 768px) {
  :root { --section-gap: 3.5rem; }
  .container { padding: 0 1.25rem; }

  .site-header { padding: 0.6rem 0; }

  .logo-text { font-size: 1.3rem; }
  .main-nav ul { 
    gap: 0.25rem; 
    flex-wrap: wrap; 
    justify-content: center; 
  }
  .main-nav a { padding: 0.35rem 0.5rem; font-size: 0.82rem; }

  .hero { padding: 3rem 0; min-height: auto; }
  .hero-content h1 { font-size: 2rem; }
  .hero-product-img { max-height: 200px; }
  .hero-sub { font-size: 1rem; }

  .section h2 { font-size: 1.6rem; margin-bottom: 2rem; }
  .product-grid { grid-template-columns: 1fr; }
  .product-detail { grid-template-columns: 1fr; gap: 2rem; }

  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
}

/* ==========================================
   PRODUCT BANNER IMAGE (cropped headers)
   ========================================== */
.product-header-img {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border-light);
  padding: 2rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-header-img .container {
  display: flex;
  justify-content: center;
}
.product-banner {
  max-height: 220px;
  width: auto;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

/* ==========================================
   TABLES (for product catalog data)
   ========================================== */
.content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
  background: var(--bg-alt);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.content thead {
  background: var(--primary);
  color: white;
}
.content th {
  padding: 0.7rem 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.content td {
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--border-light);
}
.content tbody tr:hover {
  background: var(--primary-glow);
}
.content tbody tr:last-child td {
  border-bottom: none;
}

/* ==========================================
   DATA-REFERENCE IMAGE (fallback download)
   ========================================== */
.data-reference {
  margin: 2rem 0;
  background: var(--bg-warm);
  border: 1px dashed var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  text-align: center;
}
.data-reference img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  margin-bottom: 0.5rem;
}
.data-reference .caption {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
}

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

@media (max-width: 1024px) {
  .content table { font-size: 0.82rem; }
  .content th, .content td { padding: 0.5rem 0.75rem; }
}
@media (max-width: 768px) {
  .product-banner { max-height: 160px; }
  .content table { font-size: 0.75rem; }
  .content th, .content td { padding: 0.4rem 0.5rem; }
}

@media (max-width: 480px) {
  .main-nav a { font-size: 0.75rem; padding: 0.3rem 0.4rem; }
  .hero-content h1 { font-size: 1.6rem; }
  .btn { padding: 0.7rem 1.4rem; font-size: 0.88rem; }
  .product-card-img { height: 180px; padding: 1.25rem; }
}
