/* ==========================================================================
   TEKTHRILL TECHNOLOGIES - 3D UI & ENTERPRISE ECOSYSTEM STYLESHEET
   ========================================================================== */

:root {
  --bg-dark: #030308;
  --bg-dark-alt: #080812;
  --bg-card: rgba(12, 12, 24, 0.65);
  --bg-card-hover: rgba(20, 20, 38, 0.85);

  --accent-cyan: #06b6d4;
  --accent-purple: #7c3aed;
  --accent-rose: #f43f5e;
  --accent-emerald: #10b981;
  --accent-yellow: #f59e0b;

  --gradient-main: linear-gradient(135deg, #7c3aed 0%, #06b6d4 50%, #f43f5e 100%);
  --gradient-cyan: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
  --gradient-purple: linear-gradient(135deg, #7c3aed 0%, #a78bfa 100%);
  --gradient-rose: linear-gradient(135deg, #f43f5e 0%, #fb7185 100%);

  --glow-purple: rgba(124, 58, 237, 0.35);
  --glow-cyan: rgba(6, 182, 212, 0.35);
  --glow-rose: rgba(244, 63, 94, 0.35);

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --border-color: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.2);

  --font-heading: 'Space Grotesk', sans-serif;
  --font-body: 'Outfit', 'Inter', sans-serif;

  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
}

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

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   3D Canvas & Ambient Backgrounds
   ========================================================================== */

#three-bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  opacity: 0.85;
}

.ambient-glow {
  position: fixed;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(140px);
  z-index: 0;
  opacity: 0.22;
}

.glow-1 {
  top: -10%;
  left: 15%;
  width: 600px;
  height: 600px;
  background: var(--accent-purple);
}

.glow-2 {
  top: 40%;
  right: -10%;
  width: 650px;
  height: 650px;
  background: var(--accent-cyan);
}

.glow-3 {
  bottom: 5%;
  left: -10%;
  width: 550px;
  height: 550px;
  background: var(--accent-rose);
}

/* ==========================================================================
   Typography & Utilities
   ========================================================================== */

h1, h2, h3, h4, h5 {
  font-family: var(--font-heading);
  line-height: 1.2;
}

.gradient-text {
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-accent {
  color: var(--accent-cyan);
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 2;
}

.section-padding {
  padding: 100px 0;
}

.dark-bg-alt {
  background: linear-gradient(180deg, transparent 0%, rgba(8, 8, 18, 0.8) 50%, transparent 100%);
}

.section-header {
  text-align: center;
  max-width: 750px;
  margin: 0 auto 60px;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 100px;
  background: rgba(124, 58, 237, 0.12);
  border: 1px solid rgba(124, 58, 237, 0.3);
  color: var(--accent-cyan);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 700;
  margin-bottom: 16px;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1.15rem;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */

header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(3, 3, 8, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
}

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

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-main);
}

.logo-icon-wrap {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--gradient-main);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px var(--glow-purple);
}

.brand-icon {
  width: 24px;
  height: 24px;
  color: #fff;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.brand-sub {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  font-weight: 600;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.25s ease;
}

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

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 1.5rem;
  cursor: pointer;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-nav {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 10px 20px;
  border-radius: 100px;
}

.btn-nav:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 15px var(--glow-cyan);
}

.btn-primary {
  background: var(--gradient-main);
  color: #fff;
  box-shadow: 0 4px 25px var(--glow-purple);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 35px var(--glow-purple), 0 0 20px var(--glow-cyan);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-hover);
  transform: translateY(-3px);
}

.glass-btn {
  backdrop-filter: blur(12px);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero-section {
  position: relative;
  z-index: 2;
  padding: 180px 24px 100px;
  text-align: center;
  display: flex;
  justify-content: center;
}

.hero-container {
  max-width: 900px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 20px;
  border-radius: 100px;
  background: rgba(124, 58, 237, 0.15);
  border: 1px solid rgba(124, 58, 237, 0.35);
  color: var(--accent-cyan);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 24px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-emerald);
  box-shadow: 0 0 10px var(--accent-emerald);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(0.8); opacity: 0.4; }
}

.hero-title {
  font-size: clamp(2.5rem, 5.5vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}

.hero-subtitle {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--text-muted);
  max-width: 720px;
  margin: 0 auto 40px;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 60px;
}

/* Metrics Ticker */
.metrics-ticker {
  display: inline-flex;
  align-items: center;
  justify-content: space-around;
  gap: 32px;
  padding: 20px 40px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(20px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  flex-wrap: wrap;
}

.metric-card {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.metric-number {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--accent-cyan);
}

.metric-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.metric-divider {
  width: 1px;
  height: 40px;
  background: var(--border-color);
}

/* ==========================================================================
   Ecosystem Product Showcase Cards
   ========================================================================== */

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 32px;
}

.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(20px);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.glass-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-8px);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
}

.product-card {
  padding: 36px;
  display: flex;
  flex-direction: column;
}

.card-glow-bg {
  position: absolute;
  top: -50px;
  right: -50px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.3;
  pointer-events: none;
}

.glow-cyan { background: var(--accent-cyan); }
.glow-purple { background: var(--accent-purple); }
.glow-rose { background: var(--accent-rose); }

.card-badge {
  align-self: flex-start;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 12px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  margin-bottom: 20px;
}

.card-icon-box {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.card-icon-box svg {
  width: 28px;
  height: 28px;
  color: #fff;
}

.icon-cyan { background: var(--gradient-cyan); box-shadow: 0 0 20px var(--glow-cyan); }
.icon-purple { background: var(--gradient-purple); box-shadow: 0 0 20px var(--glow-purple); }
.icon-rose { background: var(--gradient-rose); box-shadow: 0 0 20px var(--glow-rose); }

.card-title {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.card-domain {
  font-size: 0.85rem;
  color: var(--accent-cyan);
  font-family: monospace;
  margin-bottom: 16px;
}

.card-description {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 24px;
  flex-grow: 1;
}

.card-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 32px;
}

.card-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--text-main);
}

.card-features li svg {
  width: 16px;
  height: 16px;
  color: var(--accent-emerald);
}

.card-footer {
  margin-top: auto;
}

.card-actions-dual {
  display: flex;
  gap: 12px;
}

.btn-card {
  width: 100%;
  justify-content: center;
}

.btn-cyan { background: var(--gradient-cyan); color: #fff; }
.btn-purple { background: var(--gradient-purple); color: #fff; }
.btn-rose { background: var(--gradient-rose); color: #fff; }

/* ==========================================================================
   3D Viewport Demo Section
   ========================================================================== */

.viewport-3d-wrapper {
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.8), 0 0 40px var(--glow-purple);
}

.viewport-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: rgba(10, 10, 20, 0.9);
  border-bottom: 1px solid var(--border-color);
  flex-wrap: wrap;
  gap: 16px;
}

.window-controls {
  display: flex;
  gap: 8px;
}

.control-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.dot-red { background-color: #ff5f57; }
.dot-yellow { background-color: #ffbd2e; }
.dot-green { background-color: #28c840; }

.viewport-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: monospace;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.viewport-controls {
  display: flex;
  gap: 10px;
}

.vp-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.vp-btn:hover, .vp-btn.active {
  background: rgba(124, 58, 237, 0.2);
  border-color: var(--accent-purple);
  color: #fff;
}

.viewport-body {
  position: relative;
  width: 100%;
  height: 520px;
  background: #020206;
}

#interactive-3d-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.viewport-overlay-stats {
  position: absolute;
  bottom: 16px;
  left: 24px;
  right: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: rgba(5, 5, 12, 0.8);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-family: monospace;
  font-size: 0.8rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 12px;
}

.stat-lbl {
  color: var(--text-dim);
  margin-right: 4px;
}

.status-live {
  color: var(--accent-emerald);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
}

.status-live svg {
  width: 14px;
  height: 14px;
}

/* ==========================================================================
   Features / Architecture Grid
   ========================================================================== */

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.feature-card {
  padding: 32px;
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.feature-icon svg {
  width: 24px;
  height: 24px;
  color: var(--accent-cyan);
}

.feature-card h4 {
  font-size: 1.25rem;
  margin-bottom: 10px;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.92rem;
}

/* ==========================================================================
   Downloads Section
   ========================================================================== */

.downloads-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.download-card {
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.dl-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(124, 58, 237, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
}

.dl-icon svg {
  width: 24px;
  height: 24px;
  color: var(--accent-purple);
}

.dl-info h4 {
  font-size: 1.15rem;
  margin-bottom: 4px;
}

.dl-info p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Footer
   ========================================================================== */

footer {
  background: #020205;
  border-top: 1px solid var(--border-color);
  padding: 80px 0 40px;
  position: relative;
  z-index: 2;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  gap: 60px;
  margin-bottom: 60px;
  flex-wrap: wrap;
}

.footer-brand {
  max-width: 400px;
}

.footer-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 16px;
}

.footer-links-group {
  display: flex;
  gap: 80px;
  flex-wrap: wrap;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer-col h5 {
  font-size: 1rem;
  color: var(--text-main);
}

.footer-col a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color 0.2s ease;
}

.footer-col a:hover {
  color: var(--accent-cyan);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 32px;
  border-top: 1px solid var(--border-color);
  color: var(--text-dim);
  font-size: 0.85rem;
  flex-wrap: wrap;
  gap: 16px;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

@media (max-width: 900px) {
  .nav-links {
    display: none;
  }
  .mobile-toggle {
    display: block;
  }
  .hero-section {
    padding: 130px 20px 60px;
  }
  .metrics-ticker {
    flex-direction: column;
    gap: 16px;
  }
  .metric-divider {
    display: none;
  }
  .viewport-body {
    height: 380px;
  }
}
