/* Netframe Simulator front page: full-width page, two roomy product cards on the Netframe purple backdrop.
   Plain CSS, no external resources. */
@font-face {
  font-family: "prime-netframe-regular";
  src: url("assets/fonts/Prime-Netframe-Regular.woff2") format("woff2"),
       url("assets/fonts/Prime-Netframe-Regular.woff") format("woff");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg-base: #0a0a0f;
  --text: #e8e8ed;
  --text-2: #a0a0b0;
  --text-muted: #8a8a9c;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: #3a3a48;
  --glass: rgba(12, 12, 18, 0.58);
  --glass-border: rgba(255, 255, 255, 0.08);
  --purple: #8c00dd;
  --purple-light: #ab6fce;
  --blue: #56bbff;
  --grad-start: #ee36ff;
  --grad-end: #21c4ff;
  --accent: #6d28d9;
  --focus: #56bbff;
  --font-sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-display: "prime-netframe-regular", "Helvetica Neue", sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg-base);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
}

h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
.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; }

.page-bg {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 28px 16px;
  background: #140a2e url("assets/bg.png") center / cover no-repeat;
}
.page {
  width: 100%;
  max-width: 1080px;
  min-height: calc(100vh - 56px);
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.page > main { flex: 1; display: flex; flex-direction: column; justify-content: center; }

/* ---- Header ---- */
.hero { display: flex; flex-direction: column; align-items: center; gap: 12px; padding-top: 8px; text-align: center; }
.brand { display: flex; align-items: center; justify-content: center; gap: 12px; }
.brand-logo { width: 56px; height: 56px; display: block; flex-shrink: 0; }
.brand-name {
  font-family: var(--font-display);
  font-size: 2.1rem;
  font-weight: 700;
  line-height: 0.9;
  margin-top: 0.22em;
  white-space: nowrap;
}
.brand-netframe { color: var(--text); }
.brand-product {
  background: linear-gradient(135deg, var(--grad-start), var(--grad-end));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.lead { color: var(--text-2); font-weight: 300; font-size: 1.0625rem; }

/* ---- Product cards ---- */
.products { display: grid; grid-template-columns: 1fr; gap: 20px; }

.product {
  position: relative;
  display: flex; flex-direction: column; gap: 16px;
  padding: 28px 28px 26px;
  cursor: pointer;
  background: linear-gradient(160deg, rgba(171, 111, 206, 0.14), rgba(33, 196, 255, 0.04) 70%), var(--glass);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(171, 111, 206, 0.3);
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  transition: border-color 150ms, box-shadow 150ms;
}
.product::before {
  content: "";
  position: absolute; inset: 0 0 auto 0; height: 3px;
  border-radius: 12px 12px 0 0;
  background: linear-gradient(90deg, var(--grad-start), var(--grad-end));
}
.product:hover { border-color: rgba(238, 54, 255, 0.55); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45), 0 0 28px rgba(140, 0, 221, 0.3); }
.product:focus-within { border-color: rgba(86, 187, 255, 0.6); }

.product-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.product-logo { width: 44px; height: 44px; flex: none; }
.product-name { font-size: 1.5rem; font-weight: 500; line-height: 1.2; white-space: nowrap; }
.product-badge {
  margin-left: auto;
  font-size: 0.6875rem; letter-spacing: 0.06em; text-transform: uppercase;
  color: #c9a2ea; border: 1px solid rgba(171, 111, 206, 0.4); border-radius: 999px; padding: 2px 9px;
}
.product-tagline { color: var(--text); font-weight: 300; font-size: 1rem; line-height: 1.55; }
.product-tries-label {
  margin-top: 4px; padding-top: 16px; border-top: 1px solid var(--border);
  color: var(--text-muted); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase;
}
.product-tries { display: flex; flex-direction: column; gap: 9px; margin-top: -6px; flex: 1; }
.product-tries li {
  position: relative; padding-left: 28px;
  color: var(--text-2); font-size: 0.9375rem; line-height: 1.45;
}
.product-tries li::before {
  content: ""; position: absolute; left: 2px; top: 0.3em;
  width: 11px; height: 6px;
  border-left: 2px solid var(--purple-light); border-bottom: 2px solid var(--purple-light);
  transform: rotate(-45deg);
}
.product-go {
  appearance: none; font: inherit; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  align-self: flex-start; margin-top: 8px; padding: 12px 22px;
  font-size: 1rem; font-weight: 500; color: #fff; white-space: nowrap;
  background: var(--accent); border: 0; border-radius: 8px;
  transition: background-color 150ms;
}
.product-go svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform 150ms; }
.product:hover .product-go, .product-go:focus-visible { background: #7c3aed; }
.product:hover .product-go svg, .product-go:focus-visible svg { transform: translateX(3px); }
.product-go:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

/* ---- Facts strip ---- */
.facts {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px 20px;
  padding: 0 4px;
}
.facts li { display: flex; align-items: center; gap: 10px; color: var(--text-2); font-size: 0.875rem; line-height: 1.35; }
.facts svg { flex: none; width: 20px; height: 20px; fill: none; stroke: #c9a2ea; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* ---- Footer ---- */
.page-footer {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding-top: 16px; border-top: 1px solid var(--border);
}
.nd { font-size: 0.75rem; font-weight: 300; color: var(--text-muted); }
.reset-btn {
  appearance: none; font: inherit; font-size: 0.8125rem; cursor: pointer;
  color: var(--text-2); background: transparent;
  border: 1px solid var(--border-strong); border-radius: 6px; padding: 7px 12px;
  transition: color 150ms, border-color 150ms, background-color 150ms;
}
.reset-btn:hover { color: var(--text); border-color: #6b6b80; background: rgba(255, 255, 255, 0.05); }
.reset-btn:focus-visible, .btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* ---- Dialog ---- */
.dialog {
  width: min(420px, calc(100vw - 32px));
  padding: 0; color: var(--text);
  background: #14141d; border: 1px solid var(--border-strong); border-radius: 10px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6);
}
.dialog::backdrop { background: rgba(5, 3, 15, 0.65); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.dialog-body { padding: 22px 20px 18px; }
.dialog h2 { font-size: 1.125rem; font-weight: 500; margin-bottom: 8px; }
.dialog p { color: var(--text-2); font-size: 0.875rem; line-height: 1.55; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.btn { appearance: none; font: inherit; font-size: 0.875rem; cursor: pointer; border-radius: 6px; padding: 8px 14px; border: 1px solid transparent; }
.btn-quiet { color: var(--text-2); background: transparent; border-color: var(--border-strong); }
.btn-quiet:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.btn-danger { color: #fff; background: #b42318; }
.btn-danger:hover { background: #d1301f; }

/* ---- Toast ---- */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 20;
  max-width: calc(100vw - 32px);
  transform: translate(-50%, 16px); opacity: 0; pointer-events: none;
  padding: 10px 16px; font-size: 0.875rem; text-align: center;
  background: #14141d; border: 1px solid rgba(139, 220, 130, 0.45); border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  transition: opacity 200ms, transform 200ms;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.note { text-align: center; color: var(--text-2); }
.note a { color: var(--blue); }

/* ---- Wider screens ---- */
@media (min-width: 720px) {
  .page-bg { padding: 40px 32px; }
  .page { min-height: calc(100vh - 80px); gap: 32px; }
  .facts { grid-template-columns: repeat(4, auto); justify-content: space-between; }
}
@media (min-width: 960px) {
  .products.multi { grid-template-columns: 1fr 1fr; gap: 24px; }
}
@media (max-width: 380px) {
  .brand-name { font-size: 1.7rem; }
  .product { padding: 22px 18px 20px; }
  .product-name { font-size: 1.3rem; }
}
@media (max-height: 760px) and (min-width: 960px) {
  .page { gap: 20px; }
  .product { gap: 12px; padding: 22px 26px 22px; }
  .product-tries { gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* ---- Loading a product (combined site) ---- */
.loader { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px;
  background: rgba(6, 4, 16, 0.72); backdrop-filter: blur(6px); }
.loader[hidden] { display: none; }
.loader-card { width: min(420px, 100%); padding: 28px 26px 22px; border-radius: 16px; text-align: center;
  background: var(--glass); border: 1px solid var(--glass-border); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5); }
.loader-logo { display: block; margin: 0 auto 10px; animation: loader-pulse 1.6s ease-in-out infinite; }
.loader-card h2 { margin: 0 0 18px; font: 400 1.35rem/1.2 var(--font-display); color: var(--text); }
.loader-track { height: 8px; border-radius: 999px; overflow: hidden; background: rgba(255, 255, 255, 0.08); }
.loader-bar { height: 100%; width: 0; border-radius: inherit; transition: width 0.2s ease;
  background: linear-gradient(90deg, var(--grad-start), var(--grad-end)); }
.loader-text { margin: 12px 0 16px; color: var(--text-2); font-size: 0.88rem; }
@keyframes loader-pulse { 0%, 100% { opacity: 0.75; transform: scale(1); } 50% { opacity: 1; transform: scale(1.05); } }
@media (prefers-reduced-motion: reduce) { .loader-logo { animation: none; } .loader-bar { transition: none; } }
