/* =============================================
   80/20 Solutions — App Hub
   Aesthetic: Swiss Industrial
   ============================================= */

:root {
    --bg-deep: #0a0c0f;
    --bg-surface: #12151a;
    --bg-card: #181c22;
    --bg-card-hover: #1e2229;
    --border: #252a32;
    --border-hover: #353b45;
    --text-primary: #e8eaed;
    --text-secondary: #8b929c;
    --text-muted: #565c66;
    --accent: #2dd4a8;
    --accent-dim: rgba(45, 212, 168, 0.12);
    --accent-glow: rgba(45, 212, 168, 0.06);
    --web-badge: #3b82f6;
    --apk-badge: #f59e0b;
    --font-mono: 'JetBrains Mono', monospace;
    --font-sans: 'DM Sans', system-ui, sans-serif;
    --radius: 8px;
    --radius-lg: 12px;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
a:link, a:visited { color: inherit; }

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-deep);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Grain overlay */
.grain {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.025;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 200px;
}

/* ── Header ── */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 12, 15, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
}

.header__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header__brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header__logo {
    font-family: var(--font-mono);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.logo-80 { color: var(--text-primary); }
.logo-slash { color: var(--accent); margin: 0 0.05em; }
.logo-20 { color: var(--text-secondary); }

.header__sep {
    width: 1px;
    height: 20px;
    background: var(--border);
}

.header__label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.header__status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent);
    animation: pulse 2.5s ease-in-out infinite;
}

.status-text {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 0.02em;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* ── Hero ── */
.hero {
    position: relative;
    border-bottom: 1px solid var(--border);
    overflow: hidden;
}

.hero__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 5rem 2rem 4rem;
    position: relative;
}

.hero__grid-lines {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
}

.hero__grid-lines span {
    width: 1px;
    height: 100%;
    background: linear-gradient(to bottom, transparent, var(--border) 30%, var(--border) 70%, transparent);
    opacity: 0.4;
}

.hero__content {
    position: relative;
    z-index: 1;
}

.hero__eyebrow {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 1.25rem;
}

.hero__title {
    font-family: var(--font-mono);
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.hero__title em {
    font-style: normal;
    color: var(--accent);
}

.hero__subtitle {
    font-family: var(--font-sans);
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 460px;
    line-height: 1.6;
}

.hero__meta {
    display: flex;
    gap: 3rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    position: relative;
    z-index: 1;
}

.meta-block {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.meta-label {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.meta-value {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* ── App Grid ── */
.apps {
    padding: 3rem 0 4rem;
}

.apps__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.25rem;
}

/* ── Card ── */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(16px);
    animation: cardIn 0.5s ease forwards;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(45, 212, 168, 0.05);
}

.card:hover::before {
    opacity: 1;
}

@keyframes cardIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card[data-index="0"] { animation-delay: 0.05s; }
.card[data-index="1"] { animation-delay: 0.1s; }
.card[data-index="2"] { animation-delay: 0.15s; }
.card[data-index="3"] { animation-delay: 0.2s; }
.card[data-index="4"] { animation-delay: 0.25s; }
.card[data-index="5"] { animation-delay: 0.3s; }

.card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.card__icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius);
    background: hsl(var(--icon-hue, 150) 50% 50% / 0.1);
    border: 1px solid hsl(var(--icon-hue, 150) 50% 50% / 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: hsl(var(--icon-hue, 150) 60% 65%);
    transition: all 0.3s ease;
}

.card:hover .card__icon {
    background: hsl(var(--icon-hue, 150) 50% 50% / 0.15);
    border-color: hsl(var(--icon-hue, 150) 50% 50% / 0.25);
}

.card__icon svg {
    width: 22px;
    height: 22px;
}

.card__badges {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.badge {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.badge--version {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.badge--web {
    background: rgba(59, 130, 246, 0.1);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.badge--apk {
    background: rgba(245, 158, 11, 0.1);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.card__body {
    flex: 1;
}

.card__name {
    font-family: var(--font-mono);
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: 0.4rem;
    color: var(--text-primary);
}

.card__desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.55;
}

.card__footer {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.card__date {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-muted);
    letter-spacing: 0.02em;
}

.card__actions {
    display: flex;
    gap: 0.5rem;
}

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.5rem 0.85rem;
    border-radius: 6px;
    text-decoration: none;
    letter-spacing: 0.01em;
    transition: all 0.2s ease;
    white-space: nowrap;
    color: inherit;
}

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

.btn svg {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
}

.btn--primary {
    background: var(--accent);
    color: var(--bg-deep);
    border: 1px solid var(--accent);
}

.btn--primary:hover {
    background: #38e8b8;
    box-shadow: 0 2px 12px rgba(45, 212, 168, 0.25);
}

.btn--secondary {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.btn--secondary:hover {
    color: var(--text-primary);
    border-color: var(--border-hover);
    background: rgba(255, 255, 255, 0.03);
}

.btn--ghost,
a.btn--ghost,
a.btn--ghost:link,
a.btn--ghost:visited,
a.btn--ghost:active {
    background: rgba(255, 255, 255, 0.06);
    color: #e8eaed !important;
    border: 1px solid #353b45;
    gap: 0.35rem;
    text-decoration: none !important;
}

a.btn--ghost:hover {
    color: #ffffff !important;
    border-color: #555;
    background: rgba(255, 255, 255, 0.1);
    text-decoration: none !important;
}

.btn--ghost svg {
    width: 14px;
    height: 14px;
}

/* ── Footer ── */
.footer {
    border-top: 1px solid var(--border);
    padding: 2.5rem 0;
}

.footer__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer__brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.footer__logo {
    font-weight: 700;
    color: var(--text-primary);
}

.footer__logo span {
    color: var(--accent);
}

.footer__copy {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .header__inner {
        padding: 0 1.25rem;
    }

    .header__status {
        display: none;
    }

    .hero__inner {
        padding: 3.5rem 1.25rem 3rem;
    }

    .hero__grid-lines {
        display: none;
    }

    .hero__meta {
        gap: 1.5rem;
        flex-wrap: wrap;
    }

    .apps__inner {
        padding: 0 1.25rem;
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .card {
        padding: 1.25rem;
    }

    .footer__inner {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
        padding: 0 1.25rem;
    }
}

@media (max-width: 420px) {
    .card__actions {
        flex-direction: column;
    }

    .btn {
        justify-content: center;
    }

    .hero__meta {
        gap: 1.25rem;
    }

    .meta-block {
        min-width: 40%;
    }
}
