/* Gagan Avencia Phase 2 possession countdown (ported from gaganavenciaph2.com).
   Sizes are in em; the anchor font-size scales with its container width. */
@import url("https://fonts.googleapis.com/css2?family=Cinzel:wght@700&display=swap");

.clock-host { position: relative; container-type: inline-size; }

.clock-anchor {
  position: absolute;
  top: 29.5%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  pointer-events: none;
  font-size: 12px;
  font-size: calc(var(--clock-k, 0.833) * 1cqw);
}

.clock-anchor .possession-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9em;
  padding: 1.6em 2.6em 1.4em;
  border: 1.5px solid #c5a059;
  border-radius: 1.25em;
  background: transparent;
  white-space: nowrap;
}

.possession-screen {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 0.5em 1.5em 0.4em;
  background: #0a0101;
  background-image:
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.45) 0px, rgba(0, 0, 0, 0.45) 1px, transparent 1px, transparent 3px),
    radial-gradient(ellipse at center, rgba(160, 20, 20, 0.16) 0%, rgba(10, 1, 1, 0.95) 100%);
  border: 1px solid rgba(130, 25, 25, 0.55);
  border-radius: 0.5em;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.95), inset 0 0 16px rgba(90, 10, 10, 0.65);
  overflow: hidden;
}

.possession-digits-container { display: flex; align-items: center; gap: 0.7em; }

.corner-tick { position: absolute; width: 6px; height: 6px; }
.corner-tick--tl { top: 2px; left: 2px; border-top: 1.5px solid #c82424; border-left: 1.5px solid #c82424; }
.corner-tick--tr { top: 2px; right: 2px; border-top: 1.5px solid #c82424; border-right: 1.5px solid #c82424; }
.corner-tick--bl { bottom: 2px; left: 2px; border-bottom: 1.5px solid #c82424; border-left: 1.5px solid #c82424; }
.corner-tick--br { bottom: 2px; right: 2px; border-bottom: 1.5px solid #c82424; border-right: 1.5px solid #c82424; }

.digit-svg { display: block; width: 1.8em; height: 3.1em; transform: skewX(-4deg); }
.digit-svg .seg-on { fill: #ff2020; filter: drop-shadow(0 0 2px #ff7777) drop-shadow(0 0 6px #ff1a1a); }
.digit-svg .seg-off { fill: #220505; opacity: 0.32; }
/* Centre a lone "1" so digit spacing stays even */
.digit-svg[data-digit="1"] polygon[data-seg="b"],
.digit-svg[data-digit="1"] polygon[data-seg="c"] { transform: translate(-17px, 0); }
.digit-svg[data-digit="1"] .seg-off { opacity: 0; }

.possession-label { margin-top: 0.9em; }
.possession-label span {
  font-family: "Cinzel", "Times New Roman", serif;
  font-size: 1.7em;
  font-weight: 700;
  color: #c5a059;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  line-height: 1.3;
  animation: goldTextGlow 3.2s cubic-bezier(0.4, 0, 0.2, 1) infinite alternate;
}

@keyframes goldTextGlow {
  0%, 100% { color: #c5a059; text-shadow: 0 0 2px rgba(197, 160, 89, 0.2); }
  50% { color: #ffebbe; text-shadow: 0 0 3px rgba(255, 235, 180, 0.85), 0 0 10px rgba(225, 185, 100, 0.65), 0 0 20px rgba(197, 160, 89, 0.4); }
}

@media (prefers-reduced-motion: reduce) {
  .possession-label span { animation: none; }
}

/* Homepage hero: image keeps its own ratio so the counter never lands on the text */
.avencia-clock-hero { background: #141414; }
.avencia-clock-hero img { display: block; width: 100%; height: auto; }
@media (max-width: 767px) {
  .avencia-clock-hero { --clock-k: 2.6; }
}

/* Floating bottom widget: appears once the homepage banner scrolls out of view */
.possession-widget {
  position: fixed;
  bottom: 24px;
  left: 50%;
  z-index: 1050;
  font-size: 14px;
  transform: translateX(-50%) translateY(24px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.4s ease, visibility 0.4s ease;
}

.possession-widget.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.possession-widget .possession-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  min-width: 250px;
  padding: 13px 28px 11px;
  background: rgba(10, 10, 10, 0.96);
  border: 1.5px solid #c5a059;
  border-radius: 6px;
  text-decoration: none;
  box-shadow: 0 14px 40px -4px rgba(0, 0, 0, 0.88), 0 0 24px -2px rgba(197, 160, 89, 0.22), inset 0 1px 0 rgba(255, 235, 175, 0.25);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.possession-widget .possession-card:hover { transform: translateY(-2px); border-color: #e5c384; }
.possession-widget .possession-label { margin-top: 0; }
.possession-widget .possession-label span { font-size: 13px; letter-spacing: 0.18em; }

.possession-tooltip {
  position: absolute;
  top: -26px;
  left: 50%;
  transform: translateX(-50%);
  padding: 3px 9px;
  background: rgba(18, 18, 18, 0.96);
  border: 1px solid rgba(197, 160, 89, 0.4);
  border-radius: 2px;
  color: #f3ebe1;
  font-size: 10px;
  letter-spacing: 0.06em;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.possession-card:hover .possession-tooltip { opacity: 1; }

@media (max-width: 767px) {
  .possession-widget { font-size: 12px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
  .possession-widget .possession-card { min-width: 210px; padding: 10px 18px 8px; gap: 7px; }
  .possession-widget .possession-label span { font-size: 11px; letter-spacing: 0.15em; }
  .possession-tooltip { display: none; }
}

/* Live digits over the Avencia project-card creative (600x415). Every size below is the
   creative's own pixel measurement divided by 6 (1cqw = 6px at 600 wide), so the overlay
   lines up with the printed counter (box x210-387 y78-175, screen x252-345 y88-135,
   digits 17x29px on a 21px pitch, "DAYS" cap height 20px at y144) at any card width. */
.card-clock {
  position: absolute;
  left: 35cqw;
  top: 13cqw;
  width: 29.67cqw;
  height: 16.33cqw;
  z-index: 1;
  pointer-events: none;
}

.card-clock .possession-card {
  position: relative;
  width: 100%;
  height: 100%;
  background: #060606;
  border: max(1px, 0.33cqw) solid #b49450;
  border-radius: 1cqw;
}

.card-clock .possession-screen {
  position: absolute;
  left: 6.67cqw;
  top: 1.33cqw;
  width: 15.67cqw;
  height: 8cqw;
  padding: 0;
  display: flex;
  justify-content: center;
  background: #30221d;
  border: 1px solid rgba(130, 25, 25, 0.55);
  border-radius: 0.5cqw;
  box-shadow: inset 0 1px 6px rgba(0, 0, 0, 0.8);
}

.card-clock .corner-tick { width: 0.9cqw; height: 0.9cqw; }
.card-clock .possession-digits-container { gap: 0.42cqw; }
.card-clock .digit-svg { width: 3.08cqw; height: 5.33cqw; transform: none; }
.card-clock .digit-svg .seg-on { fill: #ff1414; filter: drop-shadow(0 0 1px rgba(255, 30, 30, 0.6)); }
.card-clock .digit-svg .seg-off { fill: #220505; opacity: 0.45; }

.card-clock .possession-label {
  position: absolute;
  left: 0;
  right: 0;
  top: 10.08cqw;
  margin: 0;
  text-align: center;
}

.card-clock .possession-label span {
  display: block;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 4.5cqw;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  color: #f0c85f;
  text-shadow: none;
  animation: none;
}

/* Homepage slider slide: whole banner image centred on the banner's own background colour,
   so it is never cropped whatever the slide size, and the counter stays on its spot. */
.clock-slide { background: #141414; container-type: size; overflow: hidden; }
.clock-slide-box {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(100cqw, 222.22cqh); /* 2560 / 1152 */
  aspect-ratio: 2560 / 1152;
  --clock-k: 0.833;
}
.clock-slide-box img { display: block; width: 100%; height: 100%; }
.clock-slide-box--mobile {
  width: min(100cqw, 62.5cqh); /* 1000 / 1600 */
  aspect-ratio: 1000 / 1600;
  --clock-k: 2.6;
}
