/* ========================================
   Neighborhood Reflection Journal
   spwdayoworce.online
   ======================================== */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.125rem;
  line-height: 1.8;
  color: #222222;
  background-color: #f7f5f2;
  background-image:
    linear-gradient(
      rgba(247, 245, 242, 0.87),
      rgba(247, 245, 242, 0.87)
    ),
    url('../images/background_evening_suburb.jpg');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: url('../images/background_paper_texture.jpg');
  opacity: 0.05;
  pointer-events: none;
  z-index: -1;
}

/* ---- Typography ---- */

h1, h2, h3, h4 {
  font-weight: normal;
  line-height: 1.35;
  color: #222222;
}

h1 {
  font-size: 2.25rem;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 1.75rem;
  margin-bottom: 1.25rem;
  margin-top: 2.5rem;
  color: #333333;
}

h3 {
  font-size: 1.35rem;
  margin-bottom: 0.75rem;
}

p {
  margin-bottom: 1.25rem;
}

a {
  color: #91A5B2;
  text-decoration: none;
  background-image: linear-gradient(#91A5B2, #91A5B2);
  background-size: 0% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size 0.35s ease, color 0.25s ease;
}

a:hover {
  color: #6d8494;
  background-size: 100% 1px;
}

em, .intro-italic {
  font-style: italic;
  color: #444444;
}

/* ---- Layout Wrappers ---- */

.page-wrapper,
.article-container,
.contact-container,
.blog-card,
.privacy-container {
  background: rgba(255, 255, 255, 0.76);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 20px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

.page-wrapper {
  max-width: 820px;
  margin: 2rem auto 4rem;
  padding: 3rem 3.5rem;
}

.article-container {
  max-width: 720px;
  margin: 2rem auto 4rem;
  padding: 3rem 3.5rem;
}

.contact-container,
.privacy-container {
  max-width: 720px;
  margin: 2rem auto 4rem;
  padding: 3rem 3.5rem;
}

/* ---- Navigation ---- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(145, 165, 178, 0.2);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.04);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo {
  font-size: 1.1rem;
  letter-spacing: 0.04em;
  color: #222222;
  background-image: none;
  font-style: italic;
}

.site-logo:hover {
  color: #91A5B2;
  background-image: none;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-menu a {
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  text-transform: capitalize;
  color: #444444;
}

.nav-menu a.active,
.nav-menu a:hover {
  color: #91A5B2;
}

/* Hamburger */

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #222222;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---- Homepage Sections ---- */

.home-section {
  margin-bottom: 3rem;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.home-section.visible {
  opacity: 1;
  transform: translateY(0);
}

.home-section:first-of-type {
  margin-top: 0;
}

.section-divider {
  border: none;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(145, 165, 178, 0.4), transparent);
  margin: 3rem 0;
}

/* ---- Blog Dashboard ---- */

.blog-dashboard {
  margin-top: 4rem;
  padding-top: 2rem;
}

.blog-dashboard h2 {
  text-align: center;
  margin-bottom: 2.5rem;
  font-style: italic;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.75rem;
}

.blog-card {
  padding: 1.75rem;
  transition: transform 0.35s ease, box-shadow 0.35s ease, background 0.35s ease;
  display: block;
  color: inherit;
  background-image: none;
}

.blog-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.88);
  color: inherit;
}

.blog-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
  color: #222222;
}

.blog-card .excerpt {
  font-size: 0.95rem;
  color: #555555;
  line-height: 1.65;
  margin-bottom: 0;
}

.blog-card .read-more {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #91A5B2;
}

/* ---- Article Pages ---- */

.article-header {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(145, 165, 178, 0.25);
}

.article-intro {
  font-size: 1.15rem;
  font-style: italic;
  color: #555555;
  margin-top: 1rem;
  line-height: 1.7;
}

.article-body p {
  text-align: left;
}

.related-stories {
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(145, 165, 178, 0.25);
}

.related-stories h2 {
  font-size: 1.4rem;
  margin-top: 0;
  margin-bottom: 1.25rem;
}

.related-stories ul {
  list-style: none;
  margin-bottom: 2rem;
}

.related-stories li {
  margin-bottom: 0.75rem;
}

.return-home {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.75rem 1.5rem;
  border: 1px solid rgba(145, 165, 178, 0.5);
  border-radius: 30px;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.return-home:hover {
  background: rgba(145, 165, 178, 0.12);
  border-color: #91A5B2;
  background-image: none;
}

/* ---- Contact Page ---- */

.contact-details {
  margin: 2rem 0;
  padding: 1.5rem 2rem;
  background: rgba(145, 165, 178, 0.08);
  border-radius: 12px;
  border-left: 3px solid #91A5B2;
}

.contact-details p {
  margin-bottom: 0.5rem;
}

.contact-form {
  margin-top: 2.5rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
  color: #444444;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  font-family: Georgia, serif;
  font-size: 1rem;
  border: 1px solid rgba(145, 165, 178, 0.4);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.6);
  color: #222222;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #91A5B2;
  box-shadow: 0 0 0 3px rgba(145, 165, 178, 0.15);
}

.form-group textarea {
  min-height: 140px;
  resize: vertical;
}

.btn-submit {
  display: inline-block;
  padding: 0.85rem 2rem;
  font-family: Georgia, serif;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  color: #222222;
  background: rgba(145, 165, 178, 0.2);
  border: 1px solid rgba(145, 165, 178, 0.5);
  border-radius: 30px;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
}

.btn-submit:hover {
  background: rgba(145, 165, 178, 0.35);
  transform: translateY(-2px);
}

/* ---- Privacy Policy ---- */

.privacy-container h2 {
  margin-top: 2rem;
}

.privacy-container h2:first-of-type {
  margin-top: 1.5rem;
}

/* ---- Footer ---- */

.site-footer {
  text-align: center;
  padding: 2rem;
  font-size: 0.85rem;
  color: #666666;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(8px);
}

.site-footer a {
  color: #91A5B2;
}

/* ---- Fade-in utility ---- */

.fade-in {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Responsive ---- */

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    flex-direction: column;
    align-items: center;
    padding: 2rem 0;
    gap: 1.5rem;
    transform: translateY(-120%);
    opacity: 0;
    transition: transform 0.35s ease, opacity 0.35s ease;
    border-bottom: 1px solid rgba(145, 165, 178, 0.2);
  }

  .nav-menu.open {
    transform: translateY(0);
    opacity: 1;
  }

  .page-wrapper,
  .article-container,
  .contact-container,
  .privacy-container {
    margin: 1rem;
    padding: 2rem 1.5rem;
  }

  h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.45rem;
  }

  .blog-grid {
    grid-template-columns: 1fr;
  }

  body {
    background-attachment: scroll;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 1.05rem;
  }

  .page-wrapper,
  .article-container,
  .contact-container,
  .privacy-container {
    padding: 1.5rem 1.25rem;
    border-radius: 14px;
  }
}
