/*
  Quark2Quanta Shared Brand Stylesheet
  File: q2q.css
  Version: 2.1

  Purpose:
  Use this CSS across Quark2Quanta subdomains for consistent branding.

  Recommended locations:
  - app.quark2quanta.com/public_html/q2q.css
  - blog.quark2quanta.com/public_html/q2q.css
  - portfolio.quark2quanta.com/public_html/q2q.css

  Usage:
  <link rel="stylesheet" href="/q2q.css">
*/

:root {
  /* Core brand palette */
  --q2q-primary: #1f4f82;
  --q2q-primary-dark: #163b61;
  --q2q-primary-soft: #eef4fb;

  --q2q-accent: #2f80ed;
  --q2q-accent-dark: #1f66c1;

  --q2q-text: #1f2933;
  --q2q-heading: #102a43;
  --q2q-muted: #52606d;
  --q2q-light-muted: #829ab1;

  --q2q-bg: #f7f9fc;
  --q2q-bg-soft: #f0f4f8;
  --q2q-card: #ffffff;
  --q2q-border: #d9e2ec;
  --q2q-border-strong: #bcccdc;

  --q2q-success-bg: #e6f4ea;
  --q2q-success-border: #9ad6a5;
  --q2q-success-text: #1b5e20;

  --q2q-warning-bg: #fff8e6;
  --q2q-warning-border: #f5c542;
  --q2q-warning-text: #5f4b00;

  --q2q-danger-bg: #fdecea;
  --q2q-danger-border: #f5b5b0;
  --q2q-danger-text: #8a1f11;

  --q2q-font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --q2q-max-width: 1120px;
  --q2q-content-width: 860px;

  --q2q-radius-sm: 8px;
  --q2q-radius-md: 14px;
  --q2q-radius-lg: 18px;
  --q2q-radius-pill: 999px;

  --q2q-shadow-sm: 0 6px 18px rgba(15, 23, 42, 0.06);
  --q2q-shadow-md: 0 12px 30px rgba(15, 23, 42, 0.08);

  --q2q-focus-ring: 0 0 0 3px rgba(47, 128, 237, 0.16);
}

/* Base reset */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.q2q-body,
.q2q-scope {
  margin: 0;
  font-family: var(--q2q-font);
  color: var(--q2q-text);
  background: linear-gradient(180deg, #ffffff 0%, var(--q2q-bg) 100%);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.q2q-body {
  min-height: 100vh;
}

.q2q-scope img,
body.q2q-body img {
  max-width: 100%;
  height: auto;
}

.q2q-scope a,
body.q2q-body a {
  color: var(--q2q-primary);
}

.q2q-scope a:hover,
body.q2q-body a:hover {
  color: var(--q2q-primary-dark);
}

/* Layout containers */

.q2q-container {
  width: min(var(--q2q-max-width), calc(100% - 44px));
  margin-left: auto;
  margin-right: auto;
}

.q2q-content {
  width: min(var(--q2q-content-width), calc(100% - 44px));
  margin-left: auto;
  margin-right: auto;
}

.q2q-section {
  padding: 56px 0;
}

.q2q-section-sm {
  padding: 36px 0;
}

.q2q-section-lg {
  padding: 76px 0;
}

/* Header and navigation */

.q2q-header {
  border-bottom: 1px solid var(--q2q-border);
  background: #ffffff;
}

.q2q-header-inner {
  width: min(var(--q2q-max-width), calc(100% - 44px));
  margin: 0 auto;
  min-height: 74px;
  padding: 14px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.q2q-brand {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  text-decoration: none;
  color: var(--q2q-heading);
}

.q2q-brand:hover {
  color: var(--q2q-heading);
  text-decoration: none;
}

.q2q-brand-horizontal {
  flex-direction: row;
  align-items: center;
  gap: 12px;
}

.q2q-site-logo {
  width: 46px;
  height: 46px;
  max-width: 46px;
  max-height: 46px;
  object-fit: contain;
  display: block;
  flex: 0 0 auto;
  border-radius: 6px;
}

.q2q-brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.q2q-brand-name {
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: 0.01em;
  line-height: 1.1;
}

.q2q-brand-tagline {
  color: var(--q2q-muted);
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.25;
}

.q2q-nav {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  font-size: 0.95rem;
}

.q2q-nav a {
  color: var(--q2q-primary);
  text-decoration: none;
  font-weight: 650;
}

.q2q-nav a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Hero */

.q2q-hero {
  padding: 64px 0;
}

.q2q-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 34px;
  align-items: stretch;
}

.q2q-kicker {
  display: inline-block;
  margin-bottom: 14px;
  padding: 6px 12px;
  border-radius: var(--q2q-radius-pill);
  background: var(--q2q-primary-soft);
  color: var(--q2q-primary-dark);
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.q2q-title,
.q2q-scope h1,
body.q2q-body h1 {
  color: var(--q2q-heading);
  margin-top: 0;
  margin-bottom: 16px;
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.q2q-subtitle,
.q2q-lead {
  color: var(--q2q-muted);
  font-size: 1.12rem;
  max-width: 760px;
  margin-top: 0;
  margin-bottom: 26px;
}

/* Headings and text */

.q2q-scope h2,
body.q2q-body h2 {
  color: var(--q2q-heading);
  margin-top: 0;
  margin-bottom: 14px;
  font-size: clamp(1.45rem, 2.4vw, 2rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.q2q-scope h3,
body.q2q-body h3 {
  color: var(--q2q-heading);
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 1.25rem;
  line-height: 1.25;
}

.q2q-muted {
  color: var(--q2q-muted) !important;
}

.q2q-small {
  font-size: 0.92rem;
}

/* Cards and panels */

.q2q-card,
.q2q-panel,
.q2q-status-panel,
.q2q-portal-status {
  background: var(--q2q-card);
  border: 1px solid var(--q2q-border);
  border-radius: var(--q2q-radius-lg);
  padding: 32px;
  box-shadow: var(--q2q-shadow-sm);
}

.q2q-card-lg,
.q2q-portal-card {
  background: var(--q2q-card);
  border: 1px solid var(--q2q-border);
  border-radius: var(--q2q-radius-lg);
  padding: 38px;
  box-shadow: var(--q2q-shadow-md);
}

.q2q-card-compact {
  padding: 22px;
}

.q2q-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.q2q-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

/* Buttons */

.q2q-button-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 28px;
}

.q2q-button,
.q2q-primary-button,
.q2q-secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 22px;
  border-radius: var(--q2q-radius-pill);
  text-decoration: none;
  font-weight: 800;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1.2;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.q2q-button:hover,
.q2q-primary-button:hover,
.q2q-secondary-button:hover {
  transform: translateY(-1px);
  text-decoration: none;
}

.q2q-button.primary,
.q2q-primary-button {
  background: var(--q2q-primary);
  color: #ffffff !important;
}

.q2q-button.primary:hover,
.q2q-primary-button:hover {
  background: var(--q2q-primary-dark);
  color: #ffffff !important;
}

.q2q-button.secondary,
.q2q-secondary-button {
  background: #ffffff;
  color: var(--q2q-primary) !important;
  border-color: var(--q2q-border);
}

.q2q-button.secondary:hover,
.q2q-secondary-button:hover {
  border-color: var(--q2q-primary);
  color: var(--q2q-primary-dark) !important;
}

.q2q-link-strong {
  color: var(--q2q-primary);
  text-decoration: none;
  font-weight: 750;
}

.q2q-link-strong:hover {
  text-decoration: underline;
}

/* Forms */

.q2q-form {
  margin: 0;
}

.q2q-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 22px;
}

.q2q-form-field {
  display: flex;
  flex-direction: column;
}

.q2q-form-field.full {
  grid-column: 1 / -1;
}

.q2q-form-field label {
  font-weight: 650;
  margin-bottom: 6px;
  font-size: 0.95rem;
  color: var(--q2q-heading);
}

.q2q-form-field input,
.q2q-form-field select,
.q2q-form-field textarea {
  border: 1px solid var(--q2q-border-strong);
  border-radius: var(--q2q-radius-sm);
  padding: 11px 12px;
  font-size: 1rem;
  background: #ffffff;
  color: var(--q2q-text);
  font-family: var(--q2q-font);
}

.q2q-form-field textarea {
  min-height: 130px;
  resize: vertical;
}

.q2q-form-field input:focus,
.q2q-form-field select:focus,
.q2q-form-field textarea:focus {
  outline: none;
  border-color: var(--q2q-accent);
  box-shadow: var(--q2q-focus-ring);
}

.q2q-checkbox-group {
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.q2q-checkbox-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.95rem;
  line-height: 1.45;
}

.q2q-checkbox-row input {
  margin-top: 4px;
}

/* Notices */

.q2q-notice,
.q2q-note {
  margin: 22px 0;
  padding: 18px 20px;
  border-radius: var(--q2q-radius-md);
  background: var(--q2q-bg-soft);
  border: 1px solid var(--q2q-border);
  color: var(--q2q-muted);
}

.q2q-notice.success,
.q2q-note.success {
  background: var(--q2q-success-bg);
  border-color: var(--q2q-success-border);
  color: var(--q2q-success-text);
}

.q2q-notice.warning,
.q2q-note.warning {
  background: var(--q2q-warning-bg);
  border-color: var(--q2q-warning-border);
  color: var(--q2q-warning-text);
}

.q2q-notice.danger,
.q2q-note.danger {
  background: var(--q2q-danger-bg);
  border-color: var(--q2q-danger-border);
  color: var(--q2q-danger-text);
}

.q2q-hidden {
  display: none !important;
}

/* Status lists */

.q2q-status-list {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
}

.q2q-status-list li {
  padding: 12px 0;
  border-top: 1px solid var(--q2q-border);
  color: var(--q2q-muted);
}

.q2q-status-list strong {
  color: var(--q2q-heading);
}

/* Tables */

.q2q-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--q2q-border);
  border-radius: var(--q2q-radius-md);
  background: #ffffff;
}

.q2q-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}

.q2q-table th,
.q2q-table td {
  padding: 13px 15px;
  border-bottom: 1px solid var(--q2q-border);
  text-align: left;
  vertical-align: top;
}

.q2q-table th {
  background: var(--q2q-primary-soft);
  color: var(--q2q-heading);
  font-weight: 800;
}

.q2q-table tr:last-child td {
  border-bottom: none;
}

/* Footer */

.q2q-footer {
  border-top: 1px solid var(--q2q-border);
  background: #ffffff;
  margin-top: 34px;
}

.q2q-footer-inner {
  width: min(var(--q2q-max-width), calc(100% - 44px));
  margin: 0 auto;
  padding: 24px 0;
  color: var(--q2q-muted);
  font-size: 0.92rem;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.q2q-footer a {
  color: var(--q2q-primary);
  text-decoration: none;
  font-weight: 650;
}

.q2q-footer a:hover {
  text-decoration: underline;
}

/* Utility spacing */

.q2q-mt-0 { margin-top: 0 !important; }
.q2q-mt-1 { margin-top: 8px !important; }
.q2q-mt-2 { margin-top: 16px !important; }
.q2q-mt-3 { margin-top: 24px !important; }
.q2q-mt-4 { margin-top: 32px !important; }

.q2q-mb-0 { margin-bottom: 0 !important; }
.q2q-mb-1 { margin-bottom: 8px !important; }
.q2q-mb-2 { margin-bottom: 16px !important; }
.q2q-mb-3 { margin-bottom: 24px !important; }
.q2q-mb-4 { margin-bottom: 32px !important; }

.q2q-center {
  text-align: center;
}

.q2q-divider {
  height: 1px;
  border: 0;
  background: var(--q2q-border);
  margin: 28px 0;
}

/* Responsive behavior */

@media (max-width: 900px) {
  .q2q-hero-grid,
  .q2q-grid-2,
  .q2q-grid-3 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .q2q-header-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .q2q-nav {
    gap: 12px 16px;
    justify-content: flex-start;
  }

  .q2q-site-logo {
    width: 40px;
    height: 40px;
    max-width: 40px;
    max-height: 40px;
  }

  .q2q-hero {
    padding: 42px 0;
  }

  .q2q-card,
  .q2q-panel,
  .q2q-card-lg,
  .q2q-status-panel,
  .q2q-portal-card,
  .q2q-portal-status {
    padding: 24px;
  }

  .q2q-form-grid {
    grid-template-columns: 1fr;
  }

  .q2q-button,
  .q2q-primary-button,
  .q2q-secondary-button {
    width: 100%;
  }
}

/* Print cleanup */

@media print {
  .q2q-header,
  .q2q-footer,
  .q2q-button-row,
  .q2q-nav {
    display: none !important;
  }

  body.q2q-body,
  .q2q-scope {
    background: #ffffff !important;
    color: #000000 !important;
  }

  .q2q-card,
  .q2q-panel,
  .q2q-status-panel,
  .q2q-portal-card,
  .q2q-portal-status {
    box-shadow: none !important;
    border: 1px solid #999999 !important;
  }
}
