/* =========================================
   Dad's Guide to Minecraft — Static Site
   Dark Minecraft-inspired theme
   ========================================= */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:         #0d0d0d;
  --surface:    #1a1a1a;
  --surface2:   #222222;
  --border:     #2e2e2e;
  --green:      #4caf50;
  --green-dark: #388e3c;
  --green-glow: #66bb6a;
  --grey:       #9e9e9e;
  --grey-light: #bdbdbd;
  --text:       #e0e0e0;
  --text-dim:   #888;
  --accent:     #5dde60;
  --dirt:       #5c3d1e;
  --stone:      #555;
  --font-pixel: 'Courier New', Courier, monospace;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
}

/* ---- HEADER / NAV ---- */
header {
  background: var(--surface);
  border-bottom: 3px solid var(--green-dark);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 20px rgba(76,175,80,0.15);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 1rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  font-family: var(--font-pixel);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--green-glow);
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.nav-logo .logo-icon {
  width: 36px;
  height: 36px;
  background: var(--green-dark);
  border: 2px solid var(--green);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

nav a {
  color: var(--grey-light);
  text-decoration: none;
  padding: 0.4rem 0.85rem;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

nav a:hover, nav a.active {
  background: var(--surface2);
  color: var(--green-glow);
}

nav a.store-link {
  background: var(--green-dark);
  color: #fff;
  border: 1px solid var(--green);
}

nav a.store-link:hover {
  background: var(--green);
  color: #000;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.4rem 0.6rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1.1rem;
}

/* ---- HERO ---- */
.hero {
  background: linear-gradient(135deg, #0a1a0a 0%, #111 50%, #0d1a0d 100%);
  border-bottom: 3px solid var(--green-dark);
  padding: 4rem 1.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(0deg, transparent, transparent 31px, rgba(76,175,80,0.04) 31px, rgba(76,175,80,0.04) 32px),
    repeating-linear-gradient(90deg, transparent, transparent 31px, rgba(76,175,80,0.04) 31px, rgba(76,175,80,0.04) 32px);
  pointer-events: none;
}

.hero-content { position: relative; z-index: 1; max-width: 700px; margin: 0 auto; }

.hero h1 {
  font-family: var(--font-pixel);
  font-size: clamp(1.8rem, 5vw, 3rem);
  color: var(--green-glow);
  text-shadow: 0 0 30px rgba(76,175,80,0.4);
  margin-bottom: 1rem;
  line-height: 1.2;
}

.hero p {
  color: var(--grey-light);
  font-size: 1.1rem;
  max-width: 540px;
  margin: 0 auto;
}

/* ---- PAGE HEADER (non-homepage) ---- */
.page-header {
  background: linear-gradient(135deg, #0a1a0a, #111);
  border-bottom: 3px solid var(--green-dark);
  padding: 3rem 1.5rem;
}

.page-header-inner { max-width: 900px; margin: 0 auto; }

.page-header h1 {
  font-family: var(--font-pixel);
  font-size: clamp(1.4rem, 4vw, 2.2rem);
  color: var(--green-glow);
  line-height: 1.25;
  margin-bottom: 0.5rem;
}

.page-header .breadcrumb {
  color: var(--text-dim);
  font-size: 0.85rem;
}

.page-header .breadcrumb a { color: var(--green); text-decoration: none; }
.page-header .breadcrumb a:hover { text-decoration: underline; }

/* ---- MAIN CONTENT ---- */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}

/* ---- CARD GRID ---- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  text-decoration: none;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(76,175,80,0.2);
  border-color: var(--green-dark);
}

.card-thumb {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: #111;
}

.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}

.card:hover .card-thumb img { transform: scale(1.04); }

.card-thumb .play-badge {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: rgba(76,175,80,0.9);
  color: #000;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.card-body {
  padding: 1rem 1.2rem 1.2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
}

.card-excerpt {
  font-size: 0.82rem;
  color: var(--text-dim);
  line-height: 1.5;
  flex: 1;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--green-glow);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  margin-top: auto;
  padding-top: 0.5rem;
}

.card-link:hover { color: var(--accent); }
.card-link::after { content: '→'; }

/* ---- VIDEO PAGE ---- */
.video-layout {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.video-wrap {
  background: #000;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
}

.video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.yt-fallback {
  margin-top: 0.6rem;
  text-align: center;
  font-size: 0.85rem;
}
.yt-fallback a {
  color: var(--green);
  font-weight: 600;
  text-decoration: none;
}
.yt-fallback a:hover { text-decoration: underline; }
.yt-fallback-note {
  margin-left: 0.4rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.video-meta {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem 1.75rem;
}

.video-meta h2 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--green-glow);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
  font-family: var(--font-pixel);
}

.video-meta p {
  color: var(--grey-light);
  line-height: 1.7;
  font-size: 0.95rem;
}

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.4rem;
  border-radius: 5px;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: background 0.15s, transform 0.1s;
}

.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--green-dark);
  color: #fff;
  border: 1px solid var(--green);
}

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

.btn-outline {
  background: transparent;
  color: var(--green-glow);
  border: 1px solid var(--green);
}

.btn-outline:hover { background: var(--green-dark); color: #fff; }

.btn-large {
  padding: 1rem 2rem;
  font-size: 1.1rem;
}

.btn-xl {
  padding: 1.2rem 2.5rem;
  font-size: 1.25rem;
}

/* ---- STORE PAGE ---- */
.store-hero {
  text-align: center;
  padding: 4rem 1rem;
  max-width: 700px;
  margin: 0 auto;
}

.store-hero .store-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  display: block;
}

.store-hero h2 {
  font-family: var(--font-pixel);
  font-size: clamp(1.4rem, 4vw, 2rem);
  color: var(--green-glow);
  margin-bottom: 1rem;
}

.store-hero p {
  color: var(--grey-light);
  font-size: 1.05rem;
  margin-bottom: 2rem;
  line-height: 1.7;
}

.store-external-note {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: var(--text-dim);
  margin-top: 0.75rem;
}

.store-items-preview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-top: 3rem;
}

.store-item-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--grey-light);
}

.store-item-card .item-icon { font-size: 2.5rem; display: block; margin-bottom: 0.75rem; }

/* ---- ABOUT / CONTACT ---- */
.content-page {
  max-width: 760px;
  margin: 0 auto;
}

.content-page h2 {
  font-family: var(--font-pixel);
  font-size: 1.3rem;
  color: var(--green-glow);
  margin: 2rem 0 0.75rem;
}

.content-page h2:first-child { margin-top: 0; }

.content-page p {
  color: var(--grey-light);
  line-height: 1.75;
  margin-bottom: 1rem;
  font-size: 0.975rem;
}

.content-page ul {
  color: var(--grey-light);
  padding-left: 1.5rem;
  margin-bottom: 1rem;
  line-height: 1.75;
}

/* ---- CONTACT FORM ---- */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 2rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--grey-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-group input,
.form-group textarea {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--text);
  font-size: 0.95rem;
  padding: 0.65rem 0.9rem;
  font-family: inherit;
  transition: border-color 0.15s;
  width: 100%;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 2px rgba(76,175,80,0.15);
}

.form-group textarea { resize: vertical; min-height: 140px; }

/* ---- PDF DOWNLOAD SECTION ---- */
.download-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--green);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.download-section .dl-info h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.2rem;
}

.download-section .dl-info p {
  font-size: 0.82rem;
  color: var(--text-dim);
}

/* ---- NO VIDEO NOTICE ---- */
.no-video-notice {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
  color: var(--text-dim);
}

.no-video-notice .notice-icon { font-size: 2.5rem; display: block; margin-bottom: 0.75rem; }

/* ---- FOOTER ---- */
footer {
  background: var(--surface);
  border-top: 2px solid var(--border);
  padding: 2.5rem 1.5rem;
  text-align: center;
  margin-top: 4rem;
}

.footer-inner { max-width: 700px; margin: 0 auto; }

footer .logo-text {
  font-family: var(--font-pixel);
  color: var(--green-glow);
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

footer p {
  color: var(--text-dim);
  font-size: 0.82rem;
  line-height: 1.6;
}

footer nav { justify-content: center; margin-top: 1rem; flex-wrap: wrap; }

/* ---- DIVIDER ---- */
.section-label {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  color: var(--text-dim);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.section-label::before,
.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
  .nav-toggle { display: block; }
  nav { display: none; flex-direction: column; gap: 0; }
  nav.open {
    display: flex;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 2px solid var(--border);
    padding: 0.75rem;
    z-index: 99;
  }
  nav a { padding: 0.6rem 1rem; border-radius: 4px; }
  header { position: sticky; }
  .form-row { grid-template-columns: 1fr; }
  .download-section { flex-direction: column; align-items: flex-start; }
  .store-hero { padding: 2rem 0.5rem; }
}

@media (max-width: 500px) {
  main { padding: 1.5rem 1rem; }
  .grid { grid-template-columns: 1fr; }
}

/* ---- MINECRAFT PIXEL TOUCHES ---- */
.pixel-border {
  image-rendering: pixelated;
  border: 2px solid var(--green-dark);
  box-shadow: inset 0 0 0 2px #000, 0 0 0 2px #000;
}

.tag {
  display: inline-block;
  background: var(--surface2);
  color: var(--green);
  border: 1px solid var(--green-dark);
  border-radius: 3px;
  font-size: 0.72rem;
  padding: 0.15rem 0.5rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
