/* TuxBridge's website. The colours are the app's own (src/index.css): light by default, dark when
   the visitor's system is dark. */

:root {
  --bg: #f4f6fa;
  --surface: #ffffff;
  --surface-2: #eef1f6;
  --border: #dde2ea;
  --text: #161a22;
  --muted: #5d6676;
  --accent: #3d6bff;
  --accent-text: #ffffff;
  --accent-soft: #e6ecff;
  --good: #1f9d55;
  --shadow: 0 1px 2px rgb(16 24 40 / 0.06), 0 8px 24px rgb(16 24 40 / 0.08);
  --radius: 14px;
  --font: "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;
  --mono: "Cascadia Code", "Cascadia Mono", Consolas, ui-monospace, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111318;
    --surface: #1a1d24;
    --surface-2: #22262f;
    --border: #2d323d;
    --text: #e9ecf2;
    --muted: #9aa3b2;
    --accent: #6c8dff;
    --accent-text: #0b0e14;
    --accent-soft: #232c48;
    --good: #43c47b;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 8px 24px rgb(0 0 0 / 0.3);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; margin: 0; }
h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 650; }
h3 { font-size: 1.05rem; font-weight: 600; }
p { margin: 0; }
a { color: var(--accent); text-decoration: none; }
code { font-family: var(--mono); font-size: 0.88em; background: var(--surface-2); padding: 0.1em 0.35em; border-radius: 5px; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }
.center { text-align: center; }
.accent { color: var(--accent); }
.fine { font-size: 0.85rem; color: var(--muted); margin-top: 18px; }

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

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 46px; padding: 0 22px; border-radius: 10px;
  background: var(--accent); color: var(--accent-text);
  font-weight: 600; transition: transform 0.15s, opacity 0.15s;
}
.btn:hover { opacity: 0.92; transform: translateY(-1px); }
.btn-small { height: 36px; padding: 0 16px; font-size: 0.9rem; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--surface-2); }

/* ---- Navigation ---- */

.nav {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; }
.brand.small { font-size: 1rem; }
.nav-links { display: flex; gap: 22px; margin-left: auto; }
.nav-links a { color: var(--muted); font-size: 0.95rem; }
.nav-links a:hover { color: var(--text); }

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

.hero { padding: 72px 0 56px; overflow: hidden; }
.hero-inner { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.eyebrow { display: inline-block; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); background: var(--accent-soft); padding: 4px 10px; border-radius: 999px; margin-bottom: 18px; }
.hero h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); font-weight: 700; letter-spacing: -0.02em; }
.lead { font-size: 1.15rem; color: var(--muted); margin-top: 20px; max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.hero-art { position: relative; padding-bottom: 96px; }
.window { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.window-bar { display: flex; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.window-bar span { width: 10px; height: 10px; border-radius: 50%; background: var(--border); }
.window-body { display: grid; grid-template-columns: 130px 1fr; min-height: 250px; }
.side { border-right: 1px solid var(--border); padding: 12px 8px; display: flex; flex-direction: column; gap: 2px; }
.side-item { font-size: 0.8rem; padding: 6px 10px; border-radius: 7px; color: var(--muted); }
.side-item.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.content { padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.card { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--border); border-radius: 10px; }
.card b { display: block; font-size: 0.9rem; }
.card small { color: var(--muted); font-size: 0.78rem; }

.mono {
  flex-shrink: 0; width: 38px; height: 38px; border-radius: 10px;
  display: grid; place-items: center;
  background: var(--c); color: #fff; font-weight: 700; font-family: var(--font-display);
}

.bubble {
  position: absolute; right: 92px; bottom: 14px; max-width: 260px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  padding: 12px 14px; font-size: 0.88rem; box-shadow: var(--shadow);
}
.hero-pip { position: absolute; right: 0; bottom: 0; width: 76px; height: 76px; filter: drop-shadow(0 6px 10px rgb(0 0 0 / 0.25)); animation: bob 3.2s ease-in-out infinite; }

@keyframes bob { 50% { transform: translateY(-5px); } }

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

.section { padding: 88px 0; }
.section.alt { background: var(--surface); border-block: 1px solid var(--border); }
.section-lead { color: var(--muted); font-size: 1.08rem; margin-top: 12px; max-width: 42em; }
.center .section-lead { margin-inline: auto; }

.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 40px; }
.feature { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.feature p { color: var(--muted); font-size: 0.93rem; margin-top: 8px; }
.icon { width: 38px; height: 38px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 700; margin-bottom: 14px; }

.systems { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 40px; }
.system { display: flex; gap: 14px; align-items: flex-start; padding: 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); }
.system p { color: var(--muted); font-size: 0.93rem; margin-top: 4px; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split.reverse > :first-child { order: 0; }

.checks { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; }
.checks li { position: relative; padding-left: 32px; color: var(--muted); }
.checks li b { color: var(--text); }
.checks li::before {
  content: "✓"; position: absolute; left: 0; top: 1px;
  width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center; font-size: 0.75rem; font-weight: 700;
  background: var(--accent-soft); color: var(--accent);
}

.terminal { background: #0f1218; border: 1px solid #262b36; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.terminal .window-bar { background: #171b23; border-color: #262b36; }
.terminal .window-bar span { background: #2d3340; }
.terminal pre { margin: 0; padding: 20px; color: #d7dce5; font-family: var(--mono); font-size: 0.9rem; line-height: 1.7; overflow-x: auto; }
.terminal .p { color: #7ee2a8; }
.terminal .dim { color: #7c8597; }
.cursor { display: inline-block; width: 9px; height: 1.1em; vertical-align: text-bottom; background: #d7dce5; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.pip-stage { position: relative; display: flex; flex-direction: column; align-items: center; gap: 18px; min-height: 300px; }
.pip-stage::before { content: ""; position: absolute; bottom: -20px; width: min(300px, 75%); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, var(--accent-soft) 0%, transparent 70%); }
.pip-big { position: relative; }
.pip-big { width: min(240px, 60%); filter: drop-shadow(0 12px 20px rgb(0 0 0 / 0.2)); animation: bob 3.2s ease-in-out infinite; }
.bubble-static { order: -1; position: relative; inset: auto; max-width: 340px; min-height: 4.6em; display: flex; align-items: center; z-index: 1; }
.bubble-static b { margin-right: 0.35em; }
.bubble-static::after { content: ""; position: absolute; bottom: -8px; left: 50%; width: 14px; height: 14px; background: var(--surface); border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); transform: translateX(-50%) rotate(45deg); }
.pip-button { position: relative; padding: 0; border: 0; background: none; cursor: pointer; display: grid; place-items: center; width: min(240px, 60%); border-radius: 50%; transition: transform 0.15s; }
.pip-button:hover { transform: scale(1.04) rotate(-3deg); }
.pip-button:active { transform: scale(0.97); }
.pip-button:focus-visible { outline: 3px solid var(--accent); outline-offset: 6px; }
.pip-button .pip-big { width: 100%; }

.steps { list-style: none; padding: 0; margin: 40px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.steps li { padding: 24px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.steps span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: var(--accent-text); font-weight: 700; margin-bottom: 14px; }
.steps p { color: var(--muted); margin-top: 6px; font-size: 0.95rem; }

details { border: 1px solid var(--border); border-radius: 12px; padding: 0 18px; margin-top: 12px; background: var(--bg); }
details:first-of-type { margin-top: 32px; }
summary { cursor: pointer; padding: 16px 0; font-weight: 600; list-style: none; position: relative; padding-right: 28px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 0; color: var(--muted); font-size: 1.2rem; line-height: 1; top: 16px; }
details[open] summary::after { content: "–"; }
details p { color: var(--muted); padding-bottom: 16px; }

.cta h2 { margin-top: 16px; }

.footer { border-top: 1px solid var(--border); padding: 28px 0; color: var(--muted); font-size: 0.85rem; }
.footer-inner { display: flex; align-items: center; gap: 24px; justify-content: space-between; }

/* ---- Smaller screens ---- */

@media (max-width: 960px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .hero-inner, .split { grid-template-columns: 1fr; }
  .hero { padding-top: 48px; }
}

@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .nav-links { display: none; }
  .nav-inner .btn { margin-left: auto; }
  .grid, .systems, .steps { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
  .window-body { grid-template-columns: 1fr; }
  .side { display: none; }
  .bubble { right: 60px; max-width: 200px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-pip, .pip-big, .cursor { animation: none; }
}

/* ---- Download ---- */

.download-card { margin: 28px auto 0; max-width: 560px; padding: 28px; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow); text-align: left; }
.btn-big { width: 100%; height: 56px; justify-content: center; gap: 10px; font-size: 1.1rem; }
.download-meta { margin-top: 10px; text-align: center; color: var(--muted); font-size: 0.9rem; }
.download-steps { margin: 22px 0 0; padding-left: 22px; display: grid; gap: 8px; color: var(--muted); }
.download-steps b { color: var(--text); }
.checksum, .checksum:first-of-type { margin-top: 18px; border: 0; border-top: 1px solid var(--border); border-radius: 0; background: none; padding: 14px 0 0; font-size: 0.88rem; color: var(--muted); }
.checksum summary { cursor: pointer; color: var(--text); font-weight: 600; padding: 0; }
.checksum summary::after { top: 0; }
.checksum p { padding-bottom: 0; }
.checksum p { margin-top: 8px; }
.checksum code { display: block; margin-top: 6px; word-break: break-all; font-size: 0.8rem; }
.checksum p code { display: inline; }
