/* ========================================
   TitanEdge — Main Stylesheet
   ======================================== */

/* --- Reset & Base --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  color: #e0e0e0;
  background: #0a0a0f;
  line-height: 1.6;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; transition: color .2s; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* --- Typography --- */
h1, h2, h3, h4 { font-weight: 700; line-height: 1.25; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: 1.25rem; }
.section-title {
  text-align: center;
  margin-bottom: 56px;
}
.section-title h2 {
  color: #fff;
  margin-bottom: 12px;
}
.section-title p {
  color: #888;
  font-size: 1.05rem;
  max-width: 560px;
  margin: 0 auto;
}
.accent { color: #00d4ff; }
.accent-orange { color: #ff6a00; }

/* --- Header / Navbar --- */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(10, 10, 15, .82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255,255,255,.06);
  transition: background .3s;
}
.header.scrolled { background: rgba(10, 10, 15, .96); }
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: #fff;
}
.logo svg { width: 36px; height: 36px; }
.nav-links { display: flex; gap: 32px; }
.nav-links a {
  font-size: .95rem;
  color: #aaa;
  position: relative;
  padding: 4px 0;
  transition: color .2s;
}
.nav-links a:hover,
.nav-links a.active { color: #fff; }
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 2px;
  background: #00d4ff;
  transition: width .25s;
}
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }
.nav-cta {
  background: linear-gradient(135deg, #00d4ff, #0080ff);
  color: #fff !important;
  padding: 10px 24px;
  border-radius: 6px;
  font-weight: 600;
  font-size: .9rem;
  transition: transform .2s, box-shadow .2s;
}
.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(0, 212, 255, .35);
}
.nav-cta::after { display: none !important; }

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  margin: 5px 0;
  transition: .3s;
  border-radius: 2px;
}

/* --- Hero --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: 72px;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 70% 40%, rgba(0, 100, 255, .12), transparent),
    radial-gradient(ellipse 60% 50% at 20% 60%, rgba(0, 212, 255, .08), transparent);
}
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black 30%, transparent 70%);
}
.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 60px;
  width: 100%;
}
.hero-text { flex: 1; }
.hero-text .badge {
  display: inline-block;
  background: rgba(0, 212, 255, .1);
  border: 1px solid rgba(0, 212, 255, .25);
  color: #00d4ff;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: .82rem;
  font-weight: 600;
  margin-bottom: 24px;
  letter-spacing: .5px;
}
.hero-text h1 {
  color: #fff;
  margin-bottom: 20px;
  line-height: 1.15;
}
.hero-text h1 span {
  background: linear-gradient(135deg, #00d4ff, #0080ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-text p {
  color: #999;
  font-size: 1.1rem;
  max-width: 520px;
  margin-bottom: 36px;
  line-height: 1.8;
}
.hero-btns { display: flex; gap: 16px; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 8px;
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: transform .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: linear-gradient(135deg, #00d4ff, #0080ff);
  color: #fff;
  box-shadow: 0 4px 24px rgba(0, 128, 255, .3);
}
.btn-primary:hover { box-shadow: 0 6px 32px rgba(0, 128, 255, .45); }
.btn-outline {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,.2);
}
.btn-outline:hover {
  border-color: #00d4ff;
  color: #00d4ff;
  box-shadow: 0 0 20px rgba(0, 212, 255, .15);
}
.hero-visual {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}
.hero-server-icon {
  width: 340px;
  height: 340px;
  position: relative;
}
.hero-server-icon svg { width: 100%; height: 100%; }
.hero-glow {
  position: absolute;
  width: 300px; height: 300px;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(0, 128, 255, .2), transparent 70%);
  border-radius: 50%;
  animation: pulse 3s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: .6; }
  50% { transform: translate(-50%, -50%) scale(1.15); opacity: 1; }
}

/* --- Stats --- */
.stats {
  padding: 60px 0;
  border-top: 1px solid rgba(255,255,255,.06);
  border-bottom: 1px solid rgba(255,255,255,.06);
  background: rgba(255,255,255,.015);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  text-align: center;
}
.stat-item h3 {
  font-size: 2.4rem;
  font-weight: 800;
  background: linear-gradient(135deg, #00d4ff, #0080ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}
.stat-item p { color: #888; font-size: .9rem; }

/* --- Products --- */
.products {
  padding: 100px 0;
}
.product-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}
.product-tab {
  padding: 10px 28px;
  border-radius: 6px;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,.1);
  background: transparent;
  color: #aaa;
  transition: all .2s;
}
.product-tab:hover { border-color: rgba(0, 212, 255, .3); color: #fff; }
.product-tab.active {
  background: linear-gradient(135deg, #00d4ff, #0080ff);
  color: #fff;
  border-color: transparent;
}
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 28px;
}
.product-card {
  background: linear-gradient(145deg, rgba(255,255,255,.04), rgba(255,255,255,.01));
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 16px;
  padding: 32px;
  transition: transform .3s, border-color .3s, box-shadow .3s;
  position: relative;
  overflow: hidden;
}
.product-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #00d4ff, #0080ff);
  opacity: 0;
  transition: opacity .3s;
}
.product-card:hover {
  transform: translateY(-6px);
  border-color: rgba(0, 212, 255, .2);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .4);
}
.product-card:hover::before { opacity: 1; }
.product-icon {
  width: 56px; height: 56px;
  background: rgba(0, 212, 255, .08);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.product-icon svg { width: 28px; height: 28px; color: #00d4ff; }
.product-card h3 {
  color: #fff;
  margin-bottom: 8px;
}
.product-card .product-specs {
  color: #888;
  font-size: .88rem;
  margin-bottom: 16px;
  line-height: 1.7;
}
.product-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 20px;
}
.product-price .price {
  font-size: 1.5rem;
  font-weight: 800;
  color: #00d4ff;
}
.product-price .unit {
  color: #666;
  font-size: .85rem;
}
.product-card .tag {
  display: inline-block;
  background: rgba(255, 106, 0, .12);
  color: #ff6a00;
  font-size: .75rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 4px;
  margin-bottom: 16px;
}
.product-card .btn {
  width: 100%;
  justify-content: center;
  padding: 12px;
  font-size: .88rem;
}

/* --- Advantages --- */
.advantages {
  padding: 100px 0;
  background: rgba(255,255,255,.015);
}
.adv-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.adv-card {
  text-align: center;
  padding: 40px 28px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.06);
  background: rgba(10, 10, 15, .6);
  transition: transform .3s, border-color .3s;
}
.adv-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 212, 255, .2);
}
.adv-icon {
  width: 64px; height: 64px;
  margin: 0 auto 20px;
  background: rgba(0, 212, 255, .06);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.adv-icon svg { width: 30px; height: 30px; color: #00d4ff; }
.adv-card h3 { color: #fff; margin-bottom: 10px; }
.adv-card p { color: #888; font-size: .9rem; line-height: 1.7; }

/* --- Solutions --- */
.solutions {
  padding: 100px 0;
}
.sol-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}
.sol-card {
  padding: 36px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.07);
  background: linear-gradient(145deg, rgba(255,255,255,.03), rgba(255,255,255,.005));
  display: flex;
  gap: 24px;
  align-items: flex-start;
  transition: transform .3s, border-color .3s;
}
.sol-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 212, 255, .2);
}
.sol-icon {
  flex-shrink: 0;
  width: 52px; height: 52px;
  background: rgba(0, 128, 255, .08);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sol-icon svg { width: 26px; height: 26px; color: #00d4ff; }
.sol-card h3 { color: #fff; margin-bottom: 8px; }
.sol-card p { color: #888; font-size: .9rem; line-height: 1.7; }

/* --- Partners --- */
.partners {
  padding: 80px 0;
  background: rgba(255,255,255,.015);
  border-top: 1px solid rgba(255,255,255,.06);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.partners-logos {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 48px;
}
.partner-logo {
  font-size: 1.3rem;
  font-weight: 700;
  color: #444;
  letter-spacing: 2px;
  transition: color .2s;
}
.partner-logo:hover { color: #888; }

/* --- Contact --- */
.contact {
  padding: 100px 0;
}
.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
}
.contact-info h2 {
  color: #fff;
  margin-bottom: 16px;
}
.contact-info > p {
  color: #888;
  margin-bottom: 36px;
  line-height: 1.8;
}
.contact-details { display: flex; flex-direction: column; gap: 20px; }
.contact-item {
  display: flex;
  align-items: center;
  gap: 16px;
}
.contact-item-icon {
  width: 44px; height: 44px;
  background: rgba(0, 212, 255, .08);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.contact-item-icon svg { width: 20px; height: 20px; color: #00d4ff; }
.contact-item-text strong { display: block; color: #fff; font-size: .9rem; margin-bottom: 2px; }
.contact-item-text span { color: #888; font-size: .88rem; }
.contact-form {
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 16px;
  padding: 36px;
}
.form-group {
  margin-bottom: 20px;
}
.form-group label {
  display: block;
  color: #ccc;
  font-size: .88rem;
  margin-bottom: 8px;
  font-weight: 500;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  color: #e0e0e0;
  font-size: .9rem;
  font-family: inherit;
  outline: none;
  transition: border-color .2s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: #00d4ff;
}
.form-group textarea { resize: vertical; min-height: 100px; }
.form-group select option { background: #1a1a2e; }
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.contact-form .btn {
  width: 100%;
  justify-content: center;
  margin-top: 4px;
}

/* --- Footer --- */
.footer {
  padding: 60px 0 30px;
  border-top: 1px solid rgba(255,255,255,.06);
  background: rgba(0, 0, 0, .3);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-brand .logo { margin-bottom: 16px; }
.footer-brand p { color: #666; font-size: .88rem; line-height: 1.8; max-width: 300px; }
.footer-col h4 {
  color: #fff;
  font-size: .9rem;
  margin-bottom: 16px;
  font-weight: 600;
}
.footer-col a {
  display: block;
  color: #666;
  font-size: .85rem;
  padding: 4px 0;
  transition: color .2s;
}
.footer-col a:hover { color: #00d4ff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.06);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #444;
  font-size: .82rem;
}
.footer-bottom-links { display: flex; gap: 24px; }
.footer-bottom-links a { color: #444; transition: color .2s; }
.footer-bottom-links a:hover { color: #888; }

/* --- Back to Top --- */
.back-top {
  position: fixed;
  bottom: 32px; right: 32px;
  width: 44px; height: 44px;
  background: rgba(0, 128, 255, .8);
  border: none;
  border-radius: 10px;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all .3s;
  z-index: 999;
}
.back-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.back-top:hover { background: #00d4ff; }
.back-top svg { width: 20px; height: 20px; }

/* --- Animations --- */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .6s ease, transform .6s ease;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .hero-content { flex-direction: column; text-align: center; }
  .hero-text p { margin-left: auto; margin-right: auto; }
  .hero-btns { justify-content: center; }
  .hero-server-icon { width: 260px; height: 260px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .adv-grid { grid-template-columns: repeat(2, 1fr); }
  .sol-grid { grid-template-columns: 1fr; }
  .contact-wrapper { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 72px; left: 0; right: 0;
    background: rgba(10, 10, 15, .98);
    padding: 24px;
    gap: 16px;
    border-bottom: 1px solid rgba(255,255,255,.06);
  }
  .menu-toggle { display: block; }
  .hero { min-height: auto; padding: 120px 0 80px; }
  .hero-visual { display: none; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .stat-item h3 { font-size: 1.8rem; }
  .products-grid { grid-template-columns: 1fr; }
  .adv-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
  .partners-logos { gap: 28px; }
}
