/* styles.css */
/* Comments intentionally in English. */

/* Typography: Mona Sans (via CDN) */
@font-face {
  font-family: "Mona Sans";
  font-style: normal;
  font-display: swap;
  font-weight: 200 900;
  src: url("https://cdn.jsdelivr.net/fontsource/fonts/mona-sans:vf@latest/latin-wght-normal.woff2")
    format("woff2-variations");
}

:root {
  color-scheme: dark;

  --bg: #050607;
  --fg: #e9e9ea;
  --muted: rgba(233, 233, 234, 0.68);
  --line: rgba(233, 233, 234, 0.12);
  --panel: rgba(255, 255, 255, 0.02);

  /* UI tuning */
  --thumb-size: 104px; /* <--- make thumbnails bigger here */
  --thumb-radius: 18px;
  --gallery-width: clamp(320px, 42vw, 480px);

  /* Status colors (subtle but clear on dark UI) */
  --proto: #7ee787;
  --proto_border: rgba(126, 231, 135, 0.28);
  --proto_bg: rgba(126, 231, 135, 0.07);

  --dev: #79c0ff;
  --dev_border: rgba(121, 192, 255, 0.28);
  --dev_bg: rgba(121, 192, 255, 0.07);

  --concept: #d2a8ff;
  --concept_border: rgba(210, 168, 255, 0.28);
  --concept_bg: rgba(210, 168, 255, 0.07);

  /* Platform accent (Powered by) */
  --taktwerk: #ffb86b;
  --taktwerk_border: rgba(255, 184, 107, 0.30);
  --taktwerk_bg: rgba(255, 184, 107, 0.08);

  /* Domain tags (Analog / Hybrid / Digital) */
  --analog: #ff6b6b;
  --analog_border: rgba(255, 107, 107, 0.30);
  --analog_bg: rgba(255, 107, 107, 0.08);

  --digital: #4dd4ff;
  --digital_border: rgba(77, 212, 255, 0.30);
  --digital_bg: rgba(77, 212, 255, 0.08);

  --hybrid: #f6d365;
  --hybrid_border: rgba(246, 211, 101, 0.30);
  --hybrid_bg: rgba(246, 211, 101, 0.08);
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Mona Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  letter-spacing: 0.2px;
}

/* Safety: never let images overflow layout. */
img { max-width: 100%; height: auto; }

a {
  color: var(--fg);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}

a:hover { border-bottom-color: rgba(233, 233, 234, 0.35); }

.wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 72px 20px;
}

.panel {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 18px;
  padding: 28px;
}

/* Top bar with kicker + logo */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.kicker {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 12px;
}

.brand-mark {
  width: 150px;
  height: 75px;
  opacity: 0.95;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.01);
}

h1 {
  margin: 14px 0 10px;
  font-size: clamp(32px, 4.2vw, 56px);
  line-height: 1.03;
  letter-spacing: -0.01em;
}

.lead {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.55;
  max-width: 62ch;
  font-size: 16px;
}

hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 18px 0;
}

.small {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}

.footer {
  margin-top: 18px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 14px;
}

.dot { opacity: 0.5; }

/* ------------------------------------------------------------ */
/* HOME CARDS GRID */
/* ------------------------------------------------------------ */
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  min-height: 120px;
  background: rgba(255, 255, 255, 0.01);
}

/* Make cards clickable without looking like links */
.card-link {
  display: block;
  border-bottom: none; /* override global link underline border */
}

.card-link:hover { border-color: rgba(233, 233, 234, 0.22); }

.card-link:focus-visible {
  outline: 2px solid rgba(233, 233, 234, 0.35);
  outline-offset: 2px;
}

.label {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.9;
  margin-bottom: 8px;
}

.card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
  font-size: 14px;
}

/* ------------------------------------------------------------ */
/* Pills (legend/status) */
/* ------------------------------------------------------------ */
.pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(233,233,234,0.85);
  background: rgba(255, 255, 255, 0.01);
}

.pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(233, 233, 234, 0.35);
}

/* Colored pills */
.pill.prototype { border-color: var(--proto_border) !important; }
.pill.prototype .pill-dot { background: var(--proto) !important; }

.pill.dev { border-color: var(--dev_border) !important; }
.pill.dev .pill-dot { background: var(--dev) !important; }

.pill.concept { border-color: var(--concept_border) !important; }
.pill.concept .pill-dot { background: var(--concept) !important; }

/* Domain pills */
.pill.analog { border-color: var(--analog_border) !important; }
.pill.analog .pill-dot { background: var(--analog) !important; }

.pill.digital { border-color: var(--digital_border) !important; }
.pill.digital .pill-dot { background: var(--digital) !important; }

.pill.hybrid { border-color: var(--hybrid_border) !important; }
.pill.hybrid .pill-dot { background: var(--hybrid) !important; }

/* ------------------------------------------------------------ */
/* Badges */
/* ------------------------------------------------------------ */
.badge {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(233,233,234,0.8);
  background: rgba(255, 255, 255, 0.01);
}

/* Colored status badges */
.badge.prototype { color: var(--proto) !important; border-color: var(--proto_border) !important; background: var(--proto_bg) !important; }
.badge.dev { color: var(--dev) !important; border-color: var(--dev_border) !important; background: var(--dev_bg) !important; }
.badge.concept { color: var(--concept) !important; border-color: var(--concept_border) !important; background: var(--concept_bg) !important; }

/* Platform badge */
.badge.taktwerk { color: var(--taktwerk) !important; border-color: var(--taktwerk_border) !important; background: var(--taktwerk_bg) !important; }

/* Neutral badge */
.badge.meta { color: rgba(233,233,234,0.72) !important; border-color: var(--line) !important; background: rgba(255,255,255,0.01) !important; }

/* Domain badges */
.badge.analog { color: var(--analog) !important; border-color: var(--analog_border) !important; background: var(--analog_bg) !important; }
.badge.digital { color: var(--digital) !important; border-color: var(--digital_border) !important; background: var(--digital_bg) !important; }
.badge.hybrid { color: var(--hybrid) !important; border-color: var(--hybrid_border) !important; background: var(--hybrid_bg) !important; }

/* ------------------------------------------------------------ */
/* Modules layout */
/* ------------------------------------------------------------ */
.module-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.module {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.01);
}

.module-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: nowrap;
}

.module-main {
  min-width: 0;
  flex: 1 1 auto;
}

.module-name {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
}

.module-sub {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.5;
  font-size: 14px;
  max-width: 70ch;
}

.module-badges {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Gallery wrapper (right side) */
.gallery-wrapper {
  flex: 0 0 auto;
  width: var(--gallery-width);
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Nav buttons */
.nav-btn {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.01);
  color: rgba(233, 233, 234, 0.85);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
}

.nav-btn:hover { border-color: rgba(233, 233, 234, 0.22); }

.nav-btn:focus-visible {
  outline: 2px solid rgba(233, 233, 234, 0.35);
  outline-offset: 2px;
}

/* Scrollable thumbnail row */
.module-thumbs {
  flex: 1 1 auto;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 2px 8px;
  border-radius: 14px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;

  /* Hide scrollbars for a cleaner "slider" look */
  scrollbar-width: none; /* Firefox */
}

.module-thumbs::-webkit-scrollbar { display: none; } /* WebKit */

/* Thumbnails */
.thumb {
  flex: 0 0 auto;
  width: var(--thumb-size);
  height: var(--thumb-size);
  border: 1px solid var(--line);
  border-radius: var(--thumb-radius);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.01);
  scroll-snap-align: start;
  cursor: pointer;
}

.thumb:hover { border-color: rgba(233, 233, 234, 0.22); }

.thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

/* Specs grid */
.specs {
  margin-top: 12px;
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.spec {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.spec strong {
  color: var(--fg);
  font-weight: 600;
}

/* ------------------------------------------------------------ */
/* Lightbox */
/* ------------------------------------------------------------ */
.lightbox {
  display: none;
  opacity: 0;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(5, 6, 7, 0.88);
  align-items: center;
  justify-content: center;
  padding: 24px;
  transition: opacity 0.28s ease;
}

.lightbox img {
  max-width: min(1100px, 92vw);
  max-height: 86vh;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.01);
}

.lightbox-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  color: rgba(233, 233, 234, 0.9);
  font-size: 28px;
  line-height: 38px;
  text-align: center;
  cursor: pointer;
  user-select: none;
}

.lightbox-close:hover { border-color: rgba(233, 233, 234, 0.22); }

.lb-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  color: rgba(233, 233, 234, 0.9);
  font-size: 22px;
  cursor: pointer;
  user-select: none;
}

.lb-nav-btn:hover { border-color: rgba(233, 233, 234, 0.22); }

.lb-left { left: 18px; }
.lb-right { right: 18px; }

/* ------------------------------------------------------------ */
/* Responsive */
/* ------------------------------------------------------------ */
@media (max-width: 820px) {
  .brand-mark { width: 40px; height: 40px; }

  /* Home cards stack */
  .grid { grid-template-columns: 1fr; }

  /* Modules */
  .specs { grid-template-columns: 1fr; }
  .module-header { flex-wrap: wrap; }
  .gallery-wrapper { width: 100%; }

  /* Slightly smaller thumbs on mobile */
  :root {
    --thumb-size: 88px;
    --gallery-width: 100%;
  }

  /* Lightbox nav */
  .lb-left { left: 10px; }
  .lb-right { right: 10px; }
}
