/* =====================================================================
   MoJamoza Builds — Public Storefront Styles

   Design intent: buyers here are school admins, hospital managers,
   SACCO officers, shop owners — evaluating institutional software
   purchases, not browsing a consumer app store. The palette and type
   aim for "serious technical vendor you can trust with your school's
   data" rather than generic flashy SaaS-template energy. Mobile-first:
   most evaluation browsing for this audience happens on a phone.
   ===================================================================== */

:root {
    --ink: #0B1220;
    --ink-soft: #1C2638;
    --paper: #FAFAF8;
    --paper-raised: #FFFFFF;
    --line: #E4E1D8;
    --text: #1A1D24;
    --text-muted: #5B5F6B;
    --accent: #D97706;
    --accent-deep: #92400E;
    --accent-soft: #FEF3E2;
    --success: #166534;
    --success-soft: #ECFDF3;
    --radius-sm: 8px;
    --radius: 14px;
    --radius-lg: 20px;
    --shadow: 0 8px 24px rgba(11,18,32,0.08);
    --max-width: 1180px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--paper);
    color: var(--text);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

img { max-width: 100%; display: block; }

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 18px;
}

/* ---------------------------------------------------------------------
   Site header
   --------------------------------------------------------------------- */
.site-header {
    background: var(--ink);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 30;
}
.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}
.site-header__brand {
    font-weight: 700;
    font-size: 17px;
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    gap: 8px;
}
.site-header__brand-mark {
    width: 26px; height: 26px;
    background: var(--accent);
    border-radius: 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 14px;
    color: var(--ink);
}
.site-header__nav { display: none; }
@media (min-width: 720px) {
    .site-header__nav {
        display: flex;
        gap: 22px;
        font-size: 14.5px;
        color: rgba(255,255,255,0.78);
    }
    .site-header__nav a:hover { color: #fff; }
}

/* ---------------------------------------------------------------------
   Hero — the thesis: this is a catalog of REAL, DEPLOYABLE systems for
   specific industries, not a generic "AI-powered platform" pitch.
   --------------------------------------------------------------------- */
.hero {
    background-color: var(--ink);
    color: #fff;
    padding: 40px 0 56px;
    background-size: cover;
    background-position: center;
}
.hero--with-image {
    /* The image itself is set inline via style="background-image: ...".
       background-blend-mode mixes it with the background-color above
       (multiply darkens), so any uploaded image gets a consistent dark
       tint without needing a separate overlay element or extra markup —
       and since this rule only applies when an image is actually set,
       a plain hero with no image is completely unaffected. */
    background-blend-mode: multiply;
}
.hero h1 {
    font-size: 28px;
    line-height: 1.2;
    letter-spacing: -0.015em;
    margin: 0 0 12px;
    max-width: 18ch;
}
.hero p {
    color: rgba(255,255,255,0.7);
    font-size: 15.5px;
    max-width: 46ch;
    margin: 0 0 24px;
}
@media (min-width: 720px) {
    .hero h1 { font-size: 38px; }
    .hero p { font-size: 17px; }
}

.search-bar {
    display: flex;
    background: #fff;
    border-radius: 100px;
    padding: 4px 4px 4px 18px;
    align-items: center;
    gap: 8px;
    max-width: 560px;
    box-shadow: var(--shadow);
}
.search-bar input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 15px;
    padding: 12px 0;
    font-family: inherit;
    min-width: 0;
}
.search-bar button {
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 100px;
    padding: 11px 20px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
}

/* ---------------------------------------------------------------------
   Category strip — the real navigational structure of this catalog,
   since buyers think "I need a hospital system", not "browse all".
   --------------------------------------------------------------------- */
.category-strip {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 18px 0 6px;
    scrollbar-width: none;
    margin: 0 -18px;
    padding-left: 18px;
    padding-right: 18px;
}
.category-strip::-webkit-scrollbar { display: none; }
.category-chip {
    flex-shrink: 0;
    background: var(--paper-raised);
    border: 1px solid var(--line);
    border-radius: 100px;
    padding: 9px 16px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
}
.category-chip.is-active {
    background: var(--ink);
    color: #fff;
    border-color: var(--ink);
}

/* ---------------------------------------------------------------------
   Layout: filters + grid
   --------------------------------------------------------------------- */
.catalog-layout {
    padding: 28px 0 60px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}
@media (min-width: 900px) {
    .catalog-layout { flex-direction: row; align-items: flex-start; }
    .catalog-sidebar { width: 240px; flex-shrink: 0; position: sticky; top: 80px; }
    .catalog-main { flex: 1; min-width: 0; }
}

.filter-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--paper-raised);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
@media (min-width: 900px) { .filter-toggle-btn { display: none; } }

.filter-panel {
    display: none;
    background: var(--paper-raised);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px;
}
.filter-panel.is-open { display: block; }
@media (min-width: 900px) {
    .filter-panel { display: block; }
}

.filter-group { margin-bottom: 18px; }
.filter-group:last-child { margin-bottom: 0; }
.filter-group__title {
    font-size: 12.5px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 10px;
    font-weight: 700;
}
.filter-option {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    padding: 6px 0;
    cursor: pointer;
}
.filter-option input { accent-color: var(--accent); }

.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}
.toolbar__count { font-size: 14px; color: var(--text-muted); }
.toolbar select {
    border: 1px solid var(--line);
    background: var(--paper-raised);
    border-radius: var(--radius-sm);
    padding: 9px 12px;
    font-size: 13.5px;
    font-family: inherit;
}

.system-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}
@media (min-width: 560px) {
    .system-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1100px) {
    .system-grid { grid-template-columns: repeat(3, 1fr); }
}

.system-card {
    background: var(--paper-raised);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.system-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }

.system-card__image {
    aspect-ratio: 16/10;
    background: linear-gradient(135deg, var(--ink), var(--ink-soft));
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.3);
    font-size: 13px;
    overflow: hidden;
}
.system-card__image img { width: 100%; height: 100%; object-fit: cover; }

.system-card__body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.system-card__category {
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--accent-deep);
    font-weight: 700;
    margin-bottom: 6px;
}
.system-card__name {
    font-size: 16.5px;
    font-weight: 700;
    margin: 0 0 6px;
    letter-spacing: -0.01em;
}
.system-card__tagline {
    font-size: 13.5px;
    color: var(--text-muted);
    margin: 0 0 14px;
    flex: 1;
}
.system-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--line);
    padding-top: 12px;
    margin-top: auto;
}
.system-card__price {
    font-size: 13px;
    color: var(--text-muted);
}
.system-card__price strong {
    font-size: 16px;
    color: var(--text);
    font-weight: 700;
}
.system-card__demo-badge {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--success);
    background: var(--success-soft);
    padding: 3px 8px;
    border-radius: 100px;
}

.empty-catalog {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}
.empty-catalog h3 { color: var(--text); margin-bottom: 8px; }

/* ---------------------------------------------------------------------
   System detail page
   --------------------------------------------------------------------- */
.breadcrumb {
    font-size: 13px;
    color: var(--text-muted);
    padding: 16px 0;
}
.breadcrumb a:hover { text-decoration: underline; }

.detail-header {
    margin-bottom: 24px;
}
.detail-header__category {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent-deep);
    font-weight: 700;
    margin-bottom: 8px;
}
.detail-header h1 {
    font-size: 26px;
    letter-spacing: -0.015em;
    margin: 0 0 8px;
}
@media (min-width: 720px) { .detail-header h1 { font-size: 32px; } }
.detail-header__tagline {
    font-size: 16px;
    color: var(--text-muted);
    margin: 0;
}

.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.tag-pill {
    background: var(--paper-raised);
    border: 1px solid var(--line);
    border-radius: 100px;
    padding: 6px 13px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-muted);
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.tag-pill:is(a):hover, a.tag-pill:hover {
    background: var(--accent-soft);
    border-color: var(--accent);
    color: var(--accent-deep);
}

.detail-layout {
    display: flex;
    flex-direction: column;
    gap: 28px;
    padding-bottom: 60px;
}
@media (min-width: 960px) {
    .detail-layout { flex-direction: row; }
    .detail-main { flex: 1; min-width: 0; }
    .detail-sidebar { width: 320px; flex-shrink: 0; }
}

.gallery {
    margin-bottom: 28px;
}
.gallery__featured {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    display: block;
    margin-bottom: 8px;
}
.gallery__thumbs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 6px;
}
.gallery__thumb {
    width: 100%;
    aspect-ratio: 16/10;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    cursor: pointer;
    opacity: 0.8;
    transition: opacity .15s;
}
.gallery__thumb:hover { opacity: 1; }

.prose { font-size: 15.5px; }
.prose h2, .prose h3 { letter-spacing: -0.01em; }
.prose img { border-radius: var(--radius-sm); }

.feature-list { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 10px; }
.feature-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 15px;
}
.feature-list li::before {
    content: "✓";
    color: var(--success);
    font-weight: 700;
    flex-shrink: 0;
}

.sticky-card {
    background: var(--paper-raised);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px;
    position: sticky;
    top: 80px;
}
.sticky-card h3 { margin-top: 0; font-size: 15px; }

.demo-block {
    background: var(--success-soft);
    border-radius: var(--radius-sm);
    padding: 14px;
    margin-bottom: 16px;
}
.demo-block__label { font-size: 12px; font-weight: 700; color: var(--success); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 6px; }
.demo-block__credentials { font-size: 13px; color: var(--text-muted); font-family: ui-monospace, monospace; margin-top: 6px; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 20px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 14.5px;
    border: 1px solid transparent;
    cursor: pointer;
    width: 100%;
}
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-deep); }
.btn-outline { background: transparent; border-color: var(--line); color: var(--text); }
.btn-outline:hover { background: var(--paper); }

.pricing-note {
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
    padding: 16px;
    background: var(--paper);
    border-radius: var(--radius-sm);
}

.inquiry-link { text-align: center; margin-top: 12px; font-size: 13.5px; }

/* ---------------------------------------------------------------------
   FAQ accordion — uses native <details>/<summary>, no JS needed for
   expand/collapse.
   --------------------------------------------------------------------- */
.faq-list { display: flex; flex-direction: column; gap: 10px; }
.faq-item {
    background: var(--paper-raised);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 4px 18px;
}
.faq-item summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    padding: 14px 0;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.faq-item summary::after {
    content: '+';
    font-size: 20px;
    font-weight: 400;
    color: var(--text-muted);
    margin-left: 12px;
    flex-shrink: 0;
}
.faq-item[open] summary::after { content: '−'; }
.faq-item__answer { padding: 0 0 16px; font-size: 14.5px; color: var(--text-muted); line-height: 1.6; }
.faq-item__answer p { margin: 0; }

/* ---------------------------------------------------------------------
   Footer
   --------------------------------------------------------------------- */
.site-footer {
    background: var(--ink);
    color: rgba(255,255,255,0.6);
    padding: 36px 0 28px;
    font-size: 13px;
    margin-top: 40px;
}
.site-footer a:hover { color: #fff; }

.site-footer__columns {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}
@media (min-width: 640px) {
    .site-footer__columns { grid-template-columns: 1.4fr 1fr 1fr; }
}

.site-footer__social {
    display: flex;
    gap: 14px;
    margin-top: 24px;
}
.site-footer__social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.75);
}
.site-footer__social a:hover {
    background: rgba(255,255,255,0.16);
    color: #fff;
}

/* ---------------------------------------------------------------------
   Mobile navigation drawer — the storefront header's nav links are
   hidden below 720px (see .site-header__nav above), so this hamburger
   + slide-down menu is the only way to reach Catalog/About/Contact/Cart
   on a phone, which is most of this site's actual traffic.
   --------------------------------------------------------------------- */
.site-header__menu-btn {
    background: none;
    border: none;
    color: #fff;
    padding: 6px;
    margin-right: 8px;
    cursor: pointer;
    display: flex;
}
@media (min-width: 720px) {
    .site-header__menu-btn { display: none; }
}

.mobile-nav {
    display: none;
    flex-direction: column;
    background: var(--ink-soft);
    border-top: 1px solid rgba(255,255,255,0.08);
}
.mobile-nav.is-open { display: flex; }
.mobile-nav a {
    color: rgba(255,255,255,0.85);
    padding: 13px 18px;
    font-size: 14.5px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.mobile-nav a:hover { background: rgba(255,255,255,0.06); color: #fff; }
@media (min-width: 720px) {
    .mobile-nav { display: none !important; }
}

.mobile-nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 25;
    display: none;
}
.mobile-nav-overlay.is-open { display: block; }
@media (min-width: 720px) {
    .mobile-nav-overlay { display: none !important; }
}

/* ---------------------------------------------------------------------
   Floating WhatsApp button
   --------------------------------------------------------------------- */
.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(0,0,0,0.25);
    z-index: 30;
}
.whatsapp-float:hover { background: #1EBE57; }
