:root {
  --bg: #050a10;
  --bg-soft: #0a141c;
  --card: #0d1a24;
  --card-2: #10202c;
  --border: #17394d80;
  --border-strong: #1e4a63;
  --accent: #2bdcf0;
  --accent-2: #0ea5c9;
  --accent-glow: rgba(43, 220, 240, 0.35);
  --text: #e9faff;
  --text-muted: #9dc0cf;
  --danger: #ff8b96;
  --danger-bg: #2a1216;
  --warning: #ffd479;
  --warning-bg: #2a2210;
  --radius: 14px;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Vazirmatn", Tahoma, "Segoe UI", sans-serif;
  background:
    radial-gradient(1100px 560px at 85% -12%, #0d2a3a 0%, transparent 55%),
    radial-gradient(700px 420px at 8% 15%, #0a2230 0%, transparent 60%),
    var(--bg);
  color: var(--text);
  margin: 0;
  min-height: 100vh;
  line-height: 1.8;
}

/* --------------------------------------------------------- browser chrome */
::selection {
  background: var(--accent);
  color: #031a22;
}

::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 8px;
  border: 3px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: var(--accent-2); }
html { scrollbar-color: var(--border-strong) var(--bg); scrollbar-width: thin; }

a, button, input, [tabindex] {
  outline-offset: 3px;
}
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ---------------------------------------------------------------- motion */
@media (prefers-reduced-motion: no-preference) {
  .rise-in {
    animation: rise-in 0.7s var(--ease-out-expo) both;
  }
  .rise-in-delay {
    animation: rise-in 0.7s var(--ease-out-expo) 0.12s both;
  }
}

@keyframes rise-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ------------------------------------------------------------- header */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px;
  background: rgba(8, 14, 20, 0.75);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-header .logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-decoration: none;
  font-size: 1.1rem;
}

.site-header .logo img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--accent), 0 0 14px var(--accent-glow);
}

.site-header nav {
  display: flex;
  gap: 4px;
}

.site-header nav a {
  color: var(--text-muted);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.92rem;
  transition: color 0.15s var(--ease-out-expo), background 0.15s var(--ease-out-expo);
}

.site-header nav a:hover {
  color: var(--text);
  background: var(--card-2);
}

/* -------------------------------------------------------------- layout */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 56px 24px 64px;
}

section {
  background: linear-gradient(180deg, var(--card) 0%, var(--card-2) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 32px;
  margin-bottom: 20px;
}

section h2 {
  margin-top: 0;
  font-size: 1.2rem;
  color: var(--text);
  font-weight: 700;
}

section p {
  color: var(--text-muted);
  max-width: 70ch;
}

/* ---------------------------------------------------------------- hero */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  overflow: hidden;
  background: linear-gradient(180deg, var(--card) 0%, var(--card-2) 100%);
  border: 1px solid var(--border-strong);
  padding: 64px 40px;
  margin-bottom: 44px;
}

.hero-glow {
  position: absolute;
  top: -140px;
  left: 50%;
  width: 520px;
  height: 320px;
  transform: translateX(-50%);
  background: var(--accent);
  opacity: 0.22;
  filter: blur(90px);
  border-radius: 50%;
  pointer-events: none;
}

.hero-copy {
  position: relative;
  max-width: 560px;
}

.hero h1 {
  font-size: clamp(2.4rem, 1.9rem + 2vw, 3.4rem);
  line-height: 1.1;
  margin: 0;
  letter-spacing: -0.01em;
  font-weight: 800;
  color: var(--accent);
}

.hero .tagline {
  margin: 10px 0 0;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text);
}

.hero p {
  color: var(--text-muted);
  max-width: 46ch;
  margin: 22px auto 0;
}

.hero .btn-row {
  justify-content: center;
  margin-top: 26px;
}

/* ------------------------------------------------------------ highlight */
.highlight {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  border-color: var(--border-strong);
}

.highlight .icon-tile {
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
}

.highlight-body { flex: 1 1 auto; }

.highlight h2 { margin-bottom: 6px; }

/* ------------------------------------------------------------- feature-list */
.feature-list {
  display: flex;
  flex-direction: column;
  padding: 6px 32px;
}

.feature-row {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 0;
}

.feature-row + .feature-row {
  border-top: 1px solid var(--border);
}

.feature-row .icon-tile {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
}

.feature-row h3 {
  margin: 0 0 2px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.feature-row p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ------------------------------------------------------------- icon-tile */
.icon-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(160deg, #12293a, #0b1a26);
  border: 1px solid var(--border-strong);
  color: var(--accent);
}

.icon-tile svg {
  width: 55%;
  height: 55%;
}

/* -------------------------------------------------------------- forms */
h1 {
  font-size: 1.4rem;
}

form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 380px;
  margin-top: 12px;
}

label {
  font-size: 0.88rem;
  color: var(--text-muted);
}

input[type="text"] {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--bg-soft);
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s var(--ease-out-expo), box-shadow 0.15s var(--ease-out-expo);
}

input[type="text"]::placeholder {
  color: #4f6f80;
}

input[type="text"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* --------------------------------------------------------------- button */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #031a22;
  font-weight: 700;
  padding: 13px 28px;
  border-radius: 10px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  font-family: inherit;
  margin-top: 6px;
  box-shadow: 0 10px 28px -8px var(--accent-glow);
  transition: transform 0.16s var(--ease-out-expo), box-shadow 0.16s var(--ease-out-expo), background 0.16s;
}

.btn:hover {
  background: #5be6f7;
  transform: translateY(-2px);
  box-shadow: 0 14px 34px -8px var(--accent-glow);
}

.btn:active {
  transform: translateY(0);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 6px;
}

.btn-row .btn {
  margin-top: 0;
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-strong);
  box-shadow: none;
}

.btn-secondary:hover {
  background: var(--card-2);
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: none;
}

/* ---------------------------------------------------------------- misc */
.hint {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.error {
  color: var(--danger);
  background: var(--danger-bg);
  border: 1px solid #4a1f24;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.9rem;
}

.warning {
  color: var(--warning);
  background: var(--warning-bg);
  border: 1px solid #4a3d1f;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.9rem;
}

.result-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.result-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.result-list li:last-child {
  border-bottom: none;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  border: 1px solid var(--border);
  padding: 8px 10px;
  text-align: right;
  font-size: 0.9rem;
}

th {
  color: var(--accent);
  background: var(--bg-soft);
}

.site-footer {
  text-align: center;
  padding: 28px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ------------------------------------------------------------ responsive */
@media (max-width: 720px) {
  .hero { padding: 44px 24px; }
  .highlight { flex-direction: column; text-align: center; }
  .highlight .icon-tile { margin-inline: auto; }
  .feature-list { padding: 6px 8px; }
}

@media (max-width: 480px) {
  .container { padding: 32px 12px 44px; }
  section { padding: 22px 20px; }
}

/* ------------------------------------------------------------ side banner */
/* One layout everywhere: a sticky rail beside the cards; its art pans as the page scrolls.
   Phones/tablets: rail width is a % of the screen (20vw, min 64px) so proportions match on every phone.
   Desktop: fixed widths like IAB rails - 160px, and 300px from 1500px up. */
:root { --rail-w: clamp(64px, 20vw, 160px); --rail-gap: 3vw; --rail-top: 104px; }

.page {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: var(--rail-gap);
  padding: 0 2vw;
}

.container { flex: 0 1 900px; min-width: 0; margin: 0; }

.side-banner {
  position: sticky;
  top: var(--rail-top);
  flex: 0 0 var(--rail-w);
  width: var(--rail-w);
  height: calc(100svh - var(--rail-top) - 16px);
  margin-top: 32px;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: var(--bg-soft);
  z-index: 1;
}

.side-banner img {
  display: block;
  width: 100%;
  height: auto;
  will-change: transform;
}

@media (min-width: 960px) {
  :root { --rail-w: 160px; --rail-gap: 32px; --rail-top: 88px; }
  .page { padding: 0 24px; }
  .container { padding-left: 24px; padding-right: 24px; }
  .side-banner { margin-top: 56px; border-radius: var(--radius); }
}

@media (min-width: 1500px) { :root { --rail-w: 300px; } }
