/* ReplyMark portal — Liquid Glass shared base.
   Per-vertical tints applied via [data-vertical="..."] on <html>, set by inline script
   reading ?v= URL param. Mirrors ~/replymark2/storefronts/_shared/storefront.css. */

:root {
  /* Base canvas */
  --paper: #f4f3ee;
  --ink: #1a1a1f;
  --slate: rgba(26, 26, 31, 0.62);
  --slate-soft: rgba(26, 26, 31, 0.45);
  --line: rgba(26, 26, 31, 0.08);

  /* Default tints — soft amber + lavender + cyan (no vertical / shared portal default) */
  --tint-orb-1: #fcd34d;
  --tint-orb-2: #f0abfc;
  --tint-orb-3: #67e8f9;
  --tint-grad-1: #fef3c7;
  --tint-grad-2: #ddd6fe;
  --tint-grad-3: #bae6fd;
  --tint-shimmer-a: #6366f1;
  --tint-shimmer-b: #ec4899;
  --tint-shimmer-c: #06b6d4;
  --tint-tick: #16a34a;
  --tint-cta: #d97706;

  --display: 'Fraunces', ui-serif, Georgia, serif;
  --sans: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;

  --glass-bg: rgba(255, 255, 255, 0.42);
  --glass-bg-strong: rgba(255, 255, 255, 0.58);
  --glass-bg-soft: rgba(255, 255, 255, 0.28);
  --glass-border: rgba(255, 255, 255, 0.7);
  --glass-blur: blur(28px) saturate(150%);
  --glass-blur-soft: blur(20px) saturate(140%);
  --glass-shadow: 0 20px 60px rgba(20, 20, 40, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.95);
  --glass-shadow-soft: 0 8px 32px rgba(20, 20, 40, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

/* Per-vertical tint overrides — applied via <html data-vertical="..."> by inline JS */
html[data-vertical="pressmark"] {
  --tint-orb-1: #fcd34d;
  --tint-orb-2: #f59e0b;
  --tint-orb-3: #fde68a;
  --tint-grad-1: #fef3c7;
  --tint-grad-2: #fed7aa;
  --tint-grad-3: #fef9c3;
  --tint-shimmer-a: #f59e0b;
  --tint-shimmer-b: #d97706;
  --tint-shimmer-c: #ec4899;
  --tint-tick: #d97706;
  --tint-cta: #d97706;
}
html[data-vertical="acquisitionpilot"] {
  --tint-orb-1: #6ee7b7;
  --tint-orb-2: #34d399;
  --tint-orb-3: #a7f3d0;
  --tint-grad-1: #d1fae5;
  --tint-grad-2: #a7f3d0;
  --tint-grad-3: #ddd6fe;
  --tint-shimmer-a: #10b981;
  --tint-shimmer-b: #6366f1;
  --tint-shimmer-c: #06b6d4;
  --tint-tick: #059669;
  --tint-cta: #059669;
}
html[data-vertical="coldreply"] {
  --tint-orb-1: #67e8f9;
  --tint-orb-2: #38bdf8;
  --tint-orb-3: #a5f3fc;
  --tint-grad-1: #cffafe;
  --tint-grad-2: #bae6fd;
  --tint-grad-3: #ddd6fe;
  --tint-shimmer-a: #06b6d4;
  --tint-shimmer-b: #3b82f6;
  --tint-shimmer-c: #8b5cf6;
  --tint-tick: #0891b2;
  --tint-cta: #0891b2;
}

/* Reset */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }

body {
  background:
    radial-gradient(circle 320px at 8% 12%, color-mix(in srgb, var(--tint-orb-1) 55%, transparent), transparent 70%),
    radial-gradient(circle 280px at 92% 28%, color-mix(in srgb, var(--tint-orb-2) 55%, transparent), transparent 70%),
    radial-gradient(circle 360px at 68% 88%, color-mix(in srgb, var(--tint-orb-3) 55%, transparent), transparent 70%),
    radial-gradient(ellipse 80% 60% at 0% 0%, var(--tint-grad-1) 0%, transparent 55%),
    radial-gradient(ellipse 70% 50% at 100% 0%, var(--tint-grad-2) 0%, transparent 55%),
    radial-gradient(ellipse 90% 70% at 50% 100%, var(--tint-grad-3) 0%, transparent 55%),
    var(--paper);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--ink); color: var(--paper); }

a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

img { max-width: 100%; height: auto; display: block; }

/* Typography helpers */
.lg-display { font-family: var(--display); font-weight: 500; letter-spacing: -0.02em; }
.lg-kicker {
  font-size: 11px; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--slate); font-weight: 500;
}
.lg-emphasis {
  font-style: italic;
  background: linear-gradient(120deg, var(--tint-shimmer-a), var(--tint-shimmer-b), var(--tint-shimmer-c));
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: lg-shimmer 5s ease-in-out infinite;
}
@keyframes lg-shimmer {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

/* Centered single-card layout (start, index) */
.lg-center {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.lg-card {
  position: relative;
  z-index: 1;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 44px 36px;
  width: 100%;
  max-width: 440px;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shadow);
}
.lg-brand {
  font-family: var(--display);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
  text-align: center;
}
.lg-brand .parent { font-size: 12px; color: var(--slate); margin-left: .4rem; font-family: var(--sans); font-weight: 400; }
.lg-headline {
  font-family: var(--display);
  font-size: clamp(1.65rem, 3vw, 2.1rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-weight: 500;
  margin-bottom: 8px;
  text-align: center;
  text-wrap: balance;
}
.lg-biz-name {
  display: block;
  font-family: var(--display);
  font-style: italic;
  font-size: 2.25rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 14px 0 18px;
  text-align: center;
  background: linear-gradient(120deg, var(--tint-shimmer-a), var(--tint-shimmer-b), var(--tint-shimmer-c));
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: lg-shimmer 5s ease-in-out infinite;
  text-wrap: balance;
}
.lg-subline {
  font-size: 14px;
  color: var(--slate);
  margin-bottom: 28px;
  line-height: 1.55;
  text-align: center;
}

/* Buttons */
.lg-btn {
  width: 100%;
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: .95rem 1.6rem;
  border-radius: 999px;
  font-size: 15px; font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: var(--sans);
  transition: transform .2s ease, background .2s ease, color .2s ease, box-shadow .2s ease;
}
.lg-btn-primary {
  background: var(--ink);
  color: var(--paper);
  box-shadow: 0 10px 32px rgba(26, 26, 31, 0.18);
}
.lg-btn-primary:hover { transform: translateY(-2px); background: #000; box-shadow: 0 16px 50px rgba(26, 26, 31, 0.28); }
.lg-btn-primary:disabled { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: none; }
.lg-btn-glass {
  background: var(--glass-bg-strong);
  color: var(--ink);
  border-color: var(--glass-border);
  backdrop-filter: var(--glass-blur-soft);
  -webkit-backdrop-filter: var(--glass-blur-soft);
  box-shadow: var(--glass-shadow-soft);
}
.lg-btn-glass:hover { background: rgba(255, 255, 255, 0.78); transform: translateY(-2px); }
.lg-btn-glass:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

/* Google sign-in button — keep as glass with the brand SVG */
.lg-btn-google {
  background: var(--glass-bg-strong);
  color: var(--ink);
  border: 1px solid var(--glass-border);
  font-weight: 500;
  font-size: 15px;
  backdrop-filter: var(--glass-blur-soft);
  -webkit-backdrop-filter: var(--glass-blur-soft);
}
.lg-btn-google:hover { background: rgba(255, 255, 255, 0.85); }
.lg-btn-google svg { width: 18px; height: 18px; }

/* Inputs */
.lg-field { margin-bottom: 16px; }
.lg-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--slate);
  letter-spacing: 0.04em;
  margin-bottom: 6px;
  text-transform: uppercase;
}
.lg-input,
.lg-textarea,
.lg-select {
  width: 100%;
  padding: 12px 14px;
  background: var(--glass-bg-strong);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  font-size: 15px;
  color: var(--ink);
  font-family: inherit;
  outline: none;
  backdrop-filter: var(--glass-blur-soft);
  -webkit-backdrop-filter: var(--glass-blur-soft);
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.lg-input:focus,
.lg-textarea:focus,
.lg-select:focus {
  background: rgba(255, 255, 255, 0.82);
  border-color: var(--ink);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--tint-shimmer-a) 18%, transparent);
}
.lg-textarea { resize: vertical; min-height: 88px; line-height: 1.5; }
.lg-hint { font-size: 12px; color: var(--slate-soft); margin-top: 5px; line-height: 1.5; }

/* Divider */
.lg-divider {
  display: flex; align-items: center; gap: 10px;
  margin: 18px 0;
  color: var(--slate-soft);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.lg-divider::before, .lg-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* Error banner */
.lg-error {
  background: rgba(254, 226, 226, 0.62);
  border: 1px solid rgba(220, 38, 38, 0.28);
  color: #b91c1c;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
  margin-bottom: 16px;
  display: none;
  backdrop-filter: var(--glass-blur-soft);
  -webkit-backdrop-filter: var(--glass-blur-soft);
}

/* Loading state */
.lg-loading { display: none; text-align: center; padding: 12px 0; }
.lg-spinner {
  width: 32px; height: 32px;
  border: 3px solid color-mix(in srgb, var(--tint-shimmer-a) 18%, transparent);
  border-top-color: var(--tint-shimmer-a);
  border-radius: 50%;
  animation: lg-spin 0.7s linear infinite;
  margin: 0 auto 14px;
}
@keyframes lg-spin { to { transform: rotate(360deg); } }
.lg-loading-text { font-size: 14px; color: var(--slate); }

/* Privacy note */
.lg-privacy {
  font-size: 11px;
  color: var(--slate-soft);
  text-align: center;
  margin-top: 14px;
  line-height: 1.5;
}

/* Header layout (dashboard / settings) */
.lg-header {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--glass-border);
  padding: 0 24px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 40;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset;
}
.lg-header-nav { display: flex; align-items: center; gap: 14px; }
.lg-nav-link {
  padding: .5rem .9rem;
  font-size: 13px;
  border-radius: 999px;
  color: var(--slate);
  transition: background .2s ease, color .2s ease;
}
.lg-nav-link:hover { background: var(--glass-bg-strong); color: var(--ink); }
.lg-sign-out {
  font-size: 13px;
  color: var(--slate);
  cursor: pointer;
  background: none;
  border: none;
  padding: 6px 12px;
  border-radius: 999px;
  font-family: var(--sans);
  transition: color 0.15s, background 0.15s;
}
.lg-sign-out:hover { color: var(--ink); background: var(--glass-bg-strong); }

/* Page layout */
.lg-main { padding: 32px 24px; max-width: 720px; margin: 0 auto; position: relative; z-index: 1; }
.lg-page-title {
  font-family: var(--display);
  font-size: 2rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  text-wrap: balance;
}
.lg-page-sub {
  font-size: 14px;
  color: var(--slate);
  margin-bottom: 32px;
  max-width: 56ch;
  line-height: 1.6;
}

/* Content cards (settings sections, dashboard cards) */
.lg-section {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 22px;
  padding: 24px 26px;
  margin-bottom: 18px;
  backdrop-filter: var(--glass-blur-soft);
  -webkit-backdrop-filter: var(--glass-blur-soft);
  box-shadow: var(--glass-shadow-soft);
}
.lg-section-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--slate);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

/* Stats bar (dashboard) */
.lg-stats {
  background: var(--glass-bg-soft);
  backdrop-filter: var(--glass-blur-soft);
  -webkit-backdrop-filter: var(--glass-blur-soft);
  border-bottom: 1px solid var(--glass-border);
  padding: 18px 24px;
  display: flex;
  gap: 36px;
  overflow-x: auto;
  position: sticky;
  top: 68px;
  z-index: 30;
}
.lg-stat { min-width: 90px; }
.lg-stat-value {
  font-family: var(--display);
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.lg-stat-label {
  font-size: 11px;
  color: var(--slate);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-top: 4px;
}

/* Latitude bar (dashboard) */
.lg-latitude {
  background: color-mix(in srgb, var(--tint-shimmer-a) 12%, var(--glass-bg-soft));
  backdrop-filter: var(--glass-blur-soft);
  -webkit-backdrop-filter: var(--glass-blur-soft);
  border-bottom: 1px solid var(--glass-border);
  padding: 14px 24px;
  font-size: 13px;
  position: sticky;
  top: 138px;
  z-index: 25;
  color: var(--ink);
  display: none;
}
.lg-latitude.show { display: block; }
.lg-latitude.unlocked { background: color-mix(in srgb, var(--tint-tick) 16%, var(--glass-bg-soft)); }
.lg-latitude-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.lg-progress { height: 6px; background: var(--line); border-radius: 999px; margin-top: 8px; overflow: hidden; }
.lg-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--tint-shimmer-a), var(--tint-shimmer-b));
  border-radius: 999px;
  transition: width 0.3s;
}
.lg-latitude-btn {
  white-space: nowrap;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink);
  background: var(--glass-bg-strong);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  padding: 6px 14px;
  cursor: pointer;
  font-family: var(--sans);
  transition: background .2s ease, transform .15s ease;
}
.lg-latitude-btn:hover { background: rgba(255, 255, 255, 0.85); transform: translateY(-1px); }

/* Recent / queue cards */
.lg-recent-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  padding: 16px 18px;
  margin-bottom: 12px;
  backdrop-filter: var(--glass-blur-soft);
  -webkit-backdrop-filter: var(--glass-blur-soft);
  box-shadow: var(--glass-shadow-soft);
  transition: transform .25s ease, box-shadow .25s ease;
}
.lg-recent-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 50px rgba(20, 20, 40, 0.10), inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

/* Pill / badge */
.lg-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--tint-tick) 18%, transparent);
  color: var(--tint-tick);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .lg-emphasis, .lg-biz-name { animation: none !important; }
  .lg-btn, .lg-recent-card, .lg-section { transition: none !important; }
}
