/* PostHog Design System Theme for GitStreak */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* Light Theme (PostHog Warm Cream Canvas) */
  --canvas: #eeefe9;
  --surface-card: #ffffff;
  --surface-soft: #e5e7e0;
  --surface-doc: #fcfcfa;
  --surface-dark: #23251d;
  
  --ink: #23251d;
  --body: #4d4f46;
  --mute: #6c6e63;
  --ash: #9b9c92;
  
  --hairline: #bfc1b7;
  --hairline-soft: #dcdfd2;
  
  --primary: #f7a501;
  --primary-pressed: #dd9001;
  --on-primary: #23251d;
  
  --accent-blue-soft: #dceaf6;
  --link-blue: #1d4ed8;
  --accent-green-soft: #d9eddf;
  --accent-green: #2c8c66;
  
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-full: 9999px;
  
  --font-sans: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --transition-speed: 0.2s;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 56px;
  min-width: 320px;
}

section[id],
div[id] {
  scroll-margin-top: 56px;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--canvas);
  color: var(--body);
  line-height: 1.5;
  font-size: 16px;
  padding-top: 48px;
  min-width: 320px;
  -webkit-font-smoothing: antialiased;
  transition: background-color var(--transition-speed) ease, color var(--transition-speed) ease;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header & Nav */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  box-sizing: border-box;
  background-color: var(--canvas);
  height: 48px;
  padding: 0;
  display: flex;
  align-items: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  transition: background-color var(--transition-speed) ease, border-color var(--transition-speed) ease;
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.3px;
}

.brand-icon {
  width: 26px;
  height: 26px;
  border-radius: var(--radius-md);
  object-fit: contain;
}

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

.nav-link {
  color: var(--body);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  transition: color 0.15s ease;
}

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

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 700;
  padding: 8px 16px;
  min-height: 40px;
  height: auto;
  border-radius: var(--radius-md);
  text-decoration: none;
  cursor: pointer;
  border: none;
  line-height: 1.35;
  text-align: center;
  transition: all 0.15s ease;
}

.btn svg {
  flex-shrink: 0;
}

.btn-lg {
  min-height: 48px;
  padding: 12px 24px;
  font-size: 15px;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--on-primary);
  border: 1px solid rgba(0,0,0,0.1);
}

.btn-primary:hover {
  background-color: var(--primary-pressed);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: var(--surface-card);
  color: var(--ink);
  border: 1px solid var(--hairline);
}

.btn-secondary:hover {
  background-color: var(--surface-soft);
  transform: translateY(-1px);
}

.theme-toggle-btn {
  background: var(--surface-soft);
  color: var(--ink);
  border: 1px solid var(--hairline);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.theme-toggle-btn:hover {
  background-color: var(--surface-card);
}

/* Hero Section */
.hero {
  padding: 72px 0 60px;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: var(--accent-blue-soft);
  color: var(--link-blue);
  font-size: 13px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  margin-bottom: 24px;
}

.hero-title {
  font-size: 42px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.25;
  letter-spacing: -1px;
  max-width: 840px;
  margin: 0 auto 20px;
}

.hero-subtitle {
  font-size: 18px;
  color: var(--body);
  line-height: 1.6;
  max-width: 680px;
  margin: 0 auto 32px;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

/* 3D Widgets Showcase */
.widgets-showcase {
  max-width: 1100px;
  margin: 0 auto 56px;
  position: relative;
  z-index: 5;
}

.widget-toggle {
  display: flex;
  position: relative;
  margin: 32px auto 0;
  width: fit-content;
  background: var(--surface-soft);
  border-radius: 9999px;
  padding: 4px;
  z-index: 10;
  border: 1px solid var(--hairline-soft);
  user-select: none;
}

.widget-toggle-indicator {
  position: absolute;
  top: 4px;
  left: 4px;
  height: calc(100% - 8px);
  background: var(--surface-card);
  border-radius: 9999px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(0, 0, 0, 0.04);
  transition: transform 0.55s cubic-bezier(0.25, 1, 0.5, 1), width 0.55s cubic-bezier(0.25, 1, 0.5, 1);
  pointer-events: none;
  z-index: 1;
}

.widget-toggle-btn {
  position: relative;
  z-index: 2;
  padding: 7px 24px;
  border: none;
  border-radius: 9999px;
  background: transparent;
  color: var(--mute);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.35s ease;
  font-family: var(--font-sans);
}

.widget-toggle-btn.active {
  color: var(--ink);
}

.widget-toggle-btn:hover:not(.active) {
  color: var(--body);
}

.widgets-3d-viewport {
  perspective: 1200px;
  perspective-origin: 50% 40%;
  padding: 30px 10px 40px;
  overflow: visible;
  display: flex;
  justify-content: center;
}

.widgets-3d-scene {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  transform-style: preserve-3d;
  transform: rotateX(12deg) rotateY(-8deg) rotateZ(2deg);
  will-change: transform;
  backface-visibility: hidden;
}

.widget-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  transform-style: preserve-3d;
}

.widget-col-center {
  gap: 24px;
}

.widget-row-compact {
  display: flex;
  align-items: center;
  gap: 16px;
  transform-style: preserve-3d;
  width: 100%;
}

.widget-card {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  max-width: 100%;
  border-radius: 20px;
  transform-style: preserve-3d;
  transform: translateZ(var(--float-depth, 20px));
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease;
  will-change: transform;
  backface-visibility: hidden;
  cursor: pointer;
}

.widget-card:hover {
  transform: translateZ(calc(var(--float-depth, 20px) + 32px)) translateY(-6px) scale(1.05);
  z-index: 50;
}

.widget-img {
  display: block;
  height: auto;
  max-height: 160px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  border-radius: 20px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.07), 0 2px 6px rgba(0, 0, 0, 0.04);
  transition: opacity 0.85s cubic-bezier(0.25, 1, 0.5, 1), filter 0.85s cubic-bezier(0.25, 1, 0.5, 1), transform 0.85s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: opacity, transform, filter;
  backface-visibility: hidden;
}

.widget-dark {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Specific widget size limits */
.widget-highlight .widget-img {
  max-height: 175px;
}

/* Perfect Smooth Crossfade for 3D Widgets */
[data-widget-mode="light"] .widget-light { 
  opacity: 1; 
  pointer-events: auto;
  transform: scale(1);
  filter: blur(0px);
}
[data-widget-mode="light"] .widget-dark { 
  opacity: 0; 
  pointer-events: none;
  transform: scale(0.98);
  filter: blur(2px);
}

[data-widget-mode="dark"] .widget-light { 
  opacity: 0; 
  pointer-events: none;
  transform: scale(0.98);
  filter: blur(2px);
}
[data-widget-mode="dark"] .widget-dark { 
  opacity: 1; 
  pointer-events: auto;
  transform: scale(1);
  filter: blur(0px);
}

/* Responsive adjustments for 3D showcase (phones & tablets) */
@media (max-width: 900px) {
  .widgets-3d-viewport {
    perspective: 800px;
    perspective-origin: 50% 50%;
    padding: 20px 10px 30px;
  }
  .widgets-3d-scene {
    flex-direction: column;
    align-items: center;
    gap: 18px;
    transform-style: preserve-3d;
    will-change: transform;
    transition: transform 0.12s ease-out;
  }
  .widget-card {
    transform-style: preserve-3d;
  }
  .widget-row-compact {
    justify-content: center;
  }
  .widget-img {
    max-height: 135px;
  }
  .widget-highlight .widget-img {
    max-height: 145px;
  }
}

/* Showcase Container with macOS Wallpaper */
.showcase-container {
  max-width: 980px;
  margin: 0 auto;
}

.mac-wallpaper-frame {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 44px 20px;
}

.wallpaper-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  transition: opacity 0.85s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: opacity;
}

.showcase-card {
  position: relative;
  z-index: 2;
  max-width: 860px;
  width: 100%;
}

.showcase-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--hairline-soft);
}

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

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot-red { background-color: #ff5f56; }
.dot-yellow { background-color: #ffbd2e; }
.dot-green { background-color: #27c93f; }

.showcase-title-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--mute);
  font-family: var(--font-mono);
}

.showcase-img-wrap {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 860px;
  display: flex;
  justify-content: center;
}

.showcase-img {
  width: 100%;
  max-width: 860px;
  height: auto;
  display: block;
  border-radius: var(--radius-md);
  transition: opacity 0.85s cubic-bezier(0.25, 1, 0.5, 1), filter 0.85s cubic-bezier(0.25, 1, 0.5, 1), transform 0.85s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: opacity, transform, filter;
}

.showcase-dark {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* App Showcase Crossfade */
[data-app-mode="light"] .wallpaper-light,
[data-app-mode="light"] .showcase-light {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
  filter: blur(0px);
}
[data-app-mode="light"] .wallpaper-dark,
[data-app-mode="light"] .showcase-dark {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.99);
  filter: blur(1.5px);
}

[data-app-mode="dark"] .wallpaper-light,
[data-app-mode="dark"] .showcase-light {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.99);
  filter: blur(1.5px);
}
[data-app-mode="dark"] .wallpaper-dark,
[data-app-mode="dark"] .showcase-dark {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
  filter: blur(0px);
}

/* Feature Grid */
.features-section {
  padding: 60px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 36px;
}

.section-eyebrow {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--mute);
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.section-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.3px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

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

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

.feature-card {
  padding: 20px;
  border-radius: var(--radius-md);
  transition: background-color 0.15s ease;
}

.feature-card:hover {
  background-color: var(--surface-soft);
}

.feature-icon {
  font-size: 24px;
  margin-bottom: 10px;
}

.feature-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
}

.feature-desc {
  font-size: 13px;
  color: var(--mute);
  line-height: 1.5;
}

/* Developer Section */
.dev-section {
  padding: 40px 0;
  text-align: center;
}

.dev-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--mute);
  margin-bottom: 12px;
  letter-spacing: 0.3px;
}

.dev-links {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--mute);
  background: var(--surface-soft);
  text-decoration: none;
  transition: color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.social-icon:hover {
  color: var(--ink);
  background: var(--hairline);
  transform: translateY(-2px);
}

/* Footer */
.footer {
  padding: 40px 0;
  border-top: 1px solid var(--hairline);
  background-color: var(--canvas);
  transition: background-color var(--transition-speed) ease, border-color var(--transition-speed) ease;
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  color: var(--mute);
}

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

.footer-link {
  color: var(--mute);
  text-decoration: none;
  font-weight: 500;
}

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

/* Responsive */
@media (max-width: 900px) {
  .grid-4, .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .hero-title {
    font-size: 32px;
  }
  .dev-card {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 0 16px;
  }
  .grid-4, .grid-3, .grid-2 {
    grid-template-columns: 1fr;
  }
  .nav-links {
    display: none;
  }
  .hero {
    padding: 40px 0 32px;
  }
  .hero-title {
    font-size: 28px;
    letter-spacing: -0.5px;
  }
  .hero-subtitle {
    font-size: 15px;
  }
  .hero-cta-group {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 320px;
    margin: 0 auto 40px;
    gap: 12px;
  }
  .hero-cta-group .btn {
    width: 100%;
  }
  .footer-content {
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
  }
}

