/* ==========================================================================
   KIWIBLIT BROWSER WEBSITE STYLES
   Theme: Lando Minimalist Layout + Light & Dark Mode Toggle
   Font: Montserrat
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800;900&display=swap');

:root {
  /* LIGHT THEME (DEFAULT MATCHING LANDO PREVIEW) */
  --bg-main: #f5f6f8;
  --bg-nav: rgba(245, 246, 248, 0.9);
  --bg-card: #ffffff;
  --bg-card-sub: #f0f2f5;
  --border-color: #e2e8f0;
  
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;

  --brand-blue: #2563eb;
  --brand-blue-hover: #1d4ed8;
  --btn-secondary-bg: #e2e8f0;
  --btn-secondary-text: #0f172a;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 20px 40px -15px rgba(0, 0, 0, 0.08);

  --radius-pill: 30px;
  --radius-lg: 16px;
  --radius-md: 10px;
}

[data-theme="dark"] {
  /* DARK THEME */
  --bg-main: #111827;
  --bg-nav: rgba(17, 24, 39, 0.9);
  --bg-card: #1f2937;
  --bg-card-sub: #374151;
  --border-color: #374151;
  
  --text-primary: #f9fafb;
  --text-secondary: #d1d5db;
  --text-muted: #9ca3af;

  --brand-blue: #3b82f6;
  --brand-blue-hover: #2563eb;
  --btn-secondary-bg: #374151;
  --btn-secondary-text: #f9fafb;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 20px 40px -15px rgba(0, 0, 0, 0.5);
}

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

html {
  scroll-behavior: smooth;
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-primary);
  transition: background-color 0.3s ease, color 0.3s ease;
}

body {
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
  font-family: 'Montserrat', sans-serif;
  background-color: var(--bg-main);
  color: var(--text-primary);
}

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 32px;
}

/* NAVBAR (LANDO STYLE) */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 80px;
  z-index: 1000;
  backdrop-filter: blur(12px);
  background: var(--bg-nav);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-primary);
}

.logo-img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  border-radius: 8px;
}

.brand-name {
  font-family: 'Montserrat', sans-serif;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-primary);
}

.nav-center {
  display: flex;
  align-items: center;
  gap: 36px;
  list-style: none;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: color 0.2s ease;
}

.nav-link:hover, .nav-link.active {
  color: var(--brand-blue);
}

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

/* THEME TOGGLE BUTTON */
.theme-toggle-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  transition: background 0.2s ease, color 0.2s ease;
}

/* BUTTONS (STATIC, NO HOVER SCALE/TRANSFORM) */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: none;
}

.btn-pill {
  border-radius: var(--radius-pill);
}

.btn-primary {
  background: var(--brand-blue);
  color: #ffffff;
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1.5px solid var(--border-color);
}

/* HERO SECTION (LANDO 2-COLUMN LAYOUT) */
.hero {
  padding-top: 150px;
  padding-bottom: 70px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

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

.eyebrow {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  margin-bottom: 20px;
  display: block;
}

.hero-headline {
  font-family: 'Montserrat', sans-serif;
  font-size: 54px;
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -1.8px;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.hero-subtitle {
  font-size: 17px;
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 36px;
  max-width: 500px;
}

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

.btn-lg {
  padding: 15px 32px;
  font-size: 15px;
}

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

.hero-img {
  max-width: 100%;
  height: auto;
  max-height: 480px;
  object-fit: contain;
  filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.12));
}

/* TRUSTED / SPECS BAR */
.trusted-bar {
  padding: 30px 0 60px;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
}

.trusted-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

/* BROWSER UI PREVIEW MOCKUP */
.preview-section {
  padding: 90px 0;
}

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

.section-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 34px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
  margin-bottom: 12px;
}

.section-desc {
  font-size: 15px;
  color: var(--text-secondary);
}

.browser-window {
  background: #1c1c1f;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  max-width: 1100px;
  margin: 0 auto;
}

.browser-toolbar {
  background: #161619;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.window-dots {
  display: flex;
  gap: 8px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.dot-red { background: #ff5f56; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #27c93f; }

.address-bar {
  flex: 1;
  background: #232328;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 8px 16px;
  color: #9a9ab0;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
}

.address-icon {
  color: #45c872;
}

.browser-viewport {
  padding: 40px;
  background: #1c1c1f;
  min-height: 440px;
  display: flex;
  gap: 40px;
  text-align: left;
  color: #ffffff;
}

.mock-main {
  flex: 1;
}

.mock-hero-title {
  font-size: 22px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 6px;
}

.mock-hero-sub {
  font-size: 13px;
  color: #9a9ab0;
  margin-bottom: 30px;
}

.mock-section-label {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 14px;
}

.mock-sites-grid {
  display: flex;
  gap: 12px;
  margin-bottom: 40px;
}

.mock-site {
  width: 54px;
  height: 54px;
  background: #2b2b2f;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mock-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  color: #ffffff;
}

.mock-sidebar {
  width: 300px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.mock-card {
  background: #252529;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 18px;
}

.mock-card-title {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 12px;
}

.mock-stat-box {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  padding: 12px;
}

.mock-stat-val {
  font-size: 20px;
  font-weight: 800;
  color: #ffffff;
}

.mock-stat-lbl {
  font-size: 11px;
  color: #9a9ab0;
}

/* FEATURES SECTION */
.features-section {
  padding: 90px 0;
  border-top: 1px solid var(--border-color);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  transition: background 0.3s ease, border-color 0.3s ease;
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 20px;
  background: var(--bg-card-sub);
  color: var(--brand-blue);
}

.feature-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
}

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

/* CTA DOWNLOAD BANNER */
.cta-section {
  padding: 60px 0 100px;
}

.cta-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 60px 40px;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.cta-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 36px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.cta-desc {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-secondary);
  max-width: 540px;
  margin: 0 auto 32px;
}

/* FOOTER */
.footer {
  border-top: 1px solid var(--border-color);
  padding: 40px 0;
  background: var(--bg-main);
  text-align: center;
  font-size: 14px;
  color: var(--text-secondary);
}

.footer-credit {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.footer-credit a {
  color: var(--brand-blue);
  text-decoration: none;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 16px;
}

.footer-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}

.footer-link:hover {
  color: var(--brand-blue);
}

/* ==========================================================================
   TERMS & CONDITIONS MODAL & LOADING ANIMATION
   ========================================================================== */

/* MODAL BACKDROP OVERLAY */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

/* MODAL CARD CONTAINER */
.tc-modal {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  max-width: 620px;
  width: 100%;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  padding: 32px;
  transform: translateY(20px) scale(0.95);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  color: var(--text-primary);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.modal-backdrop.active .tc-modal {
  transform: translateY(0) scale(1);
}

/* MODAL HEADER */
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 16px;
  margin-bottom: 20px;
}

.modal-header-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.3px;
}

.modal-header-title i {
  color: var(--brand-blue);
  font-size: 22px;
}

.modal-close-btn {
  background: var(--bg-card-sub);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 15px;
  transition: background 0.2s ease, color 0.2s ease;
}

.modal-close-btn:hover {
  background: var(--brand-blue);
  color: #ffffff;
  border-color: var(--brand-blue);
}

/* MODAL BODY & SCROLLABLE TERMS BOX */
.modal-body {
  flex: 1;
  overflow-y: auto;
  margin-bottom: 24px;
}

.modal-intro-text {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 14px;
  font-weight: 500;
}

.tc-box {
  background: var(--bg-card-sub);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 20px;
  max-height: 240px;
  overflow-y: auto;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--text-secondary);
  text-align: left;
}

/* CUSTOM SCROLLBAR FOR TERMS BOX */
.tc-box::-webkit-scrollbar {
  width: 6px;
}
.tc-box::-webkit-scrollbar-track {
  background: transparent;
}
.tc-box::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

.tc-box h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 14px;
  margin-bottom: 6px;
}

.tc-box h4:first-child {
  margin-top: 0;
}

.tc-box p {
  margin-bottom: 10px;
}

/* CHECKBOX & ACTIONS */
.tc-consent-group {
  margin-top: 18px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.tc-consent-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--brand-blue);
  cursor: pointer;
}

.tc-consent-text {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

/* DOWNLOAD BUTTON LOADING ANIMATION STATE */
.btn-loading {
  pointer-events: none;
  opacity: 0.85;
  cursor: not-allowed;
}

.btn-loading .btn-text-content {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-loading-spinner {
  display: inline-block;
  animation: spin 0.8s linear infinite;
}

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

/* RESPONSIVE DESIGN */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-content { text-align: center; }
  .hero-headline { font-size: 40px; }
  .hero-subtitle { margin: 0 auto 30px; }
  .hero-actions { justify-content: center; }
  .browser-viewport { flex-direction: column; padding: 20px; }
  .mock-sidebar { width: 100%; }
  .nav-center { display: none; }
  .tc-modal { padding: 24px; }
}
