/* ===========================================
   Pulse Landing Page
   Flat design, single accent (orange #f97316)
   Manual light/dark toggle + system fallback
   =========================================== */

/* ===== LIGHT THEME (default) ===== */
:root {
  --bg: #ffffff;
  --bg-alt: #f9fafb;
  --bg-nav: rgba(255, 255, 255, 0.92);
  --text: #111827;
  --text-secondary: #4b5563;
  --text-muted: #9ca3af;
  --accent: #f97316;
  --accent-hover: #ea580c;
  --accent-bg: #fff7ed;
  --border: #e5e7eb;
  --border-light: #f3f4f6;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.08);
  --radius: 8px;
  --radius-lg: 12px;
}

/* Dark vars — applied via .dark on <html> */
:root.dark {
  --bg: #0f1117;
  --bg-alt: #1a1d27;
  --bg-nav: rgba(15, 17, 23, 0.92);
  --text: #f3f4f6;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  --accent: #f97316;
  --accent-hover: #fb923c;
  --accent-bg: rgba(249, 115, 22, 0.1);
  --border: #2a2d3a;
  --border-light: #1f2230;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* System preference fallback (when no manual class set) */
@media (prefers-color-scheme: dark) {
  :root:not(.light) {
    --bg: #0f1117;
    --bg-alt: #1a1d27;
    --bg-nav: rgba(15, 17, 23, 0.92);
    --text: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    --accent: #f97316;
    --accent-hover: #fb923c;
    --accent-bg: rgba(249, 115, 22, 0.1);
    --border: #2a2d3a;
    --border-light: #1f2230;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.3);
  }
}

/* ===== IMAGE THEME SWITCHING ===== */
.img-dark { display: none; }
.img-light { display: block; }

:root.dark .img-light { display: none; }
:root.dark .img-dark { display: block; }

@media (prefers-color-scheme: dark) {
  :root:not(.light) .img-light { display: none; }
  :root:not(.light) .img-dark { display: block; }
}

/* ===== LOGO SWITCHING ===== */
.logo-dark { display: none; }
.logo-light { display: block; }

:root.dark .logo-light { display: none !important; }
:root.dark .logo-dark { display: block !important; }

@media (prefers-color-scheme: dark) {
  :root:not(.light) .logo-light { display: none !important; }
  :root:not(.light) .logo-dark { display: block !important; }
}

/* ===== THEME TOGGLE BUTTON ===== */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.icon-sun { display: none; }
.icon-moon { display: block; }

:root.dark .icon-sun { display: block; }
:root.dark .icon-moon { display: none; }

@media (prefers-color-scheme: dark) {
  :root:not(.light) .icon-sun { display: block; }
  :root:not(.light) .icon-moon { display: none; }
}

/* ===== PAGE LOADER ===== */
.page-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.page-loader.loaded {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

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

ul { list-style: none; }

.nav-logo {
  display: flex;
  align-items: center;
}

.nav-logo img {
  height: 28px;
  width: auto;
}

/* ===== NAVIGATION ===== */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 48px;
  background: var(--bg-nav);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav-links {
  display: flex;
  gap: 8px;
}

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: var(--radius);
  transition: color 0.2s, background 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
  background: var(--accent-bg);
}

.nav-right {
  display: flex;
  gap: 12px;
  align-items: center;
}

.btn-nav-login {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 8px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s, color 0.2s;
}

.btn-nav-login:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-nav-cta {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  padding: 8px 20px;
  background: var(--accent);
  border-radius: var(--radius);
  transition: background 0.2s;
}

.btn-nav-cta:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 16px rgba(249, 115, 22, 0.3);
}

/* Mobile menu */
.nav-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--text);
}

.nav-menu-btn svg { display: block; }

/* ===== MOBILE NAV ===== */
.nav-mobile {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--bg);
  padding: 24px;
  flex-direction: column;
  opacity: 0;
  transition: opacity 0.2s;
}

.nav-mobile.open {
  display: flex;
  opacity: 1;
}

.nav-mobile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 48px;
}

.nav-mobile-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--text);
}

.nav-mobile-close svg { display: block; }

.nav-mobile-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-mobile-links a {
  font-size: 20px;
  font-weight: 600;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-light);
  transition: color 0.2s;
}

.nav-mobile-links a:hover { color: var(--accent); }

.nav-mobile-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: auto;
}

.nav-mobile-actions .btn-nav-login,
.nav-mobile-actions .btn-nav-cta {
  text-align: center;
  padding: 14px 24px;
  font-size: 16px;
}

/* ===== BUTTONS ===== */
.btn-primary {
  display: inline-block;
  padding: 14px 32px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border-radius: var(--radius);
  transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
}

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 20px rgba(249, 115, 22, 0.3);
  transform: translateY(-1px);
}

.btn-secondary {
  display: inline-block;
  padding: 14px 32px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s, color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 4px 16px rgba(249, 115, 22, 0.1);
  transform: translateY(-1px);
}

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 48px 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 200px;
  background: linear-gradient(to bottom, transparent, var(--bg));
  pointer-events: none;
  z-index: 1;
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.35;
  pointer-events: none;
}

.hero-glow-1 {
  width: 600px;
  height: 600px;
  background: var(--accent);
  top: -200px;
  right: -100px;
}

.hero-glow-2 {
  width: 400px;
  height: 400px;
  background: var(--accent);
  bottom: -100px;
  left: -80px;
  opacity: 0.2;
}

.hero-inner {
  max-width: 720px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-bg);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 6px 16px;
  margin-bottom: 28px;
  transition: background 0.2s, box-shadow 0.2s;
}

.hero-badge:hover {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 20px rgba(249, 115, 22, 0.3);
}

.hero h1 {
  font-size: clamp(36px, 4.5vw, 56px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -1.5px;
  color: var(--text);
  margin-bottom: 24px;
}

.hero-subtitle {
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 40px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-meta {
  display: flex;
  gap: 24px;
  justify-content: center;
  margin-top: 32px;
  flex-wrap: wrap;
}

.hero-meta li {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.hero-meta li::before {
  content: "·";
  margin-right: 4px;
  opacity: 0.5;
}

/* ===== SECTIONS ===== */
.section {
  padding: 96px 48px;
  max-width: 1120px;
  margin: 0 auto;
}

.section-header {
  margin-bottom: 56px;
}

.section-header h2 {
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 700;
  letter-spacing: -1px;
  line-height: 1.2;
  color: var(--text);
  margin-bottom: 12px;
}

.section-header p {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ===== PRODUCT SCREENSHOTS ===== */
.product-section {
  position: relative;
}

.product-section::before {
  content: "";
  position: absolute;
  top: 120px;
  left: -200px;
  width: 500px;
  height: 500px;
  background: var(--accent);
  border-radius: 50%;
  filter: blur(180px);
  opacity: 0.08;
  pointer-events: none;
}

.product-showcase {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.showcase-item {
  background: var(--bg-alt);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
}

.showcase-item:hover {
  border-color: rgba(249, 115, 22, 0.3);
  box-shadow: 0 12px 40px rgba(249, 115, 22, 0.08);
  transform: translateY(-4px);
}

.showcase-text {
  padding: 32px 32px 0;
}

.showcase-label {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent);
  margin-bottom: 8px;
  transition: letter-spacing 0.3s;
}

.showcase-item:hover .showcase-label {
  letter-spacing: 1.5px;
}

.showcase-text p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 600px;
}

.screenshot-frame {
  padding: 24px;
}

.screenshot-frame img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  transition: box-shadow 0.3s;
}

.showcase-item:hover .screenshot-frame img {
  box-shadow: 0 8px 32px rgba(249, 115, 22, 0.12);
}

.showcase-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

/* ===== FEATURES LIST ===== */
.features-section {
  position: relative;
}

.features-section::before {
  content: "";
  position: absolute;
  bottom: 80px;
  right: -200px;
  width: 500px;
  height: 500px;
  background: var(--accent);
  border-radius: 50%;
  filter: blur(180px);
  opacity: 0.07;
  pointer-events: none;
}

.features-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.feature-row {
  padding: 32px;
  border-bottom: 1px solid var(--border-light);
  border-right: 1px solid var(--border-light);
  transition: background 0.3s;
}

.feature-row:hover {
  background: var(--accent-bg);
}

.feature-row:hover h3 {
  color: var(--accent);
}

.feature-row h3 {
  transition: color 0.3s;
}

.feature-row:nth-child(even) {
  border-right: none;
}

.feature-row:nth-last-child(-n+2) {
  border-bottom: none;
}

.feature-row h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.feature-row p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ===== STATS ===== */
.stats-section {
  background: var(--bg-alt);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  position: relative;
  overflow: hidden;
}

.stats-section::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 300px;
  background: var(--accent);
  border-radius: 50%;
  filter: blur(160px);
  opacity: 0.06;
  pointer-events: none;
}

.stats-grid {
  display: flex;
  justify-content: center;
  gap: 80px;
  text-align: center;
}

.stat {
  transition: transform 0.3s;
}

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

.stat:hover .stat-number {
  color: var(--accent);
}

.stat-number {
  font-size: 36px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -1px;
  transition: color 0.3s;
}

.stat-label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 4px;
}

/* ===== CONTACT ===== */
.contact-section {
  text-align: center;
}

.contact-box {
  position: relative;
  overflow: hidden;
  background: rgba(249, 115, 22, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 80px 48px;
  max-width: 720px;
  margin: 0 auto;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.contact-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
}

.contact-glow-1 {
  width: 400px;
  height: 400px;
  background: var(--accent);
  top: -160px;
  right: -100px;
  opacity: 0.15;
}

.contact-glow-2 {
  width: 300px;
  height: 300px;
  background: var(--accent);
  bottom: -120px;
  left: -80px;
  opacity: 0.1;
}

.contact-inner {
  position: relative;
  z-index: 1;
}

.contact-box h2 {
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 700;
  letter-spacing: -1px;
  color: var(--text);
  margin-bottom: 12px;
}

.contact-box p {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 32px;
}

.contact-form {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-group input,
.form-group textarea {
  font-family: inherit;
  font-size: 15px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  transition: border-color 0.2s, box-shadow 0.2s;
  resize: vertical;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

.btn-submit {
  border: none;
  cursor: pointer;
  font-family: inherit;
  align-self: flex-start;
}

.contact-note {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 24px;
  margin-bottom: 0;
}

.contact-note a {
  color: var(--accent);
  font-weight: 500;
}

.contact-note a:hover {
  text-decoration: underline;
}

.form-success {
  padding: 20px;
  background: var(--accent-bg);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  color: var(--text);
  font-weight: 500;
}

/* ===== PRICING ===== */
.pricing-section {
  position: relative;
  overflow: hidden;
}

.pricing-section::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -100px;
  width: 500px;
  height: 500px;
  background: var(--accent);
  border-radius: 50%;
  filter: blur(200px);
  opacity: 0.06;
  pointer-events: none;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: start;
}

.pricing-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
}

.pricing-card:hover {
  border-color: rgba(249, 115, 22, 0.4);
  box-shadow: 0 12px 40px rgba(249, 115, 22, 0.1);
  transform: translateY(-4px);
}

.pricing-card-featured {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), var(--shadow-lg);
  position: relative;
  background: rgba(249, 115, 22, 0.03);
}

.pricing-card-header {
  padding: 32px 28px 0;
}

.pricing-card-header h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.pricing-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.pricing-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #fff;
  background: var(--accent);
  border-radius: 4px;
  padding: 3px 10px;
  margin-bottom: 12px;
}

.pricing-card-body {
  padding: 24px 28px;
  flex: 1;
}

.pricing-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pricing-features li {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  padding-left: 20px;
  position: relative;
}

.pricing-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
  font-size: 13px;
}

.pricing-card-footer {
  padding: 0 28px 28px;
}

.btn-pricing {
  display: block;
  text-align: center;
  width: 100%;
  padding: 12px 24px;
}

.pricing-note {
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 32px;
}

/* ===== FOOTER ===== */
footer {
  padding: 48px;
  border-top: 1px solid var(--border-light);
}

.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-inner p {
  font-size: 13px;
  color: var(--text-muted);
}

/* ===== SCROLL REVEAL ===== */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  nav { padding: 14px 20px; }
  .nav-links { display: none; }
  .nav-right { display: none; }
  .nav-menu-btn { display: block; }

  .hero {
    min-height: 100vh;
    padding: 120px 24px 64px;
    text-align: left;
  }

  .hero-actions { justify-content: flex-start; }
  .hero-meta { justify-content: flex-start; }

  .section { padding: 64px 24px; }

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

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

  .feature-row {
    border-right: none;
  }

  .feature-row:nth-last-child(2) {
    border-bottom: 1px solid var(--border-light);
  }

  .feature-row:last-child {
    border-bottom: none;
  }

  .stats-grid {
    flex-direction: column;
    gap: 32px;
  }

  .contact-box { padding: 48px 24px; }

  .form-row {
    grid-template-columns: 1fr;
  }

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

  footer { padding: 32px 24px; }
  .footer-inner {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-primary,
  .btn-secondary {
    text-align: center;
  }
}

.pulse-brand {
  color: var(--accent);
  font-weight: 800;
  letter-spacing: 2px;
  position: relative;
  display: inline-block;
  transition: color 0.2s;
}
.pulse-brand::after {
  content: "";
  display: block;
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), #fb923c 80%);
  border-radius: 2px;
  opacity: 0.18;
  transform: scaleX(0.7);
  transition: transform 0.3s cubic-bezier(.4,1.6,.6,1), opacity 0.3s;
}
.pulse-brand:hover::after, .pulse-brand:focus::after {
  opacity: 0.32;
  transform: scaleX(1);
}
