/* ==========================================================================
   Equipbase marketing site
   Custom styles on top of Bootstrap 5. Colours are driven by the brand tokens
   below. Avoid hardcoding colours elsewhere in this file where a token fits.
   ========================================================================== */

:root {
    /* Brand */
    --eb-green: #3D801F;
    --eb-green-dark: #2f6418;
    --eb-green-darker: #244d12;
    --eb-green-tint: #eaf3e5;
    --eb-success: #00AC69;
    --eb-blue: #0061F2;

    /* Ink (charcoal) scale, matching the product app's dark tokens */
    --eb-ink-900: #1C1B19;
    --eb-ink-800: #232220;
    --eb-ink-700: #2C2B28;
    --eb-ink-600: #3a3936;

    /* Surfaces */
    --eb-surface: #ffffff;
    --eb-surface-alt: #f5f6f4;
    --eb-border: #e4e6e1;

    /* Text */
    --eb-text: #26251f;
    --eb-text-muted: #5d5c55;
    --eb-text-on-dark: #f4f4f2;
    --eb-text-on-dark-muted: #c2c1bb;

    /* Type & shape */
    --eb-font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --eb-radius: .75rem;
    --eb-radius-sm: .5rem;
    --eb-shadow: 0 8px 24px rgba(28, 27, 25, .08);
    --eb-shadow-lg: 0 16px 48px rgba(28, 27, 25, .16);
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

/* Keep anchor targets (the skip link's #main, and any future in-page links)
   clear of the sticky header instead of landing underneath it. */
html {
    scroll-padding-top: 5rem;
}

body {
    font-family: var(--eb-font);
    color: var(--eb-text);
    background: var(--eb-surface);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: inherit;
    letter-spacing: -.01em;
}

a {
    color: var(--eb-green-dark);
}

a:hover {
    color: var(--eb-green-darker);
}

img {
    max-width: 100%;
    height: auto;
}

/* Visible focus everywhere, brand-coloured */
:focus-visible {
    outline: 2px solid var(--eb-green);
    outline-offset: 2px;
    border-radius: 2px;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 2000;
    background: var(--eb-green);
    color: #fff;
    padding: .5rem 1rem;
    border-radius: 0 0 var(--eb-radius-sm) 0;
}

.skip-link:focus {
    left: 0;
    color: #fff;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn-eb-primary {
    --bs-btn-bg: var(--eb-green);
    --bs-btn-border-color: var(--eb-green);
    --bs-btn-color: #fff;
    --bs-btn-hover-bg: var(--eb-green-dark);
    --bs-btn-hover-border-color: var(--eb-green-dark);
    --bs-btn-hover-color: #fff;
    --bs-btn-active-bg: var(--eb-green-darker);
    --bs-btn-active-border-color: var(--eb-green-darker);
    --bs-btn-active-color: #fff;
    --bs-btn-disabled-bg: var(--eb-green);
    --bs-btn-disabled-border-color: var(--eb-green);
    --bs-btn-disabled-color: #fff;
    --bs-btn-focus-shadow-rgb: 61, 128, 31;
    font-weight: 600;
}

.btn-eb-dark {
    --bs-btn-bg: var(--eb-ink-800);
    --bs-btn-border-color: var(--eb-ink-800);
    --bs-btn-color: #fff;
    --bs-btn-hover-bg: var(--eb-ink-700);
    --bs-btn-hover-border-color: var(--eb-ink-700);
    --bs-btn-hover-color: #fff;
    --bs-btn-active-bg: var(--eb-ink-900);
    --bs-btn-active-border-color: var(--eb-ink-900);
    --bs-btn-active-color: #fff;
    font-weight: 600;
}

/* Light outline button for use on dark hero/CTA sections */
.btn-eb-outline-light {
    --bs-btn-color: var(--eb-text-on-dark);
    --bs-btn-border-color: rgba(255, 255, 255, .45);
    --bs-btn-hover-bg: rgba(255, 255, 255, .1);
    --bs-btn-hover-border-color: rgba(255, 255, 255, .7);
    --bs-btn-hover-color: #fff;
    --bs-btn-active-bg: rgba(255, 255, 255, .15);
    --bs-btn-active-border-color: rgba(255, 255, 255, .7);
    --bs-btn-active-color: #fff;
    font-weight: 600;
}

.btn-lg {
    padding: .75rem 1.5rem;
}

/* --------------------------------------------------------------------------
   Header / navigation
   -------------------------------------------------------------------------- */

/* Sticky rather than fixed: the header keeps its space in the flow, so nothing
   below it needs a compensating offset. z-index sits on Bootstrap's "fixed"
   level — above page content and its own dropdowns (1000), below the cookie
   banner (1080) and the skip link (2000). */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: var(--eb-ink-900);
    border-bottom: 1px solid var(--eb-ink-700);
}

.site-header .navbar {
    padding-top: .75rem;
    padding-bottom: .75rem;
}

/* The global img { height: auto } reset would override the height attribute */
.site-header .navbar-brand img {
    height: 32px;
    width: auto;
}

.footer-brand img {
    height: 30px;
    width: auto;
}

.site-header .nav-link {
    color: var(--eb-text-on-dark-muted);
    font-weight: 500;
}

.site-header .nav-link:hover,
.site-header .nav-link:focus {
    color: #fff;
}

/* Current section. Overrides Bootstrap's --bs-navbar-active-color, which is a
   near-black that would be invisible on the charcoal header. The underline is
   drawn with an inset shadow so it does not shift the link like a border would. */
.site-header .navbar-nav .nav-link.active {
    color: #fff;
    font-weight: 600;
}

@media (min-width: 992px) {
    .site-header .navbar-nav .nav-link.active {
        box-shadow: inset 0 -2px 0 var(--eb-green);
    }
}

.site-header .navbar-toggler {
    border-color: rgba(255, 255, 255, .3);
}

.site-header .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.85%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.site-header .dropdown-menu {
    border-radius: var(--eb-radius-sm);
    border: 1px solid var(--eb-border);
    box-shadow: var(--eb-shadow);
}

.site-header .dropdown-item {
    padding: .45rem 1.1rem;
    font-weight: 500;
}

.site-header .dropdown-item:hover,
.site-header .dropdown-item:focus {
    background: var(--eb-green-tint);
    color: var(--eb-green-darker);
}

/* Current page. Beats Bootstrap's blue .dropdown-item.active, and stays put on
   hover so the current item never looks like it has become a different item. */
.site-header .dropdown-item.active,
.site-header .dropdown-item.active:hover,
.site-header .dropdown-item.active:focus {
    background: var(--eb-green-tint);
    color: var(--eb-green-darker);
    font-weight: 600;
    box-shadow: inset 3px 0 0 var(--eb-green);
}

@media (max-width: 991.98px) {
    /* The expanded menu lives inside the sticky header, and with every dropdown
       open it can be taller than the screen — which would stop the header
       sticking. Cap it and let the menu itself scroll instead. */
    .site-header .navbar-collapse {
        max-height: calc(100vh - 5rem);
        overflow-y: auto;
    }

    .site-header .dropdown-menu {
        background: var(--eb-ink-800);
        border-color: var(--eb-ink-700);
    }

    .site-header .dropdown-item {
        color: var(--eb-text-on-dark-muted);
    }

    .site-header .dropdown-item:hover,
    .site-header .dropdown-item:focus {
        background: var(--eb-ink-700);
        color: #fff;
    }

    /* The stacked menu is dark, so the light active tint would glare — mark the
       current page with the same green bar over an ink fill instead. */
    .site-header .dropdown-item.active,
    .site-header .dropdown-item.active:hover,
    .site-header .dropdown-item.active:focus {
        background: var(--eb-ink-700);
        color: #fff;
    }

    /* Stacked links are full width, so an underline would read as a divider */
    .site-header .navbar-nav .nav-link.active {
        box-shadow: inset 3px 0 0 var(--eb-green);
        padding-left: .6rem;
    }
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
    background-color: var(--eb-ink-900);
    /* Subtle site-grid pattern: faint lines suggesting a drawing/site plan */
    background-image:
        linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
    background-size: 48px 48px;
    color: var(--eb-text-on-dark);
    padding: 4.5rem 0;
}

.hero h1 {
    font-size: clamp(2rem, 4.5vw, 3.25rem);
    font-weight: 800;
    color: #fff;
}

.hero .hero-kicker {
    display: inline-block;
    background: rgba(61, 128, 31, .25);
    border: 1px solid rgba(61, 128, 31, .6);
    color: #b7e29e;
    font-size: .85rem;
    font-weight: 600;
    padding: .3rem .8rem;
    border-radius: 999px;
    margin-bottom: 1rem;
}

.hero .hero-sub {
    color: var(--eb-text-on-dark-muted);
    font-size: 1.15rem;
    max-width: 40rem;
}

.hero .hero-media img {
    border-radius: var(--eb-radius);
    box-shadow: var(--eb-shadow-lg);
}

.hero-compact {
    padding: 3.5rem 0;
}

/* Framed product-dashboard overlay used in the homepage hero */
.hero-dash-card {
    background: var(--eb-ink-800);
    border: 1px solid var(--eb-ink-600);
    border-radius: var(--eb-radius);
    box-shadow: var(--eb-shadow-lg);
    padding: .5rem;
}

.hero-dash-card img {
    border-radius: calc(var(--eb-radius) - .25rem);
    display: block;
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */

.section {
    padding: 4rem 0;
}

.section-alt {
    background: var(--eb-surface-alt);
}

.section-dark {
    background: var(--eb-ink-900);
    color: var(--eb-text-on-dark);
}

.section-dark h2,
.section-dark h3 {
    color: #fff;
}

.section-heading {
    max-width: 44rem;
    margin-bottom: 2.5rem;
}

.section-heading h2 {
    font-size: clamp(1.6rem, 3vw, 2.25rem);
    font-weight: 800;
}

.section-heading p {
    color: var(--eb-text-muted);
    font-size: 1.05rem;
}

.section-dark .section-heading p {
    color: var(--eb-text-on-dark-muted);
}

.section-kicker {
    display: inline-block;
    color: var(--eb-green-dark);
    background: var(--eb-green-tint);
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    padding: .25rem .7rem;
    border-radius: 999px;
    margin-bottom: .75rem;
}

.section-dark .section-kicker {
    background: rgba(61, 128, 31, .25);
    color: #b7e29e;
}

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */

.eb-card {
    background: var(--eb-surface);
    border: 1px solid var(--eb-border);
    border-radius: var(--eb-radius);
    padding: 1.5rem;
    height: 100%;
}

.eb-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: .5rem;
}

.eb-card p {
    color: var(--eb-text-muted);
    margin-bottom: 0;
}

/* Feature card: the whole card is a link */
a.feature-card {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

a.feature-card:hover,
a.feature-card:focus-visible {
    color: inherit;
    border-color: var(--eb-green);
    box-shadow: var(--eb-shadow);
    transform: translateY(-2px);
}

a.feature-card .feature-card-more {
    color: var(--eb-green-dark);
    font-weight: 600;
    font-size: .9rem;
    display: inline-block;
    margin-top: .75rem;
}

/* Icon chip used on pillar/feature cards */
.card-icon {
    width: 2.75rem;
    height: 2.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--eb-green-tint);
    color: var(--eb-green-dark);
    border-radius: var(--eb-radius-sm);
    margin-bottom: 1rem;
}

.card-icon svg {
    width: 1.4rem;
    height: 1.4rem;
}

/* Benefit list items */
.benefit-item {
    display: flex;
    gap: .75rem;
}

.benefit-item .benefit-check {
    flex: 0 0 auto;
    width: 1.4rem;
    height: 1.4rem;
    margin-top: .15rem;
    color: var(--eb-green);
}

.benefit-item h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: .25rem;
}

.benefit-item p {
    color: var(--eb-text-muted);
    margin-bottom: 0;
}

/* Role-based benefit blocks */
.role-benefit {
    background: var(--eb-surface);
    border: 1px solid var(--eb-border);
    border-left: 4px solid var(--eb-green);
    border-radius: var(--eb-radius);
    padding: 1.5rem;
    height: 100%;
}

.role-benefit h3 {
    font-size: 1.1rem;
    font-weight: 700;
}

.role-benefit ul {
    color: var(--eb-text-muted);
    padding-left: 1.1rem;
    margin-bottom: 0;
}

.role-benefit li + li {
    margin-top: .35rem;
}

/* --------------------------------------------------------------------------
   Product screenshots
   -------------------------------------------------------------------------- */

.screenshot-figure {
    margin: 0;
}

.screenshot-frame {
    position: relative;
    background: var(--eb-surface);
    border: 1px solid var(--eb-border);
    border-radius: var(--eb-radius);
    box-shadow: var(--eb-shadow);
    padding: .5rem;
}

.screenshot-frame img {
    border-radius: calc(var(--eb-radius) - .25rem);
    display: block;
    width: 100%;
}

.screenshot-label {
    position: absolute;
    top: -0.8rem;
    left: 1rem;
    background: var(--eb-green);
    color: #fff;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    padding: .2rem .65rem;
    border-radius: 999px;
}

.screenshot-caption {
    color: var(--eb-text-muted);
    font-size: .9rem;
    margin-top: .75rem;
    text-align: center;
}

/* Placeholder slot for imagery that hasn't been produced yet */
.image-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    background:
        repeating-linear-gradient(45deg, rgba(61, 128, 31, .06), rgba(61, 128, 31, .06) 12px, transparent 12px, transparent 24px),
        var(--eb-surface-alt);
    border: 2px dashed var(--eb-border);
    border-radius: var(--eb-radius);
    color: var(--eb-text-muted);
    min-height: 16rem;
    padding: 2rem;
    text-align: center;
    font-size: .9rem;
}

.image-placeholder strong {
    color: var(--eb-text);
}

/* --------------------------------------------------------------------------
   FAQ (native <details>/<summary>, no JS required)
   -------------------------------------------------------------------------- */

.faq-list details {
    background: var(--eb-surface);
    border: 1px solid var(--eb-border);
    border-radius: var(--eb-radius-sm);
    margin-bottom: .75rem;
}

.faq-list summary {
    cursor: pointer;
    font-weight: 600;
    padding: 1rem 3rem 1rem 1.25rem;
    position: relative;
    list-style: none;
}

.faq-list summary::-webkit-details-marker {
    display: none;
}

.faq-list summary::after {
    content: "";
    position: absolute;
    right: 1.25rem;
    top: 50%;
    width: .6rem;
    height: .6rem;
    border-right: 2px solid var(--eb-green-dark);
    border-bottom: 2px solid var(--eb-green-dark);
    transform: translateY(-70%) rotate(45deg);
    transition: transform .15s ease;
}

.faq-list details[open] summary::after {
    transform: translateY(-30%) rotate(225deg);
}

.faq-list details > div {
    padding: 0 1.25rem 1rem;
    color: var(--eb-text-muted);
}

/* --------------------------------------------------------------------------
   CTA banner
   -------------------------------------------------------------------------- */

.cta-banner {
    background-color: var(--eb-ink-900);
    background-image:
        linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
    background-size: 48px 48px;
    color: var(--eb-text-on-dark);
    border-radius: var(--eb-radius);
    padding: 3rem 2rem;
    text-align: center;
}

.cta-banner h2 {
    color: #fff;
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
}

.cta-banner p {
    color: var(--eb-text-on-dark-muted);
    max-width: 38rem;
    margin: .75rem auto 1.5rem;
}

/* --------------------------------------------------------------------------
   Breadcrumbs & internal link cards
   -------------------------------------------------------------------------- */

.breadcrumbs {
    font-size: .85rem;
}

.breadcrumbs ol {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.breadcrumbs li + li::before {
    content: "/";
    margin-right: .35rem;
    color: var(--eb-text-on-dark-muted);
    opacity: .6;
}

.hero .breadcrumbs a {
    color: var(--eb-text-on-dark-muted);
}

.hero .breadcrumbs a:hover {
    color: #fff;
}

.hero .breadcrumbs [aria-current="page"] {
    color: var(--eb-text-on-dark);
}

a.link-card {
    display: block;
    background: var(--eb-surface);
    border: 1px solid var(--eb-border);
    border-radius: var(--eb-radius-sm);
    padding: 1.1rem 1.25rem;
    text-decoration: none;
    color: inherit;
    height: 100%;
    transition: border-color .15s ease, box-shadow .15s ease;
}

a.link-card:hover,
a.link-card:focus-visible {
    border-color: var(--eb-green);
    box-shadow: var(--eb-shadow);
    color: inherit;
}

a.link-card h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--eb-green-dark);
    margin-bottom: .25rem;
}

a.link-card p {
    color: var(--eb-text-muted);
    font-size: .9rem;
    margin: 0;
}

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */

.eb-form {
    background: var(--eb-surface);
    border: 1px solid var(--eb-border);
    border-radius: var(--eb-radius);
    box-shadow: var(--eb-shadow);
    padding: 2rem;
}

.eb-form label {
    font-weight: 600;
    margin-bottom: .35rem;
}

.eb-form .form-control,
.eb-form .form-select {
    border-radius: var(--eb-radius-sm);
    padding: .6rem .8rem;
}

.eb-form .form-control:focus,
.eb-form .form-select:focus {
    border-color: var(--eb-green);
    box-shadow: 0 0 0 .2rem rgba(61, 128, 31, .15);
}

.validation-message {
    color: #b02a37;
    font-size: .85rem;
    margin-top: .25rem;
    display: block;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
    background: var(--eb-ink-900);
    color: var(--eb-text-on-dark-muted);
    padding: 3.5rem 0 1.5rem;
    margin-top: 4rem;
}

.footer-description {
    color: var(--eb-text-on-dark-muted);
    font-size: .95rem;
}

.footer-heading {
    color: #fff;
    font-size: .85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li + li {
    margin-top: .5rem;
}

.footer-links a {
    color: var(--eb-text-on-dark-muted);
    text-decoration: none;
    font-size: .92rem;
}

.footer-links a:hover,
.footer-links a:focus {
    color: #fff;
    text-decoration: underline;
}

.footer-bottom {
    border-top: 1px solid var(--eb-ink-700);
    margin-top: 3rem;
    padding-top: 1.5rem;
    font-size: .88rem;
}

.footer-legal-links {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    padding: 0;
    margin: 0;
}

.footer-legal-links a {
    color: var(--eb-text-on-dark-muted);
    text-decoration: none;
}

.footer-legal-links a:hover,
.footer-legal-links a:focus {
    color: #fff;
    text-decoration: underline;
}

/* "Cookie settings" — a button (it opens the banner) styled as a footer link */
.footer-legal-button {
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    color: var(--eb-text-on-dark-muted);
}

.footer-legal-button:hover,
.footer-legal-button:focus {
    color: #fff;
    text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Cookie consent banner
   -------------------------------------------------------------------------- */

.eb-cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1080;
    padding: 1.25rem 0;
    background: var(--eb-ink-900);
    border-top: 1px solid var(--eb-ink-600);
    box-shadow: 0 -8px 24px rgba(28, 27, 25, .25);
    color: var(--eb-text-on-dark);
}

/* The banner ships with the hidden attribute; be explicit so no later display
   rule can accidentally reveal it before consent.js has decided. */
.eb-cookie-banner[hidden] {
    display: none;
}

.eb-cookie-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 2rem;
}

.eb-cookie-heading {
    font-size: 1rem;
    color: #fff;
    margin-bottom: .35rem;
}

.eb-cookie-text {
    max-width: 62ch;
    margin: 0;
    font-size: .92rem;
    color: var(--eb-text-on-dark-muted);
}

.eb-cookie-text a {
    color: #fff;
    text-decoration: underline;
}

.eb-cookie-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
}

/* Accept and reject are the same size and weight — neither choice is nudged */
.eb-cookie-actions .btn {
    flex: 1 1 auto;
    min-width: 11rem;
    font-weight: 600;
}

/* The global green focus ring is too dark against the charcoal banner */
.eb-cookie-banner :focus-visible {
    outline-color: #fff;
}

/* --------------------------------------------------------------------------
   Prose pages (legal, security, about)
   -------------------------------------------------------------------------- */

.prose {
    max-width: 46rem;
}

.prose h2 {
    font-size: 1.4rem;
    margin-top: 2rem;
}

.prose h3 {
    font-size: 1.15rem;
    margin-top: 1.5rem;
}

.prose p,
.prose li {
    color: var(--eb-text-muted);
}

/* --------------------------------------------------------------------------
   Responsive tweaks
   -------------------------------------------------------------------------- */

@media (max-width: 767.98px) {
    .hero {
        padding: 3rem 0;
    }

    .section {
        padding: 2.75rem 0;
    }

    .eb-form {
        padding: 1.5rem;
    }

    .cta-banner {
        padding: 2.25rem 1.25rem;
    }

    /* Full-width stacked choices, and never let the banner cover the whole
       viewport on a small screen */
    .eb-cookie-banner {
        max-height: 80vh;
        overflow-y: auto;
    }

    .eb-cookie-actions {
        width: 100%;
    }

    .eb-cookie-actions .btn {
        flex: 1 1 100%;
    }
}
