/* CaRob Computing — storefront styles.
   Layered on top of Bootstrap (served locally from wwwroot/lib, no CDN). */

:root {
    --carob-ink: #14243a;
    --carob-ink-soft: #47576e;
    --carob-accent: #1668b8;
    --carob-accent-dark: #10508f;
    --carob-sand: #f5f7fa;
    --carob-line: #dfe5ed;
    --carob-go: #16794b;
}

html { scroll-behavior: smooth; }

body {
    color: var(--carob-ink);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main { flex: 1 0 auto; }

h1, h2, h3, h4 { font-weight: 650; letter-spacing: -0.01em; }

a { color: var(--carob-accent); }
a:hover { color: var(--carob-accent-dark); }

/* Bootstrap defaults <code> to pink, which fights the palette. Product codes and
   registration codes are shown this way throughout, so it needs to look deliberate. */
code {
    color: var(--carob-ink);
    background: var(--carob-sand);
    border: 1px solid var(--carob-line);
    border-radius: .25rem;
    padding: .1rem .4rem;
    font-size: .9em;
}

/* Staff-authored HTML out of SITE_CONFIGURATION (terms, legal text) arrives with its
   own inline markup; keep it readable without letting it break the page width. */
.legacy-html { line-height: 1.7; }
.legacy-html :is(h1, h2, h3) { font-size: 1.1rem; margin-top: 1.75rem; }
.legacy-html img, .legacy-html table { max-width: 100%; }
.legacy-html table { display: block; overflow-x: auto; }

/* ---------- Header ---------- */

.site-nav {
    background: #fff;
    border-bottom: 1px solid var(--carob-line);
    padding-block: .65rem;
}

.navbar-brand {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -.02em;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
}

/* Sized in CSS as well as via width/height attributes: the attributes reserve the
   space so the header does not shift as the image loads. */
.brand-runner { width: 32px; height: 34px; flex: 0 0 auto; }
.brand-mark { color: var(--carob-accent); }
.brand-tail { color: var(--carob-ink); font-weight: 400; margin-left: .18rem; }

.site-nav .nav-link {
    color: var(--carob-ink-soft);
    font-weight: 550;
    padding-inline: .9rem;
}

.site-nav .nav-link:hover,
.site-nav .nav-link:focus-visible { color: var(--carob-accent); }

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

.hero {
    background: linear-gradient(160deg, #16324f 0%, #1668b8 100%);
    color: #fff;
    padding-block: 4.5rem;
}

.hero h1 { font-size: clamp(2rem, 4.5vw, 3.1rem); margin-bottom: 1rem; }
.hero p.lead { color: #d8e6f5; max-width: 46rem; font-size: 1.15rem; }

.btn-carob {
    background: #fff;
    color: var(--carob-accent-dark);
    font-weight: 600;
    border: 0;
    padding: .7rem 1.6rem;
}

.btn-carob:hover { background: #eaf2fb; color: var(--carob-accent-dark); }

.btn-carob-outline {
    border: 1.5px solid rgba(255, 255, 255, .6);
    color: #fff;
    font-weight: 600;
    padding: .7rem 1.6rem;
}

.btn-carob-outline:hover { background: rgba(255, 255, 255, .12); color: #fff; }

/* ---------- Sections ---------- */

.section { padding-block: 3.5rem; }
.section-tint { background: var(--carob-sand); }

.section-title { margin-bottom: .5rem; }

.section-intro {
    color: var(--carob-ink-soft);
    max-width: 44rem;
    margin-bottom: 2rem;
}

/* ---------- Product cards ---------- */

.product-card {
    background: #fff;
    border: 1px solid var(--carob-line);
    border-radius: .6rem;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: box-shadow .15s ease, transform .15s ease;
}

.product-card:hover {
    box-shadow: 0 .5rem 1.5rem rgba(20, 36, 58, .1);
    transform: translateY(-2px);
}

.product-card .thumb {
    background: var(--carob-sand);
    aspect-ratio: 16 / 10;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-bottom: 1px solid var(--carob-line);
}

.product-card .thumb img { width: 100%; height: 100%; object-fit: contain; padding: 1rem; }

.product-card .thumb .placeholder-mark {
    color: var(--carob-accent);
    font-size: 2rem;
    font-weight: 700;
    opacity: .35;
}

.product-card .body { padding: 1.25rem; flex: 1 0 auto; display: flex; flex-direction: column; }
.product-card h3 { font-size: 1.15rem; margin-bottom: .4rem; }
.product-card .desc { color: var(--carob-ink-soft); font-size: .95rem; flex: 1 0 auto; }

.price { font-size: 1.35rem; font-weight: 700; color: var(--carob-ink); }
.price-note { font-size: .82rem; color: var(--carob-ink-soft); }

/* ---------- Product detail ---------- */

.product-hero-img {
    background: var(--carob-sand);
    border: 1px solid var(--carob-line);
    border-radius: .6rem;
    padding: 1.5rem;
    display: grid;
    place-items: center;
    min-height: 18rem;
}

.product-hero-img img { max-width: 100%; height: auto; }

.buy-box {
    border: 1px solid var(--carob-line);
    border-radius: .6rem;
    padding: 1.5rem;
    background: #fff;
}

/* ---------- Update / FAQ lists ---------- */

.release {
    border-left: 3px solid var(--carob-line);
    padding: 0 0 1.75rem 1.25rem;
    position: relative;
}

.release:last-child { padding-bottom: 0; }

.release::before {
    content: "";
    position: absolute;
    left: -7px;
    top: .35rem;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--carob-accent);
}

.release .version { font-weight: 650; }
.release .when { color: var(--carob-ink-soft); font-size: .88rem; }

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

.site-footer {
    background: var(--carob-ink);
    color: #cdd6e2;
    padding-block: 2.75rem 1.75rem;
    /* No margin-top: every section already carries its own padding, and a margin
       here left a band of dead white between a tinted section and the footer. */
}

.site-footer a { color: #cdd6e2; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer hr { border-color: rgba(255, 255, 255, .15); margin-block: 1.75rem 1rem; }

.footer-brand { font-weight: 700; font-size: 1.1rem; color: #fff; margin-bottom: .5rem; }
.footer-heading { font-size: .8rem; text-transform: uppercase; letter-spacing: .07em; color: #fff; margin-bottom: .75rem; }
.footer-list { list-style: none; padding: 0; margin: 0; line-height: 1.9; }
.text-muted-light { color: #9fadbf; }

/* Bootstrap's .text-muted is too dark on the footer's navy. */
.site-footer .text-muted { color: #9fadbf !important; }

/* ---------- Account ---------- */

.site-nav .nav-account {
    color: var(--carob-accent);
    font-weight: 650;
}

/* Registration codes are the thing customers come here to copy, so they get more
   presence than an inline <code> and a selectable, unambiguous monospace face. */
.code-strong {
    font-size: 1rem;
    letter-spacing: .06em;
    padding: .35rem .6rem;
    user-select: all;
}

.code-table th {
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--carob-ink-soft);
}

/* ---------- Downloads ---------- */

.download-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    border: 1px solid var(--carob-line);
    border-radius: .6rem;
    padding: 1rem 1.1rem;
    background: #fff;
    height: 100%;
}

.dl-icon {
    flex: 0 0 3.25rem;
    height: 3.25rem;
    border-radius: .45rem;
    background: var(--carob-sand);
    border: 1px solid var(--carob-line);
    display: grid;
    place-items: center;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .04em;
    color: var(--carob-accent);
}

.dl-body { flex: 1 1 auto; min-width: 0; }
.dl-name { font-weight: 650; }
.dl-desc { font-size: .9rem; color: var(--carob-ink-soft); }
.dl-meta { font-size: .82rem; color: var(--carob-ink-soft); margin-top: .15rem; }
.dl-action { flex: 0 0 auto; }

/* ---------- Product overview pages ---------- */
.overview-hero {
    background: linear-gradient(160deg, var(--carob-ink) 0%, #1d3b60 100%);
    color: #fff;
    padding: 2.25rem 0 2.75rem;
}
.overview-crumbs {
    font-size: .85rem;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, .65);
}
.overview-crumbs a { color: rgba(255, 255, 255, .85); text-decoration: none; }
.overview-crumbs a:hover { color: #fff; text-decoration: underline; }
.overview-crumbs span { margin: 0 .4rem; }
.overview-hero h1 { font-weight: 700; margin-bottom: .35rem; }
.overview-tagline {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, .8);
    margin-bottom: 1rem;
}
.overview-intro { color: rgba(255, 255, 255, .92); max-width: 42rem; }
.overview-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.25rem; }
.overview-actions .btn-price { font-weight: 400; opacity: .85; margin-left: .4rem; }
.overview-hero-shot {
    margin: 0;
    border-radius: .6rem;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 1.5rem 3rem rgba(0, 0, 0, .35);
}
.overview-hero-shot img { width: 100%; height: auto; display: block; }

/* Development-only notice; see Overview.cshtml. */
.copy-warning {
    border: 1px solid #f0c36d;
    background: #fdf6e3;
    border-radius: .5rem;
    padding: .9rem 1.1rem;
    margin-top: 1.5rem;
    font-size: .9rem;
}
.copy-warning strong { color: #8a6100; }
.copy-warning p { margin: .5rem 0 0; }

.overview-section { margin-bottom: 3rem; }
.overview-section h2 { font-size: 1.4rem; font-weight: 650; margin-bottom: .75rem; }
.overview-section p { color: var(--carob-ink-soft); }
.overview-bullets {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
    gap: .4rem .9rem;
}
.overview-bullets li {
    position: relative;
    padding-left: 1.35rem;
    color: var(--carob-ink);
    font-size: .93rem;
}
.overview-bullets li::before {
    content: "";
    position: absolute;
    left: 0;
    top: .48rem;
    width: .45rem;
    height: .45rem;
    border-radius: 50%;
    background: var(--carob-accent);
}
.overview-shot {
    margin: 1.25rem 0 0;
    border: 1px solid var(--carob-line);
    border-radius: .5rem;
    overflow: auto;
    background: var(--carob-sand);
}
.overview-shot img { width: 100%; height: auto; display: block; }

.overview-aside { position: sticky; top: 1.5rem; }
.aside-card {
    border: 1px solid var(--carob-line);
    border-radius: .6rem;
    padding: 1.1rem 1.2rem;
    margin-bottom: 1.25rem;
    background: #fff;
}
.aside-card h2 {
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--carob-ink-soft);
    margin-bottom: .75rem;
}
.aside-price { font-size: 1.75rem; font-weight: 700; color: var(--carob-ink); }
.aside-price-note { font-size: .82rem; color: var(--carob-ink-soft); margin-bottom: .75rem; }
.aside-list { list-style: none; padding: 0; margin: 0 0 .75rem; }
.aside-list li { padding: .45rem 0; border-bottom: 1px solid var(--carob-line); }
.aside-list li:last-child { border-bottom: 0; }
.aside-list a { text-decoration: none; font-weight: 600; display: block; }
.aside-list a:hover { text-decoration: underline; }
.aside-meta { display: block; font-size: .82rem; color: var(--carob-ink-soft); }

.card-tagline {
    font-size: .85rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--carob-accent);
    font-weight: 600;
    margin-bottom: .4rem;
}
.price-enquire { font-size: .9rem; color: var(--carob-ink-soft); }

/* Lifecycle badges: the range is deliberately narrowing (see the legacy home page),
   so products are labelled rather than hidden — schools still running 2200 have to
   be able to find it. */
.lifecycle {
    display: inline-block;
    vertical-align: middle;
    margin-left: .5rem;
    padding: .1rem .45rem;
    border-radius: 1rem;
    font-size: .65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.lifecycle.current { background: #e3f4ea; color: var(--carob-go); }
.lifecycle.deprecated { background: #f3eee0; color: #8a6100; }

.overview-notice {
    border-left: 3px solid #d9b45e;
    background: #fdf8ec;
    padding: .85rem 1.1rem;
    border-radius: .35rem;
    margin-bottom: 2rem;
    color: var(--carob-ink);
}

/* ---------- Home page ---------- */
.trial-offer {
    border: 1px solid var(--carob-line);
    border-left: 4px solid var(--carob-accent);
    border-radius: .6rem;
    padding: 1.4rem 1.5rem;
    background: var(--carob-sand);
    height: 100%;
}
.trial-offer h2 {
    font-size: 1.1rem;
    font-weight: 650;
    margin-bottom: .85rem;
    color: var(--carob-accent-dark);
}
.trial-offer p { color: var(--carob-ink-soft); font-size: .95rem; }
.trial-offer p:last-of-type { font-weight: 600; color: var(--carob-ink); }

.language-note {
    margin-top: 2.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--carob-line);
    font-size: .88rem;
    color: var(--carob-ink-soft);
    max-width: 52rem;
}

/* Long-form legal text: the policy is dense, so give it generous measure and clear
   heading separation rather than letting it run as an undifferentiated wall. */
.policy h2 {
    font-size: 1.25rem;
    margin-top: 2.25rem;
    padding-bottom: .4rem;
    border-bottom: 1px solid var(--carob-line);
}
.policy h3 { font-size: 1rem; margin-top: 1.5rem; color: var(--carob-ink); }
.policy p, .policy li { color: var(--carob-ink-soft); }
.policy ul, .policy ol { padding-left: 1.4rem; }
.policy li { margin-bottom: .35rem; }
.policy-updated {
    font-size: .88rem;
    color: var(--carob-ink-soft);
    margin-top: -1rem;
    margin-bottom: 2rem;
}
