/* =============================================================================
   ZENZAS BASE STYLES
   Reset, global defaults, typography, logical properties, skip link, focus.
   ============================================================================= */

/* ---------------------------------------------------------------------------
   1. BOX-SIZING RESET
--------------------------------------------------------------------------- */

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

/* ---------------------------------------------------------------------------
   2. ROOT & HTML
--------------------------------------------------------------------------- */

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  font-size: 100%;                /* 16px base */
  tab-size: 2;
}

/* Arabic page root */
html[lang="ar"] {
  font-family: var(--font-arabic);
}

/* ---------------------------------------------------------------------------
   3. BODY
--------------------------------------------------------------------------- */

body {
  font-family: var(--font-latin);
  font-size: var(--text-lg);
  font-weight: var(--fw-regular);
  line-height: var(--leading-relaxed);
  color: var(--color-body);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

html[lang="ar"] body {
  font-family: var(--font-arabic);
  text-align: start;
}

/* ---------------------------------------------------------------------------
   4. TYPOGRAPHY DEFAULTS
--------------------------------------------------------------------------- */

h1, h2, h3, h4, h5, h6 {
  color: var(--color-heading);
  font-weight: var(--fw-bold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  text-wrap: balance;
}

h1 { font-size: var(--text-6xl); }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-3xl); }
h4 { font-size: var(--text-2xl); }
h5 { font-size: var(--text-xl); }
h6 { font-size: var(--text-lg);  }

p {
  line-height: var(--leading-relaxed);
  color: var(--color-body);
  max-width: 68ch;
}

a {
  color: var(--color-primary);
  text-decoration: underline;
  text-decoration-skip-ink: auto;
  transition: var(--transition-color);
}

a:hover {
  color: var(--color-primary-hover);
}

strong, b { font-weight: var(--fw-semibold); }

small { font-size: var(--text-sm); }

abbr[title] {
  text-decoration: underline dotted;
  cursor: help;
}

/* ---------------------------------------------------------------------------
   5. MEDIA
--------------------------------------------------------------------------- */

img, video, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

svg { flex-shrink: 0; }

/* ---------------------------------------------------------------------------
   6. LISTS
--------------------------------------------------------------------------- */

ul, ol { list-style: none; }

/* ---------------------------------------------------------------------------
   7. FORMS (base normalisation only — styled in components.css)
--------------------------------------------------------------------------- */

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
}

button { cursor: pointer; }

input, textarea { background: transparent; }

fieldset { border: none; }

/* ---------------------------------------------------------------------------
   8. FOCUS — Global accessible focus ring
--------------------------------------------------------------------------- */

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* Remove default outline when focus-visible is supported */
:focus:not(:focus-visible) {
  outline: none;
}

/* ---------------------------------------------------------------------------
   9. SKIP LINK — Accessibility
--------------------------------------------------------------------------- */

.skip-link {
  position: absolute;
  inset-block-start: -100%;
  inset-inline-start: var(--space-4);
  z-index: var(--z-toast);
  padding: var(--space-3) var(--space-6);
  background: var(--color-primary);
  color: #fff;
  font-weight: var(--fw-semibold);
  font-size: var(--text-base);
  border-radius: var(--radius-lg);
  text-decoration: none;
  transition: inset-block-start var(--duration-fast) var(--ease-out);
  white-space: nowrap;
}

.skip-link:focus-visible {
  inset-block-start: var(--space-4);
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* ---------------------------------------------------------------------------
   10. SELECTION
--------------------------------------------------------------------------- */

::selection {
  background: rgba(37, 99, 235, 0.15);
  color: var(--color-heading);
}

/* ---------------------------------------------------------------------------
   11. SCROLLBAR (Webkit) — subtle
--------------------------------------------------------------------------- */

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--color-bg-secondary); }
::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover { background: var(--color-muted); }

/* ---------------------------------------------------------------------------
   12. UTILITY CLASSES
--------------------------------------------------------------------------- */

/* Visually hidden but accessible to screen readers */
.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;
}

/* Text gradient utility */
.gradient-text {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Section heading wrapper */
.section-header {
  text-align: center;
  max-width: 700px;
  margin-inline: auto;
  margin-block-end: var(--space-16);
}

.section-header p {
  margin-inline: auto;
  font-size: var(--text-xl);
  color: var(--color-body);
  margin-block-start: var(--space-4);
}

/* Separator / decorative line */
.section-divider {
  width: 3rem;
  height: 3px;
  background: var(--gradient-brand-h);
  border-radius: var(--radius-full);
  margin-block-end: var(--space-6);
  margin-inline: auto;
}

/* Eyebrow text — small label above heading */
.eyebrow {
  display: inline-block;
  font-size: var(--text-sm);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--color-primary);
  margin-block-end: var(--space-3);
}

/* Badge — small rounded pill */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
  font-weight: var(--fw-semibold);
  border-radius: var(--radius-full);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  white-space: nowrap;
}

/* Announcement badge (hero top) */
.badge--announcement {
  background: rgba(37, 99, 235, 0.1);
  color: var(--color-primary);
  border: 1px solid rgba(37, 99, 235, 0.2);
  white-space: normal;
  text-align: center;
  line-height: 1.4;
}

.badge--announcement-dark {
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-dark-text);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  white-space: normal;
  text-align: center;
  line-height: 1.4;
}

.badge--status {
  background: rgba(6, 182, 212, 0.10);
  color: var(--color-accent-hover);
  border: 1px solid rgba(6, 182, 212, 0.25);
}

/* Dot indicator */
.badge .dot {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background: currentColor;
  flex-shrink: 0;
}

.badge .dot--pulse {
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.8); }
}

/* ---------------------------------------------------------------------------
   13. RESPONSIVE TYPOGRAPHY
--------------------------------------------------------------------------- */

@media (max-width: 1024px) {
  h1 { font-size: var(--text-5xl); }
  h2 { font-size: var(--text-4xl); }
  h3 { font-size: var(--text-3xl); }
}

@media (max-width: 768px) {
  h1 { font-size: clamp(2rem, 8vw, var(--text-5xl)); }
  h2 { font-size: clamp(1.75rem, 6vw, var(--text-4xl)); }
  h3 { font-size: clamp(1.375rem, 4vw, var(--text-3xl)); }
  body { font-size: var(--text-md); }
}

@media (max-width: 480px) {
  h1 { font-size: clamp(1.75rem, 9vw, 2.5rem); }
}
