/* ============================================================
   QFlow — Smart Queue Management · public theme
   Identity: Deep Teal + Amber, "crisp & digital" motion, ticket motif.
   Colors are overridable from SiteSettings via the inline :root in _Layout.
   ============================================================ */
:root {
  --q-primary: #0D9488;
  --q-primary-d: #0B7A70;
  --q-accent: #F59E0B;
  --q-dark: #0F172A;
  --q-ink: #1E293B;
  --q-muted: #64748B;
  --q-bg: #FAFAF7;          /* warm off-white, never pure #fff */
  --q-surface: #FFFFFF;
  --q-line: #E6E8EC;
  --q-radius: 14px;
  --q-shadow: 0 10px 30px -12px rgba(13,148,136,.18);
  --q-shadow-sm: 0 2px 10px -4px rgba(15,23,42,.12);
  --q-head: 'Space Grotesk', 'Hind Siliguri', system-ui, sans-serif;
  --q-body: 'Inter', 'Hind Siliguri', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--q-body);
  color: var(--q-ink);
  background: var(--q-bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;            /* sticky-safe guard against accidental horizontal overflow */
}
h1,h2,h3,h4,h5 { font-family: var(--q-head); color: var(--q-dark); font-weight: 600; line-height: 1.18; }
a { color: var(--q-primary); text-decoration: none; }
a:hover { color: var(--q-primary-d); }
.text-accent { color: var(--q-accent) !important; }
.text-primary-q { color: var(--q-primary) !important; }
.bg-dark-q { background: var(--q-dark) !important; }

/* ---- §12.1 mobile safety-net ---- */
img, svg, video, iframe { max-width: 100%; }
img { height: auto; }
table { max-width: 100%; }
pre, code { white-space: pre-wrap; word-break: break-word; }
.container, .container-fluid { overflow-wrap: break-word; }
h1,h2,h3,h4,p,a,span,li { overflow-wrap: break-word; }

/* ---- layout helpers ---- */
.section { padding: 84px 0; }
.section-sm { padding: 52px 0; }
.eyebrow { font-family: var(--q-head); text-transform: uppercase; letter-spacing: .16em; font-size: .74rem; font-weight: 600; color: var(--q-primary); }
.section-head h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); margin: .35rem 0 .5rem; }
.section-head p { color: var(--q-muted); max-width: 60ch; }
.lead-muted { color: var(--q-muted); }

/* hand-drawn underline motif — inline so long titles still wrap on mobile */
.u-mark {
  display: inline;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='8' viewBox='0 0 120 8'%3E%3Cpath d='M2 5C30 2 90 2 118 5' stroke='%23F59E0B' stroke-width='3' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: repeat-x; background-position: 0 100%; background-size: 120px 7px;
  padding-bottom: 8px; -webkit-box-decoration-break: clone; box-decoration-break: clone;
}

/* ---- buttons ---- */
.btn { border-radius: 10px; font-weight: 600; padding: .62rem 1.25rem; transition: transform .15s ease, box-shadow .2s ease, background .2s ease; }
.btn:active { transform: translateY(1px); }
.btn-q { background: var(--q-primary); border-color: var(--q-primary); color: #fff; }
.btn-q:hover { background: var(--q-primary-d); border-color: var(--q-primary-d); color: #fff; box-shadow: var(--q-shadow); }
.btn-accent { background: var(--q-accent); border-color: var(--q-accent); color: #1f1300; }
.btn-accent:hover { filter: brightness(.96); color: #1f1300; }
.btn-outline-q { border: 1.5px solid var(--q-primary); color: var(--q-primary); background: transparent; }
.btn-outline-q:hover { background: var(--q-primary); color: #fff; }

/* ---- top utility bar + navbar ---- */
.topbar { background: var(--q-dark); color: #cbd5e1; font-size: .82rem; }
.topbar a { color: #cbd5e1; }
.topbar a:hover { color: #fff; }
.site-header { background: rgba(255,255,255,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--q-line); position: sticky; top: 0; z-index: 1020; transition: box-shadow .25s ease; }
.site-header.shrink { box-shadow: var(--q-shadow-sm); }
.navbar-brand { font-family: var(--q-head); font-weight: 700; font-size: 1.3rem; color: var(--q-dark); display:flex; align-items:center; gap:.5rem; }
.navbar-brand .brand-badge { width: 34px; height: 34px; border-radius: 9px; background: linear-gradient(135deg, var(--q-primary), var(--q-primary-d)); color:#fff; display:grid; place-items:center; font-size:1.05rem; }
.nav-link { color: var(--q-ink); font-weight: 500; }
.nav-link:hover, .nav-link.active { color: var(--q-primary); }
.lang-pill { border:1px solid var(--q-line); border-radius: 999px; padding:.18rem .7rem; font-size:.8rem; font-weight:600; color: var(--q-ink); }
.lang-pill:hover { border-color: var(--q-primary); color: var(--q-primary); }

/* ---- hero ---- */
.hero { position: relative; overflow: hidden; padding: clamp(56px, 8vw, 110px) 0; background:
  radial-gradient(1100px 420px at 88% -8%, rgba(13,148,136,.10), transparent 60%),
  radial-gradient(700px 360px at 0% 120%, rgba(245,158,11,.10), transparent 55%); }
.hero h1 { font-size: clamp(2rem, 5.4vw, 3.5rem); letter-spacing: -.02em; }
.hero p.sub { font-size: clamp(1.02rem, 1.7vw, 1.22rem); color: var(--q-muted); max-width: 54ch; }
.hero-card { background: var(--q-surface); border:1px solid var(--q-line); border-radius: 20px; box-shadow: var(--q-shadow); }

/* ---- ticket / token card motif ---- */
.ticket {
  position: relative; background: var(--q-surface); border:1px solid var(--q-line);
  border-radius: var(--q-radius); padding: 1.2rem 1.3rem; box-shadow: var(--q-shadow-sm);
}
.ticket::before, .ticket::after {
  content:""; position:absolute; top:50%; transform: translateY(-50%);
  width:18px; height:18px; border-radius:50%; background: var(--q-bg); border:1px solid var(--q-line);
}
.ticket::before { left:-10px; } .ticket::after { right:-10px; }
.token-code { font-family: var(--q-head); font-weight: 700; letter-spacing:.02em; color: var(--q-primary); }

/* ---- generic cards / grid ---- */
.q-card { background: var(--q-surface); border:1px solid var(--q-line); border-radius: var(--q-radius); padding: 1.4rem; box-shadow: var(--q-shadow-sm); transition: transform .2s ease, box-shadow .2s ease; height:100%; }
.q-card:hover { transform: translateY(-4px); box-shadow: var(--q-shadow); }
.q-icon { width: 52px; height: 52px; border-radius: 13px; display:grid; place-items:center; font-size:1.5rem; background: rgba(13,148,136,.10); color: var(--q-primary); }
.feature-icon { background: linear-gradient(135deg, rgba(13,148,136,.14), rgba(245,158,11,.14)); }
.stat-num { font-family: var(--q-head); font-weight: 700; font-size: clamp(1.9rem, 4vw, 2.8rem); color: var(--q-dark); }
.service-chip { display:inline-flex; align-items:center; gap:.5rem; }

/* steps */
.step-num { width: 44px; height: 44px; border-radius: 50%; display:grid; place-items:center; font-family:var(--q-head); font-weight:700; background: var(--q-dark); color:#fff; }

/* testimonials */
.quote-card { background: var(--q-surface); border:1px solid var(--q-line); border-radius: var(--q-radius); padding: 1.6rem; box-shadow: var(--q-shadow-sm); }
.quote-card .stars { color: var(--q-accent); }

/* faq */
.accordion-button:not(.collapsed) { background: rgba(13,148,136,.07); color: var(--q-primary-d); box-shadow:none; }
.accordion-button:focus { box-shadow: 0 0 0 .2rem rgba(13,148,136,.18); }

/* ---- footer ---- */
.site-footer { background: var(--q-dark); color: #cbd5e1; padding-top: 0; }
.site-footer .ftop { height: 4px; background: linear-gradient(90deg, var(--q-primary) 0 70%, var(--q-accent) 70% 100%); }
.site-footer h6 { color: #fff; font-family: var(--q-head); letter-spacing:.04em; text-transform:uppercase; font-size:.82rem; }
.site-footer a { color: #cbd5e1; } .site-footer a:hover { color:#fff; }
.site-footer .credit a { color: var(--q-accent); }

/* floating buttons */
.float-stack { position: fixed; right: 18px; bottom: 18px; z-index: 1040; display:flex; flex-direction:column; gap:10px; }
.float-btn { width: 52px; height: 52px; border-radius: 50%; display:grid; place-items:center; color:#fff; box-shadow: var(--q-shadow); font-size:1.4rem; }
.float-btn.wa { background:#25D366; } .float-btn.call { background: var(--q-primary); }
.fa-top { position: fixed; right: 18px; bottom: 84px; z-index: 1039; width:46px;height:46px;border-radius:12px;background:var(--q-dark);color:#fff;display:grid;place-items:center;opacity:0;pointer-events:none;transition:opacity .25s; }
.fa-top.show { opacity:1; pointer-events:auto; }

/* notice bar */
.notice-bar { font-size:.9rem; padding:.5rem 0; text-align:center; }

/* ---- motion (crisp & digital) — gated by reduced-motion ---- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s cubic-bezier(.2,.7,.2,1), transform .6s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay:.08s; } .reveal.d2 { transition-delay:.16s; } .reveal.d3 { transition-delay:.24s; }
@keyframes qpulse { 0%{ box-shadow:0 0 0 0 rgba(13,148,136,.5);} 70%{ box-shadow:0 0 0 16px rgba(13,148,136,0);} 100%{ box-shadow:0 0 0 0 rgba(13,148,136,0);} }
.pulse-ring { animation: qpulse 1.4s ease-out 2; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity:1 !important; transform:none !important; transition:none !important; }
  .pulse-ring { animation: none !important; }
}

/* ---- responsive: tablet / mobile / phone ---- */
@media (max-width: 991.98px) {
  .section { padding: 64px 0; }
  .hero { padding: 56px 0; }
}
@media (max-width: 767.98px) {
  .section, .hero { padding: 46px 0; }
  .topbar { font-size: .76rem; }
  .float-btn { width:46px;height:46px;font-size:1.2rem; }
}
@media (max-width: 480px) {
  .navbar-brand { font-size: 1.12rem; }
  .section-head h2 { font-size: clamp(1.5rem, 7vw, 2rem); }
}
@media print {
  .topbar, .site-header, .site-footer, .float-stack, .fa-top, .no-print { display:none !important; }
  body { background:#fff; }
}
