/* HASHHOST — Official brand tokens (do not modify colors/weights without the identity guide) */

@import url('https://fonts.googleapis.com/css2?family=Roboto+Flex:opsz,wght@8..144,300..900&display=swap');

:root {
  color-scheme: light;

  /* Light palette (identity rule — do not change) */
  --gold:          #F8A302;
  --gold-soft:     #FFF4DE;
  --ink:           #303B51;
  --page:          #EFF1F7;
  --card:          #FFFFFF;
  --inner:         #F7F9FD;
  --text:          #697895;
  --muted:         #98A1B3;
  --border:        #EAEFFF;

  /* Status */
  --ok:            #28BC94;
  --ok-bg:         #E8F9F2;
  --danger:        #E44E53;
  --danger-bg:     #FFF0F1;
  --info:          #399FFF;
  --info-bg:       #EEF4FF;

  /* Shape */
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 20px;
  --shadow-card: 0 1px 2px rgba(48,59,81,.04), 0 4px 16px rgba(48,59,81,.05);
  --shadow-hover: 0 2px 4px rgba(48,59,81,.06), 0 10px 28px rgba(48,59,81,.07);

  /* Type */
  --font-latin:  'Roboto Flex', 'Segoe UI', Arial, sans-serif;
  --font-arabic: 'Segoe UI', Tahoma, Arial, sans-serif;
}

/* Dark palette (identity rule — do not change) */
:root[data-theme="dark"] {
  color-scheme: dark;

  --gold:          #E5A834;
  --gold-soft:     #3A2E1A;
  --ink:           #DFE4EA;
  --page:          #242B33;
  --card:          #2C3139;
  --inner:         #21252B;
  --text:          #B9C2CF;
  --muted:         #808B9C;
  --border:        #353B45;

  --ok-bg:         #16352A;
  --danger-bg:     #3B1E22;
  --info-bg:       #192E42;

  --shadow-card: 0 1px 2px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.25);
  --shadow-hover: 0 2px 4px rgba(0,0,0,.4), 0 10px 28px rgba(0,0,0,.35);
}

/* Reset & body */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-arabic);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
  transition: background .18s ease, color .18s ease;
}
body[dir="ltr"] { font-family: var(--font-latin); }

/* The HASHHOST wordmark always stays LTR Latin (brand rule #16) */
.brand-wordmark, .brand .name {
  font-family: var(--font-latin);
  font-weight: 800;
  letter-spacing: 0.02em;
  direction: ltr;
  unicode-bidi: isolate;
  text-transform: uppercase;
}

/* Headings — navy ink in light, pale ink in dark */
h1, h2, h3, h4 { color: var(--ink); margin: 0; font-family: var(--font-arabic); }
body[dir="ltr"] h1, body[dir="ltr"] h2, body[dir="ltr"] h3, body[dir="ltr"] h4 { font-family: var(--font-latin); }
h1 { font-weight: 650; font-size: clamp(28px, 4.2vw, 40px); line-height: 1.25; letter-spacing: -0.01em; }
h2 { font-weight: 650; font-size: clamp(22px, 2.6vw, 28px); line-height: 1.3; }
h3 { font-weight: 600; font-size: 18px; line-height: 1.4; }
h4 { font-weight: 600; font-size: 16px; line-height: 1.4; }
body[dir="rtl"] h1 { line-height: 1.4; }

p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }
[hidden] { display: none !important; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: var(--r-sm);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .12s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease, color .18s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--gold);
  color: #303B51;
  box-shadow: 0 1px 0 rgba(0,0,0,.04), 0 6px 16px rgba(248,163,2,.22);
}
[data-theme="dark"] .btn-primary { color: #1A1F26; }
.btn-primary:hover { filter: brightness(1.05); }

.btn-secondary {
  background: var(--card);
  color: var(--ink);
  border-color: var(--border);
}
.btn-secondary:hover { border-color: var(--gold); }

/* Status chip */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-latin);
  line-height: 1;
}
.chip.ok     { background: var(--ok-bg);     color: var(--ok); }
.chip.danger { background: var(--danger-bg); color: var(--danger); }
.chip.info   { background: var(--info-bg);   color: var(--info); }
.chip.muted  { background: var(--inner);     color: var(--muted); }
.chip-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* Cards baseline */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-card);
}

/* Focus ring (accessibility) */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: 4px;
}
button, a { -webkit-tap-highlight-color: transparent; }
