/* ============================================================
   DESH FUNDING — HERO.CSS
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,600;0,700;1,600&family=DM+Sans:wght@300;400;500;600&family=DM+Mono:wght@400;500&display=swap');

/* ── Tokens ── */
:root {
    --h-green: #1a9e63;
    --h-green-dark: #0f6340;
    --h-green-deep: #062e1f;
    --h-green-glow: rgba(26, 158, 99, 0.35);
    --h-gold: #f59e0b;
    --h-gold-light: #fcd34d;
    --h-gold-glow: rgba(245, 158, 11, 0.3);
    --h-teal: #0d9488;
    --h-white: #ffffff;
    --h-text-dim: rgba(255, 255, 255, 0.7);
    --h-text-dimmer: rgba(255, 255, 255, 0.45);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1.0);
    --ease-out: cubic-bezier(0.0, 0.0, 0.2, 1.0);
}

/* ── Reset ── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
}

body {
    font-family: 'DM Sans', system-ui, sans-serif;
}

/* ============================================================
   1. SECTION BASE
   ============================================================ */
.hero {
    position: relative;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    isolation: isolate;
}

/* ============================================================
   2. BACKGROUND
   ============================================================ */
.hero__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.hero__bg-base {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 10% 20%, #0d5c36 0%, transparent 60%),
        radial-gradient(ellipse 60% 80% at 90% 80%, #073d24 0%, transparent 55%),
        radial-gradient(ellipse 100% 100% at 50% 50%, #031a11 0%, #020f0a 100%);
}

/* Glowing orbs */
.hero__orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0;
    animation: orbFade 1.2s var(--ease-out) forwards;
}

.hero__orb--1 {
    width: 520px;
    height: 520px;
    top: -120px;
    left: -80px;
    background: radial-gradient(circle, rgba(26, 158, 99, 0.22) 0%, transparent 70%);
    animation-delay: 0.2s;
}

.hero__orb--2 {
    width: 400px;
    height: 400px;
    top: 30%;
    right: 5%;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.14) 0%, transparent 70%);
    animation-delay: 0.5s;
}

.hero__orb--3 {
    width: 300px;
    height: 300px;
    bottom: 10%;
    left: 30%;
    background: radial-gradient(circle, rgba(13, 148, 136, 0.18) 0%, transparent 70%);
    animation-delay: 0.8s;
}

.hero__orb--4 {
    width: 220px;
    height: 220px;
    top: 15%;
    right: 35%;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.10) 0%, transparent 70%);
    animation-delay: 1s;
}

/* Grid overlay */
.hero__grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(26, 158, 99, 0.055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(26, 158, 99, 0.055) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, black 20%, transparent 100%);
}

/* Grain texture */
.hero__grain {
    position: absolute;
    inset: 0;
    opacity: 0.032;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 200px 200px;
    pointer-events: none;
}

/* Diagonal slash */
.hero__slash {
    position: absolute;
    top: 0;
    right: 0;
    width: 55%;
    height: 100%;
    background: linear-gradient(135deg, transparent 40%, rgba(15, 99, 64, 0.08) 40%, rgba(15, 99, 64, 0.04) 100%);
    clip-path: polygon(30% 0, 100% 0, 100% 100%, 0% 100%);
}

/* ============================================================
   3. LAYOUT CONTAINER
   ============================================================ */
.hero__container {
    position: relative;
    z-index: 2;
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 3rem;
    max-width: 1280px;
    margin: 0 auto;
    padding: 2rem 2.5rem 3rem;
    width: 100%;
}

/* ============================================================
   4. COPY — LEFT COLUMN
   ============================================================ */
.hero__copy {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* ── Eyebrow ── */
.hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem 0.4rem 0.7rem;
    background: rgba(26, 158, 99, 0.15);
    border: 1px solid rgba(26, 158, 99, 0.35);
    border-radius: 99px;
    font-size: 0.78rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.75);
    letter-spacing: 0.03em;
    width: fit-content;
    margin-bottom: 0.6rem;
    opacity: 1;
    backdrop-filter: blur(8px);
}

.hero__eyebrow-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--h-green);
    box-shadow: 0 0 8px var(--h-green);
    animation: pulseGlow 2s ease-in-out infinite;
    flex-shrink: 0;
}

.hero__eyebrow-taka {
    font-size: 1rem;
    color: var(--h-gold);
    margin-left: 0.15rem;
    font-family: serif;
    line-height: 1;
}

/* ── Headline ── */
.hero__headline {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 700;
    font-size: clamp(2.8rem, 5.5vw, 5rem);
    line-height: 1.08;
    color: var(--h-white);
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.04em;
}

.hero__headline-line {
    display: block;
    opacity: 1;
}

.hero__headline-line--accent {
    color: var(--h-gold-light);
    font-style: italic;
    position: relative;
    width: fit-content;
}

/* Animated underline on "Bangladesh" */
.hero__headline-underline {
    position: relative;
    font-style: normal;
    color: var(--h-white);
}

.hero__headline-underline::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--h-gold), var(--h-green));
    border-radius: 99px;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.7s var(--ease-out) 1.2s;
}

.hero--visible .hero__headline-underline::after {
    transform: scaleX(1);
}

/* ── Subtext ── */
.hero__subtext {
    font-size: clamp(1rem, 1.6vw, 1.15rem);
    font-weight: 400;
    line-height: 1.72;
    color: var(--h-text-dim);
    max-width: 480px;
    margin-bottom: 1.2rem;
    opacity: 1;
}

.hero__subtext em {
    font-style: normal;
    color: var(--h-white);
    font-weight: 600;
    position: relative;
}

/* ── Micro Stats ── */
.hero__microstats {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 1.4rem;
    opacity: 1;
    padding: 0.75rem 1.1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    width: fit-content;
    backdrop-filter: blur(10px);
}

.hero__microstat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-inline: 0.9rem;
}

.hero__microstat-value {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--h-white);
    line-height: 1;
    letter-spacing: -0.01em;
}

.hero__microstat-label {
    font-size: 0.72rem;
    color: var(--h-text-dimmer);
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-top: 0.2rem;
}

.hero__microstat-sep {
    width: 1px;
    height: 36px;
    background: rgba(255, 255, 255, 0.12);
    flex-shrink: 0;
}

/* ── CTAs ── */
.hero__ctas {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin-bottom: 1.4rem;
    flex-wrap: wrap;
    opacity: 1;
}

.hero__cta {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.9rem 1.8rem;
    border-radius: 12px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: 2px solid transparent;
    transition:
        background 0.25s var(--ease-out),
        border-color 0.25s var(--ease-out),
        box-shadow 0.25s var(--ease-out),
        transform 0.15s var(--ease-spring),
        color 0.25s var(--ease-out);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.hero__cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.08);
    opacity: 0;
    transition: opacity 0.2s;
}

.hero__cta:hover::before {
    opacity: 1;
}

.hero__cta:active {
    transform: scale(0.97);
}

/* Primary CTA */
.hero__cta--primary {
    background: linear-gradient(135deg, var(--h-gold) 0%, #e58c00 100%);
    border-color: transparent;
    color: #0a1f0d;
    box-shadow: 0 4px 20px var(--h-gold-glow), 0 1px 3px rgba(0, 0, 0, 0.3);
}

.hero__cta--primary:hover {
    background: linear-gradient(135deg, var(--h-gold-light) 0%, var(--h-gold) 100%);
    box-shadow: 0 8px 36px var(--h-gold-glow), 0 2px 8px rgba(0, 0, 0, 0.25);
    transform: translateY(-2px);
}

/* Secondary CTA */
.hero__cta--secondary {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--h-white);
    backdrop-filter: blur(8px);
}

.hero__cta--secondary:hover {
    background: rgba(255, 255, 255, 0.13);
    border-color: rgba(255, 255, 255, 0.38);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
    color: var(--h-white);
}

.hero__cta-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.85;
    flex-shrink: 0;
}

.hero__cta-arrow {
    font-size: 1.1rem;
    margin-left: 0.1rem;
    transition: transform 0.2s var(--ease-spring);
}

.hero__cta--primary:hover .hero__cta-arrow {
    transform: translateX(4px);
}

/* ── Trust bar ── */
.hero__trust {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    opacity: 1;
    flex-wrap: wrap;
}

.hero__trust-label {
    font-size: 0.78rem;
    color: var(--h-text-dimmer);
    font-weight: 500;
    white-space: nowrap;
}

.hero__trust-avatars {
    display: flex;
    align-items: center;
}

.hero__trust-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    color: #fff;
    margin-left: -8px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    flex-shrink: 0;
}

.hero__trust-avatar:first-child {
    margin-left: 0;
}

.hero__trust-avatar--more {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
    font-size: 0.6rem;
    letter-spacing: -0.03em;
    font-weight: 600;
}

.hero__trust-stars {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.78rem;
    color: var(--h-gold);
    letter-spacing: 0.04em;
}

.hero__trust-rating {
    font-family: 'DM Mono', monospace;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--h-white);
    opacity: 0.8;
}

/* ============================================================
   5. VISUAL — RIGHT COLUMN
   ============================================================ */
.hero__visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 480px;
}

/* ── SVG Illustration ── */
.hero__illustration {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 500px;
    opacity: 1;
    filter: drop-shadow(0 24px 64px rgba(26, 158, 99, 0.25)) drop-shadow(0 8px 24px rgba(0, 0, 0, 0.5));
    animation: illustrationIn 1s var(--ease-out) 0.4s forwards;
}

.hero__svg {
    width: 100%;
    height: auto;
    display: block;
}

/* SVG floating elements */
.svg-float-1 {
    animation: svgFloat 4s ease-in-out infinite;
}

.svg-float-2 {
    animation: svgFloat 5s ease-in-out infinite;
    animation-delay: -1.5s;
}

.svg-float-3 {
    animation: svgFloat 4.5s ease-in-out infinite;
    animation-delay: -0.8s;
}

.svg-pulse {
    animation: svgPulse 2.5s ease-in-out infinite;
}

/* ── Floating HTML Cards ── */
.hero__card {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.7rem 0.95rem;
    background: rgba(10, 40, 24, 0.85);
    border: 1px solid rgba(26, 158, 99, 0.25);
    border-radius: 14px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    white-space: nowrap;
    opacity: 1;
    z-index: 3;
}

.hero__card-icon {
    font-size: 1.2rem;
    line-height: 1;
    flex-shrink: 0;
}

.hero__card-info {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.hero__card-label {
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.45);
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-family: 'DM Sans', sans-serif;
}

.hero__card-value {
    font-size: 0.88rem;
    font-weight: 600;
    color: #fff;
    font-family: 'DM Sans', sans-serif;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.hero__card-time {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.45);
    font-weight: 400;
}

.hero__card-badge {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.18rem 0.5rem;
    border-radius: 99px;
    line-height: 1.5;
}

.hero__card-badge--green {
    background: rgba(26, 158, 99, 0.22);
    color: #4ade80;
    border: 1px solid rgba(74, 222, 128, 0.3);
    animation: badgePulse 2s ease-in-out infinite;
}

.hero__card-badge--gold {
    background: rgba(245, 158, 11, 0.22);
    color: #fcd34d;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

/* Card positions & animations */
.hero__card--loan {
    top: 8%;
    left: -2%;
    animation: cardFloatIn 0.7s var(--ease-spring) 1.4s forwards,
        cardBobA 5s ease-in-out 2.1s infinite;
}

.hero__card--repay {
    bottom: 18%;
    left: -4%;
    animation: cardFloatIn 0.7s var(--ease-spring) 1.7s forwards,
        cardBobB 5.5s ease-in-out 2.4s infinite;
}

.hero__card--lender {
    top: 22%;
    right: -2%;
    animation: cardFloatIn 0.7s var(--ease-spring) 2s forwards,
        cardBobA 4.8s ease-in-out 2.7s infinite;
}

/* ============================================================
   6. WAVE DIVIDER
   ============================================================ */
.hero__wave {
    position: relative;
    z-index: 2;
    line-height: 0;
    margin-top: auto;
}

.hero__wave svg {
    display: block;
    width: 100%;
    height: 80px;
}

/* ============================================================
   7. ENTRY ANIMATIONS — data-animate
   ============================================================ */

/* Elements start visible — animation is progressive enhancement */
[data-animate="fade-up"] {
    opacity: 1;
    transform: translateY(0);
}

[data-animate="float-in"] {
    opacity: 1;
}

/* When JS adds .hero--visible, run the entrance animations */
.hero--animate [data-animate="fade-up"] {
    opacity: 0;
    transform: translateY(28px);
    animation: fadeUp 0.7s var(--ease-out) forwards;
}

.hero--animate .hero__headline-line {
    opacity: 0;
    animation: fadeUp 0.6s var(--ease-out) forwards;
}

[data-delay="0"] {
    animation-delay: 0.05s !important;
}

[data-delay="1"] {
    animation-delay: 0.15s !important;
}

[data-delay="2"] {
    animation-delay: 0.28s !important;
}

[data-delay="3"] {
    animation-delay: 0.40s !important;
}

[data-delay="4"] {
    animation-delay: 0.52s !important;
}

[data-delay="5"] {
    animation-delay: 0.64s !important;
}

/* ============================================================
   8. KEYFRAME LIBRARY
   ============================================================ */

@keyframes orbFade {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(28px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes illustrationIn {
    from {
        opacity: 0;
        transform: translateY(24px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes cardFloatIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.92);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes cardBobA {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

@keyframes cardBobB {

    0%,
    100% {
        transform: translateY(0);
    }

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

@keyframes svgFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-9px);
    }
}

@keyframes svgPulse {

    0%,
    100% {
        opacity: 0.5;
        r: 3;
    }

    50% {
        opacity: 1;
        r: 4.5;
    }
}

@keyframes pulseGlow {

    0%,
    100% {
        box-shadow: 0 0 6px var(--h-green);
    }

    50% {
        box-shadow: 0 0 14px var(--h-green), 0 0 28px var(--h-green);
    }
}

@keyframes badgePulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.65;
    }
}

/* ============================================================
   9. RESPONSIVE
   ============================================================ */

@media (max-width: 1100px) {
    .hero__container {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
        padding: 6rem 2.5rem 3rem;
        gap: 4rem;
    }

    .hero__copy {
        text-align: center;
        align-items: center;
    }

    .hero__subtext {
        max-width: 600px;
    }

    .hero__microstats {
        width: auto;
    }

    .hero__visual {
        justify-content: center;
        min-height: 380px;
    }

    .hero__illustration {
        max-width: 420px;
    }

    .hero__card--loan {
        left: 0;
    }

    .hero__card--repay {
        left: 0;
    }

    .hero__card--lender {
        right: 0;
    }
}

@media (max-width: 768px) {
    .hero__container {
        padding: 5.5rem 1.5rem 2rem;
        gap: 3rem;
    }

    .hero__headline {
        font-size: clamp(2.2rem, 9vw, 3.2rem);
    }

    .hero__subtext {
        font-size: 0.95rem;
    }

    .hero__microstats {
        padding: 0.75rem 1rem;
        gap: 0;
    }

    .hero__microstat-value {
        font-size: 1.3rem;
    }

    .hero__microstat {
        padding-inline: 0.9rem;
    }

    .hero__visual {
        min-height: 320px;
    }

    .hero__illustration {
        max-width: 360px;
    }

    /* Hide some cards on small screens */
    .hero__card--repay {
        display: none;
    }

    .hero__card--loan {
        top: 4%;
        left: -1%;
    }

    .hero__card--lender {
        top: auto;
        bottom: 4%;
        right: -1%;
    }
}

@media (max-width: 480px) {
    .hero__container {
        padding: 5rem 1.25rem 1.5rem;
        gap: 2.5rem;
    }

    .hero__headline {
        font-size: clamp(2rem, 11vw, 2.8rem);
    }

    .hero__ctas {
        flex-direction: column;
        width: 100%;
        gap: 0.7rem;
    }

    .hero__cta {
        width: 100%;
        justify-content: center;
        padding: 1rem 1.5rem;
    }

    .hero__microstats {
        width: 100%;
        justify-content: space-around;
    }

    .hero__illustration {
        max-width: 300px;
    }

    .hero__card {
        font-size: 0.82rem;
        padding: 0.55rem 0.75rem;
    }

    .hero__trust {
        justify-content: center;
    }

    .hero__eyebrow {
        font-size: 0.7rem;
        text-align: center;
    }
}

/* ── High-res screens ── */
@media (min-width: 1600px) {
    .hero__container {
        max-width: 1440px;
        padding-block: 9rem 6rem;
    }

    .hero__headline {
        font-size: 5.5rem;
    }
}