/* ============================================
   HERO SECTION
   - Hero Layout & Background
   - Trust Badge
   - Headline & Subtitle
   - CTA Buttons (Shimmer Effect)
   - Bento Feature Grid
   - Hero Image & Shapes
   - Mouse Scroll Indicator
   ============================================ */

/* ── Hero Section — Left/Right with Bento Grid ── */
.hero-section {
    background: var(--bg-subtle, #FAFBFE);
    overflow: hidden;
    /* Full above-the-fold: hero owns the first viewport.
       svh = small viewport height (mobile-safe); vh fallback first. */
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: center;
    /* 90px fixed header overlays the top; fluid breathing room scales with
       viewport height so the fold holds from 768px to 1080px+ screens. */
    padding: calc(90px + clamp(10px, 2.6vh, 34px)) 0 clamp(14px, 2.8vh, 34px);
    margin-top: 0;
    position: relative;
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

/* Ambient radial glow */
.hero-ambient {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse at 30% 30%, rgba(234, 69, 38, 0.06) 0%, transparent 55%),
        radial-gradient(ellipse at 70% 60%, rgba(59, 130, 246, 0.03) 0%, transparent 45%),
        radial-gradient(ellipse at 50% 90%, rgba(234, 69, 38, 0.03) 0%, transparent 40%);
}

/* Dot pattern overlay */
.hero-dot-pattern {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.35;
    background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8ZGVmcz4KICAgIDxwYXR0ZXJuIGlkPSJwYXR0ZXJuIiBwYXR0ZXJuVW5pdHM9InVzZXJTcGFjZU9uVXNlIiB3aWR0aD0iNDAiIGhlaWdodD0iNDAiPgogICAgICAgIDxyZWN0IGlkPSJwYXR0ZXJuLWJhY2tncm91bmQiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InRyYW5zcGFyZW50Ij48L3JlY3Q+CiAgICAgICAgPGNpcmNsZSBjeD0iMjAiIGN5PSIyMCIgcj0iMSIgZmlsbD0icmdiYSgyNTUsIDkwLCA2MCwgMC4xNSkiIC8+CiAgICA8L3BhdHRlcm4+CjwvZGVmcz4KPHJlY3Qgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgZmlsbD0idXJsKCNwYXR0ZXJuKSI+PC9yZWN0Pgo8L3N2Zz4=');
}

.hero-section::before {
    display: none;
}

/* Left content column */
.hero-content {
    position: relative;
    z-index: 1;
}

/* Trust badge */
.hero-trust-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--surface, #fff);
    border: 1px solid var(--border-light, #F3F4F6);
    border-radius: var(--border-radius-full);
    padding: 6px 18px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-xs);
    transition: all var(--dur) var(--ease);
}

.hero-trust-badge:hover {
    box-shadow: var(--shadow-sm);
    border-color: var(--border-color, #E5E7EB);
}

.hero-trust-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--success-color, #10B981);
    flex-shrink: 0;
    position: relative;
}

.hero-trust-dot::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 1.5px solid rgba(16, 185, 129, 0.2);
    animation: heroPulseRing 2.5s ease-out infinite;
}

@keyframes heroPulseRing {
    0% {
        transform: scale(1);
        opacity: 0.3;
    }
    100% {
        transform: scale(2.2);
        opacity: 0;
    }
}

.hero-trust-text {
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    color: var(--gray-700, #374151);
    letter-spacing: 0.03em;
}

/* Headline */
.hero-title {
    font-size: clamp(2.6rem, 2.2vw + 1.35rem, 3.6rem);
    font-weight: var(--weight-extrabold);
    margin-bottom: 1.25rem;
    color: var(--gray-900);
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.hero-title-accent {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Subtitle */
.hero-subtitle {
    font-size: var(--text-lg);
    color: var(--text-secondary);
    margin-bottom: clamp(1.25rem, 2.6vh, 2rem);
    max-width: 540px;
    line-height: 1.65;
}

.hero-subtitle strong {
    color: var(--gray-800, #1F2937);
    font-weight: var(--weight-semibold);
}

/* CTA Buttons */
.hero-btns {
    display: flex;
    gap: 14px;
    margin-bottom: 0;
}

.hero-btn {
    padding: 14px 30px;
    border-radius: var(--border-radius-lg);
    font-weight: var(--weight-semibold);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all var(--dur) var(--ease);
    font-family: var(--font-primary);
    letter-spacing: 0.02em;
    position: relative;
    overflow: hidden;
    font-size: var(--text-base);
}

.btn-primary-masaha {
    background: var(--gradient-primary);
    color: #fff;
    box-shadow: var(--shadow-primary);
    border: none;
}

.btn-primary-masaha:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-primary-lg);
    background: var(--gradient-primary-hover);
    color: #fff;
}

.btn-primary-masaha:active {
    transform: translateY(0);
}

/* Shimmer sweep */
.btn-shimmer {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.18) 50%, rgba(255,255,255,0) 100%);
    transform: translateX(-100%);
    transition: transform 0.6s var(--ease);
    pointer-events: none;
}

.btn-primary-masaha:hover .btn-shimmer {
    transform: translateX(100%);
}

.btn-outline-masaha {
    border: 2px solid var(--border-color, #E5E7EB);
    color: var(--gray-700, #374151);
    background: var(--surface, #fff);
}

.btn-outline-masaha:hover {
    border-color: var(--gray-400, #9CA3AF);
    color: var(--gray-900, #111827);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

/* Bento Feature Cards — Full width horizontal row */
.hero-bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-top: clamp(18px, 3.4vh, 40px);
    max-width: 100%;
}

.hero-bento-card {
    background: var(--surface, #fff);
    border: 1px solid var(--border-light, #F3F4F6);
    border-radius: var(--border-radius-xl);
    padding: clamp(14px, 2.2vh, 22px) 16px;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-xs);
    transition:
        transform var(--dur) var(--ease),
        box-shadow var(--dur) var(--ease),
        border-color var(--dur) var(--ease);
}

.hero-bento-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-card-hover);
    border-color: var(--primary-100);
}

/* Bento icon — unified brand color */
.hero-bento-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--border-radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    font-size: 18px;
    background: var(--primary-50);
    color: var(--primary-color);
    transition: all var(--dur) var(--ease);
}

/* Icon hover — fill with brand gradient */
.hero-bento-card:hover .hero-bento-icon {
    background: var(--gradient-primary);
    color: #fff;
    box-shadow: var(--shadow-primary);
}

/* Bento content */
.hero-bento-title {
    font-size: var(--text-base);
    font-weight: var(--weight-bold);
    color: var(--gray-900, #111827);
    margin-bottom: 3px;
    letter-spacing: -0.01em;
}

.hero-bento-desc {
    font-size: var(--text-sm);
    color: var(--text-muted, #57606A);
    line-height: 1.45;
    margin-bottom: 0;
}

/* Hero image — right column */
.hero-image {
    text-align: center;
    position: relative;
    cursor: pointer;
}

.hero-image img {
    max-width: 100%;
    height: auto; /* FIX: without this, the height attribute forces a fixed
                     height while max-width squeezes the width — stretching
                     the image vertically on any viewport narrower than its
                     intrinsic width */
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow-lg);
    transform: translateY(0);
    transition: transform 0.5s var(--ease);
    z-index: 1;
    position: relative;
}

.hero-image:hover img {
    transform: translateY(-10px);
}

.hero-image-frame::after {
    content: "\f00e";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: var(--surface-glass);
    backdrop-filter: blur(8px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    z-index: 2;
    opacity: 0;
    transform: translateY(10px);
    box-shadow: var(--shadow-sm);
    color: var(--primary-color);
    transition: all var(--dur) var(--ease);
}

.hero-image:hover .hero-image-frame::after {
    opacity: 1;
    transform: translateY(0);
}

/* Hero shapes */
.hero-shape {
    position: absolute;
    z-index: 0;
}

.hero-shape-1 {
    top: -50px;
    right: -20px;
    width: 150px;
    height: 150px;
    background: var(--gradient-primary);
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    opacity: 0.5;
    animation: float 6s ease-in-out infinite;
}

.hero-shape-2 {
    bottom: -30px;
    left: -40px;
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, var(--accent-light), var(--accent-color));
    border-radius: 63% 37% 54% 46% / 55% 48% 52% 45%;
    opacity: 0.5;
    animation: float 8s ease-in-out infinite;
}

/* Mouse scroll */
.mouse-scroll {
    position: absolute;
    bottom: clamp(8px, 1.6vh, 22px);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    z-index: 10;
    transition: all var(--dur) var(--ease);
    cursor: pointer;
}

.mouse-scroll:hover {
    transform: translateX(-50%) translateY(-5px);
}

.mouse {
    width: 28px;
    height: 45px;
    border: 2px solid var(--primary-color);
    border-radius: 25px;
    position: relative;
    display: flex;
    justify-content: center;
}

.mouse-wheel {
    width: 6px;
    height: 6px;
    background-color: var(--primary-color);
    border-radius: 50%;
    position: absolute;
    top: 10px;
    animation: scroll 1.5s infinite;
}

.mouse-label {
    font-size: var(--text-xs);
    color: var(--text-muted);
    font-weight: var(--weight-medium);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* ============================================
   HERO v3 — Premium layer
   - Image frame + fold-safe image cap
   - Delivery ticket (signature element)
   - Bento hover accent
   - Reduced motion guards
   ============================================ */

/* Image frame — tight box the ticket and zoom cue anchor to */
.hero-image-frame {
    position: relative;
    display: inline-block;
    z-index: 1;
}

/* Fold guarantee: image can never push the bento row below the viewport.
   52svh leaves ~48svh for header gap + bento + paddings on every screen. */
.hero-image-frame img {
    max-height: min(52vh, 540px);
    max-height: min(52svh, 540px);
    width: auto;
}

/* ── Delivery ticket — glass logistics label clipped to the unit ── */
.hero-ticket {
    position: absolute;
    inset-inline-end: -18px;
    bottom: 28px;
    z-index: 3;
    min-width: 205px;
    padding: 14px 16px 12px;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 14px;
    box-shadow:
        0 18px 40px -14px rgba(17, 24, 39, 0.28),
        0 2px 8px rgba(17, 24, 39, 0.06);
    text-align: start;
    animation: ticketFloat 6s ease-in-out infinite;
}

/* Perforation — the tear-off edge of a shipping tag */
.hero-ticket::before {
    content: '';
    position: absolute;
    top: 38px;
    left: 14px;
    right: 14px;
    border-top: 1.5px dashed var(--border-color, #E5E7EB);
}

/* Punched hole */
.hero-ticket::after {
    content: '';
    position: absolute;
    top: 14px;
    inset-inline-end: 14px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--bg-subtle, #FAFBFE);
    box-shadow: inset 0 1px 2px rgba(17, 24, 39, 0.18);
}

.hero-ticket-code {
    display: block;
    font-family: var(--font-primary);
    font-size: 10.5px;
    font-weight: var(--weight-bold);
    letter-spacing: 0.14em;
    color: var(--text-muted, #57606A);
    text-transform: uppercase;
    direction: ltr;
    margin-bottom: 14px;
}

.hero-ticket-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
    color: var(--gray-800, #1F2937);
    margin-bottom: 6px;
}

.hero-ticket-row i {
    color: var(--success-color, #10B981);
    font-size: 13px;
}

.hero-ticket-price {
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.hero-ticket-price strong {
    font-size: var(--text-xl);
    font-weight: var(--weight-extrabold);
    color: var(--primary-color);
    letter-spacing: -0.02em;
    unicode-bidi: embed;
}

@keyframes ticketFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* ── Bento hover accent — brand line sweeps across the top ── */
.hero-bento-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.35s var(--ease);
}

.hero-bento-card:hover::before {
    transform: scaleX(1);
}

/* ── Fold + layout tuning ── */
@media (max-width: 1200px) and (min-width: 992.02px) {
    .hero-ticket {
        min-width: 185px;
        inset-inline-end: -8px;
    }
}

@media (max-width: 992px) {
    /* Stacked layout scrolls naturally; release the image cap */
    .hero-image-frame img {
        max-height: none;
    }

    .hero-ticket {
        inset-inline-end: 8px;
        bottom: 16px;
        min-width: 180px;
        padding: 12px 14px 10px;
    }
}

@media (max-height: 700px) and (min-width: 992.02px) {
    /* Short laptops (e.g. 1366×768 with heavy browser chrome):
       tighten the ticket and bento so the fold still holds */
    .hero-ticket {
        bottom: 16px;
    }

    .hero-bento-desc {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-ticket {
        animation: none;
    }

    .hero-trust-dot::after {
        animation: none;
    }
}
