/* Explain: Layout styles for hero, about, and other sections. */
.hero-stage {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2.5rem;
    min-height: 100svh;
    overflow: hidden;
    background: var(--background-color);
}

.hero-media {
    position: absolute;
    z-index: -2;
    inset: 0;
    overflow: hidden;
    padding-block-start: clamp(6.5rem, 14vh, 9.5rem);
    border-radius: 0;
}

.hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    filter: saturate(0.98) contrast(1.02) brightness(1.04);
}

.hero-scrim {
    position: absolute;
    z-index: -1;
    inset: 0;
    border-radius: 0;
    background: linear-gradient(180deg, rgba(20, 22, 26, 0.5), rgba(20, 22, 26, 0.5));
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 700;
}

.hero-eyebrow-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 999px;
    background: var(--accent-color);
    box-shadow: 0 0 12px var(--accent-color);
}

.hero-title {
    font-size: clamp(1.95rem, 4.6vw, 3.4rem);
    line-height: 1.14;
}

.hero-lead {
    text-wrap: balance;
}

.about-portrait {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    background:
        radial-gradient(ellipse 62% 48% at 50% 24%, rgba(196, 31, 85, 0.22), transparent 72%),
        radial-gradient(ellipse 88% 55% at 50% 104%, rgba(20, 22, 26, 0.7), transparent 68%),
        linear-gradient(180deg, #1b1e24 0%, #0b0c0f 100%);
    box-shadow: var(--shadow-soft), 0 0 80px rgba(196, 31, 85, 0.2);
}

.about-portrait::before {
    position: absolute;
    z-index: 0;
    inset: 0;
    content: "";
    opacity: 0.5;
    background: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.03) 0 1px, transparent 1px 80px);
    -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.85), transparent 82%);
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.85), transparent 82%);
}

.about-portrait::after {
    position: absolute;
    z-index: 2;
    inset: 0;
    content: "";
    pointer-events: none;
    background: radial-gradient(ellipse 80% 74% at 50% 42%, transparent 52%, rgba(8, 8, 10, 0.78) 100%);
}

.about-portrait img {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.about-badge {
    position: absolute;
    z-index: 3;
    inset-block-end: 1.25rem;
    inset-inline-start: 1.25rem;
}

.hero-scroll-cue {
    display: grid;
    width: 3rem;
    height: 3rem;
    place-items: center;
    border: 1px solid var(--primary-border);
    border-radius: 999px;
    color: var(--primary-color);
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(20, 22, 26, 0.12);
    animation: hero-cue-bob 2.6s ease-in-out infinite;
    transition: border-color 260ms ease, color 260ms ease;
}

.hero-scroll-cue:hover {
    border-color: var(--primary-color);
    color: var(--primary-hover);
}

.hero-portrait-wrap {
    display: flex;
    justify-content: center;
    order: 2;
    width: 100%;
    margin-block-start: auto;
    padding-block-start: 2.5rem;
    pointer-events: none;
}

.hero-portrait-img {
    width: min(70vw, 20rem);
    height: auto;
    max-height: 58vh;
    object-fit: contain;
    object-position: bottom center;
    filter: drop-shadow(0 24px 42px rgba(0, 0, 0, 0.62));
}

.side-portrait-frame {
    display: block;
}

.side-portrait {
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    isolation: isolate;
    padding: clamp(0.65rem, 2.2vw, 1.1rem);
    border-radius: var(--radius-lg);
    background:
        radial-gradient(ellipse 62% 50% at 50% 18%, rgba(196, 31, 85, 0.14), transparent 72%),
        linear-gradient(150deg, rgba(43, 48, 55, 0.1) 0%, rgba(196, 31, 85, 0.13) 48%, rgba(43, 48, 55, 0.16) 100%);
    box-shadow: 0 20px 48px rgba(43, 48, 55, 0.14);
    transition: box-shadow 440ms ease;
}

/* شريط وردي متحرك يلفّ حول الإطار */
.side-portrait::after {
    position: absolute;
    z-index: 3;
    inset: 0;
    padding: 2px;
    content: "";
    border-radius: inherit;
    background: conic-gradient(
        from var(--portrait-angle, 0deg),
        var(--accent-color) 0deg,
        rgba(255, 255, 255, 0.06) 70deg,
        var(--accent-color) 140deg,
        rgba(43, 48, 55, 0.32) 220deg,
        var(--accent-color) 300deg,
        rgba(255, 255, 255, 0.06) 360deg
    );
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask-composite: exclude;
    opacity: 0.9;
    pointer-events: none;
    animation: portrait-border-spin 7s linear infinite;
}

.side-portrait img {
    width: 100%;
    height: auto;
    max-height: 44rem;
    border-radius: calc(var(--radius-lg) - 0.55rem);
    object-fit: contain;
    object-position: bottom center;
    filter: drop-shadow(0 20px 34px rgba(43, 48, 55, 0.24));
    transition: transform 520ms cubic-bezier(0.22, 1, 0.36, 1);
}

/* تفاعل لطيف عند مرور المؤشر */
@media (hover: hover) {
    .side-portrait:hover {
        box-shadow: 0 30px 66px rgba(43, 48, 55, 0.2), 0 0 0 1px rgba(196, 31, 85, 0.25);
    }

    .side-portrait:hover img {
        transform: scale(1.03);
    }
}

@property --portrait-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

@keyframes portrait-border-spin {
    to {
        --portrait-angle: 360deg;
    }
}

@media (prefers-reduced-motion: reduce) {
    .side-portrait::after {
        animation: none;
    }

    .side-portrait img {
        transition: none;
    }

    .side-portrait:hover img {
        transform: none;
    }
}

@media (min-width: 1024px) {
    .hero-portrait-wrap {
        position: absolute;
        z-index: 0;
        inset-block-end: 0;
        inset-inline-start: 0;
        width: clamp(16rem, 24vw, 22rem);
        margin-block-start: 0;
        padding-inline-start: 1.5rem;
    }

    .hero-portrait-img {
        width: 100%;
        max-height: 78vh;
        object-position: bottom left;
    }

    .hero-stage .hero-copy {
        max-width: 40rem;
    }
}

@keyframes hero-cue-bob {
    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(5px);
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .ticker-move {
        animation: none;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}