/* ==================================================================
   Public marketing site (home page, and the anonymous view of
   terms.php / privacy-policy.php) — reuses the app's brand tokens
   (--ubs-primary etc. from style.css) but with its own nav/footer/
   section chrome, distinct from the internal logged-in app shell.
   ================================================================== */

.pub-body { background: #fff; color: var(--ubs-text, #1e2233); }

/* ---- Top nav ---- */
.pub-nav { background: var(--ubs-sidebar-bg, #0f1222); position: sticky; top: 0; z-index: 50; }
.pub-nav-inner { max-width: 1180px; margin: 0 auto; padding: .9rem 1.5rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.pub-brand { display: flex; align-items: center; gap: .6rem; color: #fff; text-decoration: none; font-weight: 800; font-size: 1.05rem; }
.pub-brand .brand-logo-badge { background: var(--ubs-primary, #d97706); color: #fff; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; }
.pub-brand .brand-logo-img { border-radius: 8px; object-fit: cover; }
.pub-nav-toggle { background: transparent; border: 1px solid rgba(255,255,255,.2); color: #fff; border-radius: 8px; padding: .3rem .6rem; font-size: 1.1rem; }
.pub-nav-links { display: flex; align-items: center; gap: 1.5rem; }
.pub-nav-links a:not(.btn) { color: #cbd0e0; text-decoration: none; font-size: .88rem; font-weight: 500; }
.pub-nav-links a:not(.btn):hover { color: #fff; }
.pub-nav-actions { display: flex; gap: .6rem; }

@media (max-width: 991.98px) {
  .pub-nav-links {
    position: absolute; top: 100%; left: 0; right: 0; background: var(--ubs-sidebar-bg, #0f1222);
    flex-direction: column; align-items: flex-start; gap: 1rem; padding: 1rem 1.5rem 1.5rem;
    display: none; border-top: 1px solid rgba(255,255,255,.08);
  }
  .pub-nav-links.pub-nav-links-open { display: flex; }
  .pub-nav-actions { width: 100%; }
  .pub-nav-actions .btn { flex: 1; }
}

/* ---- Hero ---- */
.pub-hero { background: linear-gradient(180deg, #0f1222 0%, #171b30 100%); color: #fff; padding: 5rem 1.5rem 6rem; position: relative; overflow: hidden; }
.pub-hero::before {
  content: ''; position: absolute; top: -120px; right: -120px; width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle, rgba(217,119,6,.35), transparent 70%);
}
.pub-hero-inner { max-width: 900px; margin: 0 auto; text-align: center; position: relative; }
.pub-eyebrow { display: inline-block; background: rgba(217,119,6,.15); color: #fbbf6d; border: 1px solid rgba(217,119,6,.35); font-size: .75rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: .35rem 1rem; border-radius: 99px; margin-bottom: 1.25rem; }
.pub-hero h1 { font-size: 2.6rem; font-weight: 800; line-height: 1.15; margin-bottom: 1.1rem; letter-spacing: -.01em; }
.pub-hero p.lead { color: #cbd0e0; font-size: 1.1rem; max-width: 640px; margin: 0 auto 2rem; line-height: 1.6; }
.pub-hero-ctas { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.pub-hero-ctas .btn { padding: .75rem 1.6rem; font-weight: 600; border-radius: 10px; }

@media (max-width: 575.98px) {
  .pub-hero { padding: 3.5rem 1.25rem 4rem; }
  .pub-hero h1 { font-size: 1.9rem; }
}

/* ---- Generic section shell ---- */
.pub-section { padding: 5rem 1.5rem; }
.pub-section-alt { background: var(--ubs-surface-alt, #f8f9fc); }
.pub-section-inner { max-width: 1100px; margin: 0 auto; }
.pub-section-head { text-align: center; max-width: 640px; margin: 0 auto 3rem; }
.pub-section-eyebrow { color: var(--ubs-primary, #d97706); font-weight: 700; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: .5rem; }
.pub-section-head h2 { font-size: 1.9rem; font-weight: 800; margin-bottom: .75rem; letter-spacing: -.01em; }
.pub-section-head p { color: var(--ubs-text-muted, #6b7280); line-height: 1.6; }

@media (max-width: 575.98px) {
  .pub-section { padding: 3rem 1.25rem; }
  .pub-section-head h2 { font-size: 1.5rem; }
}

/* ---- Trust/intro ---- */
.pub-trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.75rem; text-align: center; }
.pub-trust-grid i { font-size: 1.6rem; color: var(--ubs-primary, #d97706); margin-bottom: .75rem; display: block; }
.pub-trust-grid h4 { font-size: 1.02rem; font-weight: 700; margin-bottom: .4rem; }
.pub-trust-grid p { color: var(--ubs-text-muted, #6b7280); font-size: .88rem; line-height: 1.55; margin: 0; }
@media (max-width: 767.98px) { .pub-trust-grid { grid-template-columns: 1fr; gap: 2rem; } }

/* ---- Service cards ---- */
.pub-card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem; }
.pub-card {
  background: #fff; border: 1px solid var(--ubs-border, #e6e9f2); border-radius: 14px; padding: 1.75rem;
  transition: transform .15s ease, box-shadow .15s ease; height: 100%; display: flex; flex-direction: column;
}
.pub-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px -10px rgba(20,20,40,.15); }
.pub-card-icon {
  width: 46px; height: 46px; border-radius: 10px; background: var(--ubs-primary-light, #fef3c7); color: var(--ubs-primary-dark, #b45309);
  display: flex; align-items: center; justify-content: center; font-size: 1.3rem; margin-bottom: 1.1rem;
}
.pub-card h4 { font-size: 1.02rem; font-weight: 700; margin-bottom: .5rem; }
.pub-card p { color: var(--ubs-text-muted, #6b7280); font-size: .87rem; line-height: 1.6; margin-bottom: 0; flex: 1; }
.pub-card .pub-card-benefit { font-size: .78rem; font-weight: 600; color: var(--ubs-primary-dark, #b45309); margin-top: 1rem; }

/* ---- Process steps ---- */
.pub-process-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1.5rem; counter-reset: pub-step; }
.pub-process-step { text-align: left; }
.pub-process-num { font-size: 1.8rem; font-weight: 800; color: var(--ubs-primary, #d97706); opacity: .55; margin-bottom: .5rem; }
.pub-process-step h4 { font-size: .98rem; font-weight: 700; margin-bottom: .4rem; }
.pub-process-step p { color: var(--ubs-text-muted, #6b7280); font-size: .85rem; line-height: 1.55; margin: 0; }

/* ---- CTA band ---- */
.pub-cta { background: linear-gradient(135deg, var(--ubs-primary, #d97706), #92400e); color: #fff; border-radius: 20px; padding: 3.5rem 2rem; text-align: center; max-width: 1100px; margin: 0 auto; }
.pub-cta h2 { font-size: 1.8rem; font-weight: 800; margin-bottom: .6rem; }
.pub-cta p { color: rgba(255,255,255,.9); margin-bottom: 1.75rem; font-size: 1.02rem; }
.pub-cta .btn { padding: .75rem 2rem; font-weight: 700; border-radius: 10px; }
@media (max-width: 575.98px) { .pub-cta { padding: 2.5rem 1.25rem; border-radius: 14px; } .pub-cta h2 { font-size: 1.4rem; } }

/* ---- Footer ---- */
.pub-footer { background: var(--ubs-sidebar-bg, #0f1222); color: #b7bacb; padding: 3.5rem 1.5rem 1.5rem; }
.pub-footer-inner { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; margin-bottom: 2.5rem; }
.pub-footer-brand .pub-brand { color: #fff; }
.pub-footer-desc { font-size: .85rem; line-height: 1.6; max-width: 320px; margin: 0; }
.pub-footer-heading { color: #fff; font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; margin-bottom: .9rem; }
.pub-footer-col a { display: block; color: #b7bacb; text-decoration: none; font-size: .85rem; margin-bottom: .6rem; }
.pub-footer-col a:hover { color: #fff; }
.pub-footer-bottom { max-width: 1180px; margin: 0 auto; border-top: 1px solid rgba(255,255,255,.08); padding-top: 1.5rem; font-size: .78rem; text-align: center; }
@media (max-width: 767.98px) { .pub-footer-inner { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .pub-footer-inner { grid-template-columns: 1fr; } }

/* ---- Standalone legal page (terms/privacy, anonymous view) ---- */
.pub-legal-wrap { max-width: 820px; margin: 0 auto; padding: 3rem 1.5rem 4rem; }
.pub-legal-wrap h1 { font-size: 1.8rem; font-weight: 800; margin-bottom: .3rem; }
.pub-legal-wrap .pub-legal-meta { color: var(--ubs-text-muted, #6b7280); font-size: .85rem; margin-bottom: 2rem; }
.pub-legal-body { line-height: 1.7; }
.pub-legal-body h2, .pub-legal-body h3 { margin-top: 1.75rem; }
