/* ========================================
   SolarSim Marketing — style.css
   Mobile-first, clean, Hey/Basecamp-inspired
   ======================================== */

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

:root {
  --green: #16A34A;
  --green-dark: #15803D;
  --green-light: #F0FDF4;
  --green-50: #DCFCE7;
  --gray-50: #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-400: #9CA3AF;
  --gray-500: #6B7280;
  --gray-600: #4B5563;
  --gray-700: #374151;
  --gray-800: #1F2937;
  --gray-900: #111827;
  --white: #FFFFFF;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
  --radius: 8px;
  --radius-lg: 12px;
  --transition: 0.2s ease;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--gray-800);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

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

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

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 12px 24px;
  min-height: 44px;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

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

.btn-primary:hover {
  background: var(--green-dark);
  border-color: var(--green-dark);
}

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

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

.btn-sm {
  padding: 6px 16px;
  font-size: 0.85rem;
}

.btn-lg {
  padding: 14px 32px;
  font-size: 1.05rem;
}

.btn-block {
  width: 100%;
  text-align: center;
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--gray-200);
}

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

.nav-logo {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--gray-900);
  display: flex;
  align-items: center;
  gap: 6px;
}

.logo-icon {
  color: var(--green);
  display: inline-block;
  vertical-align: middle;
  animation: spin 8s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.nav-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
}

.hamburger,
.hamburger::before,
.hamburger::after {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--gray-700);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.hamburger {
  position: relative;
}

.hamburger::before,
.hamburger::after {
  content: "";
  position: absolute;
  left: 0;
}

.hamburger::before {
  top: -7px;
}

.hamburger::after {
  top: 7px;
}

/* Hamburger open state */
.nav-toggle[aria-expanded="true"] .hamburger {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .hamburger::before {
  top: 0;
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .hamburger::after {
  top: 0;
  transform: rotate(-45deg);
}

.nav-links {
  display: none;
  position: absolute;
  top: 64px;
  left: 0;
  right: 0;
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  padding: 16px 20px;
  flex-direction: column;
  gap: 12px;
}

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

.nav-links a:not(.btn) {
  font-size: 0.95rem;
  color: var(--gray-600);
  font-weight: 500;
  transition: color var(--transition);
}

.nav-links a:not(.btn):hover {
  color: var(--green);
}

/* Desktop nav */
@media (min-width: 768px) {
  .nav-toggle {
    display: none;
  }

  .nav-links {
    display: flex;
    position: static;
    flex-direction: row;
    align-items: center;
    gap: 32px;
    padding: 0;
    border: none;
    background: none;
  }
}

/* --- Hero --- */
.hero {
  padding: 96px 0 56px;
  background: linear-gradient(160deg, var(--green-light) 0%, var(--white) 50%, var(--green-50) 100%);
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 48px;
}

.hero-content {
  text-align: center;
  max-width: 560px;
}

.hero-title {
  font-size: 1.85rem;
  font-weight: 900;
  color: var(--gray-900);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 20px;
}

.hero-description {
  font-size: 1.05rem;
  color: var(--gray-600);
  line-height: 1.7;
  margin-bottom: 20px;
}

.hero-contrast {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--gray-700);
  background: var(--white);
  border-left: 3px solid var(--green);
  padding: 12px 16px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-bottom: 20px;
  line-height: 1.5;
}

.hero-free-badge {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--green);
  margin-bottom: 28px;
}

.hero-ctas {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

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

.store-icon {
  flex-shrink: 0;
}

/* Phone showcase */
.hero-showcase {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0;
  position: relative;
  flex-shrink: 0;
  padding: 20px 0;
}

.showcase-phone {
  text-align: center;
  transition: transform 0.4s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
}

.phone-frame {
  background: linear-gradient(145deg, rgba(22,163,74,0.08), rgba(22,163,74,0.03));
  border-radius: 22px;
  padding: 2px;
  box-shadow: 0 16px 32px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.05);
  overflow: hidden;
  border: 1px solid rgba(22,163,74,0.1);
}

.phone-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 8px;
  border-radius: 20px;
  display: block;
}

.showcase-label {
  margin-top: 14px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--green-dark);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  min-height: 2.4em;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Mobile */
.showcase-phone-back .phone-frame,
.showcase-phone-front .phone-frame {
  width: 110px;
  height: 220px;
}

.showcase-phone-center .phone-frame {
  width: 140px;
  height: 280px;
}

.showcase-phone-back {
  transform: translateX(14px) rotate(-3deg);
  z-index: 1;
}

.showcase-phone-center {
  z-index: 3;
  transform: translateY(-8px);
}

.showcase-phone-front {
  transform: translateX(-14px) rotate(3deg);
  z-index: 2;
}

@media (min-width: 768px) {
  .hero {
    padding: 140px 0 100px;
  }

  .hero-inner {
    flex-direction: row;
    text-align: left;
  }

  .hero-content {
    text-align: left;
    flex: 1;
  }

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

  .hero-ctas {
    flex-direction: row;
    justify-content: flex-start;
  }

  .hero-ctas .btn {
    width: auto;
  }

  .showcase-phone-back .phone-frame,
  .showcase-phone-front .phone-frame {
    width: 220px;
    height: 450px;
  }

  .showcase-phone-center .phone-frame {
    width: 260px;
    height: 530px;
  }

  .hero-showcase {
    gap: 0;
  }

  .showcase-phone-back {
    transform: translateX(24px) rotate(-6deg);
  }

  .showcase-phone-center {
    transform: translateY(-16px);
  }

  .showcase-phone-front {
    transform: translateX(-24px) rotate(6deg);
  }
}

/* --- Sections --- */
.section {
  padding: 56px 0;
}

.section-light {
  background: var(--green-light);
}

.section-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--gray-900);
  text-align: center;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.section-subtitle {
  text-align: center;
  color: var(--gray-500);
  font-size: 1rem;
  margin-bottom: 32px;
}

@media (min-width: 768px) {
  .section {
    padding: 100px 0;
  }

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

  .section-subtitle {
    font-size: 1.1rem;
    margin-bottom: 48px;
  }
}

/* --- Steps (Comment ca marche) --- */
.steps {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

.step {
  text-align: center;
  max-width: 320px;
}

.step-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--white);
  box-shadow: var(--shadow-md);
  margin-bottom: 16px;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--green);
  color: var(--white);
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.step-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 8px;
}

.step-desc {
  color: var(--gray-600);
  font-size: 0.95rem;
  line-height: 1.6;
}

.step-arrow {
  font-size: 1.5rem;
  color: var(--green);
  transform: rotate(90deg);
}

@media (min-width: 768px) {
  .steps {
    flex-direction: row;
    align-items: flex-start;
    justify-content: center;
    gap: 24px;
  }

  .step-arrow {
    transform: none;
    margin-top: 48px;
    font-size: 2rem;
  }
}

/* --- Pricing --- */
.pricing-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  max-width: 960px;
  margin: 0 auto;
}

.pricing-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform var(--transition), box-shadow var(--transition);
}

.pricing-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.pricing-card-featured {
  border-color: var(--green);
  border-width: 2px;
  box-shadow: var(--shadow-md);
}

.pricing-badge {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--green);
  color: var(--white);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 16px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.pricing-header {
  text-align: center;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--gray-200);
}

.pricing-name {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 8px;
}

.pricing-price {
  font-size: 2rem;
  font-weight: 800;
  color: var(--gray-900);
}

.pricing-period {
  font-size: 0.85rem;
  color: var(--gray-500);
  margin-top: 4px;
}

.pricing-features {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
}

.pricing-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  color: var(--gray-700);
}

.pricing-features .check {
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .pricing-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .pricing-card-featured {
    transform: scale(1.04);
  }

  .pricing-card-featured:hover {
    transform: scale(1.04) translateY(-2px);
  }
}

/* --- Pricing anchor --- */
.pricing-anchor {
  text-align: center;
  color: var(--gray-600);
  font-size: 0.95rem;
  line-height: 1.7;
  max-width: 640px;
  margin: 2.5rem auto 0;
  padding: 20px 24px;
  background: var(--green-light);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(22,163,74,0.15);
}

/* --- Product proof --- */
.section-proof-detail {
  background: var(--gray-50);
}

.proof-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin-top: 32px;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.proof-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 22px;
}

.proof-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.proof-city {
  color: var(--gray-500);
  font-size: 0.82rem;
  font-weight: 700;
}

.proof-chip {
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 4px 10px;
  white-space: nowrap;
}

.proof-chip-home {
  background: var(--green-light);
  color: var(--green-dark);
}

.proof-card h3 {
  color: var(--gray-900);
  font-size: 1.05rem;
  line-height: 1.35;
  margin-bottom: 8px;
}

.proof-load {
  color: var(--gray-600);
  font-size: 0.9rem;
  line-height: 1.55;
  min-height: 68px;
}

.proof-specs {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin: 18px 0;
}

.proof-specs div,
.proof-money div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 10px 12px;
}

.proof-specs span,
.proof-money span {
  color: var(--gray-500);
  font-size: 0.76rem;
  font-weight: 700;
}

.proof-specs strong,
.proof-money strong {
  color: var(--gray-900);
  font-size: 0.9rem;
  text-align: right;
}

.proof-money {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--gray-200);
}

.proof-money strong {
  color: var(--green-dark);
}

.proof-note {
  color: var(--gray-600);
  font-size: 0.85rem;
  line-height: 1.55;
  margin-top: 16px;
}

.proof-disclaimer {
  color: var(--gray-500);
  font-size: 0.85rem;
  line-height: 1.6;
  margin: 20px auto 0;
  max-width: 760px;
  text-align: center;
}

@media (min-width: 768px) {
  .proof-money {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 900px) {
  .proof-grid {
    grid-template-columns: 1fr;
  }
}

/* --- Footer --- */
.footer {
  background: var(--gray-900);
  color: var(--gray-400);
  padding: 64px 0 32px;
}

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

.footer-logo {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.footer-tagline {
  font-size: 0.9rem;
  color: var(--gray-500);
}

.footer-col h4 {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-col a {
  font-size: 0.9rem;
  color: var(--gray-400);
  transition: color var(--transition);
}

.footer-col a:hover {
  color: var(--green);
}

.footer-bottom {
  border-top: 1px solid var(--gray-700);
  padding-top: 24px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--gray-500);
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }
}

/* --- Fade-in animation --- */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Login Modal --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(28, 25, 23, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.waitlist-modal[hidden] {
  display: none !important;
}

.modal-card {
  background: #fff;
  border-radius: 16px;
  border: 1px solid var(--gray-200);
  padding: 2rem 1.75rem;
  max-width: 380px;
  width: 100%;
  position: relative;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.waitlist-card {
  max-width: 420px;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--gray-400);
  cursor: pointer;
  line-height: 1;
  padding: 4px;
}

.modal-close:hover {
  color: var(--gray-700);
}

.waitlist-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--green-light);
  border: 1px solid var(--green-50);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-bottom: 1rem;
}

.waitlist-icon-phone {
  width: 18px;
  height: 28px;
  border: 2px solid var(--green);
  border-radius: 5px;
  display: block;
  position: relative;
}

.waitlist-icon-phone::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 3px;
  width: 4px;
  height: 4px;
  background: var(--green);
  border-radius: 50%;
  transform: translateX(-50%);
}

.waitlist-icon-signal {
  position: absolute;
  right: 10px;
  top: 12px;
  width: 8px;
  height: 8px;
  border-top: 2px solid var(--green);
  border-right: 2px solid var(--green);
  border-radius: 0 8px 0 0;
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 0.25rem;
}

.modal-subtitle {
  font-size: 0.875rem;
  color: var(--gray-500);
  margin-bottom: 1.5rem;
}

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

.form-group label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 0.375rem;
}

.form-group input {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 0.9375rem;
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  background: var(--gray-50);
  color: var(--gray-800);
  outline: none;
  transition: border-color 0.2s;
}

.form-group input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
}

.form-error {
  font-size: 0.8125rem;
  color: #DC2626;
  margin-bottom: 0.75rem;
}

.waitlist-status {
  display: none;
  font-size: 0.875rem;
  border-radius: var(--radius);
  padding: 0.75rem 0.875rem;
  margin-bottom: 1rem;
}

.waitlist-status.success {
  display: block;
  background: var(--green-light);
  border: 1px solid var(--green-50);
  color: var(--green-dark);
}

.waitlist-status.error {
  display: block;
  background: #FEF2F2;
  border: 1px solid #FECACA;
  color: #991B1B;
}

.modal-footer-text {
  font-size: 0.8125rem;
  color: var(--gray-500);
  text-align: center;
  margin-top: 1rem;
}

.modal-footer-text a {
  color: var(--green);
  font-weight: 600;
  text-decoration: none;
}

#login-submit {
  margin-top: 0.5rem;
}

#login-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.buy-btn.loading {
  opacity: 0.6;
  pointer-events: none;
}

/* --- Payment Status Banner --- */
.payment-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.875rem 1.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  text-align: center;
  animation: bannerSlideDown 0.3s ease;
}

@keyframes bannerSlideDown {
  from { transform: translateY(-100%); }
  to { transform: translateY(0); }
}

.payment-banner-success {
  background: var(--green-light);
  color: var(--green-dark);
  border-bottom: 2px solid var(--green);
}

.payment-banner-error {
  background: #FEF2F2;
  color: #991B1B;
  border-bottom: 2px solid #DC2626;
}

.payment-banner-pending {
  background: #FFFBEB;
  color: #92400E;
  border-bottom: 2px solid #D97706;
}

.payment-banner-icon {
  font-size: 1.125rem;
  line-height: 1;
}

.payment-banner-close {
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  opacity: 0.6;
  padding: 0 0.25rem;
  line-height: 1;
  color: inherit;
}

.payment-banner-close:hover {
  opacity: 1;
}
