/*
 * Modern and elegant style for Kognox
 * This stylesheet defines a clean layout with a bold colour palette,
 * generous white space and responsive components. It is designed
 * to complement the existing content without introducing any new
 * information.
 */

:root {
  --primary: #2e2153;    /* deep purple used for nav, hero gradient and footer */
  --secondary: #6b4eff;  /* accent purple for icons and buttons */
  --accent: #c7bbf9;     /* light accent for highlights */
  --light-bg: #f5f2fc;   /* subtle background tint for sections */
  --background: #f7f7fb; /* page background */
  --text: #3a3a3a;       /* primary text colour */
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  color: var(--text);
  background-color: var(--background);
  scroll-behavior: smooth;
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background-color: var(--primary);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.logo {
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
}

.nav-menu {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
}

.nav-menu a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  padding: 0.3rem 0;
  transition: color 0.3s ease;
}

.nav-menu a:hover {
  color: var(--accent);
}

/* Hide mobile toggle by default */
.nav-toggle,
.hamburger {
  display: none;
}

/* Hero Section */
.hero {
  min-height: 80vh;
  padding: 6rem 2rem 4rem;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.hero h1 {
  font-size: 2.8rem;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.hero p {
  font-size: 1.2rem;
  max-width: 700px;
  margin: 0 auto 2rem;
  line-height: 1.6;
  color: #ece6f7;
}

.btn {
  display: inline-block;
  background-color: #fff;
  color: var(--primary);
  padding: 0.8rem 1.6rem;
  border-radius: 50px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.btn:hover {
  background-color: var(--accent);
  color: var(--primary);
}

/* Generic section styling */
section {
  padding: 4rem 2rem;
}

section h2 {
  font-size: 2rem;
  text-align: center;
  margin: 0 0 2rem;
  color: var(--primary);
  position: relative;
}

section h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background-color: var(--secondary);
  margin: 0.5rem auto 0;
  border-radius: 2px;
}

/* About Section */
.about p {
  max-width: 900px;
  margin: 0.5rem auto;
  line-height: 1.7;
  font-size: 1.1rem;
}

/* Services Section */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
}

.service-card {
  background-color: #fff;
  border-radius: 12px;
  padding: 2rem 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  text-align: left;
  transition: transform 0.3s ease;
}

.service-card:hover {
  transform: translateY(-6px);
}

.service-icon {
  font-size: 2.5rem;
  color: var(--secondary);
  margin-bottom: 1rem;
}

.service-card h3 {
  margin: 0 0 0.5rem;
  color: var(--primary);
  font-size: 1.3rem;
}

.service-card p {
  margin: 0;
  line-height: 1.6;
  font-size: 0.95rem;
}

/* Stats Section */
.stats {
  background-color: var(--primary);
  color: #fff;
  padding: 4rem 2rem;
}

.stats-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  gap: 2rem;
}

.stat-item {
  flex: 1 1 200px;
  text-align: center;
}

.stat-item .number {
  font-size: 2.6rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--accent);
}

.stat-item .label {
  font-size: 1rem;
}

/* Testimonials Section */
.testimonials {
  background-color: #fff;
}

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

.testimonial {
  background-color: var(--light-bg);
  border-radius: 12px;
  padding: 1.5rem 1.5rem 1.5rem 2rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
  position: relative;
}

.testimonial::before {
  content: '\201C';
  position: absolute;
  top: -10px;
  left: 10px;
  font-size: 4rem;
  color: var(--accent);
}

.testimonial .quote {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.testimonial .author {
  font-weight: 700;
  color: var(--secondary);
}

/* Contact Section */
.contact {
  background-color: var(--light-bg);
}

.contact-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 3rem;
  justify-content: center;
}

.contact-form, .contact-info {
  flex: 1 1 320px;
}

.contact-form {
  background-color: #fff;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.contact-form .form-group {
  margin-bottom: 1rem;
}

.contact-form label {
  font-weight: 600;
  display: block;
  margin-bottom: 0.4rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.6rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 1rem;
}

.contact-form textarea {
  resize: vertical;
}

.contact-form button {
  margin-top: 1rem;
  background-color: var(--secondary);
  color: #fff;
  border: none;
  padding: 0.8rem 1.6rem;
  border-radius: 50px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.contact-form button:hover {
  background-color: var(--primary);
}

.contact-info {
  font-size: 1rem;
  line-height: 1.7;
}

.contact-info h3 {
  margin-top: 0;
  color: var(--primary);
}

.contact-info p {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.contact-info i {
  color: var(--secondary);
}

.contact-info ul {
  list-style: none;
  padding: 0;
  margin: 0.4rem 0 0;
}

.contact-info li {
  margin-bottom: 0.3rem;
}

.social-links a {
  display: inline-block;
  margin-right: 0.8rem;
  font-size: 1.2rem;
  color: var(--secondary);
  transition: color 0.3s ease;
}

.social-links a:hover {
  color: var(--primary);
}

/* Word count indicator under the message textarea */
.word-count {
  font-size: 0.85rem;
  color: #666;
  margin-top: 0.25rem;
  display: block;
}

/* Inline feedback messages after form submission */
.form-message {
  display: none;
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 6px;
  font-size: 0.95rem;
}

.form-message.success {
  background-color: #eaf8ef;
  color: #2e7d32;
  border: 1px solid #a5d6a7;
}

.form-message.error {
  background-color: #fdeaea;
  color: #c62828;
  border: 1px solid #f5c6cb;
}

/* Footer */
footer {
  background-color: var(--primary);
  color: #fff;
  text-align: center;
  padding: 1rem 0;
  font-size: 0.9rem;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 250px;
    height: 100vh;
    background-color: var(--primary);
    flex-direction: column;
    padding-top: 4rem;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    gap: 1.2rem;
  }
  .nav-toggle:checked + .hamburger + .nav-menu {
    transform: translateX(0);
  }
  .nav-toggle,
  .hamburger {
    display: block;
  }
  .hamburger {
    cursor: pointer;
    font-size: 1.6rem;
    color: #fff;
  }
  .services-grid,
  .testimonial-grid {
    grid-template-columns: 1fr;
  }
  .contact-wrapper {
    flex-direction: column;
  }
}