/* iBit — página de apps
   Continuidade visual com index.css */

:root {
    --ink: #0c1222;
    --ink-soft: #1a2436;
    --muted: #5b6577;
    --muted-soft: #8b93a3;
    --line: #e4e8ef;
    --line-strong: #d5dbe6;
    --paper: #f2f4f7;
    --surface: #ffffff;
    --accent: #0f766e;
    --accent-hover: #0d5f59;
    --accent-soft: rgba(15, 118, 110, 0.1);
    --accent-ring: rgba(15, 118, 110, 0.22);
    --shadow-sm: 0 1px 2px rgba(12, 18, 34, 0.04);
    --shadow-md: 0 10px 28px rgba(12, 18, 34, 0.07);
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --radius: 16px;
    --radius-sm: 10px;
    --font-display: 'Space Grotesk', 'Segoe UI', sans-serif;
    --font-body: 'Manrope', 'Segoe UI', sans-serif;
    --header-h: 68px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--ink);
    background: var(--paper);
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    border-bottom: 1px solid var(--line);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: var(--header-h);
    gap: 24px;
}

.nav-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--ink);
}

.nav-brand-name {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.logo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    min-height: 32px;
}

.logo-placeholder img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.logo-placeholder:empty {
    display: none;
}

.logo-placeholder:not(:empty) + .nav-brand-name {
    display: none;
}

.nav-menu {
    display: flex;
    gap: 8px;
    align-items: center;
}

.nav-link {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 550;
    padding: 8px 12px;
    border-radius: 8px;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--ink);
    background: var(--paper);
}

/* Page intro (não é hero full-bleed de marketing) */
.hero {
    padding: calc(var(--header-h) + 56px) 0 40px;
    background:
        radial-gradient(ellipse 70% 80% at 0% 0%, rgba(15, 118, 110, 0.1), transparent 50%),
        linear-gradient(180deg, #eef1f5 0%, var(--paper) 100%);
    border-bottom: 1px solid var(--line);
}

.hero-content {
    max-width: 640px;
    animation: fadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-brand {
    font-family: var(--font-display);
    font-size: 0.8125rem;
    font-weight: 650;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 14px;
}

.hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4.5vw, 3rem);
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1.1;
    color: var(--ink);
    margin-bottom: 12px;
}

.hero p {
    font-size: 1.0625rem;
    color: var(--muted);
    max-width: 42ch;
    line-height: 1.55;
}

/* Apps section */
.apps-section {
    padding: 48px 0 96px;
}

.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    align-items: stretch;
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 64px 24px;
    background: var(--surface);
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius);
}

.empty-state h3 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--muted);
}

/* App card */
.app-card {
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    transition: border-color 0.2s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.app-card:hover {
    transform: translateY(-3px);
    border-color: var(--line-strong);
    box-shadow: var(--shadow-md);
}

.app-card:not(.app-highlighted):hover {
    animation: appHoverHeartbeat 2.8s ease-in-out infinite;
}

.app-highlighted {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent), var(--shadow-md);
    animation: appSelectedHeartbeat 2.8s ease-in-out infinite;
}

/* Dois pulsos próximos ("tum-tum") seguidos de uma pausa longa. */
@keyframes appSelectedHeartbeat {
    0%, 14%, 34%, 100% {
        transform: scale(1);
        border-color: rgba(15, 118, 110, 0.7);
        box-shadow:
            0 0 0 1px rgba(15, 118, 110, 0.45),
            0 10px 28px rgba(12, 18, 34, 0.07);
    }
    7% {
        transform: scale(1.018);
        border-color: rgba(15, 118, 110, 0.95);
        box-shadow:
            0 0 0 9px rgba(15, 118, 110, 0.14),
            0 20px 44px rgba(12, 18, 34, 0.15);
    }
    23% {
        transform: scale(1.011);
        border-color: rgba(15, 118, 110, 0.9);
        box-shadow:
            0 0 0 6px rgba(15, 118, 110, 0.11),
            0 17px 38px rgba(12, 18, 34, 0.12);
    }
}

@keyframes appHoverHeartbeat {
    0%, 14%, 34%, 100% {
        transform: translateY(-3px) scale(1);
        box-shadow: 0 10px 28px rgba(12, 18, 34, 0.07);
    }
    7% {
        transform: translateY(-5px) scale(1.014);
        box-shadow:
            0 0 0 6px rgba(15, 118, 110, 0.09),
            0 18px 40px rgba(12, 18, 34, 0.14);
    }
    23% {
        transform: translateY(-4px) scale(1.008);
        box-shadow:
            0 0 0 4px rgba(15, 118, 110, 0.07),
            0 15px 35px rgba(12, 18, 34, 0.11);
    }
}

.app-image {
    width: 100%;
    height: 200px;
    flex-shrink: 0;
    background:
        linear-gradient(145deg, #0c1222 0%, #1a2436 45%, #0f766e 130%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.app-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.app-image--icon {
    isolation: isolate;
    background:
        radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.96) 0%, rgba(242, 244, 247, 0.84) 48%, rgba(228, 232, 239, 0.94) 100%);
}

.app-image--icon::after {
    content: '';
    position: absolute;
    z-index: -1;
    inset: 0;
    background:
        linear-gradient(90deg, transparent 49.8%, rgba(12, 18, 34, 0.035) 50%, transparent 50.2%),
        linear-gradient(transparent 49.8%, rgba(12, 18, 34, 0.035) 50%, transparent 50.2%);
    background-size: 40px 40px;
    mask-image: radial-gradient(circle at center, #000 10%, transparent 68%);
}

.app-image--icon img.app-icon-backdrop {
    position: absolute;
    z-index: -2;
    inset: -30%;
    width: 160%;
    height: 160%;
    object-fit: cover;
    filter: blur(34px) saturate(0.8);
    opacity: 0.14;
    transform: scale(1.08);
}

.app-icon-stage {
    position: relative;
    z-index: 1;
    width: min(160px, 62%);
    aspect-ratio: 1;
    padding: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 34px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow:
        0 18px 38px rgba(12, 18, 34, 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: transform 0.4s var(--ease-out), box-shadow 0.4s ease;
}

.app-card:hover .app-icon-stage {
    transform: translateY(-3px) scale(1.035);
    box-shadow:
        0 22px 46px rgba(12, 18, 34, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.app-image--icon img.app-icon-fallback {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 27px;
}

.app-image--placeholder {
    flex-direction: column;
    gap: 12px;
}

.app-placeholder-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-placeholder-icon svg {
    width: 30px;
    height: 30px;
    color: #fff;
}

.app-placeholder-label {
    font-family: var(--font-display);
    font-size: 0.9375rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    opacity: 0.9;
}

.app-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 16px;
}

.app-content-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.app-name {
    font-family: var(--font-display);
    font-size: 1.375rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--ink);
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.app-category-text {
    font-size: 0.75rem;
    color: var(--muted-soft);
    margin-bottom: 12px;
    font-weight: 650;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.app-description-wrap {
    margin-bottom: 4px;
}

.app-description {
    color: var(--muted);
    margin-bottom: 8px;
    font-size: 0.9375rem;
    line-height: 1.55;
}

.read-more-btn {
    background: var(--accent-soft);
    border: 1px solid transparent;
    border-radius: 7px;
    padding: 6px 9px;
    color: var(--accent);
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 650;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s var(--ease-out);
}

.read-more-btn:hover {
    color: var(--accent-hover);
    background: rgba(15, 118, 110, 0.16);
    transform: translateY(-1px);
}

.read-more-btn:active {
    transform: translateY(0) scale(0.97);
}

.app-category {
    display: none;
}

.app-footer {
    margin-top: 4px;
}

.privacy-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 8px 12px;
    color: var(--muted);
    font-family: inherit;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease, transform 0.2s var(--ease-out), box-shadow 0.2s ease;
}

.privacy-button:hover {
    color: var(--ink);
    border-color: var(--line-strong);
    background: var(--paper);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.privacy-button:active {
    transform: translateY(0) scale(0.98);
}

.privacy-button--empty {
    visibility: hidden;
    pointer-events: none;
}

/* QR section */
.qr-section {
    background: var(--paper);
    border-radius: 12px;
    padding: 14px 10px 12px;
    margin-top: auto;
    border: 1px solid var(--line);
}

.qr-section h4 {
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 650;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    margin: 0 0 12px;
    text-align: center;
}

.qr-codes {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    align-items: stretch;
}

.qr-item,
.qr-item--placeholder {
    text-align: center;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 10px 6px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-width: 0;
    overflow: hidden;
    height: 100%;
}

.qr-item--placeholder {
    background: transparent;
    border-style: dashed;
    border-color: var(--line-strong);
}

.qr-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin: 0 0 8px;
    width: 100%;
    min-height: 18px;
}

.qr-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.qr-logo svg {
    width: 14px;
    height: 14px;
    color: var(--ink);
}

.qr-item--placeholder .qr-logo svg,
.qr-item--placeholder h5 {
    color: var(--muted-soft);
}

.qr-item h5 {
    font-size: 0.6875rem;
    font-weight: 650;
    color: var(--ink);
    margin: 0;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: calc(100% - 4px);
}

.qr-canvas-wrap {
    width: 72px;
    height: 72px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 6px;
    background: #fff;
    border: 1px solid var(--line);
}

.qr-code {
    margin: 0 !important;
    display: block !important;
    width: 72px !important;
    height: 72px !important;
    max-width: 72px !important;
    max-height: 72px !important;
    object-fit: contain;
    opacity: 0.35;
    transition: opacity 0.2s ease;
}

.qr-code--ready {
    opacity: 1;
}

.qr-placeholder-box {
    width: 72px;
    height: 72px;
    border-radius: 6px;
    background: #e8ecf2;
    border: 1px solid var(--line);
    flex-shrink: 0;
}

.qr-item-footer {
    margin-top: 8px;
    min-height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-placeholder-text,
.qr-download {
    margin: 0;
    font-size: 0.6875rem;
    font-weight: 650;
    line-height: 1;
    text-decoration: none;
}

.qr-placeholder-text {
    color: var(--muted-soft);
}

.qr-download {
    color: var(--accent);
    display: inline-flex;
    padding: 5px 8px;
    border-radius: 6px;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s var(--ease-out);
}

.qr-download:hover {
    color: var(--accent-hover);
    background: var(--accent-soft);
    transform: translateY(-1px);
}

/* Store links (legado, se aparecer) */
.store-links {
    display: none;
}

/* Footer */
.site-footer {
    background: var(--ink);
    color: var(--muted-soft);
    padding: 28px 0;
    margin-top: 0;
}

.site-footer-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.875rem;
}

.site-footer a {
    color: #c5ccd8;
    text-decoration: none;
}

.site-footer a:hover {
    color: #fff;
}

.footer-sep {
    margin: 0 8px;
    opacity: 0.35;
}

@media (max-width: 768px) {
    .nav-link {
        padding: 8px;
        font-size: 0.875rem;
    }

    .apps-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .app-content {
        padding: 20px;
    }

    .qr-codes {
        gap: 6px;
    }

    .qr-canvas-wrap,
    .qr-placeholder-box,
    .qr-code {
        width: 64px !important;
        height: 64px !important;
        max-width: 64px !important;
        max-height: 64px !important;
    }
}

@media (max-width: 400px) {
    .qr-item h5 {
        font-size: 0.625rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
