/*
  Design reference: Figma 1920x3360.
  All typography & spacing scale linearly with viewport via clamp()
  using 100vw / 1920 ≈ 5.21vw per 100 design-px.
  Content gutters: clamp(16px, calc((100vw - 1518px) / 2), 201px)
*/

:root {
  --bg: #010101;
  --panel: #101010;
  --text: #fff;
  --text-muted: rgba(255, 255, 255, 0.4);
  --text-soft: rgba(255, 255, 255, 0.75);
  --text-faint: rgba(255, 255, 255, 0.6);
  --gray-text: #898989;
  --border: rgba(255, 255, 255, 0.1);
  --divider: rgba(87, 87, 87, 0.25);
  --icon-bg: rgba(31, 31, 31, 0.78);

  /* horizontal gutter: 10.5% of viewport (matches Figma 201/1920) without cap so it scales on wide monitors */
  --gutter: clamp(16px, 10.47vw, 360px);
  --content: calc(100vw - var(--gutter) * 2);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-width: 320px;
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.page { width: 100%; margin: 0 auto; position: relative; }
.container {
  width: 100%;
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* ============ HERO ============ */
.hero {
  position: relative;
  width: 100%;
  min-height: clamp(560px, 56.25vw, 1080px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.hero-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.glow {
  position: absolute;
  border-radius: 50%;
  background: rgba(69, 69, 69, 1);
  filter: blur(clamp(80px, 9vw, 180px));
  opacity: 0.85;
}
.glow-center {
  width: min(1920px, 100vw);
  height: clamp(280px, 27.4vw, 526px);
  left: 50%;
  top: clamp(380px, 37.5vw, 720px);
  transform: translateX(-50%);
}
.glow-left {
  width: clamp(180px, 17.5vw, 335px);
  height: clamp(280px, 27.4vw, 526px);
  left: clamp(-24px, -2.34vw, -45px);
  top: clamp(320px, 32vw, 617px);
}
.glow-right {
  width: clamp(180px, 17.5vw, 335px);
  height: clamp(280px, 27.4vw, 526px);
  right: clamp(-24px, -2.34vw, -45px);
  top: clamp(340px, 34.27vw, 658px);
}

/* ============ NAVBAR ============ */
.navbar-wrap {
  position: relative;
  z-index: 10;
  padding-top: clamp(20px, 2.24vw, 43px);
}

.navbar {
  width: var(--content);
  margin: 0 auto;
  height: clamp(58px, 5vw, 110px);
  padding: 0 clamp(14px, 1.56vw, 36px);
  background: transparent;
  border: 0;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: clamp(12px, 1.25vw, 28px);
}

.brand { display: flex; align-items: center; }
.brand-logo { display: block; width: clamp(34px, 2.92vw, 78px); height: auto; }

.nav-links {
  display: flex;
  gap: clamp(6px, 0.78vw, 15px);
  justify-content: center;
}
.nav-link {
  display: inline-flex;
  align-items: center;
  padding: clamp(8px, 0.83vw, 20px) clamp(16px, 1.88vw, 44px);
  border-radius: clamp(20px, 1.67vw, 40px);
  font-size: clamp(13px, 1.15vw, 28px);
  font-weight: 400;
  color: #fff;
  transition: background 0.2s ease;
}
.nav-link:hover { background: rgba(255, 255, 255, 0.05); }

.nav-cta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(12px, 1.25vw, 24px);
}
.nav-login {
  font-size: clamp(13px, 1.15vw, 26px);
  font-weight: 400;
  color: #fff;
  padding: 0 6px;
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-weight: 600;
  line-height: 1;
  border-radius: clamp(12px, 0.94vw, 18px);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, opacity 0.2s ease;
  border: 0;
  text-align: center;
  white-space: nowrap;
  box-sizing: border-box;
}
.btn-primary { background: #fff; color: #000; padding: clamp(12px, 1.25vw, 36px) clamp(20px, 2.29vw, 64px); font-size: clamp(15px, 1.46vw, 40px); }
.btn-primary:hover { background: rgba(255, 255, 255, 0.92); transform: translateY(-1px); }
.btn-ghost {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid #fff;
  color: #fff;
  padding: clamp(12px, 1.25vw, 36px) clamp(20px, 2.29vw, 64px);
  font-size: clamp(15px, 1.46vw, 40px);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); transform: translateY(-1px); }

/* Size modifier must come after color modifiers so it wins on padding/font-size */
.btn.btn-sm {
  padding: clamp(7px, 0.55vw, 12px) clamp(12px, 1.05vw, 22px);
  font-size: clamp(12px, 0.85vw, 18px);
  border-radius: clamp(10px, 0.7vw, 14px);
  font-weight: 500;
}

/* ============ HERO CONTENT ============ */
.hero-content {
  position: relative;
  z-index: 5;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(40px, 5vw, 100px) var(--gutter) clamp(40px, 5vw, 80px);
}

.hero-eyebrow {
  font-size: clamp(28px, 3.33vw, 92px);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: 0.01em;
  color: transparent;
  -webkit-text-stroke: 1px #fff;
  margin-bottom: 0;
}
.hero-title {
  font-size: clamp(40px, 5vw, 140px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: 0.01em;
  color: #fff;
  margin: clamp(4px, 0.42vw, 12px) 0 clamp(14px, 1.25vw, 36px);
}
.hero-sub {
  font-size: clamp(15px, 1.67vw, 48px);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: 0.01em;
  color: var(--text-muted);
  margin-bottom: clamp(24px, 2.5vw, 70px);
}
.hero-buttons {
  display: flex;
  gap: clamp(8px, 0.68vw, 20px);
  justify-content: center;
  flex-wrap: wrap;
}

/* ============ SECTIONS ============ */
.section {
  padding-top: clamp(24px, 2.34vw, 70px);
  padding-bottom: 0;
}
.section + .section { padding-top: clamp(24px, 2.34vw, 70px); }

.section-title {
  font-size: clamp(22px, 2.08vw, 60px);
  font-weight: 600;
  color: #fff;
  margin-bottom: clamp(16px, 1.56vw, 44px);
}

/* ============ ADVANTAGES ============ */
.cards {
  display: grid;
  grid-template-columns: 856fr 632fr;
  grid-template-rows: auto auto;
  gap: clamp(14px, 1.56vw, 44px);
}

.card {
  position: relative;
  /* Figma: 58px top, 48px sides, 39px bottom — scaled */
  padding-top: clamp(24px, 3.02vw, 88px);
  padding-right: clamp(20px, 2.5vw, 72px);
  padding-bottom: clamp(18px, 2.03vw, 60px);
  padding-left: clamp(20px, 2.5vw, 72px);
  border-radius: clamp(20px, 1.67vw, 48px);
  background: var(--panel);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.04);
  display: flex;
  flex-direction: column;
}

/* Match Figma image fill opacity exactly: 0.15 for card 1, 0.22 for card 2 */
.card-image::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.card-image-1::before {
  background-image: url("assets/card-connectivity.jpg");
  opacity: 0.15;
}
.card-image-2::before {
  background-image: url("assets/card-servers.jpg");
  opacity: 0.22;
}
.card > * { position: relative; z-index: 2; }

.card-icon {
  width: clamp(40px, 3.28vw, 92px);
  height: clamp(40px, 3.33vw, 92px);
  border-radius: 50%;
  background: var(--icon-bg);
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* Figma: 4px gap between icon and title */
  margin-bottom: clamp(2px, 0.21vw, 6px);
  align-self: flex-start;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  flex-shrink: 0;
}
.card-icon svg { width: 50%; height: auto; }

.card-title {
  font-size: clamp(22px, 2.08vw, 60px);
  font-weight: 600;
  color: #fff;
  margin-bottom: clamp(4px, 0.31vw, 10px);
}
.card-text {
  font-size: clamp(12px, 0.83vw, 24px);
  font-weight: 600;
  color: var(--gray-text);
  line-height: 1.25;
}

/* ============ PRICING ============ */
.pricing-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--panel);
  border-radius: clamp(20px, 1.67vw, 48px);
  padding: clamp(28px, 3.13vw, 90px) clamp(20px, 3.28vw, 94px);
  border: 1px solid rgba(255, 255, 255, 0.04);
  font-family: "Inter", system-ui, sans-serif;
}

.pricing-table th,
.pricing-table td {
  padding: clamp(10px, 0.94vw, 28px) clamp(4px, 0.5vw, 16px);
  font-size: clamp(13px, 1.04vw, 30px);
  font-weight: 500;
  color: var(--text-soft);
  text-align: left;
  border-bottom: 1px solid var(--divider);
  white-space: nowrap;
}
.pricing-table tbody tr:last-child td { border-bottom: 0; }
.pricing-table th:last-child,
.pricing-table td:last-child { text-align: right; }

.pricing-head th {
  font-weight: 200;
  padding-bottom: clamp(10px, 0.94vw, 28px);
}

.btn-order {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: #0a0a0c;
  font-family: "Inter", sans-serif;
  font-size: clamp(12px, 0.83vw, 24px);
  font-weight: 500;
  padding: clamp(9px, 0.73vw, 20px) clamp(18px, 1.61vw, 46px);
  border-radius: clamp(12px, 0.83vw, 22px);
  transition: transform 0.15s ease, background 0.15s ease;
}
.btn-order:hover { background: rgba(255, 255, 255, 0.92); transform: translateY(-1px); }

/* ============ JOIN ============ */
.join {
  position: relative;
  text-align: center;
  padding: clamp(80px, 6.77vw, 130px) var(--gutter) clamp(60px, 5.21vw, 100px);
  overflow: hidden;
}
.join-glow {
  position: absolute;
  width: clamp(800px, 101.5vw, 1949px);
  height: clamp(360px, 38vw, 730px);
  left: 50%;
  top: clamp(200px, 18.75vw, 360px);
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(217, 217, 217, 0.45) 0%, rgba(217, 217, 217, 0) 60%);
  filter: blur(clamp(60px, 6.25vw, 120px));
  z-index: 0;
  pointer-events: none;
}
.join-title {
  position: relative;
  font-size: clamp(40px, 5vw, 140px);
  font-weight: 700;
  color: #fff;
  margin-bottom: clamp(12px, 1.25vw, 36px);
  z-index: 1;
}
.join-sub {
  position: relative;
  font-size: clamp(14px, 1.25vw, 36px);
  font-weight: 500;
  color: var(--text-faint);
  z-index: 1;
}

/* ============ FOOTER ============ */
.footer {
  background: var(--bg);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: clamp(28px, 2.66vw, 76px) var(--gutter) clamp(32px, 3.13vw, 90px);
  position: relative;
  z-index: 2;
}
.footer-inner {
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: clamp(24px, 4.17vw, 120px);
  align-items: flex-start;
}
.footer-brand { max-width: clamp(320px, 32vw, 700px); }
.footer-brand .brand-logo { width: clamp(40px, 3.33vw, 96px); }
.footer-name {
  font-size: clamp(15px, 1.25vw, 36px);
  font-weight: 500;
  color: #fff;
  margin-top: clamp(10px, 0.73vw, 22px);
}
.footer-desc {
  font-family: "Inter", sans-serif;
  font-size: clamp(13px, 0.94vw, 22px);
  font-weight: 400;
  color: rgba(255, 255, 255, 0.5);
  margin-top: clamp(10px, 0.73vw, 22px);
  line-height: 1.6;
}
.footer-copy {
  font-size: clamp(12px, 0.83vw, 24px);
  font-weight: 500;
  color: var(--text-muted);
  margin-top: clamp(10px, 0.83vw, 26px);
}
.footer-links {
  display: flex;
  gap: clamp(20px, 2.4vw, 64px);
  justify-content: end;
  align-items: flex-start;
}
.footer-col {
  display: flex;
  flex-direction: column;
  gap: clamp(8px, 0.7vw, 18px);
}
.footer-col-heading {
  font-family: "Inter", sans-serif;
  font-size: clamp(11px, 0.7vw, 13px);
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  padding-left: clamp(16px, 1.88vw, 54px);
  margin-bottom: clamp(2px, 0.2vw, 4px);
}
.pill {
  display: inline-flex;
  align-items: center;
  padding: clamp(8px, 0.83vw, 24px) clamp(16px, 1.88vw, 54px);
  border-radius: clamp(20px, 1.67vw, 48px);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-size: clamp(13px, 1.04vw, 30px);
  font-weight: 300;
  transition: background 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
}
.pill:hover { background: rgba(255, 255, 255, 0.1); transform: translateY(-1px); }

/* Community pills get a subtle accent so they read as separate from legal */
.pill-tg {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.pill-tg:hover { background: rgba(255, 255, 255, 0.06); }

/* ============ LEGAL PAGES ============ */
.legal-page {
  width: 100%;
  margin: 0 auto;
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.legal-header {
  position: relative;
  z-index: 10;
  padding-top: clamp(20px, 2.24vw, 43px);
}
.legal-nav {
  width: var(--content);
  margin: 0 auto;
  height: clamp(58px, 5vw, 110px);
  padding: 0 clamp(14px, 1.56vw, 36px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(12px, 1.25vw, 28px);
}
.legal-back {
  font-size: clamp(13px, 1.04vw, 26px);
  color: var(--text-soft);
  padding: clamp(8px, 0.83vw, 20px) clamp(16px, 1.46vw, 32px);
  border-radius: clamp(20px, 1.67vw, 40px);
  background: rgba(255, 255, 255, 0.04);
  transition: background 0.2s ease;
}
.legal-back:hover { background: rgba(255, 255, 255, 0.08); }

.legal-content {
  width: 100%;
  max-width: clamp(640px, 56vw, 1080px);
  margin: 0 auto;
  padding: clamp(24px, 3vw, 80px) clamp(20px, 4vw, 64px) clamp(48px, 5vw, 120px);
  font-family: "Inter", system-ui, sans-serif;
  color: var(--text-soft);
}

.legal-meta {
  font-size: clamp(12px, 0.83vw, 16px);
  color: var(--text-muted);
  margin-bottom: clamp(12px, 1vw, 18px);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
}

.legal-content h1 {
  font-family: "Onest", system-ui, sans-serif;
  font-size: clamp(28px, 3vw, 52px);
  font-weight: 600;
  color: #fff;
  margin-bottom: clamp(16px, 1.5vw, 28px);
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.legal-intro {
  font-size: clamp(14px, 1vw, 18px);
  line-height: 1.6;
  color: var(--text-faint);
  margin-bottom: clamp(32px, 3vw, 56px);
  padding-bottom: clamp(24px, 2vw, 40px);
  border-bottom: 1px solid var(--border);
}

.legal-content section {
  margin-bottom: clamp(28px, 2.5vw, 48px);
}

.legal-content h2 {
  font-family: "Onest", system-ui, sans-serif;
  font-size: clamp(18px, 1.4vw, 26px);
  font-weight: 600;
  color: #fff;
  margin-bottom: clamp(12px, 1vw, 20px);
  line-height: 1.3;
}

.legal-content h3 {
  font-family: "Onest", system-ui, sans-serif;
  font-size: clamp(15px, 1.1vw, 20px);
  font-weight: 600;
  color: #fff;
  margin-top: clamp(16px, 1.25vw, 24px);
  margin-bottom: clamp(8px, 0.6vw, 12px);
}

.legal-content p {
  font-size: clamp(13px, 0.95vw, 16px);
  line-height: 1.65;
  margin-bottom: clamp(10px, 0.83vw, 14px);
}

.legal-content ul,
.legal-content ol {
  margin: clamp(8px, 0.7vw, 12px) 0 clamp(14px, 1vw, 20px);
  padding-left: clamp(20px, 1.5vw, 28px);
}
.legal-content ul { list-style: disc; }
.legal-content ol { list-style: decimal; }
.legal-content li {
  font-size: clamp(13px, 0.95vw, 16px);
  line-height: 1.65;
  margin-bottom: clamp(4px, 0.4vw, 7px);
}

.legal-content a {
  color: #fff;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.35);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s ease;
}
.legal-content a:hover { text-decoration-color: #fff; }

.legal-content strong { color: #fff; font-weight: 600; }

.legal-content .clause {
  display: block;
  font-size: clamp(13px, 0.95vw, 16px);
  line-height: 1.65;
  margin-bottom: clamp(8px, 0.7vw, 12px);
}
.legal-content .clause-num {
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  margin-right: 0.5em;
  font-weight: 500;
}

.legal-callout {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: clamp(12px, 1vw, 18px);
  padding: clamp(16px, 1.5vw, 28px) clamp(18px, 1.7vw, 32px);
  margin: clamp(16px, 1.5vw, 28px) 0;
  font-size: clamp(13px, 0.92vw, 15px);
  line-height: 1.6;
  color: var(--text-soft);
}

@media (max-width: 720px) {
  .legal-nav { padding: 0 8px; }
  .legal-content { padding: 24px 18px 48px; }
  .legal-content h1 { font-size: 26px; }
  .legal-content h2 { font-size: 18px; }
}

/* ============ TABLET (pricing) ============ */
@media (max-width: 1024px) {
  .pricing-table { border-collapse: initial; }
  .pricing-table thead { display: none !important; }
  .pricing-table,
  .pricing-table tbody,
  .pricing-table tr,
  .pricing-table td { display: block !important; }
  .pricing-table tr { padding: 14px 0; border-bottom: 1px solid var(--divider); position: relative; }
  .pricing-table tbody tr:last-child { border-bottom: 0; }
  .pricing-table td { border: 0; padding: 3px 0; font-size: 14px; white-space: normal; }
  .pricing-table td:nth-child(1) { font-weight: 700; font-size: 16px; color: #fff; margin-bottom: 4px; }
  .pricing-table td:nth-child(2)::before { content: "CPU: "; opacity: 0.5; }
  .pricing-table td:nth-child(3)::before { content: "RAM: "; opacity: 0.5; }
  .pricing-table td:nth-child(4)::before { content: "Storage: "; opacity: 0.5; }
  .pricing-table td:nth-child(5)::before { content: "Channel: "; opacity: 0.5; }
  .pricing-table td:nth-child(6) { font-weight: 700; color: #fff; }
  .pricing-table td:last-child { position: absolute; right: 0; top: 50%; transform: translateY(-50%); }
}

/* ============ MOBILE ============ */
@media (max-width: 720px) {
  .navbar { grid-template-columns: auto 1fr; }
  .nav-links { display: none; }
  .nav-cta .nav-login { display: none; }
  .cards { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-links { flex-direction: column; align-items: stretch; gap: 18px; }
  .footer-col { gap: 8px; }
  .footer-col-heading { padding-left: 18px; }
}
