@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Outfit:wght@500;600;700;800;900&display=swap");

/* ============================================================
   Bluewitch Hub v1.4
   Visual refinement based on approved target look
   - more transparent cards
   - darker / sharper CTA buttons
   - icons without rounded neon boxes
   - logo / heading moved up
   - footer pushed lower
   ============================================================ */

:root{
    --white:#f8fbff;
    --soft:#dcebfb;
    --soft2:#cfe4f8;

    --blue:#26b8ff;
    --blue2:#1a6fff;
    --blue3:#0d4eca;

    --purple:#c070ff;
    --purple2:#8641ff;
    --purple3:#5e25dd;

    --teal:#2de3df;
    --teal2:#14bfc8;
    --teal3:#0b8f96;
}

*{box-sizing:border-box;}

html, body{
    margin:0;
    min-height:100%;
}

body{
    font-family:"Inter","Segoe UI",Arial,sans-serif;
    color:var(--white);
    background:#020916;
}

.hub-page{
    min-height:100vh;
    position:relative;
    isolation:isolate;
}

/* Adjust only the background image, leaving all foreground colours unchanged. */
.hub-page::before{
    content:"";
    position:fixed;
    inset:0;
    z-index:-1;
    pointer-events:none;
    background:#020916 url("images/hub-background.png") center center / cover no-repeat;
    filter:brightness(.90) saturate(.88);
}

.hub-shell{
    width:min(1270px, calc(100% - 38px));
    min-height:100vh;
    margin:0 auto;
    padding:10px 0 16px;
    display:flex;
    flex-direction:column;
    justify-content:flex-start;
}

/* Header */
.hub-header{
    text-align:center;
    margin-bottom:0;
}

.hub-logo-link{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    text-decoration:none;
}

.hub-logo{
    display:block;
    width:min(370px, 70vw);
    height:auto;
    margin:0 auto -2px;
    filter:drop-shadow(0 10px 22px rgba(0,0,0,.42));
}

.hub-header h1{
    margin:14px 0 12px;
    font-family:"Outfit","Inter","Segoe UI",Arial,sans-serif;
    font-size:clamp(2.65rem, 4.4vw, 4.25rem);
    line-height:.98;
    letter-spacing:-.05em;
    font-weight:900;
    background:none;
    color:#ffffff;
    text-shadow:
        0 0 8px rgba(255,255,255,.16),
        0 0 18px rgba(126,203,255,.10),
        0 5px 16px rgba(0,0,0,.34);
}

.hub-header h1 span{
    background:linear-gradient(
        180deg,
        #d7ffff 0%,
        #9ff7ff 34%,
        #60e8ff 67%,
        #60bfff 100%
    );
    -webkit-background-clip:text;
    background-clip:text;
    color:transparent;
    text-shadow:
        0 0 10px rgba(70,239,255,.38),
        0 0 22px rgba(64,192,255,.24);
}

.hub-header p{
    margin:0;
    color:#f7fbff;
    font-size:clamp(1.14rem, 1.82vw, 1.42rem);
    font-weight:500;
    line-height:1.35;
    letter-spacing:-.01em;
    text-shadow:
        0 1px 4px rgba(255,255,255,.12),
        0 2px 10px rgba(0,0,0,.68);
}

/* Grid */
.hub-grid{
    display:grid;
    grid-template-columns:repeat(3, minmax(0,1fr));
    gap:18px;
    align-items:stretch;
    width:min(1200px, 100%);
    margin:58px auto 0;
}

.hub-card{
    --accent:var(--blue);
    --accent2:var(--blue2);
    --accent3:var(--blue3);

    position:relative;
    overflow:hidden;
    min-height:405px;
    padding:34px 30px 26px;
    border-radius:24px;
    display:flex;
    flex-direction:column;
    align-items:center;
    text-align:center;
    color:#fff;
    text-decoration:none;

    background:
        linear-gradient(180deg, rgba(6,31,64,.26), rgba(4,18,42,.22));

    border:1.5px solid color-mix(in srgb, var(--accent) 76%, white 24%);

    box-shadow:
        0 24px 52px rgba(0,0,0,.24),
        0 0 0 1px rgba(255,255,255,.06) inset,
        0 0 30px color-mix(in srgb, var(--accent) 24%, transparent),
        inset 0 1px 0 rgba(255,255,255,.08);

    -webkit-backdrop-filter: blur(4px) saturate(118%);
    backdrop-filter: blur(4px) saturate(118%);

    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease, background .22s ease;
}

.hub-card::before{
    content:"";
    position:absolute;
    inset:0;
    pointer-events:none;
    background:
        radial-gradient(circle at 50% 11%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 30%),
        linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.01) 18%, transparent 46%);
}

.hub-card::after{
    content:"";
    position:absolute;
    inset:auto 10% 0;
    height:38%;
    pointer-events:none;
    background:radial-gradient(ellipse at bottom, color-mix(in srgb, var(--accent) 12%, transparent), transparent 70%);
}

.hub-card:hover{
    transform:translateY(-6px);
    box-shadow:
        0 26px 58px rgba(0,0,0,.30),
        0 0 0 1px color-mix(in srgb, var(--accent) 60%, white 40%) inset,
        0 0 36px color-mix(in srgb, var(--accent) 35%, transparent),
        inset 0 1px 0 rgba(255,255,255,.10);
}

.hub-card-blue{ --accent:#24b8ff; --accent2:#1c8dff; --accent3:#145fdd; }
.hub-card-purple{
    --accent:#9baec9; --accent2:#526f98; --accent3:#243c63;
    background:linear-gradient(180deg, rgba(16,29,56,.25), rgba(8,18,37,.22));
}
.hub-card-teal{
    --accent:#31e1dd; --accent2:#19bec9; --accent3:#0e8992;
    background:linear-gradient(180deg, rgba(5,58,72,.23), rgba(4,32,45,.21));
}

/* Icons - no rounded icon boxes */
.hub-icon-wrap{
    position:relative;
    z-index:1;
    width:100%;
    height:92px;
    display:flex;
    align-items:center;
    justify-content:center;
    margin-bottom:10px;
}

.hub-icon{
    position:relative;
    z-index:2;
    color:#fff;
    font-weight:700;
    text-shadow:
        0 0 10px color-mix(in srgb, var(--accent) 86%, white 14%),
        0 0 22px color-mix(in srgb, var(--accent) 70%, transparent),
        0 0 34px color-mix(in srgb, var(--accent) 36%, transparent);
}

.hub-icon-moon{
    font-size:4.35rem;
    line-height:1;
    transform:none;
}

.hub-icon-plane{
    font-size:4.05rem;
    line-height:1;
    transform:none;
}

.hub-icon-layers{
    width:64px;
    height:58px;
    transform:translateY(2px);
}

.hub-icon-layers span{
    position:absolute;
    left:15px;
    width:34px;
    height:18px;
    border:4px solid #ffffff;
    border-top:0;
    transform:rotate(30deg) skewX(-30deg);
    border-radius:3px;
    filter:drop-shadow(0 0 8px color-mix(in srgb, var(--accent) 92%, white 8%)) drop-shadow(0 0 18px color-mix(in srgb, var(--accent) 52%, transparent));
}

.hub-icon-layers span:nth-child(1){ top:0; }
.hub-icon-layers span:nth-child(2){ top:12px; }
.hub-icon-layers span:nth-child(3){ top:24px; }

/* Text */
.hub-kicker{
    position:relative;
    z-index:1;
    min-height:20px;
    display:flex;
    align-items:center;
    justify-content:center;
    margin-bottom:12px;
    color:#f0f7ff;
    font-family:"Outfit","Inter","Segoe UI",Arial,sans-serif;
    font-size:.85rem;
    font-weight:700;
    letter-spacing:.19em;
    text-transform:uppercase;
}

.hub-card h2{
    position:relative;
    z-index:1;
    min-height:48px;
    width:100%;
    display:flex;
    align-items:flex-start;
    justify-content:center;
    margin:0 0 14px;
    font-family:"Outfit","Inter","Segoe UI",Arial,sans-serif;
    font-size:clamp(1.78rem, 2.28vw, 2.12rem);
    line-height:1.08;
    font-weight:800;
    letter-spacing:-.03em;
    color:#fff;
    text-shadow:0 4px 14px rgba(0,0,0,.45);
}

.hub-card p{
    position:relative;
    z-index:1;
    flex:1;
    min-height:118px;
    margin:0 auto;
    max-width:28ch;
    color:#eff7ff;
    font-size:1rem;
    line-height:1.52;
    text-shadow:0 2px 8px rgba(0,0,0,.40);
}

/* Buttons */
.hub-button{
    position:relative;
    z-index:1;
    width:100%;
    min-height:58px;
    margin-top:26px;
    padding:8px 9px 8px 20px;
    border-radius:999px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;

    color:#fff;
    font-family:"Inter","Segoe UI",Arial,sans-serif;
    font-weight:800;
    font-size:1rem;

    background:
        linear-gradient(
            135deg,
            color-mix(in srgb, var(--accent3) 48%, transparent) 0%,
            color-mix(in srgb, var(--accent2) 45%, transparent) 48%,
            color-mix(in srgb, var(--accent) 40%, transparent) 100%
        );

    border:1.5px solid color-mix(in srgb, var(--accent) 62%, white 38%);

    box-shadow:
        0 10px 28px color-mix(in srgb, var(--accent) 22%, transparent),
        0 0 16px color-mix(in srgb, var(--accent) 16%, transparent),
        0 0 0 1px rgba(255,255,255,.05) inset,
        inset 0 1px 0 rgba(255,255,255,.22),
        inset 0 -4px 10px rgba(3,12,35,.22);

    -webkit-backdrop-filter:blur(4px) saturate(118%);
    backdrop-filter:blur(4px) saturate(118%);

    transition:filter .18s ease, transform .18s ease, box-shadow .18s ease;
}

.hub-card:hover .hub-button{
    filter:brightness(1.05);
    box-shadow:
        0 14px 30px color-mix(in srgb, var(--accent) 28%, transparent),
        0 0 14px color-mix(in srgb, var(--accent) 26%, transparent),
        inset 0 1px 0 rgba(255,255,255,.24),
        inset 0 -3px 8px rgba(5,14,42,.28);
}

.hub-button > span:first-child{
    flex:1;
    text-align:center;
}

.hub-arrow{
    width:43px;
    height:43px;
    flex:0 0 43px;
    display:grid;
    place-items:center;
    border-radius:50%;
    border:1px solid rgba(255,255,255,.22);
    background:rgba(255,255,255,.12);
    font-size:1.25rem;
    transition:transform .18s ease, background .18s ease;
}

.hub-card:hover .hub-arrow{
    transform:translateX(3px);
    background:rgba(255,255,255,.18);
}

/* Footer */
.hub-footer{
    margin-top:auto;
    padding-top:34px;
    padding-bottom:2px;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:16px;
    color:#eef6ff;
    font-size:.92rem;
    text-align:center;
    text-shadow:0 2px 8px rgba(0,0,0,.60);
}

.footer-line{
    width:56px;
    height:1px;
    background:rgba(255,255,255,.64);
}

/* Responsive */
@media(max-width:1100px){
    .hub-page::before{ position:absolute; }

    .hub-shell{
        justify-content:flex-start;
        padding-top:18px;
        padding-bottom:26px;
    }

    .hub-grid{
        grid-template-columns:1fr;
        width:min(600px,100%);
        margin:26px auto 0;
    }

    .hub-card{ min-height:unset; }

    .hub-footer{
        margin-top:24px;
        padding-top:0;
    }
}

@media(max-width:640px){
    .hub-shell{ width:min(100% - 20px, 1270px); }

    .hub-header{ margin-bottom:6px; }

    .hub-header h1{ font-size:clamp(2.2rem, 10vw, 3.1rem); }

    .hub-header p{ font-size:1.02rem; }

    .hub-card{
        padding:26px 20px 22px;
        border-radius:20px;
    }

    .hub-grid{ margin-top:28px; }

    .hub-icon-wrap{ height:78px; margin-bottom:8px; }

    .hub-card h2{ min-height:auto; }

    .hub-card p{ min-height:auto; }

    .hub-icon-moon{ font-size:4rem; }
    .hub-icon-plane{ font-size:3.6rem; }

    .hub-button{
        min-height:54px;
        font-size:.95rem;
    }

    .hub-arrow{
        width:40px;
        height:40px;
        flex-basis:40px;
    }

    .footer-line{ width:28px; }

    .hub-footer{
        gap:9px;
        font-size:.78rem;
    }
}

/* ============================================================
   Bluewitch Hub - Private access notice
   ============================================================ */
.hub-private-notice{
    width:100%;
    margin:auto auto 0;
    padding:0 24px;
    text-align:center;
    color:#ffffff;
    font-size:.84rem;
    font-weight:500;
    line-height:1.45;
    letter-spacing:.005em;
    text-shadow:0 2px 8px rgba(0,0,0,.62);
}

@media(max-width:640px){
    .hub-private-notice{
        margin:22px auto 0;
        font-size:.78rem;
        padding:0 10px;
    }
}


/* MyLibrary workspace: retain the established Bluewitch card treatment. */
.hub-card-library{--accent:#b8d68e;--accent2:#83b75c;--accent3:#487936;background:linear-gradient(180deg,rgba(35,65,30,.25),rgba(17,35,25,.22));}
.hub-icon-book{font-size:4.2rem;line-height:1;}
@media(min-width:1101px){.hub-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}.hub-card{padding-left:20px;padding-right:20px}.hub-card h2{font-size:1.85rem}.hub-kicker{font-size:.72rem;letter-spacing:.13em}}
@media(min-width:701px) and (max-width:1100px){.hub-grid{grid-template-columns:repeat(2,minmax(0,1fr));width:min(900px,100%)}}

/* MyLibrary: Navy & Brass — only the library card changes. */
.hub-card-library{--accent:#e2c48b;--accent2:#b49561;--accent3:#72552f;background:linear-gradient(180deg,rgba(32,54,75,.38),rgba(15,28,43,.32));}
.hub-icon-book{display:flex;align-items:center;justify-content:center;}
.hub-icon-book img{width:84px;height:78px;display:block;filter:drop-shadow(0 0 5px rgba(255,235,185,.8)) drop-shadow(0 0 15px rgba(226,196,139,.65));}

/* Crisp workspace emblems: preserve card colours, transparency and layout. */
.hub-icon-moon,.hub-icon-plane{display:flex;align-items:center;justify-content:center;text-shadow:none;font-size:0;line-height:1}
.hub-icon-moon img{display:block;width:124px;height:66px;object-fit:contain;filter:drop-shadow(0 0 3px rgba(185,206,232,.6)) drop-shadow(0 0 9px rgba(125,153,193,.28))}
.hub-icon-plane img{display:block;width:110px;height:92px;object-fit:contain;filter:brightness(0) invert(1) drop-shadow(0 0 3px rgba(49,225,221,.7)) drop-shadow(0 0 9px rgba(25,190,201,.32))}
@media(max-width:640px){.hub-icon-moon img{width:112px;height:60px}.hub-icon-plane img{width:100px;height:78px}}

/* Button hover: a moving colour wash becomes more opaque over the glass. */
.hub-button{overflow:hidden;isolation:isolate}
.hub-button::before{
    content:"";
    position:absolute;
    inset:0;
    z-index:0;
    border-radius:inherit;
    pointer-events:none;
    background:linear-gradient(110deg,
        color-mix(in srgb,var(--accent3) 90%,transparent) 0%,
        color-mix(in srgb,var(--accent2) 88%,transparent) 30%,
        color-mix(in srgb,var(--accent) 78%,white 12%) 48%,
        color-mix(in srgb,var(--accent2) 88%,transparent) 65%,
        color-mix(in srgb,var(--accent3) 90%,transparent) 100%);
    background-size:240% 100%;
    background-position:100% 50%;
    opacity:0;
    transition:background-position .75s cubic-bezier(.22,.61,.36,1),opacity .28s ease;
}
.hub-button>span{position:relative;z-index:1}
@media(hover:hover) and (pointer:fine){
    .hub-button:hover::before{opacity:1;background-position:0% 50%}
}
.hub-card:focus-visible .hub-button::before{opacity:1;background-position:0% 50%}
@media(prefers-reduced-motion:reduce){.hub-button::before{transition:none}}
