/* ============================================================
   Paws and Paint — "wow" layer (CL-05)
   Loaded after styles.css. Everything here degrades to the
   original design when JS is off or reduced motion is set.
   ============================================================ */

/* ── Inline SVG icons ─────────────────────────────────────── */
.ico {
  width: 1em;
  height: 1em;
  display: inline-block;
  vertical-align: middle;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.trust-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(232,147,90,0.14);
  color: #E8935A;
  font-size: 1.05rem;
}
.step-icon { color: #C46A33; display: inline-flex; font-size: 1.9rem; margin-bottom: 0; }
.box-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(232,147,90,0.16), rgba(201,168,76,0.16));
  color: #C46A33;
  font-size: 1.9rem;
}
.dropzone-icon { color: #E8935A; font-size: 2.6rem; display: inline-flex; }

/* ── Hero: bigger stage on desktop ───────────────────────── */
@media (min-width: 1024px) {
  .hero-photo-stack { width: 390px; height: 470px; }
  .hero-photo-front { width: 330px; height: 405px; }
  .hero-photo-back  { width: 290px; height: 355px; top: 56px; right: -24px; }
}

/* ── Hero: paint-to-reveal ───────────────────────────────── */
.hero-photo-front .hero-photo-crop { position: relative; }
.paint-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 18px;
  cursor: none;
  touch-action: pan-y;
  z-index: 2;
}
.paint-brush-cursor {
  position: absolute;
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.9);
  box-shadow: 0 0 0 1px rgba(61,31,13,0.25), 0 0 18px rgba(232,147,90,0.6);
  pointer-events: none;
  z-index: 4;
  opacity: 0;
  transition: opacity .2s;
}
.hero-photo-front:hover .paint-brush-cursor { opacity: 1; }
.paint-hint {
  position: absolute;
  left: 50%;
  bottom: -18px;
  transform: translate(-50%, 100%);
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .45rem .9rem;
  border-radius: 999px;
  background: rgba(253,246,236,0.12);
  border: 1px solid rgba(253,246,236,0.22);
  color: #FDF6EC;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .02em;
  white-space: nowrap;
  backdrop-filter: blur(6px);
  pointer-events: none;
  z-index: 5;
  animation: hint-bob 2.6s ease-in-out infinite;
}
.paint-hint .ico { color: #E8935A; font-size: 1rem; }
.paint-hint.done { animation: none; background: rgba(232,147,90,0.9); border-color: transparent; }
@keyframes hint-bob {
  0%, 100% { transform: translate(-50%, 100%); }
  50%      { transform: translate(-50%, calc(100% - 4px)); }
}
/* the hint sits under the stack; reserve room for it */
.hero-media[data-paint] { padding-bottom: 3.25rem; }

/* ── Step 2: "sculpting" scan over the customer's photo ──── */
.bg-gen-indicator { align-items: center; }
.sculpt-thumb {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(61,31,13,0.18);
}
.sculpt-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sculpt-thumb::before {
  /* wireframe grid that fades in while generating */
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(232,147,90,.55) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232,147,90,.55) 1px, transparent 1px);
  background-size: 8px 8px;
  mix-blend-mode: screen;
  opacity: .55;
}
.sculpt-thumb::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 30%;
  top: -30%;
  background: linear-gradient(180deg, transparent, rgba(255,214,170,.9), transparent);
  animation: sculpt-scan 1.6s cubic-bezier(.45,0,.55,1) infinite;
}
@keyframes sculpt-scan { to { top: 100%; } }
.bg-gen-indicator.ready .sculpt-thumb::before,
.bg-gen-indicator.ready .sculpt-thumb::after,
.bg-gen-indicator.error .sculpt-thumb::after { display: none; }
.bg-gen-indicator.ready .sculpt-thumb { box-shadow: 0 0 0 2px #2d8a4e, 0 2px 10px rgba(45,138,78,.3); }

/* ── Confetti (success) ──────────────────────────────────── */
.confetti-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
}

/* ── Buttons: soft sheen on primary CTAs ─────────────────── */
.btn-primary { position: relative; overflow: hidden; isolation: isolate; }
.btn-primary::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 40%;
  left: -60%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.35), transparent);
  transform: skewX(-18deg);
  z-index: -1;
  transition: left .7s cubic-bezier(.4,0,.2,1);
}
.btn-primary:hover::after { left: 130%; }

/* ── Visible keyboard focus everywhere ───────────────────── */
:focus-visible {
  outline: 3px solid #E8935A;
  outline-offset: 3px;
  border-radius: 6px;
}

@media (prefers-reduced-motion: reduce) {
  .paint-hint, .sculpt-thumb::after { animation: none; }
  .btn-primary::after { display: none; }
  html { scroll-behavior: auto; }
}

.paw-icon { color: #E8935A; display: inline-flex; font-size: 1.15em; }
.paw-icon .ico { stroke-width: 2; }
.urgency-icon { display: inline-flex; color: #E8935A; font-size: 1.2rem; }

/* ── Hero: tighter desktop layout so the painting sits above the fold ── */
@media (min-width: 1024px) {
  .hero-shell { min-height: calc(100vh - 64px); padding-block: 3rem; }
  .hero-content { grid-column: 1 / 8; padding: 0; max-width: none; }
  .hero-media   { grid-column: 8 / -1; }
  .hero-headline { font-size: clamp(2.8rem, 4.6vw, 4.2rem); margin-bottom: 1rem; }
  .hero-sub { max-width: 520px; margin-bottom: 1.75rem; }
  .hero-actions { margin-bottom: 1.5rem; }
  .hero-trust { display: none; }
}
