/* ==========================================================================
   DuskPane Marketing Website — Design System & Component Styles
   Static HTML/CSS — no framework, no build step.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Reset + Base
   -------------------------------------------------------------------------- */

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  font-family: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: #0C0E14;
  color: rgba(255, 255, 255, 0.60);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --------------------------------------------------------------------------
   2. CSS Custom Properties
   -------------------------------------------------------------------------- */

:root {
  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  --space-4xl: 96px;
  --space-5xl: 128px;

  /* Colors */
  --color-bg: #0C0E14;
  --color-surface: #151820;
  --color-surface-elevated: #1C1F2B;
  --color-border: rgba(255, 255, 255, 0.08);
  --color-border-subtle: rgba(255, 255, 255, 0.05);

  --color-text-primary: rgba(255, 255, 255, 0.88);
  --color-text-secondary: rgba(255, 255, 255, 0.60);
  --color-text-muted: rgba(255, 255, 255, 0.38);

  --color-accent: #F5A035;
  --color-accent-hover: #F7AB45;
  --color-accent-pressed: #D48A25;

  /* Typography */
  --font-family: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-size-display: 56px;
  --font-size-heading: 32px;
  --font-size-body: 16px;
  --font-size-small: 14px;

  --font-weight-regular: 400;
  --font-weight-medium: 500;

  --line-height-display: 1.1;
  --line-height-heading: 1.2;
  --line-height-body: 1.6;
  --line-height-small: 1.5;

  /* Layout */
  --content-max-width: 1120px;
  --nav-height: 64px;
  --border-radius-sm: 4px;
  --border-radius-md: 8px;
  --border-radius-lg: 12px;
}

/* --------------------------------------------------------------------------
   3. Typography Classes
   -------------------------------------------------------------------------- */

.display {
  font-size: var(--font-size-display);
  font-weight: var(--font-weight-medium);
  line-height: var(--line-height-display);
  letter-spacing: -0.03em;
  color: var(--color-text-primary);
}

.heading {
  font-size: var(--font-size-heading);
  font-weight: var(--font-weight-medium);
  line-height: var(--line-height-heading);
  letter-spacing: -0.02em;
  color: var(--color-text-primary);
}

.body {
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-body);
  color: var(--color-text-secondary);
}

.small {
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-small);
  color: var(--color-text-muted);
}

/* --------------------------------------------------------------------------
   4. Layout
   -------------------------------------------------------------------------- */

.container {
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 0 var(--space-2xl);
}

.section {
  padding: var(--space-3xl) 0;
}

/* --------------------------------------------------------------------------
   5. Navigation Bar
   -------------------------------------------------------------------------- */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 100;
  background: rgba(12, 14, 20, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border-subtle);
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
}

.nav--visible {
  opacity: 1;
  pointer-events: auto;
}

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

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  text-decoration: none;
}

.nav-logo img {
  width: 24px;
  height: 24px;
}

.nav-wordmark {
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-primary);
  letter-spacing: -0.01em;
}

/* --------------------------------------------------------------------------
   6. Hero Section
   -------------------------------------------------------------------------- */

.hero {
  padding-top: 160px;
  padding-bottom: var(--space-3xl);
  text-align: center;
}

.hero-icon {
  width: 96px;
  height: 96px;
  margin: 0 auto var(--space-lg);
  display: block;
}

.hero-headline {
  max-width: 720px;
  margin: 0 auto;
}

.hero-sub {
  max-width: 540px;
  margin: var(--space-md) auto 0;
}

.cta-group {
  display: flex;
  flex-direction: row;
  gap: var(--space-md);
  justify-content: center;
  margin-top: var(--space-xl);
}

.price-line {
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-small);
  color: var(--color-text-muted);
  margin-top: var(--space-md);
  text-align: center;
}

/* --------------------------------------------------------------------------
   7. CTA Buttons
   -------------------------------------------------------------------------- */

.cta {
  font-size: 16px;
  font-weight: 500;
  padding: 20px 32px;
  border-radius: var(--border-radius-lg);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  transition: background-color 150ms ease;
}

.cta--primary {
  background-color: var(--color-accent);
  color: #151820;
}

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

.cta--primary:active {
  background-color: var(--color-accent-pressed);
}

.cta--secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--color-text-primary);
  border: 1px solid rgba(255, 255, 255, 0.10);
  transition: background-color 150ms ease, border-color 150ms ease;
}

.cta--secondary:hover {
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.16);
}

.cta--secondary:active {
  background: rgba(255, 255, 255, 0.14);
}

.cta--compact {
  padding: 12px 20px;
  font-size: 14px;
}

/* --------------------------------------------------------------------------
   8. Early Bird / Pro Badge
   -------------------------------------------------------------------------- */

.badge {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 500;
  padding: 2px 4px;
  border-radius: var(--border-radius-sm);
  vertical-align: middle;
}

.badge--launch {
  background: rgba(245, 160, 53, 0.12);
  color: #F5A035;
  border: 1px solid rgba(245, 160, 53, 0.25);
}

.badge--pro {
  background: rgba(245, 160, 53, 0.12);
  color: #F5A035;
  border: 1px solid rgba(245, 160, 53, 0.25);
}

/* --------------------------------------------------------------------------
   9. Feature Sections
   -------------------------------------------------------------------------- */

.feature {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2xl);
  align-items: center;
}

.feature-text {
  max-width: 480px;
}

.feature-text .heading {
  margin-bottom: var(--space-md);
}

.feature-screenshot {
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--color-border);
  overflow: hidden;
}

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

/* --------------------------------------------------------------------------
   10. Feature Bullet List
   -------------------------------------------------------------------------- */

.features-list {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

.features-list li {
  font-size: var(--font-size-body);
  line-height: var(--line-height-body);
  color: var(--color-text-secondary);
}

.features-list li::before {
  content: "\2014\00a0";
  color: var(--color-text-muted);
}

/* --------------------------------------------------------------------------
   11. Pricing / Download Section
   -------------------------------------------------------------------------- */

.pricing {
  background-color: var(--color-surface);
  text-align: center;
}

.pricing-inner .heading {
  margin-bottom: var(--space-md);
}

/* --------------------------------------------------------------------------
   12. FAQ Section
   -------------------------------------------------------------------------- */

.faq {
  max-width: 720px;
  margin: 0 auto;
}

.faq-heading {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.faq-item {
  border-bottom: 1px solid var(--color-border);
}

.faq-question {
  padding: var(--space-lg) 0;
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  font-family: inherit;
  letter-spacing: -0.01em;
}

.faq-answer {
  padding: 0 0 var(--space-lg);
  font-size: var(--font-size-body);
  line-height: var(--line-height-body);
  color: var(--color-text-secondary);
  max-height: 0;
  overflow: hidden;
  transition: max-height 300ms ease;
}

.faq-item.open .faq-answer {
  /* max-height set via JS */
}

.faq-chevron {
  flex-shrink: 0;
  transition: transform 300ms ease;
}

.faq-item.open .faq-chevron {
  transform: rotate(180deg);
}

@media (prefers-reduced-motion: reduce) {
  .faq-answer {
    transition: none;
  }
  .faq-chevron {
    transition: none;
  }
}

/* --------------------------------------------------------------------------
   13. Footer
   -------------------------------------------------------------------------- */

.footer {
  border-top: 1px solid var(--color-border);
  padding: var(--space-2xl) 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
}

.footer-brand .small {
  color: var(--color-text-muted);
}

.footer-links {
  display: flex;
  gap: var(--space-lg);
}

.footer-link {
  font-size: var(--font-size-small);
  line-height: var(--line-height-small);
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color 150ms ease;
}

.footer-link:hover {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* --------------------------------------------------------------------------
   14. Playground Section
   -------------------------------------------------------------------------- */

.playground {
  background-color: var(--color-surface);
}

.playground-static {
  width: 100%;
  display: block;
  border-radius: var(--border-radius-lg);
}

.playground-stage {
  display: none;
  position: relative;
  width: 100%;
  height: 320px;
  overflow: hidden;
  border-radius: var(--border-radius-lg);
  background-color: var(--color-bg);
}

.playground-content {
  width: 100%;
  height: 100%;
}

.playground-content img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.playground-overlay {
  position: absolute;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(21, 24, 32, 0.6);
  border: 1px solid rgba(245, 160, 53, 0.3);
  border-radius: var(--border-radius-lg);
  cursor: grab;
  user-select: none;
  touch-action: none;
}

.playground-overlay:active {
  cursor: grabbing;
}

.playground-overlay.solid {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background: rgba(21, 24, 32, 0.95);
  border-color: var(--color-border);
}

@media (prefers-reduced-motion: no-preference) {
  .playground-overlay {
    transition: background 200ms ease, backdrop-filter 200ms ease, -webkit-backdrop-filter 200ms ease;
  }
}

.playground-controls {
  position: absolute;
  bottom: var(--space-sm);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  background: rgba(12, 14, 20, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--border-radius-md);
  padding: var(--space-sm);
}

.playground-btn {
  font-size: 14px;
  font-weight: 500;
  padding: 4px 8px;
  border: none;
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
  border-radius: var(--border-radius-sm);
  font-family: inherit;
}

.playground-btn.active {
  background-color: var(--color-accent);
  color: #151820;
}

.playground-opacity {
  width: 80px;
  accent-color: var(--color-accent);
}

/* Resize handles */
.playground-handle {
  position: absolute;
  width: 8px;
  height: 8px;
  background: rgba(245, 160, 53, 0.6);
  opacity: 0;
  transition: opacity 150ms ease;
}

.playground-overlay:hover .playground-handle {
  opacity: 1;
}

.playground-handle--nw { top: -4px; left: -4px; cursor: nw-resize; }
.playground-handle--ne { top: -4px; right: -4px; cursor: ne-resize; }
.playground-handle--sw { bottom: -4px; left: -4px; cursor: sw-resize; }
.playground-handle--se { bottom: -4px; right: -4px; cursor: se-resize; }
.playground-handle--n  { top: -4px; left: 50%; transform: translateX(-50%); cursor: n-resize; }
.playground-handle--e  { top: 50%; right: -4px; transform: translateY(-50%); cursor: e-resize; }
.playground-handle--s  { bottom: -4px; left: 50%; transform: translateX(-50%); cursor: s-resize; }
.playground-handle--w  { top: 50%; left: -4px; transform: translateY(-50%); cursor: w-resize; }

/* --------------------------------------------------------------------------
   15. Scroll Reveal
   -------------------------------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* --------------------------------------------------------------------------
   16. Focus Indicators
   -------------------------------------------------------------------------- */

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

:focus:not(:focus-visible) {
  outline: none;
}

/* --------------------------------------------------------------------------
   17. Responsive Breakpoints
   -------------------------------------------------------------------------- */

/* Mobile-first base styles are above. Tablet and desktop overrides below. */

@media (min-width: 768px) {
  /* Typography */
  .display {
    font-size: 44px;
  }

  /* Section padding */
  .section {
    padding: var(--space-4xl) 0;
  }

  /* Hero */
  .hero {
    padding-bottom: var(--space-4xl);
  }

  /* Feature sections: two columns */
  .feature {
    grid-template-columns: 1fr 1fr;
  }

  .feature--reversed .feature-text {
    order: 2;
  }

  .feature--reversed .feature-screenshot {
    order: 1;
  }

  /* Feature bullet list: two columns */
  .features-list {
    grid-template-columns: 1fr 1fr;
  }

  /* Footer: row layout */
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
  }

  /* Playground */
  .playground-stage {
    height: 320px;
  }
}

@media (min-width: 1024px) {
  /* Typography */
  .display {
    font-size: 56px;
  }

  /* Section padding */
  .section {
    padding: var(--space-5xl) 0;
  }

  /* Hero */
  .hero {
    padding-bottom: var(--space-5xl);
  }

  /* Playground full height */
  .playground-stage {
    height: 480px;
  }
}

/* Mobile CTA stacking */
@media (max-width: 767px) {
  .cta-group {
    flex-direction: column;
    gap: 12px;
  }

  .cta-group .cta {
    width: 100%;
  }

  .display {
    font-size: 32px;
  }

  .container {
    padding: 0 var(--space-lg);
  }
}

/* --------------------------------------------------------------------------
   18. Utility Classes
   -------------------------------------------------------------------------- */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hidden {
  display: none;
}

/* No-JS patterns */
.no-js .playground-stage {
  display: none;
}

.no-js .playground-static {
  display: block;
}

/* When JS is active, show stage and hide static */
html:not(.no-js) .playground-static {
  display: none;
}

html:not(.no-js) .playground-stage {
  display: block;
}
