/* ── The shared public-site footer (templates/includes/site_footer.html) ──────────────────────────
   Figma "Trellis — Website / Interactive Prototype", footer symbol 14:1540: a light band, INK text,
   a brand column and four link columns. Self-contained like site-header.css: its own tokens, fonts
   and zero-specificity resets, so no page stylesheet (trellis.css's `footer` rule, landing.css's
   `.lp-footer`) can reach in. Bump `site-footer.css?v=` in site_footer_head.html on every change. */

.site-footer {
    --sf-ink: #092f36;
    --sf-muted: #5c7176;
    --sf-line: #dce7e9;
    --sf-cyan: #11b6e2;
    --sf-cyan-ink: #007d99; /* cyan text on the light band: #11b6e2 is 2.4:1, this is 4.9:1 */
    --sf-lime: #cfff04;
    --sf-bg: #fbfdfd;
    --sf-font: 'Poppins', 'Poppins Fallback', 'Poppins Fallback Android', sans-serif;

    display: block;
    /* trellis.css (legal pages, book-a-demo) styles the bare `footer` element: padding, margin,
       z-index. A class beats an element selector, so reset them here, not in the :where() resets. */
    position: static;
    z-index: auto;
    margin: 0;
    padding: 0;
    background: var(--sf-bg);
    border-block-start: 1px solid var(--sf-line);
    color: var(--sf-ink);
    font-family: var(--sf-font);
    font-size: 14px;
    line-height: 1.6;
    text-align: start;
    -webkit-font-smoothing: antialiased;
}

:where(.site-footer, .site-footer *) {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:where(.site-footer) ul {
    list-style: none;
}

:where(.site-footer) a {
    color: inherit;
    text-decoration: none;
}

:where(.site-footer) img {
    display: block;
    max-width: 100%;
    height: auto;
}

.site-footer__inner {
    display: grid;
    grid-template-columns: minmax(260px, 340px) 1fr;
    gap: 56px;
    max-inline-size: 1280px;
    margin-inline: auto;
    padding: 56px 64px 40px;
}

.site-footer__logo {
    display: inline-flex;
    min-block-size: 44px;
    align-items: center;
}

.site-footer__logo img {
    block-size: 32px;
    inline-size: auto;
    aspect-ratio: 1024 / 290;
}

.site-footer__tagline {
    margin-block: 12px 24px;
    max-inline-size: 30ch;
    color: var(--sf-muted);
    font-size: 13px;
}

/* BIR requires the seal to stay scannable: its QR decodes down to ~260 px, never narrower
   (docs/notes/frappe-website-pages.md, "BIR Registration Seal"). */
.site-footer__bir-seal img {
    inline-size: 100%;
    min-inline-size: 260px;
    max-inline-size: 340px;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(9, 47, 54, 0.12);
}

.site-footer__demo {
    margin-block: 28px 24px;
}

.site-footer__demo-label,
.site-footer__apps-label {
    display: block;
    margin-block-end: 8px;
    font-size: 13px;
    font-weight: 600;
}

.site-footer__demo-row {
    display: flex;
    flex-direction: column; /* the brand column is too narrow for an input and a button side by side */
    gap: 8px;
}

.site-footer__demo-row input {
    flex: 1;
    min-inline-size: 0;
    min-block-size: 44px;
    padding: 0 14px;
    border: 1px solid var(--sf-line);
    border-radius: 8px;
    background: #fff;
    color: var(--sf-ink);
    font: 400 16px/1.2 var(--sf-font); /* 16px: no iOS zoom on focus */
}

.site-footer__demo-row input:focus-visible {
    outline: 2px solid var(--sf-cyan);
    outline-offset: 1px;
}

.site-footer__demo-row button {
    min-block-size: 44px;
    padding: 0 16px;
    border: 0;
    border-radius: 8px;
    background: var(--sf-lime);
    color: var(--sf-ink);
    font: 600 14px/1 var(--sf-font);
    white-space: nowrap;
    cursor: pointer;
}

.site-footer__demo-row button:hover {
    filter: brightness(0.96);
}

.site-footer__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.site-footer__badges a {
    display: inline-flex;
}

.site-footer__badges img {
    block-size: 40px;
    inline-size: auto;
}

.site-footer__columns {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 32px;
}

.site-footer__heading {
    margin-block-end: 12px;
    color: var(--sf-cyan-ink);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
}

.site-footer__column ul {
    display: grid;
}

/* Each link is a 44px-tall target on touch screens; the rows sit tighter on a mouse. */
.site-footer__column a {
    display: inline-flex;
    align-items: center;
    min-block-size: 44px;
    color: var(--sf-muted);
    font-size: 13px;
    line-height: 1.35;
}

@media (hover: hover) and (pointer: fine) and (min-width: 768px) {
    .site-footer__column a {
        min-block-size: 32px;
    }
}

.site-footer__column a:hover {
    color: var(--sf-ink);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.site-footer a:focus-visible,
.site-footer button:focus-visible {
    outline: 2px solid var(--sf-cyan);
    outline-offset: 2px;
    border-radius: 4px;
}

.site-footer__bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 24px;
    max-inline-size: 1280px;
    margin-inline: auto;
    padding: 20px 64px 28px;
    border-block-start: 1px solid var(--sf-line);
    color: var(--sf-muted);
    font-size: 12px;
}

.site-footer__country::after {
    content: "";
    display: inline-block;
    inline-size: 7px;
    block-size: 7px;
    margin-inline-start: 8px;
    border-radius: 50%;
    background: #2e8b57;
    vertical-align: middle;
}

/* Tablet: the brand column goes on top, the four link columns share one row. */
@media (max-width: 1024px) {
    .site-footer__inner {
        grid-template-columns: 1fr;
        gap: 40px;
        padding-inline: 40px;
    }

    .site-footer__bar {
        padding-inline: 40px;
    }
}

/* Phone: two link columns per row. */
@media (max-width: 767px) {
    .site-footer__inner {
        padding: 40px 24px 32px;
    }

    .site-footer__columns {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 24px 16px;
    }

    .site-footer__bar {
        flex-direction: column;
        padding-inline: 24px;
    }
}

@media (forced-colors: active) {
    .site-footer__country::after {
        background: CanvasText;
    }
}
