/* public-site.css — marketing pages (Home / Services / About / Contact /
 * Privacy / Terms). Steel-Indigo gradient hero + glass cards over the same
 * vc-* token system used by the logged-in app. */

.vc-pub {
  font-family: inherit;
  color: var(--vc-text-high);
  line-height: 1.6;
  background: var(--vc-bg-base);
  min-height: 100vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  height: 100dvh;
}

/* ---------- Top nav ---------- */
.vc-pub__nav {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 28px;
  background: color-mix(in srgb, var(--vc-bg-base) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--vc-border);
}
.vc-pub__brand {
  font-size: 18px;
  font-weight: 800;
  background: linear-gradient(120deg, var(--vc-primary), var(--vc-accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-decoration: none;
}
.vc-pub__nav-links {
  display: flex;
  gap: 18px;
  margin-left: auto;
  align-items: center;
  flex-wrap: wrap;
}
.vc-pub__nav-links a {
  color: var(--vc-text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 120ms ease;
}
.vc-pub__nav-links a:hover,
.vc-pub__nav-links a.active { color: var(--vc-text-high); }
.vc-pub__nav-cta {
  background: linear-gradient(120deg, var(--vc-primary), var(--vc-accent));
  color: #fff;
  padding: 8px 18px;
  border-radius: var(--vc-radius-pill);
  font-weight: 600;
}
.vc-pub__nav-cta:hover { filter: brightness(1.1); color: #fff; }

/* ---------- Hero ---------- */
.vc-pub__hero {
  position: relative;
  padding: 80px 24px 96px;
  text-align: center;
  overflow: hidden;
  background:
    radial-gradient(60% 60% at 50% 0%, color-mix(in srgb, var(--vc-primary) 22%, transparent), transparent 70%),
    radial-gradient(40% 40% at 80% 30%, color-mix(in srgb, var(--vc-accent) 18%, transparent), transparent 70%);
  border-bottom: 1px solid var(--vc-border);
}
.vc-pub__hero::before {
  content: "";
  position: absolute;
  top: -40%;
  left: -20%;
  width: 140%;
  height: 140%;
  background: conic-gradient(from 180deg, transparent, color-mix(in srgb, var(--vc-primary) 8%, transparent), transparent, color-mix(in srgb, var(--vc-accent) 6%, transparent), transparent);
  animation: vc-hero-spin 20s linear infinite;
  pointer-events: none;
}
@keyframes vc-hero-spin { to { transform: rotate(360deg); } }
.vc-pub__hero h1 {
  position: relative;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.1;
  font-weight: 800;
  margin: 0 0 18px;
  max-width: 980px;
  margin-left: auto;
  margin-right: auto;
  background: linear-gradient(120deg, #fff 30%, color-mix(in srgb, var(--vc-primary) 60%, #fff) 60%, var(--vc-accent));
  background-size: 200% auto;
  animation: vc-hero-text 4s ease-in-out infinite alternate;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
@keyframes vc-hero-text { to { background-position: 200% center; } }
.vc-pub__hero p.lead {
  position: relative;
  font-size: clamp(15px, 1.6vw, 19px);
  max-width: 800px;
  margin: 0 auto 32px;
  color: var(--vc-text-muted);
}
.vc-pub__cta-row {
  position: relative;
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: nowrap;
  margin-top: 28px;
}
.vc-pub__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 32px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  transition: all 200ms ease;
  flex: 1;
  max-width: 220px;
}
.vc-pub__btn i { font-size: 18px; }
.vc-pub__btn--primary {
  background: linear-gradient(135deg, var(--vc-primary), var(--vc-accent));
  color: #fff;
  box-shadow: 0 4px 24px color-mix(in srgb, var(--vc-primary) 40%, transparent), 0 0 60px color-mix(in srgb, var(--vc-accent) 20%, transparent);
  position: relative;
}
.vc-pub__btn--primary::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--vc-primary), var(--vc-accent), var(--vc-primary));
  background-size: 200% auto;
  animation: vc-btn-glow 3s ease-in-out infinite alternate;
  z-index: -1;
  opacity: 0.5;
  filter: blur(8px);
}
@keyframes vc-btn-glow { to { background-position: 200% center; } }
.vc-pub__btn--login {
  background: linear-gradient(135deg, rgba(99,102,241,.15), rgba(168,85,247,.15));
  color: #fff;
  border: 1px solid rgba(139,92,246,.35);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 16px rgba(139,92,246,.15);
}
.vc-pub__btn--ghost {
  background: transparent;
  color: var(--vc-text-high);
  border: 1px solid var(--vc-border);
}
.vc-pub__btn--primary:hover { transform: translateY(-2px); box-shadow: 0 6px 32px color-mix(in srgb, var(--vc-primary) 50%, transparent), 0 0 80px color-mix(in srgb, var(--vc-accent) 30%, transparent); }
.vc-pub__btn--login:hover { transform: translateY(-2px); background: linear-gradient(135deg, rgba(99,102,241,.25), rgba(168,85,247,.25)); border-color: rgba(139,92,246,.5); box-shadow: 0 4px 24px rgba(139,92,246,.25); }
.vc-pub__btn:hover { filter: brightness(1.1); }

/* ---------- Sections ---------- */
.vc-pub__section {
  padding: 72px 24px;
  max-width: 1240px;
  margin: 0 auto;
}
.vc-pub__section--alt { background: var(--vc-bg-elevated); border-block: 1px solid var(--vc-border); max-width: none; }
.vc-pub__section--alt > .vc-pub__inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 72px 24px;
}
.vc-pub__h2 {
  text-align: center;
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 800;
  margin: 0 0 12px;
  color: var(--vc-text-high);
}
.vc-pub__sub {
  text-align: center;
  font-size: 16px;
  color: var(--vc-text-muted);
  max-width: 760px;
  margin: 0 auto 40px;
}

/* ---------- Grids ---------- */
.vc-pub__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.vc-pub__card {
  background: var(--vc-bg-glass);
  border: 1px solid var(--vc-border);
  border-radius: var(--vc-radius-lg);
  padding: 22px;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}
.vc-pub__card:hover {
  transform: translateY(-3px);
  border-color: var(--vc-primary);
  box-shadow: 0 12px 32px color-mix(in srgb, var(--vc-primary) 15%, transparent);
}
.vc-pub__card h3 {
  margin: 0 0 8px;
  font-size: 16px;
  color: var(--vc-text-high);
  font-weight: 700;
}
.vc-pub__card h3 .num {
  display: inline-block;
  margin-right: 8px;
  background: linear-gradient(120deg, var(--vc-primary), var(--vc-accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 900;
}
.vc-pub__card p {
  margin: 0;
  font-size: 14px;
  color: var(--vc-text-muted);
  line-height: 1.55;
}

/* ---------- Stat strip ---------- */
.vc-pub__stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-top: 40px;
}
.vc-pub__stat {
  background: var(--vc-bg-glass);
  border: 1px solid var(--vc-border);
  border-radius: var(--vc-radius);
  padding: 18px 20px;
  text-align: center;
}
.vc-pub__stat-val {
  font-size: 28px;
  font-weight: 800;
  background: linear-gradient(120deg, var(--vc-primary), var(--vc-accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.vc-pub__stat-lbl {
  font-size: 12px;
  color: var(--vc-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 4px;
}

/* ---------- Prose (Privacy / Terms) ---------- */
.vc-pub__prose {
  max-width: 820px;
  margin: 0 auto;
  font-size: 15px;
  color: var(--vc-text-high);
}
.vc-pub__prose h2 {
  margin: 32px 0 12px;
  font-size: 22px;
  color: var(--vc-text-high);
}
.vc-pub__prose h3 {
  margin: 24px 0 8px;
  font-size: 17px;
  color: var(--vc-text-high);
}
.vc-pub__prose p, .vc-pub__prose li {
  color: var(--vc-text-muted);
  line-height: 1.65;
}
.vc-pub__prose ul { padding-left: 22px; }
.vc-pub__prose strong { color: var(--vc-text-high); }

/* ---------- Footer ---------- */
.vc-pub__footer {
  background: var(--vc-bg-elevated);
  border-top: 1px solid var(--vc-border);
  padding: 40px 24px 28px;
  margin-top: 60px;
}
.vc-pub__footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
}
@media (max-width: 720px) {
  .vc-pub__footer-inner { grid-template-columns: 1fr 1fr; }
}
.vc-pub__footer h4 {
  margin: 0 0 12px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--vc-text-muted);
}
.vc-pub__footer a {
  display: block;
  color: var(--vc-text-muted);
  text-decoration: none;
  margin-bottom: 6px;
  font-size: 14px;
  transition: color 120ms ease;
}
.vc-pub__footer a:hover { color: var(--vc-text-high); }
.vc-pub__footer-legal {
  border-top: 1px solid var(--vc-border);
  margin-top: 28px;
  padding-top: 16px;
  font-size: 12px;
  color: var(--vc-text-muted);
  text-align: center;
}

/* ---------- Contact form ---------- */
.vc-pub__form {
  max-width: 560px;
  margin: 0 auto;
  display: grid;
  gap: 14px;
}
.vc-pub__form input,
.vc-pub__form textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--vc-bg-surface);
  border: 1px solid var(--vc-border);
  border-radius: var(--vc-radius);
  color: var(--vc-text-high);
  font: inherit;
}
.vc-pub__form input:focus,
.vc-pub__form textarea:focus {
  outline: none;
  border-color: var(--vc-primary);
  box-shadow: 0 0 0 3px var(--vc-primary-soft);
}
.vc-pub__form textarea { min-height: 140px; resize: vertical; }

/* ---------- Hamburger toggle (CSS-only, no JS) ----------
 * Hidden checkbox + label drives the mobile menu. Always hidden on
 * desktop (.vc-pub__nav-burger { display: none; }) — the @media block
 * below shows it under 720 px and rearranges the nav. */
.vc-pub__nav-toggle { display: none; }
.vc-pub__nav-burger { display: none; }
.vc-pub__nav-cta--mobile { display: none; }   /* desktop hides this; mobile shows it */
.vc-pub__nav-cta--desktop { /* visible on desktop, hidden on mobile */ }

/* ========================================================== */
/* ============== MAUI shell — force mobile always ============ */
/* ========================================================== */
/*
 * When the page renders inside the MAUI WebView we set
 *   <body data-shell="maui">
 * + a mobile viewport (width=480) via App.razor. The viewport meta alone
 * triggers every @media (max-width: 720px) rule below regardless of the
 * device's physical pixels — so iPadOS / Windows MAUI shells get the
 * same compact UI as phones with NO duplication of mobile rules.
 *
 * For belt-and-braces (devices that may ignore the viewport meta), we
 * also constrain the body width so any rule keyed on the physical
 * viewport still sees the mobile layout.
 */
body[data-shell="maui"] {
  max-width: 480px;
  margin: 0 auto;
}

/* ========================================================== */
/* ============== Mobile-first responsive layer ============== */
/* ========================================================== */

/* ------ Tablets (≤ 960 px): tighten section padding ------ */
@media (max-width: 960px) {
  .vc-pub__hero { padding: 64px 22px 72px; }
  .vc-pub__section,
  .vc-pub__section--alt > .vc-pub__inner { padding: 56px 22px; }
  .vc-pub__sub { margin-bottom: 32px; }
}

/* ------ Phones (≤ 720 px): mobile-first overhaul ------ */
@media (max-width: 720px) {
  /* Nav: [☰] [brand] ... [Sign-in] */
  .vc-pub__nav {
    padding: 10px 14px;
    gap: 10px;
    position: sticky;
    flex-wrap: wrap;        /* allow expanded links to flow under nav */
  }

  /* Burger shown */
  .vc-pub__nav-burger {
    order: 0;
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    padding: 8px;
    cursor: pointer;
    background: transparent;
    border: 0;
    border-radius: var(--vc-radius);
  }
  .vc-pub__nav-burger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--vc-text-high);
    margin: 2.5px 0;
    border-radius: 1px;
    transition: transform 200ms ease, opacity 200ms ease;
  }

  /* Brand centred-ish between burger and CTA */
  .vc-pub__brand { order: 1; font-size: 17px; }

  /* Mobile Sign-in chip on right; desktop one hidden */
  .vc-pub__nav-cta--mobile {
    order: 2;
    display: inline-flex;
    margin-left: auto;
    padding: 8px 14px;
    font-size: 13px;
  }
  .vc-pub__nav-cta--desktop { display: none; }

  /* Links: collapsed below nav by default; checkbox :checked unfolds */
  .vc-pub__nav-links {
    order: 3;
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;   /* override the desktop's align-items: center
                               which would otherwise centre each link in the
                               mobile vertical stack */
    gap: 0;
    padding: 6px 0 4px;
    margin-top: 4px;
    border-top: 1px solid var(--vc-border);
    display: none;
  }
  .vc-pub__nav-toggle:checked ~ .vc-pub__nav-links { display: flex; }

  /* Hide the desktop Sign-in chip when we're in the mobile drawer — bump
     specificity above the .vc-pub__nav-links a rule below. */
  .vc-pub__nav-links .vc-pub__nav-cta--desktop { display: none !important; }

  /* Burger → X animation when checked */
  .vc-pub__nav-toggle:checked ~ .vc-pub__nav-burger span:nth-child(1) {
    transform: translateY(5px) rotate(45deg);
  }
  .vc-pub__nav-toggle:checked ~ .vc-pub__nav-burger span:nth-child(2) { opacity: 0; }
  .vc-pub__nav-toggle:checked ~ .vc-pub__nav-burger span:nth-child(3) {
    transform: translateY(-5px) rotate(-45deg);
  }

  .vc-pub__nav-links a {
    display: block;
    width: 100%;
    padding: 12px 14px;
    text-align: left;       /* defeat any inherited text-align: center */
    font-size: 15px;
    border-bottom: 1px solid var(--vc-border);
  }
  .vc-pub__nav-links a:last-child { border-bottom: 0; }

  /* Hero: compact */
  .vc-pub__hero { padding: 48px 18px 52px; }
  .vc-pub__hero h1 {
    font-size: clamp(26px, 7.5vw, 36px);
    line-height: 1.15;
    margin-bottom: 14px;
  }
  .vc-pub__hero p.lead { font-size: 15px; margin-bottom: 22px; }

  /* CTA buttons side-by-side, ≥ 44 px touch target */
  .vc-pub__cta-row { gap: 10px; flex-direction: row; }
  .vc-pub__btn {
    padding: 13px 20px;
    font-size: 15px;
    min-height: 44px;
    flex: 1;
    max-width: 360px;
  }

  /* Sections */
  .vc-pub__section,
  .vc-pub__section--alt > .vc-pub__inner { padding: 44px 18px; }
  .vc-pub__h2 { font-size: clamp(22px, 6.5vw, 28px); margin-bottom: 10px; }
  .vc-pub__sub { font-size: 14.5px; margin-bottom: 26px; }

  /* Card grids compact, full-width cards */
  .vc-pub__grid { grid-template-columns: 1fr; gap: 10px; }
  .vc-pub__card { padding: 16px; border-radius: var(--vc-radius); }
  .vc-pub__card h3 { font-size: 15px; }
  .vc-pub__card p { font-size: 13.5px; line-height: 1.5; }
  /* Disable hover-lift on touch */
  .vc-pub__card:hover { transform: none; box-shadow: none; border-color: var(--vc-border); }

  /* Stats: 2 columns on phones */
  .vc-pub__stats { grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 28px; }
  .vc-pub__stat { padding: 12px; }
  .vc-pub__stat-val { font-size: 22px; }
  .vc-pub__stat-lbl { font-size: 10.5px; }

  /* Prose (Privacy / Terms) */
  .vc-pub__prose { font-size: 14.5px; }
  .vc-pub__prose h2 { font-size: 19px; margin: 28px 0 10px; }
  .vc-pub__prose h3 { font-size: 16px; margin: 22px 0 8px; }
  .vc-pub__prose ul { padding-left: 18px; }

  /* Form */
  .vc-pub__form input,
  .vc-pub__form textarea { padding: 13px 14px; font-size: 15px; }

  /* Footer */
  .vc-pub__footer { padding: 30px 18px 22px; margin-top: 40px; }
  .vc-pub__footer-inner { gap: 20px; }
  .vc-pub__footer-legal { font-size: 11.5px; margin-top: 20px; }
}

/* ------ Small phones (≤ 480 px): single-column footer + tighter ------ */
@media (max-width: 480px) {
  .vc-pub__hero { padding: 40px 14px 44px; }
  .vc-pub__hero h1 { font-size: clamp(22px, 8vw, 28px); }
  .vc-pub__section,
  .vc-pub__section--alt > .vc-pub__inner { padding: 36px 14px; }
  .vc-pub__h2 { font-size: 22px; }
  .vc-pub__card { padding: 14px; }
  /* Footer keeps a 2-col grid for the link lists on narrow screens —
     a single-column dump felt long and unaligned. Brand block spans both. */
  .vc-pub__footer { padding: 24px 14px 18px; margin-top: 32px; }
  .vc-pub__footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 18px 12px;
    text-align: left;
  }
  .vc-pub__footer-inner > :first-child { grid-column: 1 / -1; }  /* brand row */
  .vc-pub__footer h4 { margin-top: 0; }
}

/* ------ Touch-only devices: kill hover transforms + bigger taps ------ */
@media (hover: none) and (pointer: coarse) {
  .vc-pub__card:hover { transform: none; box-shadow: none; }
  .vc-pub__btn:hover { transform: none; }
  .vc-pub__nav-links a { min-height: 44px; display: flex; align-items: center; }
}
