/* Public site. Bootstrap does the layout; this is the small amount of identity on top of it. */

:root {
    --ow-accent: #3b5bdb;
    --ow-accent-soft: rgba(59, 91, 219, 0.12);
    --ow-ink: #14161a;
    --ow-muted: #5c6470;
    --ow-line: #e3e6ec;
    --ow-surface: #ffffff;
    --ow-canvas: #f7f8fa;
    --ow-radius: 14px;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    background: var(--ow-canvas);
    color: var(--ow-ink);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Focus rings are removed by a lot of resets. Keeping a visible one is the difference between a
   keyboard-navigable site and one that silently is not. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.btn:focus-visible {
    outline: 3px solid var(--ow-accent);
    outline-offset: 2px;
    box-shadow: none;
}

.site-nav {
    background: var(--ow-surface);
    border-bottom: 1px solid var(--ow-line);
}

.site-nav .navbar-brand {
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--ow-ink);
}

.site-nav .nav-link {
    color: var(--ow-muted);
    font-weight: 500;
}

.site-nav .nav-link:hover,
.site-nav .nav-link.is-active {
    color: var(--ow-accent);
}

.site-main {
    flex: 1 0 auto;
}

.site-footer {
    background: var(--ow-surface);
    border-top: 1px solid var(--ow-line);
    color: var(--ow-muted);
    font-size: 0.9rem;
    margin-top: 4rem;
    padding: 2rem 0;
}

.site-footer a {
    color: var(--ow-muted);
    text-decoration: none;
}

.site-footer a:hover {
    color: var(--ow-accent);
    text-decoration: underline;
}

.hero {
    padding: 4.5rem 0 3rem;
}

.hero__title {
    font-size: clamp(2rem, 5vw, 3.25rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 1rem;
}

.hero__lede {
    color: var(--ow-muted);
    font-size: clamp(1.05rem, 2.2vw, 1.35rem);
    max-width: 46rem;
}

.section-heading {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--ow-muted);
    margin-bottom: 1rem;
}

.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr));
    gap: 1.25rem;
}

.app-card {
    background: var(--ow-surface);
    border: 1px solid var(--ow-line);
    border-radius: var(--ow-radius);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    text-decoration: none;
    color: inherit;
    transition: border-color 120ms ease, transform 120ms ease, box-shadow 120ms ease;

    /* The accent is per-app and set inline from the record, so a card falls back to the site
       accent rather than to nothing when an app has not chosen one. */
    border-top: 3px solid var(--app-accent, var(--ow-accent));
}

.app-card:hover {
    border-color: var(--app-accent, var(--ow-accent));
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(20, 22, 26, 0.07);
}

.app-card__head {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.app-card__icon {
    width: 3rem;
    height: 3rem;
    border-radius: 12px;
    object-fit: cover;
    background: var(--ow-accent-soft);
    flex: 0 0 auto;
}

.app-card__icon--placeholder {
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--app-accent, var(--ow-accent));
    background: var(--ow-accent-soft);
}

.app-card__name {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0;
}

.app-card__tagline {
    color: var(--ow-muted);
    margin: 0;
}

.app-card__meta {
    margin-top: auto;
    padding-top: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    border-radius: 999px;
    padding: 0.2rem 0.65rem;
    font-size: 0.78rem;
    font-weight: 600;
    background: var(--ow-accent-soft);
    color: var(--ow-accent);
}

.pill--quiet {
    background: #eef0f4;
    color: var(--ow-muted);
}

.panel {
    background: var(--ow-surface);
    border: 1px solid var(--ow-line);
    border-radius: var(--ow-radius);
    padding: 1.75rem;
}

.prose {
    max-width: 46rem;
}

.prose h2 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-top: 2.25rem;
    margin-bottom: 0.75rem;
}

.prose h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-top: 1.75rem;
    margin-bottom: 0.5rem;
}

.prose p,
.prose li {
    color: #2c313a;
    line-height: 1.65;
}

.prose code {
    background: #eef0f4;
    border-radius: 5px;
    padding: 0.12em 0.38em;
    font-size: 0.9em;
    color: #b03060;
}

.prose pre {
    background: #14161a;
    color: #e8ecf1;
    border-radius: 10px;
    padding: 1rem 1.15rem;
    overflow-x: auto;
    font-size: 0.86rem;
    line-height: 1.55;
}

.prose pre code {
    background: none;
    color: inherit;
    padding: 0;
}

.endpoint {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
    flex-wrap: wrap;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.88rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--ow-line);
}

.endpoint:last-child {
    border-bottom: none;
}

.endpoint__verb {
    font-weight: 700;
    min-width: 4.2rem;
    color: var(--ow-accent);
}

.endpoint__note {
    color: var(--ow-muted);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 0.85rem;
}

/* Long paths must scroll inside the row rather than widening the page on a phone. */
.table-scroll {
    overflow-x: auto;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .app-card {
        transition: none;
    }

    .app-card:hover {
        transform: none;
    }
}
