/**
 * qmenu brand — the platform's own surfaces: the landing page, the sign-in
 * screens, the restaurant admin and the platform console.
 *
 * Values come from assets/brand/brand-tokens.json, which ships with the brand
 * pack. Tenant menus are deliberately NOT styled from here: a restaurant's
 * menu wears the restaurant's brand, not ours. The only qmenu mark a guest
 * ever sees is the footer credit.
 *
 * Alexandria carries both scripts, which is the point of choosing it — one
 * family for Arabic and Latin means no mismatched pairing at a language
 * switch, and no Tahoma standing in for Arabic.
 */

@import url("https://fonts.googleapis.com/css2?family=Alexandria:wght@200;300;400;500;600;700;800&display=swap");

:root {
  /* Brand palette */
  --q-ink: #111111;
  --q-paper: #f7f6f2;
  --q-maroon: #8d1251;
  --q-maroon-deep: #6b0e3e;
  --q-blue: #75c8ff;
  --q-lime: #c9f56c;
  --q-white: #ffffff;

  --q-muted: #66635f;
  --q-line: #e3e0d8;
  --q-line-soft: #efece5;

  /* Brand radii */
  --q-r-sm: 10px;
  --q-r-md: 18px;
  --q-r-lg: 28px;

  --q-font: "Alexandria", "Helvetica Neue", Arial, sans-serif;
  --q-shadow: 0 1px 2px rgba(17, 17, 17, .04), 0 12px 32px rgba(17, 17, 17, .06);
  --q-shadow-lg: 0 24px 60px rgba(17, 17, 17, .12);
  --q-container: min(1120px, calc(100% - 40px));
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--q-paper);
  color: var(--q-ink);
  font-family: var(--q-font);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Alexandria runs visually large and a touch loose; tightening the display
   sizes keeps headlines from looking soft. */
h1, h2, h3, h4 { font-weight: 700; letter-spacing: -.02em; line-height: 1.18; margin: 0; }
h1 { letter-spacing: -.035em; }

/* ─── Wordmark ────────────────────────────────────────────────────────
   The icon is an SVG of pure shapes; the wordmark is live HTML text so it
   renders in Alexandria and inherits colour. The full lockups in
   assets/brand/ carry their own type and are for export, not the web — SVG
   text cannot use a webfont the page loaded. */
.q-brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; color: inherit; }
.q-brand img { display: block; width: 38px; height: 38px; border-radius: var(--q-r-sm); }
.q-brand .q-wordmark { unicode-bidi: isolate; font-size: 21px; font-weight: 700; letter-spacing: -.045em; line-height: 1; white-space: nowrap; }
.q-brand .q-wordmark i { font-style: normal; color: var(--q-maroon); }
.q-brand--lg img { width: 60px; height: 60px; border-radius: 15px; }
.q-brand--lg .q-wordmark { font-size: 31px; }
.q-brand--reverse .q-wordmark { color: var(--q-white); }
.q-brand--reverse .q-wordmark i { color: var(--q-blue); }

.q-tagline { font-size: 13px; font-weight: 500; letter-spacing: .04em; color: var(--q-muted); }

/* ─── Controls ────────────────────────────────────────────────────────── */
.q-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 22px; border: 0; border-radius: var(--q-r-md);
  background: var(--q-maroon); color: var(--q-white);
  font: inherit; font-weight: 600; font-size: 15px; cursor: pointer;
  transition: background .16s ease, transform .16s ease, box-shadow .16s ease;
}
.q-btn:hover { background: var(--q-maroon-deep); transform: translateY(-1px); box-shadow: 0 10px 24px rgba(141, 18, 81, .22); }
.q-btn:active { transform: translateY(0); }
.q-btn:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.q-btn--block { width: 100%; }
.q-btn--ghost { background: transparent; color: var(--q-ink); border: 1px solid var(--q-line); }
.q-btn--ghost:hover { background: var(--q-white); border-color: var(--q-ink); box-shadow: none; }

.q-field { margin-bottom: 16px; }
.q-field label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 7px; }
.q-input {
  width: 100%; padding: 13px 15px;
  border: 1px solid var(--q-line); border-radius: var(--q-r-sm);
  background: var(--q-white); color: var(--q-ink);
  /* 16px is the threshold under which iOS Safari zooms the page on focus,
     leaving the form half off-screen. Never set a field smaller. */
  font: inherit; font-size: 16px;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.q-input:focus {
  outline: 0; border-color: var(--q-maroon);
  box-shadow: 0 0 0 3px rgba(141, 18, 81, .14);
}
.q-input::placeholder { color: #a8a49c; }

.q-card {
  background: var(--q-white);
  border: 1px solid var(--q-line);
  border-radius: var(--q-r-lg);
  box-shadow: var(--q-shadow);
}

.q-msg { margin-top: 14px; padding: 12px 15px; border-radius: var(--q-r-sm); font-size: 14px; display: none; }
.q-msg.err { display: block; background: #fdecef; color: #9b1c37; }
.q-msg.ok { display: block; background: #eef7ee; color: #256b2a; }

/* ─── Sign-in ─────────────────────────────────────────────────────────
   A full-height split: the brand panel carries the mark and the promise, the
   form sits on paper. On a phone the panel collapses to a header strip so the
   keyboard never pushes the form off-screen. */
.q-auth { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: 1.05fr 1fr; }

.q-auth-brand {
  position: relative; overflow: hidden;
  background: var(--q-ink); color: var(--q-white);
  padding: clamp(28px, 5vw, 60px);
  display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
}
/* Two soft brand-coloured washes; keeps the dark panel from reading flat
   without adding an image to load. */
.q-auth-brand::before, .q-auth-brand::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(90px); pointer-events: none;
}
.q-auth-brand::before { width: 460px; height: 460px; background: rgba(141, 18, 81, .55); top: -120px; inset-inline-start: -140px; }
.q-auth-brand::after { width: 380px; height: 380px; background: rgba(117, 200, 255, .16); bottom: -150px; inset-inline-end: -110px; }
.q-auth-brand > * { position: relative; z-index: 1; }

.q-auth-pitch h2 { font-size: clamp(26px, 3.2vw, 40px); letter-spacing: -.035em; margin-bottom: 14px; }
.q-auth-pitch p { margin: 0; color: rgba(255, 255, 255, .74); font-size: 15.5px; max-width: 42ch; }
.q-auth-steps { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.q-auth-steps span {
  font-size: 12.5px; font-weight: 500; padding: 7px 14px; border-radius: 999px;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14);
}
.q-auth-foot { font-size: 12.5px; color: rgba(255, 255, 255, .5); }

.q-auth-form { display: flex; align-items: center; justify-content: center; padding: clamp(24px, 5vw, 60px); }
.q-auth-form-inner { width: 100%; max-width: 380px; }
.q-auth-form h1 { font-size: 27px; margin-bottom: 6px; }
.q-auth-form .q-sub { color: var(--q-muted); font-size: 14.5px; margin: 0 0 26px; }
.q-auth-host {
  display: inline-flex; align-items: center; gap: 7px; margin-top: 20px;
  font-size: 12.5px; color: var(--q-muted);
}
.q-auth-host code { font-family: ui-monospace, Menlo, monospace; font-size: 12px; color: var(--q-ink); }

@media (max-width: 860px) {
  .q-auth { grid-template-columns: 1fr; }
  .q-auth-brand { padding: 26px 22px 30px; gap: 22px; }
  .q-auth-pitch h2 { font-size: 23px; }
  .q-auth-pitch p, .q-auth-foot { display: none; }
  .q-auth-steps { margin-top: 14px; }
  .q-auth-form { padding: 32px 22px 48px; align-items: flex-start; }
}

[hidden] { display: none !important; }
