/* ============================================================
   Gridsnap Marketing Site — Shared Stylesheet
   ============================================================
   Static HTML+CSS site. No build step. Mobile-first.
   ============================================================ */

/* ------------------------------------------------------------
   1. CSS Custom Properties
   ------------------------------------------------------------ */
:root {
  /* Colors — primary */
  --color-primary: #5eadb5;
  --color-primary-hover: #4d9aa2;

  /* Colors — backgrounds */
  --color-dark-bg: #0d0d1a;
  --color-dark-surface: #1e1e2e;
  --color-light-bg: #ffffff;
  --color-light-surface: #fafafa;

  /* Colors — text */
  --color-text-dark: #1a1a2a;
  --color-text-body: #4a4a5a;
  --color-text-muted: #6b7280;
  --color-text-light: #ffffff;
  --color-text-light-muted: #9ca3af;

  /* Colors — misc */
  --color-border-dark: #363647;
  --color-frame-bg: #252536;

  /* Layout */
  --max-width: 1120px;
  --section-padding: 80px;
  --radius: 8px;
  --radius-lg: 12px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #4a4a5a;
  background: var(--color-light-bg);
}

code,
pre,
kbd,
samp {
  font-family: "JetBrains Mono", "Fira Code", monospace;
}

img {
  max-width: 100%;
  height: auto;
}

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

/* ------------------------------------------------------------
   3. Layout
   ------------------------------------------------------------ */
.container {
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

.section, .section-alt {
  padding: var(--section-padding) 0;
}

.section-dark {
  background: linear-gradient(180deg, #0d0d1a 0%, #1e1e2e 100%);
  color: var(--color-text-light);
}

.section-light {
  background: var(--color-light-bg);
}

.section-alt {
  background: var(--color-light-surface);
}

/* ------------------------------------------------------------
   4. Navigation
   ------------------------------------------------------------ */
.nav {
  position: sticky;
  top: 0;
  background: #0e0f1c;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 56px;
  z-index: 1000;
}

.nav-logo {
  font-weight: 700;
  color: var(--color-text-light);
  letter-spacing: 2px;
  text-decoration: none;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-logo-icon {
  vertical-align: middle;
}

.footer-logo-icon {
  vertical-align: middle;
  margin-right: 4px;
}

/* Hidden checkbox for no-JS hamburger toggle */
.nav-toggle {
  display: none;
}

.nav-links {
  display: none;
  flex-direction: column;
  position: absolute;
  top: 56px;
  left: 0;
  right: 0;
  background: var(--color-dark-surface);
  padding: 16px 20px;
  gap: 12px;
  z-index: 999;
}

.nav-toggle:checked ~ .nav-links {
  display: flex;
}

.nav-links a {
  color: var(--color-text-light-muted);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}

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

.nav-links a[aria-current="page"] {
  color: var(--color-primary);
}

.nav-links .nav-cta,
.nav-cta {
  display: inline-block;
  background: var(--color-primary);
  color: #ffffff;
  padding: 8px 20px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid var(--color-primary);
  transition: background 0.2s;
}

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

/* Hamburger button — visible on mobile only */
.nav-hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  width: 28px;
  height: 28px;
}

.nav-hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-text-light);
  border-radius: 1px;
  transition: transform 0.2s, opacity 0.2s;
}

/* ------------------------------------------------------------
   5. Typography
   ------------------------------------------------------------ */
h1 {
  font-size: 32px;
  font-weight: 800;
  color: var(--color-text-dark);
  margin-bottom: 16px;
  line-height: 1.2;
}

h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--color-text-dark);
  margin-bottom: 12px;
  line-height: 1.3;
}

h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--color-text-dark);
  line-height: 1.4;
}

.eyebrow {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--color-primary);
  font-weight: 600;
  margin-bottom: 8px;
}

.subtitle {
  font-size: 18px;
  color: var(--color-text-body);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Dark section heading overrides */
.section-dark h1,
.section-dark h2,
.section-dark h3 {
  color: var(--color-text-light);
}

.section-dark .subtitle {
  color: var(--color-text-light-muted);
}

/* ------------------------------------------------------------
   6. Buttons
   ------------------------------------------------------------ */
.btn-primary {
  display: inline-block;
  background: var(--color-primary);
  color: var(--color-text-light);
  padding: 14px 28px;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}

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

.btn-secondary {
  display: inline-block;
  background: transparent;
  /* color: var(--color-text-body); */
  color: var(--color-text-light);
  padding: 14px 28px;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid #6b7280;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

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

/* ------------------------------------------------------------
   7. Hero
   ------------------------------------------------------------ */
.hero {
  text-align: center;
  padding: 60px 0 40px;
}

.hero h1 {
  color: var(--color-text-light);
  font-size: 36px;
}

.hero .subtitle {
  color: var(--color-text-light-muted);
  max-width: 560px;
}

.hero-ctas {
  display: flex;
  flex-direction: row;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 24px;
}

.hero-screenshot {
  max-width: 800px;
  margin: 40px auto 0;
  background: var(--color-frame-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border-dark);
  padding: 16px;
  overflow: hidden;
  position: relative;
}

.hero-screenshot::before {
  content: "";
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  width: 52px;
  height: 12px;
  background:
    radial-gradient(circle at 6px 6px, #ff5f57 5px, transparent 5px),
    radial-gradient(circle at 24px 6px, #febc2e 5px, transparent 5px),
    radial-gradient(circle at 42px 6px, #28c840 5px, transparent 5px);
}

.hero-screenshot img {
  width: 100%;
  border-radius: var(--radius);
  display: block;
}

/* ------------------------------------------------------------
   8. Feature Strip
   ------------------------------------------------------------ */
.feature-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 32px;
  padding: 48px 0;
}

.feature-strip-item {
  text-align: center;
  max-width: 220px;
}

.feature-strip-item .icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.feature-strip-item h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text-dark);
}

.feature-strip-item p {
  font-size: 13px;
  color: var(--color-text-muted);
}

/* ------------------------------------------------------------
   9. Feature Rows (alternating layout)
   ------------------------------------------------------------ */
.feature-rows {
  display: flex;
  flex-direction: column;
  gap: 64px;
}

.feature-row {
  display: flex;
  flex-direction: column;
  gap: 40px;
  align-items: center;
}

.feature-row-text {
  flex: 1;
}

.feature-row-text h3 {
  margin-bottom: 12px;
}

.feature-row-text p {
  color: var(--color-text-body);
}

.feature-row-image {
  flex: 1;
  background: var(--color-frame-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border-dark);
  padding: 12px;
  overflow: hidden;
  position: relative;
}

.feature-row-image::before {
  content: "";
  display: flex;
  width: 44px;
  height: 10px;
  margin-bottom: 10px;
  background:
    radial-gradient(circle at 5px 5px, #ff5f57 4px, transparent 4px),
    radial-gradient(circle at 20px 5px, #febc2e 4px, transparent 4px),
    radial-gradient(circle at 35px 5px, #28c840 4px, transparent 4px);
}

.feature-row-image img {
  width: 100%;
  border-radius: var(--radius);
  display: block;
}

/* ------------------------------------------------------------
   10. Use Case Cards
   ------------------------------------------------------------ */
.use-case-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.use-case-card {
  background: var(--color-light-bg);
  border-left: 3px solid var(--color-primary);
  border-radius: var(--radius);
  padding: 24px;
}

.use-case-card h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text-dark);
  margin-bottom: 8px;
}

.use-case-card p {
  font-size: 14px;
  color: var(--color-text-muted);
}

/* ------------------------------------------------------------
   11. Comparison Table
   ------------------------------------------------------------ */
.comparison-wrapper {
  overflow-x: auto;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.comparison-table th {
  background: #fafafa;
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  border-bottom: 2px solid #e5e7eb;
  position: sticky;
  top: 0;
}

.comparison-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #f0f0f0;
}

.comparison-table tr:nth-child(even) td {
  background: #fafafa;
}

.comparison-table .check {
  color: #22c55e;
}

.comparison-table .cross {
  color: #ef4444;
}

.comparison-table .highlight {
  background: rgba(94, 173, 181, 0.08);
  font-weight: 600;
}

/* ------------------------------------------------------------
   12. Pricing Card
   ------------------------------------------------------------ */
.pricing-card {
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
  border: 2px solid var(--color-primary);
  border-radius: 16px;
  padding: 40px;
  text-align: center;
}

.pricing-badge {
  display: inline-block;
  background: var(--color-primary);
  color: var(--color-text-light);
  padding: 4px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
}

.pricing-features {
  list-style: none;
  text-align: left;
  padding: 0;
}

.pricing-features li {
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: 14px;
}

.pricing-features li::before {
  content: "\2713  ";
  color: var(--color-primary);
  font-weight: 600;
}

/* ------------------------------------------------------------
   13. FAQ
   ------------------------------------------------------------ */
.faq-list {
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.faq-item {
  padding: 24px 0;
  border-bottom: 1px solid #e5e7eb;
}

.faq-item h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text-dark);
  margin-bottom: 8px;
}

.faq-item p {
  font-size: 14px;
  color: var(--color-text-body);
}

/* ------------------------------------------------------------
   14. Footer
   ------------------------------------------------------------ */
.footer {
  background: #1e1e2e;
  color: #9ca3af;
  padding: 48px 0 24px;
}

.footer-grid {
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
}

.footer-col {
  flex: 1;
  min-width: 150px;
}

.footer-col h4 {
  color: var(--color-text-light);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.footer-col a {
  color: #9ca3af;
  text-decoration: none;
  font-size: 13px;
  display: block;
  margin-bottom: 8px;
  transition: color 0.2s;
}

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

.footer-bottom {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid #363647;
  font-size: 12px;
  text-align: center;
}

/* ------------------------------------------------------------
   15. Dark CTA Section
   ------------------------------------------------------------ */
.cta-section {
  text-align: center;
  padding: 64px 0;
}

.cta-section h2 {
  color: var(--color-text-light);
  margin-bottom: 8px;
}

.cta-section .subtitle {
  color: var(--color-text-light-muted);
  margin-bottom: 24px;
}

/* ------------------------------------------------------------
   16. 404 / Error Page
   ------------------------------------------------------------ */
.error-page {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.error-page h1 {
  font-size: 64px;
  color: var(--color-text-muted);
  font-weight: 800;
}

.error-page p {
  color: var(--color-text-body);
  margin-bottom: 24px;
}

/* ------------------------------------------------------------
   17. About Page
   ------------------------------------------------------------ */
.about-content {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.about-content h2 {
  margin-top: 48px;
  margin-bottom: 16px;
}

.about-content p {
  margin-bottom: 16px;
}

/* ------------------------------------------------------------
   18. Feature Detail Sections (features page)
   ------------------------------------------------------------ */
.feature-section {
  padding: 48px 0;
  border-bottom: 1px solid #f0f0f0;
}

.feature-section:last-child {
  border-bottom: none;
}

.feature-section h2 {
  margin-bottom: 12px;
}

.feature-section ul {
  padding-left: 20px;
  margin-top: 12px;
}

.feature-section li {
  margin-bottom: 8px;
  font-size: 14px;
  color: var(--color-text-body);
}

/* ------------------------------------------------------------
   19. Use Case Detail / Audience Sections
   ------------------------------------------------------------ */
.audience-section {
  padding: 48px 0;
  border-bottom: 1px solid #f0f0f0;
}

.audience-section h2 {
  margin-bottom: 12px;
}

.audience-section .key-features {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.audience-section .key-features a {
  display: inline-block;
  background: #f0f4f5;
  color: var(--color-primary);
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 13px;
  text-decoration: none;
}

/* ============================================================
   20. Responsive — Tablet (min-width: 768px)
   ============================================================ */
@media (min-width: 768px) {
  /* Nav — show links, hide hamburger */
  .nav-hamburger {
    display: none;
  }

  .nav-links {
    display: flex;
    flex-direction: row;
    position: static;
    padding: 0;
    gap: 24px;
    align-items: center;
    background: transparent;
  }

  /* Typography scale-up */
  h1 {
    font-size: 40px;
  }

  h2 {
    font-size: 28px;
  }

  .hero h1 {
    font-size: 44px;
  }

  /* Use case grid — two columns */
  .use-case-grid {
    grid-template-columns: 1fr 1fr;
  }

  /* Feature rows — side by side */
  .feature-row {
    flex-direction: row;
  }

  .feature-row:nth-child(even) {
    flex-direction: row-reverse;
  }
}

/* ============================================================
   21. Responsive — Desktop (min-width: 1024px)
   ============================================================ */
@media (min-width: 1024px) {
  :root {
    --section-padding: 80px;
  }

  h1 {
    font-size: 48px;
  }

  h2 {
    font-size: 32px;
  }

  .hero h1 {
    font-size: 52px;
  }

  .hero {
    padding: 80px 0 60px;
  }

  .error-page h1 {
    font-size: 96px;
  }

  /* Comparison table — no scroll needed */
  .comparison-wrapper {
    overflow: visible;
  }
}
