/* ============================================
   ElectroSense Landing Page - CSS
   Version: 1.0.0
   ============================================ */

/* === Variables === */
:root {
  --primary: #1E88E5;
  --primary-dark: #1565C0;
  --primary-light: #42A5F5;
  --accent: #FF9800;
  --accent-dark: #F57C00;
  --text: #212121;
  --text-light: #757575;
  --text-white: #FFFFFF;
  --background: #FFFFFF;
  --background-alt: #F5F5F5;
  --background-dark: #0D47A1;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.15);
  --radius: 12px;
  --radius-lg: 20px;
  --transition: all 0.3s ease;
}

/* === Reset & Base === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  background: var(--background);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul {
  list-style: none;
}

/* === Typography === */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.5rem); }

p {
  margin-bottom: 1rem;
}

/* === Container === */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  text-align: center;
}

.btn-primary {
  background: var(--accent);
  color: var(--text-white);
  box-shadow: 0 4px 14px rgba(255, 152, 0, 0.4);
}

.btn-primary:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 152, 0, 0.5);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.15);
  color: var(--text-white);
  border: 2px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
}

.btn-disabled {
  background: #9E9E9E;
  color: var(--text-white);
  cursor: not-allowed;
  opacity: 0.7;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

/* === Header === */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
  transition: var(--transition);
}

.header.scrolled {
  background: rgba(255, 255, 255, 0.98);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

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

.logo img {
  height: 40px;
  width: auto;
}

.nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  color: var(--text);
  font-weight: 500;
  padding: 0.5rem;
  position: relative;
}

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

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

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

.nav-cta {
  background: var(--primary);
  color: var(--text-white);
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius);
}

.nav-cta:hover {
  background: var(--primary-dark);
}

/* Mobile Menu Button */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1001;
}

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

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

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

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-content {
  color: var(--text-white);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-badge span {
  background: var(--accent);
  padding: 0.125rem 0.5rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
}

.hero h1 {
  margin-bottom: 1.5rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hero p {
  font-size: 1.25rem;
  opacity: 0.9;
  margin-bottom: 2rem;
  max-width: 500px;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.hero-image {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Phone Mockup */
.phone-mockup {
  position: relative;
  width: 280px;
  height: 560px;
  background: #1a1a1a;
  border-radius: 40px;
  padding: 12px;
  box-shadow: var(--shadow-lg), 0 0 0 2px #333;
}

.phone-mockup::before {
  content: '';
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 25px;
  background: #000;
  border-radius: 20px;
}

.phone-screen {
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, var(--primary-light) 0%, var(--primary) 50%, var(--primary-dark) 100%);
  border-radius: 30px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: white;
  text-align: center;
  padding: 2rem 1rem;
}

.phone-screen .app-icon {
  width: 80px;
  height: 80px;
  background: white;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.phone-screen .app-icon svg {
  width: 50px;
  height: 50px;
}

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

.phone-screen p {
  font-size: 0.875rem;
  opacity: 0.8;
  margin-bottom: 0;
}

/* === Features Section === */
.features {
  padding: 6rem 0;
  background: var(--background);
}

.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 4rem;
}

.section-header h2 {
  color: var(--text);
}

.section-header p {
  color: var(--text-light);
  font-size: 1.125rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.feature-card {
  background: var(--background);
  border: 1px solid #e0e0e0;
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  transition: var(--transition);
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.feature-icon {
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 2rem;
}

.feature-card h3 {
  color: var(--text);
  margin-bottom: 0.75rem;
}

.feature-card p {
  color: var(--text-light);
  font-size: 0.9375rem;
  margin-bottom: 0;
}

/* === Audience Section === */
.audience {
  padding: 6rem 0;
  background: var(--background-alt);
}

.audience-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.audience-card {
  background: var(--background);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow);
}

.audience-card.pro {
  border-top: 4px solid var(--primary);
}

.audience-card.private {
  border-top: 4px solid var(--accent);
}

.audience-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.audience-icon {
  font-size: 2.5rem;
}

.audience-title {
  font-size: 1.5rem;
  margin-bottom: 0;
}

.audience-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.audience-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1rem;
}

.audience-list li::before {
  content: '✓';
  color: var(--primary);
  font-weight: bold;
}

.audience-card.private .audience-list li::before {
  color: var(--accent);
}

/* === Brands Section === */
.brands {
  padding: 4rem 0;
  background: var(--background);
  border-top: 1px solid #e0e0e0;
  border-bottom: 1px solid #e0e0e0;
}

.brands-inner {
  text-align: center;
}

.brands-inner h3 {
  color: var(--text-light);
  font-weight: 500;
  font-size: 1rem;
  margin-bottom: 2rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.brands-logos {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 3rem;
}

.brand-logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-light);
  opacity: 0.6;
  transition: var(--transition);
}

.brand-logo:hover {
  opacity: 1;
  color: var(--primary);
}

/* === Subscribe Section === */
.subscribe-section {
  padding: 6rem 0;
  background: var(--background-alt);
}

.subscribe-form {
  max-width: 500px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.subscribe-form .form-group {
  width: 100%;
}

.subscribe-form input[type="email"] {
  width: 100%;
  padding: 1rem 1.25rem;
  border: 2px solid #e0e0e0;
  border-radius: var(--radius);
  font-size: 1rem;
  outline: none;
  transition: var(--transition);
}

.subscribe-form input[type="email"]:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.2);
}

.subscribe-form .checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  text-align: left;
}

.subscribe-form .checkbox-group input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-top: 3px;
  flex-shrink: 0;
  accent-color: var(--primary);
  cursor: pointer;
}

.subscribe-form .checkbox-group label {
  font-size: 0.875rem;
  color: var(--text-light);
  line-height: 1.5;
}

.subscribe-form .checkbox-group label a {
  color: var(--primary);
  text-decoration: underline;
}

.subscribe-form .checkbox-group label a:hover {
  color: var(--primary-dark);
}

.subscribe-form button[type="submit"] {
  width: 100%;
}

.subscribe-form .form-message {
  padding: 1rem;
  border-radius: var(--radius);
  text-align: center;
  display: none;
}

.subscribe-form .form-message.success {
  display: block;
  background: rgba(76, 175, 80, 0.1);
  color: #2E7D32;
  border: 1px solid rgba(76, 175, 80, 0.3);
}

.subscribe-form .form-message.error {
  display: block;
  background: rgba(244, 67, 54, 0.1);
  color: #C62828;
  border: 1px solid rgba(244, 67, 54, 0.3);
}

.subscribe-form.submitted input,
.subscribe-form.submitted .checkbox-group,
.subscribe-form.submitted button[type="submit"] {
  display: none;
}

/* === CTA Section === */
.cta {
  padding: 6rem 0;
  background: linear-gradient(135deg, var(--primary) 0%, var(--background-dark) 100%);
  color: var(--text-white);
  text-align: center;
}

.cta h2 {
  margin-bottom: 1rem;
}

.cta p {
  font-size: 1.25rem;
  opacity: 0.9;
  margin-bottom: 2rem;
}

.cta-contact {
  display: flex;
  justify-content: center;
}

/* === Footer === */
.footer {
  background: #1a1a1a;
  color: var(--text-white);
  padding: 3rem 0 1.5rem;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.footer-logo {
  margin-bottom: 1rem;
}

.footer-logo img {
  height: 35px;
  filter: brightness(0) invert(1);
}

.footer-tagline {
  color: #999;
  margin-bottom: 1.5rem;
}

.footer-links {
  display: flex;
  gap: 2rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a {
  color: #999;
  font-size: 0.875rem;
}

.footer-links a:hover {
  color: var(--text-white);
}

.footer-contact {
  color: #999;
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}

.footer-contact a {
  color: var(--primary-light);
}

.footer-copyright {
  color: #666;
  font-size: 0.8125rem;
  padding-top: 1.5rem;
  border-top: 1px solid #333;
  width: 100%;
}

/* === Animations === */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.animated {
  opacity: 1;
  transform: translateY(0);
}

/* === Responsive === */
@media (max-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-inner {
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: var(--background);
    flex-direction: column;
    justify-content: center;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
  }

  .nav.active {
    right: 0;
  }

  .nav-link {
    font-size: 1.25rem;
    padding: 1rem 0;
  }

  .menu-toggle {
    display: flex;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero p {
    margin: 0 auto 2rem;
  }

  .hero-buttons {
    justify-content: center;
  }

  .hero-image {
    order: -1;
  }

  .phone-mockup {
    width: 220px;
    height: 440px;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .audience-grid {
    grid-template-columns: 1fr;
  }

  .brands-logos {
    gap: 2rem;
  }

  .newsletter-form {
    flex-direction: column;
  }

  .newsletter-form input,
  .newsletter-form button {
    width: 100%;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 14px;
  }

  .container {
    padding: 0 1rem;
  }

  .hero {
    padding-top: 80px;
    min-height: auto;
    padding-bottom: 3rem;
  }

  .hero-buttons .btn {
    width: 100%;
  }

  .phone-mockup {
    width: 180px;
    height: 360px;
  }

  .feature-card {
    padding: 1.5rem;
  }

  .audience-card {
    padding: 1.5rem;
  }

  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }

  .cta-buttons .btn {
    width: 100%;
    max-width: 300px;
  }
}

/* === Utility Classes === */
.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.text-accent { color: var(--accent); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
