/* UnityLAN landing page.
   Dark-first, matching the desktop app; light mode follows the OS. No build step, no webfonts —
   the system UI stack renders the same shapes the app uses on each platform. */

:root {
  --brand: #5865f2;
  --brand-lit: #7b86ff;
  --green: #2fae7c;

  --bg: #0c0e13;
  --bg-alt: #101319;
  --card: #151923;
  --card-hi: #1a1f2b;
  --line: rgba(255, 255, 255, 0.09);
  --line-hi: rgba(255, 255, 255, 0.16);
  --text: #e7eaf1;
  --muted: #98a1b4;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 32px -12px rgba(0, 0, 0, .65);

  --wrap: 1080px;
  --radius: 14px;
  --step: clamp(1rem, .82rem + .9vw, 1.125rem);

  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #ffffff;
    --bg-alt: #f6f7fb;
    --card: #ffffff;
    --card-hi: #ffffff;
    --line: rgba(16, 22, 43, 0.11);
    --line-hi: rgba(16, 22, 43, 0.2);
    --text: #11141c;
    --muted: #59617a;
    --shadow: 0 1px 2px rgba(16, 22, 43, .06), 0 12px 32px -14px rgba(16, 22, 43, .22);
    color-scheme: light;
  }
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 var(--step)/1.65 ui-sans-serif, system-ui, -apple-system, "Segoe UI Variable Text",
        "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--brand-lit); text-decoration-color: color-mix(in srgb, var(--brand-lit) 40%, transparent); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
@media (prefers-color-scheme: light) { a { color: var(--brand); } }

code, pre {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
}
:not(pre) > code {
  font-size: .88em;
  background: color-mix(in srgb, var(--brand) 12%, transparent);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: .1em .38em;
}

:where(a, button, [tabindex]):focus-visible {
  outline: 2px solid var(--brand-lit);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip {
  position: absolute; left: -9999px;
  background: var(--card); color: var(--text);
  padding: .7rem 1rem; border-radius: 8px; border: 1px solid var(--line-hi); z-index: 100;
}
.skip:focus { left: 1rem; top: 1rem; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.narrow { --wrap: 760px; }

/* ---------- nav ---------- */

.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; gap: 1.5rem; height: 62px; }
.brand { display: flex; align-items: center; flex-shrink: 0; }
.brand img { width: 150px; height: auto; }
.nav-links { display: flex; gap: 1.6rem; margin-left: auto; font-size: .94rem; }
.nav-links a { color: var(--muted); text-decoration: none; }
.nav-links a:hover { color: var(--text); }

@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav-inner { justify-content: space-between; }
}

/* ---------- buttons ---------- */

.btn {
  --btn-bg: transparent;
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .68rem 1.25rem;
  border-radius: 10px;
  border: 1px solid var(--line-hi);
  background: var(--btn-bg);
  color: var(--text);
  font-size: .95rem; font-weight: 600; line-height: 1;
  text-decoration: none; white-space: nowrap;
  transition: transform .12s ease, background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-sm { padding: .5rem .9rem; font-size: .875rem; }

.btn-primary {
  --btn-bg: var(--brand);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .18) inset, 0 8px 22px -10px var(--brand);
}
.btn-primary:hover { --btn-bg: var(--brand-lit); }

.btn-ghost { background: color-mix(in srgb, var(--text) 5%, transparent); }
.btn-ghost:hover { border-color: var(--line-hi); background: color-mix(in srgb, var(--text) 9%, transparent); }

/* ---------- hero ---------- */

.hero { position: relative; overflow: hidden; padding: clamp(3.5rem, 8vw, 6.5rem) 0 clamp(2rem, 5vw, 3.5rem); }
.hero-inner { position: relative; text-align: center; }

/* Backdrop: a soft two-colour glow over a fading grid — the "mesh" without an image file. */
.mesh {
  position: absolute; inset: 0 0 auto; height: 760px; pointer-events: none;
  background:
    radial-gradient(42rem 26rem at 22% 6%, color-mix(in srgb, var(--brand) 26%, transparent), transparent 62%),
    radial-gradient(34rem 22rem at 82% 16%, color-mix(in srgb, var(--green) 18%, transparent), transparent 62%);
  filter: blur(6px);
  opacity: .75;
  -webkit-mask-image: linear-gradient(#000 58%, transparent);
  mask-image: linear-gradient(#000 58%, transparent);
}
.mesh::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(closest-side at 50% 26%, #000, transparent);
}
/* On white the same glow reads as barely-there, so light mode gets a stronger mix, not a weaker
   one — the grid does the structural work and the colour just tints it. */
@media (prefers-color-scheme: light) {
  .mesh {
    opacity: .9;
    background:
      radial-gradient(44rem 28rem at 20% 4%, color-mix(in srgb, var(--brand) 30%, transparent), transparent 60%),
      radial-gradient(36rem 24rem at 84% 14%, color-mix(in srgb, var(--green) 24%, transparent), transparent 60%);
  }
  .mesh::after {
    background-image:
      linear-gradient(rgba(16, 22, 43, .07) 1px, transparent 1px),
      linear-gradient(90deg, rgba(16, 22, 43, .07) 1px, transparent 1px);
  }
}

.eyebrow {
  display: inline-flex; align-items: center; gap: .55rem;
  margin: 0 0 1.4rem;
  padding: .34rem .85rem;
  border: 1px solid var(--line-hi); border-radius: 999px;
  background: color-mix(in srgb, var(--card) 70%, transparent);
  color: var(--muted); font-size: .84rem; letter-spacing: .01em;
}
.dot {
  width: .5rem; height: .5rem; border-radius: 50%; background: var(--green);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 22%, transparent);
}

h1 {
  margin: 0 0 1.2rem;
  font-size: clamp(2.15rem, 1.2rem + 3.9vw, 3.85rem);
  line-height: 1.08;
  letter-spacing: -.028em;
  font-weight: 700;
}
.lede {
  max-width: 46rem; margin: 0 auto 2.2rem;
  color: var(--muted);
  font-size: clamp(1.02rem, .95rem + .38vw, 1.2rem);
}
.cta { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; margin: 0 0 3rem; }

/* A game's "add a server" dialog, drawn in this page's own visual language rather than mimicking any
   particular game's chrome — the point is the *address*, and a convincing fake of someone else's UI
   would be both a licensing question and a worse illustration. Non-interactive by construction: no
   inputs or buttons, so nothing here takes focus or looks clickable. */
/* The two hero illustrations answer different questions — "what do my friends type?" and "what does
   the app show me?" — so they sit side by side once there's room, and stack on a phone. Stacked in a
   single narrow column they read as one cramped run. */
.hero-demos {
  display: grid; gap: clamp(2.5rem, 5vw, 4rem);
  justify-items: center; align-items: center;
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
}
@media (min-width: 900px) {
  /* Centred, not top-aligned: the dialog is much shorter than the app window, and hanging it from
     the top leaves an obvious hole under it. */
  .hero-demos { grid-template-columns: auto auto; justify-content: center; align-items: center; }
}

.demo { margin: 0; max-width: 25rem; }
.dialog {
  padding: 1.6rem 1.7rem 1.7rem;
  border: 1px solid var(--line-hi); border-radius: 12px;
  background: var(--card); box-shadow: var(--shadow);
  text-align: left;
}
.dialog-title {
  margin: 0 0 1.1rem;
  font-size: 1rem; font-weight: 650;
}
.field-label {
  margin: 0 0 .35rem;
  color: var(--muted); font-size: .78rem;
  letter-spacing: .05em; text-transform: uppercase;
}
.field {
  margin: 0 0 1.1rem;
  padding: .6rem .75rem;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--bg);
  font-size: .92rem;
}
/* The one line the whole hero exists to show. */
.field.addr {
  margin-bottom: 1.4rem;
  border-color: color-mix(in srgb, var(--brand) 55%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 12%, transparent);
  font-family: ui-monospace, SFMono-Regular, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  font-size: .88rem;
}
.dialog-actions { display: flex; gap: .6rem; justify-content: flex-end; margin: 0; }
.fake-btn {
  padding: .45rem 1rem;
  border: 1px solid var(--line-hi); border-radius: 8px;
  font-size: .85rem; font-weight: 600;
}
.fake-btn.primary { background: var(--brand); border-color: transparent; color: #fff; }
.demo figcaption {
  margin: 1.1rem auto 0; max-width: 30rem;
  color: var(--muted); font-size: .9rem;
}
.cur {
  display: inline-block; width: .45em; height: 1.05em; margin-left: 1px;
  vertical-align: text-bottom;
  background: var(--brand-lit); animation: blink 1.15s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* The headline's hand-placed break only helps once both halves fit on one line each. */
@media (max-width: 700px) {
  .wide-only { display: none; }
  .field.addr { font-size: .8rem; }
}

.hero-shot { margin: 0; }
.hero-shot img { width: min(400px, 100%); margin-inline: auto; }
.hero-shot figcaption { margin-top: 1.1rem; max-width: 26rem; margin-inline: auto; }

/* ---------- strip ---------- */

.strip { border-block: 1px solid var(--line); background: var(--bg-alt); }
.strip-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px 0;
  padding: 0;
}
.strip-grid > div {
  display: flex; flex-direction: column; gap: .2rem;
  padding: 1.5rem 1.4rem;
  border-left: 1px solid var(--line);
}
.strip-grid > div:first-child { border-left: 0; padding-left: 0; }
.strip-grid strong { font-size: .98rem; }
.strip-grid span { color: var(--muted); font-size: .87rem; line-height: 1.5; }
@media (max-width: 860px) {
  .strip-grid { grid-template-columns: repeat(2, 1fr); }
  .strip-grid > div:nth-child(odd) { border-left: 0; padding-left: 0; }
  .strip-grid > div:nth-child(n+3) { border-top: 1px solid var(--line); }
}

/* ---------- sections ---------- */

.sec { padding: clamp(3.5rem, 7vw, 6rem) 0; }
.sec.alt { background: var(--bg-alt); border-block: 1px solid var(--line); }

h2 {
  margin: 0 0 .6rem;
  font-size: clamp(1.6rem, 1.2rem + 1.5vw, 2.3rem);
  line-height: 1.15; letter-spacing: -.02em; font-weight: 700;
}
h3 { margin: 0 0 .45rem; font-size: 1.06rem; font-weight: 650; letter-spacing: -.008em; }
.kicker {
  margin: 0 0 .5rem;
  color: var(--brand-lit); font-size: .82rem; font-weight: 650;
  letter-spacing: .09em; text-transform: uppercase;
}
.sub { margin: 0 0 2.4rem; color: var(--muted); max-width: 46rem; }
.sec > .wrap > h2 { margin-bottom: 2rem; }
.sec > .wrap > h2 + .sub { margin-top: -1.6rem; }

.aside {
  margin: 2.4rem 0 0;
  padding-left: 1.1rem;
  border-left: 2px solid color-mix(in srgb, var(--brand) 55%, transparent);
  color: var(--muted);
  font-size: .96rem;
}

/* ---------- cards ---------- */

.cards {
  display: grid; gap: 1.1rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.card {
  padding: 1.5rem;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card);
  transition: border-color .15s ease, transform .15s ease;
}
.card:hover { border-color: var(--line-hi); transform: translateY(-2px); }
.card p { margin: 0; color: var(--muted); font-size: .95rem; }
.card p + p, .card pre + p, .card p + pre { margin-top: .9rem; }
.card.accent { border-color: color-mix(in srgb, var(--green) 45%, transparent); }
.card.accent h3::before {
  content: ""; display: inline-block; vertical-align: middle;
  width: .5rem; height: .5rem; margin-right: .5rem; border-radius: 50%;
  background: var(--green);
}
.cards.install .card { display: flex; flex-direction: column; }
.card pre {
  margin: .9rem 0 0;
  padding: .75rem .85rem;
  border: 1px solid var(--line); border-radius: 9px;
  background: var(--bg);
  font-size: .82rem; line-height: 1.6;
  /* Three cards on one row leaves ~40 characters; wrap rather than clip, since a horizontally
     cut-off command reads as a broken page. */
  white-space: pre-wrap;
  overflow-wrap: break-word;
}
.dl { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: auto !important; padding-top: 1.1rem; }

/* ---------- get-started lanes ---------- */

.lanes {
  display: grid; gap: 1.1rem;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}
.lane { display: flex; flex-direction: column; padding: 1.9rem; }
.lane h3 { font-size: 1.35rem; letter-spacing: -.015em; margin-bottom: .6rem; }
.lane .kicker { margin-bottom: .35rem; }
.lane .steps { margin-bottom: 1.9rem; }
.lane .steps > li { color: var(--muted); font-size: .95rem; }
/* Push each lane's buttons to the same baseline even when the copy above differs in length. */
.lane .cta { justify-content: flex-start; margin: auto 0 0; }

/* ---------- steps ---------- */

.steps { counter-reset: s; list-style: none; margin: 0; padding: 0; display: grid; gap: 1.6rem; }
.steps > li { position: relative; padding-left: 3.1rem; }
.steps > li::before {
  counter-increment: s; content: counter(s);
  position: absolute; left: 0; top: -.1rem;
  display: grid; place-items: center;
  width: 2.1rem; height: 2.1rem;
  border: 1px solid var(--line-hi); border-radius: 50%;
  background: var(--card);
  color: var(--brand-lit); font-size: .9rem; font-weight: 650;
}
.steps > li:not(:last-child)::after {
  content: ""; position: absolute; left: 1.05rem; top: 2.4rem; bottom: -1.6rem;
  width: 1px; background: var(--line);
}
.steps p { margin: 0; color: var(--muted); font-size: .95rem; }
.steps.compact { gap: .85rem; margin-top: 1.6rem; }
.steps.compact > li { padding-left: 2.6rem; padding-top: .1rem; }
.steps.compact > li::before { width: 1.75rem; height: 1.75rem; font-size: .8rem; top: 0; }
.steps.compact > li:not(:last-child)::after { left: .87rem; top: 2rem; bottom: -.85rem; }

/* ---------- two-column ---------- */

.two-col {
  display: grid; gap: clamp(2rem, 5vw, 3.5rem);
  grid-template-columns: 1.05fr .95fr;
  align-items: center;
}
.two-col p { color: var(--muted); }
.two-col h2 { margin-bottom: 1rem; }
.two-col .cta { justify-content: flex-start; margin: 1.8rem 0 0; }
.two-col.flip > figure { order: -1; }
@media (max-width: 820px) {
  .two-col { grid-template-columns: 1fr; }
  .two-col.flip > figure { order: 0; }
}

/* ---------- screenshots ---------- */

.shot { margin: 0; }
.shot img {
  border: 1px solid var(--line-hi);
  border-radius: 12px;
  box-shadow: var(--shadow);
  margin-inline: auto;
}
.shot figcaption {
  margin-top: .9rem; text-align: center;
  color: var(--muted); font-size: .88rem;
}
.shot.wide { margin-top: 2.5rem; }
.shot.wide img { width: min(360px, 100%); }

/* ---------- comparison table ---------- */

/* The table is wider than a phone; it scrolls inside this box so the page body never does. */
.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card);
  -webkit-overflow-scrolling: touch;
}
.cmp { border-collapse: collapse; width: 100%; min-width: 720px; font-size: .92rem; }
.cmp th, .cmp td { padding: .95rem 1.1rem; text-align: left; vertical-align: top; }
.cmp thead th {
  border-bottom: 1px solid var(--line-hi);
  color: var(--muted); font-size: .8rem; font-weight: 650;
  letter-spacing: .06em; text-transform: uppercase; white-space: nowrap;
}
.cmp tbody tr + tr { border-top: 1px solid var(--line); }
.cmp tbody th { font-weight: 650; white-space: nowrap; }
.cmp td { color: var(--muted); }
/* Our own row is the reference point, not a winner's podium — tinted, not shouting. */
.cmp tr.us { background: color-mix(in srgb, var(--brand) 9%, transparent); }
.cmp tr.us th { color: var(--brand-lit); }
.cmp tr.us td { color: var(--text); }
@media (prefers-color-scheme: light) { .cmp tr.us th { color: var(--brand); } }

.fineprint { margin: 1.6rem 0 0; color: var(--muted); font-size: .84rem; opacity: .85; }

/* Only worth saying when the table is actually clipped — above the min-width it all fits. */
.table-hint { display: none; }
@media (max-width: 800px) {
  .table-hint {
    display: block; margin: .7rem 0 0;
    color: var(--muted); font-size: .82rem;
  }
}

/* ---------- caveats ---------- */

.caveats { margin: 0; }
.caveats dt { font-weight: 650; margin-top: 1.5rem; }
.caveats dt:first-child { margin-top: 0; }
.caveats dd { margin: .35rem 0 0; color: var(--muted); font-size: .96rem; }

/* ---------- docs list ---------- */

.docs { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; }
.kicker.spaced { margin-top: 2.2rem; }
.docs a {
  display: flex; flex-direction: column; gap: .18rem;
  padding: 1.05rem 1.25rem;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card);
  color: var(--text); text-decoration: none;
  transition: border-color .15s ease, transform .15s ease;
}
.docs a:hover { border-color: var(--line-hi); transform: translateX(2px); }
.docs span { color: var(--muted); font-size: .9rem; }

/* ---------- footer ---------- */

/* ---------- FAQ ---------- */

.faq { display: grid; gap: .7rem; }
.faq details {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card);
  transition: border-color .15s ease;
}
.faq details[open], .faq details:hover { border-color: var(--line-hi); }
.faq summary {
  display: flex; align-items: center; gap: .8rem;
  padding: 1.05rem 1.25rem;
  font-weight: 650; cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
/* Own chevron rather than the platform triangle, so it matches on every OS. */
.faq summary::before {
  content: ""; flex: none;
  width: .5rem; height: .5rem;
  border-right: 2px solid var(--brand-lit); border-bottom: 2px solid var(--brand-lit);
  transform: rotate(-45deg); transform-origin: 60% 60%;
  transition: transform .15s ease;
}
.faq details[open] summary::before { transform: rotate(45deg); }
.faq summary:focus-visible { outline-offset: -2px; }
.faq p {
  margin: 0 1.25rem 1.15rem 2.55rem;
  color: var(--muted); font-size: .95rem;
}
.faq p + p { margin-top: .8rem; }

/* Plain background: `docs` above it is an `alt` section, so matching it would merge the two. */
.foot { border-top: 1px solid var(--line); background: var(--bg); padding: 3rem 0 3.5rem; }
.foot-inner { display: grid; gap: 2rem; grid-template-columns: 1.2fr 1fr; align-items: start; }
.foot-brand { display: flex; gap: 1rem; align-items: flex-start; }
.foot-brand p { margin: 0; color: var(--muted); font-size: .92rem; max-width: 34rem; }
.disclaimer { margin-top: .7rem !important; font-size: .82rem !important; opacity: .8; }
.foot-links { display: grid; grid-template-columns: repeat(2, auto); gap: .55rem 2rem; justify-content: start; font-size: .92rem; }
.foot-links a { color: var(--muted); text-decoration: none; }
.foot-links a:hover { color: var(--text); }
@media (max-width: 720px) {
  .foot-inner { grid-template-columns: 1fr; }
}
