/* ─────────────────────────────────────────────────────────────
   Kunst voor Nepal — global stylesheet
   Handmade / textured: warm paper, ink, screen-print energy.
   ───────────────────────────────────────────────────────────── */

:root {
  --paper: #f6efe3;
  --paper-deep: #ede2cf;
  --ink: #241f18;
  --ink-soft: #5c5346;
  --ember: #c34e2a;
  --ember-deep: #9c3d1f;
  --teal: #23645a;
  --sold: #8a8378;
  --card-w: 22rem;
  --maxw: 72rem;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 1.125rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

/* ── Paper grain overlay ─────────────────────────────────────── */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.05;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── Layout ──────────────────────────────────────────────────── */
.site-header {
  border-bottom: 3px solid var(--ink);
  background: var(--paper);
}
.site-nav {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1.1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.site-nav__brand {
  font-family: 'Caveat', cursive;
  font-size: 2rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  transform: rotate(-2deg);
  display: inline-block;
}
.site-nav__links {
  display: flex;
  align-items: center;
  gap: 1.4rem;
}
.site-nav__links a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 2px dashed transparent;
  padding-bottom: 0.15rem;
  transition: border-color 0.15s ease;
}
.site-nav__links a:hover { border-bottom-color: var(--ember); }

main { max-width: var(--maxw); margin: 0 auto; padding: 0 1.5rem; }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-block;
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  color: var(--paper);
  background: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
  padding: 0.7rem 1.4rem;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-2px) rotate(-1deg); }
.btn:active { transform: translateY(0); }

.btn--ember { background: var(--ember); border-color: var(--ember); }
.btn--ember:hover { background: var(--ember-deep); }

.btn--sticker {
  background: var(--paper);
  color: var(--ember);
  border: 2px solid var(--ember);
  border-radius: 8px;
  box-shadow: 3px 3px 0 var(--ember);
  font-family: 'Caveat', cursive;
  font-size: 1.35rem;
  padding: 0.35rem 1rem;
  transform: rotate(1deg);
}
.btn--sticker:hover {
  transform: rotate(-1deg) translateY(-2px);
  box-shadow: 5px 5px 0 var(--ember);
}

/* ── Hero (home) ─────────────────────────────────────────────── */
.hero { padding: 4.5rem 0 2.5rem; text-align: center; }
.hero__title {
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  max-width: 20ch;
  margin: 0 auto 1.2rem;
}
.hero__title-line {
  display: inline;
  background: linear-gradient(to top, rgba(195, 78, 42, 0.28) 40%, transparent 40%);
  padding: 0 0.15em;
}
.hero__lead {
  font-size: clamp(1.15rem, 2.2vw, 1.4rem);
  color: var(--ink-soft);
  max-width: 42rem;
  margin: 0 auto 2rem;
}
.hero__cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ── Story ───────────────────────────────────────────────────── */
.story { padding: 2.5rem 0 3rem; }
.story__body { max-width: 46rem; margin: 0 auto; }

/* ── Prose (story body) ──────────────────────────────────────── */
.prose p { margin: 1.2rem 0; }
.prose strong { color: var(--ember); }
.prose blockquote {
  margin: 2rem 0;
  padding: 1rem 1.4rem;
  border-left: 4px solid var(--teal);
  background: rgba(35, 100, 90, 0.08);
  border-radius: 0 12px 12px 0;
  font-style: italic;
  color: var(--ink-soft);
}

/* ── Gallery ─────────────────────────────────────────────────── */
.gallery { padding: 2.5rem 0 3.5rem; }
.gallery__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}
.gallery__head h2 {
  font-size: 2.4rem;
  margin: 0;
  position: relative;
  display: inline-block;
}
.gallery__head h2::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -0.55rem;
  width: 100%;
  height: 0.35rem;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='12' viewBox='0 0 120 12'%3E%3Cpath d='M2 8 Q 20 2 40 7 T 80 6 T 118 8' fill='none' stroke='%23C34E2A' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E") repeat-x;
  background-size: 120px 12px;
}
.gallery__foot {
  text-align: center;
  margin-top: 3rem;
}

/* ── Grid of cards ───────────────────────────────────────────── */
.grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(18rem, 100%), 1fr));
  gap: 2.2rem 1.8rem;
}
.tilt-1 { transform: rotate(-0.8deg); }
.tilt-2 { transform: rotate(0.7deg); }
.tilt-1:hover, .tilt-2:hover { transform: rotate(0deg) translateY(-4px); }
.tilt-1, .tilt-2 { transition: transform 0.2s ease; }

.card {
  background: var(--paper-deep);
  border: 2px solid var(--ink);
  border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-bottom: 2px solid var(--ink);
}
.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(0.92) contrast(1.02);
}
.is-sold .card__media img { filter: grayscale(0.9) brightness(0.92); }
.card__badge {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  background: var(--ink);
  color: var(--paper);
  font-family: 'Caveat', cursive;
  font-size: 1.3rem;
  padding: 0.15rem 0.7rem;
  transform: rotate(4deg);
  border-radius: 6px;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.35);
}
.card__body {
  padding: 1.1rem 1.3rem 1.3rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  flex: 1;
}
.card__number {
  margin: 0;
  font-family: 'Caveat', cursive;
  font-size: 1.05rem;
  color: var(--teal);
}
.card__title {
  margin: 0;
  font-size: 1.5rem;
}
.card__artist {
  margin: 0 0 0.9rem;
  color: var(--ink-soft);
  font-style: italic;
}
.card__actions { margin-top: auto; }
.is-sold .card__title { color: var(--sold); text-decoration: line-through; }

/* ── Pay modal ───────────────────────────────────────────────── */
.pay-modal {
  border: 3px solid var(--ink);
  border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
  background: var(--paper);
  color: var(--ink);
  padding: 2rem 2.2rem 2.2rem;
  max-width: 24rem;
  width: calc(100vw - 2rem);
  position: relative;
}
.pay-modal::backdrop { background: rgba(36, 31, 24, 0.6); }
.pay-modal__close-wrap {
  position: absolute;
  top: 0.6rem;
  right: 0.7rem;
  margin: 0;
}
.pay-modal__close {
  background: none;
  border: none;
  font-size: 1.3rem;
  color: var(--ink-soft);
  cursor: pointer;
  padding: 0.3rem 0.5rem;
  line-height: 1;
}
.pay-modal__close:hover { color: var(--ember); }
.pay-modal__title {
  margin: 0 0 0.2rem;
  font-size: 1.9rem;
  text-align: center;
}
.pay-modal__piece {
  margin: 0 0 1rem;
  text-align: center;
  font-family: 'Caveat', cursive;
  font-size: 1.35rem;
  color: var(--teal);
}

.pay-modal__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
}
.pay-modal__qr { text-align: center; }
.pay-modal__qr img {
  width: 100%;
  max-width: 240px;
  height: auto;
  image-rendering: pixelated;
  border: 2px solid var(--ink);
  background: #fff;
  padding: 0.5rem;
  border-radius: 10px;
  display: block;
  margin: 0 auto;
}
.pay-modal__scan-label {
  margin: 0.4rem 0 0;
  font-family: 'Caveat', cursive;
  font-size: 1.2rem;
  color: var(--ink-soft);
}
.pay-modal__meta { text-align: center; }
.pay-modal__callout {
  margin: 0 0 1rem;
  background: rgba(35, 100, 90, 0.12);
  border: 2px dashed var(--teal);
  border-radius: 10px;
  padding: 0.7rem 1rem;
  font-size: 1rem;
  line-height: 1.5;
}
.pay-modal__link-btn {
  display: none;
  font-family: 'Fraunces', serif;
  font-weight: 700;
  color: var(--paper);
  background: var(--ember);
  border: 2px solid var(--ink);
  border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
  text-decoration: none;
  padding: 0.8rem 1.5rem;
  font-size: 1.05rem;
}
.pay-modal__link-btn:hover { background: var(--ember-deep); }

/* Desktop: QR shows, link button hides. Mobile: reversed. */
@media (hover: hover) and (pointer: fine) {
  .pay-modal__link-btn { display: none; }
}
@media (hover: none) {
  .pay-modal__qr { display: none; }
  .pay-modal__link-btn { display: inline-block; }
}

/* ── Donate page ─────────────────────────────────────────────── */
.page-doneer { padding-bottom: 3.5rem; }
.donate { padding: 0.5rem 0 2.5rem; }
.donate-card {
  max-width: 26rem;
  margin: 0 auto;
  background: var(--paper-deep);
  border: 3px solid var(--ink);
  border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
  padding: 2rem 2.2rem;
  text-align: center;
}
.donate-card__title {
  margin: 0 0 1.2rem;
  font-size: 2rem;
}
.donate-card__qr img {
  width: 100%;
  max-width: 240px;
  height: auto;
  border: 2px solid var(--ink);
  background: #fff;
  padding: 0.5rem;
  border-radius: 10px;
  margin: 0 auto;
}
.donate-card__scan-label {
  font-family: 'Caveat', cursive;
  font-size: 1.3rem;
  color: var(--ink-soft);
  margin: 0.5rem 0 0;
}
.donate-card__steps {
  margin: 1.2rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  color: var(--ink-soft);
  font-size: 1rem;
}
.donate-card__note {
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin: 0.8rem 0 0;
}

/* ── Page head (galerij) ─────────────────────────────────────── */
.page-head {
  padding: 3.5rem 0 1rem;
  text-align: center;
  max-width: 40rem;
  margin: 0 auto;
}
.page-head h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); margin: 0 0 0.8rem; }
.page-head__lead { color: var(--ink-soft); }

/* ── Footer ──────────────────────────────────────────────────── */
.site-footer {
  border-top: 3px solid var(--ink);
  background: var(--paper-deep);
  text-align: center;
  padding: 2.2rem 1.5rem 2.8rem;
  color: var(--ink-soft);
  font-size: 1rem;
}
.site-footer__note { max-width: 36rem; margin: 0 auto 0.8rem; }
.site-footer__contact a { color: var(--teal); }
.site-footer__love {
  font-family: 'Caveat', cursive;
  font-size: 1.5rem;
  color: var(--ember);
  margin: 0.6rem 0 0;
}

/* ── Reduced motion ──────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

/* ── Small screens ───────────────────────────────────────────── */
@media (max-width: 30rem) {
  .site-nav { justify-content: center; }
  .hero { padding-top: 2.5rem; }
  .gallery__head { justify-content: center; text-align: center; }
}
