@font-face {
  font-family: "Ploni";
  src: url("/fonts/ploni-regular-aaa.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Ploni";
  src: url("/fonts/ploni-medium-aaa.otf") format("opentype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Ploni";
  src: url("/fonts/ploni-demibold-aaa.otf") format("opentype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --arbox-primary: #1936f7;
  --arbox-primary-hover: #001cd4;
  --arbox-blue-bg: #ecf7ff;
  --arbox-blue-100: #d4e4fd;
  --arbox-blue-200: #a9c9fb;
  --arbox-main-text: #3b3b3b;
  --arbox-secondary-text: #9d9d9d;
  --arbox-border: #e0e0e0;
  --arbox-grey-bg: #f9f9f9;
  --arbox-error-red: #ea3635;
  --arbox-red-bg: #ffe8e8;
  --arbox-success-green: #0d7f56;
  --arbox-green-bg: #e6faea;
  --arbox-radius: 4px;
  --arbox-radius-card: 10px;
  --arbox-input-height: 44px;
  --arbox-shadow-focus: 0 0 0 3px rgba(25, 54, 247, 0.15);
  --arbox-shadow-card: rgb(235, 234, 234) 0px 0px 4px 0px;
  --arbox-font-family: "Ploni", "Segoe UI", Tahoma, Arial, sans-serif;
  --page-primary: var(--arbox-primary);
  --page-accent: var(--arbox-primary-hover);
  --transition: background 140ms ease, color 140ms ease, border-color 140ms ease,
    box-shadow 180ms ease, transform 180ms ease, opacity 180ms ease;
}

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

html { direction: rtl; }

body {
  min-height: 100dvh;
  font-family: var(--arbox-font-family);
  font-size: 16px;
  line-height: 23.5px;
  color: var(--arbox-main-text);
  background: var(--arbox-grey-bg);
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea,
.arbox-btn,
.arbox-input,
.arbox-label {
  font-family: var(--arbox-font-family) !important;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

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

.landing {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ── Hero (full-bleed commercial band) ── */
.hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background:
    radial-gradient(900px 420px at 85% 0%, rgba(83, 147, 247, 0.45), transparent 55%),
    linear-gradient(135deg, #14219b 0%, var(--page-primary) 48%, #5393f7 100%);
  padding: 36px 20px 48px;
  animation: fadeUp 0.35s ease both;
}

.hero.has-media {
  min-height: min(42vh, 360px);
  display: flex;
  align-items: flex-end;
  padding-bottom: 40px;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-media[hidden] { display: none !important; }

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(14, 23, 114, 0.25) 0%, rgba(14, 23, 114, 0.72) 100%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  margin: 0 auto;
  text-align: center;
}

.hero-brand {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}

.hero-logo {
  display: block;
  height: 40px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
}
.hero-logo[hidden] { display: none !important; }
.form-mark[hidden] { display: none !important; }

.hero h1 {
  margin: 0 0 10px;
  font-size: clamp(28px, 5vw, 40px);
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.hero-lead {
  margin: 0 auto;
  max-width: 34ch;
  font-size: 16px;
  line-height: 24px;
  color: rgba(255, 255, 255, 0.92);
  white-space: pre-wrap;
}

/* ── Body ── */
.landing-body {
  width: min(720px, 100%);
  margin: -28px auto 0;
  padding: 0 16px 40px;
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 20px;
  animation: fadeUp 0.4s ease 0.05s both;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 12px;
  padding: 10px 14px;
  background: #ffffff;
  border-radius: var(--arbox-radius-card);
  box-shadow: var(--arbox-shadow-card);
  color: var(--arbox-secondary-text);
  font-size: 13px;
  line-height: 18px;
  font-weight: 500;
}

.trust-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--page-primary);
  opacity: 0.45;
}

.form-panel {
  background: #ffffff;
  border-radius: var(--arbox-radius-card);
  box-shadow: var(--arbox-shadow-card), 0 16px 40px rgba(25, 54, 247, 0.06);
  padding: 24px 22px 22px;
}

.form-panel-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.form-mark {
  width: 56px;
  height: 56px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 50%;
}

.form-panel-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--arbox-border, #e8eaf0);
}

.powered-by {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--arbox-grey-bg);
  border: 1px solid var(--arbox-border);
  text-decoration: none;
  color: var(--arbox-secondary-text);
  transition: var(--transition);
}

.powered-by:hover,
.powered-by:focus-visible {
  border-color: var(--arbox-blue-200);
  background: var(--arbox-blue-bg);
  color: var(--arbox-main-text);
  outline: none;
}

.powered-by-label {
  font-size: 12px;
  line-height: 18px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.powered-by-brand {
  display: inline-flex;
  align-items: center;
}

.powered-by-wordmark {
  height: 16px;
  width: auto;
  max-width: 88px;
  object-fit: contain;
  display: block;
}

.form-title {
  font-size: 20px;
  line-height: 29.4px;
  font-weight: 600;
  color: var(--arbox-main-text);
}

.form-subtitle {
  font-size: 14px;
  line-height: 20px;
  color: var(--arbox-secondary-text);
}

.arbox-form { text-align: start; }

.field { margin-bottom: 4px; }

.arbox-label {
  display: block;
  margin: 0 0 8px;
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  color: var(--arbox-main-text);
}

.req { color: var(--arbox-error-red); }

.arbox-input {
  width: 100%;
  height: var(--arbox-input-height);
  min-height: var(--arbox-input-height);
  padding: 8px 12px;
  border: 1px solid var(--arbox-border);
  border-radius: var(--arbox-radius);
  font-size: 18px;
  line-height: 26px;
  font-family: inherit;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--arbox-main-text);
  background: #ffffff;
  outline: none;
  transition: var(--transition);
}

.arbox-input::placeholder {
  color: var(--arbox-secondary-text);
  font-weight: 400;
}

.arbox-input:hover { border-color: var(--page-primary); }

.arbox-input:focus {
  border-color: var(--page-primary);
  box-shadow: var(--arbox-shadow-focus);
}

.arbox-input[aria-invalid="true"] {
  border-color: var(--arbox-error-red);
}

.hint {
  margin-top: 8px;
  font-size: 12px;
  line-height: 18px;
  color: var(--arbox-secondary-text);
}

.field-error {
  margin-top: 6px;
  font-size: 14px;
  line-height: 20px;
  color: var(--arbox-error-red);
}

.arbox-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  height: 44px;
  padding: 10px 18px;
  border-radius: var(--arbox-radius);
  font-size: 16px;
  line-height: 23.5px;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
}

.arbox-btn-primary {
  margin-top: 18px;
  background: var(--page-primary);
  color: #ffffff;
  border: 1px solid transparent;
}

.arbox-btn-primary:hover:not(:disabled) {
  background: var(--page-accent);
}

.arbox-btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.arbox-btn-secondary {
  background: #ffffff;
  color: var(--page-primary);
  border: 1px solid var(--page-primary);
}

.arbox-btn-secondary:hover:not(:disabled) {
  background: var(--arbox-blue-bg);
}

.arbox-loader {
  display: none;
  width: 48px;
  height: 48px;
  background: url("/assets/loader.png") no-repeat center / contain;
  animation: arboxLoaderSpin 1.2s linear infinite;
}

.arbox-loader-sm { width: 22px; height: 22px; }
.arbox-btn.loading .arbox-loader { display: inline-block; }
.arbox-btn.loading .btn-label { display: none; }

.status-panel {
  margin-top: 18px;
  padding: 16px;
  border-radius: var(--arbox-radius-card);
  animation: fadeUp 0.24s ease both;
}

.status-panel[hidden] { display: none !important; }
.status-ok { background: var(--arbox-green-bg); }
.status-err { background: var(--arbox-red-bg); }

.status-badge {
  display: inline-block;
  margin-bottom: 8px;
  padding: 2px 8px;
  border-radius: var(--arbox-radius);
  font-size: 13px;
  line-height: 18px;
  font-weight: 600;
  background: #ffffff;
}

.status-badge-ok { color: var(--arbox-success-green); }
.status-badge-err { color: var(--arbox-error-red); }

.status-text {
  color: var(--arbox-main-text);
  font-size: 16px;
  line-height: 23.5px;
}

.coupon-box {
  margin-top: 12px;
  padding: 14px;
  background: #ffffff;
  border-radius: var(--arbox-radius-card);
  box-shadow: var(--arbox-shadow-card);
}

.coupon-label {
  font-size: 12px;
  line-height: 18px;
  color: var(--arbox-secondary-text);
}

.coupon-code {
  margin: 4px 0 2px;
  font-size: 24px;
  line-height: 34px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--page-primary);
  direction: ltr;
  unicode-bidi: isolate;
}

.coupon-meta {
  font-size: 14px;
  line-height: 20px;
  color: var(--arbox-secondary-text);
}

.coupon-actions {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.coupon-actions .arbox-btn { margin-top: 0; }

.contact {
  margin-top: 10px;
  font-size: 14px;
  line-height: 20px;
  color: var(--arbox-main-text);
  direction: ltr;
  unicode-bidi: isolate;
  text-align: start;
}

/* ── Feature / content blocks ── */
.feature-grid {
  display: grid;
  gap: 14px;
}

.feature-grid[hidden] { display: none !important; }

.feature-card {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 0;
  background: #ffffff;
  border-radius: var(--arbox-radius-card);
  box-shadow: var(--arbox-shadow-card);
  overflow: hidden;
  min-height: 112px;
  animation: fadeUp 0.3s ease both;
}

.feature-card-image {
  width: 100%;
  height: 100%;
  min-height: 112px;
  object-fit: cover;
  background: var(--arbox-blue-bg);
  display: block;
}

.feature-card-body {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: start;
}

.feature-card-title {
  margin: 0 0 6px;
  font-size: 16px;
  line-height: 23.5px;
  font-weight: 600;
  color: var(--arbox-main-text);
}

.feature-card-text {
  margin: 0;
  font-size: 14px;
  line-height: 20px;
  color: var(--arbox-secondary-text);
  white-space: pre-wrap;
}

.feature-card.no-image {
  grid-template-columns: 1fr;
}

.landing-footer {
  width: min(720px, 100%);
  margin: 0 auto;
  padding: 8px 16px 32px;
  text-align: center;
}

.footer-note {
  font-size: 14px;
  line-height: 20px;
  color: var(--arbox-secondary-text);
  margin-bottom: 0;
  white-space: pre-wrap;
}

.footer-note:empty {
  display: none;
}

/* ── Rebind confirmation modal (Arbox confirm look) ── */
.arbox-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.arbox-modal[hidden] { display: none !important; }

.arbox-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(59, 59, 59, 0.45);
}

.arbox-modal-card {
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
  background: #ffffff;
  border-radius: var(--arbox-radius-card);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
  animation: fadeUp 0.22s ease both;
}

.arbox-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 0;
}

.arbox-modal-title {
  margin: 0;
  font-size: 18px;
  line-height: 26px;
  font-weight: 600;
  color: var(--arbox-main-text);
}

.arbox-modal-close {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  color: var(--arbox-secondary-text);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  border-radius: var(--arbox-radius);
}

.arbox-modal-close:hover {
  color: var(--arbox-main-text);
  background: var(--arbox-grey-bg);
}

.arbox-modal-body {
  padding: 14px 20px 8px;
}

.arbox-modal-lead {
  margin: 0 0 14px;
  font-size: 16px;
  line-height: 23.5px;
  color: var(--arbox-main-text);
}

.rebind-coupon {
  display: inline-block;
  margin-inline: 4px;
  padding: 1px 8px;
  border-radius: var(--arbox-radius);
  background: var(--arbox-blue-bg);
  color: var(--page-primary);
  font-weight: 600;
  letter-spacing: 0.04em;
  unicode-bidi: isolate;
}

.rebind-courses {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  align-items: stretch;
  margin-bottom: 14px;
}

.rebind-course {
  padding: 12px;
  border-radius: var(--arbox-radius-card);
  border: 1px solid var(--arbox-border);
  background: var(--arbox-grey-bg);
  text-align: start;
  min-width: 0;
}

.rebind-course-to {
  border-color: var(--arbox-blue-200);
  background: var(--arbox-blue-bg);
}

.rebind-course-label {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  line-height: 18px;
  color: var(--arbox-secondary-text);
  font-weight: 500;
}

.rebind-course-name {
  display: block;
  font-size: 15px;
  line-height: 22px;
  font-weight: 600;
  color: var(--arbox-main-text);
  word-break: break-word;
}

.rebind-course-to .rebind-course-name {
  color: var(--page-primary);
}

.rebind-arrow {
  align-self: center;
  color: var(--arbox-secondary-text);
  font-size: 18px;
  line-height: 1;
}

.arbox-modal-note {
  margin: 0;
  font-size: 14px;
  line-height: 20px;
  color: var(--arbox-secondary-text);
}

.arbox-modal-footer {
  display: flex;
  justify-content: flex-start;
  gap: 8px;
  padding: 12px 20px 18px;
}

.arbox-modal-btn {
  margin-top: 0;
  min-width: 110px;
  width: auto;
  padding-inline: 16px;
}

.arbox-modal-footer .arbox-btn-primary {
  min-width: 150px;
}

body.modal-open {
  overflow: hidden;
}

@media (max-width: 560px) {
  .hero { padding: 28px 16px 40px; }
  .hero.has-media { min-height: 280px; }
  .landing-body { margin-top: -22px; }
  .form-panel { padding: 20px 16px 18px; }
  .feature-card {
    grid-template-columns: 1fr;
  }
  .feature-card-image {
    min-height: 160px;
    max-height: 180px;
  }
  .trust-row { font-size: 12px; }
  .rebind-courses {
    grid-template-columns: 1fr;
  }
  .rebind-arrow {
    transform: rotate(-90deg);
    justify-self: center;
  }
  .arbox-modal-footer {
    flex-direction: column-reverse;
  }
  .arbox-modal-btn,
  .arbox-modal-footer .arbox-btn-primary {
    width: 100%;
  }
}
