/* =========================================================
   AIGENCY · QUARTZ DESIGN SYSTEM
   Premium dark, editorial · v1.0
   ========================================================= */

/* ── 1. TOKENS ─────────────────────────────────────────── */
:root{
  /* Backgrounds */
  --q-bg:        #0a0b0d;
  --q-bg-2:      #0f1117;
  --q-surface:   #14171f;
  --q-surface-2: #1a1f2b;
  --q-surface-3: #1f2532;

  /* Lines */
  --q-line:      rgba(255,255,255,0.06);
  --q-line-2:    rgba(255,255,255,0.10);
  --q-line-3:    rgba(255,255,255,0.16);

  /* Ink */
  --q-ink:       #f4efe6;       /* warm off-white */
  --q-ink-2:     #c9c5bd;
  --q-muted:     #8a8d96;
  --q-dim:       #5a5e69;

  /* Accents */
  --q-amber:     #f5b845;       /* PRIMARY warm accent */
  --q-amber-2:   #ffce6e;
  --q-amber-3:   #d99a2e;
  --q-amber-glow: rgba(245,184,69,0.18);

  --q-emerald:   #25d366;       /* WhatsApp signal */
  --q-emerald-2: #34e07b;
  --q-emerald-glow: rgba(37,211,102,0.18);

  --q-rose:      #f08274;
  --q-sky:       #6cc4ff;
  --q-violet:    #9b8cff;

  /* Status colors (for forms/messages) */
  --q-success:   #25d366;
  --q-warning:   #f5b845;
  --q-error:     #f08274;
  --q-info:      #6cc4ff;

  /* Typography */
  --q-serif: 'Instrument Serif', Georgia, serif;
  --q-sans:  'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --q-mono:  'JetBrains Mono', ui-monospace, 'SF Mono', monospace;

  /* Radii */
  --q-r-sm: 8px;
  --q-r-md: 12px;
  --q-r-lg: 18px;
  --q-r-xl: 28px;

  /* Shadow */
  --q-shadow-sm: 0 2px 8px rgba(0,0,0,0.25);
  --q-shadow-md: 0 8px 24px rgba(0,0,0,0.35);
  --q-shadow-lg: 0 30px 80px rgba(0,0,0,0.55);
  --q-shadow-amber: 0 8px 24px rgba(245,184,69,0.25);

  /* Motion */
  --q-ease: cubic-bezier(0.4, 0, 0.2, 1);
  --q-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── 2. BASE / RESET ───────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--q-bg);
  color: var(--q-ink);
  font-family: var(--q-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body {
  font-weight: 400;
  font-size: 16px;
  line-height: 1.55;
  overflow-x: hidden;
  background:
    radial-gradient(ellipse 1100px 700px at 85% -10%, rgba(245,184,69,0.07), transparent 60%),
    radial-gradient(ellipse 700px 500px at -10% 30%, rgba(37,211,102,0.05), transparent 60%),
    var(--q-bg);
  min-height: 100vh;
}

/* Subtle film grain — kills the "AI generic" feel */
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.06 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  opacity: 0.5; pointer-events: none; z-index: 1; mix-blend-mode: overlay;
}

a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

/* ── 3. TYPOGRAPHY ─────────────────────────────────────── */
.q-eyebrow {
  font-family: var(--q-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--q-muted);
}
.q-display {
  font-family: var(--q-sans);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.02;
  color: var(--q-ink);
}
.q-h1 { font-size: clamp(40px, 6vw, 72px); }
.q-h2 { font-size: clamp(32px, 4.4vw, 56px); }
.q-h3 { font-size: clamp(24px, 3vw, 36px); }

.q-serif {
  font-family: var(--q-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
}
.q-amber { color: var(--q-amber); }
.q-emerald { color: var(--q-emerald); }
.q-muted { color: var(--q-muted); }
.q-ink-2 { color: var(--q-ink-2); }

.q-body-lg { font-size: 18px; line-height: 1.6; color: var(--q-ink-2); }
.q-body-md { font-size: 15px; line-height: 1.65; color: var(--q-ink-2); }
.q-body-sm { font-size: 13px; line-height: 1.6; color: var(--q-ink-2); }

.q-mono { font-family: var(--q-mono); }

/* ── 4. LAYOUT ─────────────────────────────────────────── */
.q-container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 32px;
  position: relative;
  z-index: 2;
}
.q-container-narrow { max-width: 880px; }
.q-container-wide   { max-width: 1480px; }

.q-section { padding: 120px 0; position: relative; }
.q-section-sm { padding: 64px 0; }

.q-hairline { height: 1px; background: var(--q-line); border: none; }

/* Section header */
.q-section-head { max-width: 780px; margin-bottom: 64px; }
.q-section-head h2 { margin-top: 14px; margin-bottom: 18px; }
.q-section-head p {
  font-size: 18px; color: var(--q-ink-2); line-height: 1.6; max-width: 620px;
}

/* ── 5. NAV ────────────────────────────────────────────── */
.q-nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  background: rgba(10,11,13,0.75);
  border-bottom: 1px solid var(--q-line);
}
.q-nav-inner {
  height: 64px;
  display: flex; align-items: center; justify-content: space-between;
}
.q-brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; letter-spacing: -0.02em; font-size: 18px;
  color: var(--q-ink);
}
.q-brand-mark {
  width: 28px; height: 28px; border-radius: 8px;
  background: linear-gradient(135deg, var(--q-amber) 0%, var(--q-amber-2) 100%);
  display: grid; place-items: center;
  color: #0a0b0d; font-weight: 800; font-size: 14px;
  box-shadow: 0 0 0 1px rgba(255,206,110,0.4) inset, 0 4px 16px rgba(245,184,69,0.25);
}
.q-nav-links { display: flex; gap: 28px; }
.q-nav-links a {
  color: var(--q-ink-2);
  font-size: 14px;
  transition: color .18s var(--q-ease);
}
.q-nav-links a:hover { color: var(--q-ink); }
.q-nav-cta { display: flex; gap: 10px; align-items: center; }

/* ── 6. BUTTONS ────────────────────────────────────────── */
.q-btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 38px; padding: 0 18px;
  border-radius: 10px;
  font-size: 14px; font-weight: 500;
  transition: all .18s var(--q-ease);
  border: none; font-family: inherit;
  white-space: nowrap;
  text-decoration: none;
}
.q-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.q-btn-amber {
  background: linear-gradient(180deg, var(--q-amber-2), var(--q-amber));
  color: #0a0b0d; font-weight: 600;
  box-shadow: 0 0 0 1px rgba(255,206,110,0.6) inset, var(--q-shadow-amber);
}
.q-btn-amber:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px rgba(255,206,110,0.7) inset, 0 12px 32px rgba(245,184,69,0.35);
}

.q-btn-primary {
  background: var(--q-ink); color: #0a0b0d; font-weight: 600;
  box-shadow: 0 1px 0 rgba(255,255,255,0.4) inset, var(--q-shadow-md);
}
.q-btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.4) inset, 0 12px 28px rgba(0,0,0,0.5);
}

.q-btn-ghost {
  background: transparent; color: var(--q-ink-2);
  border: 1px solid var(--q-line-2);
}
.q-btn-ghost:hover:not(:disabled) {
  color: var(--q-ink); border-color: var(--q-line-3);
}

.q-btn-emerald {
  background: linear-gradient(180deg, var(--q-emerald-2), var(--q-emerald));
  color: #0a0b0d; font-weight: 600;
  box-shadow: 0 0 0 1px rgba(52,224,123,0.4) inset, 0 8px 24px rgba(37,211,102,0.25);
}
.q-btn-emerald:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px rgba(52,224,123,0.5) inset, 0 12px 32px rgba(37,211,102,0.35);
}

.q-btn-lg { height: 50px; padding: 0 24px; font-size: 15px; border-radius: 12px; }
.q-btn-sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.q-btn-block { width: 100%; justify-content: center; }

/* ── 7. CARDS / TILES ──────────────────────────────────── */
.q-card {
  border: 1px solid var(--q-line);
  border-radius: var(--q-r-lg);
  padding: 28px;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), transparent);
  position: relative; overflow: hidden;
}
.q-card-hover {
  transition: border-color .25s var(--q-ease), transform .25s var(--q-ease);
}
.q-card-hover:hover {
  border-color: var(--q-line-2);
  transform: translateY(-2px);
}

.q-tile-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: rgba(245,184,69,0.10);
  border: 1px solid rgba(245,184,69,0.25);
  display: grid; place-items: center;
  color: var(--q-amber);
}

/* ── 8. BADGES & PILLS ─────────────────────────────────── */
.q-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 12px;
  border: 1px solid var(--q-line-2);
  border-radius: 999px;
  background: rgba(255,255,255,0.02);
  font-size: 12px;
  color: var(--q-ink-2);
  font-family: var(--q-mono);
  letter-spacing: 0.04em;
}
.q-pill .q-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--q-emerald);
  box-shadow: 0 0 0 4px rgba(37,211,102,0.18);
  animation: q-pulse 2.4s var(--q-ease) infinite;
}
@keyframes q-pulse {
  0%,100% { box-shadow: 0 0 0 4px rgba(37,211,102,0.18); }
  50%     { box-shadow: 0 0 0 7px rgba(37,211,102,0); }
}

.q-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  border-radius: 99px;
  border: 1px solid rgba(245,184,69,0.30);
  background: rgba(245,184,69,0.08);
  color: var(--q-amber);
}
.q-badge-emerald {
  border-color: rgba(37,211,102,0.30);
  background: rgba(37,211,102,0.08);
  color: var(--q-emerald);
}

/* ── 9. FORMS ──────────────────────────────────────────── */
.q-field { margin-bottom: 18px; }
.q-label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--q-ink-2);
  margin-bottom: 8px;
  font-family: var(--q-mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.q-input,
.q-select,
.q-textarea {
  width: 100%;
  padding: 12px 16px;
  background: var(--q-bg-2);
  border: 1px solid var(--q-line-2);
  border-radius: 10px;
  font-size: 15px;
  color: var(--q-ink);
  font-family: var(--q-sans);
  transition: all .18s var(--q-ease);
}
.q-input::placeholder,
.q-textarea::placeholder { color: var(--q-dim); }
.q-input:focus,
.q-select:focus,
.q-textarea:focus {
  outline: none;
  border-color: var(--q-amber);
  box-shadow: 0 0 0 3px var(--q-amber-glow);
  background: var(--q-surface);
}
.q-textarea { resize: vertical; min-height: 100px; line-height: 1.55; }

.q-checkbox {
  appearance: none; -webkit-appearance: none;
  width: 18px; height: 18px;
  border: 1px solid var(--q-line-3);
  border-radius: 4px;
  background: var(--q-bg-2);
  cursor: pointer;
  position: relative;
  transition: all .18s var(--q-ease);
  flex-shrink: 0;
}
.q-checkbox:checked {
  background: var(--q-amber);
  border-color: var(--q-amber);
}
.q-checkbox:checked::after {
  content: '';
  position: absolute;
  left: 5px; top: 1px;
  width: 5px; height: 9px;
  border: solid #0a0b0d;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* ── 10. ALERTS / MESSAGES ─────────────────────────────── */
.q-alert {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 14px;
  margin-bottom: 14px;
  border: 1px solid;
  display: flex; align-items: center; gap: 10px;
}
.q-alert-error    { background: rgba(240,130,116,0.08); border-color: rgba(240,130,116,0.25); color: var(--q-error); }
.q-alert-success  { background: rgba(37,211,102,0.08);  border-color: rgba(37,211,102,0.25);  color: var(--q-success); }
.q-alert-warning  { background: rgba(245,184,69,0.08);  border-color: rgba(245,184,69,0.25);  color: var(--q-warning); }
.q-alert-info     { background: rgba(108,196,255,0.08); border-color: rgba(108,196,255,0.25); color: var(--q-info); }

/* ── 11. AUTH SPLIT-SCREEN LAYOUT ──────────────────────── */
.q-auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.q-auth-form-side {
  display: flex; flex-direction: column;
  padding: 48px 64px;
  position: relative;
  z-index: 2;
}
.q-auth-form-inner {
  margin: auto;
  width: 100%;
  max-width: 420px;
}
.q-auth-brand-side {
  background:
    radial-gradient(ellipse 800px 600px at 30% 50%, rgba(245,184,69,0.10), transparent 60%),
    radial-gradient(ellipse 600px 400px at 70% 80%, rgba(37,211,102,0.06), transparent 60%),
    linear-gradient(180deg, var(--q-surface), var(--q-bg-2));
  border-left: 1px solid var(--q-line);
  display: flex; flex-direction: column; justify-content: center;
  padding: 64px;
  position: relative; overflow: hidden;
}
.q-auth-brand-headline {
  font-size: clamp(32px, 3.2vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  color: var(--q-ink);
}
.q-auth-feature {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 14px 16px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--q-line);
  border-radius: 12px;
  margin-bottom: 10px;
}
.q-auth-feature-icon {
  width: 32px; height: 32px; border-radius: 8px;
  background: rgba(245,184,69,0.10);
  border: 1px solid rgba(245,184,69,0.20);
  display: grid; place-items: center;
  color: var(--q-amber);
  flex-shrink: 0;
}
.q-auth-feature h5 {
  font-size: 14px; font-weight: 600; color: var(--q-ink); margin-bottom: 2px;
}
.q-auth-feature p {
  font-size: 12px; color: var(--q-muted); line-height: 1.5;
}

@media (max-width: 880px) {
  .q-auth-shell { grid-template-columns: 1fr; }
  .q-auth-brand-side { display: none; }
  .q-auth-form-side { padding: 32px 24px; }
}

/* ── 12. FOOTER ────────────────────────────────────────── */
.q-footer { padding: 80px 0 48px; border-top: 1px solid var(--q-line); margin-top: 80px; }
.q-footer-grid { display: grid; grid-template-columns: 1.5fr repeat(4,1fr); gap: 48px; margin-bottom: 48px; }
.q-footer h5 {
  font-family: var(--q-mono); font-size: 11px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--q-muted); margin-bottom: 18px;
}
.q-footer ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.q-footer li a {
  font-size: 14px; color: var(--q-ink-2);
  transition: color .15s var(--q-ease);
}
.q-footer li a:hover { color: var(--q-ink); }
.q-footer-tag {
  font-family: var(--q-serif); font-style: italic;
  font-size: 18px; color: var(--q-ink-2);
  max-width: 280px; margin-top: 14px;
}
.q-footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 32px; border-top: 1px solid var(--q-line);
}
.q-footer-bottom span {
  font-size: 12px; color: var(--q-muted); font-family: var(--q-mono);
}

/* ── 13. UTILITIES ─────────────────────────────────────── */
.q-flex     { display: flex; }
.q-flex-col { display: flex; flex-direction: column; }
.q-grid     { display: grid; }
.q-items-center { align-items: center; }
.q-justify-between { justify-content: space-between; }
.q-justify-center  { justify-content: center; }
.q-gap-2  { gap: 8px; }
.q-gap-3  { gap: 12px; }
.q-gap-4  { gap: 16px; }
.q-gap-6  { gap: 24px; }
.q-gap-8  { gap: 32px; }
.q-mt-2 { margin-top: 8px; }
.q-mt-4 { margin-top: 16px; }
.q-mt-6 { margin-top: 24px; }
.q-mt-8 { margin-top: 32px; }
.q-mb-2 { margin-bottom: 8px; }
.q-mb-4 { margin-bottom: 16px; }
.q-mb-6 { margin-bottom: 24px; }
.q-mb-8 { margin-bottom: 32px; }
.q-text-center { text-align: center; }
.q-flex-1 { flex: 1; }
.q-w-full { width: 100%; }
.q-relative { position: relative; }
.q-z-10 { z-index: 10; }

/* ── 14. RESPONSIVE ────────────────────────────────────── */
@media (max-width: 980px) {
  .q-section { padding: 80px 0; }
  .q-footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 640px) {
  .q-container { padding: 0 20px; }
  .q-nav-links { display: none; }
  .q-section { padding: 64px 0; }
  .q-footer-grid { grid-template-columns: 1fr; }
}

/* ── 15. THEME REQUIREMENTS NOTE ───────────────────────────
   To use this stylesheet, the page should also include:

   <link rel="preconnect" href="https://fonts.googleapis.com">
   <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
   <link href="https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet">

   ───────────────────────────────────────────────────────── */
