/* ============================================
   FamilyTreeMaker.app — Main Stylesheet
   ============================================ */

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

body {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: #1a1a1a;
  background: #fff;
}

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

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* --- Buttons --- */
.btn-primary, .btn-secondary {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.btn-primary {
  background: #2d6a4f;
  color: #fff;
}

.btn-secondary {
  background: transparent;
  border: 2px solid #2d6a4f;
  color: #2d6a4f;
}

/* --- Header --- */
.site-header {
  padding: 1rem 0;
  border-bottom: 1px solid #eee;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-header .logo {
  font-weight: 700;
  font-size: 1.2rem;
  text-decoration: none;
}

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

.site-header nav a {
  text-decoration: none;
  font-size: 0.95rem;
}

/* --- Hero --- */
.hero, .page-hero {
  padding: 4rem 0;
  background: #f6f9f7;
  text-align: center;
}

.hero h1, .page-hero h1 {
  font-size: 2.25rem;
  margin-bottom: 1rem;
}

.hero p, .page-hero p {
  font-size: 1.1rem;
  color: #555;
  margin-bottom: 1.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero .btn-primary, .hero .btn-secondary { margin: 0.25rem; }

/* --- Template Grid --- */
.template-grid { padding: 3rem 0; }
.template-grid h2 { font-size: 1.5rem; margin-bottom: 1.5rem; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

.template-card {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s;
}

.template-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.1); }

.template-card img { width: 100%; }

.template-card h2, .template-card h3 {
  font-size: 1rem;
  padding: 0.75rem 1rem 0.25rem;
}

.template-card p {
  font-size: 0.875rem;
  color: #555;
  padding: 0 1rem 0.75rem;
}

.download-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #2d6a4f;
  padding: 0 1rem 1rem;
}

.view-all {
  display: inline-block;
  margin-top: 1.5rem;
  font-weight: 600;
  color: #2d6a4f;
}

/* --- Lead Banner --- */
.lead-banner {
  background: #2d6a4f;
  color: #fff;
  padding: 3rem 0;
  text-align: center;
}

.lead-banner h2 { font-size: 1.75rem; margin-bottom: 0.75rem; }
.lead-banner p { margin-bottom: 1.5rem; opacity: 0.9; }
.lead-banner .btn-primary {
  background: #fff;
  color: #2d6a4f;
}

/* --- Template Detail Page --- */
.template-page { padding: 3rem 0; }
.template-page .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.template-details h1 { font-size: 1.75rem; margin-bottom: 1rem; }
.template-details p { color: #444; margin-bottom: 1rem; }

.template-meta {
  list-style: none;
  margin-bottom: 1.5rem;
}

.template-meta li {
  font-size: 0.9rem;
  color: #555;
  padding: 0.25rem 0;
  border-bottom: 1px solid #f0f0f0;
}

.btn-download { margin-bottom: 1rem; }
.also-available { font-size: 0.875rem; color: #666; }
.also-available a { color: #2d6a4f; }

.how-to { padding: 3rem 0; background: #f9f9f9; }
.how-to h2 { font-size: 1.4rem; margin-bottom: 1rem; }
.how-to ol { padding-left: 1.5rem; color: #444; }
.how-to ol li { margin-bottom: 0.5rem; }
.how-to p { margin-top: 1rem; font-size: 0.9rem; }
.how-to a { color: #2d6a4f; }

/* --- Lead Capture Page --- */
.lead-page { padding: 4rem 0; }
.lead-page-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.lead-content h1 { font-size: 2rem; margin-bottom: 0.75rem; }
.lead-subtitle { font-size: 1.1rem; color: #444; margin-bottom: 1.5rem; }

.kit-contents {
  padding-left: 1.25rem;
  margin-bottom: 1.5rem;
  color: #333;
}

.kit-contents li { margin-bottom: 0.4rem; }
.kit-note { font-size: 0.875rem; color: #666; }

.lead-form {
  background: #f6f9f7;
  border-radius: 10px;
  padding: 2rem;
}

.lead-form h2 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.lead-form p { font-size: 0.9rem; color: #555; margin-bottom: 1rem; }

.email-form label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.email-form input[type="email"] {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

.email-form .btn-primary { width: 100%; text-align: center; border: none; }
.form-note { font-size: 0.8rem; color: #888; margin-top: 0.5rem; }

/* --- Footer --- */
.site-footer {
  padding: 2rem 0;
  border-top: 1px solid #eee;
  font-size: 0.875rem;
  color: #666;
}

.site-footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.site-footer nav { display: flex; gap: 1.5rem; }
.site-footer nav a { text-decoration: none; }
.site-footer nav a:hover { text-decoration: underline; }

/* --- Responsive --- */
@media (max-width: 768px) {
  .hero h1 { font-size: 1.75rem; }
  .template-page .container,
  .lead-page-inner { grid-template-columns: 1fr; }
  .site-footer .container { flex-direction: column; text-align: center; }
}
