/* ==========================================================================
   apps.css
   Shared styling for the apps section. Dark, editorial, image-forward.
   Derived from the ai-examples look: #111 ground, blue-gray panels,
   big tight headlines, muted grey body copy, pill links and tech tags.

   Each app page sets its own --accent (snitscanner cobalt, ExpressionGate
   oxide orange) so the pages feel like the products they describe.
   ========================================================================== */

:root {
    --bg: #111111;
    --surface: #1e1e24;
    --surface-2: #232126;
    --surface-3: #2a2830;
    --text: #ffffff;
    --text-muted: #888888;
    --text-dim: rgba(255, 255, 255, 0.7);
    --line: rgba(255, 255, 255, 0.1);
    --line-strong: rgba(255, 255, 255, 0.2);
    --accent: #64b5f6;

    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

    --page: 1100px;
    --pad: 3rem;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

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

.container {
    max-width: var(--page);
    margin: 0 auto;
    padding: 0 var(--pad);
}

/* --------------------------------------------------------------------------
   Navigation
   -------------------------------------------------------------------------- */

.sticky-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: rgba(17, 17, 17, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
    padding: 0.9rem 0;
}

.nav-wrapper {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.nav-title {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-dim);
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.3s ease;
}

.nav-title:hover {
    color: var(--text);
}

.nav-links {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-left: auto;
}

.styled-link {
    font-size: 0.85rem;
    color: var(--text-dim);
    text-decoration: none;
    padding: 0.4rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    white-space: nowrap;
}

.styled-link:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--line-strong);
}

.styled-link.active {
    color: var(--text);
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.6);
}

/* --------------------------------------------------------------------------
   Page header
   -------------------------------------------------------------------------- */

header.page-header {
    padding: 6rem 0 3.5rem;
}

.eyebrow {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

h1 {
    font-size: 3.5rem;
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.05;
    max-width: 15ch;
}

.lede {
    font-size: 1.25rem;
    font-weight: 300;
    color: var(--text-muted);
    margin-top: 1.5rem;
    max-width: 60ch;
    line-height: 1.5;
}

.byline {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 1.5rem;
}

.byline a {
    color: var(--text-dim);
    text-decoration: none;
    border-bottom: 1px solid var(--line-strong);
}

.byline a:hover {
    color: var(--text);
}

/* --------------------------------------------------------------------------
   Status pill
   -------------------------------------------------------------------------- */

.status {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-family: var(--mono);
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.25rem 0.6rem;
    border-radius: 100px;
    border: 1px solid var(--line-strong);
    color: var(--text-dim);
    background: rgba(255, 255, 255, 0.05);
}

.status::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
}

.status.live::before {
    background: #3fb0a0;
}

.status.wip::before {
    background: #e3cb94;
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */

section {
    padding: 4rem 0;
    scroll-margin-top: 5rem;
}

/* The header already ends in whitespace; don't double it up */
header.page-header + section:not(.tinted):not(.tinted-2) {
    padding-top: 0.5rem;
}

section.tinted {
    background-color: var(--surface);
}

section.tinted-2 {
    background-color: var(--surface-2);
}

.section-title {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.75rem;
}

.section-heading {
    font-size: 2.25rem;
    font-weight: 500;
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin-bottom: 1.5rem;
}

.prose p {
    color: var(--text-dim);
    font-size: 1.05rem;
    max-width: 68ch;
    margin-bottom: 1.1rem;
}

.prose p:last-child {
    margin-bottom: 0;
}

.prose strong {
    color: var(--text);
    font-weight: 500;
}

.prose a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid currentColor;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 2rem;
    align-items: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1.5rem;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    text-decoration: none;
    border: 1px solid var(--line);
    background: var(--surface-2);
    color: var(--text);
    transition: all 0.3s ease;
}

.btn:hover {
    background: var(--surface-3);
    border-color: var(--line-strong);
}

.btn::after {
    content: "→";
    transition: transform 0.3s ease;
}

.btn:hover::after {
    transform: translateX(4px);
}

.btn.primary {
    background: var(--accent);
    border-color: var(--accent);
    color: #0d0d0f;
}

.btn.primary:hover {
    filter: brightness(1.12);
}

.btn.ghost {
    background: transparent;
}

.btn-note {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   App list (apps/index.html)
   -------------------------------------------------------------------------- */

.app-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.app-row {
    display: grid;
    grid-template-columns: 96px 1fr auto;
    gap: 2rem;
    align-items: start;
    padding: 2rem;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.app-row:hover {
    background: var(--surface-3);
    border-color: var(--line-strong);
    transform: translateY(-2px);
}

.app-icon {
    width: 96px;
    height: 96px;
    border-radius: 20px;
    overflow: hidden;
    background: var(--bg);
    border: 1px solid var(--line);
}

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

/* Icon drawn in CSS for apps without artwork yet */
.app-icon.drawn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, #202326 0%, #16181a 100%);
    position: relative;
}

.app-icon.drawn .bars {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    height: 46px;
}

.app-icon.drawn .bars i {
    display: block;
    width: 8px;
    border-radius: 2px;
}

.app-icon.drawn .bars i:nth-child(1) { height: 40%; background: #3fb0a0; }
.app-icon.drawn .bars i:nth-child(2) { height: 68%; background: #e3cb94; }
.app-icon.drawn .bars i:nth-child(3) { height: 100%; background: #f04e23; }
.app-icon.drawn .bars i:nth-child(4) { height: 55%; background: #e3cb94; }

.app-meta h2 {
    font-size: 1.6rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 0.35rem;
}

.app-meta .app-tagline {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 1rem;
    max-width: 55ch;
}

.app-facts {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-family: var(--mono);
}

.app-cta {
    align-self: center;
    font-size: 1.5rem;
    color: var(--text-muted);
    transition: transform 0.3s ease, color 0.3s ease;
}

.app-row:hover .app-cta {
    color: var(--text);
    transform: translateX(4px);
}

/* --------------------------------------------------------------------------
   Tech tags
   -------------------------------------------------------------------------- */

.tag-group h3 {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.75rem;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tags span {
    padding: 0.25rem 0.7rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--line);
    border-radius: 4px;
    font-size: 0.8rem;
    color: var(--text-dim);
}

/* --------------------------------------------------------------------------
   Media
   -------------------------------------------------------------------------- */

figure {
    margin: 0;
}

.shot {
    border: 1px solid var(--line);
    border-radius: 6px;
    overflow: hidden;
    background: var(--bg);
}

.shot img {
    width: 100%;
    height: auto;
}

figcaption {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.75rem;
}

.hero-shot {
    margin-top: 3rem;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

/* Uniform crop so the captions in a gallery row sit on the same line */
.gallery .shot {
    aspect-ratio: 1;
}

.gallery .shot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --------------------------------------------------------------------------
   Feature / step lists
   -------------------------------------------------------------------------- */

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 1.25rem;
    margin-top: 2rem;
}

.card {
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--line);
    border-radius: 6px;
}

.card h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.card p {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin: 0;
}

.card .num {
    display: block;
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--accent);
    margin-bottom: 0.75rem;
    letter-spacing: 0.08em;
}

/* Definition-style list: label on the left, description on the right */
.spec-list {
    list-style: none;
    margin-top: 2rem;
    border-top: 1px solid var(--line);
}

.spec-list li {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 2rem;
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--line);
}

.spec-list .label {
    font-weight: 500;
    font-size: 0.95rem;
}

.spec-list .label .sub {
    display: block;
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 400;
    margin-top: 0.2rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.spec-list .desc {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* The signal chain, rendered as a row of stages */
.chain {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
    font-family: var(--mono);
    font-size: 0.85rem;
}

.chain span {
    padding: 0.5rem 0.9rem;
    border: 1px solid var(--line-strong);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
}

.chain em {
    color: var(--text-muted);
    font-style: normal;
}

/* Zone strip: LOW / MID / HIGH */
.zones {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.zone {
    padding: 1.5rem;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.03);
    border-top: 3px solid var(--zone, var(--accent));
}

.zone h3 {
    font-family: var(--mono);
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    color: var(--zone, var(--accent));
    margin-bottom: 0.6rem;
}

.zone p {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin: 0;
}

/* --------------------------------------------------------------------------
   Callout (privacy, status, etc.)
   -------------------------------------------------------------------------- */

.callout {
    padding: 2rem;
    border: 1px solid var(--line);
    border-left: 3px solid var(--accent);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.03);
    margin-top: 2rem;
}

.callout h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.callout p {
    color: var(--text-muted);
    font-size: 0.98rem;
    margin-bottom: 0.9rem;
    max-width: 68ch;
}

.callout p:last-child {
    margin-bottom: 0;
}

/* Q&A pairs */
.qa {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.qa .q {
    font-size: 1.05rem;
    font-weight: 500;
    margin-bottom: 0.6rem;
}

.qa .a {
    color: var(--text-muted);
    font-size: 0.98rem;
    max-width: 68ch;
}

.qa .a p {
    margin-bottom: 0.8rem;
}

.qa .a p:last-child {
    margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

footer {
    padding: 5rem 0;
    border-top: 1px solid var(--line);
}

footer .container {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
    align-items: center;
}

footer p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

footer a {
    color: var(--text-dim);
    text-decoration: none;
    border-bottom: 1px solid var(--line-strong);
}

footer a:hover {
    color: var(--text);
}

.footer-links {
    display: flex;
    gap: 1.5rem;
    font-size: 0.9rem;
}

.footer-links a {
    border-bottom: none;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 820px) {
    :root {
        --pad: 1.5rem;
    }

    header.page-header {
        padding: 3.5rem 0 2.5rem;
    }

    h1 {
        font-size: 2.4rem;
        max-width: none;
    }

    .lede {
        font-size: 1.1rem;
    }

    .section-heading {
        font-size: 1.7rem;
    }

    section {
        padding: 3rem 0;
    }

    .nav-links {
        margin-left: 0;
        width: 100%;
    }

    .nav-wrapper {
        gap: 0.75rem;
    }

    .app-row {
        grid-template-columns: 64px 1fr;
        gap: 1.25rem;
        padding: 1.5rem;
    }

    .app-icon {
        width: 64px;
        height: 64px;
        border-radius: 14px;
    }

    .app-cta {
        display: none;
    }

    .app-meta h2 {
        font-size: 1.3rem;
    }

    .spec-list li {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    footer .container {
        flex-direction: column;
        align-items: flex-start;
    }
}
