/* Shared styles for the documentation site landing page and product hubs.
   Tokens mirror the interactive guide apps in {product}/assembly/css/app.css. */

:root {
  --bg: #11100e;
  --panel: #1a1916;
  --panel-2: #22211d;
  --line: #33312c;
  --text: #f3eee3;
  --muted: #9c9689;
  --accent: #e8b84a;
  --accent-dim: rgba(232, 184, 74, 0.22);
  --installed: #3d8b74;
  --radius: 10px;
  --font: "Segoe UI", system-ui, sans-serif;
  --mono: "Cascadia Mono", "Consolas", ui-monospace, monospace;
  --shell: 1080px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); }

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

.shell {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 24px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 20;
  padding: 10px 16px;
  background: var(--accent);
  color: #17150f;
  font-weight: 600;
  border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; }

/* ---------- Breadcrumb bar ---------- */

.topbar {
  border-bottom: 1px solid var(--line);
  background: #0d0c0b;
}
.topbar .shell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  flex-wrap: wrap;
}
.crumbs {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--muted);
  min-width: 0;
}
.crumbs a {
  color: var(--muted);
  text-decoration: none;
}
.crumbs a:hover { color: var(--text); }
.crumbs .sep { color: var(--line); }
.crumbs .here {
  color: var(--text);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar-spacer { flex: 1; }
.topbar-link {
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
}
.topbar-link:hover { color: var(--accent); }

/* ---------- Generic section rhythm ---------- */

main { flex: 1 0 auto; }

.section { padding: 44px 0; }
.section + .section { border-top: 1px solid var(--line); }

.section-head { margin-bottom: 20px; }
.section-head h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: 0.01em;
}
.section-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  max-width: 62ch;
}

.kicker {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

/* ---------- Product hero ---------- */

.hero { padding: 40px 0 44px; }
.hero .shell {
  display: grid;
  grid-template-columns: minmax(0, 380px) minmax(0, 1fr);
  gap: 40px;
  align-items: center;
}

/* Text-only hero, used on the site landing page */
.hero.simple { padding: 40px 0 12px; }
.hero.simple .shell { grid-template-columns: minmax(0, 1fr); }

/* Large screened circular mark behind the homepage hero — same treatment
   as the main-site footer, inverted so it reads on the dark background. */
.page-home {
  --home-mark: url("../img/zeppelin-logo.png");
  --home-mark-size: min(720px, 78vw);
  --home-mark-angle: -28deg;
  --home-mark-opacity: 0.2;
}
.page-home main {
  position: relative;
  overflow: hidden;
}
.page-home main::before {
  content: "";
  position: absolute;
  /* Viewport units, not % of main — main is the full page and a
     percentage top would shove the mark off-screen on a long document. */
  top: -8vh;
  left: -6vw;
  width: var(--home-mark-size);
  height: var(--home-mark-size);
  background: var(--home-mark) center / contain no-repeat;
  transform: rotate(var(--home-mark-angle));
  opacity: var(--home-mark-opacity);
  filter: invert(1);
  mix-blend-mode: screen;
  pointer-events: none;
  z-index: 0;
}
.page-home main > * {
  position: relative;
  z-index: 1;
}

/* Product shots are on white backgrounds, so they sit on a light plate
   rather than floating as a glowing rectangle on the dark page. */
.hero-figure {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(160deg, #fbf9f4, #e7e2d6);
  padding: 18px;
  overflow: hidden;
}
.hero-figure img {
  display: block;
  width: 100%;
  height: auto;
  mix-blend-mode: multiply;
}

.hero h1 {
  margin: 0 0 10px;
  font-size: 34px;
  line-height: 1.15;
}
.hero .lede {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
  max-width: 56ch;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
}
.chips li {
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  font-size: 12.5px;
}
.chips li strong {
  color: var(--text);
  font-weight: 600;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
}
.btn:hover {
  border-color: var(--accent);
  background: var(--panel-2);
}
.btn.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #17150f;
}
.btn.primary:hover {
  background: #f0c65f;
  border-color: #f0c65f;
}
.btn .arrow {
  font-size: 17px;
  line-height: 1;
}

/* ---------- Card grids ---------- */

.grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

/* A section holding a single card shouldn't stretch it the full page width,
   which reads as unbalanced next to the two-up sections above it. */
@media (min-width: 621px) {
  .grid:has(> :only-child) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.card {
  display: block;
  position: relative;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
}
a.card:hover {
  border-color: var(--accent);
  background: var(--panel-2);
}
.card .card-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.card strong {
  display: block;
  font-size: 16px;
  line-height: 1.3;
}
.card p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.55;
}
.card .meta {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* Badge on document cards */
.badge {
  flex: none;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--panel-2);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
a.card:hover .badge {
  border-color: var(--accent-dim);
  color: var(--accent);
}

/* The interactive guide gets visual priority over the static documents */
.card.feature {
  border-color: var(--accent-dim);
  background: linear-gradient(180deg, rgba(232, 184, 74, 0.07), transparent 70%), var(--panel);
}
.card.feature strong { font-size: 17px; }

/* ---------- Product cards (site landing) ---------- */

/* Fixed column counts rather than auto-fit, so the four kits always sit in a
   balanced grid instead of wrapping 3 + 1. */
.product-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.product-card {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}
.product-card .thumb {
  margin: 0;
  padding: 16px;
  background: linear-gradient(160deg, #fbf9f4, #e7e2d6);
  border-bottom: 1px solid var(--line);
}
.product-card .thumb img {
  display: block;
  width: 100%;
  height: 150px;
  object-fit: contain;
  mix-blend-mode: multiply;
}
.product-card .body { padding: 16px 18px 18px; }
.product-card .body strong { font-size: 16px; }

/* ---------- Compact link list ---------- */

.linklist {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}
.linklist a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--text);
  font-size: 14.5px;
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
}
.linklist a:hover {
  border-color: var(--accent);
  background: var(--panel-2);
}
.linklist .hint {
  color: var(--muted);
  font-size: 12.5px;
  text-align: right;
}

/* ---------- Footer ---------- */

.site-footer {
  flex: none;
  margin-top: 24px;
  padding: 26px 0 34px;
  border-top: 1px solid var(--line);
  background: #0d0c0b;
  color: var(--muted);
  font-size: 13.5px;
}
.site-footer .shell {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  align-items: center;
}
.site-footer a {
  color: var(--muted);
  text-decoration: none;
}
.site-footer a:hover { color: var(--accent); }
.site-footer .footer-spacer { flex: 1; }

/* ---------- Responsive ---------- */

@media (max-width: 980px) {
  .hero .shell {
    grid-template-columns: 1fr;
    gap: 26px;
  }
  .hero-figure { max-width: 420px; }
  .hero h1 { font-size: 28px; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .shell { padding: 0 18px; }
  .section { padding: 32px 0; }
  .hero { padding: 28px 0 32px; }
  .grid { grid-template-columns: 1fr; }
  .linklist { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: 1fr; }
  .cta-row .btn {
    flex: 1 1 100%;
    justify-content: center;
  }
  .page-home { --home-mark-size: 92vw; }
  .page-home main::before {
    top: -4vh;
    left: -16vw;
  }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
