/* ═══════════════════════════════════════════════
   LoyaltyOS Marketing Site — Design System
   ═══════════════════════════════════════════════ */

:root {
  --bg:          #090d12;
  --bg2:         #0e1219;
  --surface:     #111720;
  --surface2:    #161d28;
  --surface3:    #1c2535;
  --border:      #1f2a38;
  --border2:     #263140;
  --accent:      #4f7ef7;
  --accent-dark: #3563d4;
  --accent2:     #7c3aed;
  --accent-glow: rgba(79,126,247,0.15);
  --accent2-glow:rgba(124,58,237,0.12);
  --text:        #e8edf5;
  --text2:       #b0bcc8;
  --muted:       #6b7a8d;
  --muted2:      #3e4d5f;
  --green:       #22c55e;
  --amber:       #f59e0b;
  --red:         #ef4444;
  --cyan:        #06b6d4;

  --radius-sm:   8px;
  --radius-md:   12px;
  --radius-lg:   18px;
  --radius-xl:   24px;
  --nav-h:       68px;

  --shadow-card: 0 1px 3px rgba(0,0,0,0.4), 0 4px 16px rgba(0,0,0,0.2);
  --shadow-glow: 0 8px 32px rgba(79,126,247,0.25);
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
code, pre {
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', Consolas, monospace;
}

/* ── TYPOGRAPHY ── */
h1 { font-size: clamp(2.2rem, 4.5vw, 3.6rem); font-weight: 800; letter-spacing: -0.04em; line-height: 1.08; }
h2 { font-size: clamp(1.7rem, 3vw, 2.5rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1.15; }
h3 { font-size: 1.08rem; font-weight: 650; line-height: 1.35; }
h4 { font-size: 0.95rem; font-weight: 600; }
p   { color: var(--text2); }
.lead { font-size: 1.08rem; color: var(--text2); max-width: 600px; line-height: 1.8; }
.text-gradient {
  background: linear-gradient(130deg, #4f7ef7 0%, #a78bfa 55%, #38bdf8 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.section-label {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--accent); display: block; margin-bottom: 14px;
}

/* ── LAYOUT ── */
.container { max-width: 1160px; margin: 0 auto; padding: 0 5vw; }
section { padding: 88px 5vw; }
section.alt { background: var(--bg2); }
.divider { border: none; border-top: 1px solid var(--border); }

/* ── NAVIGATION ── */
.site-nav {
  position: sticky; top: 0; z-index: 200;
  height: var(--nav-h);
  background: rgba(9,13,18,0.85);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 5vw;
  gap: 40px;
}
.nav-logo {
  font-size: 1.1rem; font-weight: 800; letter-spacing: -0.04em;
  white-space: nowrap; flex-shrink: 0;
  display: flex; align-items: center; gap: 10px;
}
.nav-logo .logo-icon {
  width: 28px; height: 28px; border-radius: 7px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem;
}
.nav-menu {
  display: flex; align-items: center; gap: 2px; flex: 1;
}
.nav-menu a {
  font-size: 0.875rem; font-weight: 500; color: var(--muted);
  padding: 6px 14px; border-radius: var(--radius-sm);
  transition: color 0.18s, background 0.18s;
  white-space: nowrap;
}
.nav-menu a:hover { color: var(--text); background: var(--surface2); }
.nav-menu a.active { color: var(--text); }
.nav-menu .has-dropdown { position: relative; }
.nav-menu .has-dropdown > a::after { content: ' ▾'; font-size: 0.7rem; }
.dropdown {
  display: none; position: absolute; top: calc(100% + 8px); left: 0;
  background: var(--surface); border: 1px solid var(--border2);
  border-radius: var(--radius-md); padding: 8px; min-width: 200px;
  box-shadow: var(--shadow-card); z-index: 300;
}
.has-dropdown:hover .dropdown { display: flex; flex-direction: column; }
.dropdown a {
  padding: 9px 14px; border-radius: var(--radius-sm);
  font-size: 0.83rem; color: var(--text2);
}
.dropdown a:hover { background: var(--surface2); color: var(--text); }
.nav-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.btn-ghost {
  font-size: 0.875rem; font-weight: 600; color: var(--text2);
  padding: 8px 16px; border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.btn-ghost:hover { color: var(--text); border-color: var(--border2); }
.btn-nav {
  font-size: 0.875rem; font-weight: 600; color: #fff;
  background: var(--accent); padding: 9px 20px; border-radius: var(--radius-sm);
  border: none; cursor: pointer; transition: background 0.2s, transform 0.15s;
  white-space: nowrap;
}
.btn-nav:hover { background: var(--accent-dark); transform: translateY(-1px); }
.hamburger {
  display: none; flex-direction: column; gap: 5px; cursor: pointer;
  padding: 4px; margin-left: auto;
}
.hamburger span { width: 22px; height: 2px; background: var(--text2); border-radius: 2px; transition: all 0.2s; }
/* Mobile menu is hidden by default on desktop; the max-width:900px block below
   positions it and the .open class reveals it. Without this base rule it
   rendered as a stray row of links under the nav on wide screens. */
.mobile-menu { display: none; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 26px; border-radius: var(--radius-md);
  font-size: 0.92rem; font-weight: 600; cursor: pointer;
  transition: all 0.2s; border: none; text-decoration: none;
}
.btn-primary {
  background: var(--accent); color: #fff;
}
.btn-primary:hover { background: var(--accent-dark); transform: translateY(-2px); box-shadow: var(--shadow-glow); }
.btn-outline {
  background: transparent; color: var(--text);
  border: 1px solid var(--border2);
}
.btn-outline:hover { border-color: var(--accent); background: var(--accent-glow); transform: translateY(-2px); }
.btn-sm { padding: 9px 18px; font-size: 0.83rem; }
.btn-lg { padding: 16px 32px; font-size: 1rem; }

/* ── CARDS ── */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 32px;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  box-shadow: var(--shadow-card);
}
.card:hover { border-color: var(--border2); transform: translateY(-3px); box-shadow: 0 12px 40px rgba(0,0,0,0.3); }
.card-icon {
  width: 46px; height: 46px; border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.35rem; margin-bottom: 20px; flex-shrink: 0;
}
.icon-blue   { background: rgba(79,126,247,0.15); }
.icon-purple { background: rgba(124,58,237,0.15); }
.icon-green  { background: rgba(34,197,94,0.15); }
.icon-amber  { background: rgba(245,158,11,0.15); }
.icon-cyan   { background: rgba(6,182,212,0.15); }
.icon-rose   { background: rgba(244,63,94,0.15); }
.card h3 { margin-bottom: 10px; }
.card p  { font-size: 0.875rem; line-height: 1.75; }

/* ── GRID HELPERS ── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 1024px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 820px)  {
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px)  {
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr; }
}

/* ── BADGE / TAGS ── */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface2); border: 1px solid var(--border2);
  border-radius: 20px; padding: 5px 14px;
  font-size: 0.75rem; font-weight: 600; color: var(--muted);
}
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); flex-shrink: 0; }
.tag {
  display: inline-block; background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 3px 10px;
  font-size: 0.72rem; font-weight: 600; color: var(--muted); letter-spacing: 0.03em;
}
.tag.accent { background: rgba(79,126,247,0.12); border-color: rgba(79,126,247,0.3); color: #818cf8; }
.tag.green  { background: rgba(34,197,94,0.12);  border-color: rgba(34,197,94,0.3);  color: #4ade80; }
.tag.amber  { background: rgba(245,158,11,0.12); border-color: rgba(245,158,11,0.3); color: #fbbf24; }
.tag-row { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }

/* ── CODE BLOCK ── */
.code-block {
  background: #070b10; border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 24px 28px;
  overflow-x: auto; font-size: 0.82rem; line-height: 1.7;
  color: #a8c0d6;
}
.code-block .kw  { color: #7dd3fc; }
.code-block .str { color: #86efac; }
.code-block .num { color: #fb923c; }
.code-block .cm  { color: var(--muted); }
.code-block .fn  { color: #c084fc; }
.code-block .key { color: #f9a8d4; }
.code-header {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--surface2); border: 1px solid var(--border);
  border-bottom: none; border-radius: var(--radius-md) var(--radius-md) 0 0;
  padding: 10px 20px;
}
.code-header .dots { display: flex; gap: 6px; }
.code-header .dot-r { width: 12px; height: 12px; border-radius: 50%; background: #ef4444; }
.code-header .dot-y { width: 12px; height: 12px; border-radius: 50%; background: #f59e0b; }
.code-header .dot-g { width: 12px; height: 12px; border-radius: 50%; background: #22c55e; }
.code-header .filename { font-size: 0.75rem; color: var(--muted); font-family: monospace; }
.code-block.rounded-top { border-radius: 0 0 var(--radius-md) var(--radius-md); }

/* ── FORMS ── */
.form-group { display: flex; flex-direction: column; gap: 6px; }
label { font-size: 0.8rem; font-weight: 600; color: var(--text2); letter-spacing: 0.02em; }
input, select, textarea {
  width: 100%; background: var(--surface2); border: 1px solid var(--border2);
  border-radius: var(--radius-md); padding: 12px 16px;
  color: var(--text); font-size: 0.9rem; font-family: inherit;
  outline: none; transition: border-color 0.2s, box-shadow 0.2s;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79,126,247,0.14);
}
select option { background: var(--surface2); }
textarea { resize: vertical; min-height: 120px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } }
.form-submit {
  background: var(--accent); color: #fff; border: none;
  border-radius: var(--radius-md); padding: 14px 28px;
  font-size: 0.95rem; font-weight: 600; cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s; width: 100%;
}
.form-submit:hover { background: var(--accent-dark); transform: translateY(-2px); box-shadow: var(--shadow-glow); }
.form-note { font-size: 0.75rem; color: var(--muted); margin-top: 8px; }
.success-msg {
  display: none; background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.35);
  border-radius: var(--radius-md); padding: 18px 22px; color: var(--green);
  font-size: 0.9rem; font-weight: 600;
}

/* ── PAGE HERO ── */
.page-hero {
  padding: 80px 5vw 72px; border-bottom: 1px solid var(--border);
  background: radial-gradient(ellipse 70% 60% at 70% 40%, rgba(79,126,247,0.07) 0%, transparent 70%);
}
.page-hero .section-label { margin-bottom: 18px; }

/* ── STAT ROW ── */
.stat-row { display: flex; gap: 48px; flex-wrap: wrap; margin-top: 56px; padding-top: 48px; border-top: 1px solid var(--border); }
.stat-item .num { font-size: 2rem; font-weight: 800; letter-spacing: -0.04em; }
.stat-item .lbl { font-size: 0.8rem; color: var(--muted); margin-top: 3px; }

/* ── MARQUEE ── */
.marquee-wrap {
  overflow: hidden; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  padding: 32px 0; background: var(--bg2);
}
.marquee-label { text-align: center; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted2); margin-bottom: 24px; }
.marquee-track { display: flex; gap: 60px; animation: marquee 30s linear infinite; white-space: nowrap; }
.marquee-track:hover { animation-play-state: paused; }
@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
.marquee-item { font-size: 0.85rem; font-weight: 700; color: var(--muted2); letter-spacing: 0.04em; flex-shrink: 0; }

/* ── FEATURE TABLE ── */
.feat-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.feat-table thead tr { background: var(--surface2); }
.feat-table thead th { padding: 13px 16px; text-align: left; font-weight: 700; color: var(--muted); border-bottom: 1px solid var(--border); font-size: 0.77rem; letter-spacing: 0.03em; white-space: nowrap; }
.feat-table thead th.us { color: var(--accent); }
.feat-table tbody tr { border-bottom: 1px solid var(--border); transition: background 0.15s; }
.feat-table tbody tr:hover { background: var(--surface2); }
.feat-table tbody td { padding: 12px 16px; color: var(--text2); vertical-align: middle; }
.feat-table tbody td:first-child { font-weight: 600; color: var(--text); }
.check  { color: var(--green); }
.cross  { color: var(--red); }
.partial { color: var(--amber); }

/* ── CTA STRIP ── */
.cta-strip {
  text-align: center; padding: 96px 5vw;
  background: radial-gradient(ellipse 80% 80% at 50% 50%, rgba(79,126,247,0.1) 0%, transparent 70%);
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.cta-strip h2 { max-width: 600px; margin: 0 auto 16px; }
.cta-strip p  { margin: 0 auto 36px; max-width: 520px; }
.cta-strip .btn-group { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ── PRICING CARDS ── */
.pricing-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 48px; }
@media (max-width: 1024px) { .pricing-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .pricing-grid { grid-template-columns: 1fr; } }
.pricing-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-xl); padding: 32px 26px;
  display: flex; flex-direction: column; position: relative;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.pricing-card:hover { transform: translateY(-4px); }
.pricing-card.featured {
  border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 20px 60px rgba(79,126,247,0.18);
}
.pricing-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: #fff;
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase;
  padding: 4px 14px; border-radius: 20px;
}
.pricing-tier  { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.pricing-price { font-size: 2.1rem; font-weight: 800; letter-spacing: -0.05em; }
.pricing-price span { font-size: 1rem; font-weight: 500; color: var(--muted); }
.pricing-sub   { font-size: 0.78rem; color: var(--muted); margin-top: 3px; margin-bottom: 20px; }
.pricing-hr    { border: none; border-top: 1px solid var(--border); margin: 18px 0; }
.pricing-list  { display: flex; flex-direction: column; gap: 10px; flex: 1; }
.pricing-list li { font-size: 0.82rem; color: var(--text2); display: flex; align-items: flex-start; gap: 9px; }
.pricing-list li::before { content: "✓"; color: var(--green); font-weight: 700; flex-shrink: 0; margin-top: 1px; }
.pricing-btn { margin-top: 24px; display: block; text-align: center; padding: 12px; border-radius: var(--radius-md); font-size: 0.875rem; font-weight: 600; border: 1px solid var(--border2); color: var(--text); transition: all 0.2s; }
.pricing-btn:hover { border-color: var(--accent); background: var(--accent-glow); }
.pricing-btn.featured-btn { background: var(--accent); border-color: var(--accent); color: #fff; }
.pricing-btn.featured-btn:hover { background: var(--accent-dark); }

/* ── FOOTER ── */
.site-footer {
  background: var(--bg2); border-top: 1px solid var(--border);
  padding: 64px 5vw 40px;
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr; gap: 48px;
  padding-bottom: 48px; border-bottom: 1px solid var(--border);
}
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand p { font-size: 0.85rem; color: var(--muted); margin-top: 12px; line-height: 1.7; max-width: 260px; }
.footer-col h4 { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text2); margin-bottom: 16px; }
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col ul a { font-size: 0.85rem; color: var(--muted); transition: color 0.18s; }
.footer-col ul a:hover { color: var(--text); }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; padding-top: 32px; flex-wrap: wrap; gap: 16px; }
.footer-bottom .copy { font-size: 0.78rem; color: var(--muted2); }
.footer-bottom .legal { display: flex; gap: 24px; }
.footer-bottom .legal a { font-size: 0.78rem; color: var(--muted2); transition: color 0.18s; }
.footer-bottom .legal a:hover { color: var(--muted); }
.footer-logo { font-size: 1.05rem; font-weight: 800; letter-spacing: -0.04em; display: flex; align-items: center; gap: 9px; }
.footer-logo .logo-icon { width: 26px; height: 26px; border-radius: 6px; background: linear-gradient(135deg, var(--accent), var(--accent2)); display: flex; align-items: center; justify-content: center; font-size: 0.78rem; }

/* ── UTILITIES ── */
.mt-8  { margin-top: 8px;  }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }
.mt-56 { margin-top: 56px; }
.mb-8  { margin-bottom: 8px;  }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.text-center { text-align: center; }
.text-muted { color: var(--muted); }
.mx-auto { margin-left: auto; margin-right: auto; }
.max-600 { max-width: 600px; }
.max-800 { max-width: 800px; }

/* ── MOBILE NAV ── */
@media (max-width: 900px) {
  .nav-menu, .nav-actions .btn-ghost { display: none; }
  .hamburger { display: flex; }
  .mobile-menu {
    display: none; position: fixed; inset: var(--nav-h) 0 0 0;
    background: var(--bg); z-index: 150; padding: 24px 5vw;
    flex-direction: column; gap: 4px; overflow-y: auto;
    border-top: 1px solid var(--border);
  }
  .mobile-menu.open { display: flex; }
  .mobile-menu a { font-size: 1rem; font-weight: 500; color: var(--text2); padding: 12px 0; border-bottom: 1px solid var(--border); }
  .mobile-menu a:hover { color: var(--text); }
  .mobile-menu .btn-nav { display: block; text-align: center; margin-top: 16px; padding: 14px; }
}

/* ── SCROLL REVEAL ── */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.55s ease, transform 0.55s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ── ACCORDION ── */
.accordion { display: flex; flex-direction: column; gap: 4px; }
.accordion-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; }
.accordion-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; cursor: pointer; font-weight: 600; font-size: 0.92rem; transition: background 0.15s; }
.accordion-header:hover { background: var(--surface2); }
.accordion-icon { font-size: 0.85rem; color: var(--muted); transition: transform 0.25s; }
.accordion-item.open .accordion-icon { transform: rotate(180deg); }
.accordion-body { display: none; padding: 0 22px 18px; font-size: 0.875rem; color: var(--text2); line-height: 1.75; }
.accordion-item.open .accordion-body { display: block; }

/* ── RESOURCE CARD ── */
.resource-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  display: flex; flex-direction: column;
}
.resource-card:hover { transform: translateY(-3px); border-color: var(--border2); box-shadow: 0 10px 32px rgba(0,0,0,0.3); }
.resource-thumb {
  height: 140px; display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem;
}
.resource-body { padding: 22px 24px; flex: 1; display: flex; flex-direction: column; }
.resource-body h3 { font-size: 0.95rem; margin-bottom: 8px; }
.resource-body p  { font-size: 0.82rem; color: var(--muted); line-height: 1.7; flex: 1; }
.resource-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; font-size: 0.75rem; color: var(--muted2); }
