/* ============================================================
   DOOKUN AI — UNIVERSAL DESIGN SYSTEM
   Canonical stylesheet for:
   ai.dookun.com
   localai.dookun.com
   and future Dookun AI tools.

   Do not redefine core typography/colors per product.
   Product CSS may extend this file, not replace it.
   ============================================================ */

:root {
  /* Typography */
  --dai-font:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Helvetica,
    Arial,
    sans-serif;

  --dai-weight-regular: 400;
  --dai-weight-medium: 600;
  --dai-weight-bold: 700;
  --dai-weight-heavy: 800;

  /* Brand */
  --dai-text: #271a3b;
  --dai-muted: #70667c;
  --dai-purple: #7c3aed;
  --dai-purple-dark: #6330cf;
  --dai-purple-soft: #f2ebff;

  /* Surfaces */
  --dai-bg: #fffaf4;
  --dai-panel: #ffffff;
  --dai-border: #e8ddf8;
  --dai-shadow: 0 18px 48px rgba(92,52,132,.09);

  /* Geometry */
  --dai-radius-sm: 10px;
  --dai-radius-md: 16px;
  --dai-radius-lg: 24px;
  --dai-shell: 1180px;
}

/* ------------------------------------------------------------
   TYPOGRAPHY — same everywhere
   ------------------------------------------------------------ */

html,
body,
button,
input,
select,
textarea {
  font-family: var(--dai-font);
}

body {
  color: var(--dai-text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--dai-font);
  color: var(--dai-text);
}

h1 {
  font-weight: var(--dai-weight-heavy);
  letter-spacing: -0.055em;
}

h2,
h3 {
  font-weight: var(--dai-weight-bold);
  letter-spacing: -0.035em;
}

p {
  color: var(--dai-muted);
}

/* The canonical Dookun AI hero treatment — matches LocalAI */
.dai-hero-title,
.hero h1,
.compact-intro h1 {
  font-family: var(--dai-font) !important;
  font-weight: 800 !important;
  letter-spacing: -0.055em !important;
  line-height: 1 !important;
}

/* ------------------------------------------------------------
   COMMON COMPONENTS
   ------------------------------------------------------------ */

.dai-shell {
  width: min(calc(100% - 40px), var(--dai-shell));
  margin-inline: auto;
}

.dai-eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border: 1px solid #dfcff7;
  border-radius: 999px;
  background: var(--dai-purple-soft);
  color: #6d42d8;
  font-size: .76rem;
  font-weight: 800;
}

.dai-card {
  background: var(--dai-panel);
  border: 1px solid var(--dai-border);
  border-radius: var(--dai-radius-lg);
  box-shadow: var(--dai-shadow);
}

.dai-button-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 13px;
  padding: 12px 16px;
  background: linear-gradient(135deg, #9258ff, #7137e8);
  color: #fff;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(124,58,237,.20);
}

.dai-button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--dai-border);
  border-radius: 13px;
  padding: 11px 15px;
  background: #fff;
  color: #62556f;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.dai-language-switch {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid #e2d7eb;
  border-radius: 999px;
  padding: 6px 9px;
  background: #fff;
}

.dai-coming-soon {
  opacity: .58;
  filter: grayscale(.12);
  pointer-events: none;
}

/* ------------------------------------------------------------
   Existing app compatibility
   ------------------------------------------------------------ */

/* AI portal */
body .hero h1 {
  font-family: var(--dai-font) !important;
}

/* LocalAI */
body .compact-intro h1,
body .fit-summary h2,
body .result-empty-explainer h2 {
  font-family: var(--dai-font) !important;
}

/* Shared flags */
.language-switch button,
.ai-language-switch button {
  font-family: var(--dai-font);
}

/* ------------------------------------------------------------
   Responsive foundation
   ------------------------------------------------------------ */

@media (max-width: 780px) {
  .dai-shell {
    width: min(calc(100% - 24px), var(--dai-shell));
  }
}

/* AI portal hero alignment with LocalAI */
body .hero h1 {
  font-size: clamp(2rem, 4vw, 3.4rem) !important;
  line-height: 1 !important;
  letter-spacing: -0.055em !important;
  font-weight: 800 !important;
}
