/* Gilded countdown · Luxe (core/countdown/012). Under a small gilded arch, a tall gold arched window holds the engine's
   countdown (it ticks in runtime.js): days, hours and minutes in ink numerals, each unit under its own fine gold arched
   niche; its label is the kicker; seconds are hidden; after the day the done line. As it scrolls in, the window traces
   from its keystone down both sides, the niches trace one by one, the label and numbers print; when a number changes
   it sinks out of its niche and the new one rises in (section.js). A small spray sits at the window's foot and drifts
   with the scroll. Before-states only under html.kjy-fx. */
@property --cd012-arch-a { syntax: "<angle>"; inherits: true; initial-value: 180deg; }
@property --cd012-niche-a { syntax: "<angle>"; inherits: true; initial-value: 180deg; }
.cd012 { padding: calc(var(--k-ga-gap) / 2) 0; color: var(--k-ink); text-align: center; }
.cd012 .kjy-countdown__label { margin: 0 auto calc(clamp(14px, 4.4cqw, 24px) + 10px); max-inline-size: 26em; text-wrap: balance;
  font: 600 clamp(11px, 3.1cqw, 13.5px)/1.5 var(--k-font-display); font-variant-numeric: lining-nums; letter-spacing: .22em; text-transform: uppercase; color: var(--k-ink-soft); }
.cd012 .kjy-countdown__units { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: min(100%, 520px); margin: 0 auto; }
.cd012 .kjy-unit { --cd012-pad: clamp(14px, 5.4cqw, 34px); position: relative; display: flex; flex-direction: column; align-items: center; padding: .1em var(--cd012-pad) clamp(14px, 4cqw, 20px);
  font-size: clamp(40px, 13cqw, 64px); }
.cd012 .kjy-unit:nth-child(2) { --cd012-u: 1; }
.cd012 .kjy-unit:nth-child(3) { --cd012-u: 2; }
/* each unit's niche: a fine gold arch over the number and its label */
.cd012 .kjy-unit::before { content: ""; position: absolute; left: calc(var(--cd012-pad) - .26em); right: calc(var(--cd012-pad) - .26em); top: -.24em; bottom: 0;
  border: .9px solid #B89A62; border-bottom: 0; border-radius: 50% 50% 0 0 / .55em .55em 0 0; pointer-events: none;
  -webkit-mask: conic-gradient(#000 var(--cd012-niche-a), transparent 0 calc(360deg - var(--cd012-niche-a)), #000 0);
  mask: conic-gradient(#000 var(--cd012-niche-a), transparent 0 calc(360deg - var(--cd012-niche-a)), #000 0); }
.cd012 .kjy-unit:has([data-unit="s"]) { display: none; }
.cd012 .kjy-unit__n { position: relative; font: 500 1em/1 var(--k-font-display); font-variant-numeric: lining-nums tabular-nums; color: var(--k-ink); }
.cd012 .kjy-unit__l { margin-top: clamp(8px, 2.2cqw, 12px); font: 600 clamp(10px, 2.8cqw, 13px)/1 var(--k-font-display); font-variant-numeric: lining-nums; letter-spacing: .2em;
  text-transform: uppercase; color: var(--k-ink-soft); }
.cd012 .kjy-countdown__done { margin: 0; font: 400 clamp(30px, 9cqw, 44px)/1.2 var(--k-font-script); font-variant-numeric: lining-nums; color: var(--k-gold-ink); }

/* the gilded arch above (the skin draws it; a width of its own for other skins) */
.cd012 .k-aj { width: var(--k-aj-w, min(210px, 58%)); }
/* the arched window: two gold rules (1.1 and .6 px) whose tops are one arch, the keystone at the apex */
.cd012 .cd012__win { --cd012-ry: clamp(60px, 18vw, 130px); position: relative; box-sizing: border-box; width: min(92%, 34em); margin: 0 auto;
  padding: calc(var(--cd012-ry) * .55 + 16px) 6% 5px; }
@media (min-aspect-ratio: 1/1) and (min-width: 1000px) and (hover: hover) and (pointer: fine) { .cd012 .cd012__win { width: min(56%, 600px); } .cd012 .kjy-unit { font-size: 64px; } }
.cd012 .cd012__frm { position: absolute; inset: -5px 0 0; pointer-events: none;
  -webkit-mask: conic-gradient(#000 var(--cd012-arch-a), transparent 0 calc(360deg - var(--cd012-arch-a)), #000 0);
  mask: conic-gradient(#000 var(--cd012-arch-a), transparent 0 calc(360deg - var(--cd012-arch-a)), #000 0); }
.cd012 .cd012__frm::before, .cd012 .cd012__frm::after { content: ""; position: absolute; inset: 5px 0 0; border: 1.1px solid #A3834A;
  border-radius: 50% 50% 2px 2px / var(--cd012-ry) var(--cd012-ry) 2px 2px; }
.cd012 .cd012__frm::after { inset: 10px 5px 5px; border: .6px solid #B89A62; border-radius: 50% 50% 1px 1px / calc(var(--cd012-ry) - 5px) calc(var(--cd012-ry) - 5px) 1px 1px; }
.cd012 .cd012__frm b { position: absolute; left: 50%; top: 1.5px; width: 7px; height: 7px; margin-left: -3.5px; background: #A3834A; rotate: 45deg; }
/* the old number while it sinks (section.js) */
.cd012 .cd012__gw { position: absolute; overflow: hidden; overflow: clip; pointer-events: none; }
.cd012 .cd012__gw > span { display: block; font: 500 1em/1 var(--k-font-display); font-variant-numeric: lining-nums tabular-nums; color: var(--k-ink); text-align: center; }
/* a small spray at the window's foot; it drifts up with the scroll (near) */
.cd012 .cd012__sprig { position: absolute; left: -16%; bottom: 0; width: clamp(72px, 20vw, 130px); aspect-ratio: 1.1; pointer-events: none;
  translate: 0 calc(var(--cd012-dz, 0) * -36px); filter: drop-shadow(0 8px 12px rgb(66 46 18 / .2)); }
.cd012 .cd012__sp { position: absolute; display: block; background-position: center; background-size: 100% 100%; background-repeat: no-repeat; }
.cd012 .cd012__sp--euc { left: 4%; bottom: 18%; width: 62%; transform: rotate(-38deg); background-image: var(--k-ga-art-p-euc1); aspect-ratio: var(--k-ga-ar-p-euc1, .6); }
.cd012 .cd012__sp--daisy { left: 30%; bottom: 0; width: 46%; background-image: var(--k-ga-art-p-daisy2); aspect-ratio: var(--k-ga-ar-p-daisy2, 1); }
/* the entrance: the window traces from its keystone, the niches one by one, then the words (the skin's Luxe entrance) */
html.kjy-fx:not(.kjy-lite):not(.motion-reduce) .cd012.k-wait .cd012__frm { --cd012-arch-a: 0deg; }
html.kjy-fx:not(.kjy-lite):not(.motion-reduce) .cd012.k-wait .cd012__frm b { opacity: 0; translate: 0 -4px; }
html.kjy-fx:not(.kjy-lite):not(.motion-reduce) .cd012.k-wait .kjy-unit { --cd012-niche-a: 0deg; }
.cd012.k-in .cd012__frm { --cd012-arch-a: 180deg; transition: --cd012-arch-a 1500ms var(--k-gild-ease) 250ms; }
.cd012.k-in .cd012__frm b { transition: opacity 300ms ease, translate 400ms var(--k-print-ease); }
.cd012.k-in .kjy-unit { --cd012-niche-a: 180deg; transition: --cd012-niche-a 1100ms var(--k-gild-ease) calc(900ms + var(--cd012-u, 0) * 120ms); }
