/* Landing page of the organisation's RustDesk server, laid out like the
   Sangar site, in blue. Persian glyphs come from Vazirmatn, Latin from Inter. */
@font-face { font-family: "Vazirmatn"; font-weight: 400; font-display: swap; src: url("../fonts/Vazirmatn-Regular.woff2") format("woff2"); unicode-range: U+0600-06FF, U+200C-200F, U+FB50-FDFF, U+FE70-FEFF, U+00AB, U+00BB; }
@font-face { font-family: "Vazirmatn"; font-weight: 500; font-display: swap; src: url("../fonts/Vazirmatn-Medium.woff2") format("woff2"); unicode-range: U+0600-06FF, U+200C-200F, U+FB50-FDFF, U+FE70-FEFF, U+00AB, U+00BB; }
@font-face { font-family: "Vazirmatn"; font-weight: 700; font-display: swap; src: url("../fonts/Vazirmatn-Bold.woff2") format("woff2"); unicode-range: U+0600-06FF, U+200C-200F, U+FB50-FDFF, U+FE70-FEFF, U+00AB, U+00BB; }
@font-face { font-family: "Inter"; font-weight: 400 700; font-display: swap; src: url("../fonts/Inter-Latin.woff2") format("woff2"); unicode-range: U+0020-007E, U+00A0, U+00D7, U+2022; }

:root {
  --bg: #00081C;
  --bg-2: #020C24;
  --accent: #8BC4FF;
  --text: #F4F8FD;
  --muted: rgba(244, 248, 253, .72);
  --faint: rgba(244, 248, 253, .5);
  --card: rgba(244, 248, 253, .06);
  --card-2: rgba(244, 248, 253, .09);
  --line: rgba(139, 196, 255, .26);
  --line-soft: rgba(139, 196, 255, .14);
  --grad: linear-gradient(135deg, #5AA2F2 -10%, #2F74D6 38%, #0D4BA5 100%);
  --radius: 20px;
  --font: "Vazirmatn", "Inter", Tahoma, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, "SFMono-Regular", Menlo, monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.85;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(1200px 700px at 85% -10%, rgba(5, 63, 142, .45), transparent 60%),
    radial-gradient(900px 600px at 0% 40%, rgba(13, 46, 90, .5), transparent 65%),
    linear-gradient(180deg, var(--bg-2), var(--bg) 60%);
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3, p, ol { margin: 0; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: .3em; }
a:hover { color: var(--text); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }

.skip {
  position: absolute; inset-inline-start: 16px; top: -100px; z-index: 10;
  padding: 10px 16px; border-radius: 12px; background: var(--text); color: var(--bg);
}
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: clamp(16px, 5vw, 48px); }
.wrap--narrow { max-width: 860px; }

/* Header */
.top { position: relative; z-index: 2; }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 76px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.brand img { width: 28px; height: auto; }
.brand-word, .wordmark { font-family: "Inter", sans-serif; font-weight: 700; direction: ltr; unicode-bidi: isolate; }
.brand-word { font-size: 1.25rem; letter-spacing: -.01em; }
.top-nav { display: flex; align-items: center; gap: clamp(12px, 2.4vw, 32px); font-size: .95rem; }
.top-nav a { color: var(--muted); text-decoration: none; }
.top-nav a:hover { color: var(--text); }
.top-nav .top-cta { color: var(--text); padding: 6px 18px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); }
.top-nav .top-cta:hover { border-color: var(--accent); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 12px 26px; border: 0; border-radius: 16px; cursor: pointer;
  font: 700 1.125rem/1.2 var(--font); text-decoration: none; color: var(--text);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background-color .2s, border-color .2s;
}
.btn .ic { width: 22px; height: 22px; flex: none; }
.btn-primary {
  background: var(--grad);
  box-shadow: 0 10px 30px -10px rgba(90, 162, 242, .65), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -10px rgba(90, 162, 242, .8), inset 0 1px 0 rgba(255, 255, 255, .25); }
.btn-ghost { background: var(--card); border: 1px solid var(--line); }
.btn-ghost:hover { color: var(--text); background: var(--card-2); border-color: var(--accent); transform: translateY(-2px); }
.btn-block { width: 100%; }
.btn:disabled, .copy:disabled { opacity: .5; cursor: default; transform: none; }

/* Hero */
.hero { position: relative; min-height: calc(100svh - 76px); display: flex; align-items: center; padding-block: 24px 72px; }
.hero-glow {
  position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden;
  background: radial-gradient(560px 460px at 28% 50%, rgba(47, 116, 214, .28), transparent 70%);
}
.hero-in { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 480px); align-items: center; gap: clamp(32px, 6vw, 96px); }
.hero-copy { max-width: 620px; }
.hero-mark { position: relative; width: clamp(72px, 8vw, 104px); margin-bottom: 20px; }
.hero-mark::before {
  content: ""; position: absolute; inset: -45%; z-index: -1; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(90, 162, 242, .45), rgba(13, 75, 165, .18) 55%, transparent);
  filter: blur(6px);
}
.hero-mark img { width: 100%; height: auto; filter: drop-shadow(0 12px 30px rgba(90, 162, 242, .35)); }
.hero-title { display: flex; flex-direction: column; gap: 14px; font-weight: 700; }
.wordmark { font-size: clamp(3rem, 2rem + 4vw, 5.5rem); line-height: 1; letter-spacing: -.035em; align-self: flex-start; }
.headline { font-size: clamp(1.6rem, 1.05rem + 1.9vw, 2.6rem); line-height: 1.45; text-wrap: balance; }
.hero-sub { margin-top: 18px; font-size: clamp(1.02rem, .95rem + .3vw, 1.2rem); color: var(--muted); max-width: 54ch; }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.cta-meta { margin-top: 14px; font-size: .92rem; color: var(--faint); }

/* Connection details */
.conn {
  position: relative;
  padding: clamp(22px, 3vw, 30px);
  border-radius: 28px;
  border: 1px solid var(--line);
  background: linear-gradient(165deg, rgba(13, 46, 90, .6), rgba(5, 18, 42, .78) 55%, rgba(0, 8, 28, .85));
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .8), 0 0 90px -20px rgba(47, 116, 214, .45), inset 0 1px 0 rgba(255, 255, 255, .08);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  scroll-margin-top: 24px;
}
.conn-head { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.conn-head h2 { font-size: 1.3rem; line-height: 1.4; }
.conn-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 5px rgba(139, 196, 255, .16), 0 0 18px var(--accent); }
.field { padding: 14px 16px; border-radius: 16px; border: 1px solid var(--line-soft); background: rgba(244, 248, 253, .05); }
.field + .field { margin-top: 12px; }
.field-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 6px; }
.field-name { color: var(--muted); font-size: .95rem; font-weight: 500; }
.field-en { color: var(--faint); font: 500 .8rem/1.6 "Inter", sans-serif; }
.field-row { display: flex; align-items: center; gap: 12px; }
.field-val {
  flex: 1; min-width: 0; text-align: left; overflow-wrap: anywhere;
  font: 500 1rem/1.6 var(--mono); color: var(--text);
  -webkit-user-select: all; user-select: all;
}
.copy {
  flex: none; min-width: 76px; min-height: 40px; padding: 6px 14px; cursor: pointer;
  border-radius: 12px; border: 1px solid var(--line); background: var(--card-2); color: var(--text);
  font: 500 .92rem/1.4 var(--font);
  transition: border-color .2s, background-color .2s;
}
.copy:hover:enabled { border-color: var(--accent); }
.copy.done { border-color: var(--accent); background: rgba(139, 196, 255, .18); }
.conn-all { margin-top: 18px; }
.conn-hint { margin-top: 14px; color: var(--muted); font-size: .95rem; line-height: 1.9; }
.conn-error, .conn-noscript { margin-top: 14px; padding: 12px 16px; border-radius: 14px; border: 1px solid var(--line); background: rgba(13, 75, 165, .18); font-size: .95rem; }
.conn-error { display: none; }
.conn-failed .conn-error { display: block; }
.conn-failed .conn-hint { display: none; }
.conn-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.kbd { direction: ltr; display: inline-block; padding: 0 8px; border-radius: 6px; border: 1px solid var(--line); background: var(--card-2); font: 500 .9em/1.6 "Inter", sans-serif; color: var(--text); white-space: nowrap; }

/* Sections */
.section { padding-block: clamp(72px, 10vw, 128px); position: relative; }
.section::before { content: ""; position: absolute; top: 0; left: 50%; width: min(1100px, 90%); height: 1px; transform: translateX(-50%); background: linear-gradient(90deg, transparent, var(--line-soft), transparent); }
.sec-head { max-width: 680px; margin-bottom: clamp(36px, 5vw, 56px); }
.eyebrow { color: var(--accent); font-size: .95rem; font-weight: 700; margin-bottom: 10px; }
.sec-head h2 { font-size: clamp(1.7rem, 1.2rem + 1.7vw, 2.6rem); line-height: 1.4; font-weight: 700; text-wrap: balance; }
.sec-lead { margin-top: 16px; color: var(--muted); font-size: 1.1rem; }

.cards { display: grid; gap: 18px; }
.cards--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card, .note, .faq details {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.card { padding: 28px 24px 30px; transition: border-color .25s, transform .25s var(--ease), background-color .25s; }
.card:hover { border-color: rgba(139, 196, 255, .5); background: var(--card-2); transform: translateY(-3px); }
.card-ic { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; margin-bottom: 22px; background: linear-gradient(135deg, rgba(90, 162, 242, .25), rgba(13, 75, 165, .25)); border: 1px solid var(--line); color: var(--accent); }
.card-ic svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.card h3, .note h3, .step h3 { font-size: 1.2rem; line-height: 1.5; margin-bottom: 8px; }
.card p, .note p, .step p { color: var(--muted); font-size: 1rem; line-height: 1.9; }

.steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; position: relative; }
.steps::before { content: ""; position: absolute; top: 27px; right: 28px; left: 28px; height: 1px; background: linear-gradient(270deg, var(--accent), rgba(139, 196, 255, .1)); opacity: .6; }
.step { position: relative; }
.step-n {
  position: relative; display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 22px;
  border-radius: 50%; background: var(--bg-2); border: 1px solid var(--line);
  font-size: 1.35rem; font-weight: 700; color: var(--text);
  box-shadow: 0 0 0 6px var(--bg);
}
.step:first-child .step-n { background: var(--grad); border-color: transparent; box-shadow: 0 0 0 6px var(--bg), 0 0 30px rgba(90, 162, 242, .5); }

.notes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: clamp(40px, 6vw, 64px); }
.note { padding: 26px 24px; }
.clicks { list-style: none; padding: 0; margin-top: 12px; display: grid; gap: 10px; color: var(--muted); font-size: 1rem; }
.clicks li { display: flex; align-items: center; gap: 12px; }
.clicks .step-n { width: 28px; height: 28px; margin: 0; flex: none; font-size: .9rem; box-shadow: none; }

.faq { display: grid; gap: 12px; }
.faq details { padding: 0; transition: border-color .2s, background-color .2s; }
.faq details[open] { background: var(--card-2); border-color: rgba(139, 196, 255, .45); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 24px; font-weight: 700; font-size: 1.08rem; border-radius: var(--radius); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 10px; height: 10px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg) translateY(-3px); transition: transform .25s var(--ease); }
.faq details[open] summary::after { transform: rotate(135deg) translateY(-3px); }
.faq details p { padding: 0 24px 22px; color: var(--muted); }

/* Footer */
.foot { border-top: 1px solid var(--line-soft); padding-block: 28px; }
.foot-in { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.brand--foot img { width: 22px; }
.brand--foot .brand-word { font-size: 1.05rem; color: var(--muted); }
.foot-note { color: var(--faint); font-size: .9rem; }

/* Motion */
@media (prefers-reduced-motion: no-preference) {
  .hero-copy > * { animation: rise .8s var(--ease) both; }
  .hero-copy > :nth-child(2) { animation-delay: .08s; }
  .hero-copy > :nth-child(3) { animation-delay: .16s; }
  .hero-copy > :nth-child(n+4) { animation-delay: .24s; }
  .conn { animation: rise 1s .2s var(--ease) both; }
  .conn-dot { animation: pulse 3s ease-in-out infinite; }
  .hero-mark::before { animation: breathe 6s ease-in-out infinite; }
}
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(139, 196, 255, .08), 0 0 26px var(--accent); } }
@keyframes breathe { 50% { opacity: .65; transform: scale(.94); } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

/* Responsive */
@media (max-width: 1080px) {
  .cards--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .hero { min-height: 0; padding-top: 8px; }
  .hero-in { grid-template-columns: minmax(0, 1fr); }
  .hero-copy { max-width: 680px; }
  .conn { max-width: 560px; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 40px; }
  .steps::before { display: none; }
  .notes { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .top-nav a:not(.top-cta) { display: none; }
  .cta-row .btn { flex: 1 1 100%; }
}
@media (max-width: 560px) {
  body { font-size: 1rem; }
  .cards--4, .steps { grid-template-columns: minmax(0, 1fr); }
  .steps { row-gap: 28px; }
  .step { display: grid; grid-template-columns: 56px minmax(0, 1fr); column-gap: 18px; }
  .step .step-n { grid-row: span 2; margin: 0; }
  .card { padding: 24px 20px; }
  .card-ic { margin-bottom: 16px; }
  .field { padding: 12px 14px; }
  .field-row { gap: 10px; }
  .field-val { font-size: .9rem; }
  .copy { min-width: 64px; }
  .foot-in { flex-direction: column; align-items: center; text-align: center; }
}
