@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600;9..144,700&family=Inter:wght@400;500;600;700&display=swap');

:root {
  color-scheme: dark;
  --bg: #1a1024;
  --bg-2: #241531;
  --panel: rgba(255,190,130,0.06);
  --panel-border: rgba(255,190,130,0.16);
  --text: #f7f1ea;
  --muted: #bcaec4;
  --gold: #f0ab3d;
  --gold-2: #ffcf7a;
  --cherry: #ff5d73;
  --lime: #b7e34f;
  --citrus: #ff8f4d;
  --mint: #5fe0c0;
  --border: #ffb46b30;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(1100px 700px at 12% -5%, rgba(240,171,61,0.40), transparent 55%),
    radial-gradient(900px 650px at 92% 10%, rgba(255,93,115,0.32), transparent 55%),
    radial-gradient(1000px 750px at 25% 55%, rgba(95,224,192,0.16), transparent 55%),
    radial-gradient(900px 700px at 85% 90%, rgba(183,227,79,0.16), transparent 55%),
    linear-gradient(180deg, #221430, #170f20 55%, #120b19);
  background-attachment: fixed;
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.65;
}

h1, h2, h3, .brand {
  font-family: 'Fraunces', Georgia, serif;
  letter-spacing: -0.01em;
}

.wrap {
  max-width: 780px;
  margin: 0 auto;
  padding: 40px 24px 100px;
}

header.site {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 780px;
  margin: 0 auto;
  padding: 20px 24px;
  backdrop-filter: blur(14px);
  background: linear-gradient(to bottom, rgba(23,15,32,0.92), rgba(23,15,32,0.55));
}

header.site .nav-group {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

header.site a.brand {
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
  font-size: 19px;
  display: flex;
  align-items: center;
  gap: 8px;
}
header.site a.brand::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--cherry));
}

header.site nav a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 22px;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.15s ease;
}
header.site nav a:hover { color: var(--gold-2); }

/* Language switcher */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
}
.lang-chip {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted);
  text-decoration: none;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--panel-border);
  background: var(--panel);
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.lang-chip:hover { color: var(--gold-2); border-color: rgba(240,171,61,0.4); }
.lang-chip.active {
  color: var(--bg);
  background: linear-gradient(135deg, var(--gold-2), var(--citrus));
  border-color: transparent;
}
.lang-menu { position: relative; }
.lang-menu > summary.lang-toggle {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid var(--panel-border);
  background: var(--panel);
  font-size: 13px;
}
.lang-menu > summary.lang-toggle::-webkit-details-marker { display: none; }
.lang-menu > summary.lang-toggle:hover { border-color: rgba(240,171,61,0.4); }
.lang-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  display: flex;
  flex-direction: column;
  min-width: 160px;
  padding: 8px;
  border-radius: 12px;
  border: 1px solid var(--panel-border);
  background: linear-gradient(180deg, #241531, #1a1024);
  box-shadow: 0 12px 30px rgba(0,0,0,0.4);
  z-index: 20;
}
.lang-dropdown a {
  display: block;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 13.5px;
  color: var(--text);
  text-decoration: none;
}
.lang-dropdown a:hover { background: rgba(255,255,255,0.06); color: var(--gold-2); }
.lang-dropdown a.active { color: var(--gold-2); background: rgba(255,255,255,0.05); }

/* RTL adjustments */
html[dir="rtl"] header.site nav a { margin-left: 0; margin-right: 22px; }
html[dir="rtl"] header.site nav a:first-child { margin-right: 0; }
html[dir="rtl"] .lang-dropdown { right: auto; left: 0; }
html[dir="rtl"] .card:nth-child(4n+1) .icon,
html[dir="rtl"] .card:nth-child(4n+2) .icon,
html[dir="rtl"] .card:nth-child(4n+3) .icon,
html[dir="rtl"] .card:nth-child(4n+4) .icon { margin-left: 0; }
html[dir="rtl"] ul { padding-left: 0; padding-right: 20px; }
html[dir="rtl"] table th, html[dir="rtl"] table td { text-align: right; }

h1 { font-size: 34px; font-weight: 700; margin-bottom: 6px; color: var(--text); }
h2 {
  font-size: 22px;
  font-weight: 600;
  margin-top: 48px;
  margin-bottom: 12px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  background: linear-gradient(90deg, var(--gold-2), var(--citrus) 45%, var(--cherry));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline-block;
}
h3 { font-size: 17px; font-weight: 600; margin-top: 26px; color: var(--gold-2); }

p, li { color: var(--text); }
.muted { color: var(--muted); font-size: 14px; }

a { color: var(--gold-2); text-decoration-color: rgba(255,207,122,0.4); }
a:hover { text-decoration-color: currentColor; }

table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 14px;
  background: var(--panel);
  border-radius: 12px;
  overflow: hidden;
}
th, td {
  border: 1px solid var(--border);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}
th { background: rgba(240,171,61,0.1); color: var(--gold-2); font-weight: 600; }

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 24px 0 8px;
}
.hero .badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  padding: 7px 16px;
  border-radius: 999px;
  margin-bottom: 28px;
}
.hero .badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 8px var(--mint);
}

.glass-illustration {
  margin: 4px auto 24px;
  width: 130px;
  height: auto;
  filter: drop-shadow(0 16px 30px rgba(240, 171, 61, 0.25));
}

.hero h1 {
  font-size: 40px;
  background: linear-gradient(100deg, var(--gold-2) 10%, var(--citrus) 45%, var(--cherry) 80%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p.tagline {
  color: var(--muted);
  font-size: 17px;
  max-width: 540px;
  margin: 0 auto;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
  margin: 24px 0;
}
.card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  padding: 20px;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}
.card:hover {
  transform: translateY(-3px);
  border-color: rgba(240,171,61,0.4);
  background: rgba(255,255,255,0.06);
}
.card .icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 12px;
}
.card:nth-child(4n+1) .icon { background: linear-gradient(135deg, var(--gold), var(--citrus)); }
.card:nth-child(4n+2) .icon { background: linear-gradient(135deg, var(--cherry), #ff8fa8); }
.card:nth-child(4n+3) .icon { background: linear-gradient(135deg, var(--lime), var(--mint)); }
.card:nth-child(4n+4) .icon { background: linear-gradient(135deg, var(--mint), #5f9fe0); }
.card h3 { margin-top: 0; color: var(--text); }
.card p { color: var(--muted); font-size: 14.5px; margin-bottom: 0; }

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 28px;
}
.pill {
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--panel-border);
  color: var(--muted);
  background: var(--panel);
}

footer.site {
  max-width: 780px;
  margin: 0 auto;
  padding: 28px 24px;
  color: var(--muted);
  font-size: 13px;
  border-top: 1px solid var(--border);
}
footer.site a { color: var(--muted); }

ul { padding-left: 20px; }
code { background: var(--panel); padding: 2px 6px; border-radius: 4px; font-size: 13px; }
