/* ============================================
   NEIGHBORHOOD DIGITAL — TEMPLATE PAGE STYLES
   Shared across all interactive template demos
   ============================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

:root {
  --forest: #1a5c4a;
  --deep: #132e20;
  --teal: #2a9d7f;
  --teal-lt: #5ec4a8;
  --cream: #f7faf8;
  --white: #ffffff;
  --text: #1a2e22;
  --text-lt: #4a6a5a;
  --border: rgba(26,92,74,0.14);
  --font-h: 'Playfair Display', Georgia, serif;
  --font-b: 'Jost', sans-serif;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 8px 40px rgba(26,92,74,0.12);
  --shadow-lg: 0 24px 70px rgba(0,0,0,0.28);
  --trans: 0.3s cubic-bezier(0.25,0.8,0.25,1);
}

body {
  font-family: var(--font-b);
  background: var(--cream);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }

/* ════════ ND NAV (hamburger) ════════ */
.nd-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 1.25rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.4s ease;
}

.nd-nav.scrolled {
  background: rgba(19,46,32,0.97);
  backdrop-filter: blur(20px);
  padding: 0.85rem 2rem;
  box-shadow: 0 2px 24px rgba(0,0,0,0.2);
}

.nd-nav-logo { display: flex; align-items: center; gap: 10px; }
.nd-nav-logo-main { font-family: var(--font-h); font-size: 1.2rem; font-weight: 700; color: var(--white); line-height: 1; }
.nd-nav-logo-sub { font-size: 0.58rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--teal-lt); display: block; margin-top: 3px; }

/* Hamburger */
.nd-burger {
  width: 42px; height: 42px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 6px; cursor: pointer;
  background: none; border: none;
  position: relative; z-index: 1002;
}

.nd-burger span {
  display: block;
  width: 26px; height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.45s cubic-bezier(0.68,-0.3,0.32,1.3), opacity 0.3s;
  transform-origin: center;
}

/* Horizontal bars rotate to vertical formation */
.nd-burger.open span:nth-child(1) { transform: translateY(8px) rotate(90deg); }
.nd-burger.open span:nth-child(2) { transform: rotate(90deg); }
.nd-burger.open span:nth-child(3) { transform: translateY(-8px) rotate(90deg); }

/* Dropdown */
.nd-menu {
  position: fixed;
  top: 72px; right: 2rem;
  background: rgba(19,46,32,0.98);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-lg);
  min-width: 280px;
  padding: 0.75rem;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-12px);
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.25,0.8,0.25,1);
  z-index: 1001;
}

.nd-menu.open { opacity: 1; pointer-events: all; transform: translateY(0); }

.nd-menu-item {
  display: flex; align-items: center; gap: 0.85rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  color: rgba(255,255,255,0.8);
  font-size: 0.92rem; font-weight: 500;
  transition: all 0.22s;
  opacity: 0; transform: translateX(-8px);
}

.nd-menu.open .nd-menu-item { opacity: 1; transform: translateX(0); }
.nd-menu.open .nd-menu-item:nth-child(1) { transition-delay: 0.08s; }
.nd-menu.open .nd-menu-item:nth-child(2) { transition-delay: 0.14s; }
.nd-menu.open .nd-menu-item:nth-child(3) { transition-delay: 0.20s; }
.nd-menu.open .nd-menu-item:nth-child(4) { transition-delay: 0.26s; }

.nd-menu-item:hover { background: rgba(42,157,127,0.15); color: var(--white); }
.nd-menu-item svg { color: var(--teal-lt); flex-shrink: 0; }

.nd-menu-sub {
  padding: 0.4rem 1rem 0.6rem;
  font-size: 0.62rem; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: rgba(255,255,255,0.28);
  opacity: 0; transition: opacity 0.4s ease 0.2s;
}
.nd-menu.open .nd-menu-sub { opacity: 1; }

.nd-menu-nested {
  display: flex; flex-direction: column;
  gap: 2px; padding-left: 0.5rem;
}

.nd-menu-nested a {
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.6rem 1rem; border-radius: 8px;
  font-size: 0.85rem; color: rgba(255,255,255,0.62);
  transition: all 0.2s;
  opacity: 0; transform: translateX(-8px);
}
.nd-menu.open .nd-menu-nested a { opacity: 1; transform: translateX(0); }
.nd-menu.open .nd-menu-nested a:nth-child(1) { transition-delay: 0.24s; }
.nd-menu.open .nd-menu-nested a:nth-child(2) { transition-delay: 0.29s; }
.nd-menu.open .nd-menu-nested a:nth-child(3) { transition-delay: 0.34s; }
.nd-menu.open .nd-menu-nested a:nth-child(4) { transition-delay: 0.39s; }

.nd-menu-nested a:hover { background: rgba(255,255,255,0.06); color: var(--white); }
.nd-menu-nested a span.dot { width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; }

.nd-menu-divider { height: 1px; background: rgba(255,255,255,0.08); margin: 0.5rem 0.75rem; }

/* ════════ TEMPLATE PAGE HERO ════════ */
.tpl-hero {
  padding: 8rem 2rem 3rem;
  background: linear-gradient(150deg, var(--deep) 0%, var(--forest) 55%, #1e7a5e 100%);
  position: relative; overflow: hidden;
}
.tpl-hero::before {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 32px 32px;
}
.tpl-hero-inner { max-width: 1150px; margin: 0 auto; position: relative; z-index: 2; }

.tpl-back {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.78rem; color: rgba(255,255,255,0.55);
  margin-bottom: 1.5rem; transition: color 0.25s;
}
.tpl-back:hover { color: var(--teal-lt); }

.tpl-tag {
  display: inline-block; font-size: 0.66rem; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase;
  padding: 0.3rem 0.9rem; border-radius: 50px;
  margin-bottom: 0.85rem;
}

.tpl-hero h1 {
  font-family: var(--font-h); font-size: clamp(1.9rem,3.5vw,2.8rem);
  font-weight: 700; color: var(--white); line-height: 1.15; margin-bottom: 0.6rem;
}
.tpl-hero p { color: rgba(255,255,255,0.6); font-size: 0.95rem; max-width: 560px; font-weight: 300; }

.tpl-hint {
  display: inline-flex; align-items: center; gap: 0.5rem;
  margin-top: 1.5rem; background: rgba(42,157,127,0.15);
  border: 1px solid rgba(42,157,127,0.35);
  color: var(--teal-lt); font-size: 0.76rem; font-weight: 500;
  padding: 0.5rem 1rem; border-radius: 50px;
}

/* ════════ BROWSER MOCKUP ════════ */
.browser-wrap { max-width: 1150px; margin: -1rem auto 0; padding: 0 2rem 4rem; }

.browser {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: var(--white);
}

.browser-chrome {
  background: #e8e8e8;
  padding: 0.65rem 1rem;
  display: flex; align-items: center; gap: 0.5rem;
}
.chrome-dot { width: 11px; height: 11px; border-radius: 50%; }
.chrome-dot.r { background: #ff5f56; }
.chrome-dot.y { background: #ffbd2e; }
.chrome-dot.g { background: #27c93f; }
.chrome-url {
  flex: 1; background: var(--white); border-radius: 6px;
  padding: 0.3rem 0.85rem; font-size: 0.72rem;
  color: #777; margin-left: 0.6rem; font-family: monospace;
  display: flex; align-items: center; gap: 0.4rem;
}
.chrome-url svg { color: #27c93f; flex-shrink: 0; }

/* Demo viewport */
.demo-viewport { position: relative; min-height: 560px; }

.demo-page { display: none; animation: pageIn 0.4s ease; }
.demo-page.active { display: block; }

@keyframes pageIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Demo internal nav — the clickable tabs */
.demo-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem 2rem; flex-wrap: wrap; gap: 1rem;
}
.demo-nav-logo { font-family: var(--font-h); font-size: 1.3rem; font-weight: 700; }
.demo-nav-links { display: flex; gap: 0.35rem; flex-wrap: wrap; }

.demo-tab {
  font-size: 0.76rem; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 0.45rem 0.95rem; border-radius: 50px;
  cursor: pointer; transition: all 0.25s;
  border: 1px solid transparent;
  background: none; font-family: var(--font-b);
}

/* ════════ BELOW-MOCKUP INFO ════════ */
.tpl-info { background: var(--white); padding: 4rem 2rem; }
.tpl-info-inner { max-width: 1150px; margin: 0 auto; }

.tpl-info-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 4rem; align-items: start; }

.tpl-section-label {
  font-size: 0.66rem; font-weight: 700; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--teal); display: block; margin-bottom: 0.6rem;
}
.tpl-info h2 { font-family: var(--font-h); font-size: 1.9rem; color: var(--forest); margin-bottom: 0.85rem; }
.tpl-info p { color: var(--text-lt); font-size: 0.95rem; line-height: 1.8; font-weight: 300; }

.tpl-features { display: grid; grid-template-columns: 1fr 1fr; gap: 0.85rem; margin-top: 1.75rem; }
.tpl-feature {
  display: flex; align-items: flex-start; gap: 0.65rem;
  font-size: 0.87rem; color: var(--text-lt);
}
.tpl-feature-check {
  width: 19px; height: 19px; border-radius: 50%;
  background: rgba(42,157,127,0.12); color: var(--teal);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 3px;
}

.tpl-cta-card {
  background: var(--forest);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  color: var(--white);
  position: relative; overflow: hidden;
}
.tpl-cta-card::before {
  content: ''; position: absolute; top: -40px; right: -40px;
  width: 180px; height: 180px;
  background: radial-gradient(circle, rgba(42,157,127,0.3) 0%, transparent 70%);
}
.tpl-cta-card h3 { font-family: var(--font-h); font-size: 1.35rem; margin-bottom: 0.6rem; position: relative; z-index: 1; }
.tpl-cta-card p { color: rgba(255,255,255,0.6); font-size: 0.88rem; margin-bottom: 1.5rem; position: relative; z-index: 1; }

.tpl-price { display: flex; align-items: baseline; gap: 0.5rem; margin-bottom: 1.5rem; position: relative; z-index: 1; }
.tpl-price-num { font-family: var(--font-h); font-size: 2.4rem; font-weight: 700; color: var(--teal-lt); line-height: 1; }
.tpl-price-lbl { font-size: 0.78rem; color: rgba(255,255,255,0.45); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-family: var(--font-b); font-size: 0.88rem; font-weight: 500;
  padding: 0.85rem 1.8rem; border-radius: 50px; border: none;
  cursor: pointer; transition: var(--trans); position: relative; z-index: 1;
}
.btn-teal { background: var(--teal); color: var(--white); box-shadow: 0 4px 20px rgba(42,157,127,0.35); width: 100%; }
.btn-teal:hover { background: var(--teal-lt); transform: translateY(-2px); }
.btn-ghost {
  background: rgba(255,255,255,0.08); color: var(--white);
  border: 1px solid rgba(255,255,255,0.18); width: 100%; margin-top: 0.6rem;
}
.btn-ghost:hover { background: rgba(255,255,255,0.14); }

/* Other templates strip */
.other-tpls { background: var(--cream); padding: 4rem 2rem; }
.other-tpls-inner { max-width: 1150px; margin: 0 auto; }
.other-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1rem; margin-top: 2rem; }
.other-card {
  background: var(--white); border-radius: var(--radius);
  padding: 1.4rem; border: 1px solid var(--border);
  transition: var(--trans); display: flex; align-items: center; gap: 1rem;
}
.other-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: rgba(42,157,127,0.3); }
.other-card-icon { font-size: 1.5rem; flex-shrink: 0; }
.other-card-name { font-family: var(--font-h); font-size: 1rem; color: var(--forest); }
.other-card-cat { font-size: 0.72rem; color: var(--text-lt); }

/* Footer */
.nd-footer { background: var(--deep); padding: 2.5rem 2rem; text-align: center; }
.nd-footer-logo { font-family: var(--font-h); font-size: 1.15rem; font-weight: 700; color: var(--white); margin-bottom: 0.4rem; }
.nd-footer p { font-size: 0.78rem; color: rgba(255,255,255,0.3); }

/* Responsive */
@media (max-width: 900px) {
  .tpl-info-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .other-grid { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .browser-wrap { padding: 0 1rem 3rem; }
  .tpl-hero { padding: 7rem 1.25rem 3rem; }
  .demo-nav { padding: 1rem 1.25rem; }
  .demo-nav-links { gap: 0.25rem; }
  .demo-tab { font-size: 0.68rem; padding: 0.35rem 0.7rem; }
  .tpl-features { grid-template-columns: 1fr; }
  .nd-menu { right: 1rem; left: 1rem; min-width: auto; }
  .tpl-info { padding: 3rem 1.25rem; }
  .other-tpls { padding: 3rem 1.25rem; }
}
