* {
  box-sizing: border-box;
}

:root {
  color-scheme: light;
  --ink: #2c241b;
  --blue: #46667b;
  --rose: #89565d;
  --green: #526449;
  --gold: #b28b50;
  --paper: #f5e8cf;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--paper);
  background-image: url("/Artwork/garden-theme.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: var(--ink);
  font-family: Georgia, "Palatino Linotype", serif;
  line-height: 1.8;
}

main {
  width: 64%;
  max-width: 980px;
  min-height: 100vh;
  margin: auto;
  padding: 52px 32px 80px;
  background: linear-gradient(
    to right,
    #f5e8cf00,
    #f5e8cfe8 8%,
    #f5e8cfe8 92%,
    #f5e8cf00
  );
}

h1 {
  margin: 30px 0 24px;
  color: #354e61;
  font-family: "Segoe Script", "Palatino Linotype", Georgia, serif;
  font-size: clamp(48px, 6vw, 80px);
  font-style: italic;
  font-weight: normal;
  line-height: 1.35;
  text-align: center;
  text-wrap: balance;
  overflow-wrap: break-word;
  text-shadow: 0 1px 0 #fff8e8;
}

h2 {
  margin-top: 36px;
  color: var(--rose);
  font-size: 30px;
  font-style: italic;
  font-weight: normal;
}

h3 {
  color: var(--ink);
  font-size: 25px;
  font-style: italic;
  font-weight: normal;
}

p {
  font-size: 19px;
  overflow-wrap: anywhere;
}

a {
  color: #38576c;
  text-underline-offset: 5px;
}

a:hover {
  color: #7c424d;
}

.tagline {
  max-width: 650px;
  margin: 0 auto 28px;
  color: #604f40;
  text-align: center;
  font-size: 20px;
  font-style: italic;
}

.dust {
  color: #946a32;
  text-align: center;
  font-size: 13px;
  letter-spacing: 24px;
}

nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 20px;
  margin-top: 42px;
}

.card,
article,
form {
  position: relative;
  padding: 30px;
  background-color: #f7ecd9;
  background-image:
    radial-gradient(
      ellipse at 40% 30%,
      #fff9e899,
      transparent 80%
    ),
    repeating-linear-gradient(
      0deg,
      #71512b05 0 1px,
      transparent 1px 5px
    );
  color: var(--ink);
  border: 1px solid #bda783;
  border-radius: 7px 14px 10px 5px;
  box-shadow:
    0 8px 22px #583f2218,
    inset 0 0 24px #b9915c10;
}

.card::before,
article::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid #a4896133;
  border-radius: 4px 10px 7px 3px;
  pointer-events: none;
}

.card {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 125px;
  padding: 24px;
  color: var(--ink);
  font-size: 22px;
  font-style: italic;
  text-align: center;
  text-decoration: none;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease;
}

.card:nth-child(1) {
  background-color: #e6eef0;
  border-top: 3px solid #7797a9;
}

.card:nth-child(2) {
  background-color: #f2e0df;
  border-top: 3px solid #bb818a;
}

.card:nth-child(3) {
  background-color: #e7ecdc;
  border-top: 3px solid #81916b;
}

.card:nth-child(4) {
  background-color: #ece3ee;
  border-top: 3px solid #a18aaa;
}

.card:hover {
  color: var(--ink);
  transform: translateY(-3px);
  box-shadow: 0 12px 26px #583f2229;
}

/* Journal image with its smaller label underneath. */
.journal-card {
  flex-direction: column;
  padding: 16px;
  gap: 10px;
}

.journal-icon {
  display: block;
  width: 100%;
  max-width: none;
  height: auto;
  border-radius: 8px;
  box-shadow: none;
}

.journal-card span {
  display: block;
  font-size: 16px;
}

article h2,
article h3,
form h2,
form h3 {
  color: var(--ink);
}

article form {
  margin-top: 18px;
  padding: 20px;
  background: #fff8e755;
  box-shadow: none;
}

figure {
  margin: 26px 0;
}

img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 5px;
}

figcaption {
  margin-top: 14px;
  color: #665342;
  font-size: 16px;
  font-style: italic;
  text-align: center;
}

audio,
video {
  display: block;
  width: 100%;
  margin-top: 22px;
}

.book {
  background-color: #f4e6ca;
}

.book h3 {
  font-family: "Segoe Script", Georgia, serif;
}

label {
  display: block;
  margin-top: 18px;
  font-size: 17px;
}

input:not([type="hidden"]),
textarea,
select {
  width: 100%;
  padding: 14px;
  margin-top: 8px;
  border: 1px solid #af9a78;
  border-radius: 5px;
  background: #fff9ed;
  color: var(--ink);
  font: inherit;
}

textarea {
  min-height: 130px;
  resize: vertical;
}

#journal-body {
  min-height: 320px;
  line-height: 1.9;
}

input[type="file"]::file-selector-button {
  margin-right: 12px;
  padding: 10px 14px;
  border: 1px solid #87966f;
  border-radius: 5px;
  background: #e3ead7;
  color: #35452c;
  font: inherit;
  cursor: pointer;
}

button {
  width: 100%;
  padding: 14px;
  margin-top: 18px;
  border: 1px solid #425a6a;
  border-radius: 6px;
  background: #46667b;
  color: #fff8e9;
  font: inherit;
  font-size: 17px;
  cursor: pointer;
}

button:hover {
  background: #354f62;
}

button[name="reaction"][value="like"] {
  background: #526449;
  border-color: #405137;
}

button[name="reaction"][value="dislike"] {
  background: #89565d;
  border-color: #704249;
}

button[aria-pressed="true"] {
  outline: 3px solid #b28b50;
  outline-offset: 3px;
}

summary {
  color: #46667b;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid #89565d;
  outline-offset: 5px;
}

input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid #46667b;
  outline-offset: 3px;
}

footer {
  margin-top: 44px;
  text-align: center;
  font-size: 15px;
}

/* Homepage footer: subscribe first, owner area below. */
.homepage {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding-bottom: 24px;
}

.homepage-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding-top: 60px;
  text-align: center;
}

.homepage-footer .footer-subscribe {
  width: auto;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #665342;
  font-size: 13px;
  line-height: 1.6;
  box-shadow: none;
  cursor: not-allowed;
}

.homepage-footer .footer-subscribe:hover {
  background: transparent;
}

.homepage-footer small {
  color: #665342;
  font-size: 11px;
}

.homepage-footer .footer-owner {
  color: #665342;
  font-size: 13px;
  line-height: 1.6;
  text-decoration: none;
}

.homepage-footer .footer-owner:hover {
  text-decoration: underline;
}

@media (max-width: 1000px) {
  main {
    width: 78%;
    padding: 40px 24px 70px;
  }

  .homepage {
    padding-bottom: 24px;
  }
}

@media (max-width: 650px) {
  body {
    background-size: 100% auto;
    background-position: center top;
    background-attachment: scroll;
  }

  main {
    width: 92%;
    padding: 28px 16px 60px;
    background: #f5e8cfe8;
  }

  .homepage {
    padding-bottom: 20px;
  }

  h1 {
    font-size: 48px;
  }

  nav {
    grid-template-columns: 1fr;
  }

  article,
  form {
    padding: 23px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .card {
    transition: none;
  }

  .card:hover {
    transform: none;
  }
}