/* =========================================================
   PRINTS OF JOY — FREE PRINTABLES
   External Stylesheet
   ========================================================= */


/* =========================================================
   1. ROOT VARIABLES
   ========================================================= */

:root {
  --bg: #f7e6ea;
  --paper: #fffdfb;
  --ink: #2b2b2b;
  --muted: #5f5a57;
  --line: #e7d7da;
  --bar: #f3d2d9;
  --brand: #e47c87;
  --brand-dark: #d96572;
  --white: #ffffff;

  --radius-small: 10px;
  --radius-medium: 18px;
  --radius-pill: 999px;

  --shadow-soft: 0 10px 28px rgba(0, 0, 0, 0.06);
  --shadow-card: 0 10px 24px rgba(0, 0, 0, 0.06);

  --content-width: 1100px;
  --content-padding: 2rem;
}


/* =========================================================
   2. RESET
   ========================================================= */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}


/* =========================================================
   3. BASE / BODY
   ========================================================= */

html {
  scroll-behavior: smooth;
}

body {
  font-family:
    "Nunito",
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    Arial,
    sans-serif;

  background: var(--bg);
  color: var(--ink);

  line-height: 1.7;
  min-height: 100vh;
}


/* =========================================================
   4. GLOBAL ELEMENTS
   ========================================================= */

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}


/* =========================================================
   5. HEADER
   ========================================================= */

header {
  text-align: center;
  padding: 2.5rem 1rem 1.5rem;
}

header a {
  display: inline-block;
}

header img {
  width: 100%;
  max-width: 520px;
  height: auto;
  margin: 0 auto;
}


/* =========================================================
   6. MAIN NAVIGATION
   ========================================================= */

nav {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;

  gap: 0.75rem;

  padding: 0.85rem 1rem;

  background: var(--bar);

  text-transform: uppercase;
  letter-spacing: 0.06em;

  font-weight: 800;
  font-size: 0.92rem;
}

nav a {
  display: inline-block;

  padding: 0.55rem 1rem;

  border-radius: var(--radius-pill);

  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

nav a:hover {
  background: var(--hover, var(--brand));
  color: var(--white);
}

nav a:focus-visible {
  outline: 3px solid rgba(228, 124, 135, 0.4);
  outline-offset: 3px;
}

nav a.active {
  background: var(--brand);
  color: var(--white);
  pointer-events: none;
}


/* =========================================================
   7. MAIN CONTENT CONTAINER
   ========================================================= */

main {
  width: calc(100% - 2rem);
  max-width: var(--content-width);

  margin: 2rem auto;

  padding: var(--content-padding);

  background: var(--paper);

  border: 1px solid var(--line);
  border-radius: var(--radius-medium);

  box-shadow: var(--shadow-soft);
}


/* =========================================================
   8. PAGE HEADING
   ========================================================= */

h1 {
  font-family:
    "Quicksand",
    "Nunito",
    system-ui,
    sans-serif;

  color: var(--ink);

  text-align: center;

  line-height: 1.25;

  margin-bottom: 1rem;

  font-weight: 700;
}


/* =========================================================
   9. INTRODUCTION
   ========================================================= */

.intro {
  max-width: 820px;

  margin: 0 auto 2rem;

  color: var(--muted);

  text-align: center;

  line-height: 1.75;
}


/* =========================================================
   10. PRINTABLES GRID
   ========================================================= */

.grid {
  display: grid;

  grid-template-columns:
    repeat(3, minmax(0, 1fr));

  gap: 1.5rem;
}


/* =========================================================
   11. PRINTABLE CARDS
   ========================================================= */

.card {
  display: block;

  padding: 1.25rem;

  background: var(--paper);

  border: 1px solid var(--line);

  border-radius: var(--radius-medium);

  text-align: center;

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease,
    background-color 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);

  box-shadow: var(--shadow-card);

  border-color: rgba(228, 124, 135, 0.6);
}

.card:focus-visible {
  outline: 3px solid rgba(228, 124, 135, 0.4);
  outline-offset: 3px;
}


/* =========================================================
   12. CARD IMAGES
   ========================================================= */

.card img {
  width: auto;
  max-width: 100%;
  max-height: 200px;

  margin: 0 auto 1rem;

  object-fit: contain;

  border-radius: var(--radius-small);
}


/* =========================================================
   13. CARD TITLES
   ========================================================= */

.card span {
  display: block;

  margin-bottom: 0.5rem;

  color: var(--ink);

  font-size: 1.05rem;
  font-weight: 800;

  line-height: 1.4;
}


/* =========================================================
   14. CARD DESCRIPTIONS
   ========================================================= */

.card p {
  color: var(--muted);

  font-size: 0.9rem;

  line-height: 1.6;
}


/* =========================================================
   15. FOOTER
   ========================================================= */

footer {
  margin-top: 2rem;

  padding: 2.25rem 1rem;

  background: var(--bar);

  color: var(--ink);

  text-align: center;
}

footer p {
  margin-top: 0.5rem;

  font-size: 0.9rem;
}


/* =========================================================
   16. FOOTER NAVIGATION
   ========================================================= */

.footnav {
  display: flex;

  flex-wrap: wrap;

  justify-content: center;

  gap: 0.75rem;

  margin-bottom: 1rem;

  font-size: 0.85rem;

  font-weight: 800;

  text-transform: uppercase;
}

.footnav a {
  display: inline-block;

  padding: 0.45rem 0.8rem;

  border-radius: var(--radius-pill);

  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}

.footnav a:hover {
  background: var(--brand);

  color: var(--white);
}

.footnav a:focus-visible {
  outline: 3px solid rgba(228, 124, 135, 0.4);
  outline-offset: 3px;
}


/* =========================================================
   17. STATCOUNTER
   ========================================================= */

.statcounter {
  display: inline-block;
}

.statcounter img {
  display: inline-block;
}


/* =========================================================
   18. TABLET
   ========================================================= */

@media (max-width: 900px) {

  .grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }

}


/* =========================================================
   19. MOBILE
   ========================================================= */

@media (max-width: 600px) {

  header {
    padding: 2rem 1rem 1.25rem;
  }

  header img {
    max-width: 420px;
  }

  nav {
    gap: 0.5rem;

    padding: 0.75rem;

    font-size: 0.82rem;
  }

  nav a {
    padding: 0.5rem 0.8rem;
  }

  main {
    width: calc(100% - 1rem);

    margin: 1rem auto;

    padding: 1.25rem;

    border-radius: 14px;
  }

  h1 {
    font-size: 1.7rem;
  }

  .intro {
    font-size: 0.95rem;

    margin-bottom: 1.5rem;
  }

  .grid {
    grid-template-columns: 1fr;

    gap: 1.25rem;
  }

  .card {
    padding: 1rem;
  }

  .card img {
    max-height: 220px;
  }

  footer {
    padding: 2rem 1rem;
  }

  .footnav {
    gap: 0.5rem;

    font-size: 0.78rem;
  }

}


/* =========================================================
   20. SMALL MOBILE DEVICES
   ========================================================= */

@media (max-width: 400px) {

  header {
    padding-top: 1.5rem;
  }

  nav {
    flex-direction: column;
  }

  nav a {
    width: 100%;

    text-align: center;
  }

  main {
    padding: 1rem;
  }

  h1 {
    font-size: 1.5rem;
  }

  .card span {
    font-size: 1rem;
  }

  .footnav {
    flex-direction: column;
  }

  .footnav a {
    width: 100%;

    text-align: center;
  }

}


/* =========================================================
   21. REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

}