/* ==========================================================================
   Visuals — hero compositions, glassmorphism, swappable photo slots.
   Real photography is used where a genuinely good match exists (see
   render_photo_slot()/render_hero_background() in includes/functions.php
   and docs/IMAGE-CREDITS.md); every other slot falls back automatically
   to a CSS/SVG geometric composition in the brand palette.
   ========================================================================== */

/* Glassmorphism utility */
.sl-glass {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.16);
}

/* Full-screen home hero */
.sl-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: var(--sl-header-height);
    background: linear-gradient(150deg, #0a1620 0%, #0c2233 42%, #075985 78%, #0284c7 100%);
    color: #fff;
    overflow: hidden;
}
.sl-hero__bg-photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    mix-blend-mode: luminosity;
    filter: blur(2px);
    transform: scale(1.03); /* hides the soft blurred edge the filter would otherwise reveal at the container boundary */
    transition: opacity 1.8s ease;
}
.sl-hero__bg-photo.is-active {
    opacity: 0.45;
}
/* Home page hero only (not the inner-page .sl-page-hero banners): the
   slideshow photos read clearly with no blur at all — legibility comes
   from the opacity/gradient/blend treatment above, not from softening
   the photo itself. */
.sl-hero .sl-hero__bg-photo {
    filter: none;
    transform: scale(1);
}
@media (prefers-reduced-motion: reduce) {
    .sl-hero__bg-photo { transition: none; }
}
.sl-hero__bg-pattern {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 15% 20%, rgba(56, 189, 248, 0.20) 0, transparent 40%),
        radial-gradient(circle at 85% 15%, rgba(199, 206, 214, 0.12) 0, transparent 45%),
        radial-gradient(circle at 75% 85%, rgba(2, 132, 199, 0.28) 0, transparent 50%);
    pointer-events: none;
}
.sl-hero__grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.045) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,0.9), transparent 85%);
    pointer-events: none;
}
.sl-hero__inner {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: var(--sl-space-8);
    align-items: center;
    width: 100%;
}
.sl-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: var(--sl-space-2);
    background: rgba(56, 189, 248, 0.14);
    border: 1px solid rgba(56, 189, 248, 0.35);
    color: var(--sl-color-primary-light);
    font-family: var(--sl-font-heading);
    font-weight: 700;
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.5rem 1rem;
    border-radius: var(--sl-radius-pill);
    margin-bottom: var(--sl-space-5);
}
.sl-hero__title { color: #fff; margin-bottom: var(--sl-space-5); }
.sl-hero__title em { font-style: normal; color: var(--sl-color-primary-light); }
.sl-hero__text { font-size: 1.12rem; color: var(--sl-text-on-dark-muted); max-width: 560px; margin-bottom: var(--sl-space-7); }
.sl-hero__actions { display: flex; gap: var(--sl-space-4); flex-wrap: wrap; margin-bottom: var(--sl-space-8); }
.sl-hero__trustline { display: flex; gap: var(--sl-space-6); flex-wrap: wrap; color: var(--sl-text-on-dark-muted); font-size: 0.85rem; }
.sl-hero__trustline span { display: flex; align-items: center; gap: var(--sl-space-2); }

/* Hero geometric "mineral" composition (replaces photography) */
.sl-hero__visual { position: relative; height: 560px; }
.sl-hero__crystal {
    position: absolute;
    border-radius: var(--sl-radius-lg);
}
.sl-hero__crystal--1 {
    width: 320px; height: 320px;
    top: 6%; right: 6%;
    background: linear-gradient(135deg, rgba(56,189,248,0.35), rgba(2,132,199,0.05));
    border: 1px solid rgba(255,255,255,0.18);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    animation: sl-float 7s ease-in-out infinite;
}
.sl-hero__crystal--2 {
    width: 190px; height: 190px;
    bottom: 10%; left: 4%;
    background: linear-gradient(135deg, rgba(199,206,214,0.25), rgba(255,255,255,0.02));
    border: 1px solid rgba(255,255,255,0.14);
    clip-path: polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%);
    animation: sl-float 9s ease-in-out infinite reverse;
}
.sl-hero__crystal--3 {
    width: 130px; height: 130px;
    bottom: 34%; right: 18%;
    background: linear-gradient(135deg, rgba(2,132,199,0.4), rgba(56,189,248,0.05));
    border: 1px solid rgba(255,255,255,0.2);
    clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
    animation: sl-float 6s ease-in-out infinite;
}
.sl-hero__ring {
    position: absolute;
    top: 46%; left: 42%;
    width: 380px; height: 380px;
    border-radius: 50%;
    border: 1px dashed rgba(255,255,255,0.18);
    transform: translate(-50%, -50%);
}
.sl-hero__panel {
    position: absolute;
    left: 10%;
    top: 40%;
    width: 250px;
    padding: var(--sl-space-5);
    border-radius: var(--sl-radius-md);
    color: #fff;
}
.sl-hero__panel .sl-stat__number { font-size: 2rem; color: #fff; }
.sl-hero__panel .sl-stat__label { color: var(--sl-text-on-dark-muted); font-size: 0.8rem; }

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

/* Generic swappable photo slot (used everywhere a photograph would go) */
.sl-photo-slot {
    position: relative;
    border-radius: var(--sl-radius-lg);
    overflow: hidden;
    background: linear-gradient(150deg, var(--sl-color-charcoal) 0%, var(--sl-color-primary-darker) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.55);
    aspect-ratio: 4 / 3;
    isolation: isolate;
}
.sl-photo-slot::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.06) 1px, transparent 1px);
    background-size: 28px 28px;
    z-index: -1;
}
.sl-photo-slot--square { aspect-ratio: 1 / 1; }
.sl-photo-slot--wide { aspect-ratio: 16 / 9; }
.sl-photo-slot--tall { aspect-ratio: 3 / 4; }
.sl-photo-slot__icon { width: 64px; height: 64px; opacity: 0.85; }
.sl-photo-slot--photo { background: var(--sl-color-charcoal); }
.sl-photo-slot--photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.sl-photo-slot__label {
    position: absolute;
    bottom: var(--sl-space-4);
    left: var(--sl-space-4);
    right: var(--sl-space-4);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.55);
}

/* Decorative section dividers / blobs */
.sl-section-divider { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.sl-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.5;
}
.sl-blob--sky { background: radial-gradient(circle, rgba(56,189,248,0.35), transparent 70%); width: 420px; height: 420px; }
.sl-blob--silver { background: radial-gradient(circle, rgba(199,206,214,0.35), transparent 70%); width: 320px; height: 320px; }

@media (max-width: 992px) {
    .sl-hero__inner { grid-template-columns: 1fr; }
    .sl-hero__visual { height: 380px; margin-top: var(--sl-space-6); }
    .sl-hero__panel { left: 6%; }
}
@media (max-width: 640px) {
    .sl-hero { min-height: auto; padding-bottom: var(--sl-space-8); }
    .sl-hero__visual { height: 300px; }
    .sl-hero__panel { display: none; }
}
