@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --bg: #080808;
    --bg-elevated: #0f0f0f;
    --bg-section: #111111;
    --bg-card: #161616;
    --bg-card-hover: #1c1c1c;
    --text: #f5f5f5;
    --text-muted: #9a9a9a;
    --text-dim: #6b6b6b;
    --border: #242424;
    --border-hover: #3a3a3a;
    --accent: #e8e8e8;
    --accent-soft: rgba(255, 255, 255, 0.06);
    --glow: rgba(255, 255, 255, 0.04);
    --radius: 1rem;
    --radius-sm: 0.625rem;
    --nav-h: 4.25rem;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--nav-h) + 1rem);
}

body {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
}

/* —— Nav —— */
.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    height: var(--nav-h);
    background: rgba(8, 8, 8, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease, background 0.3s ease;
}

.site-nav.scrolled {
    border-bottom-color: var(--border);
    background: rgba(8, 8, 8, 0.92);
}

.nav-inner {
    max-width: 72rem;
    margin: 0 auto;
    padding: 0 1.25rem;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.nav-brand {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    line-height: 0;
    text-decoration: none;
}

.logo-nav {
    height: 2.35rem;
    width: auto;
    max-width: min(220px, 48vw);
    display: block;
    object-fit: contain;
    object-position: left center;
}

@media (min-width: 768px) {
    .logo-nav {
        height: 2.75rem;
        max-width: 260px;
    }
}

.nav-links {
    display: none;
    align-items: center;
    gap: 0.15rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

@media (min-width: 768px) {
    .nav-links {
        display: flex;
    }
}

.nav-link {
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    padding: 0.5rem 0.875rem;
    border-radius: 999px;
    transition: color 0.2s ease, background 0.2s ease;
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--text);
    background: var(--accent-soft);
}

.nav-cta {
    display: none;
    margin-left: 0.35rem;
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
    font-weight: 600;
    border-radius: 999px;
    background: var(--accent);
    color: var(--bg);
    text-decoration: none;
    transition: background 0.2s ease, transform 0.15s ease;
    white-space: nowrap;
}

.nav-cta:hover {
    background: #fff;
    transform: translateY(-1px);
}

@media (min-width: 768px) {
    .nav-cta {
        display: inline-flex;
        align-items: center;
    }
}

.menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    flex-shrink: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text);
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.menu-toggle:hover {
    border-color: var(--border-hover);
    background: var(--accent-soft);
}

@media (min-width: 768px) {
    .menu-toggle {
        display: none;
    }
}

.mobile-menu {
    display: none;
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    z-index: 49;
    background: rgba(8, 8, 8, 0.97);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.5rem 1.5rem;
    flex-direction: column;
    gap: 0.25rem;
}

.mobile-menu.open {
    display: flex;
}

.mobile-menu a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 500;
    padding: 0.875rem 1rem;
    border-radius: var(--radius-sm);
    transition: color 0.2s ease, background 0.2s ease;
}

.mobile-menu a:hover {
    color: var(--text);
    background: var(--accent-soft);
}

/* —— Hero —— */
.hero {
    position: relative;
    min-height: min(92vh, 52rem);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: calc(var(--nav-h) + 3rem) 1.5rem 5rem;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 50% at 50% 0%, rgba(255, 255, 255, 0.06) 0%, transparent 55%),
        radial-gradient(ellipse 40% 30% at 80% 60%, rgba(255, 255, 255, 0.03) 0%, transparent 50%),
        radial-gradient(ellipse 40% 30% at 20% 70%, rgba(255, 255, 255, 0.02) 0%, transparent 50%);
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 8rem;
    background: linear-gradient(to top, var(--bg), transparent);
    pointer-events: none;
}

.hero-inner {
    position: relative;
    z-index: 1;
    max-width: 40rem;
    margin: 0 auto;
    text-align: center;
}

.hero-emblem {
    width: clamp(5.5rem, 16vw, 7.5rem);
    margin: 0 auto 2rem;
    position: relative;
}

.hero-emblem::before {
    content: '';
    position: absolute;
    inset: -30%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.12) 0%, transparent 65%);
    border-radius: 50%;
    z-index: -1;
}

.hero-emblem img {
    display: block;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 8px 32px rgba(0, 0, 0, 0.5));
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    background: var(--accent-soft);
    border: 1px solid var(--border);
    padding: 0.4rem 0.875rem;
    border-radius: 999px;
    margin-bottom: 1.5rem;
}

.hero-badge-dot {
    width: 0.4rem;
    height: 0.4rem;
    border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 8px rgba(74, 222, 128, 0.6);
}

.hero h1 {
    margin: 0 0 1rem;
    font-size: clamp(2.25rem, 6vw, 3.5rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.hero-tagline {
    margin: 0 auto 2.25rem;
    max-width: 26rem;
    font-size: 1.0625rem;
    color: var(--text-muted);
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

/* —— Buttons —— */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--accent);
    color: var(--bg);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    padding: 0.875rem 1.5rem;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.btn-primary:hover {
    background: #fff;
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(255, 255, 255, 0.12);
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    padding: 0.875rem 1.5rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.btn-outline:hover {
    border-color: var(--border-hover);
    background: var(--accent-soft);
    color: #fff;
    transform: translateY(-1px);
}

.btn-block {
    width: 100%;
}

/* —— Sections —— */
.section {
    padding: 5.5rem 0;
    position: relative;
}

.section-alt {
    background: var(--bg-section);
}

.section-inner {
    max-width: 72rem;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.section-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 0.5rem;
}

.section-title {
    margin: 0;
    font-size: clamp(1.5rem, 3vw, 1.875rem);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.section-desc {
    margin: 0.5rem 0 0;
    color: var(--text-muted);
    font-size: 0.9375rem;
    max-width: 28rem;
}

/* —— Cards —— */
.card-grid {
    display: grid;
    gap: 1.25rem;
}

@media (min-width: 640px) {
    .card-grid.cols-2 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .card-grid.cols-3 {
        grid-template-columns: repeat(3, 1fr);
    }
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
                border-color 0.25s ease,
                background 0.25s ease,
                box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
}

.card-media {
    position: relative;
    aspect-ratio: 16 / 10;
    background: linear-gradient(145deg, #1a1a1a 0%, #0d0d0d 100%);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* Wide banner logos (e.g. Simple Easy Tools) — fit fully, centered on dark fill */
.card-media-contain {
    background: #000;
    padding: 1.25rem 1.5rem;
}

.card-media-contain img {
    object-fit: contain;
    object-position: center;
}

.card-media-contain::after {
    display: none;
}

.card-media-empty {
    background: linear-gradient(145deg, #1a1a1a 0%, #0d0d0d 100%);
}

.card-media-fallback {
    width: 3.5rem;
    height: 3.5rem;
    opacity: 0.35;
    filter: grayscale(1);
    object-fit: contain !important;
}

.card-media::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(22, 22, 22, 0.5) 0%, transparent 40%);
    pointer-events: none;
}

.btn-disabled {
    opacity: 0.55;
    cursor: default;
    pointer-events: none;
}

.card-body {
    padding: 1.375rem 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-meta {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.card-title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 650;
    letter-spacing: -0.01em;
}

.card-type {
    margin: 0 0 0.625rem;
    font-size: 0.8125rem;
    color: var(--text-dim);
    font-weight: 500;
}

.card-desc {
    margin: 0 0 1.25rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.65;
    flex: 1;
}

.badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.3rem 0.625rem;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    border: 1px solid var(--border);
    white-space: nowrap;
    flex-shrink: 0;
}

.badge-live {
    color: #86efac;
    border-color: rgba(74, 222, 128, 0.25);
    background: rgba(74, 222, 128, 0.08);
}

.badge-dev {
    color: #fcd34d;
    border-color: rgba(252, 211, 77, 0.25);
    background: rgba(252, 211, 77, 0.08);
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-bottom: 1.25rem;
}

.tag {
    font-size: 0.6875rem;
    font-weight: 500;
    color: var(--text-muted);
    padding: 0.25rem 0.5rem;
    border: 1px solid var(--border);
    border-radius: 0.375rem;
}

/* Featured mod card (full width emphasis) */
.card-featured {
    grid-column: 1 / -1;
}

@media (min-width: 768px) {
    .card-featured {
        display: grid;
        grid-template-columns: 1.1fr 1fr;
    }

    .card-featured .card-media {
        aspect-ratio: auto;
        min-height: 14rem;
    }

    .card-featured .card-media-contain {
        padding: 2rem 2.25rem;
    }
}

/* —— About —— */
.about-grid {
    display: grid;
    gap: 2.5rem;
    align-items: center;
}

@media (min-width: 768px) {
    .about-grid {
        grid-template-columns: auto 1fr;
        gap: 3.5rem;
    }
}

.about-logo {
    width: clamp(6rem, 18vw, 8.5rem);
    margin: 0 auto;
    opacity: 0.9;
}

.about-logo img {
    width: 100%;
    height: auto;
    display: block;
}

.about-text {
    margin: 0;
    font-size: 1.0625rem;
    color: var(--text-muted);
    line-height: 1.75;
    max-width: 36rem;
}

/* —— Contact —— */
.contact-box {
    max-width: 32rem;
    margin: 0 auto;
    text-align: center;
    padding: 2.5rem 1.5rem;
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) + 0.25rem);
    background:
        radial-gradient(ellipse 80% 60% at 50% 0%, rgba(255, 255, 255, 0.04) 0%, transparent 60%),
        var(--bg-card);
}

.contact-box h2 {
    margin: 0 0 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.contact-box p {
    margin: 0 0 1.75rem;
    color: var(--text-muted);
    font-size: 0.9375rem;
}

.contact-email {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--bg);
    background: var(--accent);
    text-decoration: none;
    padding: 0.9rem 1.5rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.75rem;
    transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.contact-email:hover {
    background: #fff;
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(255, 255, 255, 0.12);
}

.social-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

.social-row a {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    padding: 0.5rem 0.875rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.social-row a:hover {
    color: var(--text);
    border-color: var(--border-hover);
    background: var(--accent-soft);
}

/* —— Footer —— */
.site-footer {
    padding: 2rem 1.5rem;
    border-top: 1px solid var(--border);
}

.footer-inner {
    max-width: 72rem;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    color: var(--text-dim);
    font-size: 0.8125rem;
}

.footer-brand img {
    width: 1.5rem;
    height: 1.5rem;
    opacity: 0.7;
}

.footer-copy {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--text-dim);
}

/* —— Utilities —— */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}
