/* ===== TiGen Product Page ===== */

:root {
  --bg-dark: #0a0b10;
  --bg-card: #111418;
  --bg-surface: #161a20;
  --green: #5bb370;
  --green-light: #7acc8e;
  --gold: #c9a84c;
  --gold-light: #e0c068;
  --text-primary: #e8e4d9;
  --text-muted: #9a9080;
  --text-dim: #6a6258;
  --border: #2a2d35;
}

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

body {
  font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--green); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--green-light); }


/* ===== Sections ===== */
.tg-section {
  padding: 5rem 2rem;
}
.tg-section-inner {
  max-width: 1100px; margin: 0 auto;
}
.section-eyebrow {
  text-transform: uppercase; letter-spacing: 3px;
  font-size: 0.75rem; color: var(--green); font-weight: 600;
  text-align: center; margin-bottom: 0.75rem;
}
.tg-section-title {
  font-size: 2rem; font-weight: 700; text-align: center;
  margin-bottom: 1rem; color: var(--text-primary);
}
.green-rule {
  width: 60px; height: 2px; background: var(--green);
  margin: 0 auto 2.5rem; border: none;
}

/* ===== Hero ===== */
.tg-hero {
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; padding: 6rem 2rem 4rem;
  background:
    radial-gradient(ellipse at 30% 40%, rgba(91, 179, 112, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 60%, rgba(201, 168, 76, 0.04) 0%, transparent 60%),
    var(--bg-dark);
}
.tg-hero-logo {
  max-width: 420px; width: 100%; height: auto;
  margin-bottom: 1.5rem;
}
.tg-hero-tagline {
  font-size: 1.2rem; color: var(--text-muted);
  max-width: 600px; margin-bottom: 2rem; line-height: 1.8;
}
.tg-hero-stats {
  display: flex; gap: 3rem; flex-wrap: wrap;
  justify-content: center; margin-top: 1rem;
}
.tg-hero-stat {
  text-align: center;
}
.tg-hero-stat-num {
  display: block; font-size: 2rem; font-weight: 700;
  color: var(--green); line-height: 1.2;
}
.tg-hero-stat-label {
  font-size: 0.8rem; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 1px;
}

/* ===== Overview ===== */
.tg-overview-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 3rem; align-items: center; margin-top: 2rem;
}
.tg-overview-text p {
  color: var(--text-muted); margin-bottom: 1rem; font-size: 1.05rem;
}
.tg-overview-text p strong { color: var(--text-primary); }
.tg-overview-image {
  border-radius: 8px; overflow: hidden;
  border: 1px solid var(--border);
}
.tg-overview-image img {
  width: 100%; height: auto; display: block;
}

/* ===== Pipeline ===== */
.tg-pipeline {
  background: var(--bg-surface);
}
.tg-pipeline-diagram {
  margin-top: 2rem; overflow-x: auto; padding: 1rem 0;
}
.tg-pipeline-diagram img {
  width: 100%; min-width: 700px; height: auto;
}

/* ===== Biome Gallery ===== */
.tg-biome-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem; margin-top: 2rem;
}
.tg-biome-card {
  background: var(--bg-card); border-radius: 8px; overflow: hidden;
  border: 1px solid var(--border); transition: border-color 0.2s;
}
.tg-biome-card:hover { border-color: var(--green); }
.tg-biome-card img {
  width: 100%; height: auto; display: block;
  aspect-ratio: 16/9; object-fit: cover;
}
.tg-biome-card-label {
  padding: 0.75rem 1rem;
  font-size: 0.85rem; font-weight: 600; color: var(--text-muted);
  text-align: center;
}

/* ===== Sprite Showcase ===== */
.tg-sprites {
  background: var(--bg-surface);
}
.tg-sprite-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem; margin-top: 2rem;
}
.tg-sprite-card {
  background: var(--bg-card); border-radius: 8px; overflow: hidden;
  border: 1px solid var(--border); padding: 1rem;
  text-align: center; transition: border-color 0.2s;
}
.tg-sprite-card:hover { border-color: var(--green); }
.tg-sprite-card img {
  width: 100%; height: auto; display: block;
  image-rendering: pixelated;
  border-radius: 4px;
}
.tg-sprite-card-label {
  margin-top: 0.75rem;
  font-size: 0.8rem; font-weight: 600; color: var(--text-muted);
}

/* ===== Stats ===== */
.tg-stats-grid {
  display: grid; grid-template-columns: repeat(5, 1fr);
  gap: 1.5rem; margin-top: 2rem; text-align: center;
}
.tg-stat-num {
  display: block; font-size: 2.4rem; font-weight: 700;
  color: var(--green); line-height: 1.2;
}
.tg-stat-label {
  font-size: 0.85rem; color: var(--text-muted);
  margin-top: 0.25rem;
}

/* ===== Tech ===== */
.tg-tech-grid {
  display: flex; gap: 1.5rem; flex-wrap: wrap;
  justify-content: center; margin-top: 2rem;
}
.tg-tech-tag {
  background: var(--bg-card); border: 1px solid var(--border);
  padding: 0.6rem 1.25rem; border-radius: 6px;
  font-size: 0.9rem; color: var(--text-primary); font-weight: 500;
}

/* ===== Used In ===== */
.tg-used-in {
  background: var(--bg-surface);
}
.tg-used-in-card {
  max-width: 600px; margin: 2rem auto 0;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 8px; overflow: hidden;
  display: flex; align-items: center; gap: 1.5rem;
  padding: 1.5rem; transition: border-color 0.2s;
}
.tg-used-in-card:hover { border-color: var(--gold); }
.tg-used-in-card img {
  width: 80px; height: 80px; border-radius: 6px; object-fit: cover;
}
.tg-used-in-card h3 {
  font-size: 1.1rem; margin-bottom: 0.25rem;
}
.tg-used-in-card h3 a { color: var(--gold); }
.tg-used-in-card h3 a:hover { color: var(--gold-light); }
.tg-used-in-card p {
  font-size: 0.9rem; color: var(--text-muted);
}

/* ===== Footer ===== */
.tg-footer {
  padding: 2rem; text-align: center;
  border-top: 1px solid var(--border);
}
.tg-footer a {
  color: var(--text-muted); font-size: 0.9rem;
  text-decoration: none; display: block; margin-bottom: 0.75rem;
}
.tg-footer a:hover { color: var(--text-primary); }
.tg-footer p {
  color: var(--text-dim); font-size: 0.8rem;
}

/* ===== Fade-in animation ===== */
.fade-in {
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
  opacity: 1; transform: translateY(0);
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .tg-overview-grid { grid-template-columns: 1fr; }
  .tg-biome-grid { grid-template-columns: repeat(2, 1fr); }
  .tg-sprite-grid { grid-template-columns: repeat(2, 1fr); }
  .tg-stats-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 600px) {
  .tg-hero { padding: 5rem 1.5rem 3rem; min-height: auto; }
  .tg-hero-stats { gap: 1.5rem; }
  .tg-section { padding: 3rem 1.5rem; }
  .tg-biome-grid { grid-template-columns: 1fr; }
  .tg-sprite-grid { grid-template-columns: 1fr; }
  .tg-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .tg-used-in-card { flex-direction: column; text-align: center; }
}
