:root {
  --bg: #0e1116;
  --surface: #161b22;
  --surface-2: #1d242d;
  --border: #262d36;
  --text: #e6edf3;
  --muted: #9aa4b2;
  --brand: #ffffff;
  --brand-2: #ffffff;
  --accent: #5ec8a8;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --max: 1180px;
  --font-display: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
  overscroll-behavior: none;
}
input, select, textarea {
  -webkit-user-select: text;
  user-select: text;
}
button, a, label, .card { touch-action: manipulation; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
em { font-style: normal; color: var(--brand); }

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(14, 17, 22, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header > .container { max-width: none; padding: 0 48px; }
@media (max-width: 720px) {
  .site-header > .container { padding: 0 20px; }
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 140px;
  gap: 24px;
}
.brand img {
  height: 124px;
  width: auto;
}
@media (max-width: 560px) {
  .header-inner { height: 80px; }
  .brand img { height: 66px; }
}
.nav { display: flex; gap: 36px; }
.nav a {
  color: #fff;
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.005em;
  transition: opacity 0.15s ease;
  opacity: 1;
}
.nav a:hover { opacity: 0.75; }

.eyebrow {
  display: inline-block;
  margin: 0 0 16px;
  padding: 6px 12px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
}
.lede {
  font-size: 18px;
  color: var(--muted);
  max-width: 640px;
  margin: 0 0 32px;
}

.cta-row { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 18px 32px;
  min-height: 64px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 18px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.06s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: #000;
  color: #fff;
  border-color: #fff;
}
.btn-primary:hover { background: #1a1a1a; }
.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover { border-color: #3a434f; }

/* Section heading */
.section-head { max-width: 720px; margin: 0 0 10px; }
.enquire .section-head { max-width: none; }
.enquire .section-head p { white-space: nowrap; }
.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.4vw, 38px);
  letter-spacing: -0.015em;
  margin: 0 0 10px;
  font-weight: 700;
}
.section-head p { color: var(--muted); margin: 0; font-size: 16px; }
.products .section-head h2 { font-size: clamp(22px, 2.4vw, 28px); }

/* Products */
.products { padding: 12px 0 16px; }
.products > .container { max-width: none; padding: 0 24px; }
.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.card:hover {
  transform: translateY(-3px);
  border-color: #3a434f;
  box-shadow: var(--shadow);
}
.card .thumb {
  aspect-ratio: 16 / 9;
  background: var(--surface-2);
  position: relative;
  overflow: hidden;
}
.card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.card:hover .thumb img { transform: scale(1.04); }
.card .body { padding: 8px 12px 10px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card h3 {
  font-family: var(--font-display);
  font-size: 15px;
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.card p { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.35; }
.card .card-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 8px;
}
.card .card-foot a {
  font-size: 14px;
  color: var(--brand-2);
  font-weight: 600;
}
.card .card-foot a:hover { text-decoration: underline; }
.card .pick {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  padding: 14px 18px;
  font-size: 16px;
  font-weight: 700;
  min-height: 56px;
  width: 100%;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.card .pick:hover { border-color: #fff; }
.card .pick.is-picked { background: #000; border-color: #fff; color: #fff; }

/* Enquire */
.enquire { padding: 16px 0 20px; background: linear-gradient(180deg, transparent, rgba(94, 200, 168, 0.05)); border-top: 1px solid var(--border); }
.enquire > .container { max-width: none; padding: 0 24px; }
.enquire-inner { max-width: none; }
form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-margin-top: 160px;
}
.enquire-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px 20px;
  align-items: stretch;
}
.enquire-col { display: flex; flex-direction: column; gap: 12px; }
.enquire-col .custom-specs { flex: 1; min-height: 0; }
.enquire-col .custom-specs textarea {
  flex: 1;
  min-height: 0;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: #fff;
  font: inherit;
  padding: 11px 12px;
  border-radius: 10px;
  outline: none;
  resize: vertical;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.enquire-col .custom-specs textarea::placeholder { color: rgba(255, 255, 255, 0.55); }
.enquire-col .custom-specs textarea:focus {
  border-color: #fff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.12);
}
@media (max-width: 900px) {
  .enquire-grid { grid-template-columns: 1fr; }
  .enquire-col .custom-specs textarea { min-height: 140px; }
}
.row { display: grid; gap: 16px; }
.row.two { grid-template-columns: 1fr 1fr; }
@media (max-width: 560px) {
  .row.two { grid-template-columns: 1fr; }
}
label { display: flex; flex-direction: column; gap: 6px; font-size: 15px; color: var(--muted); }
label span em { color: var(--brand); margin-left: 2px; }
input, select, textarea {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: #fff;
  font: inherit;
  font-size: 17px;
  padding: 16px 14px;
  min-height: 56px;
  border-radius: 10px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input:focus, select:focus, textarea:focus {
  border-color: #fff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.18);
}
input::placeholder, textarea::placeholder { color: #5d6773; }

.form-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 4px; }
.form-status { margin: 0; font-size: 14px; color: var(--muted); }
.form-status.is-success { color: var(--accent); }
.form-status.is-error { color: #ff7a7a; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  color: var(--muted);
  font-size: 14px;
}
.site-footer .container {
  max-width: none;
  padding: 0 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.footer-info {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 24px;
}
.footer-info p { margin: 0; }
@media (max-width: 720px) {
  .site-footer .container { padding: 0 20px; }
}
.site-footer a { color: var(--brand-2); }
.site-footer a:hover { text-decoration: underline; }

/* Thank-you overlay (kiosk reset screen) */
.thank-you {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(14, 17, 22, 0.97);
  backdrop-filter: blur(8px);
  animation: thank-you-fade 0.25s ease-out;
}
.thank-you[hidden] { display: none; }
@keyframes thank-you-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}
.thank-you-inner {
  text-align: center;
  padding: 48px 56px;
  max-width: 640px;
}
.thank-you-mark { margin: 0 auto 24px; }
.thank-you h2 {
  font-family: var(--font-display);
  font-size: 56px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
}
.thank-you p {
  font-size: 22px;
  color: var(--text);
  margin: 0 0 12px;
}
.thank-you-sub {
  color: var(--muted) !important;
  font-size: 17px !important;
  margin-top: 24px !important;
  margin-bottom: 28px !important;
}
.thank-you-sub #thankYouCountdown {
  display: inline-block;
  min-width: 2ch;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--accent);
}
.thank-you-reset {
  margin-top: 8px;
}

/* Connectivity badge — operator-visible offline/queue indicator */
/* Sits inline in the footer (not floating) so it never overlaps the
   range or the export view. */
.connectivity-badge {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--muted);
  white-space: nowrap;
}
.connectivity-badge[hidden] { display: none; }
.connectivity-badge.is-offline {
  border-color: rgba(255, 122, 122, 0.6);
  color: #ff9b9b;
}
.connectivity-badge.is-syncing {
  border-color: rgba(94, 200, 168, 0.6);
  color: var(--accent);
}
.connectivity-badge.is-ready {
  border-color: rgba(94, 200, 168, 0.6);
  color: var(--accent);
}

/* Brand long-press shouldn't pop the native callout / context menu */
.brand { -webkit-touch-callout: none; }

/* Export modal — opened from the brand tap after admin auth */
.export-modal {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  background: rgba(14, 17, 22, 0.85);
  backdrop-filter: blur(6px);
  padding: 48px 24px 24px;
  overflow-y: auto;
}
.export-modal[hidden] { display: none; }
.export-modal-inner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px 28px;
  max-width: 460px;
  width: 100%;
  box-shadow: var(--shadow);
}
.export-modal-inner h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 4px;
  letter-spacing: -0.01em;
}
.export-modal-sub {
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 20px;
}
.export-password {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 14px;
}
.export-password input {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: #fff;
  font: inherit;
  font-size: 17px;
  padding: 14px;
  min-height: 52px;
  border-radius: 10px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.export-password input:focus {
  border-color: #fff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.18);
}

.export-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 16px;
  margin-bottom: 10px;
  cursor: pointer;
}
.export-option input[type="checkbox"] {
  width: 22px;
  height: 22px;
  min-height: 0;
  padding: 0;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
  flex: none;
}
.export-option em {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
  margin-left: 4px;
}
.export-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}
.export-actions .btn { flex: 1; }
.export-status {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--muted);
  min-height: 18px;
}
.export-status.is-error { color: #ff7a7a; }
.export-status.is-success { color: var(--accent); }
.export-sep {
  border: none;
  border-top: 1px solid var(--border);
  margin: 24px 0;
}
.export-section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 8px;
}
.export-full-btn { width: 100%; }

/* Export KPIs (offline captured / online / total) */
.kpi-row { display: flex; gap: 10px; margin: 4px 0 14px; }
.kpi {
  flex: 1;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 8px;
  text-align: center;
}
.kpi-total { border-color: rgba(94, 200, 168, 0.5); }
.kpi-num {
  display: block;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
}
.kpi-total .kpi-num { color: var(--accent); }
.kpi-label { display: block; margin-top: 6px; font-size: 11px; color: var(--muted); }

.privacy-note {
  flex-basis: 100%;
  margin: 12px 0 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
}
.privacy-note a { color: var(--brand-2); }

/* Invalid form field (client-side validation) */
input.is-invalid, select.is-invalid, textarea.is-invalid {
  border-color: #ff7a7a !important;
  box-shadow: 0 0 0 3px rgba(255, 122, 122, 0.2);
}
