/* DorxDesk — dorxdesk.net
 *
 * The palette is taken from the application's own Themes/Palette.xaml rather than invented
 * here, so the site and the product it is selling are the same colour. If the app's palette
 * moves, this is the file that has to move with it.
 *
 * Dark only, deliberately. DorxDesk's window is dark; a light landing page would be a
 * different product for the length of one click.
 */

:root {
  /* Surfaces — SurfaceBaseColor .. SurfacePressedColor */
  --surface-base: #0E1116;
  --surface-raised: #151A21;
  --surface-overlay: #1C222B;
  --surface-hover: #232A35;

  /* Lines — BorderSubtleBrush / BorderStrongBrush / DividerBrush */
  --border-subtle: #232A35;
  --border-strong: #323C4B;
  --divider: #1E242D;

  /* Text — TextPrimaryBrush .. TextDisabledBrush */
  --text-primary: #EEF2F7;
  --text-secondary: #A3AEBE;
  --text-tertiary: #74808F;

  /* Accent — AccentColor / AccentHoverBrush / AccentPressedBrush */
  --accent: #3D8BFD;
  --accent-hover: #579BFF;
  --accent-pressed: #2C71D6;

  /* Status — StatusOnline / Away / Offline */
  --online: #3FB950;
  --away: #D29922;
  --offline: #5A6472;

  --font-ui: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "Cascadia Mono", Consolas, "SF Mono", ui-monospace, monospace;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 22px;

  --shell: 1140px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ── Reset ──────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  /* The sticky header would otherwise cover the top of whatever was jumped to. */
  scroll-padding-top: 88px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--surface-base);
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { max-width: 100%; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.12; margin: 0; letter-spacing: -.022em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

a { color: inherit; }

/* ── Accessibility ──────────────────────────────────────────────────── */

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; top: -100px; left: 16px; z-index: 100;
  padding: 12px 18px; border-radius: var(--radius-md);
  background: var(--accent); color: #fff; font-weight: 600;
  text-decoration: none; transition: top .18s var(--ease);
}
.skip:focus { top: 16px; }

/* One visible focus treatment everywhere, and never removed without a replacement:
   keyboard users navigate this page with nothing else to go on. */
:focus-visible {
  outline: 2px solid var(--accent-hover);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ── Layout ─────────────────────────────────────────────────────────── */

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: 24px;
}

.section { padding-block: clamp(72px, 10vw, 128px); position: relative; }
.section-alt { background: linear-gradient(180deg, transparent, rgba(21, 26, 33, .55) 18% 82%, transparent); }

.section-head { max-width: 640px; margin-bottom: clamp(40px, 5vw, 64px); }
.section-head h2 { font-size: clamp(30px, 4.2vw, 44px); margin-bottom: 16px; }
.section-lede { color: var(--text-secondary); font-size: clamp(16px, 1.6vw, 18px); }

/* ── Ambient background ─────────────────────────────────────────────── */

/* Two soft pools of accent light. Fixed rather than scrolling, so the page moves over the
   light instead of dragging it along — much cheaper than a parallax and steadier to look at. */
.aurora {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(680px 460px at 18% -6%, rgba(61, 139, 253, .16), transparent 68%),
    radial-gradient(560px 420px at 88% 6%, rgba(87, 155, 255, .10), transparent 66%),
    radial-gradient(900px 600px at 50% 108%, rgba(61, 139, 253, .07), transparent 72%);
}

body > *:not(.aurora) { position: relative; z-index: 1; }

/* ── Header ─────────────────────────────────────────────────────────── */

.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  background: rgba(14, 17, 22, .72);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background .3s var(--ease);
}
.site-header.scrolled {
  border-bottom-color: var(--border-subtle);
  background: rgba(14, 17, 22, .88);
}

.header-inner { display: flex; align-items: center; gap: 24px; height: 68px; }

.brand {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--text-primary);
  font-family: var(--font-display); font-weight: 650; font-size: 17px;
  letter-spacing: -.01em;
}
.brand-mark { width: 26px; height: 26px; color: var(--accent); flex: none; }
.brand:hover .brand-mark { color: var(--accent-hover); }

.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a {
  padding: 8px 14px; border-radius: var(--radius-sm);
  color: var(--text-secondary); text-decoration: none; font-size: 14.5px; font-weight: 500;
  transition: color .2s var(--ease), background .2s var(--ease);
}
.nav a:hover { color: var(--text-primary); background: var(--surface-hover); }

.header-cta { flex: none; }

/* ── Buttons ────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  border: 1px solid transparent; border-radius: var(--radius-md);
  font-family: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
  transition: transform .18s var(--ease), background .2s var(--ease),
              border-color .2s var(--ease), box-shadow .25s var(--ease), color .2s var(--ease);
  white-space: nowrap;
}
.btn-sm { padding: 8px 16px; font-size: 14px; }
.btn-lg { padding: 14px 26px; font-size: 16px; }
.btn-icon { width: 19px; height: 19px; flex: none; }

.btn-primary {
  background: linear-gradient(180deg, var(--accent-hover), var(--accent));
  color: #fff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .14) inset, 0 8px 26px -10px rgba(61, 139, 253, .75);
}
.btn-primary:hover {
  background: linear-gradient(180deg, #6BA9FF, var(--accent-hover));
  transform: translateY(-1px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .18) inset, 0 14px 34px -12px rgba(61, 139, 253, .9);
}
.btn-primary:active { transform: translateY(0); background: var(--accent-pressed); }

.btn-ghost {
  background: rgba(255, 255, 255, .03);
  border-color: var(--border-strong);
  color: var(--text-primary);
}
.btn-ghost:hover { background: var(--surface-hover); border-color: #3E4A5C; transform: translateY(-1px); }
.btn-ghost:active { transform: translateY(0); }

/* ── Hero ───────────────────────────────────────────────────────────── */

.hero { padding-block: clamp(56px, 8vw, 104px) clamp(48px, 7vw, 88px); }

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(40px, 5vw, 72px);
  align-items: center;
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 6px 14px 6px 11px; margin-bottom: 24px;
  border: 1px solid var(--border-subtle); border-radius: 999px;
  background: rgba(255, 255, 255, .022);
  color: var(--text-secondary);
  font-size: 13px; font-weight: 550; letter-spacing: .012em;
}
.eyebrow .dot {
  width: 7px; height: 7px; border-radius: 50%; flex: none;
  background: var(--online); box-shadow: 0 0 0 3px rgba(63, 185, 80, .16);
}

h1 { font-size: clamp(42px, 6.4vw, 68px); font-weight: 700; margin-bottom: 22px; }

.grad {
  background: linear-gradient(105deg, #EEF2F7 8%, #9CC4FF 46%, var(--accent) 96%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

.lede {
  color: var(--text-secondary);
  font-size: clamp(16.5px, 1.85vw, 19px);
  max-width: 34em; margin-bottom: 34px;
}

.cta-row { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 22px; }

.meta { color: var(--text-tertiary); font-size: 14px; }

/* ── Hero illustration ──────────────────────────────────────────────── */

.hero-art { position: relative; }

.glow {
  position: absolute; inset: -14% -8% -18%;
  background: radial-gradient(closest-side, rgba(61, 139, 253, .3), transparent 72%);
  filter: blur(38px);
  pointer-events: none;
}

.window {
  position: relative;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  background: linear-gradient(168deg, rgba(28, 34, 43, .96), rgba(14, 17, 22, .97));
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .85), 0 0 0 1px rgba(255, 255, 255, .03) inset;
  overflow: hidden;
}

.titlebar {
  display: flex; align-items: center; gap: 7px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--divider);
  background: rgba(255, 255, 255, .018);
}
.tl-dot { width: 10px; height: 10px; border-radius: 50%; background: #333C49; }
.tl-dot:first-child { background: #3E4756; }
.tl-title {
  margin-left: 10px; color: var(--text-tertiary);
  font-size: 12.5px; font-weight: 550; letter-spacing: .02em;
}

.window-body { display: grid; grid-template-columns: 176px minmax(0, 1fr); min-height: 296px; }

.panel { padding: 16px 14px; border-right: 1px solid var(--divider); }
.panel-label {
  color: var(--text-tertiary); font-size: 10.5px; font-weight: 650;
  letter-spacing: .1em; text-transform: uppercase; margin-bottom: 12px;
}

.device-list li {
  display: grid; grid-template-columns: 8px minmax(0, 1fr); gap: 4px 9px;
  align-items: center; padding: 8px 9px; margin-bottom: 4px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .022);
}
.device-list li:first-child { background: rgba(61, 139, 253, .11); box-shadow: inset 0 0 0 1px rgba(61, 139, 253, .22); }

.status { width: 8px; height: 8px; border-radius: 50%; background: var(--offline); }
.status.online { background: var(--online); }
.status.away { background: var(--away); }
.status.offline { background: var(--offline); }

.d-name { font-size: 12.5px; font-weight: 550; color: var(--text-primary); }
.d-id {
  grid-column: 2; font-family: var(--font-mono);
  font-size: 10.5px; color: var(--text-tertiary); letter-spacing: .02em;
}

.stage { display: flex; flex-direction: column; }

.stage-bar {
  display: flex; flex-wrap: wrap; gap: 7px;
  padding: 12px 14px; border-bottom: 1px solid var(--divider);
}
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 11px; border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, .022);
  font-size: 11.5px; font-weight: 550; color: var(--text-secondary);
}
.pill-live { border-color: rgba(63, 185, 80, .3); color: #94D9A2; background: rgba(63, 185, 80, .09); }

.stage-canvas {
  position: relative; flex: 1;
  padding: 18px 16px;
  background:
    radial-gradient(520px 220px at 62% 0%, rgba(61, 139, 253, .1), transparent 70%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .017) 0 1px, transparent 1px 34px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .017) 0 1px, transparent 1px 34px);
  overflow: hidden;
  display: flex; align-items: flex-end;
}

/* A slow sweep, standing in for a live picture without pretending to be one. */
.scan {
  position: absolute; inset-inline: 0; top: 0; height: 130px;
  background: linear-gradient(180deg, rgba(61, 139, 253, .16), transparent);
  animation: sweep 7s var(--ease) infinite;
}
@keyframes sweep {
  0%, 100% { transform: translateY(-100%); opacity: 0; }
  40%      { opacity: 1; }
  70%      { transform: translateY(300px); opacity: 0; }
}

.transfer {
  position: relative; width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--border-subtle); border-radius: var(--radius-md);
  background: rgba(14, 17, 22, .82);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.t-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.t-name {
  font-size: 12px; color: var(--text-secondary);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.t-pct { font-family: var(--font-mono); font-size: 11px; color: var(--text-tertiary); }
.t-bar {
  height: 4px; margin: 7px 0 12px;
  border-radius: 999px; background: rgba(255, 255, 255, .07); overflow: hidden;
}
.t-bar:last-child { margin-bottom: 0; }
.t-bar i {
  display: block; height: 100%; border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-hover));
}

/* ── Cards ──────────────────────────────────────────────────────────── */

.grid { display: grid; gap: 18px; }
.features { grid-template-columns: repeat(auto-fit, minmax(276px, 1fr)); }
.steps { grid-template-columns: repeat(auto-fit, minmax(276px, 1fr)); }

.card {
  position: relative;
  padding: 26px 24px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  background: linear-gradient(168deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, .012));
  transition: transform .3s var(--ease), border-color .3s var(--ease), background .3s var(--ease);
}
.card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  background: linear-gradient(168deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .018));
}
.card h3 { font-size: 17.5px; font-weight: 620; margin-bottom: 9px; }
.card p { color: var(--text-secondary); font-size: 14.8px; line-height: 1.62; }

.ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; margin-bottom: 17px;
  border: 1px solid rgba(61, 139, 253, .26);
  border-radius: var(--radius-md);
  background: linear-gradient(160deg, rgba(61, 139, 253, .18), rgba(61, 139, 253, .05));
  color: #8FBBFF;
}
.ico svg {
  width: 21px; height: 21px;
  fill: none; stroke: currentColor; stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round;
}

.step { padding-top: 30px; }
.step-n {
  position: absolute; top: 22px; right: 24px;
  font-family: var(--font-display); font-size: 40px; font-weight: 700;
  line-height: 1; color: rgba(61, 139, 253, .16);
}

/* ── Download ───────────────────────────────────────────────────────── */

.download-card {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(32px, 4vw, 56px);
  padding: clamp(30px, 4vw, 52px);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(700px 320px at 8% 0%, rgba(61, 139, 253, .12), transparent 66%),
    linear-gradient(168deg, rgba(28, 34, 43, .9), rgba(14, 17, 22, .94));
  box-shadow: 0 34px 80px -34px rgba(0, 0, 0, .8);
}

.dl-main h2 { font-size: clamp(28px, 3.6vw, 40px); margin-bottom: 14px; }
.dl-main .section-lede { margin-bottom: 28px; }

.dl-facts { display: grid; gap: 10px; margin: 30px 0 0; }
.dl-facts > div { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.dl-facts dt { color: var(--text-tertiary); font-size: 13px; min-width: 104px; }
.dl-facts dd { margin: 0; font-size: 14px; color: var(--text-secondary); }

.dl-verify {
  padding: 24px;
  border: 1px solid var(--border-subtle); border-radius: var(--radius-lg);
  background: rgba(14, 17, 22, .6);
}
.dl-verify h3 { font-size: 16px; margin-bottom: 10px; }
.dl-verify p { color: var(--text-secondary); font-size: 14px; margin-bottom: 14px; }

.code {
  margin: 0 0 20px; padding: 12px 14px;
  border: 1px solid var(--divider); border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, .34);
  overflow-x: auto;
}
.code code { font-family: var(--font-mono); font-size: 12.5px; color: #B9C6D8; white-space: pre; }

.hash-label {
  color: var(--text-tertiary); font-size: 10.5px; font-weight: 650;
  letter-spacing: .1em; text-transform: uppercase; margin-bottom: 8px;
}
.hash-row { display: flex; gap: 10px; align-items: flex-start; }
.hash {
  flex: 1; min-width: 0;
  padding: 11px 13px;
  border: 1px solid var(--divider); border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, .34);
  font-family: var(--font-mono); font-size: 11.5px; line-height: 1.6;
  color: #B9C6D8; word-break: break-all;
}
.copy { flex: none; align-self: stretch; }

.fineprint { color: var(--text-tertiary); font-size: 12.8px; margin-top: 16px; line-height: 1.6; }

/* ── Footer ─────────────────────────────────────────────────────────── */

.site-footer { border-top: 1px solid var(--divider); padding-block: 36px 44px; }
.footer-inner {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 18px 32px;
}
.footer-brand {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-display); font-weight: 620; font-size: 15px;
}
.footer-brand .brand-mark { width: 21px; height: 21px; color: var(--text-tertiary); }

.footer-nav { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-nav a {
  color: var(--text-tertiary); text-decoration: none; font-size: 14px;
  transition: color .2s var(--ease);
}
.footer-nav a:hover { color: var(--text-secondary); }

/* Kept quiet on purpose: an attribution reads as confidence when it is small and as a
   billboard when it is not. */
.attribution {
  margin-left: auto;
  color: var(--text-tertiary);
  font-size: 13.5px;
}
.attribution a {
  color: var(--text-secondary);
  text-decoration: none;
  border-bottom: 1px solid rgba(163, 174, 190, .28);
  padding-bottom: 1px;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.attribution a:hover { color: var(--accent-hover); border-bottom-color: var(--accent); }

/* ── Entrance animation ─────────────────────────────────────────────── */

/* The initial state is applied by script, not by this rule. With no JavaScript the
   elements are simply visible, rather than permanently transparent — a page whose
   content depends on an IntersectionObserver having run is a page that fails closed. */
.js .reveal { opacity: 0; transform: translateY(18px); }
.js .reveal.in {
  opacity: 1; transform: none;
  transition: opacity .68s var(--ease), transform .68s var(--ease);
}

/* Utilities. Deliberately few, and used instead of style attributes on elements so the
   Content-Security-Policy can refuse inline styles outright rather than allowing them for
   the sake of four declarations. */
.w100 { width: 100%; }
.w62 { width: 62%; }
.push-right { margin-left: auto; }
.cta-center { justify-content: center; }

/* ── 404 ────────────────────────────────────────────────────────────── */

.notfound {
  min-height: 72vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 20px;
  padding-block: 80px;
}
.notfound .code-big {
  font-family: var(--font-display); font-size: clamp(76px, 15vw, 132px);
  font-weight: 700; line-height: 1; letter-spacing: -.04em;
}
.notfound p { color: var(--text-secondary); max-width: 44ch; }

/* ── Responsive ─────────────────────────────────────────────────────── */

@media (max-width: 940px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-art { order: -1; max-width: 560px; }
  .download-card { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  html { scroll-padding-top: 76px; }
  .nav { display: none; }
  .header-inner { height: 60px; }
  .window-body { grid-template-columns: 1fr; }
  .panel { border-right: 0; border-bottom: 1px solid var(--divider); }
  .device-list { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
  .device-list li { margin-bottom: 0; }
  .cta-row .btn { width: 100%; }
  .attribution { margin-left: 0; width: 100%; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 420px) {
  .shell { padding-inline: 18px; }
  .device-list { grid-template-columns: 1fr; }
}

/* ── Reduced motion ─────────────────────────────────────────────────── */

/* Everything decorative stops. The sweep and the reveal are the two things on this page
   that move on their own, and neither carries information. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }

  .scan { display: none; }
  .js .reveal { opacity: 1; transform: none; }
  .btn:hover, .card:hover { transform: none; }
}

/* ── Print ──────────────────────────────────────────────────────────── */

@media print {
  .aurora, .site-header, .hero-art, .scan { display: none; }
  body { background: #fff; color: #000; }
}
