/* Lubb design tokens — kernel, shell, ink and paper. Keep in sync with brand/build_logo.py. */

@font-face {
  font-family: "Rubik";
  src: url("../fonts/rubik.woff2") format("woff2");
  font-weight: 600 800;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans Arabic";
  src: url("../fonts/ibm-plex-sans-arabic-regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans Arabic";
  src: url("../fonts/ibm-plex-sans-arabic-medium.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans Arabic";
  src: url("../fonts/ibm-plex-sans-arabic-semibold.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans Arabic";
  src: url("../fonts/ibm-plex-sans-arabic-bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: light;

  /* palette: the kernel (pistachio green), its shell, ink and paper */
  --kernel-50: #F3F8EA;
  --kernel-100: #E4F0CF;
  --kernel-200: #CBE4A4;
  --kernel-300: #AED67A;
  --kernel-400: #93C553;
  --kernel-500: #77AD38;
  --kernel-600: #5C8F27;
  --kernel-700: #46701D;
  --kernel-800: #355417;
  --shell-100: #F3ECDD;
  --shell-200: #E9DCBE;
  --shell-300: #D6C29A;
  --shell-500: #A98C5C;
  --ink-900: #18221A;
  --ink-950: #0F1611;
  --paper: #FAF7F0;
  --amber-100: #FBEFC8;
  --amber-500: #E2A300;
  --amber-700: #8F6400;
  --jam: #C8483B;
  --herb: #2F7A55;
  --telegram: #229ED9;

  /* roles */
  --bg: var(--paper);
  --bg-soft: #F2EDE2;
  --surface: #FFFFFF;
  --surface-2: #FDFBF6;
  --text: var(--ink-900);
  --text-soft: #4A5446;
  --text-muted: #6B7364;
  --border: #E6DFCF;
  --border-strong: #D3C7AC;
  --accent: var(--kernel-400);
  --accent-strong: var(--kernel-500);
  --accent-ink: var(--ink-900);
  --link: var(--kernel-700);
  --danger: var(--jam);
  --danger-soft: #FBE7E4;
  --success: var(--herb);
  --success-soft: #E2F1E8;
  --warning-soft: #FBF1D6;
  --focus: var(--kernel-600);
  --invert-bg: var(--ink-900);
  --invert-text: #EEF0E4;

  --shadow-sm: 0 1px 2px rgba(24, 34, 26, 0.06), 0 1px 1px rgba(24, 34, 26, 0.04);
  --shadow: 0 10px 30px -12px rgba(48, 66, 34, 0.28), 0 2px 6px rgba(24, 34, 26, 0.06);
  --shadow-lg: 0 30px 70px -24px rgba(48, 66, 34, 0.42);

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  --font-display: "Rubik", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --font-body: "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --container: 1140px;
  --gutter: clamp(16px, 4vw, 32px);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: var(--ink-950);
    --bg-soft: #151E17;
    --surface: #1A241C;
    --surface-2: #202B22;
    --text: #EEF0E4;
    --text-soft: #C9D0BE;
    --text-muted: #8F9886;
    --border: #2A362C;
    --border-strong: #3B4A3D;
    --link: var(--kernel-300);
    --danger-soft: #3A1C17;
    --success-soft: #142A1F;
    --warning-soft: #2D2914;
    --focus: var(--kernel-300);
    --invert-bg: #0A0F0B;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.6), 0 2px 6px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 30px 70px -24px rgba(0, 0, 0, 0.7);
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
html[lang="en"] body { line-height: 1.6; }

img, svg { display: block; max-width: 100%; }
a { color: var(--link); text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--kernel-200); color: var(--ink-900); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.icon { width: 1.25em; height: 1.25em; flex: none; }
[dir="rtl"] .flip-rtl { transform: scaleX(-1); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

/* ------------------------------------------------------------------ buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55em;
  min-height: 46px; padding: 0.55em 1.25em;
  border: 2px solid transparent; border-radius: 999px;
  font-weight: 600; font-size: 1rem; line-height: 1.2; text-decoration: none; white-space: nowrap;
  cursor: pointer; transition: transform 0.15s var(--ease), box-shadow 0.15s var(--ease), background 0.15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--accent); color: var(--accent-ink);
  box-shadow: 0 3px 0 var(--kernel-600), 0 10px 22px -10px rgba(92, 143, 39, 0.65);
}
.btn-primary:hover { background: var(--kernel-300); }
.btn-primary:active { box-shadow: 0 1px 0 var(--kernel-600); }
.btn-secondary { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover { background: var(--surface); border-color: var(--kernel-600); }
.btn-ghost { background: transparent; color: var(--text-soft); padding-inline: 0.8em; }
.btn-ghost:hover { color: var(--text); background: var(--bg-soft); }
.btn-dark { background: var(--ink-900); color: var(--kernel-200); }
.btn-dark:hover { background: #26332A; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { filter: brightness(1.08); }
.btn-lg { min-height: 56px; padding-inline: 1.6em; font-size: 1.08rem; }
.btn-sm { min-height: 36px; padding: 0.35em 0.9em; font-size: 0.9rem; }
.btn-block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }
.btn .tg-dot {
  display: inline-grid; place-items: center; width: 1.6em; height: 1.6em; border-radius: 50%;
  background: var(--telegram); color: #fff;
}
.btn .tg-dot .icon { width: 0.95em; height: 0.95em; }
