/* ============================================================
   DevOpser app landing pages (apps/*.html) and the apps hub (apps.html).
   One page per fleet property: say plainly what it is, show it, then send
   the reader to the real app. Builds on devopser-2026.css tokens.
   --app is each app's own brand accent and appears only on the screenshot
   glow and the how-it-works markers; pink stays the action colour.
   ============================================================ */

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

/* ---------- breadcrumb ---------- */
.crumbs { padding-top: 1.4rem; }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.35rem; font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-3); }
.crumbs li + li::before { content: "/"; margin-right: 0.35rem; color: var(--text-4); }
.crumbs a { color: var(--text-2); text-decoration: none; }
.crumbs a:hover { color: var(--pink-3); }

/* ---------- hero ---------- */
.app-hero { padding: clamp(1.75rem, 4vw, 3rem) 0 clamp(2.5rem, 6vw, 4.5rem); }
.app-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(1.75rem, 4vw, 3.5rem); align-items: center; }
.app-unit { display: flex; align-items: center; gap: 0.55rem; margin: 0 0 1rem; font-family: var(--font-mono); font-size: 0.78rem; color: var(--text-2); }
.app-h1 { margin: 0; font-family: var(--font-display); font-weight: 900; text-transform: uppercase; line-height: 0.9; letter-spacing: -0.015em; font-size: clamp(2.6rem, 6vw, 4.6rem); color: var(--text); }
.app-h1 .kind { display: block; margin-top: 0.6rem; font-family: var(--font-body); font-weight: 600; text-transform: none; letter-spacing: 0; line-height: 1.25; font-size: clamp(1.15rem, 2.1vw, 1.45rem); color: var(--text-2); }
.app-lead { max-width: 52ch; margin: 1.25rem 0 1.6rem; font-family: var(--font-body); font-size: clamp(1.02rem, 1.3vw, 1.12rem); line-height: 1.6; color: var(--text-2); }
.app-cta { display: flex; flex-wrap: wrap; gap: 0.8rem; align-items: center; }
.app-fine { margin: 0.9rem 0 0; font-family: var(--font-body); font-size: 0.88rem; color: var(--text-3); }
.ext { display: inline-block; margin-left: 0.3rem; font-size: 0.9em; }

/* the real product, framed as a browser window */
.app-shot { margin: 0; border: 1px solid var(--rule-2); border-radius: var(--radius-card); overflow: hidden; background: #05070f; box-shadow: 0 40px 80px -46px var(--app-glow, rgba(237, 22, 108, 0.5)), 0 0 0 1px rgba(255, 255, 255, 0.02); }
.app-shot .bar { display: flex; align-items: center; gap: 6px; padding: 0.6rem 0.8rem; border-bottom: 1px solid var(--rule); background: var(--ink-2); }
.app-shot .bar i { width: 9px; height: 9px; border-radius: 50%; background: #2a3350; }
.app-shot .bar span { margin-left: 0.6rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-3); }
.app-shot img { display: block; width: 100%; max-width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top center; }

/* ---------- at-a-glance record ---------- */
.app-spec { padding: 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); background: var(--ink-2); }
.spec { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; }
.spec > div { padding: 1.15rem 1.25rem 1.2rem 0; }
.spec > div + div { padding-left: 1.25rem; border-left: 1px solid var(--rule); }
.spec dt { margin: 0 0 0.35rem; font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-3); }
.spec dd { margin: 0; font-family: var(--font-body); font-size: 0.98rem; line-height: 1.4; color: var(--text); }

/* ---------- sections ---------- */
.app-sec { padding: clamp(3rem, 7vw, 5rem) 0; }
.app-sec + .app-sec { border-top: 1px solid var(--rule); }
.app-h2 { margin: 0 0 1.1rem; font-family: var(--font-display); font-weight: 900; text-transform: uppercase; line-height: 0.95; letter-spacing: -0.01em; font-size: clamp(1.9rem, 3.6vw, 2.7rem); color: var(--text); }
.app-intro { max-width: 64ch; margin: 0; font-family: var(--font-body); font-size: 1.04rem; line-height: 1.65; color: var(--text-2); }
.app-prose { max-width: 68ch; }
.app-prose p { margin: 0 0 1.05rem; font-family: var(--font-body); font-size: 1.06rem; line-height: 1.7; color: var(--text-2); }
.app-prose p:last-child { margin-bottom: 0; }
.app-prose strong { color: var(--text); font-weight: 600; }
.app-prose a, .app-note a, .faq a { color: var(--pink-3); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.app-two { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(1.5rem, 5vw, 4rem); align-items: start; }

/* how it works: a real sequence, so the steps are numbered */
.steps { list-style: none; counter-reset: step; margin: 1.8rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(var(--steps, 3), minmax(0, 1fr)); gap: 1rem; }
.steps > li { counter-increment: step; padding: 1.35rem 1.3rem 1.4rem; background: var(--ink-2); border: 1px solid var(--rule); border-top: 2px solid var(--app, var(--pink)); border-radius: 0 0 var(--radius-card) var(--radius-card); }
.steps > li::before { content: counter(step); display: block; margin-bottom: 0.6rem; font-family: var(--font-display); font-weight: 900; font-size: 2.2rem; line-height: 1; color: var(--app, var(--pink)); }
.steps h3 { margin: 0 0 0.4rem; font-family: var(--font-body); font-weight: 700; font-size: 1.05rem; color: var(--text); }
.steps p { margin: 0; font-family: var(--font-body); font-size: 0.95rem; line-height: 1.55; color: var(--text-2); }

/* features: a two-column definition list, not a card grid */
.feats { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 2.5rem; }
.feats > div { padding: 1.05rem 0; border-top: 1px solid var(--rule); }
.feats dt { margin: 0 0 0.3rem; font-family: var(--font-body); font-weight: 700; font-size: 1rem; color: var(--text); }
.feats dd { margin: 0; font-family: var(--font-body); font-size: 0.95rem; line-height: 1.55; color: var(--text-2); }

.who { list-style: none; margin: 1.2rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.55rem; }
.who li { padding: 0.45rem 0.9rem; font-family: var(--font-body); font-size: 0.95rem; color: var(--text); background: var(--ink-3); border: 1px solid var(--rule-2); border-radius: var(--radius-pill); }

/* tables: pricing, roster */
.app-table-wrap { overflow-x: auto; margin-top: 1.4rem; border: 1px solid var(--rule); border-radius: var(--radius-card); }
.app-table { width: 100%; min-width: 520px; border-collapse: collapse; font-family: var(--font-body); font-size: 0.95rem; }
.app-table th, .app-table td { padding: 0.8rem 1rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--rule); }
.app-table thead th { font-family: var(--font-mono); font-size: 0.7rem; font-weight: 500; color: var(--text-3); background: var(--ink-2); }
.app-table tbody th { font-weight: 700; color: var(--text); }
.app-table td { color: var(--text-2); }
.app-table tr:last-child th, .app-table tr:last-child td { border-bottom: 0; }
.app-note { max-width: 70ch; margin: 0.8rem 0 0; font-family: var(--font-body); font-size: 0.88rem; line-height: 1.55; color: var(--text-3); }

/* link lists: guides, categories */
.linklist { list-style: none; margin: 1.2rem 0 0; padding: 0; columns: 2; column-gap: 2.5rem; }
.linklist li { break-inside: avoid; padding: 0.55rem 0; border-top: 1px solid var(--rule); }
.linklist a { font-family: var(--font-body); font-size: 0.98rem; color: var(--text); text-decoration: none; }
.linklist a:hover { color: var(--pink-3); }
.linklist span { display: block; margin-top: 0.15rem; font-family: var(--font-body); font-size: 0.85rem; color: var(--text-3); }

/* ---------- FAQ ---------- */
.faq { max-width: 78ch; margin-top: 1.2rem; }
.faq details { border-top: 1px solid var(--rule); }
.faq details:last-child { border-bottom: 1px solid var(--rule); }
.faq summary { position: relative; padding: 1.05rem 2.4rem 1.05rem 0; cursor: pointer; list-style: none; font-family: var(--font-body); font-weight: 600; font-size: 1.02rem; color: var(--text); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0.2rem; top: 50%; transform: translateY(-50%); font-family: var(--font-mono); font-size: 1.2rem; color: var(--pink-3); }
.faq details[open] summary::after { content: "\2212"; }
.faq summary:focus-visible { outline: 2px solid var(--pink-3); outline-offset: 2px; }
.faq details p { max-width: 70ch; margin: 0 0 1.1rem; font-family: var(--font-body); font-size: 0.98rem; line-height: 1.65; color: var(--text-2); }

/* ---------- closing CTA ---------- */
.app-close { padding: clamp(3rem, 7vw, 5rem) 0; border-top: 1px solid var(--rule); background: radial-gradient(800px 380px at 85% 100%, rgba(237, 22, 108, 0.1), transparent 62%), var(--ink-2); }
.app-close-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr); gap: 2rem; align-items: end; }
.app-close .app-h2 { margin: 0; }
.app-close-grid > div > p { max-width: 52ch; margin: 0.9rem 0 0; font-family: var(--font-body); font-size: 1.02rem; line-height: 1.6; color: var(--text-2); }
.app-close .app-cta { justify-content: flex-start; }

/* ---------- related: more of the fleet + further reading ---------- */
.related-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: clamp(2rem, 5vw, 4rem); }
.app-h3 { margin: 0 0 0.9rem; font-family: var(--font-display); font-weight: 800; text-transform: uppercase; letter-spacing: 0.01em; font-size: 1.35rem; color: var(--text); }
.fleet-links, .read-links { list-style: none; margin: 0; padding: 0; }
.fleet-links li, .read-links li { border-top: 1px solid var(--rule); }
.fleet-links a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem; align-items: baseline; padding: 0.9rem 0; text-decoration: none; }
.fleet-links b { font-family: var(--font-body); font-weight: 700; font-size: 1rem; color: var(--text); }
.fleet-links small { display: block; margin-top: 0.2rem; font-family: var(--font-body); font-size: 0.9rem; font-weight: 400; color: var(--text-2); }
.fleet-links .host { font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-3); white-space: nowrap; }
.fleet-links a:hover b { color: var(--pink-3); }
.read-links a { display: block; padding: 0.7rem 0; font-family: var(--font-body); font-size: 0.95rem; line-height: 1.4; color: var(--text-2); text-decoration: none; }
.read-links a:hover { color: var(--pink-3); }
.all-apps { display: inline-block; margin-top: 1rem; font-family: var(--font-body); font-size: 0.95rem; color: var(--pink-3); }

/* ---------- mobile sticky CTA (js/app-page.js reveals it once the hero CTA scrolls away) ---------- */
.app-sticky { display: none; }
@media (max-width: 720px) {
  body.app-page { padding-bottom: 4.6rem; }
  .app-sticky { display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; padding: 0.7rem var(--pad) calc(0.7rem + env(safe-area-inset-bottom)); background: rgba(10, 14, 26, 0.97); border-top: 1px solid var(--rule); transform: translateY(110%); transition: transform 0.2s ease; }
  .app-sticky.is-shown { transform: none; }
  .app-sticky .btn-primary { display: block; width: 100%; text-align: center; }
  html.nav-open .app-sticky { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .app-sticky { transition: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .app-hero-grid, .app-two, .app-close-grid, .related-grid { grid-template-columns: minmax(0, 1fr); }
  .spec { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .spec > div:nth-child(odd) { padding-left: 0; border-left: 0; }
  .spec > div:nth-child(n + 3) { border-top: 1px solid var(--rule); }
  .steps { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 620px) {
  .feats { grid-template-columns: minmax(0, 1fr); }
  .linklist { columns: 1; }
  .app-cta .btn-primary, .app-cta .btn-secondary { flex: 1 1 100%; text-align: center; }
}

/* ---------- apps hub (apps.html) ---------- */
.hub-head { padding: clamp(1.75rem, 4vw, 3rem) 0 0; }
.hub-head .app-h1 { font-size: clamp(2.6rem, 6.4vw, 5rem); }
.hub-list { list-style: none; margin: 2.4rem 0 0; padding: 0; border-top: 1px solid var(--rule); }
.hub-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr) auto; gap: 1.5rem; align-items: center; padding: 1.4rem 0; border-bottom: 1px solid var(--rule); }
.hub-row h2 { margin: 0; font-family: var(--font-display); font-weight: 900; text-transform: uppercase; line-height: 0.95; font-size: clamp(1.5rem, 2.6vw, 2rem); }
.hub-row h2 a { color: var(--text); text-decoration: none; }
.hub-row h2 a:hover { color: var(--pink-3); }
.hub-row .host { display: flex; align-items: center; gap: 0.45rem; margin-top: 0.45rem; font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-3); }
.hub-row p { margin: 0; font-family: var(--font-body); font-size: 0.98rem; line-height: 1.5; color: var(--text-2); }
.hub-row .go { display: flex; flex-direction: column; align-items: flex-end; gap: 0.4rem; font-family: var(--font-body); font-size: 0.92rem; white-space: nowrap; }
.hub-row .go a { color: var(--pink-3); text-decoration: none; }
.hub-row .go a.visit { color: var(--text-2); }
.hub-row .go a:hover { text-decoration: underline; }
@media (max-width: 820px) {
  .hub-row { grid-template-columns: minmax(0, 1fr); gap: 0.55rem; }
  .hub-row .go { flex-direction: row; align-items: center; gap: 1.2rem; margin-top: 0.2rem; }
}

/* ---------- helpers (classes, not inline styles: the site CSP has no 'unsafe-inline') ---------- */
.vh { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.steps-3 { --steps: 3; }
.steps-4 { --steps: 4; }
@media (max-width: 1100px) { .steps-4 { --steps: 2; } }
@media (max-width: 900px) { .steps-4 { --steps: 1; } }
.app-prose code, .app-note code { font-family: var(--font-mono); font-size: 0.9em; color: var(--text); background: var(--ink-3); border: 1px solid var(--rule); border-radius: 4px; padding: 0.05em 0.35em; }
.app-code { margin: 1.4rem 0 0; padding: 1.1rem 1.25rem; overflow-x: auto; background: #070b16; border: 1px solid var(--rule); border-radius: var(--radius-card); font-family: var(--font-mono); font-size: 0.86rem; line-height: 1.75; color: var(--text); }
.app-code:focus-visible { outline: 2px solid var(--pink-3); outline-offset: 2px; }
.app-table-wrap + .app-table-wrap { margin-top: 1rem; }
.app-sec .who + .app-note { margin-top: 1rem; }

/* each app's own accent: screenshot glow + how-it-works markers */
.app-devopser-stores, .app-devopser-agents { --app: #ED166C; --app-glow: rgba(237, 22, 108, 0.5); }
.app-devopser-crm { --app: #ff3d8b; --app-glow: rgba(255, 61, 139, 0.45); }
.app-fairytale-genie { --app: #a78bfa; --app-glow: rgba(118, 75, 162, 0.65); }
.app-language-bazaar { --app: #2dbab1; --app-glow: rgba(45, 186, 177, 0.45); }
.app-harish-anglos { --app: #e07a52; --app-glow: rgba(177, 71, 36, 0.6); }
.app-actually-good-tools { --app: #ffd23f; --app-glow: rgba(255, 210, 63, 0.32); }
.app-marketaiguide { --app: #8f7cf0; --app-glow: rgba(75, 50, 195, 0.65); }

/* related-apps block reused on pages with their own light/dark section styles (e.g. services/devopser-lite.html) */
.app-sec.on-ink { background: var(--ink); border-top: 1px solid var(--rule); }
