/* ========================================
   Useful Things LLC - Main Stylesheet
   Modern dark theme with cyan accent
   ======================================== */

/* CSS Variables */
:root {
  /* Colors */
  --bg-primary: #0a0a0a;
  --bg-secondary: #111111;
  --bg-tertiary: #1a1a1a;
  --bg-card: #141414;

  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --text-tertiary: rgba(255, 255, 255, 0.5);
  --text-muted: rgba(255, 255, 255, 0.4);

  --accent: #00D4FF;
  --accent-hover: #00b8e6;
  --accent-glow: rgba(0, 212, 255, 0.15);
  --accent-glow-strong: rgba(0, 212, 255, 0.3);

  --border: rgba(255, 255, 255, 0.1);
  --border-hover: rgba(255, 255, 255, 0.2);

  --success: #00ff88;
  --error: #ff4466;

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

  /* 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;

  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 40px var(--accent-glow);

  /* Layout */
  --max-width: 1200px;
  --header-height: 72px;
}

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

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent);
}

ul, ol {
  list-style: none;
}

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

/* ========================================
   Layout Components
   ======================================== */

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.section {
  position: relative;
  z-index: 1;
  padding: var(--space-4xl) 0;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.section-label {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-md);
}

.section-title {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--space-md);
}

.section-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* ========================================
   Header / Navigation
   ======================================== */

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  z-index: 9999;
  transition: all var(--transition-base);
}

.header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--bg-primary);
  opacity: 0;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: opacity var(--transition-base);
}

.header.scrolled::before {
  opacity: 0.9;
}

.header.scrolled {
  border-bottom: 1px solid var(--border);
}

.header-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-weight: 600;
  font-size: 15px;
  z-index: 10;
}

.logo-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  object-fit: contain;
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}

.nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

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

.nav-link.active {
  color: var(--accent);
}

.nav-cta {
  padding: 10px 20px;
  background: var(--accent);
  color: var(--bg-primary);
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
}

.nav-cta:hover {
  background: var(--accent-hover);
  color: var(--bg-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

/* Mobile Menu */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  z-index: 10;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: all var(--transition-fast);
}

.mobile-nav {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  background: #0a0a0a;
  padding-top: var(--header-height);
  transform: translateZ(0);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 9998 !important;
  isolation: isolate;
  transition: opacity var(--transition-base), visibility var(--transition-base);
}

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

.mobile-nav-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-xl);
  height: 100%;
}

.mobile-nav-link {
  font-size: 24px;
  font-weight: 600;
}

/* ========================================
   Hero Section
   ======================================== */

.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--header-height) + var(--space-3xl)) var(--space-lg) var(--space-3xl);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-bg::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 30%, var(--accent-glow) 0%, transparent 50%),
              radial-gradient(circle at 70% 70%, rgba(100, 0, 255, 0.1) 0%, transparent 50%);
  animation: bgFloat 20s ease-in-out infinite;
}

@keyframes bgFloat {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(-5%, -5%) rotate(5deg); }
}

.hero-content {
  position: relative;
  text-align: center;
  max-width: 900px;
  z-index: 1;
}

.hero-logo {
  width: 100px;
  height: 100px;
  margin: 0 auto var(--space-xl);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-glow);
}

.hero-title {
  font-size: clamp(40px, 8vw, 80px);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: var(--space-lg);
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-title .accent {
  background: linear-gradient(135deg, var(--accent) 0%, #00ff88 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(18px, 3vw, 24px);
  color: var(--text-secondary);
  margin-bottom: var(--space-2xl);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
}

/* ========================================
   Buttons
   ======================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 14px 28px;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
}

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

.btn-primary:hover {
  background: var(--accent-hover);
  color: var(--bg-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

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

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

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

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

.btn svg {
  width: 18px;
  height: 18px;
}

/* ========================================
   Cards
   ======================================== */

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  transition: all var(--transition-base);
}

.card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.card-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-glow);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-lg);
  color: var(--accent);
}

.card-icon svg {
  width: 24px;
  height: 24px;
}

.card-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.card-text {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ========================================
   Apps Grid
   ======================================== */

.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--space-xl);
}

.app-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  overflow: hidden;
  transition: all var(--transition-base);
}

.app-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), #00ff88);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.app-card:hover {
  border-color: var(--accent);
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg), 0 0 60px var(--accent-glow);
}

.app-card:hover::before {
  opacity: 1;
}

.app-card-header {
  display: flex;
  align-items: flex-start;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.app-icon {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-lg);
  flex-shrink: 0;
}

.app-info h3 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: var(--space-xs);
}

.app-tagline {
  font-size: 14px;
  color: var(--text-tertiary);
}

.app-description {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
  line-height: 1.7;
}

.app-features {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
}

.app-feature {
  padding: 6px 12px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
}

.app-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 15px;
  font-weight: 600;
  color: var(--accent);
}

.app-link svg {
  width: 16px;
  height: 16px;
  transition: transform var(--transition-fast);
}

.app-link:hover svg {
  transform: translateX(4px);
}

/* ========================================
   Features Grid
   ======================================== */

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
}

.feature-card {
  text-align: center;
  padding: var(--space-xl);
}

.feature-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-glow);
  border-radius: var(--radius-lg);
  color: var(--accent);
}

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

.feature-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.feature-text {
  font-size: 14px;
  color: var(--text-secondary);
}

/* ========================================
   Screenshots
   ======================================== */

.screenshots-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.screenshot-card {
  text-align: center;
}

.screenshot-image {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin-bottom: var(--space-md);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
}

.screenshot-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(0,0,0,0.6) 100%);
  pointer-events: none;
}

.screenshot-image:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-lg);
}

.screenshot-image img {
  width: 100%;
  height: auto;
}

.screenshot-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}

/* ========================================
   Form Styles
   ======================================== */

.form-group {
  margin-bottom: var(--space-lg);
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: var(--space-sm);
  color: var(--text-secondary);
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 14px 18px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 15px;
  transition: all var(--transition-fast);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-muted);
}

.form-textarea {
  min-height: 150px;
  resize: vertical;
}

.form-error {
  font-size: 13px;
  color: var(--error);
  margin-top: var(--space-xs);
}

.form-success {
  padding: var(--space-xl);
  background: rgba(0, 255, 136, 0.1);
  border: 1px solid var(--success);
  border-radius: var(--radius-lg);
  text-align: center;
}

.form-success svg {
  width: 48px;
  height: 48px;
  color: var(--success);
  margin-bottom: var(--space-md);
}

/* ========================================
   Footer
   ======================================== */

.footer {
  position: relative;
  z-index: 1;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: var(--space-3xl) 0 var(--space-xl);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-3xl);
  margin-bottom: var(--space-3xl);
}

.footer-brand {
  max-width: 300px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-weight: 600;
  font-size: 16px;
  margin-bottom: var(--space-md);
}

.footer-logo-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
}

.footer-tagline {
  font-size: 14px;
  color: var(--text-tertiary);
  margin-bottom: var(--space-lg);
}

.footer-social {
  display: flex;
  gap: var(--space-md);
}

.footer-social a {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.footer-social a:hover {
  background: var(--accent);
  color: var(--bg-primary);
  transform: translateY(-2px);
}

.footer-social svg {
  width: 18px;
  height: 18px;
}

.footer-column h4 {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: var(--space-lg);
  color: var(--text-primary);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer-link {
  font-size: 14px;
  color: var(--text-tertiary);
  transition: color var(--transition-fast);
}

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-xl);
  border-top: 1px solid var(--border);
}

.footer-copyright {
  font-size: 13px;
  color: var(--text-muted);
}

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

.footer-legal a {
  font-size: 13px;
  color: var(--text-muted);
}

/* ========================================
   Privacy Page
   ======================================== */

.privacy-hero {
  padding: calc(var(--header-height) + var(--space-3xl)) var(--space-lg) var(--space-2xl);
  text-align: center;
}

.privacy-hero .section-label {
  margin-bottom: var(--space-sm);
}

.privacy-hero h1 {
  font-size: clamp(36px, 6vw, 56px);
  font-weight: 700;
  margin-bottom: var(--space-md);
}

.privacy-meta {
  font-size: 14px;
  color: var(--text-muted);
}

.privacy-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 var(--space-lg) var(--space-4xl);
}

.privacy-section {
  margin-bottom: var(--space-3xl);
}

.privacy-section h2 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: var(--space-lg);
  color: var(--text-primary);
}

.privacy-section h3 {
  font-size: 20px;
  font-weight: 600;
  margin-top: var(--space-xl);
  margin-bottom: var(--space-md);
  color: var(--text-primary);
}

.privacy-section p {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
  line-height: 1.8;
}

.privacy-section ul {
  margin-bottom: var(--space-md);
  padding-left: var(--space-lg);
}

.privacy-section li {
  position: relative;
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
  padding-left: var(--space-md);
  line-height: 1.7;
}

.privacy-section li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
}

/* ========================================
   Support Page
   ======================================== */

.support-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl);
  align-items: start;
}

.support-form-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
}

.support-info h3 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: var(--space-md);
}

.support-info p {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: var(--space-xl);
}

.faq-section {
  margin-top: var(--space-2xl);
}

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

.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-lg) 0;
  font-size: 16px;
  font-weight: 500;
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.faq-question:hover {
  color: var(--accent);
}

.faq-question svg {
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  transition: transform var(--transition-base);
}

.faq-item.active .faq-question svg {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-base);
}

.faq-item.active .faq-answer {
  max-height: 500px;
}

.faq-answer p {
  padding-bottom: var(--space-lg);
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2xl);
  }

  .footer-brand {
    grid-column: span 2;
    max-width: none;
  }
}

@media (max-width: 900px) {
  .nav {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }

  .mobile-nav {
    display: block;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 64px;
  }

  .hero {
    min-height: auto;
    padding-top: calc(var(--header-height) + var(--space-3xl));
    padding-bottom: var(--space-3xl);
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

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

  .screenshots-grid {
    grid-template-columns: 1fr;
    max-width: 320px;
    margin: 0 auto;
  }

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

  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }

  .footer-brand {
    grid-column: span 1;
  }

  .footer-bottom {
    flex-direction: column;
    gap: var(--space-md);
    text-align: center;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 var(--space-md);
  }

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

  .app-card-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .app-features {
    justify-content: center;
  }
}

/* ========================================
   Utility Classes
   ======================================== */

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-accent { color: var(--accent); }

.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }

.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

.hidden { display: none !important; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
