/* =========================================================
   FTL Footer (v2 — refined brand design)
   Fontes Letras — violet / pink, matches the header
   ---------------------------------------------------------
   1. Footer layout
   2. Back to top button
   3. Share button
   4. Responsive
   5. Dark theme
   6. Reduced motion
   Same class names, same HTML, same JS hooks.
   ========================================================= */


/* =========================================================
   1. FOOTER
   ========================================================= */

.ftl-basebar {
    --ftl-ft-a: #5B4BDB;
    --ftl-ft-b: #8B7CF6;
    --ftl-ft-c: #f59e0b;
    --ftl-ft-tint: rgba(91, 75, 219, 0.08);
    --ftl-ft-tint-strong: rgba(91, 75, 219, 0.18);
    --ftl-ft-glow: rgba(91, 75, 219, 0.55);

    position: relative;
    margin-top: 72px;

    border-top: 0;
    background-color: var(--ftl-color-surface, #ffffff);
    background-image:
        radial-gradient(
            90% 80% at 0% 0%,
            var(--ftl-ft-tint) 0%,
            transparent 60%
        ),
        radial-gradient(
            70% 70% at 100% 100%,
            rgba(139, 124, 246, 0.09) 0%,
            transparent 60%
        );
}


/* Brand colour strip (matches the header) */
.ftl-basebar::before {
    content: "";
    display: block;
    width: 100%;
    height: 4px;
    background: linear-gradient(
        90deg,
        var(--ftl-ft-a) 0%,
        var(--ftl-ft-b) 55%,
        var(--ftl-ft-c) 100%
    );
}


/* Two columns on desktop: brand | navigation. Bottom bar spans both. */
.ftl-basebar__inner {
    width: min(
        calc(100% - 32px),
        var(--ftl-container-page, 1200px)
    );
    margin-inline: auto;
    padding: 52px 0 24px;

    display: grid;
    grid-template-columns: minmax(240px, 5fr) 7fr;
    column-gap: 56px;
    row-gap: 32px;
    align-items: start;
}


/* ---------- Brand ---------- */

.ftl-basebar__brand {
    max-width: 440px;
    margin: 0;
}

.ftl-basebar__logo {
    display: inline-block;
    margin-bottom: 14px;

    color: var(--ftl-ft-a);
    font-size: 1.5rem;
    font-weight: var(--ftl-font-weight-extrabold, 800);
    letter-spacing: -0.02em;
    line-height: 1.1;
    text-decoration: none;
}

@supports (-webkit-background-clip: text) or (background-clip: text) {

    .ftl-basebar__logo {
        background: linear-gradient(
            90deg,
            var(--ftl-ft-a) 0%,
            var(--ftl-ft-b) 100%
        );
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
        color: transparent;
    }

}

.ftl-basebar__logo:hover {
    filter: brightness(1.1);
}

.ftl-basebar__logo:focus-visible {
    outline: 2px solid var(--ftl-ft-a);
    outline-offset: 4px;
    border-radius: var(--ftl-radius-md, 12px);
}

.ftl-basebar__description {
    max-width: 420px;
    margin: 0;
    padding-left: 14px;

    border-left: 3px solid transparent;
    border-image: linear-gradient(
        180deg,
        var(--ftl-ft-a),
        var(--ftl-ft-b)
    ) 1;

    color: var(--ftl-color-text-muted, #4b5563);
    font-size: 0.94rem;
    line-height: 1.75;
}


/* ---------- Navigation — soft pills ---------- */

.ftl-basebar__nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0;
    border: 0;
}

.ftl-basebar__nav a {
    display: inline-flex;
    align-items: center;

    min-height: 38px;
    padding: 0 15px;

    border: 1px solid var(--ftl-ft-tint-strong);
    border-radius: 999px;
    background: var(--ftl-ft-tint);

    color: var(--ftl-color-text-muted, #4b5563);
    font-size: 0.88rem;
    font-weight: var(--ftl-font-weight-medium, 500);
    line-height: 1.4;
    text-decoration: none;

    transition:
        color var(--ftl-transition-fast, 0.15s ease),
        background var(--ftl-transition-fast, 0.15s ease),
        border-color var(--ftl-transition-fast, 0.15s ease),
        transform var(--ftl-transition-fast, 0.15s ease),
        box-shadow var(--ftl-transition-fast, 0.15s ease);
}

.ftl-basebar__nav a:hover {
    color: #ffffff;
    background: linear-gradient(
        135deg,
        var(--ftl-ft-a),
        var(--ftl-ft-b)
    );
    border-color: transparent;
    transform: translateY(-1px);
    box-shadow: 0 8px 16px -8px var(--ftl-ft-glow);
}

.ftl-basebar__nav a:focus-visible {
    outline: 2px solid var(--ftl-ft-a);
    outline-offset: 2px;
}


/* ---------- Bottom bar ---------- */

.ftl-basebar__bottom {
    grid-column: 1 / -1;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

    margin-top: 4px;
    padding-top: 22px;

    border-top: 1px dashed var(--ftl-ft-tint-strong);

    color: var(--ftl-color-text-muted, #4b5563);
    font-size: 0.82rem;
    line-height: 1.6;
}

.ftl-basebar__bottom p {
    margin: 0;
    color: inherit;
}


/* =========================================================
   2. BACK TO TOP
   ========================================================= */

#ftl-back-to-top {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 999;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--ftl-ft-a), var(--ftl-ft-b));
    color: #ffffff;
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 10px 22px -8px var(--ftl-ft-glow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity .25s, transform .25s, visibility .25s, filter .2s, box-shadow .2s;
}

#ftl-back-to-top.ftl-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#ftl-back-to-top:hover {
    filter: brightness(1.1);
    box-shadow: 0 14px 26px -8px var(--ftl-ft-glow);
}

#ftl-back-to-top:active {
    transform: translateY(0) scale(0.95);
}

#ftl-back-to-top:focus-visible {
    outline: 3px solid var(--ftl-ft-a);
    outline-offset: 3px;
}


/* =========================================================
   3. SHARE
   ========================================================= */

.ftl-share {
    position: fixed;
    right: 20px;
    bottom: 78px;
    z-index: 999;
}


/* ---------- Toggle button ---------- */

#ftl-share-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border: 1.5px solid var(--ftl-ft-tint-strong);
    border-radius: 16px;
    background: var(--ftl-color-surface, #ffffff);
    color: var(--ftl-ft-a);
    cursor: pointer;
    box-shadow: 0 10px 22px -10px var(--ftl-ft-glow);
    transition:
        transform .2s,
        background .2s,
        border-color .2s,
        color .2s;
}

#ftl-share-toggle:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, var(--ftl-ft-a), var(--ftl-ft-b));
    border-color: transparent;
    color: #ffffff;
}

#ftl-share-toggle[aria-expanded="true"] {
    background: var(--ftl-ft-tint-strong);
    border-color: var(--ftl-ft-a);
}

#ftl-share-toggle:focus-visible {
    outline: 3px solid var(--ftl-ft-a);
    outline-offset: 3px;
}


/* ---------- Menu ---------- */

.ftl-share__menu {
    position: absolute;
    right: 0;
    bottom: 58px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 200px;
    padding: 8px;
    border: 1px solid var(--ftl-ft-tint-strong);
    border-radius: 18px;
    background: var(--ftl-color-surface, #ffffff);
    box-shadow: 0 20px 40px -14px var(--ftl-ft-glow);
    transform-origin: bottom right;
    animation: ftl-ft-pop 0.16s ease-out;
}

.ftl-share__menu[hidden] {
    display: none;
}

.ftl-share__item {
    display: block;
    width: 100%;
    padding: 11px 14px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--ftl-color-text, #222222);
    font: inherit;
    font-size: 0.92rem;
    font-weight: 500;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .15s, color .15s;
}

.ftl-share__item:hover,
.ftl-share__item:focus-visible {
    background: var(--ftl-ft-tint-strong);
    color: var(--ftl-ft-a);
    outline: none;
}

/* "Copiar enlace" separated as the last action */
.ftl-share__item:last-child {
    margin-top: 4px;
    border-top: 1px dashed var(--ftl-ft-tint-strong);
    border-radius: 0 0 12px 12px;
    padding-top: 13px;
}

@keyframes ftl-ft-pop {

    from {
        opacity: 0;
        transform: translateY(6px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

}


/* =========================================================
   4. RESPONSIVE
   ========================================================= */

@media (max-width: 860px) {

    .ftl-basebar__inner {
        grid-template-columns: 1fr;
        row-gap: 26px;
    }

    .ftl-basebar__brand {
        max-width: 520px;
    }

    .ftl-basebar__description {
        max-width: 480px;
    }

}

@media (max-width: 640px) {

    .ftl-basebar {
        margin-top: 52px;
    }

    .ftl-basebar__inner {
        padding-top: 38px;
    }

    .ftl-basebar__bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    #ftl-back-to-top {
        right: 14px;
        bottom: 14px;
        width: 44px;
        height: 44px;
        border-radius: 14px;
    }

    .ftl-share {
        right: 14px;
        bottom: 66px;
    }

    #ftl-share-toggle {
        width: 44px;
        height: 44px;
        border-radius: 14px;
    }

    .ftl-share__menu {
        bottom: 54px;
    }
}

@media (max-width: 400px) {

    .ftl-basebar__inner {
        width: calc(100% - 20px);
    }

    .ftl-basebar__nav {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .ftl-basebar__nav a {
        justify-content: flex-start;
        font-size: 0.84rem;
        padding: 0 12px;
    }
}


/* =========================================================
   5. DARK THEME
   Lighter brand colours for contrast.
   ========================================================= */

[data-theme="dark"] .ftl-basebar,
.dark .ftl-basebar {
    --ftl-ft-a: #A99FFF;
    --ftl-ft-b: #C2BBFF;
    --ftl-ft-c: #fbbf24;
    --ftl-ft-tint: rgba(194, 187, 255, 0.10);
    --ftl-ft-tint-strong: rgba(194, 187, 255, 0.22);
    --ftl-ft-glow: rgba(0, 0, 0, 0.7);

    background-color: var(--ftl-color-surface, #111827);
}

[data-theme="dark"] .ftl-basebar__nav a:hover,
.dark .ftl-basebar__nav a:hover,
[data-theme="dark"] #ftl-share-toggle:hover,
.dark #ftl-share-toggle:hover,
[data-theme="dark"] #ftl-back-to-top,
.dark #ftl-back-to-top {
    color: #17152E;
}


/* =========================================================
   6. REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    .ftl-basebar__nav a,
    .ftl-share__item,
    #ftl-back-to-top,
    #ftl-share-toggle {
        transition: none;
    }

    .ftl-share__menu {
        animation: none;
    }

    .ftl-basebar__nav a:hover,
    #ftl-share-toggle:hover {
        transform: none;
    }
}


/* =========================================================
   7. MATERIAL ICONS + POLISH (CSS only — HTML unchanged)
   Needs Material Symbols Rounded with icon_names including:
   apps, arrow_upward, auto_awesome, content_paste, draw,
   font_download, gavel, info, lock, mail, palette
   ========================================================= */

.ftl-basebar__logo::before,
.ftl-basebar__nav a::before,
.ftl-basebar__bottom p:last-child::before,
#ftl-back-to-top::before {
    font-family: "Material Symbols Rounded";
    font-weight: 500;
    font-style: normal;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    white-space: nowrap;
    direction: ltr;

    -webkit-font-smoothing: antialiased;
    -webkit-font-feature-settings: "liga";
    font-feature-settings: "liga";
}


/* Soft dotted pattern fading out from the top */
.ftl-basebar::after {
    content: "";
    position: absolute;
    inset: 4px 0 auto 0;
    height: 260px;

    background-image: radial-gradient(
        var(--ftl-ft-tint-strong) 1.2px,
        transparent 1.7px
    );
    background-size: 22px 22px;
    -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 100%);
    mask-image: linear-gradient(180deg, #000 0%, transparent 100%);
    opacity: 0.7;
    pointer-events: none;
}

.ftl-basebar__inner {
    position: relative;
    z-index: 1;
}


/* Brand: icon + live "fancy text" sample chip */
.ftl-basebar__logo::before {
    content: "auto_awesome"; content: "auto_awesome" / "";
    display: inline-block;
    margin-right: 8px;
    font-size: 1.3em;
    vertical-align: -0.2em;

    background: none;
    -webkit-text-fill-color: var(--ftl-ft-b);
    color: var(--ftl-ft-b);
}

.ftl-basebar__brand::after {
    content: "𝓛𝓮𝓽𝓻𝓪𝓼 𝓑𝓸𝓷𝓲𝓽𝓪𝓼 ♡";
    content: "𝓛𝓮𝓽𝓻𝓪𝓼 𝓑𝓸𝓷𝓲𝓽𝓪𝓼 ♡" / "";

    display: block;
    width: fit-content;
    margin-top: 18px;
    padding: 7px 16px;

    border: 1px solid var(--ftl-ft-tint-strong);
    border-radius: 999px;
    background: var(--ftl-ft-tint);

    color: var(--ftl-ft-a);
    font-size: 1.05rem;
    letter-spacing: 0.02em;
}


/* Navigation icons */
.ftl-basebar__nav a::before {
    margin-right: 7px;
    font-size: 18px;
    color: var(--ftl-ft-a);
    transition: color var(--ftl-transition-fast, 0.15s ease);
}

.ftl-basebar__nav a:hover::before {
    color: inherit;
}

.ftl-basebar__nav a[href="/tools.html"]::before                       { content: "apps"; content: "apps" / ""; }
.ftl-basebar__nav a[href="/convertidor-de-letras-bonitas.html"]::before { content: "auto_awesome"; content: "auto_awesome" / ""; }
.ftl-basebar__nav a[href="/convertidor-letras.html"]::before           { content: "font_download"; content: "font_download" / ""; }
.ftl-basebar__nav a[href="/letras-bonitas-de-colores.html"]::before    { content: "palette"; content: "palette" / ""; }
.ftl-basebar__nav a[href="/conversor-de-letras-para-tatuajes.html"]::before { content: "draw"; content: "draw" / ""; }
.ftl-basebar__nav a[href="/about.html"]::before                        { content: "info"; content: "info" / ""; }
.ftl-basebar__nav a[href="/contact.html"]::before                      { content: "mail"; content: "mail" / ""; }
.ftl-basebar__nav a[href="/privacy.html"]::before                      { content: "lock"; content: "lock" / ""; }
.ftl-basebar__nav a[href="/disclaimer.html"]::before                   { content: "gavel"; content: "gavel" / ""; }


/* Hierarchy: tools = pills, info/legal (last 4) = quiet links */
.ftl-basebar__nav a:nth-last-child(-n+4) {
    min-height: 34px;
    padding: 0 11px;

    border-color: transparent;
    background: transparent;

    font-size: 0.84rem;
}

.ftl-basebar__nav a:nth-last-child(-n+4)::before {
    font-size: 16px;
    opacity: 0.8;
}

.ftl-basebar__nav a:nth-last-child(-n+4):hover {
    color: var(--ftl-ft-a);
    background: var(--ftl-ft-tint-strong);
    transform: none;
    box-shadow: none;
}


/* Bottom bar chip (only the icon paragraph — keeps spaces in the copyright line) */
.ftl-basebar__bottom p:last-child {
    display: inline-flex;
    align-items: center;
}

.ftl-basebar__bottom p:last-child::before {
    content: "content_paste"; content: "content_paste" / "";
    margin-right: 6px;
    font-size: 16px;
    color: var(--ftl-ft-a);
}


/* Back to top — Material arrow instead of the ↑ character */
#ftl-back-to-top {
    font-size: 0;
}

#ftl-back-to-top::before {
    content: "arrow_upward"; content: "arrow_upward" / "";
    font-size: 24px;
}