/* ===========================
   NineIota.com — site.css
   =========================== */

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

:root {
    --color-bg:          #0d0f14;
    --color-bg-alt:      #13161e;
    --color-bg-card:     #1a1e2a;
    --color-primary:     #6c5ce7;
    --color-accent:      #00cec9;
    --color-text:        #e8eaf0;
    --color-muted:       #8892a4;
    --color-border:      #252a36;
    --color-header-bg:   #0a0c11;
    --font-sans:         -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --radius:            8px;
    --max-width:         1100px;
    --shadow:            0 2px 12px rgba(0,0,0,0.4);
}

body {
    font-family: var(--font-sans);
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.6;
    font-size: 1rem;
}

a { color: var(--color-accent); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* ---- Layout ---- */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* ---- Header ---- */
.site-header {
    background: var(--color-header-bg);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--color-border);
    box-shadow: 0 2px 16px rgba(0,0,0,0.5);
}

.site-header .container {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding-top: 0.9rem;
    padding-bottom: 0.9rem;
}

.site-logo {
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.5px;
    white-space: nowrap;
}
.site-logo span { color: var(--color-primary); }
.site-logo:hover { text-decoration: none; }

.site-nav {
    display: flex;
    gap: 1.5rem;
    margin-left: auto;
    flex-wrap: wrap;
}
.site-nav a {
    color: rgba(255,255,255,0.75);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.15s;
}
.site-nav a:hover { color: #fff; text-decoration: none; }

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.4rem;
    cursor: pointer;
    margin-left: auto;
}

/* ---- Hero ---- */
.hero {
    background: radial-gradient(ellipse at 60% 30%, #1a1060 0%, var(--color-bg) 70%);
    color: #fff;
    padding: 5rem 0 4rem;
    text-align: center;
}
.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 0.75rem;
}
.hero-subtitle {
    font-size: 1.2rem;
    color: rgba(255,255,255,0.7);
    margin-bottom: 2rem;
}

/* ---- Buttons ---- */
.btn-primary {
    display: inline-block;
    background: var(--color-primary);
    color: #fff;
    padding: 0.65rem 1.4rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.95rem;
    transition: background 0.15s, box-shadow 0.15s;
}
.btn-primary:hover {
    background: #5a4dd0;
    text-decoration: none;
    box-shadow: 0 0 0 3px rgba(108,92,231,0.35);
}

/* ---- Focus areas ---- */
.focus-areas {
    background: var(--color-bg-alt);
    padding: 4rem 0;
}

.focus-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.focus-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 2rem 1.5rem;
    transition: border-color 0.2s;
}
.focus-card:hover { border-color: var(--color-primary); }

.focus-icon {
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.focus-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--color-text);
}

.focus-card p {
    font-size: 0.9rem;
    color: var(--color-muted);
    line-height: 1.6;
}

/* ---- Featured app ---- */
.featured-app {
    background: var(--color-bg);
    padding: 4rem 0;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.featured-app-inner {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: calc(var(--radius) * 2);
    padding: 2.5rem;
    max-width: 760px;
    margin: 0 auto;
}

.featured-app-icon img {
    border-radius: var(--radius);
    width: 96px;
    height: 96px;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--color-bg-alt);
}

.featured-app-content h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0.5rem 0 0.75rem;
    color: var(--color-text);
}

.featured-app-content p {
    color: var(--color-muted);
    margin-bottom: 1.25rem;
    font-size: 0.95rem;
}

/* ---- Platform badge ---- */
.platform-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(76,175,80,0.12);
    color: #4caf50;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.25em 0.65em;
    border-radius: 99px;
    border: 1px solid rgba(76,175,80,0.3);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

/* ---- About section ---- */
.about-section {
    background: var(--color-bg-alt);
    padding: 4rem 0;
}

.about-section h2 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--color-text);
}

.about-section p {
    color: var(--color-muted);
    max-width: 640px;
    margin-bottom: 0.75rem;
}

.about-section a { color: var(--color-accent); }

/* ---- Page header ---- */
.page-header {
    background: var(--color-header-bg);
    border-bottom: 1px solid var(--color-border);
    color: #fff;
    padding: 2.5rem 0;
}
.page-header h1 { font-size: 2rem; font-weight: 700; margin-bottom: 0.4rem; }
.page-header p { color: var(--color-muted); }

/* ---- Page content ---- */
.page-content { padding: 3rem 0; }

/* ---- Apps grid ---- */
.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.app-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1.5rem;
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.app-card:hover {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 1px var(--color-primary), var(--shadow);
}

.app-card-icon img {
    border-radius: var(--radius);
    width: 72px;
    height: 72px;
    object-fit: cover;
    background: var(--color-bg-alt);
    flex-shrink: 0;
}

.app-card-body { flex: 1; }

.app-card-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0.4rem 0 0.5rem;
    color: var(--color-text);
}

.app-card-desc {
    font-size: 0.875rem;
    color: var(--color-muted);
    margin-bottom: 1rem;
}

.coming-soon {
    color: var(--color-muted);
    font-size: 0.9rem;
    padding: 1rem 0;
}

/* ---- App detail page ---- */
.app-detail {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 3rem;
    align-items: start;
    margin-bottom: 3rem;
}

.app-detail-icon {
    border-radius: var(--radius);
    width: 128px;
    height: 128px;
    object-fit: cover;
    background: var(--color-bg-card);
    margin-bottom: 1.5rem;
}

.app-meta {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.app-meta-row {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.app-meta-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-muted);
    font-weight: 600;
}

.app-meta-row span,
.app-meta-row a {
    font-size: 0.9rem;
    color: var(--color-text);
}
.app-meta-row a { color: var(--color-accent); }

.app-detail-content h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--color-text);
}

.app-detail-content h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 1.5rem 0 0.5rem;
    color: var(--color-text);
}

.app-detail-content p {
    color: var(--color-muted);
    margin-bottom: 0.9rem;
}

.app-detail-content ul {
    padding-left: 1.4rem;
    margin-bottom: 1rem;
    color: var(--color-muted);
}

.app-detail-content li { margin-bottom: 0.4rem; }

.privacy-note {
    margin-top: 1.5rem;
    padding: 1rem 1.25rem;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-left: 3px solid var(--color-primary);
    border-radius: 0 var(--radius) var(--radius) 0;
    font-size: 0.875rem;
    color: var(--color-muted);
}
.privacy-note a { color: var(--color-accent); }
.privacy-note p { margin: 0; }

/* ---- Developer info section ---- */
.developer-info {
    padding-top: 2rem;
    border-top: 1px solid var(--color-border);
}

.developer-info h2 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--color-text);
}

/* ---- Developer card (used on Contact, Privacy, Terms, Finite Games) ---- */
.developer-card {
    display: inline-flex;
    flex-direction: column;
    gap: 0.35rem;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    margin-top: 0.75rem;
    font-size: 0.9rem;
}
.developer-card strong { color: var(--color-text); }
.developer-card a { color: var(--color-accent); }

/* ---- Article body (prose pages: Privacy, Terms, Contact) ---- */
.article-body {
    max-width: 720px;
}

.article-body h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-text);
    margin: 2rem 0 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--color-border);
}

.article-body h2:first-child { border-top: none; margin-top: 0; }

.article-body p  { color: var(--color-muted); margin-bottom: 1rem; }
.article-body ul, .article-body ol { padding-left: 1.5rem; margin-bottom: 1rem; color: var(--color-muted); }
.article-body li { margin-bottom: 0.4rem; }
.article-body strong { color: var(--color-text); font-weight: 600; }
.article-body a { color: var(--color-accent); }

/* ---- Footer ---- */
.site-footer {
    background: var(--color-header-bg);
    border-top: 1px solid var(--color-border);
    color: var(--color-muted);
    padding: 2.5rem 0;
    font-size: 0.875rem;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.footer-logo {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-text);
}

.footer-brand p { font-size: 0.85rem; }

.footer-brand a {
    color: var(--color-accent);
    font-size: 0.85rem;
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
    align-items: flex-start;
}

.footer-nav a {
    color: var(--color-muted);
    font-size: 0.85rem;
    transition: color 0.15s;
}
.footer-nav a:hover { color: var(--color-text); text-decoration: none; }

.footer-bottom {
    border-top: 1px solid var(--color-border);
    padding-top: 1.25rem;
}

.footer-bottom p { font-size: 0.8rem; color: var(--color-muted); }

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .hero h1 { font-size: 2rem; }
    .hero-subtitle { font-size: 1rem; }

    .site-nav {
        display: none;
        flex-direction: column;
        gap: 0;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--color-header-bg);
        border-bottom: 1px solid var(--color-border);
        padding: 0.5rem 1.25rem 1rem;
    }
    .site-nav.open { display: flex; }
    .site-nav a { padding: 0.5rem 0; }
    .nav-toggle { display: block; }

    .focus-grid { grid-template-columns: 1fr; }

    .featured-app-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
        padding: 1.75rem;
    }

    .app-detail {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-top { flex-direction: column; }
}

@media (max-width: 480px) {
    .apps-grid { grid-template-columns: 1fr; }
    .app-card { flex-direction: column; }
}
