/**
 * Kris Pelot — About landing fade-in + supporting motion
 * Apply CSS class `kp-fade-in` (and optional `kp-delay-1` … `kp-delay-4`)
 * on Elementor widgets via Advanced → CSS Classes.
 */

:root {
  --kp-cream: #f6f2ec;
  --kp-warm-stone: #e8e0d6;
  --kp-taupe: #c9b8a6;
  --kp-espresso: #3a2a22;
  --kp-ink: #2c241e;
  --kp-sage: #7a8b7c;
  --kp-amber: #8b5e3c;
  --kp-fade-duration: 0.75s;
  --kp-fade-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --kp-fade-distance: 1.15rem;
}

/* ----- Scroll / view fade-in ----- */

.kp-fade-in {
  opacity: 0;
  transform: translate3d(0, var(--kp-fade-distance), 0);
  transition:
    opacity var(--kp-fade-duration) var(--kp-fade-ease),
    transform var(--kp-fade-duration) var(--kp-fade-ease) !important;
  will-change: opacity, transform;
}

.kp-fade-in.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

/* Keep widgets visible in the Elementor editor / preview canvas */
body.elementor-editor-active .kp-fade-in,
body.elementor-editor-preview .kp-fade-in {
  opacity: 1;
  transform: none;
  transition: none !important;
}

.kp-delay-1 {
  transition-delay: 0.08s !important;
}

.kp-delay-2 {
  transition-delay: 0.16s !important;
}

.kp-delay-3 {
  transition-delay: 0.24s !important;
}

.kp-delay-4 {
  transition-delay: 0.32s !important;
}

/* Reduced motion: show content immediately */
@media (prefers-reduced-motion: reduce) {
  .kp-fade-in,
  .kp-fade-in.is-visible {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .kp-hero-headshot img,
  .kp-btn {
    transition: none !important;
  }
}

/* ----- Hero polish ----- */

.kp-section.kp-hero {
  position: relative;
  overflow: hidden;
}

/* Soft warm wash behind the composition (not a flat fill alone) */
.kp-section.kp-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 55% at 85% 40%, rgba(201, 184, 166, 0.35), transparent 65%),
    radial-gradient(ellipse 50% 40% at 10% 90%, rgba(122, 139, 124, 0.12), transparent 60%);
  z-index: 0;
}

.kp-section.kp-hero > .elementor-container {
  position: relative;
  z-index: 1;
}

.kp-brand-name {
  letter-spacing: -0.02em;
}

.kp-role-line {
  margin: 0;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.85em;
}

.kp-hero-headshot img {
  display: block;
  width: 100%;
  max-width: 520px;
  margin-inline: auto;
  height: auto;
  object-fit: cover;
  box-shadow: 0 18px 40px rgba(58, 42, 34, 0.12);
  transition: transform 0.6s var(--kp-fade-ease), box-shadow 0.6s var(--kp-fade-ease);
}

.kp-hero-headshot.is-visible img:hover {
  transform: scale(1.015);
  box-shadow: 0 22px 48px rgba(58, 42, 34, 0.16);
}

/* ----- Buttons ----- */

.kp-btn .elementor-button {
  transition:
    background-color 0.25s ease,
    color 0.25s ease,
    border-color 0.25s ease,
    transform 0.25s ease;
}

.kp-btn-primary .elementor-button:hover {
  transform: translateY(-1px);
}

.kp-btn-ghost .elementor-button:hover {
  background-color: var(--kp-espresso) !important;
  color: #fffcf8 !important;
}

/* Side-by-side CTAs in hero: keep gap when stacked in Elementor */
.kp-section.kp-hero .kp-btn {
  display: inline-block;
  margin-right: 0.75rem;
  margin-bottom: 0.5rem;
}

/* ----- Icon accents ----- */

.kp-icon-accent .elementor-icon-box-icon,
.kp-icon-accent .elementor-icon-list-icon {
  color: var(--kp-amber);
}

.kp-icon-accent .elementor-icon {
  transition: transform 0.35s var(--kp-fade-ease);
}

.kp-icon-accent.is-visible:hover .elementor-icon {
  transform: translateY(-2px);
}

/* ----- Strengths / about rhythm ----- */

.kp-section.kp-about .elementor-widget-text-editor p,
.kp-section.kp-close .elementor-widget-text-editor p {
  max-width: 42rem;
}

.kp-section.kp-strengths-row .elementor-icon-box-wrapper {
  align-items: flex-start;
}

/* ----- Mobile ----- */

@media (max-width: 767px) {
  .kp-section.kp-hero {
    min-height: auto !important;
  }

  .kp-hero-headshot img {
    max-width: 100%;
  }

  :root {
    --kp-fade-distance: 0.85rem;
  }
}
