/*
 * Global styles for the Edge Micropayments marketing site.
 * A modern, dark theme is used to evoke cutting‑edge technology while
 * maintaining readability. Components are responsive and adapt to
 * different screen sizes, with subtle hover animations to enhance
 * interactivity. Variables at the top define the core colour
 * palette, making it easy to adjust the theme.
 */

:root {
  --primary: #3E8BFF;
  --accent: #7C6EFA;
  --background: #090D16;
  --secondary: #131A25;
  --text: #E8EAF6;
  --muted: #A5AFCB;
}

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

body {
  font-family: 'Poppins', sans-serif;
  /* Remove opaque background on body so the network animation shows through */
  background-color: transparent;
  color: var(--text);
  line-height: 1.6;
}

/* Ensure the html and body elements occupy the full viewport so the fixed canvas
   background covers the entire page */
html, body {
  width: 100%;
  overflow-x: hidden;   /* prevents Safari from shifting layout */
  margin: 0;
  padding: 0;
}

/* Navigation */
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  background: rgba(9, 13, 22, 0.85);
  backdrop-filter: blur(10px);
}

.nav .logo {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--primary);
}

/* Additional styling for company name appended to the logo */
.nav .company-name {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--muted);
  margin-left: 0.5rem;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .hero-content {
    padding-inline: 2rem;   /* match the nav’s 2rem side padding */
    max-width: none;
  }
  main section {
    padding-inline: 2rem;
  }
}

.nav .tm {
  font-size: 0.7rem;
  vertical-align: super;
}

.tm-small {
  font-size: 0.6rem;
  vertical-align: super;
}

.nav .nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

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

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

.nav .cta {
  margin-left: 2rem;
}

.nav .cta .btn {
  background: var(--primary);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  text-decoration: none;
  transition: background 0.3s ease;
}

.nav .cta .btn:hover {
  background: var(--accent);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.menu-toggle span {
  width: 25px;
  height: 3px;
  background: var(--text);
  border-radius: 2px;
}

/* Canvas for node network animation — single source of truth */
#network-canvas {
  position: fixed;
  inset: 0;              /* shorthand for top/left/right/bottom = 0 */
  width: 100%;
  height: 100svh;        /* use small viewport on iOS to avoid bounce/toolbar jitter */
  z-index: 0;
  pointer-events: none;
  background: transparent;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* More transparent overlay so node animation remains visible across the page */
  /* Slightly reduce the opacity so the bright node animation shows through more vividly */
  background: rgba(0, 0, 0, 0.2);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
  padding: 1rem;
}

.hero-content .hero-tagline {
  font-size: 1.3rem;
  margin-bottom: 2rem;
  color: #D0D4E8;
}

/* Hero title styling */
.hero-content .hero-title {
  font-size: 2rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 1rem;
  max-width: 800px;
  line-height: 1.3;
}

.btn {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 500;
  transition: background 0.3s ease;
}

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

/* Section Base */
main section {
  padding: 4rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
  /* Slightly transparent background so the network animation remains visible */
  position: relative;
  z-index: 2;
  /* Make sections slightly more transparent so the dynamic network
     background remains visible underneath while preserving readability */
  background: rgba(9, 13, 22, 0.90);
  border-radius: 8px;
}

h2 {
  font-size: 2.2rem;
  margin-bottom: 1rem;
  text-align: center;
  color: var(--primary);
}

h3 {
  font-size: 1.4rem;
  margin: 1rem 0 0.5rem;
  color: #fff;
}

p {
  margin-bottom: 1rem;
  color: var(--muted);
}

/* Stats */
.stats {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.stat {
  flex: 1 1 250px;
  padding: 1rem;
  text-align: center;
}

.stat h3 {
  font-size: 2rem;
  color: #fff;
  margin-bottom: 0.5rem;
}

/* Features */
.features {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin-top: 2rem;
  justify-content: space-between;
}

.feature {
  flex: 1 1 280px;
  background: var(--secondary);
  padding: 2rem;
  border-radius: 8px;
  text-align: center;
  transition: transform 0.3s ease;
}

.feature:hover {
  transform: translateY(-5px);
}

.feature img {
  width: 60px;
  height: 60px;
  margin-bottom: 1rem;
}

/* Industry Grid */
.industry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.industry {
  background: var(--secondary);
  padding: 1.5rem;
  border-radius: 8px;
  text-align: center;
  transition: transform 0.3s ease;
}

.industry:hover {
  transform: translateY(-5px);
}

.industry img {
  width: 60px;
  height: 60px;
  margin-bottom: 1rem;
}

/* Technology blocks */
.technology-section .tech-block {
  margin-top: 2rem;
}

.technology-section .tech-block h3 {
  font-size: 1.6rem;
  color: #fff;
  margin-bottom: 0.5rem;
}

.technology-section .tech-block p {
  color: var(--muted);
  margin-bottom: 1.5rem;
}

/* Scaling numbers */
.scaling-section .numbers {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.scaling-section .number {
  flex: 1 1 250px;
  text-align: center;
  padding: 1rem;
}

.scaling-section .number span {
  display: block;
  font-size: 2.5rem;
  color: #fff;
  margin-bottom: 0.25rem;
}

.scaling-section .number small {
  color: var(--muted);
}

.scaling-section .note {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--muted);
  font-style: italic;
}

/* About */
.about-section p {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

/* Forms */
/* Waitlist and contact sections receive their own translucent backgrounds */
.waitlist-section,
.contact-section {
  position: relative;
  z-index: 2;
  /* Slightly lighter backdrop for forms to let the network animation peek through at the edges */
  background: rgba(19, 26, 37, 0.90);
  padding: 3rem 2rem;
  border-radius: 8px;
  margin-top: 2rem;
}

.waitlist-form,
.contact-form {
  max-width: 600px;
  margin: 0 auto;
}

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

.form-group label {
  display: block;
  margin-bottom: 0.3rem;
  color: var(--text);
  font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--background);
  border-radius: 4px;
  background: var(--background);
  color: #fff;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.success-message {
  margin-top: 1rem;
  color: var(--primary);
  font-weight: 500;
  text-align: center;
}

/* Footer */
footer {
  background: rgba(8, 11, 18, 0.9);
  padding: 1.5rem 2rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.4;
}

/* Responsive navigation for mobile */
@media (max-width: 768px) {
  .nav .nav-links {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: rgba(9, 13, 22, 0.95);
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    transform: translateY(-200%);
    transition: transform 0.3s ease;
  }

  .nav .nav-links.active {
    transform: translateY(0);
  }

  .menu-toggle {
    display: flex;
  }

  .nav .cta {
    display: none;
  }
}

@media (max-width: 768px) {
  body {
    margin: 0;
    padding: 0;
  }

  .hero-content {
    padding: 0 1rem;   /* narrower side padding */
    text-align: center;
  }

  main section {
    padding: 2rem 1rem; /* reduce horizontal padding */
  }

  .btn {
    width: 100%;       /* button spans width on small screens */
    max-width: 300px;  /* but capped for readability */
  }

  h1, h2, h3, p {
    word-break: break-word;
  }
}

/* Force hero content to fit mobile viewport */
.hero-content {
  margin: 0 auto;        /* center it */
  max-width: 100%;       /* prevent squeezing inside a narrower box */
  width: 100%;
  padding-left: 1rem;    /* minimal breathing space */
  padding-right: 1rem;
  box-sizing: border-box;
}

/* Tighten all main content sections on mobile */
@media (max-width: 768px) {
  .hero-content {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  main section {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* Keep the existing header height rule */
header .hero {
  /* you already set height: 100vh; earlier — replace with svh for iOS smoothness */
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding-top: 4rem;
  overflow: hidden;
  background: var(--background);
}

/* Replace this: .hero { width: 100vw; ... } */
.hero {
  width: 100%;
  margin: 0;
  padding: 0;
}

/* Ensure centered, constrained hero on desktop */
@media (min-width: 769px) {
  .hero-content {
    max-width: 800px;   /* restore the intended width */
    width: auto;        /* stop forcing 100% */
    margin: 0 auto;     /* center the block */
    text-align: center; /* keep text centered */
    padding-inline: 1rem;
  }
}

/* Prevent background scrolling when mobile menu is open */
body.no-scroll {
  overflow: hidden;
}

/* Header height variables */
:root { --header-h: 64px; }
@media (max-width: 768px) {
  :root { --header-h: 72px; }  /* mobile header tends to be a bit taller */
}

/* Any in-page anchor target avoids being hidden under the fixed header */
section[id],
[id^="top"],
[id^="painopoints"],
[id^="why"],
[id^="platform"],
[id^="industries"],
[id^="about"],
[id^="contact"],
[id^="waitlist"] {
  scroll-margin-top: calc(var(--header-h) + 8px);
}
