/* MoveableIQ marketing site.
   Palette ported from the Tracker project's Colors.css — navy + gold on a
   light cornflower background — so this site reads as the same brand family
   as the live application. */

:root {
    --mq-navy: #003366;
    --mq-navy-dark: #002650;
    --mq-navy-light: #003d7a;
    --mq-gold: #d4af37;
    --mq-gold-dark: #b8960e;
    --mq-bg: #e8f0f9;
    --mq-surface: #ffffff;
    --mq-card-border: #b9cee0;
    --mq-text: #222222;
    --mq-muted: #5a6b7d;
    --mq-link: #003d7a;
    --mq-link-hover: #002650;
    --mq-footer-strip: #1a1a2e;
}

/* --- Layout shell ---------------------------------------------------- */

html, body {
    height: 100%;
}

body {
    background-color: var(--mq-bg);
    color: var(--mq-text);
    font-family: "Segoe UI", "Source Sans 3", Arial, sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* The shared header and footer are injected into these placeholders by
   site.js; main grows to push the footer down on short pages. */
main {
    flex: 1 0 auto;
}

a:not(.btn),
a:not(.btn):visited {
    color: var(--mq-link);
}

a:not(.btn):hover {
    color: var(--mq-link-hover);
}

/* Visible focus ring on every interactive element (a11y). */
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
.form-control:focus {
    outline: none;
    box-shadow: 0 0 0 0.2rem #fff, 0 0 0 0.35rem #258cfb;
}

/* Skip link — off-screen until focused. The color is listed for every
   link state (incl. :visited) so the global a:visited rule can't make
   the white text fade to dim blue after first use. */
.mq-skip-link,
.mq-skip-link:visited,
.mq-skip-link:hover,
.mq-skip-link:focus {
    position: absolute;
    top: 0;
    z-index: 1080;
    padding: 0.5rem 1rem;
    background: var(--mq-navy);
    color: #fff;
    border-radius: 0 0 6px 0;
    text-decoration: underline;
}

.mq-skip-link,
.mq-skip-link:visited {
    left: -999px;
}

.mq-skip-link:focus {
    left: 0;
}

/* --- Buttons --------------------------------------------------------- */

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

.btn-navy:hover,
.btn-navy:focus {
    background-color: var(--mq-navy-dark);
    border-color: var(--mq-navy-dark);
    color: #fff;
}

.btn-outline-navy {
    color: var(--mq-navy);
    border-color: var(--mq-navy);
}

.btn-outline-navy:hover,
.btn-outline-navy:focus {
    background-color: var(--mq-navy);
    color: #fff;
}

.btn-gold {
    background-color: var(--mq-gold);
    border-color: var(--mq-gold);
    color: var(--mq-navy-dark);
    font-weight: 600;
}

.btn-gold:hover,
.btn-gold:focus {
    background-color: var(--mq-gold-dark);
    border-color: var(--mq-gold-dark);
    color: #fff;
}

/* "Ghost" button for use on the dark hero. */
.btn-hero-ghost {
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.55);
}

.btn-hero-ghost:hover,
.btn-hero-ghost:focus {
    background-color: rgba(255, 255, 255, 0.12);
    color: #fff;
}

/* --- Navbar ---------------------------------------------------------- */

.mq-navbar {
    background-color: var(--mq-navy);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}

/* All navbar link states need to be listed explicitly. The global
   `a:not(.btn):visited` rule above has specificity (0,2,1) which is
   HIGHER than `.mq-navbar .navbar-brand` (0,2,0) or `.mq-navbar .nav-link`
   (0,2,0). Without explicit :visited rules here, after a user clicks a
   nav link or the brand link, the link's :visited color (the global
   --mq-link blue) wins and renders nearly invisible against the navy
   navbar background. */

.mq-navbar .navbar-brand,
.mq-navbar .navbar-brand:visited,
.mq-navbar .navbar-brand:hover,
.mq-navbar .navbar-brand:focus {
    color: #fff;
    font-weight: 600;
    font-size: 1.2rem;
}

.mq-navbar .nav-link,
.mq-navbar .nav-link:visited {
    color: rgba(255, 255, 255, 0.82);
    font-weight: 500;
    border-bottom: 2px solid transparent;
}

.mq-navbar .nav-link:hover,
.mq-navbar .nav-link:focus,
.mq-navbar .nav-link:visited:hover,
.mq-navbar .nav-link:visited:focus {
    color: #fff;
}

.mq-navbar .nav-link.active,
.mq-navbar .nav-link.active:visited {
    color: #fff;
    border-bottom-color: var(--mq-gold);
}

/* --- Hero ------------------------------------------------------------ */

.mq-hero {
    background: linear-gradient(160deg,
        var(--mq-navy-light) 0%,
        var(--mq-navy) 55%,
        var(--mq-navy-dark) 100%);
    color: #fff;
    position: relative;
}

/* Gold accent stripe along the bottom edge — echoes the app banner. */
.mq-hero::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 5px;
    background: linear-gradient(to right, var(--mq-gold), var(--mq-gold-dark));
}

.mq-eyebrow {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--mq-gold);
}

.mq-hero h1 {
    font-family: Georgia, "Source Serif 4", serif;
    font-weight: 600;
    line-height: 1.15;
    font-size: clamp(1.9rem, 4.5vw, 3rem);
}

.mq-hero-sub {
    color: rgba(255, 255, 255, 0.86);
    font-size: 1.1rem;
    max-width: 38rem;
}

/* --- Section helpers ------------------------------------------------- */

.mq-section-title {
    color: var(--mq-navy);
    font-weight: 600;
}

.mq-text-muted {
    color: var(--mq-muted);
}

/* Content panels and value cards — white surfaces that lift off the
   cornflower page background. */
.mq-panel,
.mq-value-card {
    background-color: var(--mq-surface);
    border: 1px solid var(--mq-card-border);
    border-radius: 10px;
    box-shadow: 0 4px 14px rgba(0, 51, 102, 0.08);
}

.mq-value-card {
    height: 100%;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.mq-value-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 51, 102, 0.14);
}

.mq-value-icon {
    font-size: 2.4rem;
    color: var(--mq-navy);
}

/* --- How it works steps --------------------------------------------- */

.mq-step-number {
    width: 2.6rem;
    height: 2.6rem;
    flex: 0 0 2.6rem;
    border-radius: 50%;
    background-color: var(--mq-navy);
    color: #fff;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- FERPA reassurance band ------------------------------------------ */

.mq-ferpa {
    background-color: #dfeaf6;
    border: 1px solid var(--mq-card-border);
    border-left: 5px solid var(--mq-navy);
    border-radius: 10px;
}

/* --- Closing call-to-action band ------------------------------------ */

.mq-cta {
    background: linear-gradient(160deg, var(--mq-navy-light), var(--mq-navy-dark));
    color: #fff;
    border-radius: 12px;
}

/* --- Document pages (Contact / Privacy / Terms) --------------------- */

.mq-doc-card {
    background-color: var(--mq-surface);
    border: 1px solid var(--mq-card-border);
    border-radius: 10px;
    box-shadow: 0 4px 14px rgba(0, 51, 102, 0.08);
    overflow: hidden;
}

.mq-doc-header {
    background-color: var(--mq-navy);
    color: #fff;
}

.mq-doc-card h2 {
    color: var(--mq-navy);
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 1.75rem;
}

.mq-doc-card h2:first-of-type {
    margin-top: 0;
}

/* --- Footer ---------------------------------------------------------- */

.mq-footer {
    background-color: #212529;
    color: rgba(255, 255, 255, 0.85);
    flex-shrink: 0;
}

.mq-footer-heading {
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

/* Same specificity-versus-global-:visited issue as the navbar — list
   every state explicitly so a visited footer link doesn't disappear
   against the dark footer background. */
.mq-footer a,
.mq-footer a:visited {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
}

.mq-footer a:hover,
.mq-footer a:focus,
.mq-footer a:visited:hover,
.mq-footer a:visited:focus {
    color: #fff;
    text-decoration: underline;
}

.mq-footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mq-footer li {
    margin-bottom: 0.4rem;
}

.mq-footer-strip {
    background-color: var(--mq-footer-strip);
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.8rem;
    text-align: center;
    padding: 0.75rem 1rem;
}

/* --- Back-to-top button ---------------------------------------------- */
/* Injected by js/site.js into every page after the footer. Hidden by
   default; the .mq-top-visible class is toggled on by scroll position
   (visible after 320px). Navy background + gold hover matches the
   established brand palette; the gold-on-navy combination clears WCAG
   AA contrast comfortably. */

#mq-top-button {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    width: 2.75rem;
    height: 2.75rem;
    display: none;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background-color: var(--mq-navy);
    color: #fff;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    z-index: 1030;
    transition: background-color 0.15s ease, transform 0.15s ease;
}

#mq-top-button.mq-top-visible {
    display: flex;
}

#mq-top-button:hover,
#mq-top-button:focus {
    background-color: var(--mq-gold);
    color: var(--mq-navy);
    transform: translateY(-2px);
}

#mq-top-button:active {
    transform: translateY(0);
}

/* Respect prefers-reduced-motion: drop the hover lift + transition. */
@media (prefers-reduced-motion: reduce) {
    #mq-top-button,
    #mq-top-button:hover,
    #mq-top-button:focus,
    #mq-top-button:active {
        transition: none;
        transform: none;
    }
}
