/* Lifepad project page. Colors are the device's own tokens (design/design-rules.md). */
:root {
  --bg: #0c0d10;
  --bg-2: #101217;
  --surface: #17191e;
  --surface-2: #22252c;
  --line: #30343d;
  --text: #f4f6f8;
  --text-2: #a5adb9;
  --accent: #f0b94d;
  --on-accent: #1a1408;
  --red: #c5483a;
  --blue: #1a6dcc;
  --green: #15803d;
  --violet: #7e22ce;
  --radius: 18px;
  --wrap: 1160px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 500 16px/1.65 'Montserrat', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font: 600 0.88em/1.4 ui-monospace, 'Cascadia Code', Consolas, monospace; background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; }
pre { margin: 0; background: #08090b; border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; overflow-x: auto; }
pre code { background: none; border: 0; padding: 0; font-size: 13.5px; color: #dfe3e8; }
h1, h2, h3 { line-height: 1.15; margin: 0; letter-spacing: -0.01em; }
h2 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; }
h3 { font-size: 19px; font-weight: 700; }
p { margin: 0 0 12px; }

/* The page's language: each text exists twice, one per language. */
html[data-ui='en'] [lang='es'], html[data-ui='es'] [lang='en'] { display: none !important; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } }

/* ---------- Header ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  background: rgba(12, 13, 16, 0.82);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(48, 52, 61, 0.6);
}
.top .wrap { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 800; font-size: 19px; }
.brand:hover { text-decoration: none; }
.brand img { width: 30px; height: 30px; }
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { color: var(--text-2); font-weight: 600; font-size: 14px; }
.nav a:hover { color: var(--text); text-decoration: none; }
.tools { display: flex; align-items: center; gap: 10px; }
.langs { display: flex; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.langs button { font: 700 12px/1 inherit; font-family: inherit; color: var(--text-2); background: none; border: 0; border-radius: 7px; padding: 7px 10px; cursor: pointer; }
.langs button[aria-pressed='true'] { background: var(--accent); color: var(--on-accent); }
.gh { display: inline-flex; align-items: center; gap: 8px; color: var(--text); font-weight: 700; font-size: 14px; border: 1px solid var(--line); border-radius: 10px; padding: 7px 12px; }
.gh:hover { border-color: var(--text-2); text-decoration: none; }
.gh svg { width: 18px; height: 18px; fill: currentColor; }
@media (max-width: 980px) { .nav { display: none; } .tools { margin-left: auto; } }
@media (max-width: 480px) { .gh span { display: none; } }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 24px; border-radius: 14px; font: 700 16px/1 inherit; font-family: inherit; cursor: pointer; border: 1px solid transparent; }
.btn:hover { text-decoration: none; }
.btn.primary { background: var(--accent); color: var(--on-accent); }
.btn.primary:hover { background: #f5c768; }
.btn.ghost { background: var(--surface); color: var(--text); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--text-2); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 72px 0 96px; }
.hero::before {
  content: ''; position: absolute; inset: -20% -10% auto auto; width: 820px; height: 820px; pointer-events: none;
  background:
    radial-gradient(circle at 30% 30%, rgba(26, 109, 204, 0.28), transparent 45%),
    radial-gradient(circle at 70% 30%, rgba(21, 128, 61, 0.24), transparent 45%),
    radial-gradient(circle at 30% 70%, rgba(197, 72, 58, 0.24), transparent 45%),
    radial-gradient(circle at 70% 70%, rgba(126, 34, 206, 0.24), transparent 45%);
  filter: blur(40px);
}
.hero .wrap { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin-bottom: 18px; }
.hero h1 { font-size: clamp(38px, 5.6vw, 64px); font-weight: 800; letter-spacing: -0.025em; margin-bottom: 22px; }
.hero h1 em { font-style: normal; background: linear-gradient(90deg, #4f95e8, #2fb36a 40%, #e0705f 70%, #a45ee6); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: 19px; color: var(--text-2); max-width: 560px; margin-bottom: 32px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 36px; }
.facts { display: flex; flex-wrap: wrap; gap: 10px 26px; color: var(--text-2); font-size: 14px; font-weight: 600; }
.facts b { color: var(--text); }
@media (max-width: 900px) { .hero .wrap { grid-template-columns: 1fr; gap: 48px; } .hero { padding: 48px 0 72px; } }

/* A screenshot in a dark bezel, like the board. */
.device { position: relative; background: linear-gradient(145deg, #23262d, #121418); border-radius: 34px; padding: 22px; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.8), 0 0 0 1px #2c3038 inset; max-width: 520px; margin: 0 auto; }
.device img { border-radius: 8px; width: 100%; aspect-ratio: 1; background: #000; }
.device.small { border-radius: 22px; padding: 12px; }
.device.small img { border-radius: 5px; }

/* ---------- Sections ---------- */
section { padding: 96px 0; }
section.alt { background: var(--bg-2); border-top: 1px solid #1a1d23; border-bottom: 1px solid #1a1d23; }
.head { max-width: 760px; margin-bottom: 52px; }
.head p { color: var(--text-2); font-size: 18px; margin-top: 16px; }
@media (max-width: 600px) { section { padding: 64px 0; } .head { margin-bottom: 36px; } }

/* Key ideas */
.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.pillar { background: var(--surface); border: 1px solid #252830; border-radius: var(--radius); padding: 24px; }
.pillar .dot { width: 38px; height: 38px; border-radius: 11px; margin-bottom: 18px; display: grid; place-items: center; }
.pillar .dot svg { width: 20px; height: 20px; stroke: #fff; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.pillar h3 { margin-bottom: 8px; }
.pillar p { color: var(--text-2); font-size: 15px; margin: 0; }
@media (max-width: 980px) { .pillars { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .pillars { grid-template-columns: 1fr; } }

/* Feature rows: text beside one or two screens. */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; padding: 40px 0; }
.feature + .feature { border-top: 1px solid #1d2026; }
.feature.flip .text { order: 2; }
.feature .text h3 { font-size: clamp(24px, 3vw, 30px); font-weight: 800; margin-bottom: 16px; }
.feature .text > p { color: var(--text-2); font-size: 17px; }
.feature .tag { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-2); margin-bottom: 12px; }
.ticks { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 28px; font-size: 15px; }
.ticks li::before { content: ''; position: absolute; left: 0; top: 7px; width: 14px; height: 14px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(240, 185, 77, 0.15); }
.ticks li:nth-child(4n+2)::before { background: #4f95e8; box-shadow: 0 0 0 4px rgba(26, 109, 204, 0.2); }
.ticks li:nth-child(4n+3)::before { background: #2fb36a; box-shadow: 0 0 0 4px rgba(21, 128, 61, 0.2); }
.ticks li:nth-child(4n+4)::before { background: #a45ee6; box-shadow: 0 0 0 4px rgba(126, 34, 206, 0.2); }
.screens { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.screens.one { grid-template-columns: 1fr; max-width: 460px; margin: 0 auto; }
.shot { cursor: zoom-in; }
.caption { color: var(--text-2); font-size: 13px; font-weight: 600; text-align: center; margin-top: 10px; }
@media (max-width: 900px) { .feature { grid-template-columns: 1fr; gap: 32px; } .feature.flip .text { order: 0; } }

/* Live demo */
.demo { display: grid; grid-template-columns: minmax(0, 560px) 1fr; gap: 56px; align-items: center; }
.demo-frame { background: linear-gradient(145deg, #23262d, #121418); border-radius: 34px; padding: 22px; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.8), 0 0 0 1px #2c3038 inset; }
.demo-frame iframe { display: block; width: 100%; aspect-ratio: 1; border: 0; border-radius: 8px; background: var(--bg); }
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 4px; margin-bottom: 24px; }
.seg button { font: 700 14px/1 inherit; font-family: inherit; color: var(--text-2); background: none; border: 0; border-radius: 9px; padding: 11px 16px; cursor: pointer; }
.seg button[aria-pressed='true'] { background: var(--surface-2); color: var(--text); box-shadow: 0 0 0 1px var(--line) inset; }
.try { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.try li { display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: start; }
.try .k { width: 40px; height: 40px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); display: grid; place-items: center; font-weight: 800; color: var(--accent); }
.try b { display: block; }
.try span.d { color: var(--text-2); font-size: 15px; }
@media (max-width: 900px) { .demo { grid-template-columns: 1fr; } }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.gallery figure { margin: 0; }
.gallery .device.small { max-width: none; }
.gallery figcaption { color: var(--text-2); font-size: 13px; font-weight: 600; text-align: center; margin-top: 8px; }
@media (max-width: 1100px) { .gallery { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 700px) { .gallery { grid-template-columns: repeat(2, 1fr); } }

/* Guide */
.guide { display: grid; grid-template-columns: 240px 1fr; gap: 48px; align-items: start; }
.guide nav { position: sticky; top: 92px; display: grid; gap: 4px; }
.guide nav a { color: var(--text-2); font-weight: 600; font-size: 14px; padding: 8px 12px; border-radius: 10px; }
.guide nav a:hover { background: var(--surface); color: var(--text); text-decoration: none; }
.group { margin-bottom: 40px; }
.group > h3 { font-size: 22px; font-weight: 800; margin-bottom: 14px; display: flex; align-items: center; gap: 12px; }
.group > h3::before { content: ''; width: 10px; height: 24px; border-radius: 4px; background: var(--c, var(--accent)); }
details { background: var(--surface); border: 1px solid #252830; border-radius: 14px; margin-bottom: 10px; }
details[open] { border-color: var(--line); }
summary { list-style: none; cursor: pointer; padding: 16px 52px 16px 20px; font-weight: 700; position: relative; }
summary::-webkit-details-marker { display: none; }
summary::after { content: ''; position: absolute; right: 22px; top: 50%; width: 9px; height: 9px; border-right: 2px solid var(--text-2); border-bottom: 2px solid var(--text-2); transform: translateY(-70%) rotate(45deg); transition: transform 0.2s; }
details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
details > div { padding: 0 20px 18px; color: var(--text-2); font-size: 15.5px; }
details > div b { color: var(--text); }
@media (max-width: 900px) { .guide { grid-template-columns: 1fr; } .guide nav { position: static; display: flex; flex-wrap: wrap; } }

/* Hardware and install */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card { background: var(--surface); border: 1px solid #252830; border-radius: var(--radius); padding: 26px; display: flex; flex-direction: column; }
.card h3 { margin-bottom: 10px; }
.card p { color: var(--text-2); font-size: 15px; }
.card .badge { align-self: flex-start; font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; border-radius: 999px; padding: 4px 10px; margin-bottom: 14px; background: var(--surface-2); color: var(--text-2); }
.card .badge.need { background: rgba(240, 185, 77, 0.14); color: var(--accent); }
.card .more { margin-top: auto; padding-top: 10px; font-weight: 700; font-size: 14px; }
.specs { margin: 28px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: #252830; border: 1px solid #252830; border-radius: var(--radius); overflow: hidden; }
.specs div { background: var(--surface); padding: 18px 20px; }
.specs dt { color: var(--text-2); font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.specs dd { margin: 4px 0 0; font-weight: 700; }
@media (max-width: 980px) { .cards { grid-template-columns: 1fr; } .specs { grid-template-columns: repeat(2, 1fr); } }

.steps { counter-reset: step; display: grid; gap: 18px; }
.step { background: var(--surface); border: 1px solid #252830; border-radius: var(--radius); padding: 28px; display: grid; grid-template-columns: 52px 1fr; gap: 20px; }
.step::before { counter-increment: step; content: counter(step); width: 52px; height: 52px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line); display: grid; place-items: center; font-weight: 800; font-size: 20px; color: var(--accent); }
.step h3 { margin-bottom: 8px; }
.step p { color: var(--text-2); font-size: 15.5px; }
.step pre { margin-top: 12px; }
.install-box { margin-top: 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.note { color: var(--text-2); font-size: 14px; }
.warn { color: #f0c27a; }
@media (max-width: 600px) { .step { grid-template-columns: 1fr; } }

/* Developers */
.dev { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.dev .card code { font-size: 12.5px; }
.links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
@media (max-width: 980px) { .dev { grid-template-columns: 1fr; } }

/* FAQ */
.faq { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; align-items: start; }
@media (max-width: 900px) { .faq { grid-template-columns: 1fr; } }

/* Footer */
footer { padding: 56px 0 72px; border-top: 1px solid #1a1d23; color: var(--text-2); font-size: 14px; }
footer .wrap { display: grid; grid-template-columns: 1fr 1.4fr; gap: 48px; }
footer .brand { margin-bottom: 14px; }
footer p { margin-bottom: 10px; }
.fan { font-size: 13px; line-height: 1.6; }
@media (max-width: 800px) { footer .wrap { grid-template-columns: 1fr; } }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(5, 6, 8, 0.92); display: none; place-items: center; padding: 24px; cursor: zoom-out; }
.lightbox.on { display: grid; }
.lightbox img { width: min(92vw, 92vh, 720px); border-radius: 12px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6); }

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