/* =====================================================================
   appmint.me — winter theme layer
   Loaded last on every page. Royal winter palette: ivory, champagne,
   oxblood, burgundy and antique gold. No blue, green, purple or grey.
   ===================================================================== */

:root {
  --snow: #fdfcf9;
  --frost: #6366f1;
  --ice: #6366f1;
  --ice-strong: #2fd9a7;
  --ice-deep: #4f46e5;
  --polar: #14150f;
  --polar-2: #1d1e18;
  --aurora: #6366f1;
  --winter-line: #efe1cf;
}

html { background: var(--snow); }

body {
  background:
    radial-gradient(1100px 520px at 12% -8%, rgba(99,102,241, 0.22), transparent 62%),
    radial-gradient(900px 480px at 92% 4%, rgba(99,102,241, 0.12), transparent 60%),
    var(--snow);
}

::selection { background: rgba(47,217,167, 0.28); }

/* frosty navigation */
.nav {
  background: rgba(252, 248, 242, 0.86);
  border-bottom: 1.5px solid var(--winter-line);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  backdrop-filter: saturate(150%) blur(14px);
}

.nav .logo { color: var(--polar); }
.nav .logo .dot { color: var(--ice-deep); }
.nav-links a { color: #34121a; }
.nav-links a:hover { color: var(--polar); }
.nav-links a[aria-current="page"] { background: var(--polar); color: var(--snow); }

.nav-cta .btn {
  border-color: var(--polar);
  background: var(--ice-strong);
  color: var(--polar);
  box-shadow: 3px 3px 0 var(--polar);
}

/* hero: a light snowfall, kept subtle and static for reduced motion */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 18% 22%, rgba(255, 255, 255, 0.95) 1.2px, transparent 1.6px),
    radial-gradient(circle at 72% 18%, rgba(255, 255, 255, 0.9) 1.6px, transparent 2px),
    radial-gradient(circle at 41% 62%, rgba(255, 255, 255, 0.85) 1px, transparent 1.5px),
    radial-gradient(circle at 86% 72%, rgba(255, 255, 255, 0.9) 1.4px, transparent 1.9px),
    radial-gradient(circle at 8% 78%, rgba(255, 255, 255, 0.8) 1px, transparent 1.5px),
    radial-gradient(circle at 58% 88%, rgba(255, 255, 255, 0.8) 1.2px, transparent 1.7px);
  background-size: 220px 220px, 300px 300px, 260px 260px, 340px 340px, 240px 240px, 280px 280px;
  opacity: 0.75;
}

.hero-eyebrow {
  background: rgba(255, 255, 255, 0.78);
  border-color: var(--winter-line);
  color: #4a4b42;
}

.hero-eyebrow .live { background: var(--ice-strong); }

.hero h1 .accent { color: var(--ice-deep); }

.ticker-strip { border-color: var(--winter-line); }

/* polar night footer with a faint aurora */
.footer {
  background:
    radial-gradient(75% 90% at 12% 0%, rgba(47,217,167, 0.20), transparent 58%),
    radial-gradient(65% 80% at 88% 8%, rgba(99,102,241, 0.16), transparent 60%),
    #14150f;
  border-top: 1.5px solid #14150f;
  color: #f6f4ee;
}

.footer .logo { color: #f6f4ee; }
.footer .logo .dot { color: var(--ice-strong); }
.footer h4 { color: var(--ice); }
.footer a { color: rgba(246, 234, 214, 0.74); }
.footer a:hover { color: var(--ice); }
.footer p { color: rgba(246, 234, 214, 0.66); }

/* social profile links */
.footer-social {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin: 0;
  border: 1.5px solid rgba(99,102,241, 0.30);
  border-radius: 12px;
  background: rgba(99,102,241, 0.07);
  color: #6366f1;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.footer-social a:hover,
.footer-social a:focus-visible {
  transform: translateY(-3px);
  border-color: var(--ice);
  background: rgba(47,217,167, 0.14);
  color: var(--ice);
}

.footer-social a:focus-visible { outline: 2px solid var(--ice); outline-offset: 3px; }

.footer-social svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.footer-social .social-emoji {
  font-size: 18px;
  line-height: 1;
  filter: saturate(0.9);
}

/* small winter labels */
.winter-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border: 1px solid rgba(79,70,229, 0.24);
  border-radius: 999px;
  background: rgba(246, 234, 214, 0.7);
  color: var(--ice-deep);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

@media (prefers-reduced-motion: reduce) {
  .hero::after { opacity: 0.5; }
  .footer-social a { transition: none; }
}

/* =====================================================================
   Winter motion layer
   ===================================================================== */

/* scroll progress — an icicle edge at the top of the page */
.winter-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  width: 100%;
  height: 3px;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, #0ea5a6, #2fd9a7 48%, #6366f1);
  box-shadow: 0 0 14px rgba(47,217,167, 0.65);
  pointer-events: none;
}

/* CSS snowfall — always present as a fallback for the Lottie layer */
.winter-snowfall {
  position: fixed;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  pointer-events: none;
}

.winter-snowfall i {
  position: absolute;
  top: -10vh;
  display: block;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffffff 0%, #6366f1 55%, rgba(47,217,167, 0.35) 100%);
  box-shadow: 0 0 8px rgba(47,217,167, 0.7);
  opacity: var(--op, 0.5);
  animation: winterFall var(--dur, 16s) linear infinite;
  animation-delay: var(--delay, 0s);
  will-change: transform;
}

@keyframes winterFall {
  0%   { transform: translate3d(0, -12vh, 0) rotate(0deg); }
  100% { transform: translate3d(var(--drift, 0px), 112vh, 0) rotate(360deg); }
}

/* Lottie layer inside the first hero on the page */
.winter-lottie {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #14150f 14%, #14150f 82%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, #14150f 14%, #14150f 82%, transparent 100%);
  transition: opacity 1.2s ease;
}

.winter-lottie.is-ready { opacity: 0.9; }
.winter-lottie.is-fallback { opacity: 0; }
.winter-lottie svg { display: block; width: 100%; height: 100%; }

.hero .container,
.sp-hero > .sp-wrap,
.article-hero .sp-wrap {
  position: relative;
  z-index: 1;
}

/* gentle pointer parallax (JS sets the variables) */
.hero-grid,
.hero .winter-lottie {
  transform: translate3d(var(--winter-mx, 0px), var(--winter-my, 0px), 0);
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* drifting aurora in the hero */
.hero::before {
  background-size: 140% 140%;
  animation: winterAurora 18s ease-in-out infinite alternate;
}

@keyframes winterAurora {
  0%   { background-position: 0% 0%; }
  50%  { background-position: 70% 40%; }
  100% { background-position: 100% 70%; }
}

/* a slow frost sweep across page heroes */
.sp-hero::after,
.article-hero::after {
  content: "";
  position: absolute;
  inset: -30% -15%;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 36%, rgba(255, 255, 255, 0.4) 50%, transparent 64%);
  background-size: 260% 100%;
  animation: frostSweep 11s linear infinite;
}

@keyframes frostSweep {
  0%   { background-position: 120% 0; }
  100% { background-position: -120% 0; }
}

/* ---------------- type effects ---------------- */

@keyframes frostShimmer {
  0%   { background-position: 0% center; }
  100% { background-position: 220% center; }
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .hero h1 .accent,
  .ix-h2 em,
  .sp-h2 em,
  .sp-hero h1 em,
  .article-hero h1 em,
  .quote blockquote em {
    background-image: linear-gradient(100deg,
      #4f46e5 0%, #2fd9a7 28%, #6366f1 50%, #2fd9a7 72%, #4f46e5 100%);
    background-size: 220% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    animation: frostShimmer 8s linear infinite;
  }

  .ix-how .ix-h2 em,
  .ix-cta .ix-h2 em,
  .sp-cta-card h2 em,
  .article-cta h2 em,
  .footer .logo .dot {
    background-image: linear-gradient(100deg,
      #6366f1 0%, #f6f4ee 30%, #6366f1 52%, #6366f1 74%, #6366f1 100%);
    background-size: 220% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    animation: frostShimmer 7s linear infinite;
  }
}

/* animated kicker rule */
.ix-kicker::after,
.sp-kicker::after {
  content: "";
  display: inline-block;
  width: 0;
  height: 2px;
  margin-left: 9px;
  vertical-align: middle;
  border-radius: 2px;
  background: linear-gradient(90deg, #2fd9a7, rgba(47,217,167, 0));
  animation: frostLine 4s ease-in-out infinite;
}

@keyframes frostLine {
  0%, 100% { width: 0; opacity: 0; }
  45%, 65% { width: 30px; opacity: 1; }
}

/* logo dot pulse */
.nav .logo .dot { animation: frostPulse 3.4s ease-in-out infinite; }

@keyframes frostPulse {
  0%, 100% { opacity: 1; text-shadow: 0 0 0 rgba(47,217,167, 0); }
  50%      { opacity: 0.72; text-shadow: 0 0 12px rgba(47,217,167, 0.8); }
}

/* a sheen that crosses primary buttons on hover */
.btn-grad,
.sp-btn--ice,
.ix-btn--mint {
  position: relative;
  overflow: hidden;
}

.btn-grad::after,
.sp-btn--ice::after,
.ix-btn--mint::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(110deg, transparent 32%, rgba(255, 255, 255, 0.55) 50%, transparent 68%);
  transform: translateX(-130%);
  transition: transform 0.65s ease;
}

.btn-grad:hover::after,
.sp-btn--ice:hover::after,
.ix-btn--mint:hover::after { transform: translateX(130%); }

/* frosty hover states for the quieter cards */
.tool-card,
.sp-card {
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.tool-card:hover,
.sp-card:hover {
  transform: translateY(-3px);
  border-color: #6366f1;
  box-shadow: 0 24px 50px -36px rgba(20,21,15, 0.55);
}

/* animated aurora inside blog thumbnails */
.blog-thumb {
  background-size: 180% 180%;
  animation: winterAurora 14s ease-in-out infinite alternate;
}

/* ---------------- reduced motion ---------------- */

@media (prefers-reduced-motion: reduce) {
  .winter-progress,
  .winter-snowfall { display: none; }
  .winter-lottie { display: none; }
  .hero::before,
  .sp-hero::after,
  .article-hero::after,
  .blog-thumb,
  .nav .logo .dot,
  .ix-kicker::after,
  .sp-kicker::after { animation: none; }
  .hero-grid,
  .hero .winter-lottie { transform: none; transition: none; }
  .btn-grad::after,
  .sp-btn--ice::after,
  .ix-btn--mint::after { display: none; }
  .tool-card:hover,
  .sp-card:hover { transform: none; }
  @supports ((-webkit-background-clip: text) or (background-clip: text)) {
    .hero h1 .accent,
    .ix-h2 em,
    .sp-h2 em,
    .sp-hero h1 em,
    .article-hero h1 em,
    .quote blockquote em,
    .ix-how .ix-h2 em,
    .ix-cta .ix-h2 em,
    .sp-cta-card h2 em,
    .article-cta h2 em,
    .footer .logo .dot { animation: none; }
  }
}

/* sparkle Lottie inside the final CTA cards */
.winter-lottie--cta {
  -webkit-mask-image: none;
  mask-image: none;
  z-index: 0;
}

.winter-lottie--cta.is-ready { opacity: 0.55; }

.sp-cta-card > *,
.ix-cta-card > .ix-cta-copy,
.ix-cta-card > .ix-cta-panel { position: relative; z-index: 1; }

/* entrance animation for inner-page headlines */
@keyframes winterIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.sp-hero h1,
.article-hero h1,
.ct-hero h1 {
  animation: winterIn 0.85s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.sp-hero-lede,
.article-lede,
.ct-hero-copy > p {
  animation: winterIn 0.85s 0.08s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.sp-hero-actions,
.sp-chips {
  animation: winterIn 0.85s 0.16s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.hero h1,
.sp-hero h1,
.article-hero h1 {
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45), 0 14px 34px rgba(47,217,167, 0.12);
}

@media (prefers-reduced-motion: reduce) {
  .sp-hero h1,
  .article-hero h1,
  .ct-hero h1,
  .sp-hero-lede,
  .article-lede,
  .ct-hero-copy > p,
  .sp-hero-actions,
  .sp-chips { animation: none; }
}
