/* Effects ported from the live site's globals.css, using the exact rgba values of
   SPEC 5.3. Orange is rgb(255, 91, 46), white is 255, ink is rgb(17, 17, 17).
   Content stays visible without JavaScript; motion respects reduced-motion. */

/* Selection: the orange text selection colour */
::selection {
  background: var(--cb-orange);
  color: var(--cb-white);
}

/* Buttons: orange glow 0.25 resting, 0.35 on hover */
.cb-btn-main {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 16px 32px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
  transition:
    background-color 0.2s var(--cb-ease),
    border-color 0.2s var(--cb-ease),
    transform 0.2s var(--cb-ease),
    box-shadow 0.2s var(--cb-ease);
}
.cb-btn-primary {
  background-color: var(--cb-orange);
  color: var(--cb-white);
  border: 1px solid var(--cb-orange);
  box-shadow: 0 4px 20px rgba(255, 91, 46, 0.25);
}
.cb-btn-primary:hover {
  background-color: var(--cb-orange-hover);
  border-color: var(--cb-orange-hover);
  color: var(--cb-white);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(255, 91, 46, 0.35);
}
/* Secondary: white hairline 0.15, fill 0.03 on hover */
.cb-btn-secondary {
  background-color: transparent;
  color: var(--cb-white);
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.cb-btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.03);
  border-color: var(--cb-white);
  color: var(--cb-white);
  transform: translateY(-2px);
}
/* Light bands: ink hairlines at 0.15 and 0.03 */
.cb-band-light {
  background-color: var(--cb-light-bg);
  color: var(--cb-ink-body);
}
.cb-band-light h1,
.cb-band-light h2,
.cb-band-light h3 {
  color: var(--cb-ink);
}
.cb-band-light .cb-btn-secondary {
  color: var(--cb-ink);
  border-color: rgba(17, 17, 17, 0.15);
}
.cb-band-light .cb-btn-secondary:hover {
  background-color: rgba(17, 17, 17, 0.03);
  border-color: var(--cb-ink);
}

/* Cards: orange hairline 0.35 on hover */
.cb-card {
  background-color: var(--cb-card);
  border: 1px solid var(--cb-border-dark);
  border-radius: 14px;
  transition:
    border-color 0.3s var(--cb-ease),
    transform 0.3s var(--cb-ease),
    background-color 0.3s var(--cb-ease);
}
.cb-card:hover {
  border-color: rgba(255, 91, 46, 0.35);
  transform: translateY(-2px);
}

/* Hairline divider */
.cb-hairline {
  height: 1px;
  width: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    var(--cb-border-dark) 15%,
    var(--cb-border-dark) 85%,
    transparent
  );
}

/* Soft orange wash: 0.22 centre, 0.06 mid */
.cb-glow {
  position: absolute;
  pointer-events: none;
  border-radius: 9999px;
  filter: blur(110px);
  background: radial-gradient(
    circle,
    rgba(255, 91, 46, 0.22) 0%,
    rgba(255, 91, 46, 0.06) 45%,
    transparent 70%
  );
}

/* Faint grid backdrop: white lines at 0.025 under a radial mask */
.cb-grid-lines {
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: radial-gradient(
    ellipse 80% 60% at 50% 0%,
    #000 40%,
    transparent 75%
  );
  mask-image: radial-gradient(
    ellipse 80% 60% at 50% 0%,
    #000 40%,
    transparent 75%
  );
}

/* Fixed film grain, painted once over the whole document */
.cb-grain {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: 0.032;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

/* Image overlays: black scrim at 0.55, strong at 0.65 */
.cb-overlay,
.cb-overlay-strong {
  position: relative;
}
.cb-overlay::after,
.cb-overlay-strong::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.cb-overlay::after {
  background: rgba(0, 0, 0, 0.55);
}
.cb-overlay-strong::after {
  background: rgba(0, 0, 0, 0.65);
}

.cb-eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--cb-orange);
}
.cb-underline {
  background-image: linear-gradient(var(--cb-orange), var(--cb-orange));
  background-size: 100% 3px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  padding-bottom: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .cb-btn-main,
  .cb-card {
    transition-duration: 0.01ms;
  }
  .cb-btn-primary:hover,
  .cb-btn-secondary:hover,
  .cb-card:hover {
    transform: none;
  }
}
