/* =========================================================================
   LANDING PAGE PREMIUM DESIGN (Linear / Vercel / ZCode inspired)
   ========================================================================= */

:root {
  --landing-bg: #0A0A0F;
  --landing-surface: #111118;
  --landing-surface-2: #1A1A24;
  --landing-border: rgba(255,255,255,0.08);
  --landing-border-hover: rgba(255,255,255,0.15);
  --landing-text: #EDEDED;
  --landing-text-secondary: #8B949E;
  --landing-text-tertiary: #484F58;
  --landing-accent: #00D4AA;
  --landing-accent-dim: rgba(0,212,170,0.1);
  --landing-accent-glow: rgba(0,212,170,0.15);
  --landing-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --landing-nav-bg: rgba(10, 10, 15, 0.75);
}

[data-theme="light"] {
  --landing-bg: #f4f6fb;
  --landing-surface: #ffffff;
  --landing-surface-2: #eef1f8;
  --landing-border: rgba(20, 30, 70, 0.08);
  --landing-border-hover: rgba(20, 30, 70, 0.16);
  --landing-text: #0b1020;
  --landing-text-secondary: #5a6483;
  --landing-text-tertiary: #8b94b3;
  --landing-accent: #00A685;
  --landing-accent-dim: rgba(0, 166, 133, 0.08);
  --landing-accent-glow: rgba(0, 166, 133, 0.12);
  --landing-nav-bg: rgba(244, 246, 251, 0.8);
}

html {
  scroll-behavior: smooth;
}

#features,
#security,
#pricing {
  scroll-margin-top: 90px;
}

/* Section Dividers */
.problem-section,
.features-section,
.hiw-section,
.security-section,
.pricing-section,
.legal-section,
.final-cta,
.landing-footer {
  border-top: 1px solid var(--landing-border);
}

/* Base Wrapper */
.landing-wrap {
  background: var(--landing-bg);
  color: var(--landing-text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: 'Inter', system-ui, sans-serif;
  overflow-x: hidden;
}

/* Scroll Animations */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--landing-ease), transform 0.8s var(--landing-ease);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Top Navigation */
.landing-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 16px 40px;
  background: var(--landing-nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--landing-border);
}

.nav-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.landing-nav-links a {
  color: var(--landing-text-secondary);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s;
}

.landing-nav-links a:hover {
  color: var(--landing-text);
}

.landing-nav-actions {
  display: flex;
  gap: 16px;
  align-items: center;
}

/* General Layout */
.landing-main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Section Common */
.section-pill {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--landing-accent-dim);
  color: var(--landing-accent);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 24px;
  border: 1px solid rgba(0,212,170,0.2);
}

/* Hero Section */
.hero-section {
  padding: 60px 40px 100px 40px;
  max-width: 1300px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 64px;
  align-items: center;
  position: relative;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  z-index: 2;
}

.hero-content h1 {
  font-size: 64px;
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin: 0 0 24px 0;
  font-weight: 800;
  background: linear-gradient(180deg, #FFFFFF 0%, #A1A1AA 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-content p.sub {
  font-size: 18px;
  color: var(--landing-text-secondary);
  line-height: 1.6;
  margin: 0 0 40px 0;
  max-width: 520px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  margin-bottom: 40px;
}

.hero-actions .btn {
  padding: 14px 28px;
  font-size: 15px;
  border-radius: 8px;
}

.trust-row {
  display: flex;
  gap: 24px;
  color: var(--landing-text-tertiary);
  font-size: 13px;
  font-weight: 500;
}

.trust-row span {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Mockup Visual */
.hero-visual {
  position: relative;
  width: 100%;
  perspective: 1000px;
}

.mockup-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 120%;
  height: 120%;
  background: radial-gradient(circle, rgba(0,212,170,0.15) 0%, transparent 60%);
  transform: translate(-50%, -50%);
  z-index: 0;
  pointer-events: none;
}

.mockup-window {
  position: relative;
  z-index: 1;
  background: var(--landing-surface);
  border: 1px solid var(--landing-border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.4);
  transform: rotateY(-12deg) rotateX(4deg);
  transform-style: preserve-3d;
  transition: transform 0.5s var(--landing-ease);
}
.hero-visual:hover .mockup-window {
  transform: rotateY(-6deg) rotateX(2deg);
}

.mockup-dots {
  display: flex;
  gap: 6px;
  padding: 12px 16px;
  background: var(--landing-surface-2);
  border-bottom: 1px solid var(--landing-border);
}

.mockup-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--landing-border-hover);
}

.mockup-body {
  display: grid;
  grid-template-columns: 80px 1fr;
  height: 400px;
}

.m-sidebar {
  background: rgba(0,0,0,0.2);
  border-right: 1px solid var(--landing-border);
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.m-brand { width: 32px; height: 32px; background: var(--landing-border); border-radius: 8px; margin-bottom: 24px; }
.m-nav { height: 8px; background: var(--landing-border); border-radius: 4px; width: 100%; }
.m-nav.active { background: var(--landing-accent-dim); }

.m-main {
  display: flex;
  flex-direction: column;
  padding: 24px;
  gap: 24px;
}

.m-topbar { height: 32px; background: var(--landing-border); border-radius: 6px; width: 60%; }
.m-video { height: 160px; background: var(--landing-surface-2); border-radius: 8px; border: 1px solid var(--landing-border); position: relative; }
.m-play { position: absolute; bottom: 12px; left: 12px; right: 12px; height: 4px; background: var(--landing-border); border-radius: 2px; }
.m-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.m-card { height: 80px; background: var(--landing-surface-2); border-radius: 6px; border: 1px solid var(--landing-border); }

/* Problem Section */
.problem-section {
  padding: 120px 40px;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.problem-section h2 {
  font-size: 40px;
  letter-spacing: -0.02em;
  margin: 0 0 24px 0;
  background: linear-gradient(180deg, #FFFFFF 0%, #A1A1AA 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

.problem-section strong {
  color: var(--landing-text);
  font-weight: 600;
  display: block;
  margin-top: 16px;
}

/* Features Bento Grid */
.features-section {
  padding: 120px 40px;
  max-width: 1200px;
  margin: 0 auto;
}

.features-section h2 {
  font-size: 48px;
  letter-spacing: -0.03em;
  margin: 0 0 64px 0;
  text-align: left;
}

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

.feature-card {
  background: var(--landing-surface);
  border: 1px solid var(--landing-border);
  border-radius: 24px;
  padding: 40px;
  transition: transform 0.3s var(--landing-ease), border-color 0.3s;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--landing-border-hover);
}

.feature-card.span-2 {
  grid-column: span 2;
  background: linear-gradient(145deg, var(--landing-surface) 0%, #15151F 100%);
}

.feature-card .ico-circle {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--landing-surface-2);
  border: 1px solid var(--landing-border);
  display: grid;
  place-items: center;
  color: var(--landing-accent);
  margin-bottom: 24px;
}

.ico-circle-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--landing-accent-dim);
  color: var(--landing-accent);
  border: 1px solid rgba(0, 212, 170, 0.2);
  flex-shrink: 0;
  vertical-align: middle;
}

.feature-card h3 {
  font-size: 20px;
  margin: 0 0 12px 0;
  font-weight: 600;
}

.feature-card p {
  font-size: 15px;
  color: var(--landing-text-secondary);
  line-height: 1.6;
  margin: 0;
}

/* How It Works */
.hiw-section {
  padding: 120px 40px;
  max-width: 1200px;
  margin: 0 auto;
}

.hiw-section h2 {
  font-size: 48px;
  letter-spacing: -0.03em;
  margin: 0 0 64px 0;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  position: relative;
}

.steps-grid::before {
  content: '';
  position: absolute;
  top: 24px;
  left: 24px;
  right: calc(100% / 4 + 24px);
  height: 1px;
  background: var(--landing-border);
  z-index: 0;
}

.step {
  position: relative;
  z-index: 1;
}

.step-num {
  width: 48px;
  height: 48px;
  border-radius: 24px;
  background: var(--landing-surface);
  border: 1px solid var(--landing-border);
  display: grid;
  place-items: center;
  font-weight: 700;
  color: var(--landing-text);
  margin-bottom: 24px;
}

.step h3 {
  font-size: 20px;
  margin: 0 0 12px 0;
}

.step p {
  font-size: 15px;
  color: var(--landing-text-secondary);
  line-height: 1.6;
  margin: 0;
}

/* Security Section */
.security-section {
  padding: 120px 40px;
  max-width: 1200px;
  margin: 0 auto;
}

.security-section h2 {
  font-size: 48px;
  letter-spacing: -0.03em;
  margin: 0 0 64px 0;
}

.sec-content {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.sec-item {
  display: flex;
  gap: 20px;
  padding: 32px;
  background: var(--landing-surface);
  border: 1px solid var(--landing-border);
  border-radius: 16px;
}

.sec-item .ok-ico {
  color: var(--landing-accent);
  margin-top: 4px;
}

.sec-item h4 {
  font-size: 18px;
  margin: 0 0 8px 0;
}

.sec-item p {
  font-size: 15px;
  color: var(--landing-text-secondary);
  line-height: 1.6;
  margin: 0;
}

/* Pricing Section */
.pricing-section {
  padding: 120px 40px;
  max-width: 1000px;
  margin: 0 auto;
  text-align: center;
}

.pricing-section h2 {
  font-size: 48px;
  letter-spacing: -0.03em;
  margin: 0 0 64px 0;
}

.pricing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  text-align: left;
}

.price-card {
  background: var(--landing-surface);
  border: 1px solid var(--landing-border);
  border-radius: 24px;
  padding: 48px;
  position: relative;
  display: flex;
  flex-direction: column;
}

.price-card.pro {
  background: linear-gradient(180deg, rgba(0,212,170,0.05) 0%, var(--landing-surface) 100%);
  border-color: rgba(0,212,170,0.3);
  box-shadow: 0 24px 60px rgba(0,212,170,0.1);
}

.price-card .badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--landing-accent);
  color: #000;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.price-card h3 {
  font-size: 24px;
  margin: 0 0 16px 0;
}

.price-card .price {
  font-size: 48px;
  font-weight: 800;
  margin-bottom: 32px;
  letter-spacing: -0.04em;
}

.price-card .price span {
  font-size: 18px;
  color: var(--landing-text-secondary);
  font-weight: 500;
}

.price-card ul {
  list-style: none;
  padding: 0;
  margin: 0 0 48px 0;
  flex: 1;
}

.price-card li {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  color: var(--landing-text-secondary);
  font-size: 15px;
}

.price-card li [data-icon="check"] {
  color: var(--landing-accent);
}

.price-card .btn {
  width: 100%;
  padding: 16px;
  font-size: 16px;
  border-radius: 8px;
}

/* Legal Section */
.legal-section {
  padding: 80px 40px;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.legal-section h2 {
  font-size: 24px;
  margin: 0 0 16px 0;
}

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

/* Final CTA */
.final-cta {
  padding: 120px 40px;
  text-align: center;
  background: radial-gradient(circle at top, var(--landing-surface-2) 0%, var(--landing-bg) 100%);
}

.final-cta h2 {
  font-size: 48px;
  letter-spacing: -0.03em;
  margin: 0 0 16px 0;
}

.final-cta p {
  font-size: 18px;
  color: var(--landing-text-secondary);
  margin: 0 0 40px 0;
}

.final-cta .btn {
  padding: 16px 32px;
  font-size: 16px;
  border-radius: 8px;
}

/* Footer */
.landing-footer {
  padding: 40px;
  text-align: center;
  color: var(--landing-text-tertiary);
  font-size: 14px;
}

/* Buttons overriding existing if needed */
.landing-wrap .btn.primary {
  background: var(--landing-text);
  color: var(--landing-bg);
  border: none;
}
.landing-wrap .btn.primary:hover {
  background: var(--landing-text-secondary);
  color: var(--landing-bg);
}
.landing-wrap .btn.ghost {
  background: transparent;
  color: var(--landing-text);
  border: 1px solid var(--landing-border);
}
.landing-wrap .btn.ghost:hover {
  background: var(--landing-surface);
  border-color: var(--landing-border-hover);
}

/* Language Switch */
.landing-nav .lang-switch {
  background: transparent;
  border: none;
  color: var(--landing-text-secondary);
  cursor: pointer;
  padding: 8px;
  outline: none;
}
.landing-nav .lang-switch:hover {
  color: var(--landing-text);
}
.landing-nav .lang-switch option {
  background: var(--landing-surface);
  color: var(--landing-text);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .hero-section {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-content {
    align-items: center;
    margin: 0 auto;
  }
  .bento-grid {
    grid-template-columns: 1fr 1fr;
  }
  .feature-card.span-2 {
    grid-column: span 1;
  }
  .steps-grid {
    grid-template-columns: 1fr 1fr;
    gap: 48px;
  }
  .steps-grid::before {
    display: none;
  }
}

@media (max-width: 768px) {
  .landing-nav {
    padding: 16px 20px;
  }
  .landing-nav-links {
    display: none;
  }
  .hero-section {
    padding: 80px 20px;
  }
  .hero-content h1 {
    font-size: 40px;
  }
  .bento-grid {
    grid-template-columns: 1fr;
  }
  .sec-content, .pricing-grid, .steps-grid {
    grid-template-columns: 1fr;
  }
  .problem-section h2, .features-section h2, .hiw-section h2, .security-section h2, .pricing-section h2, .final-cta h2 {
    font-size: 32px;
  }
  .trust-row {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }
}

@media (max-width: 576px) {
  .landing-nav {
    padding: 12px 16px;
  }
  .landing-nav-actions {
    gap: 8px;
  }
  .landing-nav-actions .btn {
    padding: 8px 12px;
    font-size: 13px;
  }
  .landing-nav .lang-switch {
    padding: 4px;
    font-size: 13px;
  }
  #navStartBtn {
    display: none;
  }
}

/* Auth / limit Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
}

.modal-card {
  width: 100%;
  max-width: 420px;
  background: var(--landing-surface);
  border: 1px solid var(--landing-border);
  border-radius: 20px;
  padding: 32px;
  position: relative;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
  animation: modal-in 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.close-modal {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: none;
  font-size: 20px;
  color: var(--landing-text-secondary);
  cursor: pointer;
  display: grid;
  place-items: center;
}

.close-modal:hover {
  color: var(--landing-text);
}

/* Brand PNG Logo Styles */
.brand-img {
  height: 32px;
  width: auto;
  max-width: 100%;
  display: block;
  filter: invert(1) hue-rotate(180deg);
  transition: filter 0.3s ease;
}

.brand-img-modal {
  height: 38px;
  width: auto;
  max-width: 100%;
  display: block;
  margin: 0 auto;
  filter: invert(1) hue-rotate(180deg);
  transition: filter 0.3s ease;
}

/* Light Theme Logo Overrides */
[data-theme="light"] .brand-img,
[data-theme="light"] .brand-img-modal {
  filter: none;
}

/* Light Theme Overrides */
[data-theme="light"] .hero-content h1,
[data-theme="light"] .problem-section h2 {
  background: linear-gradient(180deg, #0b1020 0%, #5a6483 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="light"] .feature-card,
[data-theme="light"] .price-card,
[data-theme="light"] .sec-item {
  box-shadow: 0 10px 30px rgba(20, 30, 70, 0.02), 0 1px 3px rgba(20, 30, 70, 0.02);
  border-color: rgba(20, 30, 70, 0.06);
}

[data-theme="light"] .feature-card:hover,
[data-theme="light"] .price-card:hover,
[data-theme="light"] .sec-item:hover {
  box-shadow: 0 20px 40px rgba(20, 30, 70, 0.04), 0 1px 3px rgba(20, 30, 70, 0.02);
  border-color: rgba(20, 30, 70, 0.1);
}

[data-theme="light"] .landing-nav {
  box-shadow: 0 4px 30px rgba(20, 30, 70, 0.02);
  border-bottom-color: rgba(20, 30, 70, 0.06);
}

[data-theme="light"] .price-card.pro {
  background: linear-gradient(180deg, rgba(0, 166, 133, 0.03) 0%, var(--landing-surface) 100%);
  border-color: rgba(0, 166, 133, 0.35);
  box-shadow: 0 24px 60px rgba(0, 166, 133, 0.08);
}

[data-theme="light"] .hero-visual .mockup-window {
  box-shadow: 0 30px 90px rgba(20, 30, 70, 0.06);
  border-color: rgba(20, 30, 70, 0.08);
}

[data-theme="light"] .m-sidebar {
  background: rgba(20, 30, 70, 0.02);
}

[data-theme="light"] .feature-card.span-2 {
  background: linear-gradient(145deg, var(--landing-surface) 0%, var(--landing-surface-2) 100%);
}

/* Explicit override to guarantee landing page login button visibility */
#landingLoginBtn {
  background: transparent !important;
  color: var(--landing-text) !important;
  border: 1px solid var(--landing-border) !important;
}
#landingLoginBtn:hover {
  background: var(--landing-surface) !important;
  border-color: var(--landing-border-hover) !important;
  color: var(--landing-text) !important;
}

