/* FTMON SourceForge handoff — aligned with v2 dashboard palette. */
:root {
  --ink: #0b1220;
  --muted: #5a6b7d;
  --page: #dfe8f1;
  --page-deep: #c9d7e6;
  --surface: #f4f8fc;
  --header: #071018;
  --header-ink: #eef5fb;
  --line: #b7c6d6;
  --focus: #3db8c9;
  --teal: #0f7f90;
  --teal-deep: #0a5c68;
  --clear: #0f6a32;
  --clear-edge: #17a34a;
  --warn-edge: #e3a008;
  --error-edge: #e23b4a;
  --radius: 0.75rem;
  --max: 68rem;
  --font: "IBM Plex Sans", "Segoe UI", "Avenir Next", ui-sans-serif, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "Cascadia Code", monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font: 17px/1.55 var(--font);
  background:
    radial-gradient(900px 360px at 85% -8%, #9fd6e066, transparent 55%),
    radial-gradient(1100px 420px at 0% 0%, #b7d0e8aa, transparent 50%),
    linear-gradient(165deg, #eef4fa 0%, var(--page) 42%, var(--page-deep) 100%);
}

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

a {
  color: var(--teal-deep);
}

a:hover {
  color: #084851;
}

a:focus-visible,
.btn:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: white;
  color: var(--ink);
  padding: 0.5rem 1rem;
  z-index: 100;
}

.skip:focus {
  left: 0.75rem;
  top: 0.75rem;
}

/* —— Hero —— */
.hero {
  position: relative;
  overflow: hidden;
  color: var(--header-ink);
  background:
    radial-gradient(ellipse 70% 55% at 78% 35%, #0f7f9044, transparent 60%),
    radial-gradient(ellipse 50% 45% at 12% 80%, #3db8c922, transparent 55%),
    linear-gradient(135deg, #050a10 0%, #071018 38%, #0b2a34 72%, #0a3a44 100%);
  min-height: min(92vh, 44rem);
  display: flex;
  flex-direction: column;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(#ffffff08 1px, transparent 1px),
    linear-gradient(90deg, #ffffff08 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 70% at 70% 40%, #000 20%, transparent 75%);
  pointer-events: none;
  animation: grid-drift 28s linear infinite;
}

@keyframes grid-drift {
  from { background-position: 0 0, 0 0; }
  to { background-position: 48px 48px, 48px 48px; }
}

.hero-nav {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem clamp(1.25rem, 4vw, 3rem);
  border-bottom: 1px solid #ffffff14;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: white;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 1.05rem;
}

.brand img {
  width: 42px;
  height: 42px;
}

.hero-nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
  justify-content: flex-end;
}

.hero-nav-links a {
  color: #b7c9d8;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}

.hero-nav-links a:hover {
  color: #9be7f0;
}

.hero-body {
  position: relative;
  z-index: 2;
  flex: 1;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  width: min(100% - 2.5rem, var(--max));
  margin: 0 auto;
  padding: clamp(2.5rem, 7vh, 5rem) 0 clamp(3rem, 8vh, 5.5rem);
}

.hero-copy {
  max-width: 36rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 1rem;
  color: #8fd7e2;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.status-dots {
  display: inline-flex;
  gap: 0.28rem;
}

.status-dots span {
  width: 0.48rem;
  height: 0.48rem;
  border-radius: 50%;
  animation: pulse-dot 2.4s ease-in-out infinite;
}

.status-dots span:nth-child(1) { background: var(--clear-edge); }
.status-dots span:nth-child(2) {
  background: var(--warn-edge);
  animation-delay: 0.35s;
}
.status-dots span:nth-child(3) {
  background: var(--error-edge);
  animation-delay: 0.7s;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 0.55; transform: scale(0.92); }
  50% { opacity: 1; transform: scale(1.08); }
}

.hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.35rem, 5.2vw, 3.55rem);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
}

.hero-lead {
  margin: 0 0 1.75rem;
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  line-height: 1.5;
  color: #c5d9e4;
  max-width: 32rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.72rem 1.2rem;
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--focus);
  color: #071018;
  border-color: #9be7f0;
}

.btn-primary:hover {
  background: #6fd4e0;
  color: #071018;
}

.btn-secondary {
  background: #ffffff14;
  color: #eef7fb;
  border-color: #2a6070;
}

.btn-secondary:hover {
  background: #ffffff22;
  color: #fff;
  border-color: #3db8c9;
}

.btn-ghost {
  background: transparent;
  color: #b7c9d8;
  border-color: #ffffff28;
}

.btn-ghost:hover {
  color: #fff;
  border-color: #8fd7e2;
}

/* Light page surfaces (hero keeps the dark variants above). */
main .btn-primary {
  background: var(--teal);
  color: #fff;
  border-color: var(--teal-deep);
}

main .btn-primary:hover {
  background: var(--teal-deep);
  color: #fff;
}

main .btn-secondary {
  background: #fff;
  color: var(--teal-deep);
  border-color: var(--line);
  box-shadow: 0 1px 0 #fff8 inset, 0 6px 18px #0b122014;
}

main .btn-secondary:hover {
  background: var(--surface);
  color: #084851;
  border-color: var(--teal);
}

main .btn-ghost {
  background: transparent;
  color: var(--teal-deep);
  border-color: var(--line);
}

main .btn-ghost:hover {
  color: #084851;
  border-color: var(--teal);
  background: #ffffff88;
}

.hero-visual {
  position: relative;
  display: grid;
  place-items: center;
  justify-self: end;
  width: min(100%, 22rem);
}

.hero-visual::before {
  content: "";
  position: absolute;
  width: 118%;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, #3db8c928, transparent 58%),
    conic-gradient(from 210deg, transparent 0 68%, #0f7f9033 78%, transparent 100%);
  animation: sweep 8s linear infinite;
  pointer-events: none;
}

@keyframes sweep {
  to { transform: rotate(360deg); }
}

.hero-visual img {
  position: relative;
  width: min(100%, 18rem);
  filter: drop-shadow(0 18px 40px #00000066);
  animation: float-mark 5.5s ease-in-out infinite;
}

@keyframes float-mark {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* —— Archive notice —— */
.archive-banner {
  width: min(100% - 2.5rem, var(--max));
  margin: -0.25rem auto 0;
  position: relative;
  z-index: 3;
  padding: 0.85rem 1.15rem;
  background: #fff8e8;
  border: 1px solid #e3a00888;
  border-radius: var(--radius);
  color: #5c3d00;
  font-size: 0.95rem;
  line-height: 1.45;
  box-shadow: 0 8px 24px #0b122014;
  transform: translateY(-1.1rem);
}

.archive-banner a {
  color: #7a4d00;
  font-weight: 600;
}

.archive-banner a:hover {
  color: #5c3d00;
}

/* —— Sections —— */
main {
  width: min(100% - 2.5rem, var(--max));
  margin: 0 auto;
  padding: clamp(2.5rem, 6vh, 4rem) 0 1rem;
}

.section {
  padding: clamp(1.75rem, 4vh, 2.75rem) 0;
}

.section + .section {
  border-top: 1px solid #b7c6d688;
}

.section h2 {
  margin: 0 0 0.65rem;
  font-size: clamp(1.45rem, 2.6vw, 1.85rem);
  letter-spacing: -0.015em;
  line-height: 1.2;
}

.section > p,
.section-lead {
  margin: 0 0 1.25rem;
  color: var(--muted);
  max-width: 42rem;
  font-size: 1.05rem;
}

.feature-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.85rem 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}

.feature-list li {
  padding: 0.15rem 0 0.15rem 1.15rem;
  position: relative;
  color: var(--ink);
}

.feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72rem;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 3px #0f7f9022;
}

.install {
  margin-top: 1.5rem;
  padding: 1rem 1.15rem;
  background: var(--header);
  color: #d7e8f0;
  border-radius: var(--radius);
  border: 1px solid #1d4d5a;
  overflow-x: auto;
}

.install code {
  font-family: var(--mono);
  font-size: 0.92rem;
  white-space: nowrap;
}

.install .prompt {
  color: var(--focus);
  user-select: none;
}

.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.25rem;
}

.legacy-note {
  padding: 1.25rem 0 0;
}

.legacy-note strong {
  color: var(--ink);
}

.legacy-badge {
  display: inline-block;
  margin: 0 0 0.75rem;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #5c3d00;
  background: #fff3d6;
  border: 1px solid #e3a00888;
}

.memory {
  max-width: 44rem;
  margin: 0 0 0.5rem;
}

.memory p {
  margin: 0 0 1rem;
  color: var(--ink);
  font-size: 1.02rem;
  line-height: 1.6;
}

.memory p:last-child {
  margin-bottom: 0;
}

.memory em {
  color: var(--teal-deep);
  font-style: italic;
}

footer {
  margin-top: 2rem;
  padding: 1.5rem clamp(1.25rem, 4vw, 3rem) 2.25rem;
  border-top: 1px solid #b7c6d688;
  color: var(--muted);
  font-size: 0.92rem;
}

.footer-inner {
  width: min(100%, var(--max));
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
  align-items: baseline;
}

footer a {
  color: var(--teal-deep);
  text-decoration: none;
  font-weight: 500;
}

footer a:hover {
  text-decoration: underline;
}

/* —— Legacy page —— */
.page-header {
  background:
    linear-gradient(120deg, #071018 0%, #102032 55%, #0b3a44 100%);
  color: var(--header-ink);
  border-bottom: 3px solid var(--focus);
  padding: 1.1rem clamp(1.25rem, 4vw, 3rem);
}

.page-header .brand {
  margin-bottom: 0.35rem;
}

.page-header p {
  margin: 0.35rem 0 0;
  color: #b7c9d8;
  font-size: 0.95rem;
}

.page-header a.back {
  color: #8fd7e2;
  text-decoration: none;
  font-size: 0.9rem;
}

.page-header a.back:hover {
  color: #c8f4f9;
}

.download-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.download-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid #b7c6d688;
}

.download-list a {
  font-weight: 600;
  text-decoration: none;
}

.download-list a:hover {
  text-decoration: underline;
}

.download-list .meta {
  color: var(--muted);
  font-size: 0.9rem;
}

.callout {
  margin: 1.25rem 0 0;
  padding: 1rem 1.15rem;
  background: #fff3d6;
  border-left: 4px solid var(--warn-edge);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: #5c3d00;
}

@media (max-width: 820px) {
  .hero-body {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .hero-visual {
    order: -1;
    justify-self: start;
    width: min(100%, 14rem);
  }

  .hero {
    min-height: auto;
  }

  .hero-nav {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero::before,
  .hero-visual::before,
  .hero-visual img,
  .status-dots span {
    animation: none;
  }
}
