/* Unwanted Presence Diary — custom styles, no frameworks */

*,
*::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.7;
  color: #2c2a26;
  background-color: #f7f5f1;
  background-image:
    linear-gradient(rgba(247, 245, 241, 0.9), rgba(247, 245, 241, 0.9)),
    url("../../background_presence_soft.jpg");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  min-height: 100vh;
}

a {
  color: #4a453c;
  text-decoration-color: rgba(74, 69, 60, 0.35);
  text-underline-offset: 3px;
}

a:hover {
  color: #1f1d1a;
  text-decoration-color: rgba(31, 29, 26, 0.55);
}

.site-header {
  border-bottom: 1px solid rgba(44, 42, 38, 0.12);
  background: rgba(247, 245, 241, 0.82);
  backdrop-filter: blur(6px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header__inner {
  max-width: 46rem;
  margin: 0 auto;
  padding: 1rem 1.25rem 1.1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
}

.site-title {
  font-size: 1rem;
  font-weight: normal;
  letter-spacing: 0.02em;
  margin: 0;
}

.site-title a {
  color: inherit;
  text-decoration: none;
}

.site-title a:hover {
  text-decoration: underline;
  text-decoration-color: rgba(44, 42, 38, 0.25);
}

.nav-toggle {
  display: none;
  border: 1px solid rgba(44, 42, 38, 0.2);
  background: rgba(255, 255, 255, 0.35);
  color: #2c2a26;
  font-family: inherit;
  font-size: 0.85rem;
  padding: 0.4rem 0.65rem;
  cursor: pointer;
  border-radius: 2px;
}

.nav-toggle:focus-visible {
  outline: 2px solid rgba(44, 42, 38, 0.35);
  outline-offset: 2px;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.15rem;
}

.site-nav a {
  font-size: 0.9rem;
  letter-spacing: 0.03em;
  text-transform: lowercase;
}

main {
  max-width: 46rem;
  margin: 0 auto;
  padding: 2.25rem 1.25rem 3.5rem;
}

.fade-in {
  opacity: 1;
  transform: none;
}

html.js .fade-in {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

html.js .fade-in.fade-in--visible {
  opacity: 1;
  transform: translateY(0);
}

.page-intro {
  margin-bottom: 2.5rem;
}

.page-intro h1 {
  font-size: clamp(1.35rem, 4vw, 1.85rem);
  font-weight: normal;
  line-height: 1.35;
  margin: 0 0 1rem;
  letter-spacing: -0.01em;
  color: #222018;
}

.page-intro .lede,
.lede {
  font-size: 1.02rem;
  color: #3d3a34;
  margin: 0;
}

.article-meta {
  font-size: 0.88rem;
  color: #5c574e;
  font-style: italic;
  margin: 0 0 1.75rem;
  border-left: 2px solid rgba(44, 42, 38, 0.15);
  padding-left: 1rem;
}

section.diary-section {
  margin-bottom: 2.75rem;
}

section.diary-section h2 {
  font-size: 1.15rem;
  font-weight: normal;
  margin: 0 0 1rem;
  color: #2a2823;
  letter-spacing: 0.01em;
}

section.diary-section p {
  margin: 0 0 1rem;
}

section.diary-section p:last-child {
  margin-bottom: 0;
}

.divider {
  border: 0;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    rgba(44, 42, 38, 0.12) 15%,
    rgba(44, 42, 38, 0.12) 85%,
    transparent
  );
  margin: 2.5rem 0;
}

.divider--tight {
  margin: 1.75rem 0;
}

.note-block {
  margin: 2rem 0;
  padding: 1.25rem 1.35rem 1.35rem;
  background: rgba(255, 255, 255, 0.38);
  border: 1px solid rgba(44, 42, 38, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
  border-radius: 2px;
}

.note-block h2 {
  font-size: 0.95rem;
  font-weight: normal;
  text-transform: lowercase;
  letter-spacing: 0.06em;
  margin: 0 0 1rem;
  color: #4a453c;
}

.note-block ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.note-block li {
  position: relative;
  padding-left: 1rem;
  margin-bottom: 0.65rem;
  font-size: 0.98rem;
  color: #3a3832;
  line-height: 1.55;
}

.note-block li:last-child {
  margin-bottom: 0;
}

.note-block li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 4px;
  height: 1px;
  background: rgba(44, 42, 38, 0.22);
}

.contact-note {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(44, 42, 38, 0.1);
  font-size: 0.92rem;
  color: #4d4940;
  line-height: 1.65;
}

.contact-note p {
  margin: 0 0 0.5rem;
}

.contact-note a {
  font-size: inherit;
}

.index-toc {
  margin: 2.5rem 0 0;
  padding: 1.5rem 1.25rem;
  background: rgba(255, 255, 255, 0.28);
  border: 1px solid rgba(44, 42, 38, 0.07);
}

.index-toc h2 {
  font-size: 1rem;
  font-weight: normal;
  margin: 0 0 1.25rem;
  color: #3a3832;
}

.index-toc__group {
  margin-bottom: 1.5rem;
}

.index-toc__group:last-child {
  margin-bottom: 0;
}

.index-toc__group h3 {
  font-size: 0.8rem;
  font-weight: normal;
  text-transform: lowercase;
  letter-spacing: 0.12em;
  color: #6a655a;
  margin: 0 0 0.5rem;
}

.index-toc__group ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.index-toc__group li {
  margin-bottom: 0.35rem;
}

.index-toc__group a {
  font-size: 0.95rem;
}

.site-footer {
  max-width: 46rem;
  margin: 0 auto;
  padding: 2rem 1.25rem 2.5rem;
  border-top: 1px solid rgba(44, 42, 38, 0.1);
  font-size: 0.88rem;
  color: #5a564d;
}

.site-footer__nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
}

.site-footer p {
  margin: 0.35rem 0;
}

.article-back {
  margin-bottom: 1.75rem;
  font-size: 0.9rem;
}

.contact-page h1,
.legal-page h1 {
  font-size: 1.55rem;
  font-weight: normal;
  margin: 0 0 1rem;
}

.contact-page .contact-details,
.legal-page section {
  margin-bottom: 1.75rem;
}

.contact-page .contact-details p,
.legal-page section p {
  margin: 0 0 0.65rem;
}

.legal-page h2 {
  font-size: 1.05rem;
  font-weight: normal;
  margin: 2rem 0 0.65rem;
  color: #2c2a26;
}

.legal-page h2:first-of-type {
  margin-top: 0;
}

.form-disclaimer {
  font-size: 0.88rem;
  color: #5a564d;
  margin-bottom: 1rem;
}

.simple-form {
  margin-top: 2rem;
  max-width: 22rem;
}

.simple-form label {
  display: block;
  font-size: 0.88rem;
  margin-bottom: 0.35rem;
  color: #4a453c;
}

.simple-form input,
.simple-form textarea {
  width: 100%;
  margin-bottom: 1rem;
  padding: 0.5rem 0.55rem;
  font-family: inherit;
  font-size: 0.95rem;
  border: 1px solid rgba(44, 42, 38, 0.18);
  background: rgba(255, 255, 255, 0.55);
  border-radius: 2px;
}

.simple-form textarea {
  min-height: 6rem;
  resize: vertical;
}

.simple-form button {
  font-family: inherit;
  font-size: 0.9rem;
  padding: 0.45rem 0.9rem;
  border: 1px solid rgba(44, 42, 38, 0.22);
  background: rgba(255, 255, 255, 0.5);
  color: #2c2a26;
  cursor: pointer;
  border-radius: 2px;
}

.simple-form button:hover {
  background: rgba(255, 255, 255, 0.75);
}

article.essay {
  margin-bottom: 2rem;
}

article.essay h1 {
  font-size: clamp(1.35rem, 3.5vw, 1.75rem);
  font-weight: normal;
  line-height: 1.3;
  margin: 0 0 0.75rem;
  color: #1f1d19;
}

article.essay p {
  margin: 0 0 1.1rem;
}

article.essay p:last-child {
  margin-bottom: 0;
}

@media (max-width: 640px) {
  .nav-toggle {
    display: block;
  }

  .site-nav {
    width: 100%;
    display: none;
    padding-top: 0.5rem;
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
    gap: 0.5rem;
  }

  body {
    background-attachment: scroll;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  html.js .fade-in {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
