/*
 * css/public.css — public marketing shell for pay.u.cash (navbar + footer + content pages).
 * Scoped to .uxc-public so it never leaks into the authenticated admin app.
 * Theme: AUTO — light by default, dark via @media (prefers-color-scheme: dark) AND forced dark
 * under .uxc-dark-mode (the login page forces it). Both themes driven by CSS variables.
 * Keep UXC_PUBLIC_VER (public-init.php) in sync with UXC_ASSET_VER when this file changes.
 */

/* ---------- theme tokens ---------- */
.uxc-public {
    --bg: #ffffff;
    --bg-soft: #faf7f2;
    --bg-card: #ffffff;
    --ink: #1c1a17;
    --mut: #6b665e;
    --ink-soft: #44403b;
    --line: #ece4d6;
    --g: #a37a29;
    --g2: #c69a3f;
    --g-ink: #6b4f15;
    --radius: 0;
    --shadow: 0 1px 3px rgba(28, 26, 23, .06);
    --maxw: 1080px;

    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
/* OS dark */
@media (prefers-color-scheme: dark) {
    .uxc-public {
        --bg: #000000;
        --bg-soft: #1d1b15;
        --bg-card: #1d1b15;
        --ink: #ece4d6;
        --mut: #9a938a;
        --ink-soft: #c3bcb0;
        --line: #322d22;
        --g: #c69a3f;
        --g2: #e0b85a;
        --g-ink: #e0b85a;
        --shadow: 0 1px 3px rgba(0, 0, 0, .35);
    }
}
/* forced dark (the login page adds .uxc-dark-mode to <html>/<body>) — wins by specificity */
.uxc-dark-mode .uxc-public {
    --bg: #000000;
    --bg-soft: #1d1b15;
    --bg-card: #1d1b15;
    --ink: #ece4d6;
    --mut: #9a938a;
    --ink-soft: #c3bcb0;
    --line: #322d22;
    --g: #c69a3f;
    --g2: #e0b85a;
    --g-ink: #e0b85a;
    --shadow: 0 1px 3px rgba(0, 0, 0, .35);
}

/* Login page forces .uxc-dark-mode on <html>; pure black (#000) matches the global admin dark
   bg (css/admin.css). Both the OS-dark (@media prefers-color-scheme) and forced-dark (.uxc-dark-mode)
   paths now use #000, so content pages and the login page share the same pure-black background. */
html.uxc-dark-mode { background-color: #000000; }
.uxc-public * { box-sizing: border-box; }
/* Buttons carry .uxc-public-btn; exclude them from this link rule so their own color wins —
   otherwise .uxc-public a's gold (0,1,1) clobbers .uxc-public-btn-primary's #000 / -ghost's ink. */
.uxc-public a:not(.uxc-public-btn) { color: var(--g); text-decoration: none; }
.uxc-public a:not(.uxc-public-btn):hover { text-decoration: underline; }
.uxc-public img { max-width: 100%; }
/* keyboard focus — gold ring; :focus-visible so mouse users never see it */
.uxc-public :is(a, button):focus-visible { outline: 2px solid var(--g); outline-offset: 2px; }
/* branded text selection */
.uxc-public ::selection { background: var(--g); color: #000; }

/* ---------- navbar ---------- */
.uxc-public-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: saturate(180%) blur(10px);
    -webkit-backdrop-filter: saturate(180%) blur(10px);
}
.uxc-public-nav-inner {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 20px;
    height: 60px;
    display: flex;
    align-items: center;
    gap: 22px;
}
.uxc-public-brand {
    display: flex;
    align-items: center;
    gap: 9px;
    font-weight: 700;
    font-size: 17px;
    letter-spacing: -.01em;
    color: var(--ink);
}
.uxc-public-brand:hover { text-decoration: none; }
.uxc-public-brand img { height: 28px; width: auto; display: block; }
.uxc-public-brand .uxc-public-logo-dark { display: none; }
@media (prefers-color-scheme: dark) {
    .uxc-public-brand .uxc-public-logo-light { display: none; }
    .uxc-public-brand .uxc-public-logo-dark { display: block; }
}
.uxc-dark-mode .uxc-public-brand .uxc-public-logo-light { display: none; }
.uxc-dark-mode .uxc-public-brand .uxc-public-logo-dark { display: block; }

.uxc-public-links {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 24px;
}
.uxc-public-links a {
    color: var(--mut);
    font-size: 14.5px;
    font-weight: 500;
}
.uxc-public-links a:hover { color: var(--ink); text-decoration: none; }
.uxc-public-links a.uxc-public-active { color: var(--g); }
.uxc-public-signin {
    border: 1px solid var(--line);
    padding: 7px 16px;
    border-radius: 0;
    color: var(--ink) !important;
    transition: background .15s, border-color .15s;
}
.uxc-public-signin:hover { background: var(--bg-soft); border-color: var(--g); }

.uxc-public-toggle {
    display: none;
    margin-left: auto;
    background: none;
    border: 1px solid var(--line);
    border-radius: 0;
    color: var(--ink);
    font-size: 20px;
    width: 42px;
    height: 38px;
    cursor: pointer;
    line-height: 1;
}
.uxc-public-toggle svg { display: block; width: 16px; height: 16px; margin: 0 auto; }
.uxc-public-toggle[aria-expanded="true"] svg { transform: scaleX(-1); }

/* ---------- main / layout ---------- */
.uxc-public-main { flex: 1 0 auto; }
.uxc-public-wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.uxc-public-section { padding: 64px 0; border-top: 1px solid var(--line); }
.uxc-public-section:first-child { border-top: 0; }

.uxc-public h1 { font-size: 40px; line-height: 1.15; letter-spacing: -.02em; margin: 0 0 16px; font-weight: 700; }
.uxc-public h2 { font-size: 26px; line-height: 1.25; letter-spacing: -.01em; margin: 0 0 12px; font-weight: 700; }
.uxc-public h3 { font-size: 18px; margin: 0 0 8px; font-weight: 600; }
.uxc-public p { margin: 0 0 14px; color: var(--ink-soft); }
.uxc-public-lead { font-size: 19px; color: var(--mut); max-width: 680px; }
.uxc-public-eyebrow { color: var(--g); font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 12px; }

/* hero */
.uxc-public-hero { padding: 84px 0 56px; }
.uxc-public-hero h1 { max-width: 820px; }
.uxc-public-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 26px; }
.uxc-public-btn { display: inline-block; text-decoration: none; padding: 12px 24px; border-radius: 0; font-weight: 600; font-size: 15px; transition: transform .12s, background .15s, border-color .15s; }
.uxc-public-btn:hover { text-decoration: none; transform: translateY(-1px); }
.uxc-public-btn:active { transform: translateY(0); }
.uxc-public-btn-primary { background: var(--g); color: #000; }
.uxc-public-btn-primary:hover { background: var(--g2); }
.uxc-public-btn-ghost { border: 1px solid var(--line); color: var(--ink); }
.uxc-public-btn-ghost:hover { border-color: var(--g); background: var(--bg-soft); }

/* cards / grids */
.uxc-public-grid { display: grid; gap: 20px; grid-template-columns: repeat(3, 1fr); margin-top: 28px; }
.uxc-public-card { background: var(--bg-card); border: 1px solid var(--line); border-radius: 0; padding: 24px; box-shadow: var(--shadow); transition: border-color .15s, transform .15s, box-shadow .15s; }
.uxc-public-card:hover { border-color: var(--g); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0, 0, 0, .10); }
.uxc-public-card h3 { color: var(--ink); }
.uxc-public-card .uxc-public-ic { font-size: 24px; }
.uxc-public-card p:last-child { margin-bottom: 0; }

/* principles */
.uxc-public-principle { display: flex; gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.uxc-public-principle:last-child { border-bottom: 0; }
.uxc-public-principle .uxc-public-pmark { color: var(--g); font-weight: 700; flex: 0 0 28px; }

/* pricing */
.uxc-public-table { width: 100%; border-collapse: collapse; margin-top: 24px; }
.uxc-public-table th, .uxc-public-table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.uxc-public-table th { color: var(--mut); font-size: 13px; text-transform: uppercase; letter-spacing: .05em; }
.uxc-public-table td { color: var(--ink); }
.uxc-public-table td.uxc-public-num { text-align: right; font-variant-numeric: tabular-nums; }
.uxc-public-table tbody tr { transition: border-color .15s, color .15s; }
/* fleet hover law: never a background wash - transparent bg, gold border + text */
.uxc-public-table tbody tr:hover { background: transparent; }
.uxc-public-table tbody tr:hover > td { border-color: var(--g); color: var(--g); }

/* faq */
.uxc-public-faq { margin-top: 24px; }
.uxc-public-faq-item { border-bottom: 1px solid var(--line); padding: 16px 0; }
.uxc-public-faq-q { font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.uxc-public-faq-a { color: var(--ink-soft); margin: 0; }

/* contact */
.uxc-public-contact-list { list-style: none; padding: 0; margin: 24px 0 0; }
.uxc-public-contact-list li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.uxc-public-contact-list li:last-child { border-bottom: 0; }

.uxc-public-callout { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 0; padding: 22px 26px; margin-top: 28px; }
.uxc-public-callout p:last-child { margin-bottom: 0; }

/* ---------- footer ---------- */
.uxc-public-footer { flex-shrink: 0; margin-top: 40px; }
.uxc-public-footer-inner { max-width: var(--maxw); margin: 0 auto; padding: 26px 20px 6px; display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: center; flex-direction: column; text-align: center; }
.uxc-public-footer-brand { color: var(--mut); font-size: 14px; }
.uxc-public-footer-brand strong { color: var(--ink); font-weight: 600; }
.uxc-public-footer-links { display: flex; flex-wrap: wrap; gap: 18px; }
.uxc-public-footer-links a { color: var(--mut); font-size: 14px; }
.uxc-public-footer-links a:hover { color: var(--ink); }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
    .uxc-public-grid { grid-template-columns: repeat(2, 1fr); }
    .uxc-public-hero { padding: 56px 0 36px; }
    .uxc-public h1 { font-size: 32px; }
}
@media (max-width: 720px) {
    .uxc-public-toggle { display: block; }
    /* Apps launcher stays in the bar at every width (operator 2026-09-16): host rides
       .uxc-public-nav-inner (never the collapsed links panel); auto-margin moves to the
       host so [brand ... apps | burger] clusters right with the launcher LEFT of the burger. */
    #uxc-appdrawer-host { order: 1; margin-left: auto; }
    .uxc-public-toggle { order: 2; margin-left: 0; }
    .uxc-public-links {
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        background: var(--bg);
        border-bottom: 1px solid var(--line);
        padding: 8px 20px 16px;
        box-shadow: var(--shadow);
        display: none;
    }
    .uxc-public-nav.uxc-public-nav-open .uxc-public-links { display: flex; }
    .uxc-public-links a { width: 100%; padding: 12px 0; border-bottom: 1px solid var(--line); }
    .uxc-public-links a:last-child { border-bottom: 0; }
    .uxc-public-signin { margin-top: 8px; width: auto; }
}
@media (max-width: 560px) {
    .uxc-public-grid { grid-template-columns: 1fr; }
    .uxc-public-section { padding: 44px 0; }
    .uxc-public h1 { font-size: 27px; }
}

/* (the 2026-09-10 .hero watermark block was dropped 2026-09-16 when this sheet
   became the uxc/css/public.css kit canon: dead code on every consumer + its one
   url("/media/background.svg") would mis-resolve against cdn.u.cash - the sheet
   is now reference-free.) */
/* ── transitions.dev accordion (2026-09-16) ──────────────────────────────────
   FAQ disclosure: height animates via grid-template-rows 0fr <-> 1fr (no JS
   measuring), chevron flips scaleY (works everywhere, unlike d: path morph).
   Vars + component classes follow the kit's t-* scale; public pages don't load
   the kit, so the needed block is vendored here. */
:root {
  --acc-expand: 250ms;
  --acc-collapse: 250ms;
  --acc-chevron: 250ms;
  --acc-ease: cubic-bezier(0.22, 1, 0.36, 1);
}
button.uxc-public-faq-q { /* now a <button>: reset to the old heading look (button-scoped 2026-09-16 so legacy <div> q-lines on forks keep the base rule) */
  all: unset;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  box-sizing: border-box;
  cursor: pointer;
  font: inherit;
  color: inherit;
}
button.uxc-public-faq-q:focus-visible { outline: 2px solid var(--accent, #a37a29); outline-offset: 2px; }
.t-acc-chevron { display: inline-flex; transform: scaleY(1); transform-origin: center; transition: transform var(--acc-chevron) var(--acc-ease); color: var(--muted, #75705f); }
.t-acc-chevron svg { display: block; width: 16px; height: 16px; }
.t-acc-chevron path { vector-effect: non-scaling-stroke; }
.t-acc[data-open="true"] .t-acc-chevron { transform: scaleY(-1); }
.t-acc-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--acc-collapse) var(--acc-ease); }
.t-acc[data-open="true"] .t-acc-panel { grid-template-rows: 1fr; transition: grid-template-rows var(--acc-expand) var(--acc-ease); }
.t-acc-panel-inner { overflow: hidden; opacity: 0; filter: blur(2px); transition: opacity var(--acc-collapse) var(--acc-ease), filter var(--acc-collapse) var(--acc-ease); }
.t-acc[data-open="true"] .t-acc-panel-inner { opacity: 1; filter: blur(0); transition: opacity var(--acc-expand) var(--acc-ease), filter var(--acc-expand) var(--acc-ease); }
@media (prefers-reduced-motion: reduce) {
  .t-acc-panel, .t-acc-panel-inner, .t-acc-chevron { transition: none !important; }
}

