/* ============================================================
   SolAI Labs — styles.css
   Order: tokens → reset → base → layout → components → responsive → print
   ============================================================ */

/* 1. CSS Custom Properties */
:root {
  --color-bg:         #F7F7F6;
  --color-surface:    #EFEFED;
  --color-text:       #1A1A1A;
  --color-text-muted: #888880;
  --color-border:     #E4E4E2;
  --color-accent:     #1A1A1A;

  --font-base: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Helvetica, Arial, sans-serif;

  --space-1:  8px;
  --space-2:  16px;
  --space-3:  24px;
  --space-4:  32px;
  --space-5:  48px;
  --space-6:  64px;
  --space-7:  96px;
  --space-8:  128px;
}

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

/* 3. Base Elements */
html {
  font-size: 15px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-base);
  font-weight: 400;
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
}

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

a:hover {
  text-decoration: underline;
}

h1, h2, h3, h4 {
  font-family: var(--font-base);
  line-height: 1.2;
  color: var(--color-text);
}

h1 {
  font-size: 52px;
  font-weight: 200;
}

h2 {
  font-size: 28px;
  font-weight: 300;
}

h3 {
  font-size: 17px;
  font-weight: 400;
}

h4 {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

p {
  font-size: 15px;
  font-weight: 400;
  color: var(--color-text);
  line-height: 1.7;
}

ul {
  list-style: none;
}

img {
  display: block;
  max-width: 100%;
}

/* 4. Layout Utilities */
.container {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 var(--space-3);
}

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

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

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

/* 5. Component: Nav */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-2);
  padding-top: var(--space-2);
  padding-bottom: var(--space-2);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.05em;
  color: var(--color-text);
  text-decoration: none;
}

.nav-logo:hover {
  text-decoration: none;
  opacity: 0.75;
}

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

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

.nav-links a {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

/* 6. Component: Hero */
.hero {
  padding: var(--space-8) 0;
  text-align: center;
}

.hero-logo {
  margin: 0 auto var(--space-4);
  height: 220px;
  width: auto;
}

.hero h1 {
  margin-bottom: var(--space-3);
}

.hero-sub {
  font-size: 17px;
  font-weight: 300;
  color: var(--color-text-muted);
  max-width: 480px;
  margin: 0 auto;
}

.hero-actions {
  margin-top: var(--space-5);
  display: flex;
  justify-content: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

/* Page-level hero (not homepage) */
.page-hero {
  padding: var(--space-7) 0 var(--space-5);
  border-bottom: 1px solid var(--color-border);
}

.page-hero h1 {
  font-size: 36px;
  font-weight: 200;
  margin-bottom: var(--space-2);
}

.page-hero .hero-sub {
  margin: 0;
}

/* 7. Component: Card */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  padding: var(--space-4);
  border-radius: 0;
}

.card-name {
  font-size: 22px;
  font-weight: 300;
  margin-bottom: var(--space-1);
}

.card-name strong {
  font-weight: 700;
}

.card-desc {
  font-size: 15px;
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
}

.card-muted {
  background: var(--color-bg);
  border: 1px dashed var(--color-border);
  padding: var(--space-4);
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 160px;
}

.card-muted p {
  font-size: 15px;
  color: var(--color-text-muted);
  text-align: center;
}

/* 8. Component: Button */
.btn {
  display: inline-block;
  border: 1.5px solid var(--color-text);
  padding: 10px 24px;
  font-size: 13px;
  font-family: var(--font-base);
  font-weight: 400;
  letter-spacing: 0.06em;
  background: transparent;
  color: var(--color-text);
  border-radius: 0;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.btn:hover {
  background: var(--color-text);
  color: var(--color-bg);
  text-decoration: none;
}

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

.btn-muted:hover {
  background: var(--color-text-muted);
  color: var(--color-bg);
}

/* 9. Component: Feature Grid */
.feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}

.feature-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.feature-symbol {
  font-size: 22px;
  line-height: 1;
  color: var(--color-text-muted);
  margin-bottom: var(--space-1);
}

.feature-title {
  font-size: 15px;
  font-weight: 400;
  color: var(--color-text);
}

.feature-desc {
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* 10. Component: Screenshots Grid */
.screenshots-grid {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  padding-bottom: 16px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.screenshots-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  width: 160px;
  scroll-snap-align: start;
}

.screenshots-img {
  width: 100%;
  max-width: 180px;
  border-radius: 16px;
  display: block;
}

.screenshots-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text);
  margin-top: 12px;
  text-align: center;
}

.screenshots-tagline {
  font-size: 12px;
  font-weight: 400;
  color: var(--color-text-muted);
  margin-top: 4px;
  text-align: center;
  line-height: 1.5;
}

/* 11. Component: Prose (privacy, support pages) */
.prose {
  max-width: 640px;
  margin: 0 auto;
  padding: var(--space-6) var(--space-3);
}

.prose h1 {
  font-size: 28px;
  font-weight: 200;
  margin-bottom: var(--space-1);
}

.prose .prose-date {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
}

.prose h2 {
  font-size: 17px;
  font-weight: 400;
  margin-top: var(--space-5);
  margin-bottom: var(--space-2);
  padding-bottom: var(--space-1);
  border-bottom: 1px solid var(--color-border);
}

.prose p {
  margin-bottom: var(--space-2);
  line-height: 1.75;
}

.prose a {
  color: var(--color-text);
  text-decoration: underline;
}

/* FAQ */
.faq-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

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

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

.faq-question {
  font-size: 15px;
  font-weight: 400;
  color: var(--color-text);
  margin-bottom: var(--space-1);
}

.faq-answer {
  font-size: 15px;
  color: var(--color-text-muted);
  line-height: 1.7;
}

/* 12. Component: Footer */
footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: var(--space-6) 0;
  text-align: center;
}

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

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

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

.footer-links {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a {
  font-size: 13px;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

.footer-links .sep {
  color: var(--color-border);
  font-size: 13px;
}

/* Section heading */
.section-heading {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
}

/* 13. Component: 404 */
.page-404 {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-4);
}

.page-404-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  max-width: 400px;
}

.page-404-logo {
  height: 48px;
  width: auto;
  opacity: 0.4;
}

.page-404 h1 {
  font-size: 36px;
  font-weight: 200;
}

.page-404 p {
  font-size: 15px;
  color: var(--color-text-muted);
}

/* 14. Responsive Overrides */
@media (min-width: 768px) {
  .grid-2 {
    grid-template-columns: 1fr 1fr;
  }

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

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

  .nav-inner {
    flex-wrap: nowrap;
  }

  .screenshots-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 40px;
    justify-items: center;
    overflow-x: visible;
    padding-bottom: 0;
    scroll-snap-type: none;
  }

  .screenshots-item {
    flex-shrink: unset;
    width: auto;
  }

  .screenshots-img {
    max-width: 180px;
    width: 100%;
  }
}

/* 15. Print Styles */
@media print {
  nav,
  footer,
  .hero-actions {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
    font-size: 12pt;
  }

  .container {
    max-width: 100%;
    padding: 0;
  }

  a {
    color: #000;
    text-decoration: underline;
  }

  .card, .card-muted {
    border: 1px solid #ccc;
    break-inside: avoid;
  }

  .prose {
    max-width: 100%;
    padding: 0;
  }
}
