/* Warm, Editorial Design System (Lovable Inspired) */
:root {
  /* Core Palette */
  --bg-cream: #f7f4ed;
  --charcoal: #1c1c1c;
  --off-white: #fcfbf8;

  /* Typography Scale */
  --text-primary: #1c1c1c;
  --text-strong: rgba(28, 28, 28, 0.83);
  --text-body: rgba(28, 28, 28, 0.82);
  --text-muted: #5f5f5d;

  /* Borders & Surfaces */
  --border-light: #eceae4;
  --border-interactive: rgba(28, 28, 28, 0.4);

  /* Radii */
  --radius-micro: 4px;
  --radius-btn: 6px;
  --radius-card: 12px;
  --radius-container: 16px;

  /* Shadows */
  --shadow-inset: rgba(255, 255, 255, 0.2) 0px 0.5px 0px 0px inset,
    rgba(0, 0, 0, 0.2) 0px 0px 0px 0.5px inset,
    rgba(0, 0, 0, 0.05) 0px 1px 2px 0px;
  --shadow-focus: rgba(0, 0, 0, 0.1) 0px 4px 12px;

  /* Font Stack */
  --font-display: 'Camera Plain Variable', ui-sans-serif, system-ui, -apple-system, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  background-color: var(--bg-cream);
}

body {
  font-family: var(--font-display);
  background-color: var(--bg-cream);
  color: var(--text-body);
  font-size: 16px;
  line-height: 1.5;
  font-weight: 400;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.landing-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header & Navigation */
.landing-header {
  position: sticky;
  top: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 0;
  background-color: rgba(247, 244, 237, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

/* Add a subtle border on scroll if desired via JS later, but keep it clean by default */
.landing-header.scrolled {
  border-bottom: 1px solid var(--border-light);
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.5px;
  color: var(--text-primary);
  text-decoration: none;
  cursor: pointer;
}

.logo-icon {
  color: var(--charcoal);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-link {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 16px;
  font-weight: 400;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
}

/* Buttons System */
.btn {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 400;
  padding: 8px 16px;
  border-radius: var(--radius-btn);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: opacity 0.2s ease, box-shadow 0.2s ease;
}

.btn:active {
  opacity: 0.8;
}

.btn:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
}

.btn-primary {
  background-color: var(--charcoal);
  color: var(--off-white);
  border: none;
  box-shadow: var(--shadow-inset);
}

.btn-ghost {
  background-color: transparent;
  color: var(--charcoal);
  border: 1px solid var(--border-interactive);
}

.btn-ghost:hover {
  background-color: rgba(28, 28, 28, 0.04);
}

.btn-sm {
  font-size: 14px;
  padding: 6px 12px;
}

.btn-full {
  width: 100%;
  margin-top: 24px;
}

/* SPA Screen View Transitions */
.screen-view {
  display: none;
  opacity: 0;
  animation: fadeIn 0.4s ease forwards;
}

.screen-view.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Main Content Wrapper */
.landing-main {
  flex: 1;
  padding-bottom: 96px;
}

/* Hero Section */
.hero-section {
  padding: 128px 0 96px 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 800px;
  margin: 0 auto;
}

.welcome-title {
  font-size: 60px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -1.5px;
  color: var(--text-primary);
  margin-bottom: 24px;
}

.welcome-subtitle {
  font-size: 18px;
  line-height: 1.38;
  color: var(--text-muted);
  max-width: 600px;
  margin-bottom: 40px;
}

.download-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.download-caption {
  font-size: 14px;
  color: var(--text-muted);
}

/* Platforms Grid */
.platforms-section {
  padding: 80px 0;
  border-top: 1px solid var(--border-light);
}

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

.platform-card {
  background: var(--bg-cream);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-card);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.platform-card h3 {
  font-size: 20px;
  font-weight: 400;
  line-height: 1.25;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.platform-card p {
  font-size: 14px;
  color: var(--text-muted);
}

/* Features View */
.features-section {
  padding: 96px 0;
  max-width: 1000px;
  margin: 0 auto;
}

.features-section h2 {
  font-size: 48px;
  font-weight: 600;
  line-height: 1.0;
  letter-spacing: -1.2px;
  color: var(--text-primary);
  margin-bottom: 24px;
}

.features-lead {
  font-size: 18px;
  line-height: 1.38;
  color: var(--text-muted);
  margin-bottom: 80px;
  max-width: 600px;
}

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

.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.feature-icon {
  width: 40px;
  height: 40px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-btn);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: var(--charcoal);
  background-color: var(--bg-cream);
}

.feature-item h4 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.5px;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.feature-item p {
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-muted);
}

/* Footer */
.landing-footer {
  margin-top: auto;
  padding: 40px 0;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  color: var(--text-muted);
  font-size: 14px;
}

.footer-logo {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

/* Responsive */
@media (max-width: 768px) {
  .hero-section {
    padding: 80px 0 64px 0;
  }

  .welcome-title {
    font-size: 48px;
    letter-spacing: -1.2px;
  }

  .features-section h2 {
    font-size: 36px;
    letter-spacing: -0.9px;
  }

  .landing-footer {
    flex-direction: column;
    gap: 24px;
  }
}

/* App Preview Mockup Window Styles */
.app-preview-container {
  width: 100%;
  max-width: 600px;
  margin-top: 64px;
  perspective: 1000px;
}

.mock-window {
  width: 100%;
  border-radius: 8px;
  background: var(--off-white);
  border: 1px solid var(--border-light);
  box-shadow: 0 20px 40px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.02);
  overflow: hidden;
  text-align: left;
  transform: rotateX(2deg) rotateY(-1deg);
  transition: transform 0.5s ease;
}

.mock-window:hover {
  transform: rotateX(0deg) rotateY(0deg) translateY(-5px);
}

.mock-titlebar {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  background: #f1ede4;
  border-bottom: 1px solid var(--border-light);
  gap: 8px;
}

.mock-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.mock-dot.red { background: #e06c75; }
.mock-dot.yellow { background: #e5c07b; }
.mock-dot.green { background: #98c379; }

.mock-title {
  margin-left: auto;
  margin-right: auto;
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.5px;
}

.mock-body {
  display: flex;
  height: 250px;
}

.mock-sidebar {
  width: 140px;
  background: #f5f2e9;
  border-right: 1px solid var(--border-light);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mock-nav-item {
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 4px;
  color: var(--text-muted);
}
.mock-nav-item.active {
  background: rgba(28, 28, 28, 0.05);
  color: var(--text-primary);
  font-weight: 500;
}

.mock-content {
  flex: 1;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--off-white);
}

.mock-pairing-box {
  width: 100%;
  max-width: 280px;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  background: #fbfaf7;
  position: relative;
}

.mock-eyebrow {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 500;
  display: block;
}

.mock-code {
  font-size: 28px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 10px 0;
  letter-spacing: 2px;
}

.mock-ip {
  font-size: 12px;
  font-family: monospace;
  color: var(--text-muted);
  display: block;
}

.mock-pulse-dot {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 8px;
  height: 8px;
  background: #4caf50;
  border-radius: 50%;
  animation: mock-pulse 2s infinite;
}

@keyframes mock-pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(76, 175, 80, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(76, 175, 80, 0); }
}