/* CodeCluster static site — CaffeineByte */
:root {
  --navy: #1a2b4a;
  --navy-light: #243a5e;
  --navy-dark: #111d33;
  --accent: #4a9fd4;
  --accent-hover: #3a8fc4;
  --text: #1a1a2e;
  --text-muted: #4a5568;
  --bg: #f7f9fc;
  --surface: #ffffff;
  --border: #d8e0ea;
  --focus: #4a9fd4;
  --max-width: 48rem;
  --radius: 0.5rem;
  --shadow: 0 1px 3px rgba(26, 43, 74, 0.08), 0 4px 12px rgba(26, 43, 74, 0.06);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

[dir="rtl"] body {
  font-family: system-ui, "Segoe UI", "Segoe UI Arabic", Tahoma, Arial, sans-serif;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--accent-hover);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  top: -3rem;
  left: 1rem;
  padding: 0.5rem 1rem;
  background: var(--navy);
  color: #fff;
  border-radius: var(--radius);
  z-index: 100;
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
}

.site-header {
  background: var(--navy);
  color: #fff;
  padding: 1rem 1.25rem;
}

.site-header__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}

.brand:hover {
  color: #e8f0fa;
}

.brand__logo {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.625rem;
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.brand__subtitle {
  font-size: 0.8125rem;
  font-weight: 400;
  opacity: 0.85;
}

.lang-switcher {
  display: flex;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.lang-switcher a {
  display: block;
  padding: 0.375rem 0.75rem;
  border-radius: var(--radius);
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 0.875rem;
}

.lang-switcher a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.lang-switcher a[aria-current="page"] {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-weight: 600;
}

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}

.hero {
  text-align: center;
  padding: 2rem 0 2.5rem;
}

.hero__logo {
  width: 5rem;
  height: 5rem;
  border-radius: 1.25rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow);
}

.hero h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.75rem, 5vw, 2.25rem);
  color: var(--navy);
}

.hero__tagline {
  margin: 0 0 0.25rem;
  font-size: 1.125rem;
  color: var(--text-muted);
}

.hero__publisher {
  margin: 0 0 1rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.hero__intro {
  margin: 0;
  max-width: 36rem;
  margin-inline: auto;
  color: var(--text-muted);
  font-size: 1.0625rem;
}

.card-grid {
  display: grid;
  gap: 1rem;
  margin: 2rem 0;
}

@media (min-width: 36rem) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow);
}

.card h2 {
  margin: 0 0 0.5rem;
  font-size: 1.125rem;
  color: var(--navy);
}

.card p {
  margin: 0 0 1rem;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.card a.button {
  display: inline-block;
}

.button {
  display: inline-block;
  padding: 0.625rem 1.25rem;
  background: var(--navy);
  color: #fff;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9375rem;
  border: none;
  cursor: pointer;
}

.button:hover {
  background: var(--navy-light);
  color: #fff;
}

.button--secondary {
  background: transparent;
  color: var(--navy);
  border: 1px solid var(--border);
}

.button--secondary:hover {
  background: var(--surface);
  border-color: var(--navy);
}

.features {
  margin: 2.5rem 0;
}

.features h2 {
  font-size: 1.25rem;
  color: var(--navy);
  margin: 0 0 1rem;
}

.features ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.75rem;
}

@media (min-width: 36rem) {
  .features ul {
    grid-template-columns: repeat(2, 1fr);
  }
}

.features li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.875rem 1rem;
  font-size: 0.9375rem;
}

.features li::before {
  content: "✓ ";
  color: var(--accent);
  font-weight: 700;
}

[dir="rtl"] .features li::before {
  content: " ✓";
}

.section-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 3rem 0;
}

.lang-section h2 {
  font-size: 1.5rem;
  color: var(--navy);
  margin: 0 0 0.5rem;
}

.page-title {
  margin: 0 0 0.25rem;
  font-size: clamp(1.5rem, 4vw, 2rem);
  color: var(--navy);
}

.page-meta {
  margin: 0 0 2rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.prose h2 {
  font-size: 1.25rem;
  color: var(--navy);
  margin: 2rem 0 0.75rem;
}

.prose h3 {
  font-size: 1.0625rem;
  color: var(--navy-light);
  margin: 1.5rem 0 0.5rem;
}

.prose p,
.prose li {
  color: var(--text);
}

.prose ul,
.prose ol {
  padding-inline-start: 1.5rem;
}

.prose li {
  margin-bottom: 0.375rem;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.9375rem;
}

.prose th,
.prose td {
  border: 1px solid var(--border);
  padding: 0.625rem 0.75rem;
  text-align: start;
}

.prose th {
  background: var(--navy);
  color: #fff;
  font-weight: 600;
}

.prose tr:nth-child(even) td {
  background: rgba(26, 43, 74, 0.03);
}

.callout {
  background: var(--surface);
  border-inline-start: 4px solid var(--accent);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.9375rem;
}

[dir="rtl"] .callout {
  border-inline-start: none;
  border-inline-end: 4px solid var(--accent);
  border-radius: var(--radius) 0 0 var(--radius);
}

.callout--warning {
  border-color: #d97706;
  background: #fffbeb;
}

.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding-inline-start: 2.5rem;
  margin-bottom: 1rem;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  width: 1.75rem;
  height: 1.75rem;
  background: var(--navy);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  font-weight: 700;
}

.contact-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
}

.contact-block h2 {
  margin: 0 0 0.75rem;
  font-size: 1.125rem;
  color: var(--navy);
}

.contact-block p {
  margin: 0.25rem 0;
}

.site-footer {
  background: var(--navy-dark);
  color: rgba(255, 255, 255, 0.8);
  padding: 2rem 1.25rem;
  font-size: 0.875rem;
}

.site-footer__inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.site-footer a {
  color: #a8d4f0;
}

.site-footer p {
  margin: 0.25rem 0;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  margin-bottom: 1rem;
  padding: 0;
  list-style: none;
}

.footer-nav a {
  text-decoration: none;
}

.footer-nav a:hover {
  text-decoration: underline;
}
