/* Weathered Surfaces Journal — festocomplees.com */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 1.0625rem;
  line-height: 1.75;
  color: #222;
  background-color: #f8f7f3;
  background-image:
    linear-gradient(
      rgba(248, 247, 243, 0.92),
      rgba(248, 247, 243, 0.92)
    ),
    url('../images/background_weathered_surface.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: url('../images/background_light_grain.jpg');
  opacity: 0.05;
  pointer-events: none;
  z-index: -1;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: #222;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

a:hover {
  border-bottom-color: #222;
}

/* Header & Navigation */

.site-header {
  padding: 1.5rem 1.25rem 0;
  max-width: 42rem;
  margin: 0 auto;
}

.site-title {
  font-size: 0.875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 1.25rem;
  font-weight: normal;
  opacity: 0.7;
}

.site-title a {
  border-bottom: none;
}

.site-title a:hover {
  opacity: 1;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid #ccc;
  padding: 0.5rem 0.75rem;
  font-family: Georgia, serif;
  font-size: 0.875rem;
  cursor: pointer;
  color: #222;
  margin-bottom: 1rem;
}

.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
}

.main-nav a {
  font-size: 0.9375rem;
}

.main-nav a.active {
  border-bottom-color: #222;
}

/* Main content */

main {
  max-width: 42rem;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

.fade-in {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

h1 {
  font-size: 1.75rem;
  font-weight: normal;
  line-height: 1.35;
  margin: 0 0 1.5rem;
}

h2 {
  font-size: 1.35rem;
  font-weight: normal;
  margin: 2.75rem 0 1.25rem;
  line-height: 1.4;
}

h3 {
  font-size: 1.125rem;
  font-weight: normal;
  margin: 2rem 0 1rem;
}

p {
  margin: 0 0 1.25rem;
}

.intro {
  font-size: 1.125rem;
  line-height: 1.7;
  margin-bottom: 2rem;
}

.article-intro {
  font-style: italic;
  font-size: 1.0625rem;
  margin-bottom: 2rem;
  opacity: 0.85;
}

/* Photo section */

.photo-section {
  max-width: 56rem;
  margin: 3rem auto;
  padding: 0 1.25rem;
}

.photo-section figure {
  margin: 0;
}

.photo-section img {
  width: 100%;
  border-radius: 6px;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}

.photo-section img.visible {
  opacity: 1;
  transform: translateY(0);
}

.photo-section figcaption {
  margin-top: 0.875rem;
  font-size: 0.9375rem;
  font-style: italic;
  text-align: center;
  opacity: 0.75;
}

/* Dashboard */

.dashboard {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(34, 34, 34, 0.15);
}

.dashboard h2 {
  margin-top: 0;
}

.journal-entry {
  margin-bottom: 0;
  border-bottom: 1px solid rgba(34, 34, 34, 0.1);
}

.journal-entry a {
  display: block;
  padding: 1.25rem 0;
  border-bottom: none;
  transition: padding-left 0.25s ease, opacity 0.25s ease;
}

.journal-entry a:hover {
  padding-left: 0.5rem;
  opacity: 0.75;
  border-bottom: none;
}

.journal-entry .title {
  display: block;
  font-size: 1.0625rem;
  margin-bottom: 0.35rem;
}

.journal-entry .note {
  display: block;
  font-size: 0.9375rem;
  font-style: italic;
  opacity: 0.7;
}

/* Observations list */

.observations-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.observations-list li {
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(34, 34, 34, 0.08);
  font-size: 0.975rem;
  font-style: italic;
  opacity: 0.85;
}

.observations-list li:last-child {
  border-bottom: none;
}

/* Article related */

.related-observations {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(34, 34, 34, 0.15);
}

.related-observations ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.related-observations li {
  margin-bottom: 0.75rem;
}

.return-link {
  margin-top: 2.5rem;
  font-size: 0.9375rem;
}

/* Contact form */

.contact-form {
  margin-top: 2rem;
}

.contact-form label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.9375rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  max-width: 32rem;
  padding: 0.625rem 0.75rem;
  margin-bottom: 1.25rem;
  font-family: Georgia, serif;
  font-size: 1rem;
  border: 1px solid rgba(34, 34, 34, 0.25);
  background: rgba(255, 255, 255, 0.5);
  color: #222;
}

.contact-form button {
  padding: 0.625rem 1.5rem;
  font-family: Georgia, serif;
  font-size: 0.9375rem;
  background: transparent;
  border: 1px solid #222;
  color: #222;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.contact-form button:hover {
  opacity: 0.7;
}

.contact-details {
  margin: 2rem 0;
  line-height: 1.8;
}

.contact-details p {
  margin-bottom: 0.5rem;
}

/* Privacy policy */

.policy-section {
  margin-bottom: 2rem;
}

/* Footer */

.site-footer {
  max-width: 42rem;
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
  border-top: 1px solid rgba(34, 34, 34, 0.12);
  font-size: 0.875rem;
  opacity: 0.65;
  text-align: center;
}

.site-footer p {
  margin: 0.25rem 0;
}

/* Mobile */

@media (max-width: 640px) {
  .nav-toggle {
    display: block;
  }

  .main-nav {
    display: none;
  }

  .main-nav.open {
    display: block;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 0.75rem;
  }

  h1 {
    font-size: 1.5rem;
  }

  body {
    background-attachment: scroll;
  }
}
