@charset "utf-8";

:root {
  color-scheme: light dark;
  --bg: #f8fafc;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --accent: #6366f1;
  --accent-contrast: #ffffff;
  --accent-2: #06b6d4;
  --border: #e2e8f0;
  --shadow: 0 18px 44px rgba(99, 102, 241, 0.12);
  --code-bg: #f1f5f9;
  --maxw: 76rem;
}

[data-theme="dark"] {
  --bg: #0b1020;
  --surface: #111827;
  --text: #f8fafc;
  --muted: #94a3b8;
  --accent: #818cf8;
  --accent-contrast: #0f172a;
  --accent-2: #22d3ee;
  --border: #1e293b;
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.6);
  --code-bg: #1e293b;
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) {
    --bg: #0b1020;
    --surface: #111827;
    --text: #f8fafc;
    --muted: #94a3b8;
    --accent: #818cf8;
    --accent-contrast: #0f172a;
    --accent-2: #22d3ee;
    --border: #1e293b;
    --shadow: 0 18px 44px rgba(0, 0, 0, 0.6);
    --code-bg: #1e293b;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  font-size: 1rem;
}

h1, h2, h3 {
  font-family: "Inter", system-ui, sans-serif;
  line-height: 1.2;
  color: var(--text);
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.skip {
  position: absolute;
  top: -9999px;
  left: 1rem;
  background: var(--accent);
  color: var(--accent-contrast);
  padding: 0.5rem 1rem;
  z-index: 1000;
  border-radius: 0.5rem;
}
.skip:focus { top: 1rem; }

.site-header {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text);
  text-decoration: none;
}
.site-header nav {
  display: flex;
  gap: 1.25rem;
  font-size: 0.95rem;
}
.site-header nav a { color: var(--muted); text-decoration: none; }
.site-header nav a:hover { color: var(--text); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.langmenu {
  position: relative;
  display: inline-block;
}
.langmenu summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  background: var(--surface);
  user-select: none;
}
.langmenu summary::-webkit-details-marker { display: none; }
.langmenu ul {
  position: absolute;
  top: calc(100% + 0.35rem);
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  box-shadow: var(--shadow);
  padding: 0.35rem;
  margin: 0;
  list-style: none;
  min-width: 11rem;
  z-index: 100;
}
[dir="rtl"] .langmenu ul { right: auto; left: 0; }
.langmenu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.4rem 0.65rem;
  border-radius: 0.5rem;
  color: var(--text);
  text-decoration: none;
  font-size: 0.85rem;
}
.langmenu a:hover, .langmenu a[aria-current="page"] {
  background: var(--code-bg);
  color: var(--accent);
}
.langmenu a small { color: var(--muted); font-size: 0.75rem; margin-left: 0.5rem; }
[dir="rtl"] .langmenu a small { margin-left: 0; margin-right: 0.5rem; }

#theme-toggle {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
}

main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1.5rem;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  align-items: center;
  gap: 1.5rem;
  padding: clamp(1.5rem, 4vw, 3.5rem);
  margin-block: 1rem 4rem;
  border: 1px solid var(--border);
  border-radius: 2rem;
  background: radial-gradient(ellipse at 100% 0%, #6366f112, transparent 65%), var(--surface);
  box-shadow: var(--shadow);
}
.hero > div { min-width: 0; }
.kicker {
  color: var(--accent);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.1em;
  font-size: 0.85rem;
  margin: 0 0 0.5rem;
}
.hero h1 { font-size: clamp(2rem, 3.5vw, 3rem); letter-spacing: -0.035em; text-wrap: balance; margin: 0 0 1.25rem; }
.lede { font-size: 1.05rem; color: var(--muted); margin: 0 0 1.75rem; max-width: 36rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 1rem; }
.btn {
  display: inline-flex;
  align-items: center;
  padding: 0.65rem 1.25rem;
  border-radius: 0.6rem;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
}
.btn.primary {
  background: var(--accent);
  color: var(--accent-contrast);
  border-color: var(--accent);
}
.btn:hover { text-decoration: none; opacity: 0.92; }
.note { font-size: 0.85rem; color: var(--muted); margin: 0; }

.link-art { position: relative; min-height: 340px; isolation: isolate; }
.link-art-grid { position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(ellipse, #6366f119, transparent 70%); }
.link-art-grid::after { content: ""; position: absolute; inset: 12%; border: 1px dashed #818cf84d; border-radius: 50%; transform: rotate(-25deg) scaleY(.75); }
.link-ring { position: absolute; z-index: 2; left: 50%; top: 39%; width: 175px; height: 106px; border: 25px solid #38bdf8; border-radius: 60px; transform: translate(-77%, -60%) rotate(-37deg); box-shadow: inset 4px 4px 0 #bae6fd, 7px 9px 0 #0284c7, 16px 25px 28px #0284c726; }
.link-ring-back { z-index: 1; border-color: #818cf8; transform: translate(-23%, -4%) rotate(-37deg); box-shadow: inset 4px 4px 0 #c7d2fe, 7px 9px 0 #4f46e5, 16px 25px 28px #4f46e526; }
.link-address { position: absolute; z-index: 3; inset-inline: 9%; bottom: 5%; display: flex; align-items: center; gap: .75rem; padding: 1rem; border: 1px solid var(--border); border-radius: 1rem; color: var(--text); background: var(--surface); box-shadow: var(--shadow); font: .95rem "JetBrains Mono", monospace; direction: ltr; transform: rotate(-4deg); }
.link-address img { flex-shrink: 0; }
.link-arrow { margin-left: auto; color: var(--accent); font-size: 1.5rem; }
.link-spark { position: absolute; width: 10px; height: 10px; border-radius: 3px; background: #38bdf8; transform: rotate(25deg); }
.link-spark-one { top: 9%; right: 19%; }
.link-spark-two { left: 12%; bottom: 29%; width: 7px; height: 7px; background: #818cf8; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(18rem, 100%), 1fr));
  gap: 1.25rem;
  padding: 0;
  list-style: none;
  margin: 2rem 0;
}
.features li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.25rem;
}
.features strong { display: block; font-size: 1.05rem; margin-bottom: 0.35rem; color: var(--text); }
.features p { margin: 0; font-size: 0.92rem; color: var(--muted); }

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.5rem;
  margin: 1.5rem 0;
}
pre {
  background: var(--code-bg);
  padding: 1rem;
  border-radius: 0.6rem;
  overflow-x: auto;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.88rem;
}
code {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.88em;
  background: var(--code-bg);
  padding: 0.15rem 0.35rem;
  border-radius: 0.3rem;
}

details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 0.85rem 1.15rem;
  margin-bottom: 0.75rem;
}
details summary { font-weight: 600; cursor: pointer; color: var(--text); }
details p { margin: 0.65rem 0 0; color: var(--muted); font-size: 0.95rem; }

.table-wrap { overflow-x: auto; margin: 1.5rem 0; }
table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  overflow: hidden;
  font-size: 0.92rem;
}
th, td { padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid var(--border); }
[dir="rtl"] th, [dir="rtl"] td { text-align: right; }
th { background: var(--code-bg); font-weight: 600; }
tr:last-child td { border-bottom: none; }

.site-footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 1.5rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
  margin-top: 4rem;
}
.site-footer a { color: var(--text); }

@media (max-width: 768px) {
  .hero { grid-template-columns: 1fr; text-align: center; }
  .lede { margin-left: auto; margin-right: auto; }
  .cta-row { justify-content: center; }
  .link-art { width: min(100%, 340px); min-height: 300px; margin: 0 auto; }
  .site-header nav { display: none; }
}
@media (max-width: 420px) {
  main { padding: .75rem; }
  .site-header { padding: 1rem .75rem; gap: .5rem; flex-wrap: wrap; }
  .hero { padding: 1.5rem 1rem; border-radius: 1.25rem; }
  .hero h1 { font-size: 2rem; }
  .link-ring { width: 145px; height: 90px; border-width: 21px; }
  .link-address { inset-inline: 2%; font-size: .85rem; }
  .btn { justify-content: center; width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
