/* ==========================================================================
   Emcode Limited — modern stylesheet
   Single dependency-free stylesheet. No Bootstrap, no jQuery plugins.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */

:root {
    /* brand */
    --brand-50:  #eef4ff;
    --brand-100: #dce7ff;
    --brand-200: #bdd0ff;
    --brand-400: #6d8dff;
    --brand-500: #3b5bfd;
    --brand-600: #2542e6;
    --brand-700: #1c33b4;
    --accent-400: #2fd6c3;
    --accent-500: #12b8a6;

    /* surfaces + text (light) */
    --bg:          #ffffff;
    --bg-subtle:   #f6f7fb;
    --bg-sunken:   #eef0f7;
    --surface:     #ffffff;
    --surface-2:   #f9fafd;
    --border:      #e4e7f0;
    --border-strong: #cfd5e6;
    --text:        #0d1220;
    --text-muted:  #545c73;
    --text-faint:  #7b8398;
    --on-brand:    #ffffff;

    --shadow-sm: 0 1px 2px rgba(13, 18, 32, .06), 0 1px 3px rgba(13, 18, 32, .04);
    --shadow-md: 0 4px 12px rgba(13, 18, 32, .07), 0 2px 4px rgba(13, 18, 32, .04);
    --shadow-lg: 0 18px 40px rgba(13, 18, 32, .10), 0 6px 14px rgba(13, 18, 32, .05);
    --shadow-brand: 0 12px 30px rgba(59, 91, 253, .28);

    --radius-sm: 10px;
    --radius:    16px;
    --radius-lg: 24px;
    --radius-pill: 999px;

    --container: 1180px;
    --gutter: clamp(1.25rem, 4vw, 2.5rem);
    --section-y: clamp(4rem, 9vw, 7.5rem);

    --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                 "Helvetica Neue", Arial, sans-serif;

    --ease: cubic-bezier(.22, .68, .32, 1);

    color-scheme: light;
}

html[data-theme="dark"] {
    --bg:          #080b14;
    --bg-subtle:   #0d1120;
    --bg-sunken:   #060911;
    --surface:     #111629;
    --surface-2:   #161c33;
    --border:      #232b45;
    --border-strong: #333c5c;
    --text:        #eef1f8;
    --text-muted:  #a3acc4;
    --text-faint:  #7d87a3;
    --brand-500:   #6d8dff;
    --brand-600:   #5476ff;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .5);
    --shadow-md: 0 4px 14px rgba(0, 0, 0, .45);
    --shadow-lg: 0 20px 45px rgba(0, 0, 0, .55);
    --shadow-brand: 0 12px 30px rgba(59, 91, 253, .35);

    color-scheme: dark;
}

/* --------------------------------------------------------------------------
   2. Reset & base
   -------------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

* { margin: 0; }

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: 88px;
}

body {
    font-family: var(--font-sans);
    font-size: clamp(1rem, .97rem + .16vw, 1.0625rem);
    line-height: 1.65;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; height: auto; }

a { color: var(--brand-600); text-decoration: none; }
a:hover { color: var(--brand-500); }

ul, ol { padding: 0; list-style: none; }

h1, h2, h3, h4 {
    line-height: 1.15;
    letter-spacing: -.022em;
    font-weight: 700;
    color: var(--text);
    text-wrap: balance;
}

h1 { font-size: clamp(2.35rem, 1.55rem + 3.6vw, 4.15rem); letter-spacing: -.035em; }
h2 { font-size: clamp(1.85rem, 1.35rem + 2.1vw, 2.9rem); letter-spacing: -.03em; }
h3 { font-size: clamp(1.15rem, 1.05rem + .45vw, 1.4rem); }

p { text-wrap: pretty; }

:focus-visible {
    outline: 2px solid var(--brand-500);
    outline-offset: 3px;
    border-radius: 4px;
}

::selection { background: var(--brand-500); color: #fff; }

.skip-link {
    position: absolute;
    left: 1rem;
    top: -4rem;
    z-index: 200;
    padding: .7rem 1.1rem;
    background: var(--brand-600);
    color: #fff;
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: top .2s var(--ease);
}
.skip-link:focus { top: 1rem; color: #fff; }

/* --------------------------------------------------------------------------
   3. Layout primitives
   -------------------------------------------------------------------------- */

.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.section { padding-block: var(--section-y); position: relative; }
.section--tint { background: var(--bg-subtle); }

.section-head {
    max-width: 44rem;
    margin-bottom: clamp(2.5rem, 5vw, 3.75rem);
}
.section-head--center { margin-inline: auto; text-align: center; }

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-size: .78rem;
    font-weight: 650;
    letter-spacing: .13em;
    text-transform: uppercase;
    color: var(--brand-600);
    margin-bottom: .9rem;
}
.eyebrow::before {
    content: "";
    width: 1.6rem;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--brand-500), var(--accent-400));
}
.section-head--center .eyebrow::before { display: none; }

.section-head p {
    margin-top: 1rem;
    color: var(--text-muted);
    font-size: 1.075rem;
}

.grid { display: grid; gap: clamp(1.1rem, 2.2vw, 1.75rem); }
/* grid/flex children default to min-width:auto, which lets long words push
   the whole layout wider than the viewport — opt every child out of that. */
.grid > *, .split > *, .hero-grid > *, .footer-grid > *,
.academy-panel > *, .contact-card > * { min-width: 0; }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 17.5rem), 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); }

/* --------------------------------------------------------------------------
   4. Buttons & chips
   -------------------------------------------------------------------------- */

.btn {
    --btn-bg: var(--brand-600);
    --btn-fg: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    padding: .85rem 1.6rem;
    border: 1px solid transparent;
    border-radius: var(--radius-pill);
    background: var(--btn-bg);
    color: var(--btn-fg);
    font: inherit;
    font-weight: 600;
    font-size: .975rem;
    line-height: 1.2;
    cursor: pointer;
    white-space: nowrap;
    transition: transform .18s var(--ease), box-shadow .18s var(--ease),
                background .18s var(--ease), border-color .18s var(--ease);
}
.btn:hover { transform: translateY(-2px); color: var(--btn-fg); }

.btn--primary { box-shadow: var(--shadow-brand); }
.btn--primary:hover { background: var(--brand-500); }

.btn--ghost {
    --btn-bg: transparent;
    --btn-fg: var(--text);
    border-color: var(--border-strong);
}
.btn--ghost:hover { border-color: var(--brand-500); color: var(--brand-600); }

.btn--sm { padding: .6rem 1.15rem; font-size: .9rem; }

.btn svg { width: 1.05em; height: 1.05em; flex: none; }

.chip {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .4rem .95rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    font-size: .82rem;
    font-weight: 600;
    color: var(--text-muted);
}
.chip .dot {
    width: .5rem; height: .5rem;
    border-radius: 50%;
    background: var(--accent-500);
    box-shadow: 0 0 0 3px rgba(18, 184, 166, .18);
}

/* --------------------------------------------------------------------------
   5. Header / navigation
   -------------------------------------------------------------------------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid transparent;
    transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.site-header.is-stuck {
    border-bottom-color: var(--border);
    box-shadow: var(--shadow-sm);
}

.nav {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    min-height: 72px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: .7rem;
    margin-right: auto;
    color: var(--text);
    font-weight: 750;
    letter-spacing: -.02em;
}
.brand:hover { color: var(--text); }
.brand img { width: 38px; height: auto; }
.brand .brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand .brand-text small {
    font-size: .62rem;
    font-weight: 600;
    letter-spacing: .12em;
    color: var(--text-faint);
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: .35rem;
}
.nav-links a {
    padding: .5rem .85rem;
    border-radius: var(--radius-pill);
    color: var(--text-muted);
    font-size: .945rem;
    font-weight: 550;
    transition: color .18s var(--ease), background .18s var(--ease);
}
.nav-links a:hover,
.nav-links a.is-active { color: var(--text); background: var(--bg-sunken); }

.nav-actions { display: flex; align-items: center; gap: .6rem; }

.icon-btn {
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--surface);
    color: var(--text-muted);
    cursor: pointer;
    transition: color .18s var(--ease), border-color .18s var(--ease),
                transform .18s var(--ease);
}
.icon-btn:hover { color: var(--brand-600); border-color: var(--brand-400); }
.icon-btn:active { transform: scale(.94); }
.icon-btn svg { width: 19px; height: 19px; }

.theme-toggle .moon { display: none; }
html[data-theme="dark"] .theme-toggle .moon { display: block; }
html[data-theme="dark"] .theme-toggle .sun { display: none; }

.nav-toggle { display: none; }

@media (max-width: 900px) {
    .nav-toggle { display: inline-grid; }

    .nav-links {
        position: fixed;
        inset: 72px 0 auto;
        flex-direction: column;
        align-items: stretch;
        gap: .15rem;
        padding: 1rem var(--gutter) 1.75rem;
        background: var(--bg);
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-lg);
        transform: translateY(-12px);
        opacity: 0;
        visibility: hidden;
        transition: opacity .22s var(--ease), transform .22s var(--ease),
                    visibility .22s;
    }
    .nav-links.is-open { opacity: 1; visibility: visible; transform: none; }
    .nav-links a { padding: .85rem 1rem; font-size: 1.05rem; }

    .nav-actions .btn { display: none; }
}

/* --------------------------------------------------------------------------
   6. Hero
   -------------------------------------------------------------------------- */

.hero {
    position: relative;
    padding-block: clamp(3.5rem, 7vw, 6.5rem) clamp(4rem, 8vw, 7rem);
    overflow: hidden;
}

.hero::before,
.hero::after {
    content: "";
    position: absolute;
    z-index: -1;
    border-radius: 50%;
    filter: blur(90px);
    opacity: .55;
    pointer-events: none;
}
.hero::before {
    width: 46rem; height: 46rem;
    top: -22rem; right: -14rem;
    background: radial-gradient(circle, var(--brand-400), transparent 68%);
}
.hero::after {
    width: 34rem; height: 34rem;
    bottom: -20rem; left: -12rem;
    background: radial-gradient(circle, var(--accent-400), transparent 68%);
    opacity: .35;
}
html[data-theme="dark"] .hero::before { opacity: .30; }
html[data-theme="dark"] .hero::after { opacity: .20; }

.hero-grid {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: clamp(2rem, 5vw, 4rem);
    align-items: center;
}
@media (max-width: 900px) {
    .hero-grid { grid-template-columns: 1fr; }
}

.hero h1 { margin-block: 1.1rem .1rem; }
.hero h1 .gradient {
    background: linear-gradient(100deg, var(--brand-500) 10%, var(--accent-500) 90%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-lede {
    margin-top: 1.35rem;
    max-width: 34rem;
    font-size: clamp(1.05rem, 1rem + .35vw, 1.24rem);
    color: var(--text-muted);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .8rem;
    margin-top: 2.1rem;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem clamp(1.25rem, 3vw, 2.5rem);
    margin-top: 2.75rem;
    padding-top: 1.9rem;
    border-top: 1px solid var(--border);
}
.hero-meta > div { min-width: 0; }
.hero-meta div strong {
    display: block;
    font-size: clamp(1.5rem, 1.3rem + .7vw, 1.95rem);
    font-weight: 750;
    letter-spacing: -.03em;
    line-height: 1.15;
}
.hero-meta div.stat--text strong {
    font-size: clamp(1rem, .95rem + .25vw, 1.15rem);
    line-height: 1.35;
}
.hero-meta div span {
    display: block;
    font-size: .84rem;
    color: var(--text-muted);
}

.hero-visual { position: relative; }
.hero-visual img {
    width: 100%;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
}

.hero-badge {
    position: absolute;
    left: -1rem;
    bottom: -1.25rem;
    display: flex;
    align-items: center;
    gap: .8rem;
    padding: .9rem 1.15rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}
.hero-badge .icon {
    display: grid;
    place-items: center;
    width: 2.4rem; height: 2.4rem;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--brand-500), var(--accent-500));
    color: #fff;
}
.hero-badge .icon svg { width: 1.2rem; height: 1.2rem; }
.hero-badge strong { display: block; font-size: .93rem; line-height: 1.3; }
.hero-badge span { font-size: .78rem; color: var(--text-muted); }
@media (max-width: 560px) { .hero-badge { display: none; } }

/* --------------------------------------------------------------------------
   7. Cards
   -------------------------------------------------------------------------- */

.card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: clamp(1.5rem, 3vw, 2rem);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: transform .25s var(--ease), box-shadow .25s var(--ease),
                border-color .25s var(--ease);
}
.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-strong);
}
.card h3 { margin-bottom: .55rem; }
.card p { color: var(--text-muted); font-size: .97rem; }

.card-icon {
    display: grid;
    place-items: center;
    width: 3.1rem; height: 3.1rem;
    margin-bottom: 1.25rem;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
    color: #fff;
    box-shadow: var(--shadow-brand);
}
.card-icon svg { width: 1.5rem; height: 1.5rem; }
.card:nth-child(2n) .card-icon {
    background: linear-gradient(135deg, var(--accent-500), #0e8f89);
    box-shadow: 0 12px 26px rgba(18, 184, 166, .26);
}
.card:nth-child(3n) .card-icon {
    background: linear-gradient(135deg, #7b5cff, #4b2fd0);
    box-shadow: 0 12px 26px rgba(123, 92, 255, .26);
}

.card-link {
    margin-top: 1.25rem;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-weight: 600;
    font-size: .93rem;
}
.card-link svg { width: 1em; height: 1em; transition: transform .2s var(--ease); }
.card:hover .card-link svg { transform: translateX(3px); }

/* stretched link makes the whole card clickable */
.card--link .card-link::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
}

/* --------------------------------------------------------------------------
   8. Split content (about / why us)
   -------------------------------------------------------------------------- */

.split {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr));
    gap: clamp(2rem, 5vw, 4rem);
    align-items: center;
}
.split__media img {
    width: 100%;
    border-radius: var(--radius-lg);
}

.check-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
    gap: .7rem 1.5rem;
    margin-top: 1.75rem;
}
.check-list li {
    display: flex;
    align-items: flex-start;
    gap: .65rem;
    font-size: .97rem;
    font-weight: 550;
}
.check-list li svg {
    flex: none;
    width: 1.15rem; height: 1.15rem;
    margin-top: .2rem;
    color: var(--accent-500);
}

/* --------------------------------------------------------------------------
   9. DigiMart Pro showcase
   -------------------------------------------------------------------------- */

.saas {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(80rem 40rem at 50% -20%, rgba(59, 91, 253, .16), transparent 60%),
        var(--bg-sunken);
    border-block: 1px solid var(--border);
}

.saas-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    margin-top: clamp(2rem, 4vw, 3rem);
    padding: clamp(1.5rem, 3vw, 2.25rem);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-md);
}
.saas-banner p { color: var(--text-muted); margin-top: .35rem; max-width: 42rem; }

.product-tag {
    display: inline-block;
    align-self: flex-start;
    margin-bottom: .9rem;
    padding: .25rem .7rem;
    border-radius: var(--radius-pill);
    background: var(--brand-50);
    color: var(--brand-700);
    font-size: .72rem;
    font-weight: 650;
    letter-spacing: .07em;
    text-transform: uppercase;
}
html[data-theme="dark"] .product-tag {
    background: rgba(109, 141, 255, .14);
    color: var(--brand-400);
}

/* --------------------------------------------------------------------------
   10. Academy
   -------------------------------------------------------------------------- */

.academy-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 21rem), 1fr));
    gap: clamp(2rem, 4vw, 3.5rem);
    padding: clamp(1.75rem, 4vw, 3rem);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-md);
}

.skill-list { display: grid; gap: .9rem; margin-top: 1.5rem; }
.skill-list li {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: .85rem;
    align-items: start;
    padding-bottom: .9rem;
    border-bottom: 1px solid var(--border);
}
.skill-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.skill-list .k {
    display: inline-grid;
    place-items: center;
    width: 1.9rem; height: 1.9rem;
    border-radius: 8px;
    background: var(--bg-sunken);
    color: var(--brand-600);
    font-size: .78rem;
    font-weight: 700;
}
.skill-list strong { display: block; font-size: .97rem; }
.skill-list span { font-size: .9rem; color: var(--text-muted); }

/* --------------------------------------------------------------------------
   11. Contact
   -------------------------------------------------------------------------- */

.contact-card {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
    gap: clamp(1.75rem, 4vw, 3.5rem);
    padding: clamp(1.75rem, 4vw, 3.25rem);
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--brand-700), var(--brand-600) 45%, #1a8f88);
    color: #fff;
    box-shadow: var(--shadow-lg);
}
.contact-card h2, .contact-card h3 { color: #fff; }
.contact-card .eyebrow { color: rgba(255, 255, 255, .82); }
.contact-card .eyebrow::before { background: rgba(255, 255, 255, .6); }
.contact-card > div > p { color: rgba(255, 255, 255, .84); margin-top: 1rem; }

.contact-list { display: grid; gap: 1.15rem; }
.contact-list li {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: .95rem;
    align-items: start;
}
.contact-list .icon {
    display: grid;
    place-items: center;
    width: 2.5rem; height: 2.5rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .2);
    color: #fff;
}
.contact-list .icon svg { width: 1.15rem; height: 1.15rem; }
.contact-list .label {
    display: block;
    font-size: .74rem;
    font-weight: 650;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .68);
}
.contact-list a, .contact-list address {
    color: #fff;
    font-style: normal;
    font-weight: 600;
    font-size: 1rem;
}
.contact-list a:hover { color: #fff; text-decoration: underline; }

/* --------------------------------------------------------------------------
   11b. Page hero + long-form prose (terms / privacy)
   -------------------------------------------------------------------------- */

.page-hero {
    position: relative;
    padding-block: clamp(3rem, 6vw, 5rem);
    background:
        radial-gradient(60rem 30rem at 20% -30%, rgba(59, 91, 253, .18), transparent 62%),
        var(--bg-subtle);
    border-bottom: 1px solid var(--border);
}
.page-hero p { margin-top: 1rem; color: var(--text-muted); max-width: 42rem; }

.breadcrumb {
    display: flex;
    gap: .5rem;
    margin-bottom: 1rem;
    font-size: .88rem;
    color: var(--text-faint);
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--brand-600); }

.prose {
    max-width: 46rem;
    margin-inline: auto;
}
.prose > * + * { margin-top: 1.1rem; }
.prose h2 {
    margin-top: 2.75rem;
    font-size: clamp(1.3rem, 1.15rem + .6vw, 1.65rem);
    scroll-margin-top: 92px;
}
.prose h3 { margin-top: 2rem; }
.prose p, .prose li { color: var(--text-muted); }
.prose a { text-decoration: underline; text-underline-offset: .18em; word-break: break-word; }

.prose .callout {
    padding: 1.35rem 1.5rem;
    border: 1px solid var(--border);
    border-left: 3px solid var(--brand-500);
    border-radius: var(--radius);
    background: var(--surface-2);
}
.prose .callout address {
    font-style: normal;
    color: var(--text);
    font-weight: 550;
    line-height: 1.7;
}
.prose .callout .label {
    display: block;
    margin-bottom: .45rem;
    font-size: .74rem;
    font-weight: 650;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--text-faint);
}

.prose .updated {
    font-size: .88rem;
    color: var(--text-faint);
}

/* --------------------------------------------------------------------------
   12. Footer
   -------------------------------------------------------------------------- */

.site-footer {
    padding-top: clamp(3.5rem, 7vw, 5rem);
    background: var(--bg-subtle);
    border-top: 1px solid var(--border);
}
html[data-theme="dark"] .site-footer { background: var(--bg-sunken); }

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr repeat(3, 1fr);
    gap: clamp(2rem, 4vw, 3rem);
}
@media (max-width: 860px) {
    .footer-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); }
}

.footer-grid h4 {
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--text-faint);
    margin-bottom: 1.1rem;
}
.footer-grid ul { display: grid; gap: .65rem; }
.footer-grid ul a, .footer-grid ul li {
    color: var(--text-muted);
    font-size: .95rem;
}
.footer-grid ul a:hover { color: var(--brand-600); }
.footer-about p {
    margin-top: 1rem;
    max-width: 24rem;
    color: var(--text-muted);
    font-size: .95rem;
}
.footer-about address {
    margin-top: 1.1rem;
    font-style: normal;
    font-size: .92rem;
    color: var(--text-muted);
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: clamp(2.5rem, 5vw, 3.5rem);
    padding-block: 1.5rem;
    border-top: 1px solid var(--border);
    font-size: .88rem;
    color: var(--text-muted);
}
.footer-bottom ul { display: flex; flex-wrap: wrap; gap: 1.35rem; }
.footer-bottom a { color: var(--text-muted); }
.footer-bottom a:hover { color: var(--brand-600); }

.to-top {
    position: fixed;
    right: clamp(1rem, 3vw, 2rem);
    bottom: clamp(1rem, 3vw, 2rem);
    z-index: 90;
    background: var(--brand-600);
    color: #fff;
    border-color: transparent;
    box-shadow: var(--shadow-brand);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity .25s var(--ease), transform .25s var(--ease), visibility .25s;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { color: #fff; border-color: transparent; }

/* --------------------------------------------------------------------------
   13. Reveal-on-scroll
   -------------------------------------------------------------------------- */

.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
    .reveal { opacity: 1; transform: none; }
}
