/* ============================================
   NODIA WEBSITE - DESIGN SYSTEM
   Colors: #2FA4B9 (Turquoise), #000000 (Black), #FFFFFF (White)
   ============================================ */

/* ============================================
   1. CSS RESET & BASE STYLES
   ============================================ */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-padding-top: 90px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #000000;
  background-color: #FFFFFF;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ============================================
   2. DESIGN TOKENS (CSS CUSTOM PROPERTIES)
   ============================================ */

:root {
  /* Colors - Brand */
  --color-primary: #2FA4B9;
  --color-primary-light: #4DB8CA;
  --color-primary-dark: #258A9B;
  --color-black: #000000;
  --color-white: #FFFFFF;
  --color-gray-light: #F5F5F5;
  --color-gray: #666666;
  --color-gray-dark: #333333;

  /* Spacing Scale (8px base) */
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 40px;
  --space-6: 48px;
  --space-8: 64px;
  --space-10: 80px;
  --space-12: 96px;
  --space-16: 128px;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --text-xs: 0.75rem;
  /* 12px */
  --text-sm: 0.875rem;
  /* 14px */
  --text-base: 1rem;
  /* 16px */
  --text-lg: 1.125rem;
  /* 18px */
  --text-xl: 1.25rem;
  /* 20px */
  --text-2xl: 1.5rem;
  /* 24px */
  --text-3xl: 1.875rem;
  /* 30px */
  --text-4xl: 2.25rem;
  /* 36px */
  --text-5xl: 3rem;
  /* 48px */
  --text-6xl: 3.75rem;
  /* 60px */

  /* Line Heights */
  --leading-tight: 1.2;
  --leading-normal: 1.6;
  --leading-relaxed: 1.8;

  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 6px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 24px rgba(0, 0, 0, 0.15);
  --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.2);

  /* Border Radius */
  --radius-sm: 4px;
  --radius: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Container */
  --container-max-width: 1200px;
  --container-padding: var(--space-4);
}

/* ============================================
   3. TYPOGRAPHY
   ============================================ */

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  line-height: var(--leading-tight);
  margin-bottom: 0.5em;
  color: var(--color-black);
}

h1 {
  font-size: var(--text-5xl);
}

h2 {
  font-size: var(--text-4xl);
}

h3 {
  font-size: var(--text-3xl);
}

h4 {
  font-size: var(--text-2xl);
}

h5 {
  font-size: var(--text-xl);
}

h6 {
  font-size: var(--text-lg);
}

p {
  margin-bottom: 1em;
  line-height: var(--leading-normal);
}

.text-gradient {
  background: linear-gradient(90deg, var(--color-primary), #4dd4f5, var(--color-primary));
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradient-shift 3s ease infinite;
}

@keyframes gradient-shift {

  0%,
  100% {
    background-position: 0% center;
  }

  50% {
    background-position: 100% center;
  }
}

.lead {
  font-size: var(--text-xl);
  font-weight: 300;
  line-height: var(--leading-relaxed);
  color: var(--color-gray);
}

/* ============================================
   4. LAYOUT UTILITIES
   ============================================ */

.container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

.section {
  padding-top: var(--space-3);
  padding-bottom: var(--space-3);
}

.section-dark {
  background-color: var(--color-black);
  color: var(--color-white);
}

.section-light {
  background-color: var(--color-gray-light);
}

/* Grid System */
.grid {
  display: grid;
  gap: var(--space-4);
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* Flexbox Utilities */
.flex {
  display: flex;
  gap: var(--space-2);
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ============================================
   5. COMPONENTS - BUTTONS
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  font-size: var(--text-base);
  font-weight: 600;
  line-height: 1.5;
  border-radius: var(--radius);
  transition: all var(--transition-base);
  cursor: pointer;
  border: 2px solid transparent;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
  z-index: -1;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn-primary {
  background-color: var(--color-primary);
  color: var(--color-white);
  border-color: var(--color-primary);
  box-shadow: 0 4px 15px rgba(47, 164, 185, 0.3);
  animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {

  0%,
  100% {
    box-shadow: 0 4px 15px rgba(47, 164, 185, 0.3);
  }

  50% {
    box-shadow: 0 4px 25px rgba(47, 164, 185, 0.6);
  }
}

.btn-primary:hover {
  background-color: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 25px rgba(47, 164, 185, 0.5);
  animation: none;
}

.btn-primary:active {
  transform: translateY(-1px) scale(1.02);
}

.btn-outline {
  background-color: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn-outline:hover {
  background-color: var(--color-primary);
  color: var(--color-white);
  transform: translateY(-2px);
}

.btn-white {
  background-color: var(--color-white);
  color: var(--color-black);
  border-color: var(--color-white);
}

.btn-white:hover {
  background-color: rgba(255, 255, 255, 0.9);
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 25px rgba(255, 255, 255, 0.3);
}

.btn-lg {
  padding: 18px 40px;
  font-size: var(--text-lg);
}

/* ============================================
   6. COMPONENTS - CARDS
   ============================================ */

.card {
  background-color: var(--color-white);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  height: 100%;
  position: relative;
  overflow: hidden;
  border: 1px solid transparent;
}

.card::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(47, 164, 185, 0.15), transparent);
  transform: rotate(45deg);
  transition: all 0.6s;
  opacity: 0;
}

.card:hover::after {
  animation: shine 1.5s ease-in-out;
}

@keyframes shine {
  0% {
    top: -50%;
    right: -50%;
    opacity: 0;
  }

  50% {
    opacity: 1;
  }

  100% {
    top: 150%;
    right: 150%;
    opacity: 0;
  }
}

.card:hover {
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(47, 164, 185, 0.2);
}

.card-icon {
  width: 80px;
  height: 80px;
  margin-bottom: var(--space-3);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.card-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-title {
  font-size: var(--text-2xl);
  font-weight: 700;
  margin-bottom: var(--space-2);
  color: var(--color-black);
}

.card-description {
  font-size: var(--text-base);
  color: var(--color-gray);
  line-height: var(--leading-relaxed);
}

/* ============================================
   7. HEADER & NAVIGATION
   ============================================ */

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
}

.header.scrolled {
  box-shadow: var(--shadow);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) 0;
}

.nav-logo {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-black);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.nav-logo-accent {
  color: var(--color-primary);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  list-style: none;
}

.nav-link {
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--color-black);
  transition: color var(--transition-fast);
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-primary);
  transition: width var(--transition-base);
}

.nav-link:hover {
  color: var(--color-primary);
}

.nav-link:hover::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
}

.nav-toggle-bar {
  width: 28px;
  height: 3px;
  background-color: var(--color-black);
  border-radius: var(--radius-full);
  transition: all var(--transition-base);
}

/* Mobile Menu */
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    flex-direction: column;
    background-color: var(--color-white);
    padding: var(--space-4);
    box-shadow: var(--shadow-lg);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
  }

  .nav-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-toggle.active .nav-toggle-bar:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
  }

  .nav-toggle.active .nav-toggle-bar:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.active .nav-toggle-bar:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
  }
}

/* ============================================
   8. HERO SECTION
   ============================================ */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background-color: var(--color-black);
  /* Ensure dark background for network animation */
  padding-top: 80px;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 0;
}

/* Canvas Network Animation */
.hero-nodes {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  /* Ensure canvas sits correctly */
  display: block;
}

#heroCanvas {
  display: block;
  width: 100%;
  height: 100%;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 900px;
  padding: var(--space-4);
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  margin-bottom: var(--space-4);
  color: var(--color-white);
  line-height: 1.1;
}

.hero-subtitle {
  font-size: clamp(1.125rem, 2.5vw, 1.5rem);
  font-weight: 300;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: var(--space-6);
  line-height: var(--leading-relaxed);
}

.hero-buttons {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
  flex-wrap: wrap;
}

/* Animated background shapes */
.hero-shape {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, var(--color-primary) 0%, transparent 70%);
  opacity: 0.15;
  animation: float 20s infinite ease-in-out;
}

.hero-shape:nth-child(1) {
  width: 400px;
  height: 400px;
  top: -200px;
  left: -200px;
  animation-delay: 0s;
}

.hero-shape:nth-child(2) {
  width: 300px;
  height: 300px;
  bottom: -150px;
  right: -150px;
  animation-delay: 5s;
}

.hero-shape:nth-child(3) {
  width: 250px;
  height: 250px;
  top: 50%;
  right: 10%;
  animation-delay: 10s;
}

@keyframes float {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  33% {
    transform: translate(30px, -30px) scale(1.1);
  }

  66% {
    transform: translate(-20px, 20px) scale(0.9);
  }
}

/* ============================================
   9. SERVICES SECTION
   ============================================ */

.services {
  background-color: var(--color-white);
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto var(--space-10);
}

.section-title {
  font-size: var(--text-4xl);
  font-weight: 700;
  margin-bottom: var(--space-3);
  color: var(--color-black);
}

.section-description {
  font-size: var(--text-lg);
  color: var(--color-gray);
  line-height: var(--leading-relaxed);
}

/* ============================================
   10. ABOUT SECTION
   ============================================ */

.about {
  background-color: var(--color-gray-light);
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
  align-items: center;
}

.about-image {
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-text h2 {
  margin-bottom: var(--space-4);
}

.about-text p {
  font-size: var(--text-lg);
  color: var(--color-gray);
  margin-bottom: var(--space-3);
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
  margin-top: var(--space-6);
}

.stat {
  text-align: center;
}

.stat-number {
  font-size: var(--text-4xl);
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: var(--space-1);
}

.stat-label {
  font-size: var(--text-sm);
  color: var(--color-gray);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ============================================
   11. CONTACT SECTION
   ============================================ */

.contact {
  background-color: var(--color-black);
  color: var(--color-white);
}

.contact .section-title {
  color: var(--color-white);
}

.contact .section-description {
  color: rgba(255, 255, 255, 0.8);
}

.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
  margin-top: var(--space-8);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.form-label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-white);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-input,
.form-textarea,
select.form-input {
  padding: 14px 16px;
  font-size: var(--text-base);
  font-family: inherit;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--color-white);
  transition: all var(--transition-base);
}

.form-input:focus,
.form-textarea:focus,
select.form-input:focus {
  outline: none;
  border-color: var(--color-primary);
  background-color: rgba(255, 255, 255, 0.1);
}

select.form-input {
  cursor: pointer;
  appearance: none;
  background-image: url('data:image/svg+xml;charset=UTF-8,%3csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"%3e%3cpolyline points="6 9 12 15 18 9"%3e%3c/polyline%3e%3c/svg%3e');
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 20px;
  padding-right: 40px;
}

select.form-input option {
  background-color: var(--color-black);
  color: var(--color-white);
  padding: 10px;
}

.form-textarea {
  resize: vertical;
  min-height: 150px;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.contact-item {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
}

.contact-icon {
  width: 24px;
  height: 24px;
  color: var(--color-primary);
  flex-shrink: 0;
}

.contact-details h3 {
  font-size: var(--text-xl);
  margin-bottom: var(--space-1);
  color: var(--color-white);
}

.contact-details p {
  font-size: var(--text-base);
  color: rgba(255, 255, 255, 0.8);
}

/* ============================================
   12. FOOTER
   ============================================ */

.footer {
  background-color: #0a0a0a;
  color: var(--color-white);
  padding: var(--space-8) 0 var(--space-4);
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-8);
  margin-bottom: var(--space-6);
}

.footer-brand img {
  background-color: var(--color-white);
  padding: var(--space-3);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

.footer-brand h3 {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-2);
  color: var(--color-white);
}

.footer-brand p {
  color: rgba(255, 255, 255, 0.7);
  line-height: var(--leading-relaxed);
}

.footer-section h4 {
  font-size: var(--text-lg);
  margin-bottom: var(--space-3);
  color: var(--color-white);
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.footer-link {
  color: rgba(255, 255, 255, 0.7);
  transition: color var(--transition-fast);
}

.footer-link:hover {
  color: var(--color-primary);
}

.footer-bottom {
  padding-top: var(--space-4);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: var(--text-sm);
}

/* ============================================
   13. ANIMATIONS
   ============================================ */

.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.slide-in-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.slide-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.slide-in-right {
  opacity: 0;
  transform: translateX(50px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.slide-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* ============================================
   14. RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1024px) {
  :root {
    --text-5xl: 2.5rem;
    --text-4xl: 2rem;
    --text-3xl: 1.75rem;
  }

  .about-content,
  .contact-content {
    grid-template-columns: 1fr;
  }

  .footer-content {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  :root {
    --container-padding: var(--space-3);
    --text-5xl: 2rem;
    --text-4xl: 1.75rem;
  }

  .section {
    padding-top: var(--space-8);
    padding-bottom: var(--space-8);
  }

  .grid-3 {
    grid-template-columns: 1fr;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .stats {
    grid-template-columns: 1fr;
  }

  .footer-content {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  :root {
    --text-5xl: 1.75rem;
    --text-4xl: 1.5rem;
  }

  .btn {
    width: 100%;
  }
}