/* ============================================================
   HOME NEW — Premium Landing Page Design System
   ============================================================ */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Space+Grotesk:wght@400;500;600;700&display=swap');

/* ---- Theme Variables ---- */
:root {
    --hn-bg: #f7f8fc;
    --hn-bg-soft: #fff;
    --hn-text: #101828;
    --hn-muted: #667085;
    --hn-card: #fff;
    --hn-border: rgba(15, 23, 42, .09);
    --hn-shadow: 0 24px 70px rgba(15, 23, 42, .08);
    --hn-hero: radial-gradient(circle at 18% 8%, rgba(139, 92, 246, .16), transparent 30%), radial-gradient(circle at 84% 16%, rgba(0, 183, 255, .14), transparent 28%), linear-gradient(180deg, #fff 0%, #f7f8fc 100%);
    --hn-nav: rgba(255, 255, 255, .92);
    --hn-chip: #fff;
}

[data-hn-theme="night"] {
    --hn-bg: #06040A;
    --hn-bg-soft: #07050B;
    --hn-text: #f8fafc;
    --hn-muted: rgba(255, 255, 255, .78);
    --hn-card: linear-gradient(145deg, rgba(18, 16, 26, .96), rgba(10, 8, 15, .96));
    --hn-border: rgba(255, 255, 255, .11);
    --hn-shadow: 0 24px 70px rgba(0, 0, 0, .38);
    --hn-hero: radial-gradient(circle at 20% 8%, rgba(139, 92, 246, .24), transparent 32%), radial-gradient(circle at 80% 18%, rgba(0, 183, 255, .16), transparent 28%), #06040A;
    --hn-nav: rgba(15, 12, 22, .92);
    --hn-chip: rgba(255, 255, 255, .08);
}

/* ---- Base Reset ---- */
.hn-page {
    margin: 0;
    padding: 0;
    background-color: var(--hn-bg);
    color: var(--hn-text);
    font-family: 'Inter', sans-serif;
    transition: background-color 0.35s ease, color 0.35s ease;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.hn-page p {
    color: var(--hn-text);
}

.hn-page *, .hn-page *::before, .hn-page *::after {
    box-sizing: border-box;
}

/* ---- Utility Classes ---- */
.hn-brand-grad {
    background: linear-gradient(135deg, #7C4DFF 0%, #9C4DFF 42%, #00B7FF 74%, #00D084 100%);
}

.hn-text-grad {
    background: linear-gradient(135deg, #7C4DFF, #A855F7, #00B7FF);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

[data-hn-theme="night"] .hn-text-grad {
    background: linear-gradient(135deg, #fff, #A855F7, #8B5CF6, #fff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hn-page-bg {
    background: var(--hn-hero);
}

.hn-surface {
    background: var(--hn-card);
    border: 1px solid var(--hn-border);
    box-shadow: var(--hn-shadow);
    color: var(--hn-text);
}

.hn-nav-glass {
    background: var(--hn-nav);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid var(--hn-border);
    box-shadow: var(--hn-shadow);
}

.hn-glow {
    box-shadow: 0 0 55px rgba(139, 92, 246, .28);
}

/* ---- Animations ---- */
@keyframes hn-marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.hn-marquee {
    display: flex;
    width: max-content;
    animation: hn-marquee 32s linear infinite;
}

@keyframes hn-scan {
    0% { transform: translateX(-120%); }
    48%, 100% { transform: translateX(120%); }
}

.hn-scan {
    position: relative;
    overflow: hidden;
}

.hn-scan::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .18), transparent);
    transform: translateX(-120%);
    animation: hn-scan 3.2s infinite;
    pointer-events: none;
}

@keyframes hn-pulse-ring {
    0% { transform: scale(0.33); }
    80%, 100% { transform: scale(2.5); opacity: 0; }
}

@keyframes hn-pulse-dot {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

@keyframes hn-float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(1deg); }
}

.hn-animate-float {
    animation: hn-float 6s ease-in-out infinite;
}

@keyframes hn-city-blink {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 rgba(0, 208, 132, 0); }
    50% { transform: scale(1.28); box-shadow: 0 0 28px rgba(0, 208, 132, .75); }
}

@keyframes hn-fade-in {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.hn-fade-in {
    animation: hn-fade-in 0.8s ease-out forwards;
}

@keyframes hn-slide-left {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

.hn-slide-left {
    animation: hn-slide-left 0.8s ease-out forwards;
}

@keyframes hn-scale-in {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.hn-scale-in {
    animation: hn-scale-in 1s ease-out forwards;
}

@keyframes hn-bar-move {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@keyframes hn-bounce-arrow {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(10px); }
}

/* ---- No Scrollbar ---- */
.hn-no-scrollbar::-webkit-scrollbar { display: none; }
.hn-no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* ---- Carousel ---- */
.hn-carousel-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 1.2s ease-out, transform 1.2s ease-out;
}

.hn-carousel-img.active {
    opacity: 1;
    transform: scale(1);
}

.hn-carousel-img:not(.active) {
    opacity: 0;
    transform: scale(1.1);
}

/* ---- Brazil Map ---- */
.hn-map-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    aspect-ratio: 1;
    margin: 0 auto;
}

.hn-city-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(135deg, #7C4DFF, #00D084);
    animation: hn-city-blink 2.2s infinite;
    position: relative;
    z-index: 10;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.8);
}

.hn-city-ping {
    width: 16px;
    height: 16px;
    border-radius: 999px;
    background: #10b981;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.5;
    animation: hn-pulse-ring 2s infinite;
    z-index: 5;
}

.hn-city-label {
    position: absolute;
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
    white-space: nowrap;
    background: rgba(0, 0, 0, .6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, .1);
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 7px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: white;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    z-index: 50;
}

.hn-city-point:hover .hn-city-label {
    opacity: 0.4;
}

.hn-city-point.active .hn-city-label {
    opacity: 1 !important;
    background: white;
    color: black;
    border-color: rgba(255, 255, 255, .2);
    box-shadow: 0 10px 30px rgba(0,0,0,.3);
}

.hn-city-point.active .hn-city-label::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #10b981;
    margin-right: 6px;
    vertical-align: middle;
}

/* ---- Side Cards ---- */
.hn-side-card {
    transition: transform 0.3s ease;
}

.hn-side-card:hover {
    transform: translateY(-10px);
}

.hn-side-card img {
    filter: grayscale(1) brightness(0.5);
    transition: all 0.7s;
}

.hn-side-card:hover img {
    filter: grayscale(0) brightness(1);
}

.hn-side-card:hover h4 {
    transform: translateX(8px);
}

.hn-side-card h4 {
    transition: transform 0.3s;
}

/* ---- Flow Step Cards ---- */
.hn-flow-card {
    transition: all 0.5s;
}

.hn-flow-card:hover {
    background: var(--hn-card);
    border-color: var(--hn-border);
    box-shadow: var(--hn-shadow);
}

.hn-flow-card:hover .hn-flow-icon {
    background: linear-gradient(135deg, #7C4DFF 0%, #9C4DFF 42%, #00B7FF 74%, #00D084 100%);
    color: white;
}

.hn-flow-card:hover .hn-flow-icon svg {
    transform: scale(1.1);
    color: white;
    stroke: white;
}

.hn-flow-card:hover .hn-flow-desc {
    opacity: 1;
}

.hn-flow-number {
    transition: transform 0.3s;
}

.hn-flow-card:hover .hn-flow-number {
    transform: scale(1.1) rotate(6deg);
}

/* ---- Experience Hero Card ---- */
.hn-exp-hero {
    min-height: 500px;
    position: relative;
    overflow: hidden;
}

.hn-exp-hero-bg {
    transition: transform 10s ease;
}

.hn-exp-hero:hover .hn-exp-hero-bg {
    transform: scale(1.1);
}

.hn-exp-hero-bg img {
    filter: brightness(0.35) grayscale(1);
    transition: all 1s;
}

.hn-exp-hero:hover .hn-exp-hero-bg img {
    filter: brightness(0.35) grayscale(0);
}

/* ---- Partner Dashboard ---- */
.hn-dash-card {
    position: relative;
    overflow: hidden;
}

.hn-dash-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #7C4DFF 0%, #9C4DFF 42%, #00B7FF 74%, #00D084 100%);
}

/* ---- Security Section ---- */
.hn-security-card {
    transition: all 1s;
    position: relative;
    overflow: hidden;
}

.hn-security-glow {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom right, rgba(139, 92, 246, .05), rgba(0, 183, 255, .05));
    opacity: 0;
    transition: opacity 1s;
    pointer-events: none;
}

.hn-security-card:hover .hn-security-glow {
    opacity: 1;
}

/* ---- Responsive ---- */

/* Mobile-first: hero section fixes */
.hn-hero-grid > * {
    min-width: 0;
    overflow: visible;
}

@media (max-width: 768px) {
    .hn-map-container {
        transform: scale(0.85);
        max-width: 340px;
    }

    .hn-hero-grid {
        gap: 40px !important;
    }

    #home {
        padding-top: 120px !important;
        padding-bottom: 48px !important;
    }

    #home h1 {
        font-size: clamp(2rem, 7vw, 3.2rem) !important;
        word-break: break-word;
    }

    .hn-hero-btn-primary,
    .hn-hero-btn-secondary {
        padding: 16px 24px !important;
        font-size: 14px !important;
        width: 100% !important;
        text-align: center;
        justify-content: center;
    }
}

/* ============================================================
   Modern refresh — display type, accessibility
   Headings → Space Grotesk, sentence case. Inline styles don't set
   font-family so this applies cleanly; text-transform / font-style
   need !important to defeat the inline italic + uppercase values.
   ============================================================ */
.hn-page h1,
.hn-page h2,
.hn-page h3,
.hn-page h4 {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    text-transform: none !important;
    font-style: normal !important;
    letter-spacing: -0.02em;
}
.hn-page h3,
.hn-page h4 {
    letter-spacing: -0.01em;
}
.hn-page h1 .hn-text-grad,
.hn-page h2 .hn-text-grad,
.hn-page h3 .hn-text-grad {
    font-style: normal;
}

/* Accessibility — visible keyboard focus */
.hn-page a:focus-visible,
.hn-page button:focus-visible,
.hn-page [tabindex]:focus-visible {
    outline: 2px solid #a855f7;
    outline-offset: 3px;
    border-radius: 6px;
}

/* Accessibility — respect reduced motion (page runs many infinite loops) */
@media (prefers-reduced-motion: reduce) {
    .hn-page *,
    .hn-page *::before,
    .hn-page *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
    .hn-marquee { animation: none !important; }
}

@media (max-width: 768px) {
    .hn-security-badge-mobile {
        bottom: -82px !important;
    }
    .hn-scan {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
    }
}
