:root {
  --surface: #fbfbf9;
  --surface-card: #ffffff;
  --text: #1c293c;
  --muted: #5b6472;
  --ink: #000000;
  --primary: #fdc800;
  --secondary: #432dd7;
  --on-secondary: #ffffff;
  --success: #16a34a;
  --danger: #dc2626;
  --radius-box: 12px;
  --radius-control: 6px;
  --line: color-mix(in srgb, var(--text) 12%, transparent);
  --shadow: 3px 3px 0 var(--ink);
  --shadow-pressed: 1.5px 1.5px 0 var(--ink);
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --surface: #16181d;
    --surface-card: #21242b;
    --text: #f5f5f0;
    --muted: #a8aeba;
    --ink: #f5f5f0;
    --secondary: #8a78ff;
    --on-secondary: #14101f;
    --success: #22c55e;
    --danger: #f26464;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html[dir="rtl"] body { direction: ltr; }
html[dir="rtl"] main,
html[dir="rtl"] footer { direction: rtl; }
html[dir="rtl"] .nav { direction: ltr; }
body {
  margin: 0;
  background: var(--surface);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
}
a { color: inherit; }
.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;
}
.wrap {
  width: min(1060px, calc(100% - 32px));
  margin: 0 auto;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 900;
  font-size: 18px;
  flex: 0 0 auto;
}
.brand span:last-child { white-space: nowrap; }
.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--primary);
  color: #1c293c;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius-control);
  box-shadow: var(--shadow);
}
.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  flex: 0 0 auto;
}
.nav-links .btn { white-space: nowrap; }
.language-select {
  min-height: 42px;
  max-width: 180px;
  padding: 9px 34px 9px 12px;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius-control);
  background: var(--surface-card);
  color: var(--text);
  box-shadow: var(--shadow);
  font: inherit;
  font-size: 14px;
  font-weight: 850;
}
.btn, .nav-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 9px 14px;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius-control);
  background: var(--surface-card);
  box-shadow: var(--shadow);
  text-decoration: none;
  font-weight: 850;
  font-size: 14px;
}
.btn.primary {
  background: var(--primary);
  color: #1c293c;
}
.btn.secondary {
  background: var(--secondary);
  color: var(--on-secondary);
}
.btn:active, .nav-links a:active {
  transform: translate(1.5px, 1.5px);
  box-shadow: var(--shadow-pressed);
}
.hero {
  padding: 58px 0 34px;
}
.eyebrow {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  padding: 0 12px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: var(--surface-card);
  box-shadow: var(--shadow);
  color: var(--muted);
  font-weight: 800;
  font-size: 13px;
}
h1 {
  margin: 18px 0 0;
  max-width: 900px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 0.98;
  font-weight: 950;
}
.lead {
  max-width: 740px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: clamp(18px, 2.4vw, 22px);
  font-weight: 600;
}
.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}
.chip {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: var(--surface-card);
  font-size: 15px;
  font-weight: 700;
}
.chip.active {
  background: var(--secondary);
  color: var(--on-secondary);
  box-shadow: var(--shadow);
}
.section {
  padding: 42px 0;
  border-top: 1px solid var(--line);
}
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.card {
  display: grid;
  gap: 12px;
  padding: 20px;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius-box);
  background: var(--surface-card);
  box-shadow: var(--shadow);
  text-decoration: none;
}
.card h2, .card h3 {
  margin: 0;
  line-height: 1.12;
}
.card p {
  margin: 0;
  color: var(--muted);
  font-weight: 560;
}
.article {
  max-width: 820px;
}
.article h2 {
  margin: 40px 0 12px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.04;
}
.article h3 {
  margin: 28px 0 8px;
  font-size: 24px;
  line-height: 1.15;
}
.article p, .article li {
  color: var(--muted);
  font-size: 18px;
  font-weight: 560;
}
.article strong {
  color: var(--text);
}
.callout {
  padding: 20px;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius-box);
  background: var(--primary);
  color: #1c293c;
  box-shadow: var(--shadow);
}
.callout p {
  margin: 0;
  color: #1c293c;
  font-weight: 750;
}
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}
footer {
  padding: 34px 0 42px;
  color: var(--muted);
  font-weight: 650;
}
.footer-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  padding-top: 22px;
}
.footer-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

@media (max-width: 860px) {
  .grid { grid-template-columns: 1fr; }
  .nav { padding: 14px 0; }
  .nav-links a:not(.btn) { display: none; }
  .language-select { max-width: 150px; }
}

@media (max-width: 520px) {
  .wrap { width: min(1060px, calc(100% - 24px)); }
  .nav { gap: 8px; }
  h1 { font-size: 42px; }
  .btn { width: calc(100% - 4px); }
  .nav-links .btn {
    width: auto;
    max-width: 132px;
    padding-inline: 9px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .language-select { max-width: 132px; }
  .brand span:last-child { display: none; }
  [dir="rtl"] .brand { display: none; }
}
