/* ==========================================================================
   Camera Hound — Landing site
   Host on Synology (Web Station or Docker). Lemon Squeezy checkout.
   ========================================================================== */

:root {
  --bg: #0d0f12;
  --bg-elevated: #15181d;
  --bg-card: #1a1e24;
  --text: #e6e8ec;
  --text-muted: #8b9199;
  --accent: #22c55e;
  --accent-hover: #16a34a;
  --border: #2a2e36;
  --radius: 10px;
  --font-sans: "DM Sans", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", monospace;
  --wrap: min(1100px, 92vw);
}

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

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

/* Focus styles for keyboard navigation */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 15, 18, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.875rem;
  padding-bottom: 0.875rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--text);
  text-decoration: none;
}

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

.logo-icon {
  font-size: 1.4rem;
  opacity: 0.9;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
}

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

/* Hamburger toggle — hidden on desktop */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition: transform 0.25s, opacity 0.2s;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 700px) {
  .nav-toggle {
    display: flex;
  }

  .header-cta {
    display: none;
  }

  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(13, 15, 18, 0.98);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.25rem;
    gap: 0.25rem;
  }

  .nav.open {
    display: flex;
  }

  .nav a {
    padding: 0.6rem 0;
    font-size: 1rem;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.2rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.btn-primary {
  background: var(--accent);
  color: #0d0f12;
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: #0d0f12;
}

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

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

.btn-lg {
  padding: 0.85rem 1.6rem;
  font-size: 1rem;
}

.btn-block {
  width: 100%;
}

/* Hero */
.hero {
  padding: 4rem 0 5rem;
  text-align: center;
}

.hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
}

.hero h1 strong {
  color: var(--accent);
}

.hero-lead {
  margin: 0 0 2rem;
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 36em;
  margin-left: auto;
  margin-right: auto;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

/* Sections */
.section {
  padding: 4rem 0;
}

.section h2 {
  margin: 0 0 0.5rem;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
}

.section-lead {
  margin: 0 0 2rem;
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* Features */
.features {
  background: var(--bg-elevated);
}

.feature-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.feature-icon {
  font-size: 1.75rem;
  display: block;
  margin-bottom: 0.75rem;
}

.feature-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
}

.feature-card p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.features-note {
  margin: 1.25rem 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
}

/* App preview — screenshot gallery */
.preview {
  background: var(--bg-elevated);
}

.screenshot-gallery {
  max-width: 900px;
  margin: 0 auto;
}

.gallery-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--border);
  padding-bottom: 0;
}

.gallery-tab {
  background: none;
  border: none;
  padding: 0.6rem 1rem;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color 0.2s, border-color 0.2s;
}

.gallery-tab:hover {
  color: var(--text);
}

.gallery-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.gallery-panels {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.gallery-panel {
  display: none;
}

.gallery-panel.active {
  display: block;
}

.gallery-panel img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
}

.gallery-privacy-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0.75rem 0 0;
  font-style: italic;
  text-align: center;
}

/* How it works */
.steps {
  margin: 0 0 1.5rem;
  padding-left: 1.5rem;
  color: var(--text-muted);
}

.steps li {
  margin-bottom: 0.75rem;
}

.tech-note {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
}

/* Pricing */
.pricing-cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.price-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  min-width: 280px;
  max-width: 360px;
}

.price-card h3 {
  margin: 0 0 0.25rem;
  font-size: 1.25rem;
  color: var(--text);
}

.price-desc {
  margin: 0 0 1.25rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.price {
  margin-bottom: 1.5rem;
}

.price .amount {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--accent);
}

.price .once {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-left: 0.35rem;
}

.price-features {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.price-features li {
  padding: 0.35rem 0;
  padding-left: 1.5rem;
  position: relative;
}

.price-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 600;
}

.price-note-nest {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0 0 1rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}

.pricing-note {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
  text-align: center;
}

/* Install */
.code-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-x: auto;
  margin-bottom: 1rem;
}

.code-block pre {
  margin: 0;
  padding: 1.25rem 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.code-block code {
  white-space: pre;
}

p code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--bg-card);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  color: var(--accent);
}

/* Install steps */
.install-steps {
  margin: 0 0 1.5rem;
  padding-left: 1.5rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

.install-steps li {
  margin-bottom: 1rem;
}

.install-steps .code-block {
  margin-top: 0.5rem;
}

/* Footer */
.site-footer {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  text-align: center;
}

.site-footer p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* FAQ */
.faq {
  background: var(--bg-elevated);
}

.faq-list {
  max-width: 720px;
}

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

.faq-item summary {
  padding: 1rem 0;
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.faq-item summary::after {
  content: "+";
  font-size: 1.25rem;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: transform 0.2s;
}

.faq-item[open] summary::after {
  content: "\2212";
}

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

.faq-item p {
  margin: 0 0 1rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

.faq-item a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Legal pages */
.legal-page h1 {
  margin: 0 0 0.25rem;
  font-size: 1.75rem;
}

.legal-updated {
  margin: 0 0 2rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.legal-page h2 {
  margin: 2rem 0 0.5rem;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
}

.legal-page h3 {
  margin: 1.25rem 0 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.legal-page p,
.legal-page ul,
.legal-page ol {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

.legal-page ul {
  padding-left: 1.25rem;
}

.legal-page ul li {
  margin-bottom: 0.4rem;
}

.legal-page a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

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

.legal-page ol {
  padding-left: 1.25rem;
}

.legal-page ol li {
  margin-bottom: 0.4rem;
}

.legal-page pre {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  overflow-x: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-primary);
}

.legal-page code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85em;
  background: var(--bg-card);
  padding: 0.15em 0.35em;
  border-radius: 4px;
}

.legal-page pre code {
  background: none;
  padding: 0;
}

.legal-page table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.9rem;
}

.legal-page th,
.legal-page td {
  text-align: left;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.legal-page th {
  background: var(--bg-card);
  color: var(--text-primary);
  font-weight: 600;
}

.legal-page td code {
  font-size: 0.8rem;
  white-space: nowrap;
}

.guide-toc {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0 2rem;
}

.guide-toc h2 {
  margin: 0 0 0.75rem !important;
  font-size: 1rem !important;
}

.guide-toc ol {
  margin: 0;
  padding-left: 1.25rem;
}

.guide-toc li {
  margin-bottom: 0.3rem;
}

.guide-toc a {
  color: var(--accent);
  text-decoration: none;
}

.guide-toc a:hover {
  text-decoration: underline;
}

/* Footer */
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem;
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
}

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

/* Pricing EULA note */
.price-eula-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0.75rem 0 0;
  text-align: center;
}

.price-eula-note a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Lemon Squeezy: style the overlay trigger like our primary button */
a.lemonsqueezy-button {
  appearance: none;
  text-decoration: none;
}
