
:root {
    --blue: #0758a4;
    --navy: #0b2345;
    --muted: #536478;
    --ice: #edf6fd;
    --border: #d5e2ee;
}

* { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--navy);
    background: #fff;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

button, input { font: inherit; }

button { cursor: pointer; }

[hidden] { display: none !important; }

.header {
    min-height: 84px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 4%;
    background: white;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 15px #102a4308;
}

.brand img {
    width: 235px;
    max-height: 65px;
    object-fit: contain;
}

nav {
    display: flex;
    align-items: center;
    gap: 28px;
    font-size: 14px;
    font-weight: 600;
}

nav details { position: relative; }

nav summary { cursor: pointer; }

.dropdown {
    position: absolute;
    top: 30px;
    left: 0;
    min-width: 235px;
    background: white;
    padding: 12px;
    border-radius: 10px;
    box-shadow: 0 12px 40px #102a4325;
}

.dropdown a {
    display: block;
    padding: 12px;
    border-radius: 6px;
}

.dropdown a:hover {
    background: var(--ice);
}

.portal-button {
    background: var(--blue);
    color: white;
    padding: 13px 22px;
    border-radius: 7px;
}

.mobile-menu { display: none; }

.hero {
    position: relative;
    min-height: 510px;
    overflow: hidden;
    background: #edf4fa;
    display: flex;
    align-items: center;
}

.hero-photo {
    position: absolute;
    inset: 0 0 0 30%;
    background:
        url('/assets/courses/workshop.jpg')
        center / cover no-repeat;
}

.hero-fade {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        #f5f9fc 0%,
        #f5f9fc 29%,
        #f5f9fce8 38%,
        #f5f9fc00 70%
    );
}

.hero-content {
    position: relative;
    z-index: 3;
    width: 54%;
    padding: 48px 0 100px 4.6%;
}

.eyebrow {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .2px;
    color: var(--blue);
    margin-bottom: 18px;
}

.hero h1 {
    font-size: clamp(44px, 4.5vw, 78px);
    letter-spacing: -3px;
    line-height: 1.04;
    margin: 0 0 18px;
}

.hero h1 span { color: var(--blue); }

.hero p {
    font-size: 18px;
    line-height: 1.5;
    max-width: 530px;
    color: #34455b;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 15px 24px;
    border-radius: 7px;
    border: 1px solid var(--blue);
    font-weight: 700;
    font-size: 15px;
    transition: transform .2s, box-shadow .2s;
}

.button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px #0758a425;
}

.primary {
    background: var(--blue);
    color: white;
}

.secondary {
    background: #ffffff80;
    color: var(--navy);
}

.energy-wave {
    position: absolute;
    bottom: 18px;
    left: 0;
    width: 100%;
    height: 175px;
    pointer-events: none;
    z-index: 2;
}

.energy-wave path {
    fill: none;
    stroke-linecap: round;
}

.wave-glow {
    stroke: #00aaff;
    stroke-width: 13;
    filter: blur(10px);
    opacity: .7;
}

.wave-line {
    stroke: #36baff;
    stroke-width: 2;
}

.wave-pulse {
    stroke: #e2fbff;
    stroke-width: 4;
    stroke-dasharray: 120 1800;
    animation: energyFlow 5s linear infinite;
}

@keyframes energyFlow {
    to { stroke-dashoffset: -1920; }
}

.finder {
    position: relative;
    z-index: 5;
    width: 85%;
    margin: -65px auto 30px;
    background: #fffffffa;
    padding: 28px 34px;
    border-radius: 24px;
    box-shadow: 0 14px 38px #102a4320;
}

.finder-top {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 24px;
    align-items: center;
}

.finder h2 {
    margin: 0;
    font-size: clamp(23px, 2.2vw, 35px);
    letter-spacing: -.8px;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #b7cee2;
    border-radius: 50px;
    padding: 7px 10px 7px 18px;
}

.search-box > span { font-size: 27px; }

.search-box input {
    width: 100%;
    border: 0;
    outline: none;
    background: transparent;
    color: var(--navy);
    font-size: 14px;
}

.search-box button {
    border: 0;
    background: var(--blue);
    color: white;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    font-size: 22px;
}

.finder-options {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-top: 22px;
}

.finder-options button {
    background: linear-gradient(white, #f6faff);
    border: 1px solid #c7d9e8;
    border-radius: 10px;
    padding: 16px 12px;
    color: var(--navy);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-weight: 700;
    font-size: 14px;
    transition: .2s;
}

.finder-options button:hover {
    border-color: var(--blue);
    background: var(--ice);
}

.finder-options span {
    color: var(--blue);
    font-size: 28px;
}

.training-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    padding: 0 3.6% 30px;
}

.training-card {
    height: 245px;
    border-radius: 13px;
    overflow: hidden;
    position: relative;
    background-size: cover;
    background-position: center;
    background-color: #b5c8db;
    transition: transform .25s;
}

.training-card:hover {
    transform: translateY(-5px);
}

.electrical {
    background-image:
        url('/assets/courses/workshop.jpg');
}

.solar {
    background-image:
        linear-gradient(140deg,#28567e,#9cb8cf);
}

.ev {
    background-image:
        linear-gradient(140deg,#163a61,#91b5ce);
}

.battery {
    background-image:
        linear-gradient(140deg,#4e7897,#d1e1ec);
}

.training-card a {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        transparent 30%,
        #071f3ac9 75%,
        #071f3a 100%
    );
    display: flex;
    align-items: flex-end;
    padding: 24px;
    color: white;
}

.training-card a > div {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    width: 100%;
}

.training-card h3 {
    font-size: 25px;
    line-height: 1.08;
    letter-spacing: -.5px;
    margin: 0;
}

.round-arrow {
    border: 1px solid white;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.pathways {
    background: linear-gradient(
        110deg, #e4f3ff, #f7fbff
    );
    padding: 48px 8%;
    display: grid;
    grid-template-columns: 1fr 1.8fr;
    align-items: center;
    gap: 50px;
}

.pathways h2, .about h2 {
    font-size: 38px;
    letter-spacing: -1.3px;
    line-height: 1.12;
    margin: 10px 0;
}

.pathways p, .about p {
    line-height: 1.6;
    color: var(--muted);
}

.steps {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    text-align: center;
    margin-bottom: 20px;
}

.steps > div { position: relative; }

.steps > div:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 18px;
    left: 50%;
    width: 100%;
    height: 1px;
    background: #9abedb;
}

.steps b {
    position: relative;
    z-index: 1;
    width: 38px;
    height: 38px;
    margin: auto;
    border-radius: 50%;
    background: white;
    box-shadow: 0 2px 7px #102a431a;
    display: grid;
    place-items: center;
}

.steps > div:first-child b {
    background: var(--blue);
    color: white;
}

.steps p {
    font-size: 14px;
    padding: 0 8px;
}

.about {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    padding: 70px 8%;
}

.about img {
    width: 100%;
    border-radius: 15px;
}

footer {
    background: var(--navy);
    color: white;
    padding: 45px 8%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    flex-wrap: wrap;
}

footer img {
    width: 200px;
    background: white;
    padding: 10px;
    border-radius: 8px;
}

footer a { display: block; margin: 10px 0; }

.sparky-panel {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 120;
    width: 320px;
    padding: 18px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: 0 10px 45px #102a4329;
}

.sparky-top {
    display: flex;
    align-items: center;
    gap: 14px;
}

.sparky-top h3 {
    margin: 0 0 4px;
    font-size: 23px;
}

.sparky-top small {
    color: var(--muted);
}

.sparky-panel p {
    background: #f1f5fa;
    padding: 13px;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.45;
}

.sparky-panel .button { width: 100%; }

.sparky-close {
    position: absolute;
    right: 10px;
    top: 8px;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 23px;
}

.robot {
    width: 72px;
    height: 86px;
    position: relative;
    flex-shrink: 0;
}

.robot-head {
    width: 70px;
    height: 58px;
    background: linear-gradient(
        145deg,#fff,#c5d5e6
    );
    border-radius: 42%;
    padding: 10px;
    box-shadow: 0 4px 10px #102a4322;
    position: relative;
    z-index: 2;
}

.robot-face {
    height: 38px;
    background: #082747;
    border-radius: 40%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.robot-face i {
    width: 11px;
    height: 17px;
    background: #4ae6ff;
    border-radius: 50%;
    box-shadow: 0 0 10px #00c8ff;
}

.robot-body {
    width: 38px;
    height: 27px;
    border-radius: 40%;
    background: linear-gradient(
        145deg,#fff,#9fb8d0
    );
    margin: -2px auto 0;
}

.robot-antenna {
    width: 5px;
    height: 10px;
    background: var(--blue);
    margin: auto;
    border-radius: 5px;
}

.sparky-launcher {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 120;
    border: 0;
    background: var(--blue);
    color: white;
    padding: 17px 24px;
    border-radius: 40px;
    box-shadow: 0 5px 20px #102a4330;
    font-weight: 700;
}

#searchResults {
    padding-top: 20px;
    line-height: 1.7;
}

#searchResults a {
    display: block;
    padding: 10px;
    border-bottom: 1px solid var(--border);
}

@media (max-width: 1100px) {
    nav { gap: 14px; font-size: 13px; }
    .brand img { width: 175px; }
    .training-card h3 { font-size: 21px; }
    .finder { width: 92%; }
}

@media (max-width: 800px) {

    .header { min-height: 70px; }

    .mobile-menu {
        display: block;
        border: 0;
        background: transparent;
        color: var(--blue);
        font-size: 26px;
    }

    nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        padding: 24px;
        flex-direction: column;
        align-items: stretch;
    }

    nav.open { display: flex; }

    .dropdown { position: static; box-shadow: none; }

    .hero {
        min-height: 650px;
        align-items: flex-end;
    }

    .hero-photo {
        inset: 0 0 40% 0;
    }

    .hero-fade {
        background: linear-gradient(
            0deg,#f5f9fc 0%,#f5f9fc 43%,
            #f5f9fc00 80%
        );
    }

    .hero-content {
        width: 100%;
        padding: 35px 6% 80px;
    }

    .hero h1 {
        font-size: clamp(38px,8vw,60px);
        letter-spacing: -1.8px;
    }

    .hero p { font-size: 16px; }

    .finder {
        padding: 22px;
        margin-top: -35px;
    }

    .finder-top { grid-template-columns: 1fr; }

    .finder-options {
        grid-template-columns: repeat(2,1fr);
    }

    .training-grid {
        grid-template-columns: repeat(2,1fr);
    }

    .training-card { height: 220px; }

    .pathways, .about {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .sparky-panel {
        width: min(310px,calc(100% - 32px));
        bottom: 16px;
        right: 16px;
    }
}

@media (max-width: 420px) {
    .training-card h3 { font-size: 18px; }
    .training-card a { padding: 14px; }
    .training-card { height: 180px; }
    .finder-options button { font-size: 12px; }
    .finder-options span { font-size: 20px; }
    .steps p { font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}



/* INPHASE_PHOTOGRAPHY_V2 */

.hero-photo {
    inset: 0 0 0 32%;
    background-image:
        url('/assets/optimised/inphasepics19.webp');
    background-position: center 42%;
}

.hero-fade {
    background: linear-gradient(
        90deg,
        #f5f9fc 0%,
        #f5f9fc 27%,
        #f5f9fcf5 33%,
        #f5f9fc80 43%,
        transparent 65%
    );
}

.electrical {
    background-image:
        url('/assets/optimised/inphasepics12.webp');
}

.header {
    min-height: 68px;
    padding-top: 7px;
    padding-bottom: 7px;
}

.hero-content {
    padding-bottom: 95px;
}

.hero h1 {
    font-weight: 800;
    letter-spacing: -2.8px;
}

.hero p {
    max-width: 480px;
}

.finder {
    background: linear-gradient(
        160deg, #ffffff, #f3f8fd
    );
}

.training-card {
    height: clamp(190px, 14vw, 250px);
}

.training-card a {
    background: linear-gradient(
        transparent 15%,
        #071f3a55 50%,
        #071f3af5 100%
    );
}

.pathways {
    position: relative;
    overflow: hidden;
    background: linear-gradient(
        115deg, #e4f3ff, #f8fbff
    );
}

.about img {
    aspect-ratio: 16/10;
    object-fit: cover;
}

@media (min-width: 1101px) {

    .hero {
        min-height: 430px;
    }

    .hero-content {
        padding-top: 32px;
        padding-bottom: 85px;
    }

    .hero h1 {
        font-size: clamp(48px, 4.2vw, 76px);
    }

    .finder {
        margin-top: -65px;
        margin-bottom: 24px;
    }

    .pathways {
        padding-top: 30px;
        padding-bottom: 30px;
    }
}

@media (max-width: 800px) {

    .hero-photo {
        inset: 0 0 40% 0;
        background-position: center top;
    }

    .hero-fade {
        background: linear-gradient(
            0deg,
            #f5f9fc 0%,
            #f5f9fc 43%,
            transparent 80%
        );
    }

    .hero h1 {
        letter-spacing: -1.8px;
    }
}



/* INPHASE_RENEWABLE_IMAGES_V1 */

.solar {
    background-image:
        url('/assets/optimised/solar-training.webp');
    background-position: center;
}

.ev {
    background-image:
        url('/assets/optimised/ev-training.webp');
    background-position: center;
}

.battery {
    background-image:
        url('/assets/optimised/battery-training.webp');
    background-position: center;
}

.solar::after,
.ev::after,
.battery::after {
    content: "Illustrative training image";
    position: absolute;
    top: 10px;
    right: 10px;
    background: #102a43cc;
    color: white;
    font-size: 10px;
    padding: 5px 8px;
    border-radius: 4px;
    pointer-events: none;
}



/* INPHASE_SPARKY_MASCOT_V1 */

.sparky-panel {
    width: 350px;
    padding: 16px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 8px 40px #102a4326;
}

.sparky-avatar {
    width: 94px;
    height: 108px;
    object-fit: cover;
    object-position: center top;
    border-radius: 15px;
    flex-shrink: 0;
}

.sparky-top {
    gap: 14px;
}

.sparky-top h3 {
    font-size: 24px;
    font-weight: 800;
}

.sparky-top small {
    font-size: 12px;
    color: #536478;
}

.sparky-panel .primary {
    background: linear-gradient(
        110deg, #0873c9, #06458c
    );
}

.sparky-panel p {
    background: #f1f6fb;
    border-radius: 12px;
}

.sparky-avatar {
    animation: sparkyWelcome 0.7s ease-out;
}

@keyframes sparkyWelcome {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 800px) {
    .sparky-panel {
        width: min(350px, calc(100% - 32px));
    }
}

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



/* INPHASE_CAREER_PATHWAYS_V1 */

.pathways {
    background: linear-gradient(
        115deg, #e3f1fc, #f7fbff
    );
    grid-template-columns: 1fr 2fr;
    padding: 40px 6%;
    gap: 40px;
}

.pathway-intro h2 {
    font-size: clamp(30px, 3vw, 44px);
    font-weight: 800;
}

.pathway-sparky {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 24px;
}

.pathway-sparky img {
    width: 80px;
    height: 95px;
    object-fit: cover;
    border-radius: 12px;
}

.pathway-sparky p {
    font-size: 13px;
    margin: 5px 0;
}

.pathway-sparky a {
    color: var(--blue);
    font-size: 13px;
    font-weight: 700;
}

.career-options {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin: 20px 0;
}

.career-options button {
    padding: 13px 8px;
    background: white;
    border: 1px solid #c6d9ea;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--navy);
}

.career-options button[aria-pressed="true"] {
    background: var(--blue);
    color: white;
    border-color: var(--blue);
}

.career-steps {
    display: grid;
    grid-template-columns: repeat(
        auto-fit, minmax(125px, 1fr)
    );
    gap: 12px;
    margin: 22px 0;
}

.career-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    padding: 12px 5px;
    gap: 10px;
}

.career-step-number {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--blue);
    color: white;
    font-weight: 700;
    box-shadow: 0 4px 15px #1764a525;
}

.career-step strong {
    font-size: 15px;
}

.career-step small {
    color: #536478;
    line-height: 1.5;
}

.career-step a {
    color: var(--blue);
    font-weight: 700;
    font-size: 12px;
    margin-top: auto;
}

.career-disclaimer {
    font-size: 11px;
    color: #627d98;
}

@media(max-width: 1000px) {
    .career-options {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media(max-width: 800px) {
    .pathways {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}



/* INPHASE_SPARKY_LIVE_INTERFACE_V1 */

#sparkyLiveInterface[hidden] {
    display:none!important;
}

#chatLauncher {
    position:fixed;
    bottom:22px;
    right:22px;
    z-index:1000;
    display:flex;
    align-items:center;
    gap:10px;
    background:#0758a4;
    color:white;
    border:0;
    border-radius:40px;
    padding:9px 20px 9px 9px;
    font-weight:700;
    cursor:pointer;
    box-shadow:0 6px 25px #102a4340;
}

#chatLauncher img {
    width:48px;
    height:48px;
    object-fit:cover;
    border-radius:50%;
    background:white;
}

#chatWindow {
    position:fixed;
    right:22px;
    bottom:95px;
    width:390px;
    max-width:calc(100vw - 30px);
    background:white;
    border:1px solid #d5e2ee;
    border-radius:18px;
    overflow:hidden;
    box-shadow:0 12px 45px #102a4335;
    z-index:1001;
    display:none;
    flex-direction:column;
}

#chatWindow.open,
#chatWindow.active {
    display:flex;
}

#chatWindow .chat-header {
    background:linear-gradient(
        120deg,#102a43,#0758a4
    );
    color:white;
    padding:20px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
}

#chatWindow .chat-header h3,
#chatWindow .chat-header p {
    color:white;
    margin:4px 0;
}

#chatWindow button {
    cursor:pointer;
}

#chatClose {
    border:0;
    background:transparent;
    color:white;
    font-size:25px;
}

#chatMessages {
    height:310px;
    overflow-y:auto;
    padding:18px;
    background:#f4f8fc;
    font-size:14px;
    line-height:1.6;
}

#chatForm {
    display:flex;
    gap:8px;
    padding:14px;
    border-top:1px solid #d5e2ee;
    background:white;
}

#chatInput {
    min-width:0;
    flex:1;
    padding:12px;
    border:1px solid #bcccdc;
    border-radius:8px;
    font:inherit;
}

#chatForm button {
    background:#0758a4;
    color:white;
    border:0;
    border-radius:8px;
    padding:10px 15px;
    font-weight:700;
}

#chatWindow .chat-email-notice {
    font-size:11px;
    padding:10px 15px;
    color:#536478;
    background:#edf6fd;
}

#chatWindow .chat-message {
    margin:10px 0;
    padding:12px;
    border-radius:12px;
    overflow-wrap:anywhere;
    background:white;
    border:1px solid #d5e2ee;
}

#chatWindow .chat-message.visitor,
#chatWindow .chat-message.user {
    background:#0758a4;
    color:white;
    margin-left:35px;
}

#chatWindow .chat-quick-actions {
    display:flex;
    flex-wrap:wrap;
    gap:7px;
    padding:12px;
}

#chatWindow .chat-quick-actions button {
    background:#edf6fd;
    color:#0758a4;
    border:1px solid #d5e2ee;
    border-radius:20px;
    padding:7px 12px;
}

@media(max-width:480px) {

    #chatWindow {
        right:10px;
        bottom:85px;
        width:calc(100vw - 20px);
    }

    #chatMessages {
        height:min(280px,40vh);
    }

    #chatLauncher {
        right:12px;
        bottom:12px;
    }
}

/* END_INPHASE_SPARKY_LIVE_INTERFACE_V1 */
