:root {
  --text: #f3eee8;
  --muted: #b9aa98;

  --card-border:
    rgba(255, 255, 255, 0.08);

  --accent-soft:
    rgba(178, 70, 61, 0.22);
}


/* -------------------------------------------------
   Base
------------------------------------------------- */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;

  background:
    radial-gradient(
      circle at top,
      rgba(178, 70, 61, 0.08),
      transparent 28%
    ),
    linear-gradient(
      180deg,
      #0a0c11 0%,
      #0b0d12 100%
    );

  color: var(--text);

  font-family:
    Georgia,
    "Times New Roman",
    serif;
}


/* -------------------------------------------------
   Page
------------------------------------------------- */

.page {
  width:
    min(
      1680px,
      calc(100% - 48px)
    );

  margin: 0 auto;

  padding:
    18px 0 56px;
}


/* -------------------------------------------------
   Hero
------------------------------------------------- */

.hero {
  text-align: center;

  padding:
    10px 0 28px;
}

.eyebrow {
  margin-bottom: 18px;

  color: var(--muted);

  font-size: 13px;

  letter-spacing: 0.3em;

  text-transform: uppercase;
}

.hero h1 {
  margin: 0 0 28px;

  color: var(--text);

  font-size:
    clamp(
      54px,
      8vw,
      106px
    );

  line-height: 0.92;

  font-weight: 500;

  letter-spacing: -0.03em;
}

.subtitle {
  margin: 0;

  color: var(--muted);

  font-size:
    clamp(
      18px,
      2vw,
      23px
    );

  letter-spacing: 0.08em;
}


/* -------------------------------------------------
   Memorial grid
------------------------------------------------- */

.memorial {
  padding-top: 10px;
}

#memorial-list {
  display: grid;

  grid-template-columns:
    repeat(
      auto-fill,
      minmax(185px, 1fr)
    );

  gap: 12px;
}


/* -------------------------------------------------
   Person cards
------------------------------------------------- */

.person-card {
  position: relative;

  min-height: 132px;

  padding:
    12px 12px 42px;

  overflow: hidden;

  border:
    1px solid
    var(--card-border);

  border-radius: 16px;

  background:
    linear-gradient(
      180deg,
      rgba(255,255,255,0.035),
      rgba(255,255,255,0.02)
    );

  box-shadow:
    inset
    0 1px 0
    rgba(255,255,255,0.03),

    0 10px 30px
    rgba(0,0,0,0.22);

  opacity: 0;

  transform:
    translateY(10px);

  transition:
    opacity 0.45s ease,
    transform 0.45s ease,
    border-color 0.3s ease,
    background 0.3s ease;
}

.person-card.is-visible {
  opacity: 1;

  transform:
    translateY(0);
}

.person-card:nth-child(3n) {
  background:
    linear-gradient(
      180deg,
      rgba(255,255,255,0.026),
      rgba(255,255,255,0.012)
    );
}

.person-card:nth-child(5n) {
  background:
    linear-gradient(
      180deg,
      rgba(255,255,255,0.034),
      rgba(255,255,255,0.014)
    );
}

.person-card:nth-child(7n) {
  border-color:
    rgba(255,255,255,0.09);
}

.person-card::after {
  content: "";

  position: absolute;

  left: 0;
  right: 0;
  bottom: 0;

  height: 1px;

  background:
    linear-gradient(
      90deg,
      transparent,
      rgba(255,255,255,0.08),
      transparent
    );
}

.person-name {
  margin-bottom: 10px;

  color: var(--text);

  font-size: 17px;

  line-height: 1.2;

  font-weight: 600;

  word-break: break-word;
}

.person-name-ar {
  margin-bottom: 8px;

  color: #d8cbbb;

  font-size: 14px;

  line-height: 1.5;

  direction: rtl;

  text-align: right;

  word-break: break-word;
}

.person-footer {
  position: absolute;

  left: 12px;
  right: 12px;
  bottom: 10px;

  display: flex;

  align-items: center;

  justify-content: flex-end;
}

.person-age {
  display: inline-flex;

  align-items: center;

  justify-content: center;

  min-width: 34px;

  height: 26px;

  padding:
    4px 8px;

  white-space: nowrap;

  border-radius: 999px;

  background:
    var(--accent-soft);

  border:
    1px solid
    rgba(178, 70, 61, 0.32);

  color: #f0b3ab;

  font-size: 12px;

  line-height: 1.2;

  font-weight: 600;
}


/* -------------------------------------------------
   Reflection messages
------------------------------------------------- */

.reflection-break {
  grid-column:
    1 / -1;

  min-height: 460px;

  margin:
    70px 0;

  display: flex;

  align-items: center;

  justify-content: center;

  position: relative;

  overflow: hidden;

  opacity: 0.12;

  transform:
    translateY(18px);

  will-change:
    opacity,
    transform;
}

.reflection-inner {
  width: 100%;

  padding:
    0 24px;

  display: flex;

  align-items: center;

  justify-content: center;
}

.reflection-text {
  max-width: 1200px;

  margin: 0;

  color: var(--text);

  font-family:
    Georgia,
    "Times New Roman",
    serif;

  font-size:
    clamp(
      38px,
      5vw,
      72px
    );

  line-height: 1.08;

  letter-spacing: -0.025em;

  text-align: center;
}


/* -------------------------------------------------
   Loading sentinel
------------------------------------------------- */

#load-sentinel {
  width: 100%;
  height: 20px;
}


/* -------------------------------------------------
   Data source
------------------------------------------------- */
/* -------------------------------------------------
   Responsive
------------------------------------------------- */

@media (max-width: 1200px) {
  .page {
    width:
      min(
        100%,
        calc(100% - 32px)
      );
  }

  #memorial-list {
    grid-template-columns:
      repeat(
        auto-fill,
        minmax(180px, 1fr)
      );
  }
}

@media (max-width: 760px) {

  .page {
    width:
      calc(100% - 20px);
  }

  .hero {
    padding-top: 14px;
  }

  .hero h1 {
    font-size:
      clamp(
        42px,
        14vw,
        68px
      );
  }

  .subtitle {
    font-size: 16px;
    letter-spacing: 0.04em;
  }

  #memorial-list {
    grid-template-columns:
      repeat(
        2,
        minmax(0, 1fr)
      );

    gap: 8px;
  }

  .person-card {
    min-height: 126px;

    padding:
      10px 10px 40px;
  }

  .person-name {
    font-size: 15px;
  }

  .person-name-ar {
    font-size: 13px;
  }

  .person-footer {
    left: 10px;
    right: 10px;
    bottom: 9px;
  }

  .person-age {
    font-size: 11px;
  }

  .reflection-break {
    min-height: 340px;

    margin:
      42px 0;
  }

  .reflection-inner {
    padding:
      0 10px;
  }

  .reflection-text {
    font-size:
      clamp(
        30px,
        9vw,
        48px
      );
  }
}


/* -------------------------------------------------
   Reduced motion
------------------------------------------------- */

@media (
  prefers-reduced-motion: reduce
) {

  html {
    scroll-behavior: auto;
  }

  .person-card {
    opacity: 1;

    transform: none;

    transition: none;
  }

}

/* -------------------------------------------------
   Card hover interaction
------------------------------------------------- */

@media (hover: hover) and (pointer: fine) {
  .person-card:hover {
    transform: translateY(-3px);

    border-color:
      rgba(255,255,255,0.14);

    background:
      linear-gradient(
        180deg,
        rgba(255,255,255,0.05),
        rgba(255,255,255,0.024)
      );

    box-shadow:
      inset
      0 1px 0
      rgba(255,255,255,0.04),

      0 14px 34px
      rgba(0,0,0,0.28);
  }
}

/* SAVEGAZA CLEAN OVERRIDES START */

.person-card {
  min-height: 168px;
  padding: 14px 14px 50px;
}

.person-name {
  margin-bottom: 10px;
}

.person-name-ar {
  margin-bottom: 8px;
}

.person-dob {
  font-size: 12px;
  line-height: 1.45;
  color: rgba(235, 229, 222, 0.62);
  margin-top: 4px;
}

.person-footer {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 12px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.person-age {
  font-size: 13px;
  line-height: 1;
  padding: 0 10px;
  min-width: 44px;
  height: 28px;
}
@media (max-width: 760px) {
  .person-card {
    min-height: 158px;
    padding: 12px 12px 48px;
  }

  .person-dob {
    font-size: 11px;
  }

  .person-age {
    font-size: 12px;
    height: 26px;
  }
}

/* SAVEGAZA CLEAN OVERRIDES END */





/* -------------------------------------------------
   Data source
------------------------------------------------- */

.source-strip {
  position: fixed;
  right: 18px;
  bottom: 10px;
  z-index: 30;

  max-width: 430px;

  font-size: 12px;
  line-height: 1.35;
  letter-spacing: 0.01em;

  color: rgba(235, 229, 222, 0.42);

  text-align: right;
  white-space: normal;

  pointer-events: none;
  user-select: none;
}

@media (max-width: 760px) {
  .source-strip {
    right: 10px;
    bottom: 8px;

    max-width: calc(100% - 20px);

    font-size: 11px;

    color: rgba(235, 229, 222, 0.40);
  }
}
