/* ============================================================
   janinebasset.org — memorial site
   Single page, responsive, floral-cornered frame.
   Palette: cream paper, soft sage and dusty rose, charcoal ink.
   ============================================================ */

:root {
  --bg:        #f4ede1;   /* outer page — warm cream */
  --bg-frame:  #fdfaf5;   /* inner card — near-white paper */
  --ink:       #2c2620;   /* primary text */
  --ink-soft:  #5a5048;   /* secondary text */
  --rule:      #d8cfc1;   /* divider line under name */
  --sage:      #6b7d5a;   /* used by the SVG (kept here for reference) */
  --rose:      #c19595;   /* used by the SVG (kept here for reference) */
}

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

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Liberation Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 300;
  line-height: 1.5;
  min-height: 100vh;
  padding: clamp(1rem, 4vw, 3rem);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ----- Frame ---------------------------------------------------- */

.frame {
  position: relative;
  width: 100%;
  max-width: 1280px;
  background: var(--bg-frame);
  padding: clamp(2.5rem, 7vw, 5.5rem) clamp(1.25rem, 5vw, 4rem);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.04),
    0 8px 30px rgba(0, 0, 0, 0.06);
}

/* ----- Floral corner ornaments --------------------------------- */

.corner {
  position: absolute;
  width: clamp(72px, 11vw, 150px);
  height: clamp(72px, 11vw, 150px);
  pointer-events: none;
  user-select: none;
}

.corner-tl { top: 0; left: 0; }
.corner-tr { top: 0;    right: 0;  transform: scaleX(-1); }
.corner-bl { bottom: 0; left: 0;   transform: scaleY(-1); }
.corner-br { bottom: 0; right: 0;  transform: scale(-1, -1); }

/* ----- Header --------------------------------------------------- */

.memorial-header {
  text-align: center;
  margin: 0 auto clamp(2rem, 5vw, 3.5rem);
  max-width: 40rem;
}

.memorial-header h1 {
  font-weight: 300;
  font-style: italic;
  font-size: clamp(1.75rem, 4.5vw, 2.75rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 1.25rem;
}

.memorial-header .name {
  font-weight: 400;
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  letter-spacing: 0.06em;
  color: var(--ink);
  margin: 0 auto;
  padding-top: 1.1rem;
  border-top: 1px solid var(--rule);
  max-width: 20rem;
}

.memorial-header .dates {
  margin: 0.75rem 0 0;
  font-size: clamp(0.9rem, 1.6vw, 1.05rem);
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}

/* ----- Content (image now, carousel later) --------------------- */

.memorial-content {
  display: flex;
  justify-content: center;
}

.memorial-image {
  margin: 0;
  width: 100%;
  max-width: 1131px;   /* image's native width — never upscale */
}

.memorial-image img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 auto;
  /* Hint the renderer to reserve space (1131 × 1583) and avoid layout shift. */
  aspect-ratio: 1131 / 1583;
  background: #f0eadf;  /* placeholder colour until image loads */
}

/* ----- Print ---------------------------------------------------- */

@media print {
  body { background: #fff; padding: 0; }
  .frame { box-shadow: none; max-width: none; }
  .corner { width: 90px; height: 90px; }
}

/* ----- Reduced motion (forward-compatible for future carousel) - */

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