/* Grid’s End — Enhanced visual style */

:root {
  --bg: #0f1410;
  --surface: #1a211c;
  --surface-2: #242c26;
  --text: #f2f0eb;
  --text-muted: #a8b0a6;
  --accent: #6b9e7a;
  --accent-hover: #7db38c;
  --border: #2e3830;
  --shadow: 0 4px 24px rgba(0,0,0,0.3);
  --radius: 12px;
  --max: 1180px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 17px;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

nav {
  background: rgba(15,20,16,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo { font-weight: 600; font-size: 1.2rem; color: var(--text); letter-spacing: -0.02em; }
.nav-links { display: flex; gap: 1.75rem; }
.nav-links a { color: var(--text-muted); font-size: 0.95rem; }
.nav-links a:hover { color: var(--text); }

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

/* Hero with background */
.hero {
  position: relative;
  min-height: 65vh;
  display: flex;
  align-items: center;
  color: white;
  text-align: center;
  padding: 6rem 1.5rem;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
  z-index: 0;
}
.hero-bg.active { opacity: 1; }
.hero .container { position: relative; z-index: 1; }
.hero h1 {
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 650;
  margin-bottom: 1.25rem;
  max-width: 16ch;
  margin-left: auto;
  margin-right: auto;
}
.hero p.sub {
  font-size: 1.25rem;
  color: #e8e6e1;
  max-width: 36rem;
  margin: 0 auto 2.25rem;
}
.cta-row { display: flex; gap: 0.85rem; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 0.85rem 1.7rem;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-primary { background: var(--accent); color: #0f1410; }
.btn-primary:hover { background: var(--accent-hover); text-decoration: none; }
.btn-secondary { background: transparent; color: white; border: 1px solid rgba(255,255,255,0.3); }
.btn-secondary:hover { background: rgba(255,255,255,0.1); text-decoration: none; }

/* Image grid section */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin: 3rem 0;
}
.gallery-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16/10;
  box-shadow: var(--shadow);
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item .caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  color: white;
  padding: 1.5rem 1rem 1rem;
  font-size: 0.95rem;
  font-weight: 500;
}

/* Features */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}
.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: border-color 0.2s;
}
.feature:hover { border-color: var(--accent); }
.feature h3 { font-size: 1.1rem; margin-bottom: 0.6rem; font-weight: 600; }
.feature p { color: var(--text-muted); font-size: 0.95rem; }

/* Checklist (adapted for dark) */
.checklist-page { padding: 4.5rem 0 5rem; }
.checklist-page h1 { font-size: 2.4rem; letter-spacing: -0.02em; margin-bottom: 0.6rem; }
.checklist-page .lead { color: var(--text-muted); margin-bottom: 2.5rem; max-width: 40rem; }
.category {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem 1.8rem;
  margin-bottom: 1.25rem;
}
.category h2 { font-size: 1.15rem; font-weight: 600; margin-bottom: 1rem; color: var(--accent); }
.item {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
}
.item:last-child { border-bottom: none; }
.item input[type="checkbox"] {
  margin-top: 0.3rem;
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  flex-shrink: 0;
}
.item label { cursor: pointer; }
.submit-area { margin-top: 2rem; }
.form-field {
  margin-bottom: 1rem;
}
.form-field label {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 0.35rem;
  color: var(--text);
}
.form-field input,
.form-field textarea {
  width: 100%;
  padding: 0.65rem 0.8rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
}
.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.submit-area .btn { margin-top: 0.5rem; }
.note { font-size: 0.9rem; color: var(--text-muted); margin-top: 0.75rem; }
#results {
  display: none;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.8rem;
  margin-top: 2rem;
}
#results h3 { margin-bottom: 1rem; }
#results ul { margin: 0.5rem 0 1.25rem 1.25rem; color: var(--text-muted); }
#results .next { margin-top: 1rem; }

footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  background: var(--surface);
}
footer a { color: var(--text-muted); }

@media (max-width: 640px) {
  .hero { min-height: 70vh; padding: 4rem 1rem; }
  .nav-links { gap: 1rem; }
}