* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: #0f1219;
  color: #e1e7f0;
  line-height: 1.5;
  scroll-behavior: smooth;
  overflow-x: hidden; /* Prevents horizontal scroll */
  width: 100%;
  position: relative;
}

/* color palette */
:root {
  --bg-primary: #0f1219;
  --bg-secondary: #181c25;
  --accent: #f9a91f;
  --accent-dim: #c48512;
  --text-light: #f0f4fa;
  --text-muted: #9aa6b9;
  --border-dark: #262e3c;
  --card-bg: #181c25;
  --glow: rgba(249, 169, 31, 0.25);
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
  width: 100%; /* Ensures container doesn't exceed parent width */
  overflow: hidden; /* Prevents any child overflow */
}

/* typography */
.section-title {
  font-size: 2.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(to right, #ffffff, #e0e7ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 16px;
  word-wrap: break-word; /* Prevents long words from causing overflow */
}

.section-sub {
  color: var(--text-muted);
  font-size: 1.2rem;
  max-width: 600px;
  margin-bottom: 48px;
  width: 100%; /* Ensures full width utilization without overflow */
}

.badge-pill {
  background: #262e3c;
  color: var(--accent);
  padding: 6px 18px;
  border-radius: 60px;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.3px;
  display: inline-block;
  border: 1px solid #3e4a5d;
  margin-bottom: 20px;
  max-width: 100%; /* Prevents badge from overflowing */
  white-space: normal; /* Allows text to wrap if needed */
  word-break: break-word;
}

/* navbar */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 32px;
  max-width: 1400px;
  margin: 0 auto;
  flex-wrap: wrap;
  gap: 20px;
  width: 100%;
}

.logo {
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  max-width: 100%; /* Prevents logo from pushing boundaries */
}
.logo .tief { color: white; }
.logo .pos { color: var(--accent); }
.logo .tieflab { 
  font-size: 0.9rem; 
  background: #262e3c; 
  padding: 4px 10px; 
  border-radius: 40px; 
  margin-left: 12px; 
  font-weight: 500; 
  color: #b7c4d9;
  white-space: nowrap; /* Keeps badge text in one line */
}

.nav-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
.nav-links a {
  text-decoration: none;
  font-weight: 500;
  color: #cbd5e1;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--accent); }

/* buttons */
.btn {
  display: inline-block;
  padding: 12px 32px;
  border-radius: 60px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  border: 1.5px solid transparent;
  max-width: 100%; /* Ensures buttons don't overflow */
  text-align: center;
}
.btn-primary {
  background: var(--accent);
  color: #0f1219;
  box-shadow: 0 8px 20px var(--glow);
}
.btn-primary:hover {
  background: #f9b53f;
  transform: translateY(-3px);
  box-shadow: 0 16px 28px rgba(249, 169, 31, 0.4);
}
.btn-outline {
  border-color: var(--accent);
  color: var(--accent);
  background: transparent;
  margin-left: 16px;
}
.btn-outline:hover {
  background: var(--accent);
  color: #0f1219;
}

/* hero */
.hero {
  padding: 40px 0 80px;
  width: 100%;
  overflow-x: hidden; /* Prevents any child from causing horizontal scroll */
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
  width: 100%; /* Ensures grid stays within container */
}
.hero h1 {
  font-size: clamp(2.8rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  background: linear-gradient(145deg, #ffffff, #d1ddf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 24px;
  word-wrap: break-word;
}
.hero-desc {
  font-size: 1.3rem;
  color: #a6b3cc;
  margin-bottom: 32px;
  max-width: 90%;
  width: 100%;
}
.hero-stats {
  display: flex;
  gap: 40px;
  margin-top: 40px;
  flex-wrap: wrap;
  width: 100%;
}
.stat-item h3 {
  font-size: 2rem;
  font-weight: 700;
  color: white;
}
.stat-item span { color: var(--text-muted); font-size: 0.95rem; }

/* feature card generic */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  width: 100%; /* Ensures grid doesn't exceed container */
}
.feature-card {
  background: var(--bg-secondary);
  padding: 32px 28px;
  border-radius: 32px;
  border: 1px solid #262e3c;
  transition: all 0.25s;
  width: 100%; /* Cards stay within their grid cell */
  overflow: hidden; /* Prevents internal content from spilling */
}
.feature-card:hover {
  border-color: var(--accent);
  box-shadow: 0 20px 35px -15px #f9a91f20;
}
.feature-icon {
  background: #1f2635;
  width: 64px;
  height: 64px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--accent);
  margin-bottom: 28px;
  flex-shrink: 0; /* Prevents icon from shrinking */
}

/* ----- hybrid cloud section (fully responsive) ----- */
.hybrid-showcase {
  background: var(--bg-secondary);
  border-radius: 80px;
  padding: 60px 40px;
  margin: 80px 0;
  border: 1px solid #262e3c;
  position: relative;
  overflow: hidden; /* Changed from just 'hidden' to handle both overflow and border-radius */
  width: 100%; /* Ensures section stays within parent */
}
.hybrid-showcase::before {
  content: "";
  position: absolute;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, #f9aa1f08 0%, transparent 70%);
  top: -100px;
  right: -100px;
  border-radius: 50%;
  z-index: 0;
  pointer-events: none; /* Prevents pseudo-element from interfering with scrolling */
}
.hybrid-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 40px;
  position: relative;
  z-index: 2;
  flex-wrap: wrap;
  width: 100%;
}
.tieflab-badge {
  background: #2a3344;
  padding: 8px 22px;
  border-radius: 60px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #3f4c62;
  max-width: 100%;
}
.tieflab-badge i { color: var(--accent); font-size: 1.2rem; }
.tieflab-badge span { font-weight: 500; color: #ccd9f0; }
.hybrid-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr;
  gap: 40px;
  align-items: start;
  position: relative;
  z-index: 2;
  width: 100%; /* Grid stays within container */
}
.capability-list-modern {
  list-style: none;
  width: 100%;
}
.capability-list-modern li {
  display: flex;
  gap: 20px;
  margin-bottom: 32px;
  align-items: flex-start;
  width: 100%;
}
.capability-list-modern li i {
  background: #1f2a37;
  width: 48px;
  height: 48px;
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--accent);
  border: 1px solid #374357;
  flex-shrink: 0;
}
.capability-text {
  flex: 1; /* Takes remaining space */
  min-width: 0; /* Allows text to shrink and wrap properly */
}
.capability-text h4 {
  font-size: 1.3rem;
  font-weight: 600;
  color: white;
  margin-bottom: 6px;
  word-wrap: break-word;
}
.capability-text p {
  color: var(--text-muted);
  line-height: 1.5;
  word-wrap: break-word;
}
.powered-cwanda {
  background: #1b212e;
  border-radius: 48px;
  padding: 40px 30px;
  border: 1px solid #303b4d;
  text-align: center;
  width: 100%; /* Stays within grid column */
  overflow: hidden; /* Prevents internal overflow */
}
.cwanda-logo {
  font-size: 2.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, #f9a91f, #ffcd7e);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 16px;
  word-wrap: break-word;
}
.cwanda-logo small { 
  font-size: 1rem; 
  background: none; 
  -webkit-text-fill-color: #b9c8e6; 
  white-space: normal;
}
.cwanda-feature-item {
  background: #252e3d;
  border-radius: 30px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 15px;
  border-left: 4px solid var(--accent);
  text-align: left;
  margin-bottom: 16px;
  width: 100%; /* Prevents overflow */
  overflow: hidden;
}
/* end hybrid section */

/* UX cards */
.ux-showcase {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin: 40px 0;
  width: 100%;
}
.ux-card {
  background: #181c25;
  border-radius: 32px;
  padding: 28px;
  border: 1px solid #262e3c;
  width: 100%; /* Cards stay within their grid cell */
  overflow: hidden;
}
.ux-card i { font-size: 2.4rem; color: var(--accent); margin-bottom: 16px; }

/* pricing */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 30px;
  margin-top: 40px;
  width: 100%;
}
.plan {
  background: var(--bg-secondary);
  border-radius: 40px;
  padding: 36px 28px;
  border: 1px solid #2c3547;
  transition: 0.2s;
  height: fit-content;
  width: 100%; /* Plans stay within grid cells */
  overflow: hidden;
}
.plan.popular {
  border: 2px solid var(--accent);
  background: #181c25;
  box-shadow: 0 15px 30px -12px #f9a91f40;
}
.price {
  font-size: 2.5rem;
  font-weight: 800;
  color: white;
  word-wrap: break-word;
}
.price small { color: #8e9db3; font-size: 1rem; }

/* footer */
.footer {
  background: #0a0d13;
  border-radius: 60px 60px 0 0;
  padding: 60px 0 30px;
  margin-top: 80px;
  border-top: 1px solid #262e3c;
  width: 100%;
  overflow-x: hidden; /* Prevents footer overflow */
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
  width: 100%;
}
.social-links {
  display: flex;
  gap: 24px;
  margin-top: 20px;
  flex-wrap: wrap;
}
.social-links a {
  color: #9aa6b9;
  font-size: 1.8rem;
  transition: all 0.2s;
}
.social-links a:hover { color: var(--accent); transform: translateY(-3px); }

/* go to top button */
#goTopBtn {
  position: fixed;
  bottom: 40px;
  right: 40px;
  width: 56px;
  height: 56px;
  background: var(--accent);
  color: #0f1219;
  border: none;
  border-radius: 60px;
  font-size: 1.8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px var(--glow);
  transition: 0.25s;
  z-index: 999;
  border: 1px solid #ffcd7e;
  opacity: 0;
  visibility: hidden;
}
#goTopBtn.visible {
  opacity: 1;
  visibility: visible;
}
#goTopBtn:hover {
  background: #f9b53f;
  transform: translateY(-6px) scale(1.05);
}

/* responsive fixes */
@media (max-width: 900px) {
  .hero-grid, .hybrid-grid { 
    grid-template-columns: 1fr; 
  }
  .navbar { 
    flex-direction: column; 
    align-items: flex-start; 
  }
  .nav-links { 
    margin-top: 10px; 
  }
  .btn-outline { 
    margin-left: 0; 
    margin-top: 12px; 
  }
  .hero-desc { 
    max-width: 100%; 
  }
  .btn {
    width: 100%; /* Makes buttons full width on mobile to prevent overflow */
    margin-left: 0;
  }
  .hero-stats {
    justify-content: space-between;
  }
}

@media (max-width: 600px) {
  .container { 
    padding: 0 16px; /* Reduced padding for smaller screens */
  }
  .hybrid-showcase { 
    padding: 30px 16px; /* Reduced padding */
    border-radius: 32px; /* Slightly smaller radius */
  }
  .section-title { 
    font-size: 1.8rem; /* Smaller font size for mobile */
  }
  .hero h1 {
    font-size: 2.4rem; /* Smaller hero text on mobile */
  }
  .hero-desc {
    font-size: 1.1rem;
  }
  .stat-item h3 {
    font-size: 1.5rem;
  }
  .capability-list-modern li {
    flex-direction: column; /* Stack icon and text on very small screens */
    align-items: flex-start;
    gap: 12px;
  }
  .logo .tieflab {
    margin-left: 0;
    margin-top: 8px;
  }
  #goTopBtn {
    bottom: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    font-size: 1.4rem;
  }
}