/* Sepals Jewelry: first-visit intro (homepage only).
   Shown once per visitor; add ?intro to the homepage address to watch it again. */

/* Before the overlay is built, keep the page covered so nothing flashes */
html.sj-wait::after { content: ""; position: fixed; inset: 0; z-index: 9999; background: #2c571f; }
html.sj-intro body { overflow: hidden; }

/* Hold the homepage's own entrance animations until the sepals part */
html.sj-hold .hero .frame,
html.sj-hold .hero-copy > * { animation-play-state: paused; }
html.sj-settle #main { animation: si-settle 1.9s cubic-bezier(.2,.7,.2,1) both; transform-origin: 50% 0; }

.si { position: fixed; inset: 0; z-index: 9998; pointer-events: auto; }
.si .si-curtain { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.si .si-petal { transform-box: view-box; transform-origin: 0 0; transform: rotate(var(--r)); }
.si .si-petal .leaf { fill: url(#siLeaf); }
.si .si-petal.alt .leaf { fill: url(#siLeafAlt); }
.si .si-petal .edge { fill: none; stroke: rgba(255,251,206,.20); stroke-width: 1; vector-effect: non-scaling-stroke; }
.si .si-petal .rib { fill: none; stroke: rgba(255,251,206,.09); stroke-width: 1; vector-effect: non-scaling-stroke; }

.si .si-emblem { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2.2vmin; }
.si .si-budwrap { position: relative; display: grid; place-items: center; }
.si .si-bud { width: min(30vmin, 190px); height: min(30vmin, 190px); overflow: visible; }
.si .si-bud .glow { opacity: 0; transform-box: fill-box; transform-origin: center; }
.si .si-bud .pearl { opacity: 0; transform-box: fill-box; transform-origin: center; }
.si .si-bud .sep { fill: none; stroke: #fffbce; stroke-width: 1.1; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 240; stroke-dashoffset: 240; transform-box: view-box; transform-origin: 0 55px; }
.si .si-mark { position: absolute; width: min(30vmin, 190px); height: auto; opacity: 0; }
.si .si-word { font-family: "DM Serif Display", Georgia, serif; color: #fffbce; font-size: clamp(28px, 5.4vmin, 52px);
  letter-spacing: .06em; display: flex; line-height: 1; margin: 0; font-weight: 400; }
.si .si-word span { opacity: 0; transform: translateY(.35em); display: inline-block; white-space: pre; }
.si .si-tag { font-family: "Libertinus Serif", Georgia, serif; font-style: italic; color: rgba(255,251,206,.78);
  font-size: clamp(14px, 2.2vmin, 19px); letter-spacing: .04em; opacity: 0; margin: 0; }
.si .si-skip { position: absolute; right: 24px; bottom: 22px; background: none; border: 1px solid rgba(255,251,206,.35);
  color: #fffbce; font-family: "Libertinus Serif", Georgia, serif; font-size: 14px; letter-spacing: .08em;
  padding: 9px 16px; border-radius: 999px; cursor: pointer; opacity: 0; transition: background .3s, border-color .3s; }
.si .si-skip:hover, .si .si-skip:focus-visible { background: rgba(255,251,206,.08); border-color: rgba(255,251,206,.6); outline: none; }
.si.leaving { transition: opacity .45s ease; opacity: 0; }

/* Timeline, about 5 seconds */
.si.play .sep.l { animation: si-draw 1.3s cubic-bezier(.6,0,.25,1) .25s forwards, si-open-l 1s cubic-bezier(.55,0,.2,1) 1.55s forwards; }
.si.play .sep.r { animation: si-draw 1.3s cubic-bezier(.6,0,.25,1) .25s forwards, si-open-r 1s cubic-bezier(.55,0,.2,1) 1.55s forwards; }
.si.play .pearl { animation: si-in .7s ease 1.75s forwards, si-earring 1.1s cubic-bezier(.5,0,.2,1) 2.55s forwards; }
.si.play .glow { animation: si-glow 1.6s ease-out 1.8s forwards; }
.si.play .si-bud { animation: si-budout .6s ease 3.35s forwards; }
.si.play .si-mark { animation: si-markin 1s cubic-bezier(.2,.7,.2,1) 2.75s forwards; }
.si.play .si-word span { animation: si-letter .8s cubic-bezier(.2,.7,.2,1) forwards; animation-delay: calc(3s + var(--i) * 45ms); }
.si.play .si-tag { animation: si-in .9s ease 3.55s forwards; }
.si.play .si-skip { animation: si-in .6s ease .6s forwards, si-out .4s ease 4.6s forwards; }
.si.play .si-emblem { animation: si-emblemout .8s cubic-bezier(.6,0,.4,1) 4.55s forwards; }
.si.play .si-petal { animation: si-part 1.5s cubic-bezier(.7,0,.2,1) forwards; animation-delay: calc(4.7s + var(--i) * 70ms); }

@keyframes si-draw { to { stroke-dashoffset: 0; } }
@keyframes si-open-l { to { transform: rotate(-41deg); } }
@keyframes si-open-r { to { transform: rotate(41deg); } }
@keyframes si-in { to { opacity: 1; } }
@keyframes si-out { to { opacity: 0; } }
@keyframes si-glow { 0% { opacity: 0; transform: scale(.4); } 45% { opacity: 1; } 100% { opacity: .55; transform: scale(1.25); } }
@keyframes si-earring { 0% { transform: none; opacity: 1; } 100% { transform: translate(24px, -3px) scale(.6); opacity: 1; } }
@keyframes si-budout { to { opacity: 0; transform: scale(.92); } }
@keyframes si-markin { from { opacity: 0; transform: translateY(8px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes si-letter { to { opacity: 1; transform: none; } }
@keyframes si-emblemout { to { opacity: 0; transform: scale(1.06); } }
@keyframes si-part { to { transform: rotate(var(--r)) translateY(-330px) rotate(var(--tw)) scale(1.25); } }
@keyframes si-settle { from { transform: scale(1.04); filter: blur(2px); } to { transform: none; filter: none; } }

/* Visitors who prefer reduced motion never see the intro (see intro.js). */
