/* Root theme variables */
:root {
  /* Light theme colours */
  --bg-color: #f5f7fb;
  --text-color: #1a1a1a;
  --secondary-text: #616383;
  --primary-color: #5b5fc7;
  --accent-color: #6c72ff;
  --card-bg: #ffffff;
  --hero-overlay: rgba(0, 0, 0, 0.45);
  --input-bg: #ffffff;
  --input-border: #d7d9e4;
}

/* Dark theme overrides */
[data-theme="dark"] {
  --bg-color: #0e1330;
  --text-color: #f0f3ff;
  --secondary-text: #8c8fb3;
  --primary-color: #8b92e8;
  --accent-color: #a5abff;
  --card-bg: #1d234f;
  --hero-overlay: rgba(0, 0, 0, 0.6);
  --input-bg: #1d234f;
  --input-border: #2f386c;
}

body {
  margin: 0;
  font-family: sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  overflow-x: hidden;
}

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

.navbar .logo {
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--primary-color);
}

/* Container that holds navigation, theme toggle and hamburger */
.nav-container {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Navigation links list */
.nav-links {
  /* Horizontal links for larger screens. The gap is modest so links do not spill off the edge. */
  display: flex;
  gap: 1rem;
  /* Remove default list styling and margin/padding so the list stays within the viewport. */
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-color);
  font-weight: 500;
  transition: color 0.2s ease;
}

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


.theme-toggle {
  position: static;
  margin-left: 1rem;
  font-size: 1rem;
  background: none;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  cursor: pointer;
  color: #fff;
  background-color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Secondary CTA button style used in hero */
.cta-button.secondary {
  background-color: var(--card-bg);
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

/* Secondary button hover */
.cta-button.secondary:hover {
  background-color: var(--primary-color);
  color: #fff;
}

/* Hamburger menu */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  background: none;
  border: none;
  cursor: pointer;
  margin-left: 1rem;
}

.hamburger span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: var(--text-color);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Hamburger active state transforms to X */
.hamburger.active span:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
}
.hamburger.active span:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
}

/* Why section */
.why {
  padding: 4rem 2rem;
  background: linear-gradient(180deg, #fdfdff, #eceffc);
  text-align: center;
}

[data-theme="dark"] .why {
  background: linear-gradient(180deg, #0e1330, #1d234f);
}

.why h2 {
  font-size: 2rem;
  margin-bottom: 2rem;
  color: var(--primary-color);
}

.features {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
}

.feature {
  flex: 1 1 240px;
  max-width: 260px;
  background-color: var(--card-bg);
  padding: 1.5rem;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.feature .icon {
  width: 48px;
  height: 48px;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.feature h3 {
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
}

.feature p {
  font-size: 0.9rem;
  color: var(--secondary-text);
}

/* Solutions summary section */
.solutions-summary {
  padding: 4rem 2rem;
  background: linear-gradient(180deg, #eceffc, #e8eaff);
  text-align: center;
}

[data-theme="dark"] .solutions-summary {
  background: linear-gradient(180deg, #1d234f, #0e1330);
}

.solutions-summary h2 {
  font-size: 2rem;
  margin-bottom: 2rem;
  color: var(--primary-color);
}

.solutions-summary .card {
  text-align: left;
}

.link-button {
  display: inline-block;
  margin-top: 1rem;
  color: var(--primary-color);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid var(--primary-color);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.link-button:hover {
  color: var(--accent-color);
  border-color: var(--accent-color);
}

/* Partner call-to-action section */
.partner-cta {
  padding: 4rem 2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #fdfdff, #eceffc);
}

[data-theme="dark"] .partner-cta {
  background: linear-gradient(180deg, #0e1330, #1d234f);
}

.partner-content {
  flex: 1 1 350px;
  max-width: 600px;
  margin-bottom: 2rem;
  color: var(--secondary-text);
}

.partner-content h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.partner-image {
  flex: 1 1 350px;
  min-height: 300px;
  max-width: 500px;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Final call to action section */
.cta {
  padding: 4rem 2rem;
  text-align: center;
  background: linear-gradient(180deg, #eceffc, #e8eaff);
}

[data-theme="dark"] .cta {
  background: linear-gradient(180deg, #1d234f, #0e1330);
}

.cta h2 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: var(--primary-color);
}

/* Page hero sections used on secondary pages */
.page-hero {
  position: relative;
  height: 60vh;
  padding-top: 4rem; /* offset fixed navbar */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.page-hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--hero-overlay);
  z-index: 0;
}

.page-hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  padding: 0 1rem;
}

.page-hero h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.page-hero p {
  font-size: 1.2rem;
}

/* Solution detail sections */
.solution-detail {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2rem;
  padding: 4rem 2rem;
}

.solution-detail .detail-image {
  flex: 1 1 350px;
  min-height: 300px;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.solution-detail .detail-text {
  flex: 1 1 350px;
  max-width: 600px;
  color: var(--secondary-text);
}

.solution-detail .detail-text h2 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.solution-detail.alternate {
  flex-direction: row-reverse;
}

/* Generic info section for partners and model pages */
.info-section {
  padding: 4rem 2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2rem;
  background: linear-gradient(180deg, #fdfdff, #eceffc);
}

[data-theme="dark"] .info-section {
  background: linear-gradient(180deg, #0e1330, #1d234f);
}

.info-section .info-text {
  flex: 1 1 350px;
  max-width: 600px;
  color: var(--secondary-text);
}

.info-section .info-text h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.info-section .info-image {
  flex: 1 1 350px;
  min-height: 300px;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* Contact page wrapper */
.contact-page {
  padding: 4rem 2rem;
  max-width: 600px;
  margin: 0 auto;
}

/* Hero section */
/* Hero section */
.hero {
  /* Occupy most of the viewport so the hero image has room to breathe */
  height: 90vh;
  /* Use a striking photographic backdrop instead of a flat gradient.  The image file lives in the images folder and will
     be served from the deployed site.  A separate overlay element darkens the image for contrast. */
  background-image: url('images/hero.jpg');
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding-top: 5rem; /* allow room for nav */
  text-align: center;
  color: #fff;
}

/* The hero background image element sits behind the overlay and content, filling the entire section.  Using an
   <img> tag (instead of solely relying on CSS backgrounds) ensures the asset loads correctly in contexts such as
   local file previews and Netlify deployments. */
.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--hero-overlay);
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  padding: 0 1rem;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
}

.cta-button {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  background-color: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: 4px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.cta-button:hover {
  background-color: var(--accent-color);
}

/* Solutions section */
.solutions {
  padding: 4rem 2rem 5rem;
  background: linear-gradient(180deg, #fdfdff, #eceffc);
  text-align: center;
}

/* Dark mode overrides for section backgrounds */
[data-theme="dark"] .solutions {
  background: linear-gradient(180deg, #0e1330, #1d234f);
}

[data-theme="dark"] .partners {
  background: linear-gradient(180deg, #1d234f, #0e1330);
}

[data-theme="dark"] .about,
[data-theme="dark"] .contact {
  background: linear-gradient(180deg, #0e1330, #1d234f);
}

/* In dark mode the about section layers a dark gradient over the fibre photograph to maintain legibility while
   adding visual depth. */
[data-theme="dark"] .about {
  background-image: linear-gradient(rgba(14, 19, 48, 0.85), rgba(29, 35, 79, 0.85)), url('images/fiber.jpg');
  background-size: cover;
  background-position: center;
}

.solutions h2 {
  font-size: 2rem;
  margin-bottom: 2rem;
  color: var(--primary-color);
}

.cards {
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
}

.card {
  background-color: var(--card-bg);
  padding: 2rem 1.5rem;
  border-radius: 8px;
  max-width: 300px;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  flex: 1 1 250px;
}

.card .icon {
  width: 48px;
  height: 48px;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.card h3 {
  margin: 0.5rem 0;
  font-size: 1.25rem;
}

.card p {
  color: var(--secondary-text);
  font-size: 0.95rem;
}

/* Partners section */
.partners {
  padding: 4rem 2rem;
  background: linear-gradient(180deg, #eceffc, #e8eaff);
}

.partners h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 2rem;
  color: var(--primary-color);
}

.partners-content {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 2rem;
}

.partners-text {
  flex: 1 1 350px;
  max-width: 600px;
  font-size: 1rem;
  color: var(--secondary-text);
}

.partners-text p {
  margin-bottom: 1rem;
}

.partners-image {
  flex: 1 1 300px;
  max-width: 500px;
  min-height: 300px;
  border-radius: 8px;
  /* Display a dramatic fibre‑optic photograph rather than a simple radial gradient.  The image fills the container
     and scales responsively. */
  background-image: url('images/beam.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* About section */
.about {
  padding: 4rem 2rem;
  /* Layer a soft semi‑transparent gradient over a fibre image.  The first layer is semi‑transparent to allow
     underlying details to show through while still providing sufficient contrast for the text. */
  background-image: linear-gradient(rgba(245, 246, 253, 0.88), rgba(240, 242, 252, 0.88)), url('images/fiber.jpg');
  background-size: cover;
  background-position: center;
  max-width: 900px;
  margin: 0 auto;
}

.about h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: var(--primary-color);
}

.about p {
  margin-bottom: 1.5rem;
  color: var(--secondary-text);
  font-size: 1rem;
}

/* Contact section */
.contact {
  padding: 4rem 2rem;
  background: linear-gradient(180deg, #f5f6fd, #f0f2fc);
  max-width: 600px;
  margin: 0 auto;
}

.contact h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 2rem;
  color: var(--primary-color);
}

.contact form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid var(--input-border);
  border-radius: 4px;
  background-color: var(--input-bg);
  color: var(--text-color);
  font-size: 0.95rem;
}

.form-group textarea {
  resize: vertical;
}

footer {
  text-align: center;
  padding: 2rem;
  background-color: var(--card-bg);
  color: var(--secondary-text);
  font-size: 0.9rem;
}

/* Responsive styles */
@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 64px;
    right: 0;
    background-color: var(--bg-color);
    flex-direction: column;
    width: 200px;
    height: calc(100vh - 64px);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    padding: 2rem 1rem;
    gap: 1rem;
    box-shadow: -2px 0 6px rgba(0,0,0,0.1);
    z-index: 999;
  }
  .nav-links.open {
    transform: translateX(0);
  }
  .nav-links a {
    font-size: 1.1rem;
  }
  .hamburger {
    display: flex;
  }
  /* mobile nav list remains flex; we remove duplicate rule to avoid overrides. */
  .navbar {
    padding: 1rem;
  }
  .hero {
    height: 80vh;
    padding-top: 4rem;
  }
  .hero h1 {
    font-size: 2.5rem;
  }
  .hero p {
    font-size: 1rem;
  }
  .cards {
    flex-direction: column;
    align-items: center;
  }
  .card {
    max-width: 100%;
  }
  .partners-content {
    flex-direction: column;
    text-align: center;
  }
  .partners-image {
    order: -1;
    width: 100%;
  }
}