/*
 * Whiskers website stylesheet
 *
 * The design follows a dark theme inspired by mobile‑first best practices.
 * A dark gray background (#121212) is used instead of true black to avoid eye strain.
 * Text uses off‑white colours for better contrast and readability.
 */

:root {
  --bg-color: #121212;
  --card-bg: #1e1e1e;
  --primary: #8a5cf6;
  --primary-hover: #a17cfb;
  --secondary-bg: #2a2a2a;
  --text-color: #e6e6e6;
  --heading-color: #ffffff;
  --border-color: #333;
  --radius: 6px;
  --max-width: 1200px;
}

/* Reset & base styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
    Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--primary);
  text-decoration: none;
}

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

/* Typography */
h1, h2, h3, h4 {
  color: var(--heading-color);
  font-weight: 600;
  line-height: 1.2;
}

h1 { font-size: 2.2rem; margin-bottom: 0.5rem; }
h2 { font-size: 1.6rem; margin-bottom: 0.4rem; }
h3 { font-size: 1.3rem; margin-bottom: 0.3rem; }

p { margin-bottom: 1rem; }

pre {
  background: var(--card-bg);
  padding: 1rem;
  border-radius: var(--radius);
  overflow-x: auto;
  margin-bottom: 1rem;
  color: #eee;
}

code {
  font-family: 'Courier New', Courier, monospace;
  background: var(--card-bg);
  padding: 0.2rem 0.4rem;
  border-radius: var(--radius);
}

/* Header */
header {
  background-color: var(--bg-color);
  border-bottom: 1px solid var(--border-color);
}

.header-container {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--heading-color);
  font-size: 1.3rem;
  font-weight: 600;
}

.logo img {
  width: 28px;
  height: 28px;
  filter: invert(88%) sepia(7%) saturate(394%) hue-rotate(214deg) brightness(98%) contrast(86%);
}

.main-nav > ul {
  list-style: none;

  display: flex;
  align-items: center;

  gap: 1.5rem;
}

/* Dropdown menus */

.dropdown-menu {
  display: none;

  position: absolute;

  top: calc(100% + 0.5rem);
  left: 0;

  min-width: 240px;

  background: var(--card-bg);

  border: 1px solid var(--border-color);
  border-radius: var(--radius);

  padding: 0.5rem 0;

  z-index: 9999;
}

.dropdown {
  position: relative;
}

.dropdown-menu li {
  width: 100%;
}

.dropdown-menu a {
  display: block;

  padding: 0.75rem 1rem;

  white-space: nowrap;
}

.dropdown-menu a:hover {
  background: var(--secondary-bg);
}

.dropdown:hover .dropdown-menu {
  display: block;
}

nav a {
  color: var(--text-color);
  font-weight: 500;
  padding: 0.5rem;
  border-radius: var(--radius);
}

nav a.active,
nav a:hover {
  background-color: var(--secondary-bg);
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.6rem;
  color: var(--primary);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius);
  font-weight: 500;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.btn.primary {
  background-color: var(--primary);
  color: #fff;
}

.btn.primary:hover {
  background-color: var(--primary-hover);
  color: #fff;
}

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

.btn.secondary:hover {
  background-color: var(--primary);
  color: #fff;
}

/* Hero section */
.hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  /* Slightly tighter vertical spacing on the hero section for desktop */
  padding: 1.25rem 1rem;
  max-width: var(--max-width);
  margin: 0 auto;
  /* reduce the gap between text and image on larger screens to tighten the layout */
  gap: 1rem;
}

.hero-content {
  flex: 1 1 320px;
  max-width: 600px;
}

.hero-content p {
  font-size: 1.1rem;
  margin-bottom: 1.2rem;
  color: var(--text-color);
}

.hero-buttons {
  display: flex;
  gap: 1rem;
}

.hero-image {
  flex: 1 1 320px;
  max-width: 500px;
}

.hero-image img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.6);
}

/* Selling points cards */
.selling-points {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  padding: 2rem 1.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.selling-points .card {
  background: var(--card-bg);
  padding: 1.5rem;
  border-radius: var(--radius);
  text-align: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s ease;
}

.selling-points .card:hover {
  transform: translateY(-4px);
}

.selling-points .card img {
  width: 40px;
  height: 40px;
  margin-bottom: 0.75rem;
  filter: invert(88%) sepia(7%) saturate(394%) hue-rotate(214deg) brightness(98%) contrast(86%);
}

.selling-points .card h3 {
  margin-bottom: 0.5rem;
}

/* Page hero (for secondary pages) */
.page-hero {
  padding: 2.5rem 1.5rem 1rem;
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: center;
}

.features-hero, .download-hero, .docs-hero {
  padding-top: 4rem;
}

/* Features page */
.features-list {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.feature {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: var(--card-bg);
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

.feature img {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  filter: invert(88%) sepia(7%) saturate(394%) hue-rotate(214deg) brightness(98%) contrast(86%);
}

.feature-content h2 {
  margin-top: 0;
}

.screenshots {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.screenshots .screenshot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.screenshots img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.5);
}

/* Screenshot wrapper with label overlay */
.screenshot-wrapper {
  width: fit-content;
  max-width: 100%;
  margin: 1rem auto;
  padding: 0.25rem;
  background: #050507;
  border: 1px solid var(--primary);
  border-radius: var(--radius);
}

.screenshot-wrapper img {
  display: block;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: calc(var(--radius) - 2px);
}

/* Trust strip */

.trust-strip {
  max-width: var(--max-width);

  margin: 0 auto;

  padding: 1rem 1.5rem;

  display: flex;
  flex-wrap: wrap;

  justify-content: center;

  gap: 2rem;

  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-color);
  font-size: 0.95rem;
}

.trust-item img {
  width: 20px;
  height: 20px;
  filter: invert(88%) sepia(7%) saturate(394%) hue-rotate(214deg) brightness(98%) contrast(86%);
}

/* Download page */
.download-tabs {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.download-tabs .tab-buttons {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.download-tabs .tab-buttons button {
  padding: 0.6rem 1rem;
  border: none;
  background: var(--secondary-bg);
  color: var(--text-color);
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 500;
  transition: background-color 0.2s ease;
}

.download-tabs .tab-buttons button.active,
.download-tabs .tab-buttons button:hover {
  background: var(--primary);
  color: #fff;
}

.tab-content {
  background: var(--card-bg);
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

.tab-pane { display: none; }
.tab-pane.active { display: block; }

.download-tabs pre {
  margin: 0.5rem 0 1rem;
}

/* Version information section */
.version-info {
  max-width: var(--max-width);
    padding: 2rem 1.5rem;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
  text-align: center;
    margin: 2rem auto 0;
}

/* Note under version details */
.checksum-note {
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--text-color);
}

.version-info h2 {
  margin-bottom: 0.5rem;
}

.version-number {
  font-size: 2rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 1rem;
}

.version-details {
  list-style: none;
  margin-bottom: 1rem;
  padding: 0;
}

.version-details li {
  margin-bottom: 0.5rem;
}

.additional-info {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* Docs page */
.docs-index {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.docs-index ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.docs-index ul li a {
  background: var(--secondary-bg);
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius);
  color: var(--text-color);
  transition: background-color 0.2s ease;
}

.docs-index ul li a:hover {
  background: var(--primary);
  color: #fff;
}

.doc-section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem;
  border-top: 1px solid var(--border-color);
}

.doc-section:first-of-type {
  border-top: none;
}

.doc-section h2 {
  margin-bottom: 0.5rem;
}

.doc-section ul {
  padding-left: 1.2rem;
  margin-bottom: 1rem;
}

/* Examples section on features page */
.examples {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem;
  border-top: 1px solid var(--border-color);
}

.examples h2 {
  margin-bottom: 0.6rem;
}

.examples ul {
  list-style: none;
  padding-left: 0;
}

.examples li {
  margin-bottom: 0.8rem;
  line-height: 1.4;
}

/* Footer */
footer {
  margin-top: auto;
  background: var(--card-bg);
  border-top: 1px solid var(--border-color);
}

.footer-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
}

.footer-nav {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-nav a {
  color: var(--text-color);
  font-size: 0.9rem;
}

.footer-nav a:hover,
.footer-nav a.active {
  color: var(--primary);
}

/* Key Features section */
.key-features {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.key-features h2 {
  text-align: center;
  margin-bottom: 1rem;
}

.key-features ul {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.key-features li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--card-bg);
  padding: 1rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
}

.key-features li img {
  width: 24px;
  height: 24px;
  filter: invert(88%) sepia(7%) saturate(394%) hue-rotate(214deg) brightness(98%) contrast(86%);
}

/* Comparison section */
.comparison {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.comparison-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 2rem;
}

.comparison-column {
  background: var(--card-bg);
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

.comparison-column h3 {
  margin-bottom: 0.5rem;
  font-size: 1.4rem;
}

.comparison-column ul {
  list-style: disc;
  margin-left: 1.25rem;
  margin-bottom: 1rem;
}

.comparison-column .caption {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--text-color);
  opacity: 0.8;
}

.comparison-column .example-description {
  margin-top: 1rem;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-color);
}

/* Final CTA section */
.final-cta {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem;
  text-align: center;
}

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

/* Narrative alternating sections on features page */
.alternate {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
}

.alternate.reverse {
  flex-direction: row-reverse;
}

.alternate .text {
  flex: 1 1 300px;
}

.alternate .image {
  flex: 1 1 300px;
}

.alternate img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.5);
}

@media (max-width: 768px) {
  .comparison-columns {
    grid-template-columns: 1fr;
  }
  .alternate {
    flex-direction: column;
  }
}

.expandable-image {
  cursor: zoom-in;
}

.image-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  justify-content: center;
  align-items: center;
  padding: 2rem;
}

.image-modal.active {
  display: flex;
}

.modal-content {
  max-width: 95vw;
  max-height: 95vh;
  object-fit: contain;
  border: 1px solid #8b5cf6;
  box-shadow: 0 0 30px rgba(139, 92, 246, 0.25);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  font-size: 3rem;
  color: #fff;
  cursor: pointer;
  user-select: none;
}

.image-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    inset: 0;
    background: rgba(0,0,0,0.92);
    justify-content: center;
    align-items: center;
    padding: 2rem;
    cursor: zoom-out;
}

.image-modal img {
    max-width: 95vw;
    max-height: 95vh;
    object-fit: contain;
    border: 2px solid #8b5cf6;
    border-radius: 8px;
    box-shadow: 0 0 40px rgba(0,0,0,0.8);
}

.runtime-diagram-wrapper {
  width: 100%;
  max-width: 960px;
  margin: 1.5rem auto;
  padding: 1rem;
  background: #050507;
  border: 1px solid var(--primary);
  border-radius: var(--radius);
  box-shadow: 0 0 24px rgba(139, 92, 246, 0.18);
}

.runtime-diagram-wrapper img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  cursor: zoom-in;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.footer-brand p {
    margin: 0;
    line-height: 1.4;
}

.footer-logo {
    width: 72px;
    height: 72px;
    object-fit: contain;
    flex-shrink: 0;
}

/* ===================================================== */
/* Contact Form */
/* ===================================================== */

.contact-section {
  max-width: 720px;

  margin: 0 auto;

  padding: 2rem 1.5rem 4rem;
}

.contact-form {
  display: flex;
  flex-direction: column;

  gap: 1rem;

  margin-top: 2rem;
}

.contact-form label {
  font-weight: 600;
}

.contact-form input,
.contact-form textarea {
  width: 100%;

  padding: 0.9rem 1rem;

  background: var(--card-bg);

  border: 1px solid var(--border-color);
  border-radius: var(--radius);

  color: var(--text-color);

  font: inherit;
}

.contact-form textarea {
  min-height: 180px;

  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;

  border-color: var(--primary);

  box-shadow: 0 0 0 1px var(--primary);
}

.contact-form button {
  align-self: flex-start;

  padding: 0.8rem 1.4rem;

  background: var(--primary);

  color: white;

  border: none;
  border-radius: var(--radius);

  cursor: pointer;

  font-weight: 600;
}

.contact-form button:hover {
  background: var(--primary-hover);
}

.contact-footer,
.privacy-note {
  margin-top: 1.5rem;
}

/* ===================================================== */
/* Mobile Navigation */
/* ===================================================== */

@media (max-width: 768px) {

  .header-container {
    flex-wrap: wrap;
    gap: 1rem;
  }

  .logo {
    font-size: 1.1rem;
  }

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

  /* Show hamburger */
  .nav-toggle {
    display: block;
    margin-left: auto;
    cursor: pointer;
  }

  /* Hide desktop nav */
  .main-nav {
    display: none !important;

    width: 100%;
  }

  /* Show nav when toggled */
  .main-nav.active {
    display: block !important;
  }

  /* Stack nav vertically */
  .main-nav > ul {
    flex-direction: column !important;

    align-items: flex-start;

    gap: 0.5rem;

    width: 100%;

    margin-top: 1rem;
  }

  .main-nav li {
    width: 100%;
  }

  .main-nav a {
    display: block;

    width: 100%;
  }

  /* Disable hover dropdown behavior on mobile */
  .dropdown:hover .dropdown-menu {
    display: none;
  }

  /* Mobile dropdown menus */
  .dropdown-menu {
    position: static;

    display: block;

    background: transparent;

    border: none;

    padding-left: 1rem;

    margin-top: 0.25rem;

    box-shadow: none;
  }

  .dropdown-menu a {
    padding: 0.5rem 0;
  }

  /* Hero buttons stack cleanly */
  .hero-buttons {
    flex-direction: column;

    align-items: stretch;
  }

  .hero-buttons .btn {
    text-align: center;
  }

  /* Prevent comparison cards from overflowing */
  .comparison-columns {
    grid-template-columns: 1fr;
  }

  /* Better mobile spacing */
  .hero,
  .comparison,
  .key-features,
  .final-cta {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}