/* ═══════════════════════════════════════════════════════════════════════════
   HubSync Hero Widget — style.css  v2
   All values driven by CSS custom properties set inline per widget instance.
   ═══════════════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,400;1,600;1,700;1,800&display=swap');

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

/* ── Wrapper ─────────────────────────────────────────────────────────────── */
.hs-hero-wrap {
    position: relative;
    width: 100%;
    font-family: 'Montserrat', sans-serif;
    background-color: var(--hs-bg-dark);
    background-image: radial-gradient(
        circle at var(--hs-grad-x) var(--hs-grad-y),
        var(--hs-bg-purple) 0%,
        transparent var(--hs-grad-size)
    );
    overflow: hidden;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SIDEBAR
   Layout order (top → bottom in the sidebar column):
     1. Logo
     2. Separator line
     3. Email  (rotated, bold italic, reads bottom-to-top)
     4. Dot + vertical line  (dot closest to email, line extends toward icons)
     5. Social icons
   ═══════════════════════════════════════════════════════════════════════════ */
.hs-sidebar {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--hs-sidebar-w);
    display: flex;
    flex-direction: column;
    align-items: center;
    /* NO border-right — removed per request */
    padding-top: var(--hs-sidebar-pt);
    padding-bottom: var(--hs-sidebar-pb);
    z-index: 10;
}

/* 1. Logo */
.hs-sidebar__logo-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    margin-bottom: var(--hs-logo-mb);
}

.hs-sidebar__logo {
    width: var(--hs-logo-w);
    height: auto;
    object-fit: contain;
    display: block;
}

.hs-sidebar__logo-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.hs-sidebar__logo-text {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 400;
    color: #fff;
    letter-spacing: 0.04em;
    line-height: 1;
}

.hs-sidebar__logo-text strong { font-weight: 800; }

.hs-sidebar__logo-icon {
    font-size: 18px;
    color: #fff;
    opacity: 0.85;
    writing-mode: vertical-rl;
    letter-spacing: -0.1em;
}

/* 2. Separator */
.hs-sidebar__sep {
    flex-shrink: 0;
    width: var(--hs-sep-w);
    height: var(--hs-sep-thick);
    background-color: var(--hs-sep-color);
    margin-top: var(--hs-sep-m);
    margin-bottom: var(--hs-sep-m);
}

/* 3. Email — bold italic, rotated to read bottom-to-top */
.hs-sidebar__email-wrap {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--hs-email-mb);
}

.hs-sidebar__email {
    /*
      writing-mode: vertical-rl  puts text flowing top-to-bottom.
      rotate(180deg) flips it so it reads BOTTOM-to-TOP (matching the design).
    */
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
    font-family: 'Montserrat', sans-serif;
    font-size: var(--hs-email-size);
    font-weight: 700;       /* bold */
    font-style: italic;     /* italic */
    color: var(--hs-email-color);
    letter-spacing: 0.04em;
    white-space: nowrap;
    user-select: none;
}

/* 4. Line + Dot
   In the column (top → bottom):  Dot at top → Line extending downward.
   Since email is above, the dot is visually closest to the email.
*/
.hs-sidebar__line-group {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: var(--hs-icon-mt);
}

.hs-sidebar__dot {
    display: block;
    width: var(--hs-dot-size);
    height: var(--hs-dot-size);
    border-radius: 50%;
    background-color: var(--hs-line-color);
    flex-shrink: 0;
}

.hs-sidebar__line {
    display: block;
    width: var(--hs-line-thick);
    height: var(--hs-line-len);
    background-color: var(--hs-line-color);
    flex-shrink: 0;
}

/* 5. Social Icons — user-uploaded images with borders baked in
      No hover background/border changes; cursor:pointer only.
*/
.hs-sidebar__socials {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--hs-icon-gap);
    flex-shrink: 0;
}

.hs-sidebar__social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--hs-icon-size);
    height: var(--hs-icon-size);
    text-decoration: none;
    cursor: pointer;
    /* No background, no border, no transition — border is part of the icon image */
}

.hs-sidebar__social-img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

/* Fallback letter placeholder (shown when no image uploaded) */
.hs-sidebar__social-fallback {
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255,255,255,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 6px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   HERO SECTION
   ═══════════════════════════════════════════════════════════════════════════ */
.hs-hero-section {
    min-height: var(--hs-hero-min-h);
    display: flex;
    align-items: center;
    padding-left: var(--hs-sidebar-w);
    padding-top: var(--hs-pt);
    padding-bottom: var(--hs-pb);
}

.hs-hero-inner {
    position: relative;
    width: 100%;
    max-width: calc(var(--hs-max-w) + var(--hs-sidebar-w));
    margin: 0 auto;
    padding: 0 40px;
}

/* ── Sparkles (hidden on mobile) ─────────────────────────────────────────── */
.hs-sparkle {
    position: absolute;
    z-index: 5;
    pointer-events: none;
    user-select: none;
}

.hs-sparkle--1 {
    left: var(--hs-sp1-x);
    top: var(--hs-sp1-y);
    transform: translate(-50%, -50%) scale(var(--hs-sp1-scale));
    width: 28px;
    height: 28px;
}

.hs-sparkle--2 {
    left: var(--hs-sp2-x);
    top: var(--hs-sp2-y);
    transform: translate(-50%, -50%) scale(var(--hs-sp2-scale));
    width: 28px;
    height: 28px;
}

.hs-sparkle--svg {
    font-size: 22px;
    color: #ffffff;
    line-height: 1;
    width: auto;
    height: auto;
}

/* ── Hero body: left content + right 3D ─────────────────────────────────── */
.hs-hero-body {
    position: relative;
    display: flex;
    align-items: center;
    gap: 24px;
}

.hs-hero-content {
    flex: 1;
    min-width: 0;
    position: relative;
    z-index: 2;
}

/* Pre-headline tag */
.hs-pretag {
    font-family: 'Montserrat', sans-serif;
    font-size: var(--hs-pretag-size);
    font-weight: var(--hs-pretag-fw);
    color: var(--hs-pretag-color);
    letter-spacing: var(--hs-pretag-ls);
    text-transform: uppercase;
    margin-bottom: var(--hs-pretag-mb);
}

/* Headline */
.hs-headline {
    display: flex;
    flex-direction: column;
    font-family: 'Montserrat', sans-serif;
    font-size: var(--hs-h-size);
    line-height: var(--hs-h-lh);
    letter-spacing: var(--hs-h-ls);
    color: var(--hs-h-color);
    text-transform: uppercase;
}

.hs-hl       { display: block; }
.hs-hl--1    { font-weight: var(--hs-h1-fw); }
.hs-hl--2    { font-weight: var(--hs-h2-fw); }
.hs-hl--3    { font-weight: var(--hs-h3-fw); }

/* Sub-row: Arrow + Paragraph */
.hs-sub-row {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-top: var(--hs-sub-mt);
}

.hs-arrow {
    width: var(--hs-arrow-w);
    height: auto;
    flex-shrink: 0;
    object-fit: contain;
    margin-top: var(--hs-arrow-mt);
    margin-right: var(--hs-arrow-mr);
    margin-bottom: var(--hs-arrow-mb);
    margin-left: var(--hs-arrow-ml);
}

.hs-arrow--fallback {
    font-size: calc(var(--hs-arrow-w) * 0.7);
    color: #fff;
    line-height: 1;
    opacity: 0.8;
    display: block;
    width: var(--hs-arrow-w);
    text-align: center;
    flex-shrink: 0;
    margin-top: var(--hs-arrow-mt);
    margin-right: var(--hs-arrow-mr);
    margin-bottom: var(--hs-arrow-mb);
    margin-left: var(--hs-arrow-ml);
}

.hs-subtext {
    font-family: 'Montserrat', sans-serif;
    font-size: var(--hs-sub-size);
    font-weight: var(--hs-sub-fw);
    color: var(--hs-sub-color);
    max-width: var(--hs-sub-mw);
    line-height: 1.6;
}

/* 3D Graphic */
.hs-hero-3d {
    flex-shrink: 0;
    width: var(--hs-3d-w);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    transform: translate(var(--hs-3d-ox), var(--hs-3d-oy));
}

.hs-3d-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

.hs-hero-3d--placeholder {
    aspect-ratio: 1 / 1.2;
    background: rgba(100,80,220,0.06);
    border: 1px dashed rgba(255,255,255,0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hs-3d-placeholder-text {
    color: rgba(255,255,255,0.25);
    font-size: 13px;
    font-family: 'Montserrat', sans-serif;
    text-align: center;
}

/* ═══════════════════════════════════════════════════════════════════════════
   PARTNER LOGOS BAR — infinite marquee
   The JS measures 1-set width and injects the exact translateX keyframe.
   ═══════════════════════════════════════════════════════════════════════════ */
.hs-partners {
    background-color: var(--hs-partner-bg);
    padding: var(--hs-partner-py) 0;
    overflow: hidden;
    position: relative;
    /* Soft fade at left + right edges */
    -webkit-mask-image: linear-gradient(
        to right,
        transparent 0%,
        black 5%,
        black 95%,
        transparent 100%
    );
    mask-image: linear-gradient(
        to right,
        transparent 0%,
        black 5%,
        black 95%,
        transparent 100%
    );
}

.hs-partners__track-wrap {
    overflow: hidden;
    width: 100%;
}

/* The track: flex row, nowrap, no CSS animation set here — JS injects it */
.hs-partners__track {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: var(--hs-partner-gap);
    width: max-content;
    will-change: transform;
}

.hs-partners__item {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    text-decoration: none;
}

.hs-partners__logo {
    height: var(--hs-partner-h) !important;
    width: auto !important;
    max-width: none;
    object-fit: contain;
    opacity: var(--hs-partner-opacity);
    filter: grayscale(100%) brightness(1.5);
    display: block;
    flex-shrink: 0;
    transition: filter 0.25s ease, opacity 0.25s ease;
}

.hs-partners__item:hover .hs-partners__logo {
    filter: grayscale(0%) brightness(1);
    opacity: 1;
}

/* Text fallback (when no image uploaded) */
.hs-partners__logo-text {
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: rgba(255,255,255,0.45);
    white-space: nowrap;
    letter-spacing: 0.02em;
    transition: color 0.25s ease;
}

.hs-partners__item:hover .hs-partners__logo-text {
    color: rgba(255,255,255,0.9);
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Tablet ≤ 1024px ─────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .hs-headline {
        font-size: clamp(36px, 7vw, 72px);
    }
    .hs-hero-3d {
        width: 38%;
    }
}

/* ── Mobile ≤ 768px ──────────────────────────────────────────────────────── */
@media (max-width: 768px) {

    /* Hide sidebar entirely */
    .hs-sidebar {
        display: none;
    }

    /* Remove sidebar left offset from hero */
    .hs-hero-section {
        padding-left: 0;
        min-height: auto;
        padding-top: 60px;
        padding-bottom: 60px;
    }

    .hs-hero-inner {
        padding: 0 20px;
    }

    /* Hide 3D graphic on mobile */
    .hs-hero-3d {
        display: none;
    }

    .hs-hero-body {
        flex-direction: column;
    }

    /* Headline responsive scale */
    .hs-headline {
        font-size: clamp(32px, 10vw, 56px);
    }

    .hs-pretag {
        font-size: 10px;
    }

    .hs-sub-row {
        flex-direction: column;
        gap: 16px;
    }

    .hs-subtext {
        font-size: 14px;
        max-width: 100%;
    }

    /* Hide sparkles on mobile */
    .hs-sparkle {
        display: none !important;
    }

    /* Remove fade mask on mobile (not enough width for it to look good) */
    .hs-partners {
        -webkit-mask-image: none;
        mask-image: none;
    }
}

/* ── Small mobile ≤ 480px ────────────────────────────────────────────────── */
@media (max-width: 480px) {
    .hs-headline {
        font-size: clamp(28px, 11vw, 48px);
    }
    .hs-arrow {
        width: calc(var(--hs-arrow-w) * 0.65);
    }
}
