/* n8nhosting.ir — استایل مشترک همه صفحه‌ها */

@font-face {
  font-family: "Vazirmatn";
  src: url("/fonts/Vazirmatn-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --canvas: #eef1f8;
  --surface: #ffffff;
  --ink: #171a33;
  --muted: #565c80;
  --line: #d8ddec;
  --line-strong: #b9c1da;
  --dot: #c9d0e3;

  --coral: #ea4b71;          /* رنگ برند n8n — برای گرافیک */
  --coral-strong: #d0335c;   /* برای دکمه و متن (کنتراست کافی) */
  --coral-hover: #b82a50;
  --violet: #6e5be8;
  --green: #178f68;
  --sky: #2a8fc9;
  --danger: #c42d55;
  --warn: #a86a0a;

  --radius-card: 22px;
  --radius-node: 14px;
  --radius-btn: 12px;
  --max: 1120px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #12142a;
    --surface: #1b1e3b;
    --ink: #edeffa;
    --muted: #a3a9cc;
    --line: #2c3160;
    --line-strong: #414780;
    --dot: #262a52;

    --coral: #f2678a;
    --coral-strong: #d0335c;
    --coral-hover: #e0426b;
    --danger: #ff7c9c;
    --warn: #f0b45a;
    --green: #35c896;
  }
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  font-family: "Vazirmatn", Tahoma, "Segoe UI", system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.95;
  color: var(--ink);
  background-color: var(--canvas);
  background-image: radial-gradient(var(--dot) 1.3px, transparent 1.3px);
  background-size: 26px 26px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1 0 auto; }

img, svg { max-width: 100%; }

a { color: var(--coral-strong); text-underline-offset: 4px; }
@media (prefers-color-scheme: dark) { a { color: var(--coral); } }

:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: 20px;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- هدر ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--canvas) 86%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--ink);
  text-decoration: none;
}

.brand svg { width: 34px; height: 20px; flex: none; }

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav a {
  padding: 6px 12px;
  border-radius: 10px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
}

.nav a:hover { color: var(--ink); background: color-mix(in srgb, var(--line) 55%, transparent); }

.nav .nav-cta {
  margin-inline-start: 8px;
  padding: 6px 16px;
  color: var(--ink);
  border: 1.5px solid var(--line-strong);
  font-weight: 700;
}

@media (max-width: 720px) {
  .nav a:not(.nav-cta) { display: none; }
}

/* ---------- دکمه‌ها ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 26px;
  font: inherit;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
  border-radius: var(--radius-btn);
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.btn.primary { background: var(--coral-strong); color: #fff; }
.btn.primary:hover { background: var(--coral-hover); }

.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn.ghost:hover { border-color: var(--ink); }

.btn.light { background: #fff; color: #171a33; }
.btn.light:hover { background: #e9ecfa; }

.btn.block { width: 100%; }

.btn[disabled] { cursor: not-allowed; opacity: 0.6; }

.btn.is-busy { pointer-events: none; }
.btn.is-busy::after {
  content: "";
  width: 16px;
  height: 16px;
  border: 2.5px solid currentColor;
  border-inline-end-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Hero ---------- */

.hero { padding: 64px 0 80px; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  gap: 56px;
  align-items: center;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.8rem, 7vw, 4.6rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.hero .lead {
  margin: 14px 0 0;
  font-size: clamp(1.25rem, 2.6vw, 1.6rem);
  font-weight: 600;
  line-height: 1.6;
}

.hero .about {
  margin: 20px 0 0;
  max-width: 34rem;
  color: var(--muted);
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 32px;
}

/* بوم ورک‌فلو */

.flow {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 10px;
  background-image: radial-gradient(var(--dot) 1.3px, transparent 1.3px);
  background-size: 22px 22px;
  box-shadow: 0 28px 60px -34px rgba(23, 26, 51, 0.45);
}

.flow svg { display: block; width: 100%; height: auto; direction: ltr; }

.flow .node {
  fill: var(--surface);
  stroke: var(--line-strong);
  stroke-width: 1.5;
}

.flow .port { fill: var(--surface); stroke: var(--line-strong); stroke-width: 1.5; }

.flow .t { fill: var(--ink); font-size: 13.5px; font-weight: 700; font-family: inherit; }
.flow .s { fill: var(--muted); font-size: 11px; font-family: inherit; }
.flow .lbl { fill: var(--muted); font-size: 11px; font-family: inherit; text-anchor: middle; }

.flow .wire {
  fill: none;
  stroke: var(--coral);
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: draw 0.5s ease-out both;
}

.flow .wire.sub {
  stroke: var(--line-strong);
  stroke-width: 1.8;
  stroke-dasharray: 4 5;
  animation: none;
}

.flow .sub-node { fill: var(--surface); stroke: var(--violet); stroke-width: 1.8; }

.flow .ico-coral { fill: var(--coral); }
.flow .ico-violet { fill: var(--violet); }
.flow .ico-green { fill: var(--green); }
.flow .ico-sky { fill: var(--sky); }
.flow .glyph { fill: #fff; stroke: none; }
.flow .glyph-line { fill: none; stroke: #fff; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.flow .done {
  fill: var(--green);
  transform-box: fill-box;
  transform-origin: center;
  animation: pop 0.3s cubic-bezier(0.3, 1.6, 0.5, 1) both;
}

.flow .done-mark { fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.flow .d-a { animation-delay: 0.3s; }
.flow .d-ab { animation-delay: 0.35s; animation-duration: 0.4s; }
.flow .d-b { animation-delay: 0.85s; }
.flow .d-bcd { animation-delay: 0.9s; animation-duration: 0.55s; }
.flow .d-cd { animation-delay: 1.5s; }

@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes pop { from { transform: scale(0); } to { transform: scale(1); } }

@media (prefers-reduced-motion: reduce) {
  .flow .wire, .flow .done { animation: none; }
}

@media (max-width: 900px) {
  .hero { padding: 40px 0 56px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
}

/* ---------- بخش‌ها ---------- */

.section { padding: 72px 0; }

.section-head { max-width: 40rem; margin-bottom: 36px; }

.section h2 {
  margin: 0;
  font-size: clamp(1.7rem, 3.4vw, 2.3rem);
  font-weight: 800;
  line-height: 1.4;
}

.section .sub { margin: 8px 0 0; color: var(--muted); font-size: 1.05rem; }

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 56px;
  align-items: start;
}

.split p { margin: 0 0 16px; font-size: 1.05rem; }
.split p:last-child { margin-bottom: 0; }

@media (max-width: 860px) {
  .section { padding: 52px 0; }
  .split { grid-template-columns: 1fr; gap: 28px; }
}

/* چیپ‌های سرویس: هر کدام شبیه یک نود کوچک */

.chips {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.chips li {
  position: relative;
  padding: 8px 18px;
  background: var(--surface);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-node);
  font-weight: 600;
  direction: ltr;
}

.chips li::before,
.chips li::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 8px;
  height: 8px;
  margin-top: -4px;
  background: var(--surface);
  border: 1.5px solid var(--line-strong);
  border-radius: 50%;
}

.chips li::before { left: -5px; }
.chips li::after { right: -5px; }

.chips li.more {
  border-style: dashed;
  color: var(--muted);
  font-weight: 500;
}

.chips li.rtl { direction: rtl; }

.band {
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  border-block: 1px solid var(--line);
}

/* ---------- پلن‌ها ---------- */

.plans {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  align-items: stretch;
}

@media (max-width: 860px) {
  .plans { grid-template-columns: 1fr; }
}

.plan {
  display: flex;
  flex-direction: column;
  padding: 36px 32px;
  background: var(--surface);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-card);
}

.plan h3 { margin: 0; font-size: 1.5rem; font-weight: 800; line-height: 1.5; }
.plan .for { margin: 2px 0 0; color: var(--muted); }

.price { display: flex; align-items: baseline; gap: 10px; margin: 26px 0 24px; flex-wrap: wrap; }
.price .amount { font-size: 3.2rem; font-weight: 800; line-height: 1; }
.price .unit { color: var(--muted); font-weight: 500; }

.features {
  list-style: none;
  margin: 0 0 32px;
  padding: 0;
  display: grid;
  gap: 10px;
  flex: 1;
}

.features li { position: relative; padding-inline-start: 32px; }

.features li::before {
  content: "";
  position: absolute;
  inset-inline-start: 6px;
  top: 0.55em;
  width: 6px;
  height: 11px;
  border: solid var(--coral-strong);
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}

.plan--pro {
  background: #171a33;
  border-color: #3a3f73;
  color: #edeffa;
  box-shadow: 0 30px 60px -36px rgba(23, 26, 51, 0.7);
}

.plan--pro .for,
.plan--pro .price .unit { color: #a9afd4; }
.plan--pro .features li::before { border-color: #f2678a; }

/* ---------- تماس ---------- */

.contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  align-items: center;
  padding: 40px;
  background: var(--surface);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-card);
}

.contact h2 { margin: 0; font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; line-height: 1.5; }
.contact p { margin: 8px 0 0; color: var(--muted); font-size: 1.05rem; max-width: 36rem; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 12px; }

@media (max-width: 860px) {
  .contact { grid-template-columns: 1fr; padding: 28px 22px; }
}

/* ---------- فوتر ---------- */

.site-footer {
  flex-shrink: 0;
  padding: 28px 0 36px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.95rem;
}

.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.site-footer a { color: var(--muted); }

/* ---------- صفحه‌های فرم (سفارش، تمدید، پنل، بازگشت از درگاه) ---------- */

.narrow {
  width: 100%;
  max-width: 560px;
  margin-inline: auto;
  padding: 48px 20px 72px;
}

.panel {
  background: var(--surface);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-card);
  padding: 34px 32px;
}

@media (max-width: 480px) {
  .narrow { padding-top: 28px; }
  .panel { padding: 26px 20px; }
}

.panel h1 { margin: 0; font-size: 1.7rem; font-weight: 800; line-height: 1.5; }
.panel .sub { margin: 6px 0 0; color: var(--muted); }

.summary {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 20px;
  margin: 24px 0 0;
  padding: 16px 18px;
  background: var(--canvas);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-node);
}

.summary dt { color: var(--muted); }
.summary dd { margin: 0; font-weight: 700; }

form.stack { display: grid; gap: 18px; margin-top: 26px; }

.field label { display: block; margin-bottom: 6px; font-weight: 600; }

.field input {
  width: 100%;
  min-height: 52px;
  padding: 0 14px;
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-btn);
  direction: ltr;
  text-align: left;
}

.field input::placeholder { color: var(--muted); opacity: 0.7; }
.field input:focus-visible { outline-offset: 1px; border-color: var(--coral); }
.field input[aria-invalid="true"] { border-color: var(--danger); }

.field .hint { display: block; margin-top: 4px; color: var(--muted); font-size: 0.9rem; }

.msg {
  margin: 0;
  padding: 12px 14px;
  border-radius: var(--radius-btn);
  border: 1px solid;
  font-size: 0.97rem;
  line-height: 1.8;
}

.msg[hidden] { display: none; }

.msg.error {
  color: var(--danger);
  background: color-mix(in srgb, var(--danger) 9%, var(--surface));
  border-color: color-mix(in srgb, var(--danger) 38%, var(--surface));
}

.fine { margin: 20px 0 0; color: var(--muted); font-size: 0.92rem; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.actions .btn { flex: 1 1 200px; }

/* پنل کاربری */

.status-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 24px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 2px 14px;
  border-radius: 999px;
  border: 1.5px solid currentColor;
  font-weight: 700;
  font-size: 0.95rem;
}

.badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.badge.ok { color: var(--green); }
.badge.soon { color: var(--warn); }
.badge.expired { color: var(--danger); }

.exp-date { color: var(--muted); font-size: 0.95rem; }

.count {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.count > div {
  padding: 14px 8px;
  text-align: center;
  background: var(--canvas);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.count b {
  display: block;
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
}

.count span { color: var(--muted); font-size: 0.95rem; }

.meter {
  height: 10px;
  margin-top: 18px;
  background: var(--canvas);
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}

.meter span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--coral);
  border-radius: inherit;
  transition: width 0.6s ease-out;
}

.state-text { margin: 16px 0 0; }

/* نتیجه پرداخت */

.center { text-align: center; }

.spinner {
  width: 44px;
  height: 44px;
  margin: 8px auto 20px;
  border: 4px solid var(--line);
  border-top-color: var(--coral);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  .spinner { animation-duration: 3s; }
}

.result-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 16px;
  border-radius: 50%;
  color: #fff;
  font-size: 1.6rem;
  font-weight: 800;
}

.result-icon.ok { background: var(--green); }
.result-icon.fail { background: var(--danger); }

.linkbox {
  display: grid;
  gap: 10px;
  margin-top: 22px;
  padding: 16px;
  background: var(--canvas);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-node);
}

.linkbox input {
  width: 100%;
  min-height: 46px;
  padding: 0 12px;
  font: inherit;
  font-size: 0.9rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  direction: ltr;
  text-align: left;
}

.linkbox .row { display: flex; flex-wrap: wrap; gap: 10px; }
.linkbox .row .btn { flex: 1 1 140px; min-height: 46px; padding: 0 16px; }

.ref { direction: ltr; unicode-bidi: isolate; font-variant-numeric: tabular-nums; }

[hidden] { display: none !important; }

.flow .glyph-violet { fill: none; stroke: var(--violet); stroke-width: 1.8; stroke-linecap: round; }

.foot-links { display: inline-flex; flex-wrap: wrap; gap: 6px 16px; }

[tabindex="-1"]:focus { outline: none; }
