/* Reset & Variables */
:root {
  --primary: #ff1a14;
  --secondary: #1B3139;
  --text-main: #1B3139;
  --text-muted: #6c757d;
  --bg-white: #ffffff;
  --bg-light: #f8f9fa;
  --shadow-card: 0 10px 30px rgba(0,0,0,0.05);
  --shadow-strong: 0 20px 40px rgba(0,0,0,0.1);
  --radius-pill: 50px;
  --radius-card: 20px;
  --font-main: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

body {
  font-family: var(--font-main);
  color: var(--text-main);
  line-height: 1.6;
  background-color: var(--bg-white);
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  transition: opacity 0.3s ease;
}

ul {
  list-style: none;
}

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

/* Utilities */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 32px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  font-size: 0.95rem;
}

.btn-primary {
  background-color: var(--primary);
  color: white;
}

.btn-primary:hover {
  background-color: #d91610;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(255, 26, 20, 0.3);
}

.btn-outline {
  background-color: transparent;
  border-color: var(--secondary);
  color: var(--secondary);
}

.btn-outline:hover {
  background-color: var(--secondary);
  color: white;
}

.btn-white {
  background-color: white;
  color: var(--primary);
}

.btn-store-badge {
  display: inline-block;
  transition: transform 0.2s ease;
}

.btn-store-badge:hover {
  transform: translateY(-2px);
}

.btn-store {
  display: inline-flex;
  align-items: center;
  background: black;
  color: white;
  padding: 8px 16px;
  border-radius: 8px;
  margin: 0 10px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: transform 0.2s ease;
  min-width: 170px;
  border: 1px solid rgba(255,255,255,0.2);
  text-align: left;
}

.btn-store:hover {
  transform: translateY(-2px);
}

.btn-store svg {
  width: 28px;
  height: 28px;
  margin-right: 12px;
  fill: white;
}

.store-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.store-subtitle {
  font-size: 0.65rem;
  font-weight: 400;
  opacity: 0.9;
}

.store-title {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.3px;
}

/* Navbar */
.navbar {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  padding: 30px 0;
  z-index: 100;
  color: white;
}

.nav-container {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.logo {
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  text-align: center;
}

.nav-links {
  display: flex;
  gap: 30px;
  justify-content: flex-start;
}

.nav-links a {
  font-weight: 500;
  font-size: 0.95rem;
  opacity: 0.9;
}

.nav-links a:hover {
  opacity: 1;
}

.nav-auth {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 30px;
}

.nav-login {
  color: white;
  font-weight: 500;
  font-size: 0.95rem;
}

.nav-btn {
  background: white;
  color: var(--text-main);
  padding: 12px 32px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.9rem;
}

/* Dark navbar variant for pages with light backgrounds (legal pages) */
.navbar-dark {
  color: var(--text-main);
}

.navbar-dark .nav-btn {
  background: var(--primary);
  color: white;
}

/* Social Sidebar */
.social-sidebar {
  position: absolute;
  left: 40px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 30px;
  z-index: 10;
}

.social-icon {
  color: white;
  opacity: 0.7;
  width: 20px;
  height: 20px;
  transition: opacity 0.3s;
}

.social-icon:hover {
  opacity: 1;
}

/* Hero Section */
.hero-section {
  background-color: var(--primary);
  color: white;
  padding-top: 100px; /* Reduced further to move up ~33% */
  padding-bottom: 40px; /* Reduced further */
  position: relative;
  overflow: hidden;
  text-align: center;
  /* Subtle grid pattern */
  background-image: 
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 50px 50px;
}

/* Decorative circles */
.circle-bg {
  position: absolute;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 50%;
  z-index: 0;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 1000px; /* Increased from 800px to allow wider text */
  margin: 0 auto 20px; /* Reduced bottom margin further */
}

.hero-title {
  font-size: 3.5rem; /* Slightly smaller to fit on one line if needed, or keep large */
  font-weight: 700;
  margin-bottom: 15px;
  line-height: 1.1;
  letter-spacing: -1px;
  white-space: nowrap; /* Force one line */
}

.hero-subtitle {
  font-size: 1rem;
  opacity: 0.9;
  max-width: 800px; /* Increased from 500px */
  margin: 0 auto;
  font-weight: 300;
}

.hero-phones {
  position: relative;
  height: 440px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  margin-top: 30px; /* Reduced from 60px */
}

.hero-screenshot {
  width: auto;
  border-radius: 28px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
  transition: transform 0.3s ease;
}

.hero-screenshot:hover {
  transform: translateY(-4px);
}

.hero-screenshot-center {
  width: min(483px, 34vw);
  height: auto;
  z-index: 10;
  margin: 0 16px;
}

.hero-screenshot-side {
  width: min(420px, 30vw);
  height: auto;
  opacity: 0.95;
  margin-top: 120px;
  z-index: 5;
}

.app-screenshot {
  width: min(100%, 483px);
  max-width: none;
  max-height: none;
  height: auto;
  border-radius: 28px;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.14);
  margin: 0 auto;
}

/* CSS Phone Mockup – single clean drop shadow right/bottom */
.phone-mockup {
  width: 208px;
  height: 416px;
  background: #fff;
  border-radius: 32px;
  border: 8px solid #1B3139;
  position: relative;
  box-shadow: 6px 10px 32px rgba(0,0,0,0.18);
  overflow: hidden;
  margin: 0 24px;
  transition: transform 0.3s ease;
}

.phone-mockup.center {
  z-index: 10;
  transform: translateY(0);
}

.phone-mockup.side {
  width: 192px;
  height: 384px;
  opacity: 0.9;
  transform: translateY(48px);
  z-index: 5;
}

.phone-notch {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 96px;
  height: 20px;
  background: #1B3139;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
  z-index: 20;
}

/* Screen Content UI */
.screen-content {
  padding: 32px 16px;
  height: 100%;
  background: #ffffff;
  display: flex;
  flex-direction: column;
}

.ui-header { 
  height: 24px; 
  margin-bottom: 16px; 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
}
.ui-title { 
  font-weight: 600; 
  font-size: 0.9rem; 
  color: var(--secondary); 
}

/* Dial UI (Temperature) */
.ui-dial-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 16px 0;
  position: relative;
}
.ui-dial {
  width: 128px;
  height: 128px;
  border-radius: 50%;
  border: 6px solid #f0f0f0;
  border-top-color: var(--primary);
  border-right-color: var(--primary);
  transform: rotate(-45deg);
  display: flex;
  align-items: center;
  justify-content: center;
}
.ui-dial-value {
  transform: rotate(45deg);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--secondary);
}
.ui-dial-label {
  position: absolute;
  bottom: -24px;
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* Chart UI (Energy) */
.ui-chart-container {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  height: 96px;
  margin-top: 16px;
  padding: 0 8px;
}
.ui-bar-col {
  width: 10px;
  background: #eee;
  border-radius: 5px;
}
.ui-bar-col.active {
  background: var(--primary);
}

/* List/Toggle UI (Appliances) */
.ui-toggle-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.ui-toggle-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  background: #f9f9f9;
  border-radius: 12px;
}
.ui-toggle-label {
  font-size: 0.8rem;
  font-weight: 600;
}
.ui-toggle-switch {
  width: 30px;
  height: 16px;
  background: #ddd;
  border-radius: 20px;
  position: relative;
}
.ui-toggle-switch.on {
  background: var(--primary);
}
.ui-toggle-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  background: white;
  border-radius: 50%;
  transition: left 0.2s;
}
.ui-toggle-switch.on::after {
  left: 16px;
}


/* Section Styles */
.section {
  padding: 60px 0;
  position: relative;
}

.section-title {
  font-size: 3rem;
  font-weight: 700;
  color: var(--secondary);
  margin-bottom: 40px;
  text-align: center;
  letter-spacing: -1px;
}

/* Feature Row (Zig Zag) */
.feature-row {
  display: flex;
  align-items: center;
  gap: 60px;
  margin-bottom: 0;
}

.feature-row.reverse {
  flex-direction: row-reverse;
}

.feature-text {
  flex: 1;
}

.feature-visual {
  flex: 1;
  display: flex;
  justify-content: center;
  position: relative;
}

.feature-heading {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--secondary);
  line-height: 1.2;
}

.feature-desc {
  color: var(--text-muted);
  margin-bottom: 40px;
  font-size: 1rem;
  line-height: 1.8;
  max-width: 450px;
}

/* Geometric Decoration (Rectangles) */
.decor-rect {
  position: absolute;
  width: 240px;
  height: 360px;
  background-color: #2D5BFF; /* Bright blue from screenshot */
  border-radius: 32px;
  z-index: -1;
}

/* Specific offsets for visual balance */
.feature-visual .decor-rect {
  top: 40px;
  right: 40px; /* Offset to the right */
  left: auto;
}

.feature-visual.left .decor-rect {
  top: 40px;
  left: 40px; /* Offset to the left */
  right: auto;
}

/* Testimonials */
.testimonials-section {
  padding: 120px 0 48px;
  background: white;
}

.section-title {
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 20px;
  text-align: center;
  letter-spacing: -1px;
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 80px;
  font-size: 1.1rem;
  line-height: 1.6;
}

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  margin-top: 60px;
}

.testimonial-card {
  background: #fcfcfc; /* Very light grey/white */
  padding: 50px;
  border-radius: 10px;
  border: 1px solid #f0f0f0;
  transition: transform 0.3s;
}

.testimonial-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.testimonial-quote {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-muted);
  margin-bottom: 30px;
  font-style: italic;
}

.user-profile {
  display: flex;
  align-items: center;
  margin-top: 25px;
}

.user-avatar {
  width: 60px;
  height: 60px;
  background: #ddd;
  border-radius: 50%;
  margin-right: 20px;
  overflow: hidden;
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-avatar span {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-main);
}

.user-info h4 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text-main);
}

.user-info span {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* FAQ */
.faq-section {
  padding: 48px 0 60px;
  max-width: 900px;
  margin: 0 auto;
}

.accordion-item {
  margin-bottom: 20px;
  border: 1px solid #f0f0f0;
  border-radius: 8px;
  background: #fcfcfc;
  overflow: hidden;
}

.accordion-item[open] {
  background: white;
  box-shadow: 0 5px 20px rgba(0,0,0,0.05);
  border-color: transparent;
}

.accordion-header {
  width: 100%;
  text-align: left;
  padding: 25px 30px;
  background: none;
  border: none;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  outline: none;
}

.accordion-icon {
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--text-main);
}

.accordion-content {
  padding: 0 30px 30px;
  color: var(--text-muted);
  line-height: 1.8;
  font-size: 1rem;
}

.btn-learn-more {
  display: inline-block;
  padding: 12px 32px;
  border: 1px solid var(--secondary);
  color: var(--secondary);
  border-radius: 4px;
  font-weight: 600;
  background: transparent;
  margin-top: 30px;
}

.btn-learn-more:hover {
  background: var(--secondary);
  color: white;
}

/* Screenshots Showcase */
.screenshot-showcase {
  padding: 72px 0;
  background: white;
}

.screenshot-gallery {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding-bottom: 12px;
  scroll-snap-type: x mandatory;
}

.screenshot-gallery img {
  flex: 0 0 auto;
  width: min(85vw, 483px);
  height: auto;
  border-radius: 28px;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.14);
  scroll-snap-align: start;
}

/* Clients / Trusted By */
.clients-section {
  padding: 60px 0 72px;
  background: var(--bg-light);
}

.clients-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 24px 64px;
}

.client-logo {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text-muted);
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.client-logo:hover {
  opacity: 1;
}

/* Download Section – centered, tight gap between button and phone */
.download-section {
  padding: 60px 0 80px;
  background: white;
}

.download-section .feature-row {
  gap: 48px;
  margin-bottom: 0;
  justify-content: center;
  flex-wrap: wrap;
}

.download-section .feature-text {
  flex: 1 1 420px;
  max-width: 420px;
}

.download-section .feature-visual {
  flex: 1 1 420px;
  justify-content: center;
}

.download-section .feature-desc {
  max-width: 100%;
}

/* Subscribe Section – full-width blue block */
.subscribe-section {
  padding: 56px 24px 64px;
  background: var(--primary);
  color: white;
}

.subscribe-card {
  background: transparent;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  overflow: visible;
  color: white;
}

.sub-text {
  max-width: 520px;
}

.sub-text h2 {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.sub-text p {
  opacity: 0.92;
  font-size: 0.95rem;
  line-height: 1.65;
}

.sub-action {
  flex-shrink: 0;
  margin-left: 48px;
}

.btn-outline-white {
  background: transparent;
  border: 1px solid white;
  color: white;
  padding: 12px 30px;
  border-radius: 4px;
  font-weight: 500;
  text-transform: capitalize;
}

.btn-outline-white:hover {
  background: white;
  color: var(--primary);
}

.sub-decor {
  position: absolute;
  bottom: -50px;
  right: -50px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  pointer-events: none;
}
.sub-decor::after {
  content: '';
  position: absolute;
  top: 40px;
  left: 40px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
}

/* Footer */
.site-footer {
  background-color: white;
  color: var(--text-main);
  padding-top: 32px;
  padding-bottom: 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 48px;
}

.footer-logo {
  font-size: 1.8rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 20px;
  display: block;
}

.footer-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 30px;
  max-width: 300px;
}

.footer-form {
  display: flex;
  gap: 10px;
}

.footer-input {
  background: #f9f9f9;
  border: 1px solid #eee;
  padding: 12px 15px;
  border-radius: 4px;
  font-size: 0.9rem;
  width: 200px;
}

.btn-register {
  background: white;
  border: 1px solid var(--secondary);
  color: var(--secondary);
  padding: 12px 25px;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-register:hover {
  background: var(--secondary);
  color: white;
}

.footer-col h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 30px;
  color: #333;
  text-transform: uppercase;
}

.footer-col ul li {
  margin-bottom: 12px;
}

.footer-col ul li a {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.footer-col ul li a:hover {
  color: var(--primary);
}

.copyright-bar {
  background-color: #0a1128;
  color: white;
  padding: 24px 0;
  text-align: center;
  font-size: 0.9rem;
}

/* Legal / compliance pages */
.legal-page {
  padding: 140px 0 80px;
  background: var(--bg-white);
}

.legal-content {
  max-width: 820px;
}

.legal-content h1 {
  font-size: 2.2rem;
  line-height: 1.2;
  margin-bottom: 16px;
}

.legal-content h2 {
  font-size: 1.35rem;
  margin-top: 32px;
  margin-bottom: 12px;
}

.legal-content h3 {
  font-size: 1.05rem;
  margin-top: 20px;
  margin-bottom: 8px;
}

.legal-content p,
.legal-content li {
  color: var(--text-main);
  font-size: 1rem;
  line-height: 1.7;
}

.legal-content p {
  margin-bottom: 14px;
}

.legal-content ul,
.legal-content ol {
  margin: 0 0 18px 22px;
}

.legal-content ul li,
.legal-content ol li {
  margin-bottom: 8px;
}

.legal-content a {
  color: var(--primary);
}

.small-note {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.pricing-table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  border: 1px solid #e7e7e7;
}

.pricing-table th,
.pricing-table td {
  padding: 12px;
  border-bottom: 1px solid #ededed;
  text-align: left;
  vertical-align: top;
}

.pricing-table th {
  background: #fafafa;
  font-weight: 600;
}

/* Responsive adjustments */
@media (max-width: 992px) {
  .hero-title {
    white-space: normal;
    font-size: 2.8rem;
  }

  .hero-phones {
    height: auto;
    gap: 16px;
    align-items: flex-end;
  }

  .hero-screenshot-center {
    width: min(483px, 46vw);
  }

  .hero-screenshot-side {
    width: min(360px, 34vw);
    margin-top: 80px;
  }

  .screenshot-gallery img {
    width: min(86vw, 460px);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }
  .subscribe-card {
    flex-direction: column;
    text-align: center;
    gap: 30px;
  }

  .legal-page {
    padding-top: 120px;
  }

  .download-section .feature-row {
    flex-direction: column;
    text-align: center;
    gap: 28px;
  }

  .download-section .feature-text {
    max-width: 680px;
  }

  .download-section .feature-desc {
    margin-left: auto;
    margin-right: auto;
  }

  .download-section .store-buttons {
    margin-left: 0 !important;
  }
}

@media (max-width: 768px) {
  /* Navbar flows in-document on mobile so it never overlaps page content */
  .navbar {
    position: relative;
    padding: 16px 0;
    background: var(--primary);
  }

  .navbar-dark {
    background: var(--bg-white);
    border-bottom: 1px solid #eee;
  }

  .nav-container {
    grid-template-columns: 1fr;
    gap: 12px;
    justify-items: center;
    text-align: center;
  }

  .logo {
    order: 1;
  }

  .nav-links {
    order: 2;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
  }

  .nav-auth {
    order: 3;
    justify-content: center;
  }

  .hero-section {
    padding-top: 40px;
  }

  .hero-title {
    font-size: 2.1rem;
  }

  .section-title {
    font-size: 2.4rem;
  }

  .legal-page {
    padding-top: 40px;
  }
}

@media (max-width: 576px) {
  .hero-phones {
    justify-content: center;
  }

  .hero-screenshot-side {
    display: none;
  }

  .hero-screenshot-center {
    width: min(92vw, 483px);
    margin: 0;
  }

  .app-screenshot {
    width: min(92vw, 483px);
  }

  .screenshot-gallery img {
    width: min(92vw, 483px);
  }

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

  .legal-content h1 {
    font-size: 1.7rem;
  }

  .pricing-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}
