/* Shared component styles for the project pages (meshtastic / nostr / blockmit / ...).
   Colours, background grid and glow come from theme.css — load that first. */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: system-ui, -apple-system, sans-serif; }
a { color: var(--orange); text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* header (mirrors the shop header) */
header { position: sticky; top: 0; z-index: 50; background: var(--header-bg); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.header-inner { max-width: 1100px; margin: 0 auto; padding: 14px 20px; display: flex; align-items: center; gap: 18px; }
.logo { display: flex; align-items: center; gap: 8px; }
.logo img { height: 38px; display: block; }
.alpha-tag { color: var(--muted); font-size: 12px; align-self: flex-end; }
.header-spacer { flex: 1; }
.nav-links { display: none; gap: 18px; font-size: 14px; }
.nav-links a { color: var(--muted); }
.nav-links a:hover { color: var(--orange); }
@media (min-width: 760px) { .nav-links { display: flex; } }
.shop-btn { background: var(--bg3); border: 1px solid var(--line); color: var(--text); padding: 9px 16px; border-radius: 8px; font-size: 14px; font-weight: 600; }
.shop-btn:hover { border-color: var(--orange); color: var(--orange); }
.lang-toggle { display: flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.lang-toggle button { background: var(--bg3); color: var(--muted); border: none; padding: 8px 11px; font-size: 13px; font-weight: 600; }
.lang-toggle button.active { background: var(--orange); color: #000; }

/* hero */
.hero { padding: 52px 0 8px; }
.hero .crumb { color: var(--muted); font-size: 13px; margin-bottom: 14px; }
.hero .crumb a { color: var(--muted); }
.hero .crumb a:hover { color: var(--orange); }
.hero-icon { font-size: 46px; line-height: 1; margin-bottom: 12px; }
/* the headlines carry their own <br>; the max-width only catches small screens */
.hero h1 { font-size: clamp(28px, 5vw, 44px); line-height: 1.12; max-width: 24ch; text-wrap: balance; }
.hero h1 em { color: var(--orange); font-style: normal; }
.hero .lead { color: var(--muted); margin-top: 14px; max-width: 62ch; font-size: 16.5px; line-height: 1.6; }
.badges { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.badge { border: 1px solid var(--line); background: var(--bg2); color: var(--muted); border-radius: 999px; padding: 5px 12px; font-size: 13px; }
.badge b { color: var(--orange); font-weight: 600; }
.badge.soon b { color: var(--green); }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.btn { border-radius: 9px; padding: 12px 20px; font-size: 15px; font-weight: 700; display: inline-block; }
.btn-primary { background: var(--orange); color: #000; border: 1px solid var(--orange); }
.btn-primary:hover { background: var(--orange-dark); border-color: var(--orange-dark); }
.btn-ghost { background: var(--bg2); color: var(--text); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--orange); color: var(--orange); }

/* generic section */
section.block { padding: 46px 0 0; scroll-margin-top: 70px; }
section.block > .wrap > h2 { font-size: 23px; margin-bottom: 6px; }
section.block > .wrap > .sub { color: var(--muted); font-size: 14.5px; margin-bottom: 20px; max-width: 62ch; line-height: 1.55; }

/* feature cards */
.feat-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.feat { background: var(--card-bg); border: 1px solid var(--card-line); border-radius: 14px; padding: 20px; transition: border-color .15s; }
.feat:hover { border-color: var(--orange); }
.feat .ico { font-size: 26px; line-height: 1; margin-bottom: 10px; }
.feat h3 { font-size: 16.5px; margin-bottom: 7px; }
.feat p { color: var(--muted); font-size: 13.5px; line-height: 1.6; }

/* numbered steps */
.steps { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); counter-reset: step; }
.step { background: var(--card-bg); border: 1px solid var(--card-line); border-radius: 14px; padding: 18px; position: relative; }
.step::before {
  counter-increment: step; content: counter(step);
  display: flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 999px; background: var(--orange); color: #000;
  font-weight: 800; font-size: 14px; margin-bottom: 11px;
}
.step h3 { font-size: 15.5px; margin-bottom: 6px; }
.step p { color: var(--muted); font-size: 13.5px; line-height: 1.55; }

/* product teasers (live from /api/products) */
.prod-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.prod { background: var(--card-bg); border: 1px solid var(--card-line); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; transition: border-color .15s; }
.prod:hover { border-color: var(--orange); }
.prod .imgwrap { aspect-ratio: 4/3; background: #101010; position: relative; }
.prod img { width: 100%; height: 100%; object-fit: contain; }
.prod .soldout-overlay { position: absolute; inset: 0; background: rgba(0,0,0,.55); display: flex; align-items: center; justify-content: center; color: var(--red); font-weight: 800; font-size: 19px; letter-spacing: 1px; }
.prod .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.prod h3 { font-size: 15.5px; line-height: 1.3; color: var(--text); }
.prod .desc { color: var(--muted); font-size: 13px; line-height: 1.45; flex: 1; }
.prod .price { font-size: 18px; font-weight: 700; color: var(--orange); }
.prod .stockline { font-size: 12px; color: var(--green); }
.prod .stockline.low { color: var(--orange); }
.prod .stockline.out { color: var(--red); }
.prod .more { font-size: 13.5px; font-weight: 600; }
.prod-note { color: var(--muted); font-size: 13px; margin-top: 14px; }

/* faq */
.faq { display: flex; flex-direction: column; gap: 10px; }
.faq details { background: var(--card-bg); border: 1px solid var(--card-line); border-radius: 12px; padding: 14px 18px; }
.faq details[open] { border-color: #333; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 15px; list-style: none; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--orange); font-size: 20px; font-weight: 400; line-height: 1; }
.faq details[open] summary::after { content: '−'; }
.faq p { color: var(--muted); font-size: 14px; line-height: 1.6; margin-top: 10px; }
.faq p + p { margin-top: 8px; }

/* closing call to action */
.cta-band { margin: 52px 0 0; background: var(--bg2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cta-band .wrap { padding-top: 34px; padding-bottom: 34px; display: flex; flex-wrap: wrap; gap: 18px; align-items: center; justify-content: space-between; }
.cta-band h2 { font-size: 20px; margin-bottom: 6px; }
.cta-band p { color: var(--muted); font-size: 14px; max-width: 54ch; line-height: 1.55; }

/* other projects strip */
.otherprojects { display: flex; gap: 10px; flex-wrap: wrap; }
.otherprojects a, .otherprojects span {
  font-size: 13.5px; border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; background: var(--bg2); font-weight: 600;
}
.otherprojects a:hover { border-color: var(--orange); }
.otherprojects span { color: var(--muted); font-weight: 400; cursor: default; }

footer { border-top: 1px solid var(--line); margin-top: 46px; }
.footer-inner { max-width: 1100px; margin: 0 auto; padding: 28px 20px; color: var(--muted); font-size: 13px; display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; }
