/* ============================================================
   UnClosed Landing Page — Neobrutalist High-Contrast
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Space+Mono:wght@400;700&display=swap');

:root {
  --bg: #fafaf9;
  --surface: #ffffff;
  --text: #0a0a0a;
  --text-secondary: #525252;
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-light: #a78bfa;
  --accent: #059669;
  --accent-hover: #047857;
  --pink: #f472b6;
  --pink-light: #fb7185;
  --cyan: #22d3ee;
  --cyan-light: #67e8f9;
  --orange: #fb923c;
  --orange-light: #fdba74;
  --lime-light: #6ee7b7;
  --yellow-light: #facc15;
  --border: #0a0a0a;
  --border-width: 3px;
  --shadow: 6px 6px 0 #0a0a0a;
  --shadow-hover: 10px 10px 0 #0a0a0a;
  --radius: 12px;
  --font: 'Space Grotesk', system-ui, sans-serif;
  --font-mono: 'Space Mono', monospace;
}

/* Dark Theme */
:root[data-theme="dark"] {
  --bg: #1a1a2e;
  --surface: #16213e;
  --text: #f5f5f5;
  --text-secondary: #a3a3a3;
  --primary: #6366f1;
  --primary-hover: #818cf8;
  --primary-light: #4c1d95;
  --accent: #059669;
  --accent-hover: #047857;
  --pink: #f472b6;
  --pink-light: #9f1239;
  --cyan: #22d3ee;
  --cyan-light: #155e75;
  --orange: #fb923c;
  --orange-light: #9a3412;
  --lime-light: #365314;
  --yellow-light: #854d0e;
  --border: #e5e5e5;
  --shadow: 6px 6px 0 #e5e5e5;
  --shadow-hover: 10px 10px 0 #e5e5e5;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

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

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

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 600;
  border: var(--border-width) solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.12s;
  box-shadow: var(--shadow);
  background: var(--surface);
  color: var(--text);
}

.btn:hover {
  transform: translate(-3px, -3px);
  box-shadow: var(--shadow-hover);
}

.btn:active {
  transform: translate(3px, 3px);
  box-shadow: 2px 2px 0 var(--border);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--border);
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-outline {
  background: var(--surface);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 14px;
  box-shadow: 4px 4px 0 var(--border);
}

.btn-sm:hover {
  box-shadow: 6px 6px 0 var(--border);
}

.btn-lg {
  padding: 16px 36px;
  font-size: 18px;
  box-shadow: 8px 8px 0 var(--border);
}

.btn-lg:hover {
  box-shadow: 12px 12px 0 var(--border);
}

/* ============================================================
   Nav
   ============================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--accent);
  color: #fff;
  border-bottom: var(--border-width) solid var(--border);
}

.nav-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.nav-logo img {
  border: 2px solid var(--border);
  border-radius: 8px;
}

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

.nav-link {
  font-weight: 700;
  font-size: 15px;
  padding: 4px 0;
  border-bottom: 3px solid transparent;
  transition: border-color 0.15s;
}

.nav-link:hover {
  border-bottom-color: var(--border);
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  padding: 80px 0 60px;
  text-align: center;
  background: var(--bg);
}

.hero-badge {
  display: inline-block;
  padding: 6px 18px;
  font-size: 14px;
  font-weight: 700;
  font-family: var(--font-mono);
  background: var(--primary);
  color: #fff;
  border: var(--border-width) solid var(--border);
  border-radius: 999px;
  box-shadow: 4px 4px 0 var(--border);
  margin-bottom: 28px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.hero-title {
  font-size: clamp(36px, 6vw, 68px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -2px;
  margin-bottom: 24px;
}

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

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

/* ============================================================
   Demo
   ============================================================ */
.demo {
  padding: 40px 0 80px;
}

.demo-window {
  border: var(--border-width) solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 10px 10px 0 var(--border);
  background: #1a1a1a;
}

.demo-titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  background: #2d2d2d;
  border-bottom: var(--border-width) solid var(--border);
}

.demo-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(0,0,0,0.3);
}

.demo-titlebar-text {
  flex: 1;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: #888;
  font-family: var(--font-mono);
  margin-right: 60px;
}

.demo-img {
  display: block;
  width: 100%;
}

/* ============================================================
   Features
   ============================================================ */
.features {
  padding: 80px 0;
  background: var(--surface);
  border-top: var(--border-width) solid var(--border);
  border-bottom: var(--border-width) solid var(--border);
}

.section-title {
  font-size: 40px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 48px;
  letter-spacing: -1px;
}

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

.feature-card {
  padding: 28px 24px;
  border: var(--border-width) solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.12s, box-shadow 0.12s;
}

.feature-card:hover {
  /* Keep hitbox stable to avoid enter/leave jitter on edge crossing */
  box-shadow: var(--shadow-hover);
}

/* 3D Tilt Effect */
.features-grid {
  perspective: 800px;
}

.feature-card {
  transform-style: preserve-3d;
  position: relative;
  overflow: hidden;
}

.feature-card .card-spotlight {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
  border-radius: inherit;
  z-index: 1;
}

.feature-card:hover .card-spotlight {
  opacity: 1;
}

.feature-card.is-tilting {
  transition: none;
}

.feature-card.is-tilting:hover {
  transform: none; /* JS controls transform directly */
}

/* Alternating card colors for high-contrast variety */
.feature-card:nth-child(1) { background: var(--lime-light); }
.feature-card:nth-child(2) { background: var(--primary-light); }
.feature-card:nth-child(3) { background: var(--pink-light); }
.feature-card:nth-child(4) { background: var(--cyan-light); }
.feature-card:nth-child(5) { background: var(--orange-light); }
.feature-card:nth-child(6) { background: var(--yellow-light); }

.feature-icon {
  margin-bottom: 14px;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: var(--border-width) solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 3px 3px 0 var(--border);
}

.feature-icon svg {
  width: 28px;
  height: 28px;
}

.feature-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 14px;
  color: var(--text);
  opacity: 0.8;
  line-height: 1.65;
}

/* ============================================================
   Screenshots
   ============================================================ */
.screenshots {
  padding: 80px 0;
}

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

.screenshot-card {
  border: var(--border-width) solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.12s, box-shadow 0.12s;
}

.screenshot-card:hover {
  transform: translate(-3px, -3px);
  box-shadow: var(--shadow-hover);
}

.screenshot-card img {
  display: block;
  width: 100%;
}

/* ============================================================
   CTA
   ============================================================ */
.cta {
  padding: 80px 0;
  text-align: center;
  background: var(--primary);
  color: #fff;
  border-top: var(--border-width) solid var(--border);
  border-bottom: var(--border-width) solid var(--border);
  position: relative;
}

.cta h2 {
  font-size: 40px;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -1px;
}

.cta p {
  font-size: 18px;
  opacity: 0.9;
  margin-bottom: 36px;
}

.cta .btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--border);
  font-size: 20px;
  padding: 18px 40px;
}

.cta .btn-primary:hover {
  background: var(--accent-hover);
}

/* ============================================================
   Footer
   ============================================================ */
.footer {
  padding: 24px 0;
  border-top: var(--border-width) solid var(--border);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  font-weight: 600;
  transition: color 0.15s;
}

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

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 768px) {
  .features-grid {
    grid-template-columns: 1fr;
  }

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

  .hero {
    padding: 48px 0 40px;
  }

  .hero-title {
    font-size: 32px;
    letter-spacing: -1px;
  }

  .hero-desc {
    font-size: 16px;
  }

  .section-title {
    font-size: 28px;
  }

  .cta h2 {
    font-size: 28px;
  }

  .footer-inner {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .nav-link {
    display: none;
  }
}
