/* Ugarit Tech Radius — public site, the gateway's friendly pages, and a few vendor-portal extras.
   Builds on app.css (tokens, buttons, fields) and admin.css (price cards, tiles).
   Look: the company website's own — cream canvas, the faint wedge pattern, a large lock-up,
   one rust primary button with an outlined secondary one, generous spacing. */

/* ---- vendor portal extras ------------------------------------------------ */
.pack-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: var(--s3);
  align-items: end;
}
@media (max-width: 767.98px) {
  .pack-row {
    grid-template-columns: minmax(0, 1fr);
    padding-bottom: var(--s3);
    border-bottom: 1px solid var(--hairline);
  }
}

/* ---- friendly pages served by the gateway (no script, no instance) ------- */
body.gate {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--s6) var(--s4);
  background:
    linear-gradient(to bottom, rgba(251, 250, 247, 0.4), var(--canvas) 70%),
    url('/img/pattern.svg') repeat,
    var(--canvas);
}
.gate-card {
  width: 100%;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s3);
  padding: var(--s8) var(--s6);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  text-align: center;
}
.gate-card h1 {
  font-size: var(--text-h1);
  line-height: 1.35;
  margin-top: var(--s2);
}
.gate-card p {
  color: var(--text-2);
  max-width: 44ch;
}
.gate-en {
  width: 100%;
  padding-top: var(--s3);
  border-top: 1px solid var(--hairline);
}
.gate-en h2 {
  font-size: var(--text-base);
  font-weight: var(--w-medium);
}
.gate-en p {
  margin-inline: auto;
  font-size: var(--text-sm);
}
.gate-code {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: var(--s3) var(--s4);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  font-size: var(--text-sm);
}
.gate-code bdi {
  font-family: var(--mono);
  color: var(--text);
  overflow-wrap: anywhere;
}
.gate-note {
  font-size: var(--text-sm);
}
.gate-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--s2);
  margin-top: var(--s2);
}
.gate-by {
  font-size: var(--text-meta);
  margin-top: var(--s3);
}

/* ---- public site ---------------------------------------------------------- */
body.site {
  background: var(--canvas);
}
.site-wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--s6);
}
.site-head {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(251, 250, 247, 0.92);
  backdrop-filter: saturate(140%) blur(6px);
  border-bottom: 1px solid var(--border);
}
.site-head .site-wrap {
  display: flex;
  align-items: center;
  gap: var(--s4);
  min-height: 64px;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: var(--s3);
  color: var(--text);
  font-weight: var(--w-semibold);
}
.site-logo:hover {
  text-decoration: none;
}
.site-logo img {
  width: 34px;
  height: 34px;
}
.site-logo .tech {
  color: var(--accent);
}
.site-logo span {
  white-space: nowrap;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: var(--s1);
  margin-inline-start: auto;
}
.site-nav a.plain {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 var(--s3);
  color: var(--text-2);
  border-radius: var(--radius);
}
.site-nav a.plain:hover {
  color: var(--text);
  background: var(--surface-sunken);
  text-decoration: none;
}
.hero {
  position: relative;
  padding: var(--s12) 0;
  background:
    linear-gradient(to bottom, rgba(251, 250, 247, 0.2), var(--canvas) 92%),
    url('/img/pattern.svg') repeat;
  border-bottom: 1px solid var(--border);
}
.hero .site-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: var(--s8);
  align-items: center;
}
.hero h1 {
  font-size: clamp(30px, 4.6vw, 48px);
  line-height: 1.25;
  font-weight: var(--w-semibold);
  letter-spacing: 0;
}
.hero h1 em {
  font-style: normal;
  color: var(--accent);
}
.hero .lead {
  margin-top: var(--s4);
  max-width: 56ch;
  font-size: 18px;
  color: var(--text-2);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s3);
  margin-top: var(--s6);
}
.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2) var(--s6);
  margin-top: var(--s6);
  padding: 0;
  list-style: none;
  color: var(--text-2);
  font-size: var(--text-sm);
}
.hero-facts li {
  display: flex;
  align-items: center;
  gap: var(--s2);
}
.hero-facts .icon {
  color: var(--ok);
}
.hero-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s4);
  padding: var(--s8) var(--s6);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  text-align: center;
}
.hero-card .lockup {
  align-items: center;
}
.hero-card p {
  color: var(--text-2);
}
.site-section {
  padding: var(--s12) 0;
  /* a link to a section (#prices, #vpn) must not leave its heading under the sticky header */
  scroll-margin-top: var(--s12);
}
.site-section + .site-section {
  border-top: 1px solid var(--border);
}
.site-section > .site-wrap > h2 {
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.3;
}
.site-section > .site-wrap > .lead {
  margin-top: var(--s2);
  max-width: 62ch;
  color: var(--text-2);
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--s4);
  margin-top: var(--s8);
}
.feature {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  padding: var(--s6);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.feature .icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  background: var(--accent-soft);
  color: var(--accent);
}
.feature h3 {
  font-size: var(--text-h3);
  margin-top: var(--s2);
}
.feature p {
  color: var(--text-2);
}
.site-prices-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--s4);
}
.site-prices-head .tabs {
  margin-bottom: 0;
}
.site-prices .price-grid {
  margin-top: var(--s6);
}
.site-note {
  margin-top: var(--s4);
  color: var(--text-2);
  font-size: var(--text-sm);
}
/* the paid VPN package: what it is on one side, how to get it on the other */
.vpn-band {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: var(--s8);
  align-items: start;
}
.vpn-band h2 {
  margin-top: var(--s3);
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.3;
}
.vpn-band .lead {
  margin-top: var(--s2);
  max-width: 62ch;
  color: var(--text-2);
}
.vpn-band .price-list {
  margin-top: var(--s4);
  font-size: var(--text-base);
}
.vpn-band .price-list .icon {
  flex: none;
  margin-top: 4px;
  color: var(--accent);
}
.vpn-side {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  padding: var(--s6);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.vpn-side h3 {
  font-size: var(--text-h3);
}
.vpn-steps {
  display: grid;
  gap: var(--s2);
  margin: 0;
  padding-inline-start: 1.4em;
  list-style: decimal;
  color: var(--text-2);
}
.vpn-packs {
  display: grid;
  gap: var(--s2);
  margin: 0;
  padding: var(--s3) 0 0;
  border-top: 1px solid var(--border);
  list-style: none;
  font-size: var(--text-sm);
}
.vpn-packs li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--s1) var(--s3);
}
.vpn-packs strong {
  font-weight: 600;
}
.site-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--s4);
  padding: var(--s8);
  border-radius: var(--radius-lg);
  background: var(--navy-800);
  color: #fbfaf7;
}
.site-cta h2 {
  font-size: var(--text-h1);
  color: #fbfaf7;
}
.site-cta p {
  color: rgba(251, 250, 247, 0.78);
  margin-top: var(--s1);
}
.site-foot {
  padding: var(--s8) 0;
  border-top: 1px solid var(--border);
  color: var(--text-2);
  font-size: var(--text-sm);
}
.site-foot .site-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--s3);
}
.site-banner {
  background: var(--accent-soft);
  color: var(--rust-700);
  border-bottom: 1px solid var(--rust-100);
  font-size: var(--text-sm);
}
.site-banner .site-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--s2) var(--s3);
  min-height: 44px;
  padding-block: var(--s2);
}
.site-banner a {
  font-weight: var(--w-medium);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* sign-up and "find my login page": one calm card on the patterned canvas */
.site-form-page {
  min-height: calc(100vh - 65px);
  padding: var(--s8) 0 var(--s12);
  background:
    linear-gradient(to bottom, rgba(251, 250, 247, 0.3), var(--canvas) 80%),
    url('/img/pattern.svg') repeat;
}
.site-form {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: var(--s8) var(--s6);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.site-form h1 {
  font-size: var(--text-h1);
  line-height: 1.3;
}
.site-form .lead {
  margin-top: var(--s2);
  color: var(--text-2);
}
.address-field {
  display: flex;
  align-items: stretch;
  direction: ltr;
}
.address-field .input {
  border-start-end-radius: 0;
  border-end-end-radius: 0;
  min-width: 0;
}
.address-field .suffix {
  display: inline-flex;
  align-items: center;
  padding: 0 var(--s3);
  border: 1px solid var(--border-strong);
  border-inline-start: 0;
  border-start-end-radius: var(--radius);
  border-end-end-radius: var(--radius);
  background: var(--surface-sunken);
  color: var(--text-2);
  font-size: var(--text-sm);
  white-space: nowrap;
}
.trap {
  position: absolute;
  inset-inline-start: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.progress-steps {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  margin: var(--s6) 0 0;
  padding: 0;
  list-style: none;
}
.progress-steps li {
  display: flex;
  align-items: center;
  gap: var(--s3);
  color: var(--text-3);
}
.progress-steps li.done {
  color: var(--text);
}
.progress-steps li.done .icon {
  color: var(--ok);
}
.progress-steps li.now {
  color: var(--text);
  font-weight: var(--w-medium);
}
.progress-steps .dot {
  width: 20px;
  height: 20px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.progress-steps .dot::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.5;
}
.provider-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.provider-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  padding: var(--s3) 0;
  border-bottom: 1px solid var(--hairline);
}
.provider-list li:last-child {
  border-bottom: 0;
}

@media (max-width: 767.98px) {
  .site-wrap {
    padding: 0 var(--s4);
  }
  .site-nav a.plain {
    display: none;
  }
  /* the language button keeps its globe; its word would push the name onto three lines */
  .site-nav .btn.ghost > span {
    display: none;
  }
  .site-logo {
    font-size: 15px;
    gap: var(--s2);
  }
  .site-head .site-wrap {
    gap: var(--s2);
  }
  .hero {
    padding: var(--s8) 0;
  }
  .hero .site-wrap {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero-card {
    display: none;
  }
  .hero .lead {
    font-size: var(--text-base);
  }
  .hero-actions .btn {
    flex: 1 1 100%;
  }
  .site-section {
    padding: var(--s8) 0;
  }
  .vpn-band {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s6);
  }
  .vpn-side {
    padding: var(--s4);
  }
  .vpn-side .btn {
    width: 100%;
  }
  .site-cta {
    padding: var(--s6) var(--s4);
  }
  .site-cta .btn {
    flex: 1 1 100%;
  }
  .site-form-page {
    padding: var(--s4) 0 var(--s8);
  }
  .site-form {
    padding: var(--s6) var(--s4);
  }
  .gate-card {
    padding: var(--s6) var(--s4);
  }
}
