/* Base — typography, colors, links */

html {
  font-size: 16px;
  direction: rtl;  /* CHANGE to ltr for English sites */
}

body {
  font-family: var(--font);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
  line-height: 1.3;
  font-weight: 600;
}

h1 {
  font-size: var(--text-5xl);
  color: var(--primary);
  letter-spacing: -0.02em;
}

h2 {
  font-size: var(--text-4xl);
  color: var(--secondary);
}

h3 {
  font-size: var(--text-2xl);
  color: var(--text);
}

h4 {
  font-size: var(--text-xl);
  color: var(--text);
}

/* Body text */
p {
  margin-bottom: var(--space-4);
}

p:last-child {
  margin-bottom: 0;
}

strong {
  font-weight: 600;
}

/* Links */
a {
  color: var(--accent);
  transition: color var(--duration) var(--ease);
}

a:hover {
  color: var(--accent-dark);
}

/* Selection */
::selection {
  background: var(--primary-light);
  color: var(--dark);
}

/* Focus */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100%;
  inset-inline-end: var(--space-4);
  background: var(--dark);
  color: #fff;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius);
  z-index: 100;
  font-size: var(--text-sm);
}

.skip-link:focus {
  top: var(--space-4);
}

/* Responsive typography */
@media (max-width: 768px) {
  html { font-size: 15px; }
  h1 { font-size: var(--text-3xl); }
  h2 { font-size: var(--text-2xl); }
  h3 { font-size: var(--text-xl); }
  body { font-size: var(--text-base); }
}
