/* Jakob Hub – Apple-inspirierte, eigenstaendige Portal-Designsprache. */

:root {
  color-scheme: dark;
  --hub-bg: #000000;
  --hub-surface: #1c1c1e;
  --hub-surface-raised: #2c2c2e;
  --hub-surface-soft: #111113;
  --hub-section-tint: #0b0b0d;
  --hub-text: #f5f5f7;
  --hub-muted: #a1a1a6;
  --hub-faint: #747478;
  --hub-line: rgba(255, 255, 255, 0.10);
  --hub-line-strong: rgba(255, 255, 255, 0.18);
  --hub-accent: #0a84ff;
  --hub-accent-hover: #409cff;
  --hub-on-accent: #ffffff;
  /* Flaechen mit --hub-on-accent-Schrift (gefuellte Buttons). --hub-accent selbst bleibt fuer
     Text/Ringe auf dunklem Grund; weiss darauf haette nur 3,6:1. #0071e3 = 4,7:1, Hover 5,9:1. */
  --hub-accent-fill: #0071e3;
  --hub-accent-fill-hover: #0062c4;
  --hub-focus: #64a8ff;
  --hub-ok: #30d158;
  --hub-warn: #ffd60a;
  --hub-danger: #ff453a;
  --hub-shadow: 0 18px 50px rgba(0, 0, 0, 0.26);
  --hub-shadow-soft: 0 8px 30px rgba(0, 0, 0, 0.14);
  --hub-radius-sm: 12px;
  --hub-radius: 22px;
  --hub-radius-lg: 30px;
  --hub-content: 1240px;
  --hub-pad: clamp(20px, 4vw, 48px);
  --hub-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Arial, system-ui, sans-serif;
}

html[data-theme='light'] {
  color-scheme: light;
  --hub-bg: #f5f5f7;
  --hub-surface: #ffffff;
  --hub-surface-raised: #f0f0f2;
  --hub-surface-soft: #fbfbfd;
  --hub-section-tint: #ffffff;
  --hub-text: #1d1d1f;
  --hub-muted: #6e6e73;
  --hub-faint: #86868b;
  --hub-line: rgba(0, 0, 0, 0.08);
  --hub-line-strong: rgba(0, 0, 0, 0.14);
  --hub-accent: #0071e3;
  --hub-accent-hover: #0077ed;
  --hub-on-accent: #ffffff;
  --hub-accent-fill: #0071e3;
  --hub-accent-fill-hover: #0062c4;
  --hub-focus: #0066cc;
  --hub-ok: #248a3d;
  --hub-warn: #a05a00;
  --hub-danger: #d70015;
  --hub-shadow: 0 18px 50px rgba(0, 0, 0, 0.10);
  --hub-shadow-soft: 0 8px 28px rgba(0, 0, 0, 0.07);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--hub-bg);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--hub-bg);
  color: var(--hub-text);
  font-family: var(--hub-font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Nur Formularelemente erben. body darf hier nicht stehen: sonst erbt es die Schrift von
   <html> (ohne Angabe) und die ganze Seite fällt auf Times New Roman zurück. */
button,
input,
select,
textarea {
  font: inherit;
}

a {
  color: inherit;
}

button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--hub-focus);
  outline-offset: 3px;
}

::selection {
  background: color-mix(in srgb, var(--hub-accent) 74%, transparent);
  color: #ffffff;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 1000;
  padding: 11px 16px;
  border-radius: 999px;
  background: var(--hub-text);
  color: var(--hub-bg);
  box-shadow: var(--hub-shadow-soft);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: none;
}

.hub-wrap {
  width: min(100%, var(--hub-content));
  margin: 0 auto;
  padding-inline: var(--hub-pad);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--hub-line);
  background: color-mix(in srgb, var(--hub-bg) 76%, transparent);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
}

.site-header__inner {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  color: var(--hub-text);
  text-decoration: none;
  white-space: nowrap;
}

.brand__name {
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -0.028em;
}

.brand__sub {
  color: var(--hub-muted);
  font-size: 0.76rem;
  font-weight: 500;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}

.site-nav a,
.header-action {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--hub-muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 550;
  cursor: pointer;
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease;
}

.site-nav a:hover,
.header-action:hover {
  color: var(--hub-text);
  background: color-mix(in srgb, var(--hub-surface) 82%, transparent);
}

.header-action {
  border-color: var(--hub-line);
  background: color-mix(in srgb, var(--hub-surface) 62%, transparent);
}

.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(78px, 11vw, 150px) clamp(72px, 9vw, 116px);
}

.hero::before {
  content: '';
  position: absolute;
  width: min(64vw, 820px);
  aspect-ratio: 1;
  top: -48%;
  right: -17%;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--hub-accent) 16%, transparent), transparent 68%);
  pointer-events: none;
}

.hero__grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(270px, 0.58fr);
  gap: clamp(44px, 8vw, 104px);
  align-items: end;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--hub-accent);
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 860px;
  margin: 0;
  font-size: clamp(3.3rem, 7.2vw, 6.5rem);
  line-height: 0.94;
  letter-spacing: -0.065em;
  font-weight: 720;
  text-wrap: balance;
}

.hero__lead {
  max-width: 660px;
  margin: 30px 0 0;
  color: var(--hub-muted);
  font-size: clamp(1.05rem, 1.7vw, 1.24rem);
  line-height: 1.58;
  letter-spacing: -0.012em;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 34px;
}

.button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 20px;
  border: 1px solid var(--hub-line-strong);
  border-radius: 999px;
  background: color-mix(in srgb, var(--hub-surface) 68%, transparent);
  color: var(--hub-text);
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.button--primary {
  border-color: var(--hub-accent-fill);
  background: var(--hub-accent-fill);
  color: var(--hub-on-accent);
}

.button:hover {
  border-color: var(--hub-line-strong);
  background: var(--hub-surface-raised);
  transform: translateY(-1px);
}

.button--primary:hover {
  border-color: var(--hub-accent-fill-hover);
  background: var(--hub-accent-fill-hover);
}

.hero__facts {
  margin: 0;
  padding: 12px 22px;
  display: grid;
  border: 1px solid var(--hub-line);
  border-radius: var(--hub-radius-lg);
  background: color-mix(in srgb, var(--hub-surface) 78%, transparent);
  box-shadow: var(--hub-shadow-soft);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.hero__facts div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 0;
  border-bottom: 1px solid var(--hub-line);
}

.hero__facts div:last-child {
  border-bottom: 0;
}

.hero__facts dt {
  color: var(--hub-muted);
}

.hero__facts dd {
  margin: 0;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.section {
  padding-block: clamp(72px, 9vw, 116px);
}

#games,
#projects {
  background: var(--hub-section-tint);
}

.section__head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 34px;
  margin-bottom: 38px;
}

.section__head h2 {
  margin: 0;
  font-size: clamp(2rem, 4.3vw, 3.6rem);
  line-height: 0.98;
  letter-spacing: -0.052em;
  font-weight: 700;
}

.section__head p {
  max-width: 560px;
  margin: 0;
  color: var(--hub-muted);
  line-height: 1.55;
  letter-spacing: -0.01em;
}

.search-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.search-row label {
  color: var(--hub-muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.search-input {
  min-width: min(100%, 300px);
  min-height: 48px;
  flex: 1;
  padding: 0 18px;
  border: 1px solid var(--hub-line);
  border-radius: 999px;
  background: var(--hub-surface);
  color: var(--hub-text);
  box-shadow: inset 0 0 0 1px transparent;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.search-input:hover {
  border-color: var(--hub-line-strong);
}

.search-input:focus {
  border-color: color-mix(in srgb, var(--hub-accent) 70%, transparent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--hub-accent) 18%, transparent);
}

.search-input::placeholder {
  color: var(--hub-faint);
}

.filter-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-chip {
  min-height: 40px;
  padding: 0 15px;
  border: 1px solid var(--hub-line);
  border-radius: 999px;
  background: var(--hub-surface);
  color: var(--hub-muted);
  font-size: 0.88rem;
  cursor: pointer;
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease;
}

.filter-chip:hover {
  color: var(--hub-text);
  border-color: var(--hub-line-strong);
}

.filter-chip[aria-pressed='true'] {
  border-color: var(--hub-text);
  background: var(--hub-text);
  color: var(--hub-bg);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: 18px;
}

.card-grid--featured {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.catalog-card {
  position: relative;
  min-height: 240px;
  display: flex;
  flex-direction: column;
  padding: 22px;
  border: 1px solid var(--hub-line);
  border-radius: var(--hub-radius);
  background: var(--hub-surface);
  box-shadow: var(--hub-shadow-soft);
  overflow: hidden;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

.catalog-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(145deg, color-mix(in srgb, var(--hub-accent) 5%, transparent), transparent 38%);
  pointer-events: none;
}

.catalog-card:hover {
  border-color: var(--hub-line-strong);
  background: color-mix(in srgb, var(--hub-surface) 93%, var(--hub-surface-raised));
  box-shadow: var(--hub-shadow);
  transform: translateY(-3px);
}

.catalog-card--featured {
  min-height: 300px;
  padding: clamp(24px, 4vw, 34px);
}

.catalog-card__top {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.catalog-card__type {
  color: var(--hub-faint);
  font-size: 0.71rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.favorite {
  position: relative;
  z-index: 2;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--hub-line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--hub-bg) 34%, transparent);
  color: var(--hub-muted);
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.favorite:hover {
  color: var(--hub-text);
  background: var(--hub-surface-raised);
  transform: scale(1.04);
}

.favorite[aria-pressed='true'] {
  border-color: color-mix(in srgb, var(--hub-accent) 58%, var(--hub-line));
  color: var(--hub-accent);
}

.catalog-card__body {
  position: relative;
  margin-top: auto;
  padding-top: 42px;
}

.catalog-card h3 {
  margin: 0;
  font-size: clamp(1.45rem, 2.4vw, 2.15rem);
  line-height: 1.04;
  letter-spacing: -0.042em;
  font-weight: 680;
}

.catalog-card p {
  margin: 11px 0 0;
  color: var(--hub-muted);
  line-height: 1.48;
  letter-spacing: -0.008em;
}

.catalog-card__meta {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
  color: var(--hub-faint);
  font-size: 0.82rem;
}

.catalog-card__link {
  color: var(--hub-accent);
  font-weight: 620;
  text-decoration: none;
}

.catalog-card__link::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.project-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px;
  align-items: center;
  padding: clamp(28px, 5vw, 48px);
  border: 1px solid var(--hub-line);
  border-radius: var(--hub-radius-lg);
  background: var(--hub-surface);
  box-shadow: var(--hub-shadow-soft);
}

.project-card h3 {
  margin: 0 0 12px;
  font-size: clamp(1.9rem, 4vw, 3.25rem);
  line-height: 1;
  letter-spacing: -0.05em;
  font-weight: 700;
}

.project-card p {
  max-width: 700px;
  margin: 0;
  color: var(--hub-muted);
  line-height: 1.58;
}

.empty-state {
  padding: 30px;
  border: 1px solid var(--hub-line);
  border-radius: var(--hub-radius);
  background: var(--hub-surface);
  color: var(--hub-muted);
  box-shadow: var(--hub-shadow-soft);
}

[hidden] {
  display: none !important;
}

.site-footer {
  padding-block: 42px 64px;
  border-top: 1px solid var(--hub-line);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 18px;
  color: var(--hub-muted);
  font-size: 0.9rem;
}

.site-footer a {
  color: var(--hub-accent);
  text-underline-offset: 3px;
}

@media (max-width: 820px) {
  .site-header__inner {
    flex-wrap: wrap;
    padding-block: 8px;
  }

  .site-nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
    margin-left: 0;
    padding-bottom: 2px;
  }

  .hero {
    padding-top: clamp(62px, 12vw, 96px);
  }

  .hero__grid,
  .card-grid--featured {
    grid-template-columns: 1fr;
  }

  .hero__facts {
    max-width: 560px;
  }

  .section__head,
  .project-card {
    align-items: start;
    grid-template-columns: 1fr;
  }

  .section__head {
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .brand__sub {
    display: none;
  }

  .site-header__inner {
    gap: 8px;
  }

  .site-nav a,
  .header-action {
    padding-inline: 11px;
  }

  .catalog-card {
    min-height: 214px;
  }

  .catalog-card--featured {
    min-height: 246px;
  }

  .hero__actions .button {
    flex: 1 1 auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .button:hover,
  .catalog-card:hover,
  .favorite:hover {
    transform: none;
  }
}
