/* Demo Home — Dogs · In Loving Memory (2026-11-17, "memorial").
   C2/Solace language, softened: night glass + warm candle-gold. Safe-area aware
   (uses --sat/--sab/--sal/--sar from safearea.css). */
:root{
  --dm-gold: #f1d6a0;
  --dm-gold-2: #d9b479;
  --dm-ink: #f6efe4;
  --dm-soft: rgba(246, 239, 228, 0.68);
}

/* ---------- tribute card on the Dogs main view ---------- */
.dm-card{
  position: relative; overflow: hidden; isolation: isolate;
  appearance: none; width: 100%; cursor: pointer; text-align: left; font: inherit; color: var(--dm-ink);
  display: flex; align-items: center; gap: 16px;
  margin: 4px 0 18px; padding: 16px 18px; min-height: 104px;
  border-radius: 22px;
  border: 1px solid rgba(241, 214, 160, 0.26);
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(241, 214, 160, 0.14), transparent 55%),
    linear-gradient(180deg, rgba(22, 24, 34, 0.94), rgba(12, 14, 22, 0.86));
  box-shadow: 0 14px 34px -22px rgba(0,0,0,.9), inset 0 1px 0 rgba(255,255,255,.05);
  touch-action: manipulation;
  transition: transform .25s var(--ease, ease), border-color .25s ease;
}
.dm-card:active{ transform: scale(.985); }
.dm-card:hover{ border-color: rgba(241, 214, 160, 0.42); }
.dm-card-glow{
  position: absolute; inset: -40% -10% auto auto; width: 60%; height: 180%; z-index: -1;
  background: radial-gradient(closest-side, rgba(241, 214, 160, 0.16), transparent 70%);
  animation: dmGlow 9s ease-in-out infinite alternate;
}
@keyframes dmGlow{ from{ transform: translateX(10%); opacity: .55; } to{ transform: translateX(-30%); opacity: 1; } }
.dm-card-pics{ position: relative; flex: 0 0 auto; width: 118px; height: 72px; }
.dm-card-pics img{
  position: absolute; top: 0; width: 72px; height: 72px; border-radius: 50%; object-fit: cover;
  border: 2px solid rgba(241, 214, 160, 0.55); box-shadow: 0 6px 18px -8px rgba(0,0,0,.9);
}
.dm-card-pics img:first-child{ left: 0; z-index: 1; }
.dm-card-pics img:last-child{ left: 46px; }
.dm-card-txt{ display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1 1 auto; }
.dm-card-txt em{
  font-style: normal; font-size: 10px; font-weight: 800; letter-spacing: .22em; text-transform: uppercase;
  color: var(--dm-gold);
}
.dm-card-txt b{ font-family: "Oswald", sans-serif; font-weight: 400; font-size: 26px; letter-spacing: .04em; line-height: 1.1; }
.dm-card-sub{ display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--dm-soft); }
.dm-card-sub img{ width: 22px; height: 22px; border-radius: 50%; object-fit: cover; border: 1px solid rgba(241,214,160,.4); }
.dm-card-go{ flex: 0 0 auto; font-size: 30px; color: var(--dm-gold); opacity: .8; padding-right: 2px; }
@media (max-width: 480px){
  .dm-card{ gap: 12px; padding: 14px; }
  .dm-card-pics{ width: 96px; height: 58px; }
  .dm-card-pics img{ width: 58px; height: 58px; }
  .dm-card-pics img:last-child{ left: 38px; }
  .dm-card-txt b{ font-size: 22px; }
}

/* ---------- full-screen memorial sheet ---------- */
.dm-overlay{
  position: fixed; inset: 0; z-index: 60;
  background: #07090e;
  opacity: 0; transition: opacity .42s ease;
  overflow: hidden;
}
.dm-overlay.show{ opacity: 1; }
.dm-overlay[hidden]{ display: none; }
.dm-sheet{
  position: absolute; inset: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  color: var(--dm-ink);
  font-family: "Montserrat", "Helvetica Neue", sans-serif;
  background:
    radial-gradient(90% 60% at 50% -10%, rgba(241, 214, 160, 0.13), transparent 60%),
    radial-gradient(70% 50% at 100% 100%, rgba(114, 217, 248, 0.06), transparent 60%),
    linear-gradient(180deg, #0d1018 0%, #090b11 100%);
  padding: 0 max(18px, var(--sar, 0px)) calc(28px + var(--sab, 0px)) max(18px, var(--sal, 0px));
  box-sizing: border-box;
}
/* sticky header, kept below the status bar / Dynamic Island */
.dm-head{
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: 0 calc(-1 * max(18px, var(--sar, 0px))) 0 calc(-1 * max(18px, var(--sal, 0px)));
  padding: max(14px, var(--sat, 0px)) max(18px, var(--sar, 0px)) 10px max(18px, var(--sal, 0px));
  background: linear-gradient(180deg, rgba(9, 11, 17, .92) 0%, rgba(9, 11, 17, .72) 70%, rgba(9, 11, 17, 0) 100%);
}
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))){
  .dm-head{ -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
}
.dm-back, .dm-x{
  position: relative; z-index: 2; appearance: none; cursor: pointer; font: inherit;
  min-width: 44px; min-height: 44px; touch-action: manipulation;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--dm-gold); background: rgba(241, 214, 160, 0.07);
  border: 1px solid rgba(241, 214, 160, 0.3); border-radius: 999px;
}
.dm-back{ padding: 0 16px; font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.dm-x{ font-size: 24px; line-height: 1; padding: 0; }
.dm-head-k{ font-size: 10px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: rgba(246,239,228,.45); }

.dm-hero{ text-align: center; padding: 18px 8px 26px; animation: dmRise 1.2s var(--ease, ease) both; }
.dm-kicker{ font-size: 11px; font-weight: 800; letter-spacing: .32em; text-transform: uppercase; color: var(--dm-gold); }
.dm-kicker.sm{ font-size: 9.5px; letter-spacing: .26em; margin-bottom: 4px; }
.dm-hero h1{
  margin: 10px 0 8px; font-family: "Oswald", sans-serif; font-weight: 300;
  font-size: clamp(40px, 7vw, 68px); letter-spacing: .06em; line-height: 1.02;
}
.dm-hero h1 span{ color: var(--dm-gold); font-weight: 200; }
.dm-hero p{ margin: 0; font-size: 15px; color: var(--dm-soft); letter-spacing: .02em; }

.dm-pair{ display: grid; grid-template-columns: 1fr 1fr; gap: 22px; max-width: 1180px; margin: 0 auto; }
@media (max-width: 760px){ .dm-pair{ grid-template-columns: 1fr; gap: 30px; } }
.dm-dog{ display: flex; flex-direction: column; gap: 14px; animation: dmFade 1.4s ease both; }
.dm-dog:nth-child(2){ animation-delay: .18s; }
@keyframes dmFade{ from{ opacity: 0; } to{ opacity: 1; } }
@keyframes dmRise{ from{ opacity: 0; transform: translateY(14px); } to{ opacity: 1; transform: none; } }

/* drifting gallery */
.dm-stage{
  position: relative; overflow: hidden; cursor: pointer;
  width: 100%; height: clamp(340px, 58vh, 640px);
  border-radius: 26px; background: #0b0d13;
  border: 1px solid rgba(241, 214, 160, 0.18);
  box-shadow: 0 30px 60px -34px rgba(0,0,0,.95), 0 0 0 6px rgba(241, 214, 160, 0.03);
  -webkit-tap-highlight-color: transparent;
}
@media (max-width: 760px){ .dm-stage{ height: auto; aspect-ratio: 4 / 4.6; } }
.dm-stage.small{ height: auto; aspect-ratio: 1 / 1; border-radius: 22px; }
.dm-layer{ position: absolute; inset: 0; opacity: 0; transition: opacity 2.4s ease; }
.dm-layer.on{ opacity: 1; }
.dm-bg{ /* pre-blurred 96px copy (…-bg.jpg) stretched to fill: soft matte, no live CSS blur */
  position: absolute; inset: 0; background-size: cover; background-position: center;
}
.dm-img{
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain;
  transform-origin: 50% 50%;
}
.dm-layer.on .dm-img.kb1{ animation: dmKb1 16s ease-out both; }
.dm-layer.on .dm-img.kb2{ animation: dmKb2 16s ease-out both; }
.dm-layer.on .dm-img.kb3{ animation: dmKb3 16s ease-out both; }
.dm-layer.on .dm-img.kb4{ animation: dmKb4 16s ease-out both; }
@keyframes dmKb1{ from{ transform: scale(1.02) translate(0,0); } to{ transform: scale(1.10) translate(-1.5%, -1%); } }
@keyframes dmKb2{ from{ transform: scale(1.10) translate(1%, 1%); } to{ transform: scale(1.02) translate(0,0); } }
@keyframes dmKb3{ from{ transform: scale(1.03) translate(1.5%, 0); } to{ transform: scale(1.11) translate(-1%, 1%); } }
@keyframes dmKb4{ from{ transform: scale(1.09) translate(-1%, 1%); } to{ transform: scale(1.03) translate(1%, -.5%); } }
.dm-vignette{
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 90% at 50% 40%, transparent 60%, rgba(5,6,10,.55) 100%),
              linear-gradient(180deg, transparent 70%, rgba(5,6,10,.35) 100%);
}

.dm-who{ text-align: center; padding: 0 6px; }
.dm-who h2{ margin: 0; font-family: "Oswald", sans-serif; font-weight: 400; font-size: 34px; letter-spacing: .1em; text-transform: uppercase; }
.dm-dates{
  display: inline-flex; align-items: center; gap: 12px; margin-top: 4px;
  font-size: 13px; font-weight: 600; letter-spacing: .08em; color: var(--dm-gold);
}
.dm-dates i{ display: inline-block; width: 22px; height: 1px; background: rgba(241,214,160,.55); }
.dm-meta{ margin-top: 6px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: rgba(246,239,228,.5); }
.dm-line{ margin: 10px auto 0; max-width: 34em; font-size: 15px; line-height: 1.55; color: var(--dm-soft); }

.dm-penny{
  display: flex; align-items: center; gap: 20px;
  max-width: 640px; margin: 40px auto 0; padding: 16px;
  border-radius: 24px; border: 1px solid rgba(241, 214, 160, 0.14);
  background: rgba(255,255,255,.025);
}
.dm-penny .dm-stage{ flex: 0 0 150px; width: 150px; }
.dm-penny .dm-who{ text-align: left; padding: 0; }
.dm-penny .dm-who h2{ font-size: 26px; }
.dm-penny .dm-line{ margin: 6px 0 0; font-size: 14px; }
@media (max-width: 480px){
  .dm-penny{ gap: 14px; padding: 12px; }
  .dm-penny .dm-stage{ flex-basis: 112px; width: 112px; }
}

.dm-close-line{ text-align: center; margin: 46px auto 10px; max-width: 520px; }
.dm-heart{ font-size: 22px; opacity: .9; animation: dmBreath 5s ease-in-out infinite; }
@keyframes dmBreath{ 0%,100%{ transform: scale(1); opacity: .75; } 50%{ transform: scale(1.12); opacity: 1; } }
.dm-close-line p{
  margin: 10px 0 8px; font-family: "Oswald", sans-serif; font-weight: 300;
  font-size: 22px; line-height: 1.4; letter-spacing: .06em; color: var(--dm-ink);
}
.dm-close-line small{ font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--dm-gold); }

@media (prefers-reduced-motion: reduce){
  .dm-layer{ transition: none; }
  .dm-layer.on .dm-img{ animation: none !important; }
  .dm-card-glow, .dm-heart, .dm-hero, .dm-dog{ animation: none !important; }
}
