/* ─ arx landing — light theme only, palette mirrors the panel CSS ─
   See arx/web/static/css/style.css for the source of these tokens.
   No dark variant: feedback_english_only_light_theme memory locks
   the theme to a single light variant across the NetForge family. */

:root {
  --bg:        #f0f2f5;
  --bg-alt:    #e9ecf2;
  --card:      #ffffff;
  --text:      #1a2035;
  --dim:       #7a8ba8;
  --border:    #e0e4ec;
  --accent:    #5b8af5;
  --accent2:   #20b2aa;
  --amber:     #f5a623;
  --danger:    #e04545;
  --ok:        #3dd68c;
  --mono:      'JetBrains Mono', 'Fira Code', 'Cascadia Code', Consolas, monospace;
  --sans:      -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Liberation Sans', Arial, sans-serif;
  --shadow-sm: 0 1px 4px rgba(26, 32, 53, 0.06);
  --shadow-md: 0 4px 16px rgba(26, 32, 53, 0.08);
  --gradient:  linear-gradient(135deg, var(--accent), var(--accent2));
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

code, pre {
  font-family: var(--mono);
  font-size: 14px;
}

/* ─ Topbar ─ matches the panel topbar but trimmed for marketing */

.topbar {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 0 32px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}
.logo { display: flex; align-items: center; gap: 14px; }
.logo:hover { text-decoration: none; }
.logo img { border-radius: 6px; }

/* Stacked logo text: arx (big) on top, "by NetForge" (small) below.
   Aligned to the image's vertical center via flex on .logo. The internal
   stack uses `align-items: baseline` so the dim sub-text sits cleanly
   under the gradient title without random optical drift. */
.logo-stack {
  display: inline-flex;
  flex-direction: column;
  line-height: 1;
}
.logo-text {
  font-weight: 800;
  font-size: 34px;
  letter-spacing: -0.025em;
  line-height: 1;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.logo-sub {
  font-size: 11px;
  color: var(--dim);
  letter-spacing: 0.5px;
  margin-top: 4px;
  text-transform: lowercase;
}
.logo-sub a { color: inherit; }
.logo-sub a:hover { color: var(--accent); text-decoration: none; }

.topbar-right { display: flex; align-items: center; gap: 22px; }
.topbar-link {
  font-size: 14px; color: var(--text); font-weight: 600;
}
.topbar-link:hover { color: var(--accent); text-decoration: none; }

/* EN/IT switcher in topbar + footer: small monospaced pair with a slash
   separator. Active locale is non-clickable (no href) and bold; the
   inactive one is a normal link. Same markup pattern in footer-bottom. */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.5px;
  margin-left: 8px;
  padding-left: 14px;
  border-left: 1px solid var(--border);
}
.lang-switch a, .footer-bottom .lang-active, .footer-bottom .lang-sep, .footer-bottom a[href$="index.html"] {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.5px;
}
.lang-switch a {
  color: var(--dim);
  font-weight: 600;
}
.lang-switch a:hover { color: var(--accent); text-decoration: none; }
.lang-active {
  color: var(--text) !important;
  font-weight: 700;
  cursor: default;
  text-decoration: none;
}
.lang-active:hover { color: var(--text) !important; text-decoration: none !important; }
.lang-sep { color: var(--border); }

/* ─ Sections ─ */

main { flex: 1; }

.section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 80px 32px;
}
.section-alt {
  background: var(--bg-alt);
  max-width: none;
  width: 100%;
}
.section-alt > * { max-width: 1100px; margin-left: auto; margin-right: auto; }

.section-title {
  font-size: 32px;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  color: var(--text);
}
.section-lede {
  color: var(--dim);
  font-size: 17px;
  margin-bottom: 32px;
  /* No max-width here: inside .section-alt, `> * { margin: 0 auto }`
   * centres each direct child as a 1100-px box. If the lede had its
   * own 800-px cap, that 800-px box would centre inside the 1100,
   * which read as "scattered". Letting the lede inherit the 1100-px
   * width keeps text flush with the .section-title above it on every
   * section type. */
}

/* ─ Hero ─ */

.hero {
  padding: 96px 32px 64px;
  text-align: center;
  background:
    radial-gradient(1200px 400px at 50% -100px, rgba(91, 138, 245, 0.18), transparent 70%),
    var(--bg);
}
.hero-inner { max-width: 880px; margin: 0 auto; }
.hero h1 {
  font-size: 48px;
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin-bottom: 24px;
  font-weight: 800;
}
.hero .lede {
  font-size: 19px;
  color: var(--dim);
  margin-bottom: 36px;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}
.gradient {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.cta-row {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 16px;
  border: 1px solid transparent;
  transition: transform 0.05s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { box-shadow: var(--shadow-md); }
.btn-ghost {
  background: var(--card);
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.microcopy {
  font-size: 13px;
  color: var(--dim);
  margin-top: 8px;
}
.microcopy.center { text-align: center; }

/* ─ Card grids ─ */

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px 40px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.15s ease, transform 0.05s ease;
}
.card:hover { box-shadow: var(--shadow-md); }

.card-icon {
  font-size: 32px;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 12px;
}
.card h3 {
  font-size: 18px;
  margin-bottom: 8px;
}
.card p {
  color: var(--dim);
  font-size: 15px;
}
.card code {
  background: var(--bg-alt);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 13px;
  color: var(--text);
}

/* ─ Stack tiles ─ */

.stack-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}
.stack-tile {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 18px 14px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stack-tile strong {
  font-weight: 700;
  font-size: 15px;
}
.stack-tile span {
  font-size: 12px;
  color: var(--dim);
}

/* ─ Layered defense list ─ */

.layers {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 16px;
}
.layer {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 22px;
  align-items: start;
  box-shadow: var(--shadow-sm);
}
.layer-num {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--gradient);
  color: #fff;
  font-weight: 700;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.layer h3 {
  font-size: 18px;
  margin-bottom: 6px;
}
.layer p {
  color: var(--dim);
  font-size: 15px;
}

/* ─ Data-flow diagram wrapper ─
   The SVG sets viewBox + we set max-width 100%, so it scales down on
   mobile without overflow. Slight white background card to match other
   visual elements; subtle shadow keeps it from looking flat. */
.diagram-wrap {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
  margin-top: 16px;
}
.diagram-wrap img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 960px;
  margin: 0 auto;
}

/* ─ Install code block ─ */

.install-block {
  background: var(--text);
  color: #e6eaf3;
  padding: 24px 28px;
  border-radius: 10px;
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.7;
  box-shadow: var(--shadow-md);
}
.install-block code { color: inherit; background: transparent; }

/* ─ Compare table ─ */

.compare-table { overflow-x: auto; }
.compare-table table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.compare-table th, .compare-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.compare-table th {
  background: var(--bg-alt);
  font-weight: 700;
  color: var(--text);
}
.compare-table td:first-child {
  font-weight: 600;
}
.compare-table tbody tr:last-child td { border-bottom: none; }
.compare-table .ok    { color: var(--ok);     font-weight: 700; }
.compare-table .bad   { color: var(--danger); font-weight: 700; }
.compare-table .warn  { color: var(--amber);  font-weight: 700; }

/* ─ Footer ─ */

.footer {
  background: var(--card);
  border-top: 1px solid var(--border);
  padding: 56px 32px 24px;
  margin-top: 64px;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 40px;
}
.footer-col h4 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--dim);
  margin-bottom: 14px;
}
.footer-col a {
  display: block;
  font-size: 14px;
  margin-bottom: 6px;
}
.footer-col p { font-size: 14px; color: var(--dim); margin-top: 8px; }
.footer-bottom {
  max-width: 1100px;
  margin: 32px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--dim);
}
.footer-bottom .dim { font-style: italic; }

/* Footer logo: trim down so it doesn't overpower the topbar one. */
.footer .logo-text { font-size: 22px; }
.footer .logo-sub  { font-size: 10px; margin-top: 2px; }

/* ─ Responsive ─ tighter at <980px, stacks at <720px */

@media (max-width: 980px) {
  .hero h1     { font-size: 38px; }
  .grid-3      { grid-template-columns: repeat(2, 1fr); }
  .stack-grid  { grid-template-columns: repeat(3, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .topbar      { padding: 0 16px; }
  .topbar-right { gap: 12px; }
  .topbar-link { font-size: 13px; }
  .section     { padding: 56px 20px; }
  .hero        { padding: 64px 20px 48px; }
  .hero h1     { font-size: 30px; }
  .hero .lede  { font-size: 16px; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .stack-grid  { grid-template-columns: repeat(2, 1fr); }
  .layer       { grid-template-columns: 1fr; gap: 12px; }
  .footer-inner { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; gap: 6px; }
}


/* ── Copy button on code/install blocks ─────────────────────── */
.code-with-copy { position: relative; }
.code-with-copy pre { padding-right: 4.5rem; }
.copy-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  padding: 0.3rem 0.7rem;
  font-size: 0.75rem;
  font-family: inherit;
  font-weight: 600;
  color: #5b8af5;
  background: rgba(91, 138, 245, 0.08);
  border: 1px solid rgba(91, 138, 245, 0.3);
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.copy-btn:hover {
  background: rgba(91, 138, 245, 0.18);
  border-color: rgba(91, 138, 245, 0.55);
}
.copy-btn.copied {
  color: #20b2aa;
  background: rgba(32, 178, 170, 0.12);
  border-color: rgba(32, 178, 170, 0.45);
}


/* ── Stepwise install list (one command per copy) ───────────── */
.install-steps {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: 0 auto;
  max-width: 1100px;
}
.install-steps > li {
  counter-increment: step;
  margin-bottom: 1.4rem;
  padding-left: 2.4rem;
  position: relative;
  min-width: 0;
}
.install-steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 1.7rem;
  height: 1.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: #5b8af5;
  background: rgba(91, 138, 245, 0.08);
  border: 1px solid rgba(91, 138, 245, 0.3);
  border-radius: 50%;
}
.install-steps > li > p {
  margin: 0 0 0.55rem;
  color: var(--text, #1a2035);
}
.install-steps .code-with-copy {
  display: flex;
  align-items: flex-start;
  margin-bottom: 0.55rem;
  background: #0d1117;
  border: 1px solid #1f2937;
  border-radius: 6px;
  overflow: hidden;
  max-width: 100%;
  box-sizing: border-box;
}
.install-steps .code-with-copy pre {
  order: 1;
  flex: 1 1 auto;
  min-width: 0;
  display: block;
  margin: 0;
  padding: 0.8rem 1rem;
  background: transparent;
  color: #e2e8f0;
  font-family: "JetBrains Mono", "Fira Code", Consolas, ui-monospace, monospace;
  font-size: 0.82rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-all;
  overflow-wrap: anywhere;
  box-sizing: border-box;
}
.install-steps .code-with-copy code {
  background: transparent;
  color: inherit;
  font-family: inherit;
  padding: 0;
}
.install-steps .copy-btn {
  order: 2;
  position: relative;
  top: auto;
  right: auto;
  align-self: flex-start;
  flex: 0 0 auto;
  margin: 0.5rem 0.5rem 0.5rem 0.5rem;
  color: #94a3b8;
  background: rgba(148, 163, 184, 0.1);
  border-color: rgba(148, 163, 184, 0.25);
}
.install-steps .copy-btn:hover {
  color: #5b8af5;
  background: rgba(91, 138, 245, 0.2);
  border-color: rgba(91, 138, 245, 0.5);
}
.install-steps .copy-btn.copied {
  color: #20b2aa;
  background: rgba(32, 178, 170, 0.18);
  border-color: rgba(32, 178, 170, 0.55);
}
