/* FreeX website – single stylesheet, no external requests.
   Colours follow FreeX Web: dark ink surfaces and the red-to-amber brand gradient. */

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("../fonts/manrope.woff2") format("woff2");
}

:root {
  --ink: #121821;
  --ink-2: #0e131a;
  --surface: #1b2430;
  --raised: #243042;
  --line: #2e3b4e;
  --text: #e8edf2;
  --muted: #9aa6b6;
  --red: #d93b42;
  --orange: #e98a46;
  --amber: #f4b75c;
  --glass: #f0974a;
  --grad: linear-gradient(120deg, var(--red) 0%, #e2603f 30%, var(--orange) 60%, var(--amber) 100%);

  --radius-window: 16px;
  --radius-card: 14px;
  --radius-control: 999px;
  --wrap: 1200px;
  --gutter: clamp(20px, 4vw, 48px);

  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 100%;
  color: var(--text);
  background: var(--ink);
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
}

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

body {
  margin: 0;
  font-size: 1.0625rem;
  line-height: 1.6;
  background: var(--ink);
}

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

a { color: var(--amber); text-underline-offset: 0.18em; }
a:hover { color: #ffd08a; }

:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 3px;
  border-radius: 6px;
}

h1, h2, h3, h4 { margin: 0; line-height: 1.12; }
p { margin: 0; }
code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: rgb(255 255 255 / 0.06);
  padding: 0.1em 0.35em;
  border-radius: 6px;
}

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  background: var(--amber);
  color: var(--ink);
  padding: 10px 16px;
  border-radius: 10px;
  z-index: 10;
}
.skip:focus { top: 12px; }

.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Header ---------- */

.top {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgb(18 24 33 / 0.72);
  backdrop-filter: saturate(1.6) blur(18px);
  -webkit-backdrop-filter: saturate(1.6) blur(18px);
  border-bottom: 1px solid rgb(46 59 78 / 0.6);
}

.top__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 66px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 750;
  font-size: 1.3rem;
  letter-spacing: -0.01em;
  color: var(--glass);
}
.brand:hover { color: var(--amber); }

.top__end { display: flex; align-items: center; gap: 12px; }

.nav { display: flex; align-items: center; gap: 2px; }
.nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--radius-control);
}
.nav a:hover { color: var(--text); background: rgb(255 255 255 / 0.06); }
.nav .nav__cta {
  color: #2a1306;
  background: var(--grad);
  margin-left: 8px;
}
.nav .nav__cta:hover { color: #2a1306; filter: brightness(1.08); background: var(--grad); }

@media (max-width: 820px) {
  .nav a:not(.nav__cta) { display: none; }
}

/* DE / EN switcher */
.lang {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}
.lang a {
  min-width: 38px;
  padding: 4px 9px;
  border-radius: 999px;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--muted);
  text-decoration: none;
}
.lang a:hover { color: var(--text); }
.lang a[aria-current="true"] { color: var(--text); background: var(--raised); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: var(--radius-control);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.btn--primary {
  background: var(--grad);
  color: #2a1306;
  box-shadow: 0 10px 28px -12px rgb(233 138 70 / 0.8);
}
.btn--primary:hover { color: #2a1306; filter: brightness(1.08); }
.btn--ghost { color: var(--text); background: rgb(255 255 255 / 0.06); border: 1px solid var(--line); }
.btn--ghost:hover { color: var(--text); background: rgb(255 255 255 / 0.1); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding-top: clamp(48px, 8vw, 104px);
  padding-bottom: clamp(56px, 8vw, 104px);
  background:
    radial-gradient(55% 50% at 0% 0%, rgb(217 59 66 / 0.26), transparent 70%),
    radial-gradient(50% 55% at 100% 20%, rgb(244 183 92 / 0.16), transparent 70%),
    radial-gradient(ellipse at 50% -10%, #213046 0, var(--ink) 62%);
  overflow: hidden;
}

.eyebrow {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--glass);
}

.hero__text { max-width: 56rem; }

.hero h1 {
  margin-top: 18px;
  font-size: clamp(2.75rem, 8vw, 6rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 0.98;
}

.hero__lede {
  margin-top: 28px;
  max-width: 42rem;
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
  line-height: 1.6;
  color: var(--muted);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

/* ---------- Tour ---------- */

.tour { margin-top: clamp(48px, 7vw, 80px); }

.tour__bar {
  overflow-x: auto;
  scrollbar-width: none;
  margin-inline: calc(var(--gutter) * -1);
  padding-inline: var(--gutter);
}
.tour__bar::-webkit-scrollbar { display: none; }

.tour__tabs {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  background: rgb(27 36 48 / 0.8);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.tour__tabs button {
  padding: 8px 18px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 650;
  cursor: pointer;
  white-space: nowrap;
}
.tour__tabs button:hover { color: var(--text); }
.tour__tabs button[aria-selected="true"] { color: var(--text); background: var(--raised); }

.tour__sep { width: 1px; height: 22px; margin-inline: 6px; background: var(--line); }

.tour__stage { margin: 18px 0 0; }

.tour__img {
  width: 100%;
  border-radius: var(--radius-window);
  border: 1px solid rgb(255 255 255 / 0.08);
  box-shadow:
    0 40px 80px -30px rgb(0 0 0 / 0.75),
    0 0 0 1px rgb(0 0 0 / 0.4),
    0 0 120px -40px rgb(233 138 70 / 0.35);
  background: var(--surface);
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top left;
  transition: opacity 180ms ease;
}
.tour__img.is-swapping { opacity: 0; }

.tour__caption {
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.95rem;
  min-height: 1.6em;
}

/* ---------- Sections ---------- */

.section { padding-block: clamp(72px, 10vw, 128px); }
.section--raised { background: var(--ink-2); }
.section--glow {
  background:
    radial-gradient(60% 60% at 100% 100%, rgb(217 59 66 / 0.16), transparent 70%),
    radial-gradient(50% 60% at 0% 0%, rgb(244 183 92 / 0.1), transparent 70%),
    var(--ink-2);
}

.section__title {
  font-size: clamp(2rem, 4.6vw, 3.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  max-width: 48rem;
}

.section__intro {
  margin-top: 18px;
  max-width: 44rem;
  color: var(--muted);
  font-size: 1.125rem;
}

h3 { font-size: 1.15rem; font-weight: 750; letter-spacing: -0.01em; }
h4 { font-size: 1.05rem; font-weight: 750; }

/* Features */
.features {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: clamp(40px, 6vw, 64px);
}
.card {
  padding: 24px;
  border-radius: var(--radius-card);
  background: linear-gradient(180deg, rgb(255 255 255 / 0.04), transparent), var(--surface);
  border: 1px solid var(--line);
}
.card p { margin-top: 10px; color: var(--muted); font-size: 0.98rem; }
@media (max-width: 1000px) { .features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .features { grid-template-columns: minmax(0, 1fr); } }

.data-note {
  margin-top: clamp(56px, 8vw, 88px);
  max-width: 46rem;
  padding-left: 24px;
  border-left: 3px solid var(--glass);
}
.data-note p { margin-top: 10px; color: var(--muted); }

/* App family */
.apps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: clamp(40px, 6vw, 64px);
}
.app {
  display: flex;
  flex-direction: column;
  padding: 26px;
  border-radius: var(--radius-card);
  background: var(--surface);
  border: 1px solid var(--line);
}
.app h3 { font-size: 1.3rem; }
.app > p { margin-top: 10px; color: var(--muted); }
.app--core {
  background:
    radial-gradient(120% 90% at 100% 0%, rgb(233 138 70 / 0.18), transparent 60%),
    var(--surface);
  border-color: rgb(233 138 70 / 0.45);
}
.app__tag {
  margin: 0 0 8px !important;
  font-size: 0.8rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--glass) !important;
}
.platforms { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px !important; }
.platforms span {
  font-size: 0.82rem;
  font-weight: 650;
  color: var(--text);
  background: var(--raised);
  padding: 3px 10px;
  border-radius: 999px;
}
.app__link {
  margin-top: auto;
  padding-top: 18px;
  font-weight: 650;
  font-size: 0.95rem;
  text-decoration: none;
}
.app__link::after { content: " →"; }
.app__link:hover { text-decoration: underline; }
@media (max-width: 1000px) { .apps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .apps { grid-template-columns: minmax(0, 1fr); } }

/* Screenshot pairs */
.pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 3vw, 32px);
  margin-top: clamp(48px, 7vw, 80px);
}
.pair figure { margin: 0; }
.pair img {
  border-radius: 12px;
  border: 1px solid rgb(255 255 255 / 0.06);
  box-shadow: 0 24px 48px -24px rgb(0 0 0 / 0.7);
}
.pair figcaption { margin-top: 12px; font-size: 0.95rem; color: var(--muted); }
@media (max-width: 700px) { .pair { grid-template-columns: minmax(0, 1fr); } }

/* More ways */
.ways {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: clamp(24px, 4vw, 56px);
  margin-top: 40px;
}
.ways article { padding-top: 20px; border-top: 1px solid var(--line); }
.ways p { margin-top: 10px; color: var(--muted); }
.ways strong { color: var(--text); }
@media (max-width: 860px) { .ways { grid-template-columns: minmax(0, 1fr); } }
.note { margin-top: 40px; max-width: 46rem; color: var(--muted); font-size: 0.95rem; }

/* Download */
.server {
  margin-top: 40px;
  padding: clamp(24px, 4vw, 40px);
  border-radius: var(--radius-window);
  background: var(--surface);
  border: 1px solid rgb(233 138 70 / 0.4);
}
.server__head h3 { font-size: 1.5rem; }
.version:empty { display: none; }
.version { margin-top: 6px; color: var(--muted); font-size: 0.95rem; min-height: 1.5em; }
.server__body {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: clamp(24px, 4vw, 48px);
  margin-top: 24px;
}
.install p { margin-top: 8px; color: var(--muted); }
.install .btn { margin-top: 18px; }
.small { font-size: 0.9rem; }
@media (max-width: 900px) { .server__body { grid-template-columns: minmax(0, 1fr); } }

.code {
  position: relative;
  margin-top: 14px;
  border-radius: 12px;
  background: var(--ink-2);
  border: 1px solid var(--line);
}
.code pre {
  margin: 0;
  padding: 18px 20px;
  overflow-x: auto;
  font-size: 0.85rem;
  line-height: 1.6;
}
.code pre code { background: none; padding: 0; font-size: inherit; }
.code__copy {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 4px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--raised);
  color: var(--text);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 650;
  cursor: pointer;
}
.code__copy:hover { background: #2e3c52; }

.downloads__title { margin-top: clamp(48px, 7vw, 72px); font-size: 1.5rem; }
.downloads {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 20px;
}
.dl {
  padding: 24px;
  border-radius: var(--radius-card);
  background: var(--surface);
  border: 1px solid var(--line);
}
.dl ul { list-style: none; margin: 14px 0 0; padding: 0; }
.dl li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.dl li span { color: var(--text); font-weight: 600; font-size: 0.95rem; }
.dl li a {
  flex-shrink: 0;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgb(240 151 74 / 0.12);
  color: var(--amber);
}
.dl li a:hover { background: rgb(240 151 74 / 0.22); }
.dl li code { font-size: 0.8rem; }
.dl li.dl__cmd { flex-direction: column; align-items: flex-start; gap: 6px; }
.dl .small { margin-top: 10px; color: var(--muted); }
@media (max-width: 1000px) { .downloads { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .downloads { grid-template-columns: minmax(0, 1fr); } }

/* Footer */
.foot { border-top: 1px solid var(--line); padding-block: 40px; background: var(--ink); }
.foot__row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 24px; }
.foot__brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 650; }
.foot ul { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 0; padding: 0; }
.foot a { color: var(--muted); text-decoration: none; font-size: 0.95rem; }
.foot a:hover { color: var(--text); text-decoration: underline; }
.foot__fine { margin-top: 24px; color: #6f7c8d; font-size: 0.85rem; max-width: 52rem; }
.foot__fine a { font-size: inherit; color: #8a97a8; text-decoration: underline; }

/* Legal pages */
.legal { padding-block: clamp(56px, 8vw, 96px); }
.legal__body { max-width: 44rem; }
.legal h1 { font-size: clamp(2.25rem, 5vw, 3.25rem); font-weight: 800; letter-spacing: -0.03em; }
.legal h2 { font-size: 1.25rem; font-weight: 750; margin-top: 40px; }
.legal p, .legal address, .legal ul { margin-top: 12px; color: var(--muted); font-style: normal; }
.legal .btn { margin-top: 8px; margin-right: 8px; }

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

html { scroll-behavior: smooth; scroll-padding-top: 84px; }
