*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: var(--accent);
  color: #fff;
}

h1, h2, h3 { margin: 0; }
p { margin: 0; }
ul { list-style: none; padding: 0; margin: 0; }
a { text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* Layout */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.container--sm  { max-width: var(--container-sm); margin: 0 auto; padding: 0 24px; }
.container--xs  { max-width: var(--container-xs); margin: 0 auto; padding: 0 24px; }
.container--cta { max-width: var(--container-cta); margin: 0 auto; padding: 0 24px; }

/* Keyframes */
@keyframes cjFloat {
  0%, 100% { transform: rotate(-9deg) translateY(0); }
  50%       { transform: rotate(-9deg) translateY(-14px); }
}

@keyframes cjPass {
  0%, 100% { transform: rotate(-3deg) translateY(0); }
  50%       { transform: rotate(-3deg) translateY(-12px); }
}

/* Mobile: same float, no tilt — the -3deg rotation crowds the card
   against the viewport edge on narrow screens (see docs/work-plan.md
   note on hero mobile fixes). */
@keyframes cjPassMobile {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-12px); }
}

@keyframes cjReveal {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

@keyframes cjBlink {
  0%, 100% { opacity: 1; }
  50%       { opacity: .25; }
}

@keyframes cjMarquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Range input */
input[type=range] {
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  border-radius: 99px;
  outline: none;
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  border: 5px solid var(--accent);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
input[type=range]::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  border: 5px solid var(--accent);
  cursor: pointer;
}

/* Print: preserve backgrounds for buttons and colored elements */
@media print {
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
}

/* Responsive helpers */
@media (max-width: 860px) {
  .hide-mobile { display: none !important; }
}
@media (min-width: 861px) {
  .hide-desktop { display: none !important; }
}
