/* ============================================================================
   PLFY - Landing Page Styles
   Professional, Minimal, Modern
   ============================================================================ */

/* ---------------------------------------------------------------------------
   CSS Variables
   --------------------------------------------------------------------------- */

:root {
  /* Colors */
  --color-primary: #3b82f6;
  --color-primary-dark: #2563eb;
  --color-primary-light: #60a5fa;

  --color-bg: #ffffff;
  --color-bg-secondary: #f8fafc;
  --color-bg-tertiary: #f1f5f9;

  --color-text: #0f172a;
  --color-text-secondary: #475569;
  --color-text-muted: #94a3b8;

  --color-border: #e2e8f0;
  --color-border-light: #f1f5f9;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  --gradient-subtle: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', Consolas, monospace;

  /* Spacing */
  --container-max: 1200px;
  --section-padding: 6rem;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 200ms ease;
  --transition-slow: 300ms ease;

  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #0f172a;
    --color-bg-secondary: #1e293b;
    --color-bg-tertiary: #334155;

    --color-text: #f8fafc;
    --color-text-secondary: #cbd5e1;
    --color-text-muted: #64748b;

    --color-border: #334155;
    --color-border-light: #1e293b;

    --gradient-subtle: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  }
}

/* ---------------------------------------------------------------------------
   Reset & Base
   --------------------------------------------------------------------------- */

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
}

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

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

/* ---------------------------------------------------------------------------
   Container
   --------------------------------------------------------------------------- */

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---------------------------------------------------------------------------
   Navigation
   --------------------------------------------------------------------------- */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1rem 0;
  background: transparent;
  transition: var(--transition-base);
}

.nav.scrolled {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border-light);
  box-shadow: var(--shadow-sm);
}

@media (prefers-color-scheme: dark) {
  .nav.scrolled {
    background: rgba(15, 23, 42, 0.9);
  }
}

.nav-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 1.25rem;
}

.nav-logo img {
  border-radius: var(--radius-sm);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  transition: color var(--transition-fast);
}

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

.nav-github {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ---------------------------------------------------------------------------
   Buttons
   --------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 0.9375rem;
  font-weight: 500;
  border-radius: var(--radius-lg);
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow:
    var(--shadow-md),
    0 0 0 0 rgba(59, 130, 246, 0.5);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow:
    var(--shadow-lg),
    0 0 20px rgba(59, 130, 246, 0.3);
}

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

.btn-secondary:hover {
  background: var(--color-bg-tertiary);
  border-color: var(--color-border);
}

.btn-outline {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.btn-outline:hover {
  background: var(--color-bg-secondary);
}

.btn-large {
  padding: 1rem 2rem;
  font-size: 1rem;
}

/* ---------------------------------------------------------------------------
   Hero Section
   --------------------------------------------------------------------------- */

.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  padding: 8rem 1.5rem 4rem;
  max-width: var(--container-max);
  margin: 0 auto;
}

@media (max-width: 968px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding-top: 6rem;
    min-height: auto;
  }

  .hero-visual {
    order: -1;
  }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 1rem;
  background: rgba(59, 130, 246, 0.1);
  color: var(--color-primary);
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
}

.badge-dot {
  width: 0.5rem;
  height: 0.5rem;
  background: #22c55e;
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-description {
  font-size: 1.25rem;
  color: var(--color-text-secondary);
  max-width: 540px;
  margin-bottom: 2rem;
}

@media (max-width: 968px) {
  .hero-description {
    margin-left: auto;
    margin-right: auto;
  }
}

.hero-actions {
  display: flex;
  gap: 1rem;
  margin-bottom: 3rem;
}

@media (max-width: 968px) {
  .hero-actions {
    justify-content: center;
  }
}

.hero-stats {
  display: flex;
  gap: 3rem;
}

@media (max-width: 968px) {
  .hero-stats {
    justify-content: center;
  }
}

.stat {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text);
}

.stat-label {
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

/* Hero Logo */
.hero-logo {
  display: flex;
  justify-content: center;
  align-items: center;
}

.logo-image {
  max-width: 400px;
  width: 100%;
  height: auto;
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-xl);
  transition: all var(--transition-base);
}

.logo-image:hover {
  transform: scale(1.02);
  box-shadow:
    var(--shadow-xl),
    0 0 40px rgba(59, 130, 246, 0.15);
}

/* App Preview */
.hero-visual {
  display: flex;
  justify-content: center;
}

.app-preview {
  width: 100%;
  max-width: 500px;
  background: var(--color-bg-secondary);
  border-radius: var(--radius-2xl);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}

.app-titlebar {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  background: var(--color-bg-tertiary);
  border-bottom: 1px solid var(--color-border);
  gap: 0.75rem;
}

.titlebar-buttons {
  display: flex;
  gap: 0.5rem;
}

.titlebar-buttons span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.btn-close {
  background: #ef4444;
}
.btn-minimize {
  background: #eab308;
}
.btn-maximize {
  background: #22c55e;
}

.titlebar-title {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  flex: 1;
  text-align: center;
  margin-right: 44px;
}

.app-content {
  display: flex;
  min-height: 300px;
}

.app-sidebar {
  width: 180px;
  background: var(--color-bg-tertiary);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  border-right: 1px solid var(--color-border);
}

.sidebar-item {
  height: 2rem;
  background: var(--color-border);
  border-radius: var(--radius-sm);
  opacity: 0.5;
}

.sidebar-item.active {
  background: var(--color-primary);
  opacity: 1;
}

.app-editor {
  flex: 1;
  padding: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.8;
}

.editor-line {
  color: var(--color-text-secondary);
  min-height: 1.8em;
}

.editor-line.heading {
  color: var(--color-text);
  font-weight: 600;
  font-size: 1.25rem;
}

.editor-line.link {
  color: var(--color-primary);
}

.editor-cursor {
  display: inline-block;
  width: 2px;
  height: 1.2em;
  background: var(--color-primary);
  margin-left: 2px;
  vertical-align: text-bottom;
  transition: opacity 0.15s ease-in-out;
}

/* ---------------------------------------------------------------------------
   Features Section
   --------------------------------------------------------------------------- */

.features {
  padding: var(--section-padding) 0;
  background: var(--gradient-subtle);
}

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

.section-header h2 {
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.section-header p {
  font-size: 1.125rem;
  color: var(--color-text-secondary);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

@media (max-width: 968px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .features-grid {
    grid-template-columns: 1fr;
  }
}

.feature-card {
  background: var(--color-bg);
  padding: 2rem;
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-border);
  transition: all var(--transition-base);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-primary-light);
}

.feature-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(59, 130, 246, 0.1);
  color: var(--color-primary);
  border-radius: var(--radius-lg);
  margin-bottom: 1.25rem;
}

.feature-card h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.feature-card p {
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

/* ---------------------------------------------------------------------------
   Tech Stack Section
   --------------------------------------------------------------------------- */

.tech-stack {
  padding: var(--section-padding) 0;
}

.tech-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.tech-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem 2rem;
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  min-width: 140px;
  transition: all var(--transition-fast);
}

.tech-item:hover {
  border-color: var(--color-primary-light);
  transform: translateY(-2px);
}

.tech-name {
  font-weight: 600;
  font-size: 0.9375rem;
  margin-bottom: 0.25rem;
}

.tech-desc {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

/* ---------------------------------------------------------------------------
   Download Section
   --------------------------------------------------------------------------- */

.download {
  padding: var(--section-padding) 0;
}

.download-card {
  background: var(--gradient-primary);
  border-radius: var(--radius-2xl);
  padding: 4rem;
  text-align: center;
}

.download-content h2 {
  color: white;
  font-size: 2rem;
  margin-bottom: 1rem;
}

.download-content p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.125rem;
  margin-bottom: 2rem;
}

.download-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}

@media (max-width: 640px) {
  .download-buttons {
    flex-direction: column;
    align-items: center;
  }
}

.download-card .btn-primary {
  background: white;
  color: var(--color-primary);
}

.download-card .btn-primary:hover {
  background: rgba(255, 255, 255, 0.95);
}

.download-card .btn-outline {
  color: white;
  border-color: rgba(255, 255, 255, 0.5);
}

.download-card .btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: white;
}

.download-note {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.875rem;
}

/* ---------------------------------------------------------------------------
   Footer
   --------------------------------------------------------------------------- */

.footer {
  padding: 3rem 0;
  border-top: 1px solid var(--color-border);
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
}

.footer-brand img {
  border-radius: var(--radius-sm);
}

.footer-links {
  display: flex;
  gap: 2rem;
}

.footer-links a {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  transition: color var(--transition-fast);
}

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

.footer-copyright p {
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

/* ---------------------------------------------------------------------------
   Responsive Utilities
   --------------------------------------------------------------------------- */

@media (max-width: 640px) {
  .nav-links a:not(.nav-github) {
    display: none;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero-description {
    font-size: 1rem;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-stats {
    gap: 2rem;
  }

  .app-sidebar {
    display: none;
  }

  .section-header h2 {
    font-size: 1.75rem;
  }

  .download-card {
    padding: 2rem;
  }
}
