:root {
  --blue-mat: #234d70;
  --blue-mat-dark: #17344e;
  --grid: rgba(255, 255, 255, 0.15);
  --grid-strong: rgba(255, 255, 255, 0.32);
  --paper: #fcfbf5;
  --paper-accent: #fdf2b3;
  --paper-pink: #f7d9d0;
  --tape: rgba(230, 220, 170, 0.6);
  --text-dark: #1a1a1a;
  --text-muted: #4a4a40;
  --photo-mat: #bfae87;
  --accent-red: #c0392b;
  --accent-green: #3c7a4b;
  --shadow-soft: 4px 8px 20px rgba(0, 0, 0, 0.3);
  --shadow-hover: 6px 12px 28px rgba(0, 0, 0, 0.38);
  --radius-paper: 6px;
  --header-h: 74px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

/* The background reads as a crafting cutting mat: fine mm-grid plus a
   brighter cm-ruler line every 5th square, with a soft vignette for depth.
   No background-attachment: fixed - the mat scrolls together with whatever
   is "glued" to it, instead of the content floating over a static backdrop. */
body {
  background-color: var(--blue-mat);
  background-image: repeating-linear-gradient(
      45deg,
      rgba(255, 255, 255, 0.04) 0,
      rgba(255, 255, 255, 0.04) 1px,
      transparent 1px,
      transparent 160px
    ),
    repeating-linear-gradient(
      -45deg,
      rgba(255, 255, 255, 0.04) 0,
      rgba(255, 255, 255, 0.04) 1px,
      transparent 1px,
      transparent 160px
    ),
    linear-gradient(var(--grid-strong) 1.5px, transparent 1.5px),
    linear-gradient(90deg, var(--grid-strong) 1.5px, transparent 1.5px),
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px),
    url("/assets/img/mat-texture.jpg");
  background-size: auto, auto, 225px 225px, 225px 225px, 45px 45px, 45px 45px, 160px 160px;
  background-blend-mode: normal, normal, normal, normal, normal, normal, multiply;
  background-position: top left;
  font-family: "Futura", "Trebuchet MS", Arial, sans-serif;
  color: var(--text-dark);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

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

button {
  font-family: inherit;
  cursor: pointer;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.page-body {
  padding-top: calc(var(--header-h) + 30px);
  padding-bottom: 60px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-sizing: border-box;
}

/* Float animations shared across paper elements */
@keyframes float1 {
  0%,
  100% {
    transform: translateY(0) rotate(0.5deg);
  }
  50% {
    transform: translateY(-12px) rotate(-0.5deg);
  }
}
@keyframes float2 {
  0%,
  100% {
    transform: translateY(-5px) rotate(-1deg);
  }
  50% {
    transform: translateY(8px) rotate(1deg);
  }
}
@keyframes float3 {
  0%,
  100% {
    transform: translateX(0) translateY(0) rotate(0.8deg);
  }
  50% {
    transform: translateX(5px) translateY(-15px) rotate(-0.2deg);
  }
}
@keyframes float4 {
  0%,
  100% {
    transform: scale(1) rotate(-0.5deg);
  }
  50% {
    transform: scale(1.02) rotate(0.5deg);
  }
}
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes shimmer {
  0% {
    background-position: -400px 0;
  }
  100% {
    background-position: 400px 0;
  }
}
@keyframes popIn {
  0% {
    transform: scale(0.85);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
