/* ==========================================================================
   Bill Trick — Design Tokens
   Palette pulled from the product: deep navy shell, teal action gradient,
   amber promo accent. Space Grotesk carries headings (a technical,
   geometric voice for a payments brand); Inter carries body copy;
   IBM Plex Mono is reserved for anything that is literally a number —
   amounts, meter numbers, transaction IDs, exchange rates.
   ========================================================================== */

:root{
  /* Core palette */
  --navy-950:#050F1A;
  --navy-900:#0A2A43;
  --navy-800:#0F3550;
  --navy-700:#154768;
  --teal-600:#0D9488;
  --teal-500:#14B8A6;
  --teal-400:#2DD4BF;
  --amber-500:#F5A623;
  --amber-600:#E0910F;
  --red-500:#E5484D;

  /* Brand gradient — matches the app's primary CTA */
  --grad-brand: linear-gradient(135deg, var(--navy-900) 0%, var(--teal-600) 100%);
  --grad-balance: linear-gradient(135deg, #0E3350 0%, #0F7C74 100%);

  /* Surfaces */
  --bg: #F6F8FA;
  --surface: #FFFFFF;
  --surface-dark: var(--navy-950);
  --surface-dark-2: #0B2138;
  --border: #E3E9EF;
  --border-dark: #1C3A52;

  /* Ink */
  --ink-900: #0A1F30;
  --ink-700: #33475A;
  --ink-500: #64798D;
  --ink-300: #A9B7C4;
  --ink-inverse: #F4F8FA;
  --ink-inverse-dim: #AFC3D2;

  /* Type */
  --font-display: 'Space Grotesk', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', 'Courier New', monospace;

  /* Rhythm */
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 1px 2px rgba(10,31,48,0.06);
  --shadow-md: 0 8px 24px rgba(10,31,48,0.08);
  --shadow-lg: 0 24px 64px rgba(10,31,48,0.16);
  --container-w: 1200px;
}

/* ==========================================================================
   Base
   ========================================================================== */
*{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{
  font-family: var(--font-body);
  color: var(--ink-900);
  background: var(--bg);
  -webkit-font-smoothing:antialiased;
  overflow-x:hidden;
}
h1,h2,h3,h4,.display{
  font-family: var(--font-display);
  letter-spacing:-0.02em;
  color: var(--navy-900);
  font-weight:600;
}
h1{ font-weight:700; }
.mono, .amount, .txn-id, code{ font-family: var(--font-mono); }
p{ color: var(--ink-700); line-height:1.7; }
a{ text-decoration:none; color: var(--teal-600); }
a:hover{ color: var(--navy-900); }
.eyebrow{
  font-family: var(--font-mono);
  text-transform:uppercase;
  letter-spacing:.14em;
  font-size:.72rem;
  color: var(--teal-600);
  font-weight:600;
}
.container-qb{
  width:100%;
  max-width: var(--container-w);
  margin:0 auto;
  padding:0 1.5rem;
}
.section{ padding: 5.5rem 0; }
.section-tight{ padding: 3.25rem 0; }
@media (max-width: 768px){
  .section{ padding: 3.25rem 0; }
}
::selection{ background: var(--teal-400); color: var(--navy-950); }
:focus-visible{ outline: 2px solid var(--teal-500); outline-offset: 2px; }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn{
  font-family: var(--font-body);
  font-weight:600;
  border-radius: 999px;
  padding: .8rem 1.7rem;
  border:1px solid transparent;
  transition: transform .15s ease, box-shadow .15s ease, background .2s ease;
  display:inline-flex;
  align-items:center;
  gap:.5rem;
}
.btn:active{ transform: translateY(1px); }
.btn-brand{
  background: var(--grad-brand);
  color:#fff;
  box-shadow: var(--shadow-md);
}
.btn-brand:hover{ color:#fff; box-shadow: 0 14px 30px rgba(13,148,136,.32); transform: translateY(-1px); }
.btn-outline-brand{
  border-color: var(--navy-900);
  color: var(--navy-900);
  background:transparent;
}
.btn-outline-brand:hover{ background: var(--navy-900); color:#fff; }
.btn-ghost-light{
  border-color: rgba(255,255,255,.35);
  color:#fff;
  background: rgba(255,255,255,.06);
}
.btn-ghost-light:hover{ background: rgba(255,255,255,.16); color:#fff; }
.btn-sm{ padding:.5rem 1.1rem; font-size:.86rem; }
.btn-lg{ padding:1rem 2.1rem; font-size:1.02rem; }
/* ==========================================================================
   Navbar
   ========================================================================== */
.qb-navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(6, 17, 28, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* Flex Container Layout */
.qb-navbar .container-qb {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.qb-navbar .navbar-brand {
  font-family: var(--font-display);
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  padding: 0;
  margin: 0;
  flex-shrink: 0; /* Prevents logo from shrinking when window resizes */
}

/* Responsive Logo Sizing */
.qb-navbar .brand-logo {
  height: clamp(30px, 3.5vw, 40px);
  width: auto;
  max-width: 180px;
  object-fit: contain;
  display: block;
}

.qb-navbar .nav-link {
  color: var(--ink-inverse-dim) !important;
  font-weight: 500;
  font-size: .95rem;
  padding: .5rem .9rem !important;
  display: flex;
  align-items: center;
  white-space: nowrap; /* Ensures nav text stays on one line */
}

.qb-navbar .nav-link:hover, 
.qb-navbar .nav-link.active { 
  color: #fff !important; 
}

/* Mega Menu Item Base Styles */
.mega-item {
  display: flex; 
  gap: .78rem; 
  align-items: flex-start;
  padding: .65rem .7rem; 
  border-radius: 10px; 
  color: var(--ink-inverse-dim);
}

.mega-item:hover { 
  background: rgba(255, 255, 255, .05); 
  color: #fff; 
}

.mega-item .mi-icon {
  width: 34px; 
  height: 34px; 
  border-radius: 9px;
  background: rgba(45, 212, 191, .14); 
  color: var(--teal-400);
  display: flex; 
  align-items: center; 
  justify-content: center; 
  flex-shrink: 0;
}

.mega-item .mi-title { 
  font-size: .86rem; 
  font-weight: 600; 
  color: #fff; 
  display: block; 
}

.mega-item .mi-desc { 
  font-size: .74rem; 
  color: var(--ink-inverse-dim); 
}

/* Toggler Styling */
.qb-navbar .navbar-toggler {
  padding: 0.35rem 0.5rem;
  border-radius: 8px;
  background-color: rgba(255, 255, 255, 0.1) !important;
}

.qb-navbar .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

/* ==========================================================================
   Desktop Layout (Screen >= 992px)
   ========================================================================== */
@media (min-width: 992px) {
  .qb-navbar .container-qb {
    flex-wrap: nowrap; /* Forces logo and menu to stay on a single straight line */
  }

  .qb-navbar .navbar-collapse {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    flex-grow: 1;
  }

  .qb-navbar .dropdown-menu {
    background: var(--navy-950);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-md);
    padding: .5rem;
    min-width: 620px;
    box-shadow: var(--shadow-md);
  }

  .mega-grid {
    display: grid; 
    grid-template-columns: repeat(3, 1fr); 
    gap: .15rem;
  }
}

/* ==========================================================================
   Mobile Layout (Screen < 992px)
   ========================================================================== */
@media (max-width: 991.98px) {
  .qb-navbar .container-qb {
    flex-wrap: wrap; /* Allows mobile drawer to open beneath the header */
  }

  .qb-navbar .navbar-collapse {
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
  }

  /* Force the dropdown menu to stay in-flow beneath the "Services" link */
  .qb-navbar .dropdown-menu {
    position: static !important;
    transform: none !important;
    float: none !important;
    width: 100% !important;
    min-width: 100% !important;
    background: rgba(11, 33, 56, 0.85);
    border: 1px solid var(--border-dark);
    border-radius: 12px;
    margin: 0.5rem 0 !important;
    padding: 0.5rem;
    box-shadow: none !important;
  }

  .mega-grid {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
  }

  .mega-item {
    padding: 0.75rem;
  }
}
/* ==========================================================================
   Hero + phone mockup (signature element)
   ========================================================================== */
.hero{
  background: var(--surface-dark);
  background-image:
    radial-gradient(700px 380px at 85% -10%, rgba(20,184,166,.28), transparent 60%),
    radial-gradient(500px 300px at 0% 100%, rgba(20,184,166,.12), transparent 60%);
  color:#fff;
  padding: 5rem 0 4rem;
  position:relative;
  overflow:hidden;
}
.hero h1{ color:#fff; font-size: clamp(2.2rem, 4vw, 3.35rem); line-height:1.08; }
.hero .lead{ color: var(--ink-inverse-dim); font-size:1.14rem; max-width:34rem; }
.trust-strip{
  display:flex; gap:1.9rem; flex-wrap:wrap; margin-top:2.4rem;
}
.trust-strip .t-num{ font-family:var(--font-display); font-size:1.5rem; color:#fff; font-weight:700; }
.trust-strip .t-label{ font-size:.76rem; color: var(--ink-inverse-dim); letter-spacing:.03em; }

.phone-frame{
  width:270px; margin:0 auto;
  border-radius: 34px;
  background: linear-gradient(180deg,#0D2338,#081524);
  border:6px solid #0C2237;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255,255,255,.05);
  overflow:hidden;
  position:relative;
}
.phone-frame .phone-notch{
  position:absolute; top:0; left:50%; transform:translateX(-50%);
  width:96px; height:20px; background:#0C2237; border-radius:0 0 14px 14px; z-index:3;
}
.phone-screen{ position:relative; height:540px; overflow:hidden; }
.phone-slide{
  position:absolute; inset:0; padding:2rem 1.1rem 1rem;
  background: var(--grad-balance);
  opacity:0; transition: opacity .6s ease;
}
.phone-slide.is-active{ opacity:1; }
.phone-slide .ps-eyebrow{ color: rgba(255,255,255,.7); font-size:.72rem; }
.phone-slide .ps-balance{ font-family:var(--font-mono); font-size:1.7rem; color:#fff; font-weight:600; margin-top:.35rem; }
.ps-tiles{ display:grid; grid-template-columns:repeat(4,1fr); gap:.55rem; margin-top:1.4rem; }
.ps-tile{
  background: rgba(255,255,255,.08); border-radius:12px; padding:.6rem .3rem;
  text-align:center; color:#fff; font-size:.6rem;
}
.ps-tile .pt-ic{ width:26px;height:26px;margin:0 auto .3rem; color: var(--teal-400); }
.ps-card{ background:#fff; color: var(--navy-900); border-radius:14px; padding:.9rem; margin-top:1.1rem; }
.ps-card .pc-row{ display:flex; justify-content:space-between; font-size:.72rem; padding:.25rem 0; color: var(--ink-500); }
.ps-card .pc-row b{ color: var(--navy-900); font-family:var(--font-mono); }
.phone-dots{ display:flex; gap:.4rem; justify-content:center; margin-top:1rem; }
.phone-dots span{ width:6px;height:6px;border-radius:50%; background: rgba(255,255,255,.25); }
.phone-dots span.on{ background: var(--teal-400); width:16px; border-radius:4px; }

/* ==========================================================================
   Service tile rail — recurring brand motif (mirrors the app's Services grid)
   ========================================================================== */
.tile-rail{
  display:flex; gap:.85rem; overflow-x:auto; padding:.3rem .1rem 1rem;
  scrollbar-width:none;
}
.tile-rail::-webkit-scrollbar{ display:none; }
.rail-tile{
  flex:0 0 auto; width:126px;
  background: var(--surface); border:1px solid var(--border);
  border-radius: var(--radius-md); padding:1.1rem .8rem; text-align:center;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
  color: var(--ink-900);
}
.rail-tile:hover{ transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--teal-500); color: var(--ink-900); }
.rail-tile .rt-icon{
  width:44px;height:44px; border-radius:12px; margin:0 auto .65rem;
  display:flex; align-items:center; justify-content:center;
  background: rgba(13,148,136,.1); color: var(--teal-600);
}
.rail-tile .rt-label{ font-size:.82rem; font-weight:600; }

/* Service grid (services.php overview) */
.svc-card{
  background:var(--surface); border:1px solid var(--border); border-radius: var(--radius-lg);
  padding:1.75rem; height:100%; transition: box-shadow .2s ease, transform .2s ease;
}
.svc-card:hover{ box-shadow: var(--shadow-md); transform: translateY(-3px); }
.svc-card .rt-icon{ width:52px;height:52px; border-radius:14px; }
.svc-card h3{ font-size:1.15rem; margin: .9rem 0 .4rem; }
.svc-card p{ font-size:.92rem; margin-bottom:.9rem; }

/* ==========================================================================
   Cards / sections
   ========================================================================== */
.card-flat{
  background: var(--surface); border:1px solid var(--border);
  border-radius: var(--radius-lg); padding:2rem;
}
.stat-card{
  background: var(--navy-950); color:#fff; border-radius: var(--radius-lg);
  padding:1.75rem;
}
.stat-card .s-num{ font-family:var(--font-display); font-size:2.1rem; font-weight:700; color: var(--teal-400); }
.stat-card .s-label{ color: var(--ink-inverse-dim); font-size:.85rem; }

.step-row{ display:flex; gap:1.1rem; }
.step-num{
  font-family: var(--font-mono); font-weight:600; font-size:.85rem;
  width:34px;height:34px; border-radius:50%; border:1px solid var(--border);
  display:flex; align-items:center; justify-content:center; flex-shrink:0; color: var(--teal-600);
}
.section-divider{ height:1px; background: var(--border); }

.qb-badge{
  display:inline-flex; align-items:center; gap:.4rem;
  background: rgba(13,148,136,.09); color: var(--teal-600);
  border-radius:999px; padding:.3rem .75rem; font-size:.78rem; font-weight:600;
}

table.rate-table{ width:100%; border-collapse:collapse; }
table.rate-table th{
  font-family: var(--font-mono); font-size:.72rem; text-transform:uppercase; letter-spacing:.06em;
  color: var(--ink-500); text-align:left; padding:.7rem .9rem; border-bottom:1px solid var(--border);
}
table.rate-table td{
  padding:.85rem .9rem; border-bottom:1px solid var(--border); font-size:.92rem; color: var(--ink-700);
}
table.rate-table td.mono{ font-family: var(--font-mono); color: var(--navy-900); }
table.rate-table tr:last-child td{ border-bottom:none; }

.accordion-qb .accordion-button{
  font-family: var(--font-display); font-weight:600; color: var(--navy-900);
  background: var(--surface);
}
.accordion-qb .accordion-button:not(.collapsed){ color: var(--teal-600); background: rgba(13,148,136,.06); box-shadow:none; }
.accordion-qb .accordion-button:focus{ box-shadow:none; }
.accordion-qb .accordion-item{ border-color: var(--border); border-radius: var(--radius-sm) !important; margin-bottom:.6rem; overflow:hidden; }

/* CTA band */
.cta-band{
  background: var(--grad-brand); border-radius: var(--radius-lg); color:#fff;
  padding: 3rem; position:relative; overflow:hidden;
}
.cta-band h2{ color:#fff; }
.cta-band p{ color: rgba(255,255,255,.82); }

/* Forms */
.form-control, .form-select{
  border-radius: 10px; border:1px solid var(--border); padding:.72rem .9rem;
}
.form-control:focus, .form-select:focus{ border-color: var(--teal-500); box-shadow: 0 0 0 3px rgba(20,184,166,.15); }
.form-label{ font-weight:600; font-size:.88rem; color: var(--navy-900); }
.auth-shell{
  max-width: 440px; margin: 0 auto; background:#fff; border:1px solid var(--border);
  border-radius: var(--radius-lg); padding:2.4rem; box-shadow: var(--shadow-md);
}

/* Footer */
.qb-footer{ background: var(--navy-950); color: var(--ink-inverse-dim); padding: 4rem 0 1.5rem; }
.qb-footer h6{ color:#fff; font-family: var(--font-display); font-size:.85rem; letter-spacing:.04em; text-transform:uppercase; margin-bottom:1.1rem; }
.qb-footer a{ color: var(--ink-inverse-dim); font-size:.9rem; }
.qb-footer a:hover{ color: var(--teal-400); }
.qb-footer .f-brand{ font-family: var(--font-display); font-weight:700; color:#fff; font-size:1.3rem; }
.qb-footer .social-ic{
  width:36px;height:36px;border-radius:50%; border:1px solid var(--border-dark);
  display:flex; align-items:center; justify-content:center; color:#fff;
}
.qb-footer .social-ic:hover{ background: var(--teal-600); border-color: var(--teal-600); }
.qb-footer .foot-bottom{ border-top:1px solid var(--border-dark); margin-top:2.5rem; padding-top:1.4rem; font-size:.8rem; }
.compliance-strip{ display:flex; gap:1.2rem; flex-wrap:wrap; align-items:center; }
.compliance-strip .c-chip{
  border:1px solid var(--border-dark); border-radius:8px; padding:.4rem .7rem;
  font-size:.72rem; color: var(--ink-inverse-dim); font-family: var(--font-mono);
}

/* Page header (inner pages) */
.page-header{
  background: var(--navy-950);
  background-image: radial-gradient(600px 280px at 90% 0%, rgba(20,184,166,.22), transparent 60%);
  color:#fff; padding: 3.4rem 0 2.6rem;
}
.page-header h1{ color:#fff; font-size: clamp(1.9rem, 3vw, 2.6rem); }
.page-header .lead{ color: var(--ink-inverse-dim); max-width:38rem; }
.breadcrumb-qb a{ color: var(--ink-inverse-dim); font-size:.82rem; }
.breadcrumb-qb span{ color: var(--teal-400); font-size:.82rem; }

/* ==========================================================================
   Photo slots — real photo when present, labeled placeholder when not.
   See includes/media.php (qb_photo / qb_avatar) and IMAGE_PROMPTS.md.
   ========================================================================== */
.photo-box{
  position:relative; width:100%; border-radius: var(--radius-lg);
  overflow:hidden; background: var(--bg);
}
.photo-box img{ width:100%; height:100%; object-fit:cover; display:block; }
.photo-box.is-placeholder{
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  text-align:center; padding:1.25rem; gap:.3rem;
  border:2px dashed var(--border);
  background: repeating-linear-gradient(135deg, var(--bg), var(--bg) 11px, #EAEFF3 11px, #EAEFF3 22px);
  color: var(--ink-500);
}
.photo-box.is-placeholder .pp-icon{ width:30px; height:30px; color: var(--ink-300); }
.photo-box.is-placeholder .pp-alt{ font-size:.78rem; max-width:22rem; line-height:1.4; }
.photo-box.is-placeholder .pp-label{
  font-family: var(--font-mono); font-size:.68rem; color: var(--ink-700);
  background:#fff; border:1px solid var(--border); border-radius:6px; padding:.15rem .55rem;
}
.photo-box.avatar-box{ border-radius:50%; flex-shrink:0; }
.photo-box.avatar-box.is-placeholder{ padding:0; border-width:1.5px; }
.photo-box.avatar-box.is-placeholder .pp-icon{ width:18px; height:18px; }
.photo-box.rounded-lg{ border-radius: var(--radius-lg); }

/* Utility */
.text-teal{ color: var(--teal-600) !important; }
.bg-navy{ background: var(--navy-950) !important; }
.icon-wrap{ width:22px; height:22px; display:inline-flex; }


