/* ==========================================================================
   New Year 2027 layer (loaded after christmas.css).
   Decorative only: metallic 2027 typography, a 2027 ribbon between sections and
   an outlined 2027 behind the footer tree. Fireworks / confetti / streaks are
   drawn by christmas.js on the existing decorative canvases.
   ========================================================================== */

:root {
  --ny-champagne: #FFE5A3;
  --ny-metal: linear-gradient(180deg, #FFF8E4 0%, #FFE5A3 26%, #F5C76A 47%, #B07A22 52%, #E9B354 64%, #FFE5A3 86%, #FFF3CF 100%);
  --ny-sheen: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, .95) 50%, transparent 62%);
}

@keyframes ny-digit-in {
  0% { opacity: 0; transform: translateY(46%) rotateX(78deg) scale(.9); filter: blur(10px); }
  60% { opacity: 1; filter: blur(0); }
  100% { opacity: 1; transform: none; filter: blur(0); }
}
@keyframes ny-sheen { 0%, 55% { background-position: 160% 0, 0 0; } 100% { background-position: -60% 0, 0 0; } }
@keyframes ny-hover { 0%, 100% { translate: 0 0; } 50% { translate: 0 -5px; } }
@keyframes ny-glow { 0%, 100% { opacity: .55; scale: .94; } 50% { opacity: 1; scale: 1.06; } }
@keyframes ny-ribbon { from { scale: 0 1; opacity: 0; } to { scale: 1 1; opacity: 1; } }
@keyframes ny-spark { 0%, 100% { opacity: 0; scale: .3; rotate: 0deg; } 45%, 55% { opacity: 1; scale: 1; rotate: 45deg; } }
@keyframes ny-marquee { to { transform: translate3d(-50%, 0, 0); } }
@keyframes ny-draw { to { stroke-dashoffset: 0; } }
@keyframes ny-fill { from { fill-opacity: 0; } to { fill-opacity: 1; } }

/* ---------- Hero: metallic 2027 ---------- */
.hero .hero__copy { position: relative; }
.ny-2027 { position: relative; display: inline-flex; align-items: center; margin: 0 0 12px; pointer-events: none; user-select: none; perspective: 600px; }
.ny-2027::before { position: absolute; inset: -30% -18%; z-index: -1; content: ''; border-radius: 50%; background: radial-gradient(closest-side, rgba(245, 199, 106, .34), rgba(201, 155, 229, .16) 55%, transparent 78%); animation: ny-glow 5.5s ease-in-out infinite; }
.ny-2027::after { position: absolute; right: 4%; bottom: -10px; left: 4%; height: 2px; content: ''; border-radius: 2px; background: linear-gradient(90deg, transparent, #FFE5A3 18%, #F5C76A 50%, #FFE5A3 82%, transparent); box-shadow: 0 0 10px rgba(245, 199, 106, .7); transform-origin: center; }
.ny-2027__digits { display: inline-flex; font: 700 64px/1 'Poppins', 'Roboto', sans-serif; letter-spacing: -.02em; filter: drop-shadow(0 6px 14px rgba(20, 4, 30, .45)); }
.ny-2027__digits > span { display: inline-block; color: var(--x-gold, #F5C76A); background: var(--ny-sheen) 160% 0 / 260% 100% no-repeat, var(--ny-metal); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; transform-origin: 50% 100%; animation: ny-sheen 6s ease-in-out infinite, ny-hover 6s ease-in-out infinite; }
.ny-2027__digits > span:nth-child(2) { animation-delay: .12s, -1.5s; }
.ny-2027__digits > span:nth-child(3) { animation-delay: .24s, -3s; }
.ny-2027__digits > span:nth-child(4) { animation-delay: .36s, -4.5s; }
.ny-2027__star { display: none; }
.ny-2027__spark { position: absolute; width: 16px; height: 16px; background: linear-gradient(135deg, #FFF8E4, #F5C76A); clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%); filter: drop-shadow(0 0 6px rgba(255, 229, 163, .9)); animation: ny-spark 3.2s ease-in-out infinite; }
.ny-2027__spark--a { top: -8px; left: -14px; }
.ny-2027__spark--b { top: 12%; right: -18px; width: 12px; height: 12px; animation-delay: -1.1s; animation-duration: 2.7s; }
.ny-2027__spark--c { right: 22%; bottom: -24px; width: 10px; height: 10px; animation-delay: -2s; animation-duration: 3.8s; }

/* entrance: digits flip up one by one, ribbon draws, star drops in */
.js-enabled .hero:not(.is-visible) :is(.ny-2027__digits > span, .ny-2027__star),
.js-enabled .hero:not(.is-visible) .ny-2027::after { opacity: 0; }
.js-enabled .hero.is-visible .ny-2027__digits > span { animation: ny-digit-in 1100ms var(--x-ease, ease) backwards, ny-sheen 6s ease-in-out 1.6s infinite, ny-hover 6s ease-in-out 1.6s infinite; }
.js-enabled .hero.is-visible .ny-2027__digits > span:nth-child(1) { animation-delay: 300ms, 1.6s, 1.6s; }
.js-enabled .hero.is-visible .ny-2027__digits > span:nth-child(2) { animation-delay: 430ms, 1.75s, .1s; }
.js-enabled .hero.is-visible .ny-2027__digits > span:nth-child(3) { animation-delay: 560ms, 1.9s, -1.4s; }
.js-enabled .hero.is-visible .ny-2027__digits > span:nth-child(4) { animation-delay: 690ms, 2.05s, -2.9s; }
.js-enabled .hero.is-visible .ny-2027::after { animation: ny-ribbon 900ms var(--x-ease, ease) 1.05s backwards; }
.ny-2027__star { transition: opacity 900ms ease 1.2s; }
.js-enabled .hero.is-visible .ny-2027__star { animation: x-swing 6.6s ease-in-out infinite; }

/* ---------- 2027 ribbon between sections ---------- */
.ny-band { position: relative; z-index: 2; overflow: hidden; padding: 14px 0; background: radial-gradient(60% 140% at 50% 50%, rgba(139, 72, 181, .55), transparent 70%), linear-gradient(90deg, #351345, #54216F 50%, #351345); box-shadow: inset 0 1px 0 rgba(255, 229, 163, .55), inset 0 -1px 0 rgba(255, 229, 163, .55), 0 10px 30px -14px rgba(53, 19, 69, .8); pointer-events: none; user-select: none; }
.ny-band::before, .ny-band::after { position: absolute; top: 0; bottom: 0; z-index: 1; width: 12%; content: ''; }
.ny-band::before { left: 0; background: linear-gradient(90deg, #351345, transparent); }
.ny-band::after { right: 0; background: linear-gradient(270deg, #351345, transparent); }
.ny-band__track { display: flex; width: max-content; animation: ny-marquee 46s linear infinite; }
.ny-band__group { display: flex; flex: 0 0 auto; align-items: center; gap: 30px; padding-right: 30px; }
.ny-band b, .ny-band em { font: 700 clamp(26px, 3vw, 42px)/1 'Poppins', 'Roboto', sans-serif; font-style: normal; letter-spacing: .04em; }
.ny-band b { color: #F5C76A; background: var(--ny-metal); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; filter: drop-shadow(0 0 10px rgba(245, 199, 106, .35)); }
.ny-band em { color: transparent; -webkit-text-stroke: 1.2px rgba(255, 229, 163, .75); }
.ny-band i { flex: 0 0 auto; width: 18px; height: 18px; background: linear-gradient(135deg, #FFF8E4, #F5C76A); clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%); animation: x-twinkle 2.6s ease-in-out infinite; }
.ny-band i:nth-of-type(even) { width: 12px; height: 12px; background: #C99BE5; animation-delay: -1.3s; }

/* ---------- Footer: outlined 2027 that draws itself behind the tree ---------- */
.footer-cta .ny-outline { position: absolute; z-index: 0; display: block; overflow: visible; pointer-events: none; }
.ny-outline text { font: 700 190px 'Poppins', 'Roboto', sans-serif; fill: url(#ny-outline-fill); stroke: url(#ny-outline-stroke); stroke-width: 2; stroke-linejoin: round; filter: drop-shadow(0 0 12px rgba(245, 199, 106, .45)); }
.ny-outline.ny-armed text { stroke-dasharray: 1400; stroke-dashoffset: 1400; fill-opacity: 0; }
.ny-outline.ny-armed.ny-in text { animation: ny-draw 2.8s cubic-bezier(.5, 0, .2, 1) forwards, ny-fill 1.6s ease 2s forwards; }
.footer-cta .footer-cta__illustration { z-index: 1; }

/* ==========================================================================
   Breakpoints
   ========================================================================== */
@media (min-width: 1024px) {
  /* sits in the open space between the headline and the form */
  .hero .ny-2027 { position: absolute; top: calc(-26 * var(--f)); left: calc(604 * var(--f)); margin: 0; }
  .hero .ny-2027__digits { font-size: calc(112 * var(--f)); }
  .hero .ny-2027::after { bottom: calc(-12 * var(--f)); }
  .hero .ny-2027__star { position: absolute; top: calc(-96 * var(--f)); right: calc(-34 * var(--f)); display: block; width: calc(38 * var(--f)); height: auto; transform-origin: top center; filter: drop-shadow(0 10px 14px rgba(20, 4, 30, .45)); }
  .hero .ny-2027__spark--a { top: calc(-4 * var(--f)); left: calc(-22 * var(--f)); width: calc(20 * var(--f)); height: calc(20 * var(--f)); }
  .ny-band { padding: 18px 0; }
  .footer-cta .ny-outline { top: calc(160 * var(--footer-unit)); left: calc(118 * var(--footer-unit)); width: calc(430 * var(--footer-unit)); }
  /* Desktop tree: the drift (::after, z 1) used to paint over the snow base and gift boxes, and the star glow
     was cut by the artwork's top edge. Lift the tree above the drift and use the artwork with 46 units of
     headroom (footer-scene-desktop.svg, 425x587), keeping the tree itself the same size and position. */
  .footer-cta .footer-cta__illustration { z-index: 2; height: calc(587 * var(--footer-unit)); }
}
@media (min-width: 601px) and (max-width: 1023px) {
  .hero .ny-2027__digits { font-size: clamp(50px, 7.4vw, 68px); }
  .hero .ny-2027 { margin-bottom: 18px; }
  .footer-cta .ny-outline { bottom: 30vw; left: 1.5%; width: 30%; }
}
@media (max-width: 600px) {
  .hero .ny-2027 { margin-bottom: 16px; }
  .hero .ny-2027__digits { font-size: clamp(44px, 13vw, 56px); }
  .ny-band { padding: 10px 0; }
  .ny-band__group { gap: 18px; padding-right: 18px; }
  .ny-band i { width: 13px; height: 13px; }
  .footer-cta .ny-outline { bottom: 168px; left: 50%; width: min(300px, 84%); translate: -50% 0; }
}

/* ==========================================================================
   Reduced motion: everything shown in its final state, nothing loops.
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  .ny-2027::before, .ny-2027__digits > span, .ny-2027__spark, .ny-2027__star, .ny-band__track, .ny-band i,
  .js-enabled .hero.is-visible :is(.ny-2027__digits > span, .ny-2027__star), .js-enabled .hero.is-visible .ny-2027::after { animation: none !important; }
  .js-enabled .hero:not(.is-visible) :is(.ny-2027__digits > span, .ny-2027__star), .js-enabled .hero:not(.is-visible) .ny-2027::after { opacity: 1; }
  .ny-2027__star { transition: none; }
  .ny-2027__spark { opacity: .9; }
  .ny-band__track { transform: translate3d(-10%, 0, 0); }
  .ny-outline.ny-armed text { stroke-dashoffset: 0; fill-opacity: 1; animation: none !important; }
}
