/* WUGrid project page: one stylesheet for the three languages (index.html = ca, es/, en/) */
:root {
  --bg: #ffffff;
  --bg-soft: #f6f7f9;
  --bg-card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --accent: #1d4ed8;
  --accent-soft: #eff6ff;
  --code-bg: #0f172a;
  --code-text: #e2e8f0;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 12px 32px rgba(15, 23, 42, .12);
  --back: #16a34a; --flagged: #ea580c; --booting: #ca8a04; --down: #dc2626;
  --installing: #0891b2; --pending: #7c3aed; --notpending: #64748b; --checking: #9ca3af;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1120;
    --bg-soft: #111827;
    --bg-card: #161f32;
    --text: #e5e7eb;
    --muted: #9ca3af;
    --line: #273248;
    --accent: #7aa2ff;
    --accent-soft: #172341;
    --code-bg: #060a14;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 16px 40px rgba(0, 0, 0, .45);
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
code, pre { font-family: "Cascadia Mono", Consolas, "SFMono-Regular", Menlo, monospace; font-size: .9em; }
:not(pre) > code { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 4px; padding: 0 .3em; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

/* Header */
.top { position: sticky; top: 0; z-index: 10; background: var(--bg); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 24px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; color: var(--text); }
.brand img { width: 28px; height: 28px; }
.brand:hover { text-decoration: none; }
.top nav { display: flex; gap: 20px; margin-left: auto; font-size: 15px; }
.top nav a { color: var(--muted); }
.top nav a:hover { color: var(--text); text-decoration: none; }
.langs { display: flex; gap: 4px; font-size: 13px; }
.langs a { color: var(--muted); border: 1px solid transparent; border-radius: 6px; padding: 2px 8px; }
.langs a:hover { color: var(--text); text-decoration: none; }
.langs a[aria-current] { color: var(--text); border-color: var(--line); font-weight: 600; }

/* Hero */
.hero { padding: 72px 0 40px; text-align: center; }
.badge { display: inline-flex; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; margin-bottom: 20px; }
.badge b { color: var(--flagged); font-weight: 600; }
.hero h1 { font-size: clamp(34px, 5vw, 54px); line-height: 1.12; margin: 0 auto 18px; max-width: 900px; letter-spacing: -.02em; }
.hero p.lead { font-size: clamp(17px, 2vw, 20px); color: var(--muted); max-width: 780px; margin: 0 auto 30px; }
.buttons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 20px; border-radius: 8px; font-weight: 600; border: 1px solid var(--line); color: var(--text); background: var(--bg-card); }
.btn:hover { text-decoration: none; border-color: var(--muted); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
@media (prefers-color-scheme: dark) { .btn.primary { color: #0b1120; } }
.btn.primary:hover { filter: brightness(1.08); }
.hero .shot { margin: 56px auto 0; max-width: 1182px; }

/* Screenshots */
.shot { border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); background: #fff; }
.shot a { display: block; }
figure { margin: 0; }
figure.shot figcaption { background: var(--bg-card); margin: 0; padding: 8px 12px; border-top: 1px solid var(--line); }
figcaption, .caption { font-size: 14px; color: var(--muted); margin-top: 12px; text-align: center; }

/* Pillars */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; padding: 40px 0 24px; }
.pillar { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px; padding: 22px 22px 18px; }
.pillar h3 { margin: 0 0 6px; font-size: 18px; }
.pillar p { margin: 0; color: var(--muted); font-size: 15px; }
.pillar .icon { width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center; margin-bottom: 12px; color: #fff; font-weight: 700; }

/* Feature rows */
section.feature { padding: 64px 0; border-top: 1px solid var(--line); }
section.feature:nth-of-type(even) { background: var(--bg-soft); }
.row { display: grid; grid-template-columns: 5fr 7fr; gap: 48px; align-items: center; }
.row.flip { grid-template-columns: 7fr 5fr; }
.row.flip .text { order: 2; }
.row > *, .cli-grid > *, .cards > * { min-width: 0; }   /* wide code blocks scroll instead of widening the column */
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: 12px; font-weight: 700; color: var(--accent); margin-bottom: 8px; }
.text h2 { font-size: clamp(26px, 3vw, 34px); line-height: 1.2; margin: 0 0 14px; letter-spacing: -.01em; }
.text p { margin: 0 0 14px; }
.text ul { margin: 0 0 14px; padding-left: 20px; }
.text li { margin-bottom: 6px; }
.note { font-size: 14px; color: var(--muted); border-left: 3px solid var(--line); padding-left: 12px; }

/* States */
.states { display: grid; grid-template-columns: max-content 1fr; gap: 8px 14px; align-items: baseline; margin: 6px 0 0; font-size: 15px; }
.chip { display: inline-block; min-width: 150px; text-align: center; color: #fff; font-weight: 700; font-size: 12px; letter-spacing: .02em; padding: 3px 10px; border-radius: 4px; }
.c-back { background: var(--back); } .c-flagged { background: var(--flagged); } .c-booting { background: var(--booting); }
.c-down { background: var(--down); } .c-installing { background: var(--installing); } .c-pending { background: var(--pending); }
.c-notpending { background: var(--notpending); } .c-checking { background: var(--checking); }

/* Console */
pre.term { background: var(--code-bg); color: var(--code-text); border-radius: 10px; padding: 16px 18px; overflow-x: auto; line-height: 1.5; margin: 0 0 16px; border: 1px solid var(--line); }
pre.term .p { color: #7dd3fc; user-select: none; }
pre.term .c { color: #94a3b8; }
pre.term .alarm { color: #f87171; }
pre.term .flag { color: #fb923c; }
.cli-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 40px; }
.cli-grid h3 { margin: 0 0 10px; font-size: 18px; }
.cli-grid p { margin: 0 0 12px; color: var(--muted); font-size: 15px; }

/* Start + roadmap */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 28px; }
.card { background: var(--bg-card); border: 1px solid var(--line); border-radius: 12px; padding: 22px; }
.card h3 { margin: 0 0 10px; font-size: 18px; }
.card p, .card li { font-size: 15px; }
.card ul { padding-left: 18px; margin: 0; }
.card pre.term { font-size: 13px; margin: 8px 0 0; }
.center { text-align: center; }
.center h2 { font-size: clamp(26px, 3vw, 34px); margin: 0 0 10px; }
.center p.sub { color: var(--muted); max-width: 720px; margin: 0 auto; }
.roadmap { list-style: none; padding: 0; margin: 28px auto 0; max-width: 860px; }
.roadmap li { display: grid; grid-template-columns: 70px 120px 1fr; gap: 16px; align-items: baseline; padding: 14px 0; border-bottom: 1px solid var(--line); }
.roadmap .m { font-weight: 700; }
.roadmap .s { font-size: 12px; font-weight: 700; text-align: center; border-radius: 4px; padding: 2px 8px; color: #fff; }
.s.done { background: var(--back); } .s.built { background: #15803d; } .s.cut { background: var(--installing); } .s.next { background: var(--pending); } .s.plan { background: var(--notpending); }
.roadmap .d { color: var(--muted); font-size: 15px; }
.author-links { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin: 24px 0 0; }
.roadmap .d b { color: var(--text); font-weight: 600; }

footer { border-top: 1px solid var(--line); padding: 32px 0 48px; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }

@media (max-width: 900px) {
  .row, .row.flip { grid-template-columns: 1fr; gap: 28px; }
  .row.flip .text { order: 0; }
  .pillars, .cards, .cli-grid { grid-template-columns: 1fr; }
  .top nav { display: none; }
  .langs { margin-left: auto; }
  .hero { padding-top: 48px; }
  .roadmap li { grid-template-columns: 50px 1fr; }
  .roadmap .s { justify-self: start; }
  .roadmap .d { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .wrap { padding: 0 16px; }
  pre.term { font-size: 12.5px; padding: 12px 14px; }
  .states { grid-template-columns: 1fr; gap: 2px 0; }
  .states dd { margin: 0 0 10px; }
}
.states dt, .states dd { margin: 0; }
