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

:root {
  --background: #f6fce2;
  --on-surface: #181d0e;
  --on-surface-variant: #444748;
  --outline: #747878;
  --outline-variant: #c4c7c7;
  --surface-container-low: #f1f7dc;
  --surface-container: #ebf1d6;
  --surface-container-high: #e5ebd1;
  --surface-container-highest: #dfe5cb;
  --accent-orange: #ff914c;
  --tertiary-fixed-dim: #ffb68d;
  --secondary-container: #d2e5c9;
  --primary: #111111;
  --primary-container: #262626;
  --on-primary: #ffffff;
  --on-primary-container: #8e8d8c;
  --on-primary-fixed-variant: #474746;
  --secondary: #52634d;
  --secondary-fixed-dim: #b9ccb1;
  --on-secondary-container: #566751;
  --earth-base: #E2E8CE;

  --font-display: 'Noto Serif', serif;
  --font-body: 'Manrope', sans-serif;

  --max-width: 720px;
  --inline-padding: 1.5rem;
  --section-gap: 5rem;
  --element-gap: 2rem;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background-color: var(--earth-base);
  color: var(--on-surface);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100dvh;
}

::selection {
  background-color: var(--secondary-container);
}

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

img {
  max-width: 100%;
  display: block;
}

/* ========== Typography ========== */

.text-display {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.text-headline-lg {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 400;
  line-height: 1.3;
}

.text-headline-md {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 400;
  line-height: 1.4;
}

.text-body-lg {
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.7;
}

.text-body-md {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
}

.text-label-sm {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.05em;
}

/* ========== Layout ========== */

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--inline-padding);
}

.container-full {
  width: 100%;
}

/* ========== Top Bar ========== */

.top-bar {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  background-color: var(--accent-orange);
  border-bottom: 1px solid rgba(38, 38, 38, 0.1);
}

.top-bar-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 4rem;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--inline-padding);
}

.top-bar-link {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-style: italic;
  color: #ffffff;
  transition: color 0.3s ease;
}

.top-bar-link:hover {
  color: rgba(255, 255, 255, 0.8);
}

/* ========== Hero Section ========== */

.hero {
  width: 100%;
  background-color: var(--accent-orange);
}

.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2rem 1.5rem 3rem;
}

.hero-image {
  width: 100%;
  aspect-ratio: 3 / 4;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-subtitle {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.125rem;
  opacity: 0.9;
  color: var(--primary);
  margin-bottom: 1rem;
}

.hero-name {
  font-family: var(--font-display);
  font-size: 2.25rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-weight: 400;
  line-height: 1.2;
  color: var(--primary);
  margin-bottom: 1.5rem;
}

.hero-divider {
  height: 1px;
  width: 3rem;
  background-color: rgba(17, 17, 17, 0.3);
  margin-bottom: 1.5rem;
}

.hero-dates {
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: 0.05em;
  color: var(--primary);
}

/* ========== Main Content ========== */

.main-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--inline-padding);
}

.main-content--padded {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 8rem var(--inline-padding) 5rem;
}

/* ========== Details Section ========== */

.details-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-top: 3rem;
  gap: 2rem;
}

.details-text {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.7;
  color: var(--on-surface);
  max-width: 600px;
  margin: 0 auto;
}

.details-btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 1rem 3rem;
  border: 2px solid var(--accent-orange);
  color: var(--accent-orange);
  background: transparent;
  transition: background-color 0.3s ease;
}

.details-btn:hover {
  background-color: rgba(255, 145, 76, 0.2);
}

/* ========== Dividers ========== */

.divider {
  height: 1px;
  width: 100%;
  background-color: var(--outline-variant);
}

.divider--subtle {
  height: 1px;
  width: 100%;
  background-color: rgba(196, 199, 199, 0.3);
}

.divider--short {
  height: 1px;
  width: 3rem;
  background-color: var(--outline-variant);
  margin: 0 auto;
}

.section-divider {
  height: 1px;
  width: 100%;
  background-color: var(--outline-variant);
  margin: 6rem 0;
}

/* ========== Memories Section ========== */

.memories-section {
  display: flex;
  flex-direction: column;
  gap: 4rem;
  padding-bottom: 8rem;
}

.memories-title {
  font-family: var(--font-display);
  font-size: 1.875rem;
  text-align: center;
  margin-bottom: 2rem;
  color: var(--accent-orange);
}

/* ========== Guestbook ========== */

.guestbook-entries {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.guestbook-entry {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.guestbook-entry-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.guestbook-author {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--on-surface-variant);
}

.guestbook-date {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--outline);
}

.guestbook-message {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--on-surface);
  font-style: italic;
}

/* ========== Form ========== */

.form-container {
  background-color: var(--surface-container-low);
  padding: 3rem;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.form-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 400;
  line-height: 1.4;
  text-align: center;
  color: var(--on-surface);
}

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

.form-label {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--on-surface-variant);
}

.form-input,
.form-textarea {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--on-surface-variant);
  padding: 0.5rem 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--on-surface);
  transition: border-color 0.2s ease;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--on-surface);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: rgba(68, 71, 72, 0.5);
}

.form-textarea {
  resize: none;
}

.form-actions {
  display: flex;
  justify-content: center;
  padding-top: 1rem;
}

.form-submit {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.75rem 2.5rem;
  border: 1px solid var(--primary);
  color: var(--primary);
  background: transparent;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.form-submit:hover {
  background-color: var(--secondary-container);
}

/* ========== Page Header (Datenschutz/Impressum) ========== */

.page-header {
  margin-bottom: 5rem;
  text-align: center;
}

.page-header-label {
  display: block;
  margin-bottom: 1rem;
}

.page-header-subtitle {
  max-width: 36rem;
  margin: 0 auto;
  font-style: italic;
}

/* ========== Content Sections ========== */

.content-section {
  margin-bottom: 5rem;
}

.content-section:last-child {
  margin-bottom: 0;
}

.content-section__title {
  margin-bottom: 1.5rem;
}

.content-section__body {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.content-card {
  padding: 2rem;
  background-color: var(--surface-container-low);
  border: 1px solid rgba(196, 199, 199, 0.1);
  border-radius: 0.25rem;
}

.content-card__label {
  margin-bottom: 0.5rem;
}

/* ========== Rights Grid ========== */

.rights-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

.rights-item__title {
  margin-bottom: 0.75rem;
}

/* ========== Impressum ========== */

.impressum-section {
  margin-bottom: 3rem;
}

.impressum-section__label {
  margin-bottom: 1rem;
}

.impressum-section__body {
  line-height: 1.75;
}

.impressum-contact {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.impressum-contact-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.impressum-contact-link {
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, color 0.3s ease;
}

.impressum-contact-link:hover {
  color: var(--primary);
  border-bottom-color: var(--outline);
}

.legal-section {
  padding-top: 2rem;
  border-top: 1px solid rgba(196, 199, 199, 0.3);
}

.legal-section__items {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.legal-item__title {
  margin-bottom: 0.5rem;
}

.memorial-image {
  aspect-ratio: 16 / 9;
  background-color: var(--surface-container);
  overflow: hidden;
  filter: grayscale(1) opacity(0.4);
  transition: opacity 0.7s ease;
}

.memorial-image:hover {
  opacity: 0.6;
}

.memorial-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ========== 404 Page ========== */

.page-404 {
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 4rem;
}

.page-404-inner {
  max-width: var(--max-width);
  width: 100%;
  padding: 0 var(--inline-padding);
  text-align: center;
}

.candle-art {
  margin-bottom: 3rem;
  display: flex;
  justify-content: center;
  opacity: 0.8;
}

.candle-art pre {
  font-family: monospace;
  font-size: 0.75rem;
  line-height: 1.2;
  color: var(--accent-orange);
  user-select: none;
}

.page-404__content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.page-404__action {
  margin-top: 4rem;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 2rem;
  border: 1px solid var(--primary);
  color: var(--primary);
  font-family: var(--font-display);
  font-size: 16px;
  transition: background-color 0.3s ease;
}

.btn-primary:hover {
  background-color: var(--secondary-container);
}

/* ========== Footer ========== */

.footer {
  width: 100%;
  background-color: var(--earth-base);
  border-top: 1px solid rgba(38, 38, 38, 0.1);
  margin-top: 5rem;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 3rem 1.5rem;
  text-align: center;
}

.footer-links {
  display: flex;
  gap: 2rem;
  margin-bottom: 1rem;
}

.footer-links a {
  font-family: var(--font-display);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(38, 38, 38, 0.4);
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--accent-orange);
}

.footer-text {
  font-family: var(--font-display);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--primary);
}

/* ========== Utility ========== */

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.uppercase { text-transform: uppercase; }
.italic { font-style: italic; }
.not-italic { font-style: normal; }
.tracking-widest { letter-spacing: 0.15em; }

.text-on-surface { color: var(--on-surface); }
.text-on-surface-variant { color: var(--on-surface-variant); }
.text-secondary { color: var(--secondary); }
.text-primary { color: var(--primary); }
.text-on-primary-container { color: var(--on-primary-fixed-variant); }

.block { display: block; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }

.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-12 { margin-bottom: 3rem; }
.mb-20 { margin-bottom: 5rem; }
.mt-12 { margin-top: 3rem; }
.mt-16 { margin-top: 4rem; }
.mt-24 { margin-top: 6rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.pt-12 { padding-top: 3rem; }
.pt-8 { padding-top: 2rem; }

.max-w-xl { max-width: 36rem; }
.max-w-600 { max-width: 600px; }
.mx-auto { margin-left: auto; margin-right: auto; }

.w-full { width: 100%; }

.bg-transparent { background-color: transparent; }

.transition-colors { transition: color 0.3s ease, background-color 0.3s ease; }
.transition-all { transition: all 0.3s ease; }

/* ========== Responsive ========== */

@media (min-width: 640px) {
  .hero-name {
    font-size: 3rem;
  }

  .hero-inner {
    padding-top: 2rem;
    padding-bottom: 3rem;
  }

  .text-display {
    font-size: 48px;
  }
}

@media (min-width: 768px) {
  .rights-grid {
    grid-template-columns: 1fr 1fr;
    gap-x: 3rem;
    gap-y: 2.5rem;
  }

  .candle-art pre {
    font-size: 0.875rem;
  }

  .footer-inner {
    padding: 4rem 1.5rem;
  }
}

/* ========== Remark42 ========== */

#remark42 {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--inline-padding) var(--section-gap);
}

#remark42 .remark {
  font-family: var(--font-body) !important;
  background: transparent !important;
}

/* Comment text — Noto Serif italic */
#remark42 .remark__comment__text {
  font-family: var(--font-display) !important;
  font-style: italic !important;
  font-size: 16px !important;
  line-height: 1.6 !important;
  color: var(--on-surface) !important;
}

/* Author name — Manrope, uppercase, amber */
#remark42 .remark__comment__author,
#remark42 .remark__comment__author a {
  font-family: var(--font-body) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  letter-spacing: 0.05em !important;
  text-transform: uppercase !important;
  color: var(--accent-orange) !important;
}

/* Timestamp */
#remark42 .remark__comment__time {
  font-family: var(--font-body) !important;
  font-size: 13px !important;
  color: var(--on-surface-variant) !important;
  font-style: italic !important;
}

/* Comment divider */
#remark42 .remark__comment__footer {
  border-top: 1px solid rgba(196, 199, 199, 0.3) !important;
}

/* Form inputs — lined paper */
#remark42 .remark__form__textarea,
#remark42 .remark__form input[type="text"] {
  font-family: var(--font-body) !important;
  background: transparent !important;
  border: none !important;
  border-bottom: 1px solid var(--on-surface-variant) !important;
  border-radius: 0 !important;
  font-size: 16px !important;
  line-height: 1.6 !important;
  color: var(--on-surface) !important;
  padding: 0.5rem 0 !important;
  transition: border-color 0.2s ease !important;
}

#remark42 .remark__form__textarea:focus,
#remark42 .remark__form input[type="text"]:focus {
  outline: none !important;
  box-shadow: none !important;
  border-bottom-color: var(--on-surface) !important;
}

#remark42 .remark__form__textarea::placeholder {
  color: rgba(68, 71, 72, 0.5) !important;
}

/* Submit button */
#remark42 .remark__form__submit {
  font-family: var(--font-body) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  letter-spacing: 0.15em !important;
  text-transform: uppercase !important;
  background: transparent !important;
  border: 1px solid var(--primary) !important;
  color: var(--primary) !important;
  padding: 0.75rem 2.5rem !important;
  border-radius: 0 !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
}

#remark42 .remark__form__submit:hover {
  background: var(--secondary-container) !important;
  border-color: var(--secondary-container) !important;
}

/* Form container */
#remark42 .remark__form {
  background: var(--surface-container-low) !important;
  padding: 3rem !important;
  border: none !important;
  border-radius: 0 !important;
}

#remark42 .remark__form label {
  font-family: var(--font-body) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  letter-spacing: 0.05em !important;
  text-transform: uppercase !important;
  color: var(--on-surface-variant) !important;
}

/* Comment list */
#remark42 .remark__comment__list {
  border: none !important;
}

/* Individual comment */
#remark42 .remark__comment {
  padding: 2rem 0 !important;
  border-bottom: 1px solid rgba(196, 199, 199, 0.3) !important;
}

#remark42 .remark__comment__header {
  margin-bottom: 0.75rem !important;
}

#remark42 .remark__comment__body {
  padding: 0 !important;
}
