/* ==========================================
   CODE SIGNALS SOFTWARE - DESIGN SYSTEM
   Professional with quirky personality
   ========================================== */

/* ==========================================
   CSS RESET & BASE
   ========================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Primary Color Palette */
  --color-navy: #1a2332;
  --color-dark-navy: #0f1419;
  --color-blue-primary: #2563eb;
  --color-blue-light: #60a5fa;
  --color-blue-dark: #1e40af;

  /* Accent Colors - The "Quirky" Touch */
  --color-coral: #ff6b6b;
  --color-yellow: #ffd93d;
  --color-mint: #6bcf7f;
  --color-purple: #a78bfa;

  /* Neutrals */
  --color-white: #ffffff;
  --color-off-white: #f8fafc;
  --color-gray-light: #e2e8f0;
  --color-gray: #64748b;
  --color-gray-dark: #334155;

  /* Typography */
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;

  /* Border Radius */
  --radius-sm: 0.5rem;
  --radius-md: 1rem;
  --radius-lg: 1.5rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
  --shadow-glow: 0 0 30px rgba(37, 99, 235, 0.3);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-gray-dark);
  background: var(--color-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ==========================================
   TYPOGRAPHY
   ========================================== */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-navy);
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.01em;
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

h4 {
  font-size: 1.25rem;
}

p {
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--color-gray);
}

.text-large {
  font-size: 1.25rem;
}

.text-small {
  font-size: 0.875rem;
}

/* ==========================================
   LAYOUT UTILITIES
   ========================================== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.container-wide {
  max-width: 1400px;
}

.section {
  padding: var(--space-2xl) 0;
}

.section-sm {
  padding: var(--space-xl) 0;
}

/* ==========================================
   BUTTONS & INTERACTIVE ELEMENTS
   ========================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 0.875rem 2rem;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.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 var(--transition-slow), height var(--transition-slow);
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-blue-primary), var(--color-blue-dark));
  color: var(--color-white);
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl), var(--shadow-glow);
}

.btn-secondary {
  background: var(--color-white);
  color: var(--color-blue-primary);
  border: 2px solid var(--color-blue-primary);
}

.btn-secondary:hover {
  background: var(--color-blue-primary);
  color: var(--color-white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-coral {
  background: linear-gradient(135deg, var(--color-coral), #ff5252);
  color: var(--color-white);
}

.btn-coral:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: var(--shadow-xl);
}

/* ==========================================
   HEADER / NAVIGATION
   ========================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-gray-light);
  transition: all var(--transition-base);
}

.header.scrolled {
  box-shadow: var(--shadow-md);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) 0;
}

.logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.logo:hover {
  transform: translateY(-1px);
  opacity: 0.95;
}

.logo-image {
  display: block;
  width: auto;
  height: auto;
}

.logo-image--header {
  width: clamp(170px, 24vw, 260px);
  max-width: 100%;
}

.logo--footer {
  margin-bottom: var(--space-md);
  padding: 0.4rem 0.75rem;
  background: rgba(255, 255, 255, 0.96);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}

.logo-image--footer {
  width: clamp(190px, 30vw, 240px);
  max-width: 100%;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  list-style: none;
}

.nav-link {
  font-weight: 500;
  color: var(--color-gray-dark);
  text-decoration: none;
  transition: color var(--transition-fast);
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-blue-primary);
  transition: width var(--transition-base);
}

.nav-link:hover {
  color: var(--color-blue-primary);
}

.nav-link:hover::after {
  width: 100%;
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-xs);
}

.menu-toggle span {
  width: 25px;
  height: 3px;
  background: var(--color-navy);
  border-radius: 2px;
  transition: all var(--transition-base);
}

/* ==========================================
   HERO SECTION
   ========================================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--color-navy) 0%, var(--color-dark-navy) 100%);
  padding-top: 80px;
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.1;
  pointer-events: none;
}

.signal-wave {
  position: absolute;
  width: 200%;
  height: 100%;
  background: repeating-linear-gradient(90deg,
      transparent,
      transparent 50px,
      var(--color-blue-primary) 50px,
      var(--color-blue-primary) 51px);
  animation: wave 20s linear infinite;
}

@keyframes wave {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  color: var(--color-white);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-md);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: var(--space-md);
  animation: fadeInDown 0.8s ease;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero h1 {
  color: var(--color-white);
  margin-bottom: var(--space-md);
  animation: fadeInUp 0.8s ease 0.2s both;
}

.hero p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.25rem;
  margin-bottom: var(--space-lg);
  animation: fadeInUp 0.8s ease 0.4s both;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-cta {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  animation: fadeInUp 0.8s ease 0.6s both;
}

.highlight-blue {
  color: var(--color-blue-light);
  font-weight: 700;
}

.highlight-coral {
  color: var(--color-coral);
  font-weight: 700;
}

/* ==========================================
   CARDS & CONTENT BLOCKS
   ========================================== */
.card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
  border: 1px solid var(--color-gray-light);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: var(--color-blue-primary);
}

.card-icon {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin-bottom: var(--space-md);
  background: linear-gradient(135deg, var(--color-blue-primary), var(--color-purple));
  color: white;
  transition: all var(--transition-base);
}

.card:hover .card-icon {
  transform: rotate(5deg) scale(1.1);
}

/* ==========================================
   GRID LAYOUTS
   ========================================== */
.grid {
  display: grid;
  gap: var(--space-lg);
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

/* ==========================================
   FORMS
   ========================================== */
.form-group {
  margin-bottom: var(--space-md);
}

.form-label {
  display: block;
  font-weight: 600;
  color: var(--color-navy);
  margin-bottom: var(--space-xs);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.875rem var(--space-md);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--color-navy);
  background: var(--color-white);
  border: 2px solid var(--color-gray-light);
  border-radius: var(--radius-sm);
  transition: all var(--transition-base);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--color-blue-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-textarea {
  min-height: 150px;
  resize: vertical;
}

/* ==========================================
   FOOTER
   ========================================== */
.footer {
  background: var(--color-navy);
  color: rgba(255, 255, 255, 0.8);
  padding: var(--space-xl) 0 var(--space-lg);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.footer-section h4 {
  color: var(--color-white);
  margin-bottom: var(--space-md);
}

.footer-links {
  list-style: none;
}

.footer-link {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: color var(--transition-fast);
  display: inline-block;
  margin-bottom: var(--space-xs);
}

.footer-link:hover {
  color: var(--color-blue-light);
  transform: translateX(4px);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: var(--space-md);
  text-align: center;
  font-size: 0.875rem;
}

/* ==========================================
   RESPONSIVE DESIGN
   ========================================== */
@media (max-width: 768px) {
  .logo-image--header {
    width: 170px;
  }

  .logo-image--footer {
    width: 170px;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-white);
    flex-direction: column;
    padding: var(--space-md);
    box-shadow: var(--shadow-lg);
    gap: var(--space-sm);
  }

  .nav-links.active {
    display: flex;
  }

  .menu-toggle {
    display: flex;
  }

  .hero {
    min-height: auto;
    padding: var(--space-2xl) 0;
  }

  .hero-cta {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }
}

/* ==========================================
   UTILITY CLASSES
   ========================================== */
.text-center {
  text-align: center;
}

.mb-sm {
  margin-bottom: var(--space-sm);
}

.mb-md {
  margin-bottom: var(--space-md);
}

.mb-lg {
  margin-bottom: var(--space-lg);
}

.mb-xl {
  margin-bottom: var(--space-xl);
}

.mt-sm {
  margin-top: var(--space-sm);
}

.mt-md {
  margin-top: var(--space-md);
}

.mt-lg {
  margin-top: var(--space-lg);
}

.mt-xl {
  margin-top: var(--space-xl);
}

/* ==========================================
   BROWSER MOCKUP
   ========================================== */
.browser-mockup {
  background: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  border: 1px solid var(--color-gray-light);
  transition: all var(--transition-slow);
}

.browser-mockup:hover {
  box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.3);
  transform: translateY(-4px);
}

.browser-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: linear-gradient(180deg, #f5f5f5 0%, #e8e8e8 100%);
  border-bottom: 1px solid #d1d1d1;
}

.browser-dots {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  transition: all var(--transition-fast);
}

.dot-red {
  background: #ff5f56;
  border: 1px solid #e0443e;
}

.dot-yellow {
  background: #ffbd2e;
  border: 1px solid #dfa123;
}

.dot-green {
  background: #27c93f;
  border: 1px solid #1aab2c;
}

.browser-mockup:hover .dot {
  transform: scale(1.1);
}

.browser-address-bar {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: white;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  margin: 0 1rem;
  border: 1px solid #d1d1d1;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--color-gray);
}

.address-text {
  color: var(--color-gray-dark);
}

.browser-actions {
  width: 60px;
  /* Balance the dots on the left */
}

.browser-content {
  background: #f8fafc;
  position: relative;
  overflow: hidden;
}

.browser-content img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  object-position: top;
}

/* Add subtle animation when section comes into view */
@media (prefers-reduced-motion: no-preference) {
  .coisafe-showcase {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUpSlow 0.8s ease 0.2s forwards;
  }

  @keyframes fadeInUpSlow {
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}
