/* ==========================================================================
   DuckDuckWork — Hyper-Minimal Landing Page Stylesheet
   Philosophy: Zero Bloat, Zero Emojis, Native Performance (tp.crda.dev style)
   ========================================================================== */

/* 1. Reset and Design Tokens */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', "SFMono-Regular", Consolas, Menlo, monospace;
}

/* Dark Theme (Default) */
[data-theme="dark"],
:root:not([data-theme="light"]) {
  color-scheme: dark;
  --bg-color: #130b20;
  --card-bg: #1d122f;
  --card-bg-subtle: #24163d;
  --border-color: #2e1c4a;
  --border-color-hover: #4e2f7c;
  --glass-bg: rgba(29, 18, 47, 0.65);
  --glass-bg-hover: rgba(29, 18, 47, 0.9);
  --primary: #8b5cf6;
  --primary-hover: #7c3aed;
  --accent-yellow: #facc15;
  --accent-green: #10b981;
  --text-primary: #f8fafc;
  --text-secondary: #d8b4fe;
  --text-muted: #a78bfa;
  --code-bg: #0d0716;
  --macbook-bezel: #160e26;
  --macbook-base: #281940;
}

/* Light Theme */
[data-theme="light"] {
  color-scheme: light;
  --bg-color: #f6f3fb;
  --card-bg: #ffffff;
  --card-bg-subtle: #fcfaff;
  --border-color: #e9d5ff;
  --border-color-hover: #c084fc;
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-bg-hover: rgba(255, 255, 255, 0.95);
  --primary: #6b21a8;
  --primary-hover: #581c87;
  --accent-yellow: #b45309;
  --accent-green: #059669;
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --code-bg: #f3ecfb;
  --macbook-bezel: #e2d3f5;
  --macbook-base: #d8c2f0;
}

body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: var(--font-family);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.25s ease, color 0.25s ease;
}

/* Subtle background glow */
.bg-glow {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  height: 480px;
  background: radial-gradient(circle at 50% 0%, rgba(139, 92, 246, 0.12) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}

/* Typography Helpers (Lowercase preference per tp.crda.dev) */
h1, h2, h3, p, a, span, button, code, summary, li {
  text-transform: lowercase;
}

/* Top minimal nav */
.top-nav {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  padding: 20px 16px 0;
}

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

.version-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  padding: 2px 8px;
  border-radius: 9999px;
  background: var(--glass-bg);
}

.theme-btn {
  background: var(--glass-bg);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.theme-btn:hover {
  border-color: var(--border-color-hover);
  color: var(--text-primary);
}

[data-theme="dark"] .sun-icon { display: block; }
[data-theme="dark"] .moon-icon { display: none; }
[data-theme="light"] .sun-icon { display: none; }
[data-theme="light"] .moon-icon { display: block; }

/* Container (Single Fixed Column Width) */
.container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  padding: 40px 16px 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

/* 1. Logo (Original round logo with zero border and zero shadows) */
.logo-wrapper {
  display: flex;
  justify-content: center;
}

.app-logo {
  width: 80px;
  height: 80px;
  display: block;
  user-select: none;
  border: none;
  border-radius: 50%;
  box-shadow: none;
  background: transparent;
  object-fit: contain;
  transition: transform 0.25s ease;
}

.app-logo:hover {
  transform: scale(1.04);
}

/* 2. Brand Section */
.brand-section {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.app-title {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
  color: var(--text-primary);
}

.app-tagline {
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-weight: 400;
  letter-spacing: -0.02em;
}

/* 3. Actions */
.actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 12px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  gap: 8px;
}

.btn-primary {
  background-color: var(--primary);
  color: #ffffff;
  border: 1px solid var(--primary);
}

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

/* Developer Command Block */
.code-block-wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background: var(--code-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px;
  gap: 8px;
  width: 100%;
}

.code-header {
  display: flex;
  justify-content: space-between;
  width: 100%;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 6px;
}

.code-env {
  opacity: 0.7;
}

.code-body {
  width: 100%;
}

#terminalCommand, #aiPrompt {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-primary);
  text-transform: none;
  white-space: pre-wrap;
  word-break: break-all;
  line-height: 1.5;
}

.copy-btn {
  background: var(--glass-bg);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 0.7rem;
  font-family: var(--font-mono);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  align-self: flex-end;
}

.copy-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-color-hover);
}

.copy-btn.copied {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-green);
  border-color: var(--accent-green);
}

/* 4. MacBook Mockup Demo & Slideshow (Exact 1280x900 aspect ratio: zero cropping) */
.demo-section {
  width: 100%;
}

.macbook-container {
  width: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.macbook-screen {
  position: relative;
  background: #000;
  border: 6px solid var(--macbook-bezel);
  border-radius: 12px 12px 0 0;
  aspect-ratio: 1440 / 900;
  width: 100%;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

/* Camera notch */
.macbook-screen::after {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 32px;
  height: 6px;
  background: var(--macbook-bezel);
  border-radius: 0 0 3px 3px;
}

.macbook-display {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  background: #000;
}

/* Slide elements */
.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  pointer-events: none;
}

.slide.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.demo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: top center;
  display: block;
  user-select: none;
}

.macbook-reflection {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0) 50%);
  pointer-events: none;
  z-index: 2;
}

.macbook-base {
  height: 8px;
  background: var(--macbook-base);
  width: 112%;
  margin-left: 0;
  border-radius: 0 0 8px 8px;
  border-bottom: 2px solid rgba(0, 0, 0, 0.3);
  position: relative;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.macbook-base::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 2px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 0 0 2px 2px;
}

/* Slideshow Minimal Indicators (Only subtle dots) */
.slideshow-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}

.dot-btn {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border-color);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: all 0.25s ease;
}

.dot-btn:hover {
  background: var(--text-secondary);
  transform: scale(1.2);
}

.dot-btn.active {
  background: var(--primary);
  width: 18px;
  border-radius: 9999px;
}

/* 5. Installation Section */
.install-section {
  width: 100%;
}

.install-details {
  width: 100%;
  background: var(--glass-bg);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  overflow: hidden;
  transition: all 0.25s ease;
  backdrop-filter: blur(8px);
}

.install-details:hover, .install-details[open] {
  border-color: var(--border-color-hover);
  background: var(--glass-bg-hover);
}

.install-summary {
  padding: 16px;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  list-style: none;
}

.install-summary::-webkit-details-marker {
  display: none;
}

.chevron-icon {
  color: var(--text-secondary);
  transition: transform 0.25s ease;
}

.install-details[open] .chevron-icon {
  transform: rotate(180deg);
  color: var(--text-primary);
}

.install-content {
  padding: 0 16px 16px 16px;
  border-top: 1px solid var(--border-color);
}

.steps-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 14px;
  counter-reset: step-counter;
}

.step-item {
  position: relative;
  padding-left: 28px;
}

.step-item::before {
  content: counter(step-counter);
  counter-increment: step-counter;
  position: absolute;
  left: 0;
  top: 2px;
  background: var(--card-bg-subtle);
  border: 1px solid var(--border-color);
  color: var(--primary);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-family: var(--font-mono);
  font-weight: 600;
}

.step-text {
  font-size: 0.88rem;
  color: var(--text-secondary);
  font-weight: 400;
  text-align: left;
}

.highlight {
  color: var(--text-primary);
  font-weight: 600;
}

.link-url {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-family: var(--font-mono);
}

.step-flex {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.prompt-block {
  margin-top: 4px;
}

/* 6. Footer (No personal name or personal links per instructions) */
.footer {
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
}

.disclaimer {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.footer-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-family: var(--font-mono);
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

.sep {
  color: var(--border-color);
}

/* Responsive adjustments */
@media (max-width: 480px) {
  .container {
    padding: 30px 14px 40px;
    gap: 24px;
  }
  .app-logo {
    width: 64px;
    height: 64px;
  }
  .app-title {
    font-size: 1.8rem;
  }
  .app-tagline {
    font-size: 0.88rem;
  }
  .macbook-screen {
    border-width: 5px;
    border-radius: 10px 10px 0 0;
  }
  .macbook-base {
    height: 6px;
  }
}
