/* =====================================================
   هلّة · HALLAH · Brand Tokens & Shared Styles
   ===================================================== */

:root {
  /* Primary Brand Colors */
  --sage: #6B7F5C;
  --sage-dark: #556649;
  --sage-light: #8a9d7c;
  --sage-faint: #eef0e9;

  --copper: #B08968;
  --copper-light: #c9a589;
  --copper-faint: #f4ebe1;
  --copper-dark: #8c6c52;

  --cream: #E8E0D3;
  --cream-light: #f0eadf;

  --offwhite: #FAF7F2;
  --white: #ffffff;

  --charcoal: #2C2C2A;
  --charcoal-soft: #4a4a47;
  --muted: #6C6864;
  --muted-light: #999592;
  --line: rgba(44,44,42,.08);
  --line-strong: rgba(44,44,42,.15);

  /* Status colors */
  --success: #6B7F5C;
  --warning: #d4a06a;
  --danger: #c45f5f;
  --info: #6b8a9e;

  /* Typography */
  --display: "Reem Kufi", "Tajawal", sans-serif;
  --body: "Tajawal", "Reem Kufi", sans-serif;

  /* Shadows */
  --shadow-phone: 0 30px 60px -15px rgba(44,44,42,.35), 0 18px 36px -18px rgba(44,44,42,.25);
  --shadow-card: 0 4px 14px -6px rgba(44,44,42,.12);
  --shadow-soft: 0 2px 8px -3px rgba(44,44,42,.08);
  --shadow-elevated: 0 10px 30px -10px rgba(44,44,42,.18);
  --shadow-deep: 0 20px 50px -15px rgba(44,44,42,.28);

  /* Spacing scale */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;

  /* Border radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 24px;
  --radius-full: 999px;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: var(--body);
  color: var(--charcoal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
button { font-family: inherit; cursor: pointer; border: none; background: none; }
a { color: inherit; text-decoration: none; }
input, select, textarea { font-family: inherit; }
img { display: block; max-width: 100%; height: auto; }

/* Accessible focus states across all surfaces */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--sage);
  outline-offset: 2px;
}

/* Common utility components */
.brand-mark {
  font-family: var(--display);
  font-weight: 700;
  color: var(--sage);
  letter-spacing: -1px;
}

/* ===== CUSTOM ICON SYSTEM ===== */
.ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.1em;
  height: 1.1em;
  line-height: 1;
  vertical-align: -0.18em;
  flex-shrink: 0;
}
.ico svg {
  width: 100%;
  height: 100%;
  display: block;
}
/* Sizing modifiers */
.ico.sm { width: 14px; height: 14px; }
.ico.md { width: 18px; height: 18px; }
.ico.lg { width: 22px; height: 22px; }
.ico.xl { width: 28px; height: 28px; }
.ico.xxl { width: 38px; height: 38px; }
.ico.xxxl { width: 56px; height: 56px; }

/* When ico replaces an emoji inside a heading or button, size to match */
button .ico, .btn .ico { width: 1.05em; height: 1.05em; }
h1 .ico, h2 .ico, h3 .ico { width: .9em; height: .9em; }

/* Solid icon variant (filled background circle) */
.ico-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  flex-shrink: 0;
}
.ico-tile.sage { background: var(--sage-faint); color: var(--sage-dark); }
.ico-tile.copper { background: var(--copper-faint); color: var(--copper); }
.ico-tile.cream { background: var(--cream); color: var(--charcoal); }

/* ===== BRAND LOGO IMAGE ===== */
.brand-logo {
  display: inline-block;
  width: auto;
  height: 64px;
  object-fit: contain;
  vertical-align: middle;
}
.brand-logo.xs { height: 28px; }
.brand-logo.sm { height: 40px; }
.brand-logo.md { height: 56px; }
.brand-logo.lg { height: 96px; }
.brand-logo.xl { height: 160px; }
.brand-logo.xxl { height: 220px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--display);
  font-weight: 600;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  transition: all .22s ease;
  cursor: pointer;
  border: none;
}
.btn-primary {
  background: var(--sage);
  color: var(--offwhite);
  box-shadow: 0 6px 16px -6px rgba(107,127,92,.5);
}
.btn-primary:hover { background: var(--sage-dark); transform: translateY(-1px); }
.btn-secondary {
  background: transparent;
  color: var(--sage);
  border: 1.5px solid var(--sage);
}
.btn-secondary:hover { background: var(--sage); color: var(--offwhite); }
.btn-ghost {
  background: var(--cream);
  color: var(--charcoal);
}
.btn-ghost:hover { background: var(--copper-faint); }
.btn-copper {
  background: var(--copper);
  color: var(--offwhite);
}
.btn-copper:hover { background: var(--copper-dark); }

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-family: var(--display);
  font-size: 11px;
  font-weight: 600;
}
.badge-sage { background: var(--sage-faint); color: var(--sage-dark); }
.badge-copper { background: var(--copper-faint); color: var(--copper); }
.badge-cream { background: var(--cream); color: var(--charcoal-soft); }
.badge-success { background: rgba(107,127,92,.15); color: var(--sage-dark); }
.badge-warning { background: rgba(212,160,106,.15); color: #8a6a3f; }
.badge-danger { background: rgba(196,95,95,.12); color: #8a3838; }

/* Card */
.card {
  background: var(--offwhite);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-card);
}

/* Scrollbar styling */
.scroll-clean::-webkit-scrollbar { width: 0; height: 0; }
.scroll-clean { scrollbar-width: none; }

.scroll-slim::-webkit-scrollbar { width: 6px; height: 6px; }
.scroll-slim::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 3px;
}
.scroll-slim::-webkit-scrollbar-thumb:hover { background: var(--muted); }
