/* "Răzuiește data" (Components/Heroes/ScratchHero.razor, layouts/scratch.js), over site.css and the theme: the classic card
   with its date on three medallions; in a browser, first under gold foil, the rest of the invitation waiting until they
   are scratched off. Only the colours every theme names, and the invitation's own fonts. */
.scratch-date{position:relative;margin:28px auto 4px;text-align:center}
.scratch-title{font-family:var(--serif);font-style:italic;font-size:clamp(22px,4.4vw,28px);line-height:1.2;color:var(--ink)}
.scratch-hint{margin-top:6px;font-size:12px;letter-spacing:1.6px;text-transform:uppercase;color:var(--muted)}
:is(:lang(zh),:lang(ja)) .scratch-hint{letter-spacing:.5px}
/* Written whole (paper, the PDF, after scratching): the title and the hint belong to the foil. */
html:not([data-scratch]) .scratch-title,html:not([data-scratch]) .scratch-hint{display:none}
.scratch-coins{display:flex;justify-content:center;gap:clamp(10px,3vw,20px);margin:18px 0 10px}
.scratch-coin{position:relative;width:min(112px,calc((100% - 40px) / 3));aspect-ratio:1;flex:none;border-radius:50%;display:grid;place-items:center;
  background:var(--paper);color:var(--ink);font-family:var(--serif);line-height:1;
  box-shadow:inset 0 0 0 2px var(--gold),inset 0 0 0 6px var(--paper),inset 0 0 0 7px color-mix(in srgb,var(--gold) 45%,var(--paper)),0 8px 20px rgb(0 0 0 / .08)}
/* Figures all of one height (the font's own are old-style ones: a 20 would sit low in its medallion, a 16 high). */
.scratch-coin span{padding:0 8px;overflow-wrap:anywhere;font-variant-numeric:lining-nums}
.scratch-day span{font-size:clamp(38px,9vw,50px)}
.scratch-month span{font-size:clamp(15px,3.8vw,20px);font-style:italic}
/* A long month's name ("septembrie") smaller, to fit its medallion. */
.scratch-month.scratch-long span{font-size:clamp(12px,3.1vw,16px)}
.scratch-year span{font-size:clamp(22px,5.4vw,28px);letter-spacing:1px;text-indent:1px}
.scratch-weekday{font-size:12px;letter-spacing:3px;text-transform:uppercase;color:var(--muted)}
.scratch-reveal{margin-top:14px;border:0;background:none;padding:6px 4px;font:inherit;font-size:13px;color:var(--accent,var(--green));
  text-decoration:underline;text-underline-offset:4px;cursor:pointer}
.scratch-reveal:focus-visible{outline:3px solid var(--gold);outline-offset:3px}

/* — covered (layouts/scratch.js): the card down to its medallions, then nothing until they are uncovered — */
html[data-scratch] .invite-nav,html[data-scratch] main>:not(.scratch-hero):not(.preview-banner):not(script){display:none}
html[data-scratch] .scratch-hero :is(.hero-cta,.tiny-note,.scratch-weekday,.floral-bottom){display:none}
html[data-scratch] .scratch-hero{padding-bottom:64px}
.scratch-coin canvas{position:absolute;inset:0;width:100%;height:100%;border-radius:50%;touch-action:none;cursor:pointer;
  filter:drop-shadow(0 2px 3px rgb(0 0 0 / .18))}
.scratch-coin.scratched canvas{transition:opacity .5s;opacity:0;pointer-events:none}
/* Until the foil is drawn (the fonts first): a plain gold disc, so the date never shows through. */
html[data-scratch] .scratch-coin:not(.scratched):not(:has(canvas)):after{content:'';position:absolute;inset:0;border-radius:50%;
  background:linear-gradient(135deg,color-mix(in srgb,var(--gold) 45%,#fff),color-mix(in srgb,var(--gold) 80%,#000))}
.scratch-coin.scratched span{animation:scratch-shines .9s ease-out both}
@keyframes scratch-shines{0%{transform:scale(.92)}45%{transform:scale(1.08)}100%{transform:none}}
.scratch-confetti{position:absolute;left:50%;top:58%;width:8px;height:12px;border-radius:2px;pointer-events:none;z-index:5;
  animation:scratch-confetti 1.6s var(--d,0s) cubic-bezier(.15,.7,.3,1) both}
.scratch-confetti:nth-child(3n){width:7px;height:7px;border-radius:50%}
@keyframes scratch-confetti{from{transform:translate(-50%,-50%) scale(.4);opacity:1}
  70%{opacity:1}to{transform:translate(calc(-50% + var(--x)),calc(-50% + var(--y) + 120px)) rotate(var(--r));opacity:0}}
/* Uncovered: the rest of the card appears. */
.scratch-hero.just-revealed :is(.hero-cta,.tiny-note,.scratch-weekday){animation:scratch-appears .8s ease-out both}
@keyframes scratch-appears{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}

@media (max-width:420px){.scratch-coins{gap:8px}.scratch-coin{width:calc((100% - 16px) / 3)}}
@media (prefers-reduced-motion:reduce){.scratch-hero *,.scratch-confetti{animation:none!important}}
@media print{.scratch-coin{box-shadow:inset 0 0 0 2px var(--gold),inset 0 0 0 6px var(--paper),inset 0 0 0 7px color-mix(in srgb,var(--gold) 45%,var(--paper))}.scratch-reveal,.scratch-coin canvas{display:none!important}}
