/* "Your child's own cards": a ring of picture cards on an invisible cylinder, seen in perspective, that the page's scroll turns (own.js).
   Cards come in small and far away at the top left, swing down and forward to the front (biggest, lowest) and climb away again on the right,
   tilting along the arc. The section pins (sticky full-screen stage) while the ring turns. The arc fills the stage with its low point near
   the bottom, and the heading + copy sit in the middle of the U, so the cards orbit around the text.
   Realism: a lit stage (warm spotlight from above, darker floor, soft vignette, edges fading into the page), a contact shadow on the floor,
   and cards treated as laminated card stock: thickness, a lit top edge, a floor shadow that grows as a card comes forward, shading on the side
   turned away from the light, haze on far cards and a sheen that slides across as they turn. Loads after style.css (replaces the old panel). */
.own { display: block; padding: 0; position: relative; }
.own.pinned { height: 380vh; height: 380svh; }
.own-pin { position: relative; height: 100vh; height: 100svh; min-height: 560px; overflow: hidden; }
.own.pinned .own-pin { position: sticky; top: 0; }

/* the stage */
.own-pin::before { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(62% 58% at 50% 42%, rgba(255, 252, 246, .95) 0%, rgba(255, 252, 246, .55) 38%, rgba(255, 252, 246, 0) 72%),
    radial-gradient(120% 70% at 50% 108%, rgba(132, 104, 70, .17) 0%, rgba(132, 104, 70, 0) 62%),
    radial-gradient(140% 120% at 50% 40%, rgba(0, 0, 0, 0) 55%, rgba(96, 74, 48, .1) 100%),
    linear-gradient(#efe8dc, #e9e0d1);
  -webkit-mask-image: linear-gradient(transparent, #000 13%, #000 87%, transparent); mask-image: linear-gradient(transparent, #000 13%, #000 87%, transparent); }
/* the arc fills the stage; the text is centred inside it, above the cards in stacking order */
.own-arc { position: absolute; inset: 0; z-index: 1; overflow-x: clip; perspective-origin: 50% 42%; }
.own-text { position: absolute; z-index: 2; left: 50%; top: 42%; transform: translate(-50%, -50%); width: min(calc(60 * var(--u)), 100% - 12vw); text-align: center; }
.own-ring { position: absolute; inset: 0; transform-style: preserve-3d; }
/* soft contact shadow where the front of the ring meets the floor */
.own-floor { position: absolute; left: 22%; right: 22%; top: calc(76% + clamp(140px, 18vw, 300px) / 2 - 12px); height: clamp(40px, 5vw, 80px); pointer-events: none;
  background: radial-gradient(closest-side, rgba(84, 60, 34, .26), rgba(84, 60, 34, .1) 55%, rgba(84, 60, 34, 0)); filter: blur(6px); }

/* the cards */
.ac { --w: min(clamp(140px, 18vw, 300px), 30vh); --lift: 0; --dl: 0; --dr: 0; --haze: 0; --sx: 50%; --sh: .2;
  position: absolute; left: calc(50% - var(--w) / 2); top: 76%; width: var(--w); height: var(--w); margin-top: calc(var(--w) / -2);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3em; padding: calc(var(--w) * .09) calc(var(--w) * .09) calc(var(--w) * .08);
  border: 1px solid rgba(94, 70, 40, .16); border-radius: calc(var(--w) * .09);
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, .8),                          /* lit top edge */
    inset 0 -3px 0 rgba(110, 78, 40, .1),                              /* card thickness */
    0 1px 1px rgba(70, 48, 28, .12), 0 3px 0 -1px rgba(150, 118, 80, .35),   /* the edge of the stock */
    0 calc(8px + var(--lift) * 30px) calc(16px + var(--lift) * 46px) calc(-6px - var(--lift) * 8px) rgba(70, 48, 28, calc(.12 + var(--lift) * .26)),
    0 calc(2px + var(--lift) * 6px) calc(4px + var(--lift) * 8px) rgba(70, 48, 28, calc(.08 + var(--lift) * .08));
  font-weight: 800; font-size: calc(var(--w) * .1); color: var(--ink); opacity: 0; will-change: transform, opacity; backface-visibility: hidden; isolation: isolate; }
.ac img { flex: 1; min-height: 0; width: 100%; object-fit: contain; pointer-events: none; }
.ac.topic { background: linear-gradient(170deg, #ffeacf, #fbdbb6); } .ac.action { background: linear-gradient(170deg, #e3f7dc, #cdebc2); }
.ac.feeling { background: linear-gradient(170deg, #e1eefc, #c9def5); }
.ac.add { background: linear-gradient(170deg, #faf7f1, #efe8dc); border: 1.5px dashed rgba(43, 45, 49, .45); }
/* photo cards (what families actually add): the photo as a print inset in the card, label underneath */
.ac.pic { gap: calc(var(--w) * .045); padding: calc(var(--w) * .07) calc(var(--w) * .07) calc(var(--w) * .06); }
.ac.pic img { width: 100%; flex: 1; min-height: 0; object-fit: cover; border-radius: calc(var(--w) * .055); border: calc(var(--w) * .012) solid rgba(255, 255, 255, .9);
  box-shadow: 0 1px 2px rgba(70, 48, 28, .18); }
.ac.pic span { font-size: calc(var(--w) * .088); line-height: 1.1; white-space: nowrap; }
.ac.add b { font-size: calc(var(--w) * .3); font-weight: 500; line-height: 1; }
/* light on the card: a laminate sheen that slides as it turns (above), shading + haze (below it) */
.ac::before, .ac::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; }
.ac::after { z-index: 1;
  background: linear-gradient(90deg, rgba(60, 40, 20, var(--dl)), rgba(60, 40, 20, 0) 70%), linear-gradient(270deg, rgba(60, 40, 20, var(--dr)), rgba(60, 40, 20, 0) 70%),
              linear-gradient(rgba(236, 229, 216, var(--haze)), rgba(236, 229, 216, var(--haze))); }
.ac::before { z-index: 2; opacity: var(--sh); mix-blend-mode: soft-light;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, .95) 46%, rgba(255, 255, 255, .2) 54%, rgba(255, 255, 255, 0) 64%) var(--sx) 0 / 260% 100% no-repeat,
              linear-gradient(180deg, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 40%); }

.own-text p { margin: calc(1.8 * var(--u)) auto 0; max-width: 32em; font-size: max(16px, calc(1.5 * var(--u))); line-height: 1.5; font-weight: 500; color: rgba(43, 45, 49, .85); text-wrap: pretty; }

@media (max-width: 860px), (max-aspect-ratio: 1/1) {
  .own.pinned { height: 330vh; height: 330svh; }
  .ac { --w: clamp(110px, 32vw, 180px); }
  .own-text { top: 36%; width: calc(100% - 12vw); }
  .own-floor { top: calc(76% + clamp(110px, 32vw, 180px) / 2 - 8px); left: 12%; right: 12%; }
  .own-text p { font-size: 1.05rem; }
}
@media (prefers-reduced-motion: reduce) { .own.pinned { height: auto; } .own.pinned .own-pin { position: relative; } }
