/* ================================================================
   rConnect — rc-brand.css   (Global brand layer)
   "Glowing Orange Network Globe" identity, shared with the
   rConnect_EcoSystem deck, A4 flyer and visiting card.

   Load order (main.master / default.aspx):
     rconnect.css  →  font-awesome.css  →  category-bar.css  →  rc-brand.css
   This file only RESTYLES existing components (header, nav, sub-banner,
   ad zones, ticker, footer). No markup or server control was renamed.
   It also hosts the rules that used to live in the master page's
   internal <style> block and inline style="" attributes.
   ================================================================ */

/* ── 0. Base typography & accessibility ───────────────────────── */
html {
    -webkit-text-size-adjust: 100%;
    text-rendering: optimizeLegibility;
}

body {
    font-family: var(--rc-font-b);
    background: var(--rc-bg);
    color: var(--rc-text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--rc-font-h);
    letter-spacing: -.015em;
}

::selection {
    background: rgba(244,123,32,.28);
    color: inherit;
}

:focus-visible {
    outline: 2px solid var(--rc-primary);
    outline-offset: 3px;
    border-radius: 4px;
}

.rc-skip-link {
    position: absolute;
    left: 1rem;
    top: -60px;
    z-index: 5000;
    background: var(--rc-primary);
    color: #fff;
    padding: .6rem 1rem;
    border-radius: var(--rc-r-sm);
    font-weight: 600;
    text-decoration: none;
    transition: top .2s;
}

    .rc-skip-link:focus {
        top: .75rem;
        color: #fff;
    }

.rc-sr-only {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* ── 1. Header — sticky, shrink on scroll (was master <style>) ── */
.rc-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--rc-surface);
    box-shadow: none;
    transition: box-shadow .3s;
}

    .rc-header.rc-hdr-shrunk,
    .rc-header.rc-scrolled {
        box-shadow: 0 10px 30px rgba(6,14,36,.18);
    }

.rc-hdr-top {
    position: relative;
    background: var(--rc-grad-night);
    border-bottom: 0;
    overflow: hidden;
}

    /* glowing network hairline under the identity row */
    .rc-hdr-top::after {
        content: '';
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        height: 2px;
        background: linear-gradient(90deg, transparent 0%, var(--rc-primary) 20%, var(--rc-accent) 50%, var(--rc-primary) 80%, transparent 100%);
        opacity: .9;
    }

    /* faint globe glow on the right of the bar */
    .rc-hdr-top::before {
        content: '';
        position: absolute;
        right: -80px;
        top: -120px;
        width: 360px;
        height: 360px;
        border-radius: 50%;
        background: radial-gradient(circle, rgba(244,123,32,.35) 0%, rgba(244,123,32,0) 65%);
        pointer-events: none;
    }

.rc-hdr-top-inner {
    position: relative;
    z-index: 1;
    padding: .55rem var(--rc-pad);
    transition: padding .3s;
}

.rc-hdr-shrunk .rc-hdr-top-inner {
    padding-top: .28rem;
    padding-bottom: .28rem;
}

.rc-hdr-logo {
    height: 64px;
    border-radius: 8px;
    padding: 3px;
    background: #fff;
    box-shadow: 0 0 0 1px rgba(255,255,255,.12), 0 6px 18px rgba(244,123,32,.35);
    transition: height .3s, width .3s;
}

.rc-hdr-shrunk .rc-hdr-logo {
    height: 40px;
    width: auto;
    border-radius: 6px;
    padding: 1px;
}

.rc-hdr-company {
    color: #fff;
    font-weight: 700;
    letter-spacing: .02em;
    transition: font-size .3s, line-height .3s, color .2s;
}

    .rc-hdr-company:hover {
        color: var(--rc-accent);
    }

.rc-hdr-shrunk .rc-hdr-company {
    font-size: .9rem;
    line-height: 1.2;
}

.rc-hdr-tagline {
    color: var(--rc-accent);
    letter-spacing: .32em;
    font-weight: 600;
    max-height: 2rem;
    overflow: hidden;
    transition: opacity .25s, max-height .25s, margin .25s;
}

.rc-hdr-shrunk .rc-hdr-tagline {
    opacity: 0;
    max-height: 0;
    margin: 0;
}

.rc-hdr-actions {
    gap: .65rem;
}

.rc-btn-login {
    border-color: rgba(255,255,255,.35);
    color: #fff;
    font-weight: 600;
}

    .rc-btn-login:hover {
        background: #fff;
        border-color: #fff;
        color: var(--rc-navy);
    }

.rc-btn-register {
    background: var(--rc-grad-ember);
    border-color: transparent;
    font-weight: 600;
    box-shadow: 0 6px 18px rgba(244,123,32,.4);
}

    .rc-btn-register:hover {
        background: var(--rc-primary-dk);
        border-color: transparent;
    }

.rc-hdr-shrunk .rc-btn-register,
.rc-hdr-shrunk .rc-btn-login {
    padding: 5px 10px;
    font-size: 12px;
}

.rc-welcome-lbl {
    color: #fff;
}

.rc-ulink {
    color: rgba(255,255,255,.65);
}

    .rc-ulink:hover {
        color: var(--rc-accent);
    }

.rc-hamburger {
    color: #fff;
}

/* Theme switch: sun / moon glyphs inside the existing track/thumb */
.rc-toggle-track {
    width: 52px;
    height: 28px;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.22);
    transition: background-color .25s, border-color .25s;
}

    .rc-toggle-track::before,
    .rc-toggle-track::after {
        font-family: 'FontAwesome';
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        font-size: 11px;
        line-height: 1;
        pointer-events: none;
    }

    .rc-toggle-track::before {
        content: '\f185'; /* sun */
        left: 8px;
        color: var(--rc-accent);
    }

    .rc-toggle-track::after {
        content: '\f186'; /* moon */
        right: 8px;
        color: rgba(255,255,255,.7);
    }

.rc-toggle-thumb {
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    z-index: 1;
    background: var(--rc-grad-ember);
    box-shadow: 0 0 12px rgba(244,123,32,.7);
}

.rc-theme-toggle.is-active .rc-toggle-track {
    background-color: rgba(47,107,255,.25);
    border-color: rgba(91,140,255,.55);
}

.rc-theme-toggle.is-active .rc-toggle-thumb {
    transform: translateX(24px);
    background: linear-gradient(135deg, #8fb0ff, #2f6bff);
    box-shadow: 0 0 12px rgba(91,140,255,.8);
}

/* Nav row */
.rc-hdr-nav {
    background: var(--rc-surface);
    border-top: 0;
    border-bottom: 1px solid var(--rc-border);
}

.rc-nav-link,
a.rc-nav-leaf {
    font-family: var(--rc-font-h);
    font-size: .84rem;
    font-weight: 500;
    color: var(--rc-text);
    padding: .78rem 1rem;
    position: relative;
}

    a.rc-nav-leaf:hover,
    a.rc-nav-leaf.rc-nav-active,
    div.rc-nav-item:hover .rc-nav-link {
        color: var(--rc-primary);
        background: transparent;
    }

    a.rc-nav-leaf::after,
    .rc-nav-link::after {
        content: '';
        position: absolute;
        left: 1rem;
        right: 1rem;
        bottom: 6px;
        height: 2px;
        border-radius: 2px;
        background: var(--rc-grad-ember);
        transform: scaleX(0);
        transform-origin: left;
        transition: transform .25s var(--rc-ease-out);
    }

    a.rc-nav-leaf:hover::after,
    a.rc-nav-leaf.rc-nav-active::after,
    div.rc-nav-item:hover .rc-nav-link::after {
        transform: scaleX(1);
    }

a.rc-nav-leaf,
a.rc-nav-leaf:hover,
a.rc-nav-leaf.rc-nav-active,
div.rc-nav-item,
div.rc-nav-item:hover {
    border-bottom-color: transparent;
}

.rc-drop {
    border: 1px solid var(--rc-border);
    border-top: 0;
    border-radius: 14px;
    padding: .5rem;
    box-shadow: var(--rc-s-lg);
    top: calc(100% - 4px);
}

    .rc-drop::before {
        content: '';
        position: absolute;
        top: 0;
        left: 14px;
        right: 14px;
        height: 2px;
        background: var(--rc-grad-ember);
        border-radius: 2px;
    }

    .rc-drop a {
        border-radius: 9px;
        padding: .58rem .85rem;
    }

        .rc-drop a i {
            width: 26px;
            height: 26px;
            border-radius: 8px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            background: rgba(244,123,32,.1);
        }

        .rc-drop a:hover {
            background: var(--rc-surface-alt);
        }

/* Category mega bar — former inline styles from main.master */
.rc-cat-all-wrap {
    position: relative;
    flex-shrink: 0;
}

.rc-cat-mega-viewall {
    font-size: .76rem;
    color: var(--rc-primary);
    text-decoration: none;
}

    .rc-cat-mega-viewall:hover {
        text-decoration: underline;
    }

/* ── 2. Sub-banner (SubPageHead → .rc-page-hd) ────────────────── */
.rc-page-hd {
    position: relative;
    overflow: hidden;
    padding: 2.2rem 0 2rem;
    background-color: #060e24;
    background-image: radial-gradient(circle at 88% 40%, rgba(244,123,32,.45) 0%, rgba(244,123,32,0) 32%), url('../images/ecosystem/digital-earth-network.jpg'), var(--rc-grad-night);
    background-repeat: no-repeat;
    background-size: auto, 48% auto, cover;
    background-position: center, right -40px center, center;
    isolation: isolate;
}

    .rc-page-hd::before {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient(90deg, rgba(6,14,36,.96) 0%, rgba(6,14,36,.82) 45%, rgba(6,14,36,.25) 100%);
        z-index: -1;
    }

    .rc-page-hd::after {
        content: '';
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        height: 3px;
        background: linear-gradient(90deg, var(--rc-primary), var(--rc-accent), transparent);
    }

.rc-page-hd-inner {
    max-width: var(--rc-content-w);
}

.rc-page-title {
    font-size: clamp(1.6rem, 3.2vw, 2.4rem);
    letter-spacing: -.02em;
}

    .rc-page-title .fa {
        color: var(--rc-primary);
        text-shadow: var(--rc-glow);
    }

.rc-page-subtitle {
    font-size: 1rem;
    color: rgba(231,236,248,.75);
    max-width: 640px;
}

.rc-breadcrumb {
    font-size: .72rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: rgba(255,255,255,.5);
}

    .rc-breadcrumb a {
        color: var(--rc-accent);
    }

/* ── 3. Advertisement zones (slots untouched — skin only) ──────── */
.rc-ad-top,
.rc-ad-bottom {
    background: var(--rc-bg);
}

.rc-ad-top-label {
    letter-spacing: .2em;
    font-size: .6rem;
    color: var(--rc-text-faint);
}

.rc-ad-slot {
    border-radius: 12px;
    border-color: var(--rc-border);
    background: var(--rc-surface);
}

/* Responsive banner placements (Top / Bottom / Left / Right).
   Top & Bottom keep their exact IAB size on desktop and scale
   proportionally on tablet / mobile instead of overflowing.
   Left & Right sidebars stay hidden below 1000 px (rconnect.css). */
.rc-ad-728x90 {
    width: 100%;
    max-width: 728px;
    min-height: 0;
    aspect-ratio: 728 / 90;
}

.rc-ad-970x250 {
    width: 100%;
    max-width: 970px;
    min-height: 0;
    aspect-ratio: 970 / 250;
}

.rc-ad-160x600 {
    aspect-ratio: 160 / 600;
}

.rc-ad-160x300 {
    aspect-ratio: 160 / 300;
}

.rc-ad-top-inner,
.rc-ad-bottom-inner {
    width: 100%;
}

/* filled by scripts/ad-slots.js */
.rc-ad-slot.rc-ad-filled {
    display: block;
    padding: 0;
    border: 0;
    background: transparent;
    line-height: 0;
    overflow: hidden;
    border-radius: 6px;
}

.rc-ad-link {
    display: block;
    width: 100%;
    height: 100%;
}

.rc-ad-media {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}

.rc-ad-link:focus-visible {
    outline: 2px solid var(--rc-primary);
    outline-offset: 2px;
}

@media (max-width: 767px) {
    .rc-ad-top-inner,
    .rc-ad-bottom-inner {
        flex-direction: column;
        gap: .3rem;
    }
}

/* ── 4. Ticker ─────────────────────────────────────────────────── */
.hp-ticker {
    background: var(--rc-navy);
    border-top: 1px solid rgba(244,123,32,.25);
}

.hp-ticker-tag {
    background: var(--rc-grad-ember);
}

/* ── 5. Footer ─────────────────────────────────────────────────── */
.hp-footer {
    position: relative;
    overflow: hidden;
    background: #030816;
    background-image: radial-gradient(ellipse at 100% 0%, rgba(244,123,32,.18) 0%, rgba(244,123,32,0) 45%), radial-gradient(ellipse at 0% 100%, rgba(47,107,255,.16) 0%, rgba(47,107,255,0) 50%);
    padding-top: 3.5rem;
    border-top: 1px solid rgba(244,123,32,.25);
}

    .hp-footer::before {
        content: '';
        position: absolute;
        right: -140px;
        top: -140px;
        width: 420px;
        height: 420px;
        background: url('../images/ecosystem/rconnect-orange-network-globe.webp') center / contain no-repeat;
        opacity: .1;
        pointer-events: none;
    }

    .hp-footer .hp-inner {
        position: relative;
    }

.hp-footer-col-title {
    letter-spacing: .18em;
}

.hp-footer-col-title-spaced {
    margin-top: 1.25rem;
}

.hp-footer-share {
    margin-top: 1.2rem;
}

.hp-footer-social a:hover {
    background: var(--rc-grad-ember);
    box-shadow: 0 0 14px rgba(244,123,32,.55);
}

.hp-footer-cin {
    color: rgba(255,255,255,.35);
}

.hp-footer-person {
    margin: .2rem 0 1rem;
    padding-left: .8rem;
    border-left: 2px solid var(--rc-primary);
    color: var(--rc-footer-link);
    font-size: .8rem;
    line-height: 1.5;
}

    .hp-footer-person strong {
        display: block;
        color: #fff;
        font-family: var(--rc-font-h);
        font-size: .92rem;
    }

.hp-copyright a {
    color: rgba(255,255,255,.55);
}

/* ── 6. Shared buttons refresh ─────────────────────────────────── */
.hp-cta-primary {
    background: var(--rc-grad-ember);
    border-color: transparent;
    font-weight: 600;
}

    .hp-cta-primary:hover {
        background: var(--rc-primary-dk);
        border-color: transparent;
        box-shadow: 0 10px 30px rgba(244,123,32,.45);
    }

/* ── 6b. Reveal on scroll (only when JS is running: html.rc-js-reveal) ─ */
.rc-js-reveal .rc-reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity .8s var(--rc-ease-out), transform .8s var(--rc-ease-out);
}

    .rc-js-reveal .rc-reveal.is-in {
        opacity: 1;
        transform: none;
    }

/* ── 7. Responsive ─────────────────────────────────────────────── */
@media (max-width: 900px) {
    .rc-hdr-logo {
        height: 48px;
    }

    .rc-hdr-tagline {
        letter-spacing: .18em;
    }

    .rc-hdr-nav {
        background: var(--rc-surface);
    }

    a.rc-nav-leaf::after,
    .rc-nav-link::after {
        display: none;
    }

    .rc-page-hd {
        background-size: auto, 90% auto, cover;
        background-position: center, right -40% center, center;
    }
}

@media (max-width: 576px) {
    /* the logo carries the brand on phones; full legal name stays in the footer */
    .rc-hdr-identity {
        display: none;
    }

    .rc-hdr-actions {
        margin-left: auto;
    }

    .rc-toggle-track {
        width: 46px;
    }

    .rc-theme-toggle.is-active .rc-toggle-thumb {
        transform: translateX(18px);
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}
