/* =============================================================================
   hahi-style.css — Home Animation Header Info  v1.1
   Depends on prjct-style.css (enqueued as CSS dependency in PHP).
   All font/color values use theme.json CSS custom properties.
   ============================================================================= */

/* ── Block wrapper ───────────────────────────────────────────────────────── */
.hahi-block {
    width:      100%;
    box-sizing: border-box;
}

/* ── Text alignment ──────────────────────────────────────────────────────── */
.hahi-align-center { text-align: center; }
.hahi-align-right  { text-align: right;  }
.hahi-align-left   { text-align: left;   }

/* ── H1 — layout only; font/colour come from prjct-style.css Anton rule ─── */
.hahi-heading {
    margin: 0 0 0.4em;
}
/* Fallback if prjct-style is not loaded */
body:not(.prjct-loaded) .hahi-heading {
    font-family:    var(--wp--preset--font-family--anton, 'Anton', sans-serif);
    font-size:      clamp( 1.8rem, 4vw, 3.2rem );
    font-weight:    400;
    line-height:    1.1;
    letter-spacing: -0.02em;
    color:          var(--wp--preset--color--henk-red, #510424);
    opacity:        0.75;
}

/* ── Subheading — Lora italic ────────────────────────────────────────────── */
.hahi-subheading {
    font-family: var(--wp--preset--font-family--lora, 'Lora', Georgia, serif);
    font-style:  italic;
    font-size:   var(--wp--preset--font-size--medium, 1rem);
    color:       var(--wp--preset--color--foreground-muted, #5a5a5a);
    line-height: 1.5;
    margin:      0 0 1em;
}

/* ── Body text — DM Sans ─────────────────────────────────────────────────── */
.hahi-body {
    font-family: var(--wp--preset--font-family--body, 'DM Sans', system-ui, sans-serif);
    font-size:   var(--wp--preset--font-size--small, 0.92rem);
    color:       var(--wp--preset--color--foreground-muted, #5a5a5a);
    line-height: 1.75;
    max-width:   680px;
}
.hahi-align-center .hahi-body { margin-left: auto; margin-right: auto; }
.hahi-align-right  .hahi-body { margin-left: auto; }
.hahi-body p            { margin: 0 0 0.75em; }
.hahi-body p:last-child { margin-bottom: 0; }
.hahi-body a {
    color:                 var(--wp--preset--color--foreground, #111);
    text-decoration:       underline;
    text-underline-offset: 2px;
}
.hahi-body a:hover { opacity: 0.7; }

/* =============================================================================
   ANIMATIONS
   data-animation on .hahi-block controls type:
     fade        — opacity only
     rise        — opacity + rise from below  (default)
     slide-left  — opacity + slide in from left
     slide-right — opacity + slide in from right
     scale       — opacity + scale up
   JS adds .hahi-visible on DOMContentLoaded (or IntersectionObserver).
   ============================================================================= */

[data-animation] .hahi-animate {
    opacity:     0;
    will-change: opacity, transform;
    transition:  opacity   600ms ease calc( var(--hahi-delay, 0ms) ),
                 transform 600ms cubic-bezier( 0.25, 0.46, 0.45, 0.94 )
                           calc( var(--hahi-delay, 0ms) );
}

[data-animation="fade"]        .hahi-animate { transform: none; }
[data-animation="rise"]        .hahi-animate { transform: translateY( 28px ); }
[data-animation="slide-left"]  .hahi-animate { transform: translateX( -36px ); }
[data-animation="slide-right"] .hahi-animate { transform: translateX( 36px ); }
[data-animation="scale"]       .hahi-animate { transform: scale( 0.9 ); }

[data-animation] .hahi-animate.hahi-visible {
    opacity:   1;
    transform: none;
}

@media ( prefers-reduced-motion: reduce ) {
    [data-animation] .hahi-animate {
        opacity: 1; transform: none; transition: none;
    }
}
