/* The landing page. Every colour is a token — the brand from the --ism-* properties
   the palette partial emits, everything else from Bootstrap's --bs-* — so the page
   follows the six palettes, the custom colour, and both modes without a value of its
   own. Nothing here is read by any other page. */

.landing-body {
    background: var(--bs-body-bg);
    color: var(--bs-body-color);
    margin: 0;
    -webkit-font-smoothing: antialiased;
}

.landing-body a {
    text-decoration: none;
}

.landing-section {
    padding: 5.5rem 0;
}

/* Alternating surfaces rather than rules between every band: a hairline under each
   section turned eleven cards and three panels into one long ledger. */
.landing-section-alt {
    background: var(--bs-tertiary-bg);
    border-block: 1px solid var(--bs-border-color-translucent);
}

/* A section's kicker, heading and lead share one measure and one rhythm, so the
   five sections line up down the page instead of each finding their own margin. */
.section-head {
    max-width: 46rem;
}

/* Desktop breathing room is phone scrolling. */
@media (max-width: 767.98px) {
    .landing-section {
        padding: 3.5rem 0;
    }

    .landing-hero {
        padding: 3.5rem 0 6rem;
    }

    .landing-cta {
        padding: 2.75rem 1.25rem;
    }
}

.landing-kicker {
    display: inline-block;
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--ism-brand-emphasis);
    margin-bottom: .75rem;
}

.landing-heading {
    font-weight: 700;
    letter-spacing: -.01em;
    line-height: 1.15;
}

.landing-lead {
    color: var(--bs-secondary-color);
    font-size: 1.1rem;
    max-width: 44rem;
}

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

.landing-nav {
    position: sticky;
    top: 0;
    z-index: 1020;
    backdrop-filter: saturate(180%) blur(12px);
    background: color-mix(in srgb, var(--bs-body-bg) 82%, transparent);
    border-bottom: 1px solid var(--bs-border-color-translucent);
}

.landing-nav .navbar-brand {
    font-weight: 700;
    letter-spacing: -.01em;
    color: var(--bs-body-color);
}

/* Not scoped to the nav: the footer carries the same mark, and a rule that only
   applies inside the header leaves the footer's copy as a bare icon. */
.brand-mark {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    width: 2.1rem;
    height: 2.1rem;
    border-radius: .6rem;
    background: var(--ism-brand);
    color: var(--ism-on-brand);
    font-size: 1.15rem;
}

.landing-nav .nav-link {
    color: var(--bs-secondary-color);
    font-weight: 500;
}

.landing-nav .nav-link:hover {
    color: var(--bs-body-color);
}

.landing-theme-toggle .btn[aria-pressed="true"] {
    background: var(--bs-tertiary-bg);
    color: var(--bs-body-color);
}

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

.landing-hero {
    position: relative;
    overflow: hidden;
    padding: 6rem 0 7.5rem; /* room underneath for the stats band to sit over the seam */
    background: linear-gradient(180deg, var(--ism-brand-subtle), var(--bs-body-bg) 72%);
}

/* The washes and the grid live on their own layer rather than on the section, so
   the grid can be masked to fade out without taking the gradient with it. */
.hero-canvas {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(60rem 30rem at 12% -12%, rgba(var(--ism-brand-rgb), .26), transparent 62%),
        radial-gradient(42rem 26rem at 96% 6%, rgba(var(--ism-brand-rgb), .16), transparent 62%);
}

.hero-canvas::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(to right, rgba(var(--ism-brand-rgb), .16) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(var(--ism-brand-rgb), .16) 1px, transparent 1px);
    background-size: 3.5rem 3.5rem;
    -webkit-mask-image: radial-gradient(70% 60% at 30% 0%, #000, transparent 75%);
    mask-image: radial-gradient(70% 60% at 30% 0%, #000, transparent 75%);
}

.hero-title {
    font-size: clamp(2.3rem, 5vw, 3.9rem);
    letter-spacing: -.025em;
    text-wrap: balance;
}

.landing-hero .hero-lead {
    font-size: 1.15rem;
    color: var(--bs-secondary-color);
    max-width: 38rem;
}

.hero-badges .badge {
    font-weight: 500;
    font-size: .8rem;
    padding: .45rem .75rem;
    background: color-mix(in srgb, var(--bs-body-bg) 65%, transparent);
    color: var(--ism-brand-emphasis);
    border: 1px solid var(--ism-brand-border);
    backdrop-filter: blur(6px);
}

.hero-credit {
    display: flex;
    align-items: center;
    gap: .55rem;
    font-size: .875rem;
    color: var(--bs-secondary-color);
}

.hero-credit i {
    color: var(--ism-brand);
}

.btn-landing-lg {
    padding: .8rem 1.45rem;
    font-size: 1.05rem;
    font-weight: 600;
    border-radius: .75rem;
}

/* A third button that is neither filled nor outlined, so "See what it does" does not
   compete with the two doors beside it. */
.btn-ghost {
    color: var(--bs-body-color);
    border: 1px solid transparent;
    background: color-mix(in srgb, var(--bs-body-bg) 55%, transparent);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
    color: var(--ism-brand-emphasis);
    border-color: var(--ism-brand-border);
    background: var(--bs-body-bg);
}

/* The stylised preview: a card drawn in CSS, not a screenshot, so it recolours
   with the palette and never goes stale against the real dashboard. */
.hero-preview {
    border: 1px solid var(--bs-border-color-translucent);
    border-radius: 1rem;
    background: var(--bs-body-bg);
    box-shadow:
        0 30px 60px -20px rgba(var(--ism-brand-rgb), .35),
        0 10px 30px -15px rgba(0, 0, 0, .25);
    overflow: hidden;
}

.hero-preview .preview-bar {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .65rem .9rem;
    border-bottom: 1px solid var(--bs-border-color-translucent);
    background: var(--bs-tertiary-bg);
    font-size: .8rem;
    color: var(--bs-secondary-color);
}

.hero-preview .preview-bar .dot {
    width: .6rem;
    height: .6rem;
    border-radius: 50%;
    background: var(--bs-border-color);
}

.hero-preview .preview-bar .dot:first-child {
    background: var(--ism-brand);
}

.hero-preview .preview-body {
    padding: 1rem;
    display: grid;
    gap: .85rem;
}

.preview-tiles {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .6rem;
}

.preview-tile {
    padding: .7rem .8rem;
    border-radius: .6rem;
    background: var(--bs-tertiary-bg);
    border: 1px solid var(--bs-border-color-translucent);
}

.preview-tile .label {
    font-size: .7rem;
    color: var(--bs-secondary-color);
    text-transform: uppercase;
    letter-spacing: .05em;
}

.preview-tile .value {
    font-weight: 700;
    font-size: 1.25rem;
    line-height: 1.2;
}

.preview-tile .value.good { color: var(--bs-success); }
.preview-tile .value.warn { color: var(--bs-warning); }

.preview-chart {
    display: flex;
    align-items: flex-end;
    gap: .45rem;
    height: 6.5rem;
    padding: .75rem .8rem .5rem;
    border-radius: .6rem;
    border: 1px solid var(--bs-border-color-translucent);
}

.preview-chart span {
    flex: 1;
    border-radius: .3rem .3rem 0 0;
    background: linear-gradient(180deg, var(--ism-brand), var(--ism-brand-hover));
    opacity: .9;
}

.preview-chart span:nth-child(even) {
    opacity: .55;
}

.preview-rows {
    display: grid;
    gap: .45rem;
}

.preview-row {
    display: flex;
    align-items: center;
    gap: .6rem;
    font-size: .8rem;
    padding: .45rem .6rem;
    border-radius: .5rem;
    border: 1px solid var(--bs-border-color-translucent);
}

.preview-row .avatar {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    background: var(--ism-brand-subtle);
    color: var(--ism-brand-emphasis);
    display: inline-grid;
    place-items: center;
    font-size: .7rem;
    font-weight: 600;
}

.preview-row .line {
    flex: 1;
    height: .5rem;
    border-radius: .25rem;
    background: var(--bs-tertiary-bg);
}

.preview-row .pill {
    font-size: .68rem;
    padding: .15rem .5rem;
    border-radius: 1rem;
    font-weight: 600;
}

.preview-row .pill.good { background: var(--bs-success-bg-subtle); color: var(--bs-success-text-emphasis); }
.preview-row .pill.warn { background: var(--bs-warning-bg-subtle); color: var(--bs-warning-text-emphasis); }
.preview-row .pill.info { background: var(--ism-brand-subtle); color: var(--ism-brand-emphasis); }

/* Floating notes beside the preview, hidden where there is no room. */
.hero-float {
    position: absolute;
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .6rem .8rem;
    border-radius: .75rem;
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color-translucent);
    box-shadow: 0 10px 30px -12px rgba(0, 0, 0, .3);
    font-size: .82rem;
    white-space: nowrap;
}

.hero-float i {
    font-size: 1.1rem;
    color: var(--ism-brand);
}

/* Clear of the preview's own title bar rather than lying across it — at -1.25rem the
   chip covered the bar's right-hand side and the bell in it, which read as a rendering
   fault rather than as a card floating above the mock-up. */
.hero-float.top { top: -2.25rem; right: -1.25rem; }
.hero-float.bottom { bottom: -1.5rem; left: -1.25rem; }

@media (max-width: 1199.98px) {
    .hero-float { display: none; }
}

/* Stats strip --------------------------------------------------------------- */

/* Lifted over the hero's lower edge so the two read as one surface. The hero pads
   itself out underneath to make the room, which is why this can be a plain negative
   margin rather than absolute positioning that would need a height to reserve. */
.landing-stats {
    position: relative;
    z-index: 1;
    margin-top: -4rem;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    border-radius: 1.25rem;
    border: 1px solid var(--bs-border-color-translucent);
    background: var(--bs-body-bg);
    box-shadow: 0 24px 48px -28px rgba(var(--ism-brand-rgb), .5);
    overflow: hidden;
}

@media (min-width: 768px) {
    .landing-stats {
        grid-template-columns: repeat(4, 1fr);
    }
}

.landing-stat {
    padding: 1.75rem 1.25rem;
    text-align: center;
    border-top: 1px solid var(--bs-border-color-translucent);
    border-left: 1px solid var(--bs-border-color-translucent);
}

/* Only the interior seams, so the card's own border is not doubled. */
.landing-stats .landing-stat:nth-child(-n + 2) { border-top: 0; }
.landing-stats .landing-stat:nth-child(odd) { border-left: 0; }

@media (min-width: 768px) {
    .landing-stats .landing-stat { border-top: 0; }
    .landing-stats .landing-stat:first-child { border-left: 0; }
    .landing-stats .landing-stat:nth-child(odd) { border-left: 1px solid var(--bs-border-color-translucent); }
    .landing-stats .landing-stat:first-child { border-left: 0; }
}

.landing-stat .value {
    font-size: clamp(2rem, 3.2vw, 2.6rem);
    font-weight: 700;
    letter-spacing: -.02em;
    color: var(--ism-brand-emphasis);
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.landing-stat .label {
    color: var(--bs-secondary-color);
    font-size: .9rem;
    margin-top: .15rem;
}

/* Capability cards ---------------------------------------------------------- */

/* A bento grid, and the spans are arithmetic rather than taste: eleven cards, one
   of them two-by-two and two of them two-wide, make sixteen cells — which fills
   exactly at four columns and at two, with no holes. That is why there is no
   `grid-auto-flow: dense` here: dense would backfill any hole by pulling a later
   card into an earlier one, and this section's own lead says the cards are in the
   order a school does them in. One column below `md`, where every span resets to 1
   and the question does not arise. See CapabilityEmphasis for the counting. */
.capability-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}

/* Width and tint, never height. A two-row feature card was tried first and was wrong:
   no card's copy is long enough to fill that much height, so it sat mostly empty and
   stretched its neighbours to match. */
@media (min-width: 768px) {
    .capability-grid { grid-template-columns: repeat(2, 1fr); }

    .capability-card.is-feature,
    .capability-card.is-wide {
        grid-column: span 2;
    }
}

@media (min-width: 1200px) {
    .capability-grid { grid-template-columns: repeat(4, 1fr); }
}

.capability-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 1.6rem;
    border-radius: 1.1rem;
    border: 1px solid var(--bs-border-color-translucent);
    background: var(--bs-body-bg);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.capability-card:hover {
    transform: translateY(-3px);
    border-color: var(--ism-brand-border);
    box-shadow: 0 18px 38px -20px rgba(var(--ism-brand-rgb), .45);
}

/* The one card that carries the section. Tinted rather than merely bigger, because
   at two-by-two an untinted card reads as a gap with writing in it. */
.capability-card.is-feature {
    padding: 2rem;
    border-color: var(--ism-brand-border);
    background:
        radial-gradient(28rem 18rem at 110% -20%, rgba(var(--ism-brand-rgb), .18), transparent 65%),
        linear-gradient(165deg, var(--ism-brand-subtle), var(--bs-body-bg) 60%);
}

.capability-card.is-feature .capability-icon {
    width: 3.25rem;
    height: 3.25rem;
    font-size: 1.6rem;
    background: var(--ism-brand);
    color: var(--ism-on-brand);
}

.capability-card.is-feature h3 {
    font-size: 1.5rem;
}

.capability-card.is-feature .blurb {
    font-size: 1.02rem;
}

/* The double-width cards run their bullets in two columns rather than one long list
   down half a card's width — which is the point of their being wide. */
@media (min-width: 768px) {
    .capability-card.is-wide .capability-points,
    .capability-card.is-feature .capability-points {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 1.75rem;
    }
}

.capability-icon {
    display: inline-grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: .75rem;
    background: var(--ism-brand-subtle);
    color: var(--ism-brand-emphasis);
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.capability-card h3 {
    font-size: 1.1rem;
    font-weight: 650;
}

.capability-card .blurb {
    color: var(--bs-secondary-color);
    font-size: .95rem;
}

/* Deliberately *not* pushed to the bottom with an `auto` top margin. That was tried,
   to line the lists up across a row, and it left a card with three bullets showing a
   half-card of white space above them. Cards in a row are equal height because the
   grid stretches them; where the copy runs short, the space belongs at the bottom. */
.capability-points {
    list-style: none;
    padding: 0;
    margin: .9rem 0 0;
    display: grid;
    gap: .4rem;
    font-size: .9rem;
}

.capability-points li {
    display: flex;
    gap: .5rem;
    align-items: flex-start;
}

.capability-points li::before {
    content: "\F26E"; /* bi-check2 */
    font-family: "bootstrap-icons";
    color: var(--ism-brand);
    flex-shrink: 0;
    margin-top: .05rem;
}

/* Two branches -------------------------------------------------------------- */

.branch-card {
    height: 100%;
    padding: 2rem;
    border-radius: 1.25rem;
    border: 1px solid var(--ism-brand-border);
    background: linear-gradient(160deg, var(--bs-body-bg), var(--ism-brand-subtle) 160%);
    box-shadow: 0 20px 44px -30px rgba(var(--ism-brand-rgb), .55);
}

.branch-head {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.1rem;
}

.branch-glyph {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    width: 3.25rem;
    height: 3.25rem;
    border-radius: .9rem;
    font-size: 1.5rem;
    background: var(--ism-brand);
    color: var(--ism-on-brand);
}

.branch-code {
    font-size: .75rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--ism-brand-emphasis);
}

.branch-card h3 {
    font-weight: 700;
    font-size: 1.4rem;
}

.branch-points {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: .5rem;
    font-size: .92rem;
}

.branch-points li {
    display: flex;
    gap: .55rem;
    align-items: flex-start;
}

.branch-points li::before {
    content: "\F285"; /* bi-chevron-right */
    font-family: "bootstrap-icons";
    font-size: .8rem;
    color: var(--ism-brand);
    flex-shrink: 0;
    margin-top: .12rem;
}

/* Audience cards ------------------------------------------------------------ */

.audience-card {
    height: 100%;
    padding: 2rem;
    border-radius: 1.25rem;
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color-translucent);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.audience-card:hover {
    transform: translateY(-3px);
    border-color: var(--ism-brand-border);
    box-shadow: 0 18px 38px -20px rgba(var(--ism-brand-rgb), .4);
}

.audience-card .audience-icon {
    display: inline-grid;
    place-items: center;
    width: 3rem;
    height: 3rem;
    border-radius: .85rem;
    font-size: 1.5rem;
    background: var(--ism-brand-subtle);
    color: var(--ism-brand-emphasis);
}

.audience-card h3 {
    font-size: 1.15rem;
    font-weight: 650;
}

.audience-card .lead-line {
    color: var(--bs-secondary-color);
    font-size: .95rem;
}

.audience-card ul {
    padding-left: 1.1rem;
    margin: .75rem 0 0;
    display: grid;
    gap: .3rem;
    font-size: .92rem;
}

/* The developer ------------------------------------------------------------- */

.developer-card,
.contact-card {
    padding: 2rem;
    border-radius: 1.25rem;
    border: 1px solid var(--bs-border-color-translucent);
    background: var(--bs-body-bg);
}

.developer-card {
    border-color: var(--ism-brand-border);
    background:
        radial-gradient(26rem 16rem at 100% 0%, rgba(var(--ism-brand-rgb), .16), transparent 65%),
        var(--bs-body-bg);
}

/* The company's initials set as a mark rather than a logo file: there is no asset to
   ship, and a wordmark drawn in type recolours with the palette like everything else. */
.developer-mark {
    display: inline-grid;
    place-items: center;
    padding: .55rem 1rem;
    border-radius: .85rem;
    background: var(--ism-brand);
    color: var(--ism-on-brand);
    font-weight: 800;
    font-size: 1.4rem;
    letter-spacing: .12em;
}

.developer-card h3,
.contact-card h3 {
    font-weight: 700;
    font-size: 1.4rem;
}

.service-chips {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.service-chip {
    padding: .4rem .75rem;
    border-radius: 2rem;
    font-size: .85rem;
    background: var(--bs-tertiary-bg);
    border: 1px solid var(--bs-border-color-translucent);
    color: var(--bs-body-color);
}

.contact-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: .15rem;
    font-size: .95rem;
}

.contact-list li {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .6rem 0;
}

.contact-list li + li {
    border-top: 1px solid var(--bs-border-color-translucent);
}

.contact-list i {
    color: var(--ism-brand);
    width: 1.1rem;
    text-align: center;
    flex-shrink: 0;
}

.contact-reg {
    margin-top: 1rem;
    font-size: .82rem;
    color: var(--bs-secondary-color);
}

/* Sign-in call to action ---------------------------------------------------- */

.landing-cta {
    position: relative;
    overflow: hidden;
    border-radius: 1.5rem;
    padding: 4rem 2rem;
    text-align: center;
    color: var(--ism-on-brand);
    background: linear-gradient(135deg, var(--ism-brand), var(--ism-brand-active));
    box-shadow: 0 30px 60px -30px rgba(var(--ism-brand-rgb), .7);
}

/* White-on-brand highlights, not a colour: `rgba(255,255,255,…)` over the brand is a
   lightening, which is legible whatever the palette underneath and needs no shade
   derived anywhere. */
.cta-glow {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(32rem 18rem at 82% -10%, rgba(255, 255, 255, .22), transparent 62%),
        radial-gradient(26rem 16rem at 8% 110%, rgba(255, 255, 255, .14), transparent 62%);
}

.landing-cta h2 {
    font-size: clamp(1.8rem, 3.2vw, 2.6rem);
    letter-spacing: -.02em;
}

.landing-cta .school-line {
    max-width: 34rem;
    margin-inline: auto;
}

.landing-cta h2 {
    font-weight: 700;
}

.landing-cta .btn-light {
    font-weight: 600;
}

.landing-cta .school-line {
    opacity: .85;
}

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

.landing-footer {
    padding: 2.5rem 0 3rem;
    border-top: 1px solid var(--bs-border-color-translucent);
    background: var(--bs-tertiary-bg);
    color: var(--bs-secondary-color);
    font-size: .9rem;
}

.footer-rule {
    height: 1px;
    background: var(--bs-border-color-translucent);
    margin: 1.5rem 0 1rem;
}

/* Motion -------------------------------------------------------------------- */

/* Motion is a courtesy, not the design, so the page has to be complete without it.
   `.reveal` is visible by default and is only hidden once the inline head script has
   put `.landing-js` on <html> — so with JavaScript off, or a script that never runs,
   the page renders in full rather than as a column of blank space. The head script is
   what stops it flashing in before being hidden; `landing.js` reveals as sections
   arrive and, failing that, reveals everything. */
.landing-js .reveal {
    opacity: 0;
    transform: translateY(1.25rem);
}

.landing-js .reveal.is-visible {
    opacity: 1;
    transform: none;
    transition: opacity .55s ease, transform .55s cubic-bezier(.22, .61, .36, 1);
}

/* Cards in one grid arrive in sequence rather than all at once, which reads as one
   movement instead of a flicker. Capped low: a long stagger makes a fast scroller
   wait for content that is already on screen. */
.landing-js .capability-grid .reveal:nth-child(2) { transition-delay: .05s; }
.landing-js .capability-grid .reveal:nth-child(3) { transition-delay: .1s; }
.landing-js .capability-grid .reveal:nth-child(4) { transition-delay: .15s; }
.landing-js .capability-grid .reveal:nth-child(n + 5) { transition-delay: .2s; }

@media (prefers-reduced-motion: reduce) {
    .capability-card,
    .audience-card,
    .landing-js .reveal {
        transition: none;
    }

    .capability-card:hover,
    .audience-card:hover {
        transform: none;
    }

    /* Nothing hides, so nothing has to be revealed. */
    .landing-js .reveal {
        opacity: 1;
        transform: none;
    }
}
