/* Harvest photo card for the thanksgiving-card shortcode.
   Only loaded on pages that use it (see layouts/shortcodes/thanksgiving-card.html). */

:root {
  color-scheme: light dark;
  --tg-font: "Rye", "Georgia", serif;
  --tg-brown: #6b3a1f;
  --tg-rust: #b5521b;
  --tg-orange: #e07a1f;
  --tg-gold: #f2b632;
  /* Mat and greeting colors, swapped for dark mode below */
  --tg-mat: #fbf3e2;
  --tg-mat-line: #8a4b24;
  --tg-ink: #5a2e14;
  --tg-accent: #b5521b;
}

@media (prefers-color-scheme: dark) {
  :root {
    --tg-mat: #2a1b10;
    --tg-mat-line: #c9773a;
    --tg-ink: #f6e3c4;
    --tg-accent: #f2a13a;
  }
}

.tg-card {
  max-width: 560px;
  margin: 2em auto;
  text-align: center;
}

/* Outer frame: a woven harvest plaid, like the tablecloth in the photo */
.tg-frame {
  position: relative;
  padding: 18px;
  border-radius: 6px;
  background-color: var(--tg-rust);
  background-image:
    repeating-linear-gradient(0deg,
      rgba(242, 182, 50, 0.55) 0 8px, transparent 8px 16px,
      rgba(107, 58, 31, 0.55) 16px 24px, transparent 24px 32px),
    repeating-linear-gradient(90deg,
      rgba(242, 182, 50, 0.55) 0 8px, transparent 8px 16px,
      rgba(107, 58, 31, 0.55) 16px 24px, transparent 24px 32px);
  box-shadow:
    inset 0 0 0 3px var(--tg-brown),
    0 4px 14px rgba(0, 0, 0, 0.25);
}

/* Maple leaves pinned to the top corners of the frame */
.tg-frame::before,
.tg-frame::after {
  content: "🍁";
  position: absolute;
  top: -14px;
  font-size: 30px;
  line-height: 1;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.35));
}
.tg-frame::before { left: -10px; transform: rotate(-25deg); }
.tg-frame::after { right: -10px; transform: rotate(25deg) scaleX(-1); }

/* Cream mat with a thin inner rule between the frame and the photo */
.tg-mat {
  padding: 12px;
  background: var(--tg-mat);
  box-shadow: inset 0 0 0 2px var(--tg-mat-line);
  border-radius: 2px;
}
.tg-mat img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--tg-mat-line);
}

/* Greeting card below the photo */
.tg-greeting {
  margin-top: 1.2em;
  padding: 1em 1.25em;
  background: var(--tg-mat);
  color: var(--tg-ink);
  border: 2px dashed var(--tg-mat-line);
  border-radius: 6px;
  font-family: var(--tg-font);
}
.tg-title {
  font-size: 2em;
  line-height: 1.2;
  color: var(--tg-accent);
}
.tg-message {
  margin-top: 0.5em;
  font-size: 1.2em;
  line-height: 1.5;
}
.tg-message p { margin: 0; }
.tg-signature {
  margin-top: 0.6em;
  font-size: 1.1em;
  color: var(--tg-accent);
}

@media (max-width: 480px) {
  .tg-frame { padding: 12px; }
  .tg-mat { padding: 8px; }
  .tg-title { font-size: 1.6em; }
  .tg-message { font-size: 1.05em; }
}
