/* Optional offline fonts:
   Add Caveat-VariableFont_wght.woff2 and LibreCaslonText-Regular.woff2
   to assets/fonts/. The Google Fonts links in index.html remain the default. */
@font-face {
  font-family: "Caveat Local";
  src: url("../fonts/Caveat-VariableFont_wght.ttf") format("ttf");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

@font-face {
  font-family: "Libre Caslon Text Local";
  src: url("../fonts/LibreCaslonText-Regular.ttf") format("ttf");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
font-family: "Cardo Local", serif;
font-weight: 400;
font-style: normal;
src: url('../fonts/Cardo-Regular.ttf') format('ttf');
}


a:root {
  color-scheme: light;
  --paper: #dbc095;
  --ink: #116b64;
  --body-ink: #463729;
  --mount: rgba(255, 252, 244, 0.91);
  --shadow: rgba(69, 45, 24, 0.24);
}

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

html,
body {
margin: 0;
min-width: 320px;
overflow-x: hidden;
  background-color: var(--paper);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--body-ink);
  background-color: var(--paper);
  background-image: url("../images/page-background.jpg");
  background-repeat: repeat;
  background-position: top left;
  background-size: 640px 512px;
  font-family: "Cardo Local", "Cardo", "Libre Caslon Text Local", "Libre Caslon Text", Georgia, serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

.page-shell {
  margin-inline: auto;
  width: 100%;
  min-height: 100vh;
  margin: 0;
  padding: clamp(2rem, 5vw, 4.5rem) 0 0;
  display: flex;
  flex-direction: column;
}

.site-header {
  position: relative;
  z-index: 2;
  width: fit-content;
  max-width: calc(100% - 2rem);
  margin: 0 auto clamp(2rem, 5vw, 4rem);
  padding: clamp(1.15rem, 3vw, 2rem) clamp(1.35rem, 5vw, 4rem);
  text-align: center;
  background: var(--mount);
  box-shadow: 0 0.65rem 1.6rem var(--shadow);
  transform: rotate(-0.45deg);
}

.site-header::before,
.site-header::after {
  position: absolute;
  z-index: -1;
  width: clamp(4.5rem, 10vw, 7rem);
  height: 1.7rem;
  content: "";
  background: rgba(214, 191, 151, 0.68);
  box-shadow: 0 1px 1px rgba(85, 62, 38, 0.12);
}

.site-header::before {
  top: -0.55rem;
  left: 8%;
  transform: rotate(-4deg);
}

.site-header::after {
  right: 8%;
  bottom: -0.55rem;
  transform: rotate(3deg);
}

h1 {
  margin: 0;
  color: var(--ink);
  font-family: "Caveat Local", "Caveat", "Segoe Print", "Bradley Hand", cursive;
  font-size: clamp(2.25rem, 9vw, 5.4rem);
  font-weight: 600;
  line-height: 0.92;
  letter-spacing: -0.02em;
}

.byline {
  margin: 0.8rem 0 0;
  color: var(--body-ink);
  font-size: clamp(1rem, 2.2vw, 1.35rem);
  line-height: 1.4;
}

.hero-collage {
  position: relative;
  display: block;
  width: 100%;
  margin: 0 auto;
  padding: 0;
  overflow: hidden;
  background: transparent;
  box-shadow: none;
  transform: none;
}

.hero-collage img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0;
  padding: 0;
}

/* Gallery  */

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));

  gap: 2.5rem;

  width: min(1400px, calc(100% - 2rem));
  margin: 0 auto 4rem auto;

  padding: 1rem;
}

.gallery-item {
  position: relative;

  background: #fff;
  padding: 12px;

  box-shadow:
    0 12px 24px rgba(0,0,0,.12),
    0 4px 8px rgba(0,0,0,.08);

  transition:
    transform .2s ease,
    box-shadow .2s ease;
}

.gallery-item img {
  display: block;
  width: 100%;
  height: auto;
}


/* Random-looking paper angles */

.gallery-item:nth-child(7n+1) {
  transform: rotate(-4deg);
}

.gallery-item:nth-child(7n+2) {
  transform: rotate(2deg);
}

.gallery-item:nth-child(7n+3) {
  transform: rotate(-2deg);
}

.gallery-item:nth-child(7n+4) {
  transform: rotate(3deg);
}

.gallery-item:nth-child(7n+5) {
  transform: rotate(-1deg);
}

.gallery-item:nth-child(7n+6) {
  transform: rotate(1.5deg);
}

.gallery-item:nth-child(7n+7) {
  transform: rotate(-3deg);
}

/* Lift on hover */

.gallery-item:hover {
  z-index: 20;

  transform:
    scale(1.03)
    rotate(0deg);

  box-shadow:
    0 20px 40px rgba(0,0,0,.18),
    0 8px 16px rgba(0,0,0,.12);
}

/* Break grid alignment slightly */

.gallery-item:nth-child(odd) {
  margin-top: 1rem;
}

.gallery-item:nth-child(3n) {
  margin-top: -0.75rem;
}

.gallery-item:nth-child(5n) {
  margin-top: 1.5rem;
}

/* Small tape effect */

.gallery-item::before {
  content: "";

  position: absolute;
  top: -10px;
  left: 50%;

  width: 80px;
  height: 22px;

  margin-left: -40px;

  background:
    rgba(214,196,155,.55);

  transform: rotate(-4deg);

  pointer-events: none;
}

/* Mobile */

@media (max-width: 768px) {

  .gallery {
    gap: 1rem;
    width: calc(100% - 1rem);
  }

  .gallery-item,
  .gallery-item:hover {
    margin-top: 0;
    transform: none;
  }

  .gallery-item::before {
    display: none;
  }
}

@media (max-width: 40rem) {
  .page-shell {
    width: min(100% - 1rem, 88rem);
    padding-top: 1.4rem;
  }

  .site-header,
  .hero-collage {
    transform: none;
  }

  .site-header {
    width: 100%;
  }

  .site-header::before,
  .site-header::after {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
  }
}

@media print {
  body {
    background: #fff;
  }

  .page-shell {
    width: 100%;
    padding: 0;
  }

  .site-header,
  .hero-collage {
    box-shadow: none;
    transform: none;
  }
}
