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

:root {
    --blue: #1685f8;
    --blue-dark: #075ebd;
    --navy: #102f59;
    --muted: #617fa6;
    --page: #fbfdff;
    --pale-blue: #eaf5ff;
    --line: #dcecff;
    --content: 1320px;
}

* { box-sizing: border-box; }

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

body {
    margin: 0;
    color: var(--navy);
    background:
            radial-gradient(ellipse at 83% 11%, rgba(220,239,255,.38), transparent 32rem),
            var(--page);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; }
svg { display: block; }

.site-header {
    max-width: var(--content);
    margin: 0 auto;
    padding: 24px clamp(22px, 5.8vw, 78px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    position: relative;
    z-index: 10;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -.8px;
    white-space: nowrap;
}

.brand-mark {
    width: 30px;
    height: 36px;
    color: var(--blue);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: clamp(18px, 3.1vw, 42px);
    font-size: 12px;
    font-weight: 500;
    color: #314e73;
}

.main-nav a {
    position: relative;
    padding: 10px 0;
    transition: color .2s ease;
}

.main-nav a:hover,
.main-nav a.active { color: var(--blue-dark); }

.main-nav a.active::after {
    content: "";
    position: absolute;
    height: 2px;
    left: 0;
    right: 0;
    bottom: 2px;
    background: var(--blue);
    border-radius: 4px;
}

.button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding: 14px 23px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: linear-gradient(110deg, #178bff, #2780ee);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 7px 18px rgba(22,133,248,.14);
    transition: transform .2s ease, box-shadow .2s ease;
    white-space: nowrap;
}

.button:hover {
    transform: translateY(-2px);
    box-shadow: 0 11px 24px rgba(22,133,248,.23);
}

.button-small { padding: 11px 19px; }

.button-outline {
    color: #25476f;
    background: rgba(255,255,255,.65);
    border-color: #cfe2fa;
    box-shadow: none;
}

.button-outline:hover { box-shadow: 0 7px 18px rgba(33,103,177,.08); }

.menu-toggle {
    display: none;
    background: white;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 10px;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 4px 0;
    background: var(--navy);
    border-radius: 2px;
}

main {
    width: 100%;
    max-width: var(--content);
    margin: 0 auto;
    position: relative;
    isolation: isolate;
}

.pipe-network {
    position: absolute;
    z-index: -1;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    pointer-events: none;
}

.hose-shadow {
    fill: none;
    stroke: #d7eaff;
    stroke-width: 32;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: .9;
}

.hose-line {
    fill: none;
    stroke: url(#hoseGradient);
    stroke-width: 22;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: url(#hoseShadow);
}

.sleeves rect {
    fill: #2c91f2;
    stroke: #82c4ff;
    stroke-width: 2;
}

.section-shell {
    padding-left: clamp(24px, 5.8vw, 78px);
    padding-right: clamp(24px, 5.8vw, 78px);
    position: relative;
}

.hero {
    min-height: 490px;
    padding-top: 70px;
    padding-bottom: 66px;
    display: grid;
    grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
    align-items: center;
    gap: 22px;
}

.hero-copy { max-width: 550px; position: relative; z-index: 2; }

.eyebrow {
    margin: 0 0 18px;
    color: var(--blue);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.7px;
    line-height: 1.5;
    text-transform: uppercase;
}

h1, h2, h3, p { margin-top: 0; }

h1 {
    max-width: 570px;
    margin-bottom: 17px;
    font-size: clamp(42px, 4.3vw, 59px);
    line-height: 1.08;
    letter-spacing: -2.8px;
    font-weight: 750;
}

.hero-description {
    max-width: 430px;
    margin-bottom: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.85;
}

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

.play-icon { font-size: 10px; color: var(--blue); }

.hero-proof {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 27px;
    color: #6984a6;
    font-size: 10px;
}

.proof-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #36b88b;
    box-shadow: 0 0 0 4px #e4f8f0;
}

.hero-visual {
    position: relative;
    min-width: 0;
    min-height: 390px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.visual-orb {
    position: absolute;
    width: min(36vw, 430px);
    aspect-ratio: 1;
    border-radius: 50%;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: radial-gradient(circle at 42% 38%, #e2f2ff, #edf6ff 65%, rgba(237,246,255,0) 70%);
}

.hydraulic-illustration {
    position: relative;
    z-index: 1;
    width: min(100%, 600px);
    overflow: visible;
    transform: translate(12px, 2px);
}

.features {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    gap: clamp(35px, 7vw, 100px);
    align-items: center;
    padding-top: 86px;
    padding-bottom: 105px;
}

.section-intro { max-width: 470px; }

.section-intro .eyebrow { margin-bottom: 16px; }

h2 {
    margin-bottom: 17px;
    font-size: clamp(29px, 3vw, 39px);
    line-height: 1.15;
    letter-spacing: -1.55px;
    font-weight: 730;
}

.section-intro > p:last-child {
    max-width: 390px;
    margin-bottom: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.9;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 34px 35px;
}

.feature-card { max-width: 240px; }

.feature-icon {
    width: 56px;
    height: 56px;
    margin-bottom: 14px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #e5f3ff;
}

.feature-icon svg {
    width: 29px;
    height: 29px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.blue-icon { color: #1488f8; }
.violet-icon { color: #755bfa; background: #efedff; }
.green-icon { color: #21a97a; background: #e6f8f1; }

.feature-card h3,
.process-step h3 {
    margin-bottom: 8px;
    font-size: 15px;
    letter-spacing: -.25px;
}

.feature-card p,
.process-step p {
    margin-bottom: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.8;
}

.process {
    padding-top: 93px;
    padding-bottom: 82px;
}

.process-intro { max-width: 400px; }

.process-intro h2 { max-width: 370px; }

.process-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(25px, 5vw, 70px);
    margin-top: 46px;
}

.process-step { max-width: 280px; position: relative; }

.step-top {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 15px;
}

.step-number {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #78c4ff, #1685f8);
    color: white;
    font-size: 12px;
    font-weight: 800;
}

.step-icon {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #e5f3ff;
    color: var(--blue);
}

.step-icon svg {
    width: 29px;
    height: 29px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.process-valve {
    position: absolute;
    width: 68px;
    right: 1.5%;
    top: -10%;
    filter: drop-shadow(0 7px 7px rgba(27,111,197,.14));
}

.process-valve svg { width: 100%; height: auto; }

.cta-panel {
    margin: 4px clamp(18px, 4.5vw, 60px) 30px;
    padding: 32px clamp(24px, 4.2vw, 58px);
    min-height: 155px;
    border: 1px solid rgba(222,239,255,.8);
    border-radius: 22px;
    background: linear-gradient(110deg, #edf6ff, #e4f2ff);
    display: grid;
    grid-template-columns: 1.15fr 1fr auto;
    align-items: center;
    gap: 30px;
    position: relative;
    overflow: hidden;
}

.cta-copy { max-width: 330px; }
.cta-copy .eyebrow { margin-bottom: 12px; }
.cta-copy h2 { font-size: clamp(23px, 2.5vw, 30px); margin-bottom: 0; }

.cta-description {
    max-width: 270px;
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.8;
}

.about {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding-top: 24px;
    padding-bottom: 24px;
}

.about > div {
    display: flex;
    align-items: center;
    gap: 10px;
}

.about strong { font-size: 17px; }

.about-mark {
    width: 27px;
    height: 27px;
    border-radius: 9px 9px 9px 3px;
    display: grid;
    place-items: center;
    color: white;
    background: var(--blue);
    font-size: 13px;
    font-weight: 800;
}

.about p {
    margin: 0;
    color: var(--muted);
    font-size: 11px;
}

.site-footer {
    max-width: var(--content);
    margin: 0 auto;
    padding: 17px clamp(24px, 5.8vw, 78px) 35px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    color: var(--muted);
    font-size: 10px;
}

.footer-brand { color: var(--navy); font-size: 17px; }
.footer-drop { color: var(--blue); font-size: 23px; }

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 23px;
}

.footer-links a:hover { color: var(--blue); }

.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .65s ease, transform .65s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

@media (min-width: 1321px) {
    .pipe-network { left: 50%; width: 100vw; transform: translateX(-50%); }
}

@media (max-width: 900px) {
    .site-header { gap: 18px; }
    .main-nav { gap: 17px; }
    .hero { grid-template-columns: 1fr 1fr; padding-top: 45px; min-height: 450px; }
    h1 { font-size: clamp(38px, 5vw, 48px); letter-spacing: -2px; }
    .hero-visual { min-height: 320px; }
    .features { gap: 36px; }
    .feature-grid { gap: 30px 20px; }
    .process-valve { opacity: .8; right: 0; width: 52px; }
    .cta-panel { grid-template-columns: 1fr 1fr; }
    .cta-panel .button { justify-self: start; }
}

@media (max-width: 680px) {
    .site-header { padding: 18px 22px; flex-wrap: wrap; }
    .brand { font-size: 20px; }
    .brand-mark { width: 27px; height: 32px; }
    .menu-toggle { display: block; margin-left: auto; }
    .header-cta { display: none; }

    .main-nav {
        display: none;
        order: 5;
        flex-basis: 100%;
        padding: 10px 0 5px;
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .main-nav.open { display: flex; }
    .main-nav a { padding: 9px 0; }

    .section-shell { padding-left: 24px; padding-right: 24px; }
    .hero {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        padding-top: 48px;
        padding-bottom: 40px;
        gap: 5px;
    }

    h1 { font-size: clamp(39px, 10vw, 52px); letter-spacing: -2.1px; }
    .hero-description { font-size: 13px; }
    .hero-proof { font-size: 9px; }
    .hero-visual { min-height: 285px; margin-top: 10px; }
    .visual-orb { width: 290px; right: 0; }
    .hydraulic-illustration { width: min(110%, 490px); transform: translate(4%, 0); }

    .features {
        grid-template-columns: 1fr;
        gap: 35px;
        padding-top: 55px;
        padding-bottom: 70px;
    }

    h2 { font-size: 31px; }
    .feature-grid { gap: 28px 22px; }
    .feature-card { max-width: none; }
    .feature-icon { width: 49px; height: 49px; }
    .feature-icon svg { width: 25px; height: 25px; }

    .process { padding-top: 62px; padding-bottom: 65px; }
    .process-grid { grid-template-columns: 1fr; gap: 26px; margin-top: 34px; }
    .process-step { max-width: 400px; }
    .step-top { margin-bottom: 12px; }
    .process-valve { display: none; }

    .cta-panel {
        margin: 5px 16px 24px;
        padding: 28px 24px;
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .cta-description { max-width: 330px; }
    .about { align-items: flex-start; flex-direction: column; padding-top: 24px; }
    .site-footer { align-items: flex-start; flex-direction: column; gap: 17px; padding: 15px 24px 30px; }
    .footer-links { gap: 18px; }
    .pipe-network { opacity: .52; }
}

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

.site-nav {
    background: rgba(251, 253, 255, .85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
    box-shadow: none;
    padding: 14px 0;
    position: sticky;
    top: 0;
    z-index: 10;
}

/* ---------- Team email box ---------- */
.member-mail {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    padding: 10px 16px;
    max-width: 100%;
    border: 1.5px solid #cfe2fa;
    border-radius: 14px;
    background: #fff;
    color: var(--navy);
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 4px 14px rgba(16, 47, 89, .05);
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.member-mail svg {
    flex: none;
    width: 18px;
    height: 18px;
    fill: none;
    stroke: var(--blue);
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.member-mail span { overflow-wrap: anywhere; }

.member-mail:hover {
    border-color: var(--blue);
    box-shadow: 0 8px 20px rgba(22, 133, 248, .15);
    color: var(--blue-dark);
    transform: translateY(-2px);
}

.dark-theme .member-mail { background: #14253b; border-color: #2a4466; color: #e6f0fb; }
.dark-theme .member-mail:hover { border-color: #5db4ff; color: #8bcaff; }
/* ---------- Contact box (About page) ---------- */
.contact-box {
    margin-top: 64px;
    padding: clamp(24px, 4vw, 44px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    gap: clamp(24px, 5vw, 64px);
    align-items: center;
    border: 1px solid rgba(255, 255, 255, .9);
    border-radius: 24px;
    background:
            radial-gradient(ellipse 28rem 18rem at 0% 0%, rgba(117, 91, 250, .14), transparent 70%),
            radial-gradient(ellipse 28rem 18rem at 100% 100%, rgba(22, 133, 248, .16), transparent 70%),
            linear-gradient(110deg, #f1f8ff, #e8f3ff);
    box-shadow: 0 14px 40px rgba(16, 47, 89, .08);
}

.contact-copy h2 { font-size: clamp(24px, 2.6vw, 32px); margin-bottom: 10px; }
.contact-text { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.8; }

.contact-form { display: grid; gap: 8px; }

.contact-label {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.contact-input { position: relative; }
.contact-input svg {
    position: absolute;
    left: 15px;
    top: 50%;
    width: 19px;
    height: 19px;
    transform: translateY(-50%);
    fill: none;
    stroke: var(--blue);
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none;
}

.contact-input input,
.contact-textarea {
    width: 100%;
    border: 1.5px solid #cfe2fa;
    border-radius: 14px;
    background: #fff;
    color: var(--navy);
    font: inherit;
    font-size: 14px;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.contact-input input { padding: 13px 16px 13px 44px; }
.contact-textarea { padding: 13px 16px; resize: vertical; min-height: 90px; margin-bottom: 4px; }

.contact-input input::placeholder,
.contact-textarea::placeholder { color: #a9bdd6; }

.contact-input input:focus,
.contact-textarea:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 4px rgba(22, 133, 248, .15);
}

.contact-error { margin: 0; color: #d64545; font-size: 12px; }

.contact-send {
    justify-self: start;
    margin-top: 6px;
    padding: 13px 28px;
    font-size: 13px;
    cursor: pointer;
    border: 0;
}

@media (max-width: 820px) {
    .contact-box { grid-template-columns: 1fr; margin-top: 48px; }
}

.dark-theme .contact-box {
    border-color: #25405f;
    background:
            radial-gradient(ellipse 28rem 18rem at 0% 0%, rgba(117, 91, 250, .2), transparent 70%),
            radial-gradient(ellipse 28rem 18rem at 100% 100%, rgba(22, 133, 248, .2), transparent 70%),
            #14253b;
}
.dark-theme .contact-input input,
.dark-theme .contact-textarea { background: #0e1a2b; border-color: #2a4466; color: #e6f0fb; }
.dark-theme .contact-copy h2 { color: #e6f0fb; }

.site-nav > .container-fluid {
    max-width: 1480px;            /* wider than --content so the navbar fits on one row */
    padding: 0 clamp(22px, 4vw, 60px);
}

.site-nav .navbar-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    white-space: nowrap;
    margin-right: 20px;
    padding: 0;
    transition: transform .2s ease;
}
.site-nav .navbar-brand:hover { transform: translateY(-1px); }

.site-nav .brand-drop {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: linear-gradient(135deg, #3aa4ff, #1685f8 55%, #755bfa);
    box-shadow: 0 6px 16px rgba(22, 133, 248, .3);
}
.site-nav .brand-drop svg {
    width: 20px;
    height: 20px;
    fill: #fff;
}

.site-nav .brand-text {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1;
    color: var(--navy);
}
.site-nav .brand-text b {
    font-weight: 800;
    background: linear-gradient(110deg, #178bff, #755bfa);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.site-nav .navbar-collapse {
    align-items: center;
}

.site-nav .navbar-nav {
    gap: clamp(14px, 2vw, 28px);
}

.site-nav .nav-link {
    position: relative;
    padding: 10px 0;
    font-size: 15px;
    font-weight: 500;
    white-space: nowrap;          /* keeps "Make quiz" on one line */
    color: #314e73;
    transition: color .2s ease;
}

.site-nav .nav-link:hover,
.site-nav .nav-link:focus,
.site-nav .nav-link.active {
    color: var(--blue-dark);
}

.site-nav .nav-link.active::after {
    content: "";
    position: absolute;
    height: 2px;
    left: 0;
    right: 0;
    bottom: 2px;
    background: var(--blue);
    border-radius: 4px;
}

/* hamburger/settings button and mobile toggler */
.site-nav .btn-outline-secondary,
.site-nav .navbar-toggler {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--navy);
}

.site-nav .btn-outline-secondary:hover {
    background: var(--pale-blue);
    color: var(--blue-dark);
}

/* right side: Register / Login (or username + Logout) and the settings button */
.site-nav .nav-right {
    flex-wrap: nowrap;            /* was "wrap", which pushed the button under Logout */
    flex-shrink: 0;
    gap: 16px;
    justify-content: flex-end;
}

.site-nav .nav-right .navbar-nav {
    flex-direction: row;
    align-items: center;
}

.site-nav .auth-nav {
    gap: 14px;
}

.site-nav .nav-user-name {
    max-width: 130px;             /* long emails get "..." instead of widening the bar */
}

/* collapsed (phone) menu: let the right side wrap normally */
@media (max-width: 575.98px) {
    .site-nav .nav-right {
        flex-wrap: wrap;
        justify-content: flex-start;
        margin: 10px 0 0;
    }
    .site-nav .navbar-brand { margin-right: 0; }
}

/* dark mode */
.dark-theme .site-nav {
    background: rgba(16, 30, 50, .85);
    border-bottom-color: #25405f;
}
.dark-theme .site-nav .brand-text { color: #e6f0fb; }
.dark-theme .site-nav .brand-text b {
    background: linear-gradient(110deg, #5db4ff, #a592ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.dark-theme .site-nav .nav-link { color: #e6f0fb; }
.dark-theme .site-nav .nav-link:hover,
.dark-theme .site-nav .nav-link.active { color: #8bcaff; }
.dark-theme .site-nav .btn-outline-secondary,
.dark-theme .site-nav .navbar-toggler { background: #14253b; border-color: #25405f; color: #e6f0fb; }