/* ==========================================================================
   Project Hub — Nocturnal Gallery
   Graphite, ivory and copper. Dark is the default; light is a full alternative.
   ========================================================================== */

@font-face {
  font-family: "Instrument Serif";
  src: url("/fonts/instrument-serif-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Instrument Serif";
  src: url("/fonts/instrument-serif-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Instrument Sans";
  src: url("/fonts/instrument-sans-normal.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

/* --------------------------------------------------------------------------
   Tokens
   -------------------------------------------------------------------------- */

:root {
  --font-display: "Instrument Serif", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  --shell: 1400px;
  --gutter: clamp(20px, 4vw, 48px);
  --radius: 22px;
  --radius-sm: 14px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  /* Dark is the canonical appearance. */
  --bg: #08090b;
  --bg-deep: #060708;
  --surface: #0f1115;
  --surface-2: #13161c;
  --surface-3: #191d24;
  --line: rgb(238 235 228 / 8%);
  --line-2: rgb(238 235 228 / 15%);
  --text: #f2efe8;
  --text-2: #a9aaa4;
  --text-3: #8a8c86;
  --accent: #dda173;
  --accent-2: #f0bc92;
  --accent-rgb: 221 161 115;
  --accent-ink: #1b120b;
  --hover: rgb(255 255 255 / 4%);
  --glow: rgb(221 161 115 / 9%);
  --chrome: #0b0d10;
  --header-bg: rgb(8 9 11 / 78%);
  --shadow: 0 26px 70px -44px rgb(0 0 0 / 85%);
  --grain-opacity: 0.035;
  --ok: #8bd7a8;

  --vault-bg: #07080a;
  --vault-surface: #0f1115;
  --vault-surface-2: #14171d;
  --vault-line: rgb(238 235 228 / 10%);
  --vault-line-2: rgb(238 235 228 / 18%);
  --vault-text: #f2efe8;
  --vault-text-2: #b0b1ab;
  --vault-text-3: #94958f;

  color-scheme: dark;
}

html[data-theme="light"] {
  --bg: #f1ede3;
  --bg-deep: #eae4d7;
  --surface: #fbf8f1;
  --surface-2: #f5f1e8;
  --surface-3: #ece6da;
  --line: rgb(23 24 19 / 12%);
  --line-2: rgb(23 24 19 / 22%);
  --text: #171812;
  --text-2: #55574e;
  --text-3: #63655b;
  --accent: #a54d17;
  --accent-2: #8a3d0e;
  --accent-rgb: 165 77 23;
  --accent-ink: #fff8ef;
  --hover: rgb(23 24 19 / 4%);
  --glow: rgb(165 77 23 / 7%);
  --chrome: #f7f3ea;
  --header-bg: rgb(241 237 227 / 82%);
  --shadow: 0 26px 60px -46px rgb(60 45 25 / 38%);
  --grain-opacity: 0.025;

  color-scheme: light;
}

/* Project accents: only a token name reaches the markup, never inline CSS. */
[data-accent="copper"] {
  --accent: #dda173;
  --accent-2: #f0bc92;
  --accent-rgb: 221 161 115;
}

[data-accent="mint"] {
  --accent: #57e6b0;
  --accent-2: #8ff4cc;
  --accent-rgb: 87 230 176;
}

[data-accent="lime"] {
  --accent: #c7f36b;
  --accent-2: #ddff9b;
  --accent-rgb: 199 243 107;
}

[data-accent="violet"] {
  --accent: #8b8aff;
  --accent-2: #b0afff;
  --accent-rgb: 139 138 255;
}

[data-accent="jade"] {
  --accent: #6ee7b7;
  --accent-2: #a0f2cf;
  --accent-rgb: 110 231 183;
}

[data-accent="green"] {
  --accent: #7ee2a8;
  --accent-2: #a8f0c4;
  --accent-rgb: 126 226 168;
}

html[data-theme="light"] .section [data-accent="copper"] {
  --accent: #a54d17;
  --accent-2: #8a3d0e;
  --accent-rgb: 165 77 23;
}

html[data-theme="light"] .section [data-accent="mint"] {
  --accent: #107e5b;
  --accent-2: #0b6347;
  --accent-rgb: 16 126 91;
}

html[data-theme="light"] .section [data-accent="lime"] {
  --accent: #567a0a;
  --accent-2: #405c07;
  --accent-rgb: 86 122 10;
}

html[data-theme="light"] .section [data-accent="violet"] {
  --accent: #4b49c9;
  --accent-2: #3735a3;
  --accent-rgb: 75 73 201;
}

html[data-theme="light"] .section [data-accent="jade"] {
  --accent: #0b7757;
  --accent-2: #085f45;
  --accent-rgb: 11 119 87;
}

html[data-theme="light"] .section [data-accent="green"] {
  --accent: #1a7145;
  --accent-2: #125434;
  --accent-rgb: 26 113 69;
}

/* --------------------------------------------------------------------------
   Reset and base
   -------------------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scrollbar-color: var(--line-2) transparent;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(920px 620px at 16% -10%, var(--glow), transparent 62%),
    radial-gradient(760px 520px at 92% 2%, rgb(96 124 152 / 5%), transparent 64%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: var(--grain-opacity);
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

img,
svg {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
p,
ol,
ul {
  margin: 0;
}

ol,
ul {
  padding: 0;
  list-style: none;
}

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

/* --------------------------------------------------------------------------
   Utilities
   -------------------------------------------------------------------------- */

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.micro {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-3);
}

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 13px;
  font-weight: 600;
  transform: translateY(-160%);
  transition: transform 0.2s var(--ease);
}

.skip:focus-visible {
  transform: none;
  outline-color: var(--text);
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 80;
  border-bottom: 1px solid transparent;
  transition: background-color 0.35s var(--ease), border-color 0.35s var(--ease);
}

.masthead.is-scrolled {
  background: var(--header-bg);
  border-bottom-color: var(--line);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
}

.masthead__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 78px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand__mark {
  display: grid;
  place-items: center;
  flex: none;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line-2);
  border-radius: 9px;
  background: linear-gradient(150deg, var(--surface-2), var(--surface));
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 15px;
  font-style: italic;
  line-height: 1;
  letter-spacing: 0.01em;
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease);
}

.brand:hover .brand__mark {
  border-color: var(--accent);
}

.brand__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.brand__name {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.005em;
}

.brand__sub {
  font-family: var(--font-mono);
  font-size: 8.5px;
  line-height: 1.2;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-3);
  white-space: nowrap;
}

.masthead__end {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

.nav a {
  position: relative;
  padding-block: 6px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-2);
  transition: color 0.25s var(--ease);
}

.nav a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s var(--ease);
}

.nav a:hover {
  color: var(--text);
}

.nav a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.theme-switch {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 64px;
  height: 34px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 3%);
}

.theme-switch__thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 29px;
  height: 28px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--surface-3);
  box-shadow: 0 4px 12px -6px rgb(0 0 0 / 55%);
  transition: transform 0.4s var(--ease);
}

html[data-theme="light"] .theme-switch__thumb {
  transform: translateX(29px);
}

.theme-switch__button {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 29px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-3);
  transition: color 0.3s var(--ease);
}

.theme-switch__button[aria-pressed="true"] {
  color: var(--text);
}

.theme-switch__button:hover {
  color: var(--accent);
}

.theme-switch__button svg {
  width: 15px;
  height: 15px;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  padding-block: clamp(44px, 5vw, 76px) clamp(46px, 6vw, 82px);
}

#projekte,
#privat {
  scroll-margin-top: 92px;
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.32fr) minmax(330px, 0.68fr);
  gap: clamp(42px, 5.5vw, 82px);
  align-items: end;
}

.kicker {
  display: flex;
  align-items: center;
  gap: 11px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  line-height: 1.4;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-2);
}

.kicker__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgb(var(--accent-rgb) / 12%);
}

.kicker__dash {
  color: var(--text-3);
}

.hero h1 {
  max-width: 15ch;
  margin-top: 26px;
  font-family: var(--font-display);
  font-size: clamp(56px, 7.9vw, 112px);
  font-weight: 400;
  line-height: 0.92;
  letter-spacing: -0.025em;
  text-wrap: balance;
  color: var(--text);
}

.hero h1 em {
  color: var(--accent);
  font-style: italic;
  padding-right: 0.04em;
}

.lede {
  max-width: 47ch;
  margin-top: 30px;
  font-size: 16px;
  line-height: 1.72;
  color: var(--text-2);
  text-wrap: pretty;
}

/* Launchpad: a compact, direct index in the first viewport. */
.launchpad {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(175deg, var(--surface-2), var(--surface));
  box-shadow: var(--shadow);
  overflow: hidden;
}

.launchpad::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgb(var(--accent-rgb) / 45%), transparent);
  opacity: 0.7;
}

.launchpad__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 20px;
  border-bottom: 1px solid var(--line);
}

.launchpad__count {
  font-family: var(--font-display);
  font-size: 21px;
  line-height: 1;
  color: var(--accent);
}

.launchpad__list {
  position: relative;
  z-index: 1;
}

.launchpad__list li + li {
  border-top: 1px solid var(--line);
}

.launchpad__row {
  display: grid;
  grid-template-columns: 22px 48px minmax(0, 1fr) 16px;
  gap: 11px;
  align-items: center;
  padding: 10px 18px;
  transition: background-color 0.28s var(--ease);
}

.launchpad__row:hover {
  background: var(--hover);
}

.launchpad__no {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  color: var(--text-3);
}

.launchpad__thumb {
  display: block;
  width: 48px;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--line-2);
  border-radius: 5px;
  background: var(--surface-3);
  overflow: hidden;
}

.launchpad__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.45s var(--ease);
}

.launchpad__row:hover .launchpad__thumb img {
  transform: scale(1.08);
}

/* The archive preview keeps its original screenshot; only the framing changes. */
.launchpad__row[data-category="Archiv"] .launchpad__thumb {
  border-color: rgb(205 170 132 / 40%);
}

.launchpad__row[data-category="Archiv"] .launchpad__thumb img {
  transform: scale(1.5);
  transform-origin: 50% 0%;
}

@media (hover: hover) and (pointer: fine) {
  .launchpad__row[data-category="Archiv"]:hover .launchpad__thumb img {
    transform: scale(1.58);
  }
}

.launchpad__text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.launchpad__name {
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.launchpad__category {
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 8px;
  line-height: 1.3;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--text-3);
}

.launchpad__arrow {
  font-size: 13px;
  color: var(--text-3);
  transition: transform 0.3s var(--ease), color 0.3s var(--ease);
}

.launchpad__row:hover .launchpad__arrow {
  color: var(--accent);
  transform: translate(2px, -2px);
}

.launchpad__foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
}

/* --------------------------------------------------------------------------
   Section
   -------------------------------------------------------------------------- */

.section {
  padding-bottom: clamp(20px, 3vw, 32px);
}

.section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  padding-top: 22px;
  padding-bottom: 26px;
  border-top: 1px solid var(--line);
  margin-bottom: clamp(24px, 3vw, 34px);
}

.section__heading .micro {
  margin-bottom: 10px;
}

.section__head h2 {
  font-family: var(--font-display);
  font-size: clamp(31px, 3.6vw, 46px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.018em;
}

.section__note {
  max-width: 40ch;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--text-3);
  text-align: right;
}

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 1.8vw, 24px);
}

.card {
  position: relative;
  isolation: isolate;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.5s var(--ease), border-color 0.4s var(--ease),
    box-shadow 0.5s var(--ease);
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(
    460px circle at var(--mx, 50%) var(--my, 0%),
    rgb(var(--accent-rgb) / 10%),
    transparent 46%
  );
  transition: opacity 0.4s var(--ease);
}

.card__link {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
}

.card__link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -4px;
  border-radius: var(--radius);
}

.card__media {
  position: relative;
  display: block;
  padding: 12px 12px 0;
}

.frame {
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--chrome);
  overflow: hidden;
  box-shadow: 0 18px 40px -30px rgb(0 0 0 / 75%);
}

.frame__bar {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 34px;
  padding-inline: 13px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.04em;
  color: var(--text-3);
}

.frame__dots {
  display: flex;
  flex: none;
  gap: 4px;
}

.frame__dots i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--line-2);
}

.frame__host {
  flex: 1;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.frame__ext {
  flex: none;
  font-size: 10px;
  color: var(--text-3);
}

.frame__screen {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--surface-3);
}

.frame__screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.8s var(--ease), filter 0.5s var(--ease);
}

.card__flag {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 6px;
  padding: 5px 9px;
  border: 1px solid rgb(var(--accent-rgb) / 30%);
  border-radius: 999px;
  background: rgb(var(--accent-rgb) / 8%);
  font-family: var(--font-mono);
  font-size: 8px;
  line-height: 1;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-2);
}

.card__flag::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
}

.card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 12px;
  padding: 22px 22px 20px;
}

.card__meta {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text-3);
}

.card__index {
  color: var(--accent);
}

.card__category {
  position: relative;
  padding-left: 17px;
}

.card__category::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 7px;
  width: 1px;
  height: 9px;
  background: var(--line-2);
  transform: translateY(-50%);
}

.card__status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  white-space: nowrap;
}

.card__status i {
  width: 5px;
  height: 5px;
  border: 1px solid var(--text-3);
  border-radius: 50%;
}

.card__status--open i {
  border-color: var(--accent);
  background: var(--accent);
}

.card__title {
  font-family: var(--font-display);
  font-size: clamp(27px, 2.35vw, 33px);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.012em;
}

.card__desc {
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-2);
  text-wrap: pretty;
}

.card__foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.card__tag {
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 8.5px;
  line-height: 1.3;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
}

.card__action {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--text);
}

.card__action span {
  display: inline-block;
  color: var(--text-2);
  transition: transform 0.3s var(--ease), color 0.3s var(--ease);
}

/* Featured, wide lead card */
.card--featured {
  grid-column: 1 / -1;
}

.card--featured .card__link {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr);
}

.card--featured .card__media {
  display: flex;
  align-items: center;
  padding: clamp(18px, 2vw, 28px);
  border-right: 1px solid var(--line);
  background:
    radial-gradient(120% 100% at 0% 0%, rgb(var(--accent-rgb) / 10%), transparent 58%),
    var(--surface-2);
}

.card--featured .frame {
  width: 100%;
  border-radius: 16px;
}

.card--featured .frame__bar {
  height: 38px;
}

.card--featured .card__body {
  justify-content: center;
  gap: 17px;
  padding: clamp(28px, 3.6vw, 52px);
}

.card--featured .card__title {
  font-size: clamp(42px, 4.4vw, 62px);
}

.card--featured .card__desc {
  max-width: 40ch;
  font-size: 15.5px;
  line-height: 1.7;
}

.card--featured .card__foot {
  align-self: stretch;
  margin-top: 18px;
}

.card--featured .card__tag {
  font-size: 8.5px;
  padding: 5px 9px;
}

.card--featured .card__action {
  font-size: 12.5px;
}

/* Hover and pointer spotlight only where a real pointer exists. */
@media (hover: hover) and (pointer: fine) {
  .card:hover {
    transform: translateY(-4px);
    border-color: var(--line-2);
    box-shadow: 0 34px 70px -44px rgb(var(--accent-rgb) / 38%), var(--shadow);
  }

  .card:hover::before {
    opacity: 1;
  }

  .card:hover .frame__screen img {
    transform: scale(1.035);
  }

  .card:hover .card__action span {
    color: var(--accent);
    transform: translate(3px, -3px);
  }
}

/*
 * Archive card: the screenshot is original and untouched. The card presents it
 * as an archival plate: a tighter CSS crop of the actual page plus a warm matte.
 * No filter, no re-encoding, no composited image.
 */
.card[data-category="Archiv"] .frame__screen img {
  transform: scale(1.68);
  transform-origin: 50% 0%;
}

.card[data-category="Archiv"] .frame {
  border-color: rgb(205 170 132 / 26%);
  background: linear-gradient(180deg, #241d18, #16110e);
}

.card[data-category="Archiv"] .frame__bar {
  border-bottom-color: rgb(205 170 132 / 18%);
  color: #d6c3ab;
}

html[data-theme="light"] .card[data-category="Archiv"] .frame {
  border-color: #d5c6b0;
  background: #ebe3d5;
}

html[data-theme="light"] .card[data-category="Archiv"] .frame__bar {
  border-bottom-color: #d5c6b0;
  color: #62513f;
}

@media (hover: hover) and (pointer: fine) {
  .card[data-category="Archiv"]:hover .frame__screen img {
    transform: scale(1.735);
  }
}

/* --------------------------------------------------------------------------
   Vault
   -------------------------------------------------------------------------- */

.vault {
  position: relative;
  margin-top: clamp(64px, 8vw, 118px);
  padding-block: clamp(64px, 8vw, 110px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--vault-bg);
  color: var(--vault-text);
  color-scheme: dark;
  overflow: hidden;

  /* The vault stays dark in both themes: it is a distinct, protected place. */
  --surface: #0f1115;
  --surface-2: #14171d;
  --surface-3: #191d24;
  --line: rgb(238 235 228 / 9%);
  --line-2: rgb(238 235 228 / 17%);
  --text: #f2efe8;
  --text-2: #b0b1ab;
  --text-3: #94958f;
  --chrome: #0b0d10;
  --hover: rgb(255 255 255 / 4%);
  --accent: #dda173;
  --accent-2: #f0bc92;
  --accent-rgb: 221 161 115;
  --shadow: 0 30px 80px -50px rgb(0 0 0 / 90%);
}

.vault__aura {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(760px 520px at 78% 18%, rgb(221 161 115 / 8%), transparent 66%),
    radial-gradient(620px 460px at 8% 86%, rgb(96 124 152 / 8%), transparent 68%);
}

.vault .micro {
  color: var(--vault-text-3);
}

.vault__grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 420px);
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}

.vault__copy {
  max-width: 56ch;
}

.vault__copy h2 {
  margin-top: 18px;
  font-family: var(--font-display);
  font-size: clamp(40px, 4.6vw, 60px);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.02em;
}

.vault__copy h2 em {
  color: var(--accent);
  font-style: italic;
}

.vault__lede {
  max-width: 45ch;
  margin-top: 26px;
  font-size: 17px;
  line-height: 1.7;
  color: var(--vault-text-2);
}

.vault__note {
  max-width: 51ch;
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid var(--vault-line);
  font-size: 13px;
  line-height: 1.7;
  color: var(--vault-text-3);
}

.vault__stage {
  position: relative;
}

.gate {
  position: relative;
  padding: clamp(22px, 2.4vw, 30px);
  border: 1px solid var(--vault-line-2);
  border-radius: 22px;
  background: linear-gradient(165deg, #15181e, #0c0e12 68%);
  box-shadow: 0 40px 90px -55px rgb(0 0 0 / 95%);
  overflow: hidden;
}

.gate::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgb(221 161 115 / 48%), transparent);
}

.gate__head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.gate__icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border: 1px solid rgb(221 161 115 / 24%);
  border-radius: 12px;
  background: rgb(221 161 115 / 8%);
  color: var(--accent);
}

.gate__icon svg {
  width: 19px;
  height: 19px;
}

.gate__eyebrow {
  color: var(--vault-text-2);
}

.gate__state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--vault-text-3);
}

.gate__state i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--vault-text-3);
}

.gate[data-state="checking"] .gate__state i,
.gate[data-state="open"] .gate__state i {
  background: var(--ok);
  box-shadow: 0 0 0 3px rgb(139 215 168 / 12%);
}

.gate[data-state="open"] .gate__state {
  color: var(--ok);
}

.gate[data-state="open"] .gate__icon {
  border-color: rgb(139 215 168 / 28%);
  background: rgb(139 215 168 / 8%);
  color: var(--ok);
}

.gate__form {
  margin-top: 26px;
}

.gate__label {
  display: block;
  margin-bottom: 9px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--vault-text-2);
}

.gate__field input {
  width: 100%;
  height: 52px;
  caret-color: var(--accent);
  padding: 0 16px;
  border: 1px solid var(--vault-line-2);
  border-radius: 12px;
  background: #07090c;
  color: var(--vault-text);
  font-size: 16px;
  letter-spacing: 0.02em;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.gate__field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgb(221 161 115 / 14%);
}

.gate__form.is-error .gate__field input {
  border-color: #e08b72;
  box-shadow: 0 0 0 3px rgb(224 139 114 / 12%);
}

.gate__submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 50px;
  margin-top: 12px;
  border: 0;
  border-radius: 12px;
  background: var(--accent);
  color: #1b120b;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: transform 0.2s var(--ease), background-color 0.25s var(--ease),
    opacity 0.2s var(--ease);
}

.gate__submit svg {
  width: 15px;
  height: 15px;
  transition: transform 0.3s var(--ease);
}

.gate__submit:hover:not(:disabled) {
  background: #eab183;
}

.gate__submit:hover:not(:disabled) svg {
  transform: translateX(3px);
}

.gate__submit:active:not(:disabled) {
  transform: translateY(1px);
}

.gate__submit:disabled {
  opacity: 0.55;
  cursor: wait;
}

.gate__hint {
  margin-top: 14px;
  font-size: 11.5px;
  line-height: 1.65;
  color: var(--vault-text-3);
}

.gate__error {
  margin-top: 14px;
  padding: 10px 12px;
  border: 1px solid rgb(224 139 114 / 30%);
  border-radius: 10px;
  background: rgb(224 139 114 / 8%);
  font-size: 12px;
  line-height: 1.55;
  color: #ffb7a3;
}

.gate__checking {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 48px 0 38px;
  font-size: 12.5px;
  color: var(--vault-text-2);
}

.gate__spinner {
  width: 14px;
  height: 14px;
  border: 1.5px solid var(--vault-line-2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.gate__open {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--vault-line);
}

.gate__status {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13.5px;
  color: var(--vault-text-2);
}

.gate__status::before {
  content: "✓";
  display: grid;
  place-items: center;
  flex: none;
  width: 19px;
  height: 19px;
  border: 1px solid rgb(139 215 168 / 34%);
  border-radius: 50%;
  background: rgb(139 215 168 / 9%);
  color: var(--ok);
  font-size: 10px;
  line-height: 1;
}

.gate__lock {
  width: 100%;
  margin-top: 16px;
  padding: 12px 16px;
  border: 1px solid var(--vault-line-2);
  border-radius: 11px;
  background: transparent;
  color: var(--vault-text-2);
  font-size: 12px;
  transition: border-color 0.25s var(--ease), color 0.25s var(--ease),
    background-color 0.25s var(--ease);
}

.gate__lock:hover {
  border-color: var(--accent);
  background: rgb(221 161 115 / 7%);
  color: var(--vault-text);
}

.vault__content {
  position: relative;
  margin-top: clamp(42px, 5vw, 64px);
}

.vault__content[hidden] {
  display: none;
}

.vault__bar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--vault-line);
  margin-bottom: 24px;
}

.vault__bar h3 {
  font-family: var(--font-display);
  font-size: clamp(26px, 2.8vw, 34px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.01em;
}

.vault__bar h3:focus {
  outline: none;
}

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

.card--private {
  background: linear-gradient(175deg, var(--surface-2), var(--surface));
}

.card--private .card__media {
  padding: 12px 12px 0;
}

.card--private .card__title {
  font-size: clamp(28px, 2.6vw, 36px);
}

/* Sealed artwork replaces private screenshots entirely. */
.sealed {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background:
    radial-gradient(120% 110% at 30% 0%, rgb(var(--accent-rgb) / 17%), transparent 56%),
    linear-gradient(155deg, var(--surface-3), #0a0c0f 78%);
}

.sealed::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.55;
  background-image: linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(62% 62% at 50% 50%, #000, transparent);
  mask-image: radial-gradient(62% 62% at 50% 50%, #000, transparent);
}

.sealed__ring {
  position: absolute;
  width: 148px;
  aspect-ratio: 1;
  border: 1px solid rgb(var(--accent-rgb) / 24%);
  border-radius: 50%;
  box-shadow: inset 0 0 50px rgb(var(--accent-rgb) / 6%);
}

.sealed__ring::after {
  content: "";
  position: absolute;
  inset: 22px;
  border: 1px solid rgb(var(--accent-rgb) / 13%);
  border-radius: 50%;
}

.sealed__mark {
  position: relative;
  z-index: 1;
  font-family: var(--font-display);
  font-size: clamp(48px, 6vw, 72px);
  font-style: italic;
  line-height: 1;
  color: rgb(var(--accent-rgb) / 92%);
  text-shadow: 0 0 40px rgb(var(--accent-rgb) / 25%);
}

.sealed__label {
  position: absolute;
  bottom: 14px;
  left: 14px;
  z-index: 1;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgb(8 10 13 / 55%);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--vault-text-3);
}

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

.footer {
  padding-block: 44px 48px;
  border-top: 1px solid var(--line);
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 19px;
  letter-spacing: -0.01em;
}

.footer__brand .brand__mark {
  width: 27px;
  height: 27px;
  border-radius: 8px;
  font-size: 12px;
}

.footer__note {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
}

.footer__meta {
  display: flex;
  align-items: center;
  gap: 18px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  color: var(--text-3);
}

.footer__meta a {
  padding-bottom: 2px;
  border-bottom: 1px solid var(--line-2);
  color: var(--text-2);
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
}

.footer__meta a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* --------------------------------------------------------------------------
   Theme transition
   -------------------------------------------------------------------------- */

html.theme-anim *,
html.theme-anim *::before,
html.theme-anim *::after {
  transition-property: color, background-color, border-color, box-shadow, fill, stroke,
    transform;
  transition-duration: 0.45s;
  transition-timing-function: var(--ease);
}

/* --------------------------------------------------------------------------
   404
   -------------------------------------------------------------------------- */

.notfound {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-height: 100vh;
  padding-block: 80px;
}

.notfound .micro {
  margin-bottom: 18px;
}

.notfound h1 {
  max-width: 16ch;
  font-family: var(--font-display);
  font-size: clamp(42px, 6vw, 76px);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.02em;
}

.notfound .lede {
  margin-top: 22px;
}

.notfound__back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 34px;
  padding: 12px 18px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-size: 12.5px;
  color: var(--text);
  transition: border-color 0.25s var(--ease), background-color 0.25s var(--ease);
}

.notfound__back:hover {
  border-color: var(--accent);
  background: var(--hover);
}

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

@media (max-width: 1180px) {
  .hero__grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
    gap: 46px;
  }

  .hero h1 {
    font-size: clamp(56px, 7.6vw, 96px);
  }

  .card--featured .card__link {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  }

  .card--featured .card__body {
    padding: 34px;
  }

  .section__note {
    max-width: 33ch;
  }
}

@media (max-width: 1080px) {
  .card--featured .card__link {
    grid-template-columns: minmax(0, 1fr);
  }

  .card--featured .card__media {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .card--featured .card__body {
    justify-content: flex-start;
    padding: clamp(28px, 4vw, 44px);
  }

  .card--featured .card__title {
    font-size: clamp(40px, 5.4vw, 56px);
  }
}

@media (max-width: 980px) {
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cards--odd > .card:not(.card--featured):last-child {
    grid-column: 1 / -1;
  }

  .cards--odd > .card:last-child .frame__screen {
    aspect-ratio: 16 / 9;
  }

  .vault__grid {
    grid-template-columns: minmax(0, 1fr) minmax(340px, 380px);
    gap: 44px;
  }
}

@media (max-width: 900px) {
  .hero {
    padding-top: 48px;
  }

  .hero__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
    align-items: start;
  }

  .hero h1 {
    max-width: 14ch;
  }

  .lede {
    max-width: 54ch;
  }

  .launchpad {
    width: 100%;
  }

  .vault__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
  }

  .vault__copy {
    max-width: 60ch;
  }

  .vault__stage {
    max-width: 480px;
  }

  .footer__inner {
    flex-wrap: wrap;
  }

  .footer__note {
    order: 3;
    width: 100%;
  }
}

@media (max-width: 760px) {
  .section__head {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }

  .section__note {
    max-width: 46ch;
    text-align: left;
  }

  .nav {
    gap: 18px;
  }

  .masthead__end {
    gap: 20px;
  }

  .footer__inner {
    flex-wrap: wrap;
  }

  .footer__note {
    order: 3;
    width: 100%;
  }
}

@media (max-width: 680px) {
  :root {
    --radius: 18px;
  }

  .cards {
    grid-template-columns: minmax(0, 1fr);
  }

  .cards--odd > .card:not(.card--featured):last-child {
    grid-column: auto;
  }

  .card--featured .card__media,
  .card__media {
    padding: 9px 9px 0;
  }

  .card--featured .card__media {
    padding: 10px;
  }

  .card__body {
    padding: 19px 18px 18px;
  }

  .card--featured .card__body {
    padding: 26px 22px 28px;
  }

  .card--featured .card__title {
    font-size: clamp(36px, 10vw, 46px);
  }

  .card__title {
    font-size: 30px;
  }

  .vault {
    margin-top: 64px;
    padding-block: 58px;
  }

  .vault__copy h2 {
    font-size: clamp(36px, 9vw, 46px);
  }

  .vault__lede {
    font-size: 16px;
  }

  .cards--private {
    grid-template-columns: minmax(0, 1fr);
  }

  .vault__bar {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .footer {
    padding-block: 34px 40px;
  }

  .footer__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .footer__note {
    order: 0;
  }
}

@media (max-width: 560px) {
  .masthead__inner {
    min-height: 68px;
  }

  .brand__mark {
    width: 30px;
    height: 30px;
  }

  .brand__sub {
    display: none;
  }

  .brand__name {
    font-size: 13px;
  }

  .masthead__end {
    gap: 14px;
  }

  .nav {
    gap: 14px;
  }

  .nav a {
    font-size: 9px;
    letter-spacing: 0.12em;
  }

  .theme-switch {
    width: 58px;
    height: 32px;
  }

  .theme-switch__thumb {
    width: 26px;
    height: 26px;
  }

  .theme-switch__button {
    width: 26px;
    height: 26px;
  }

  html[data-theme="light"] .theme-switch__thumb {
    transform: translateX(26px);
  }

  .hero {
    padding-top: 38px;
    padding-bottom: 40px;
  }

  .hero h1 {
    margin-top: 20px;
    font-size: clamp(50px, 15vw, 68px);
  }

  .kicker {
    font-size: 9px;
    letter-spacing: 0.16em;
    gap: 9px;
  }

  .lede {
    margin-top: 22px;
    font-size: 15px;
    line-height: 1.7;
  }

  .launchpad__row {
    grid-template-columns: 20px 40px minmax(0, 1fr) 14px;
    gap: 9px;
    padding: 9px 14px;
  }

  .launchpad__thumb {
    width: 40px;
  }

  .launchpad__head,
  .launchpad__foot {
    padding-inline: 14px;
  }

  .launchpad__name {
    font-size: 14px;
  }

  .section__head {
    padding-top: 18px;
    padding-bottom: 22px;
    margin-bottom: 20px;
  }

  .section__head h2 {
    font-size: 32px;
  }

  .section__note {
    font-size: 12.5px;
  }

  .card__meta {
    gap: 8px;
    font-size: 8px;
  }

  .card__desc {
    font-size: 13.5px;
  }

  .card__action {
    font-size: 11px;
  }

  .vault__note {
    font-size: 12.5px;
  }

  .gate {
    padding: 20px;
  }

  .gate__head {
    gap: 10px;
  }

  .gate__icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
  }

  .gate__state {
    font-size: 8px;
    letter-spacing: 0.1em;
  }

  .footer__meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

@media (max-width: 380px) {
  .brand__text {
    display: none;
  }

  .masthead__end {
    gap: 12px;
  }

  .launchpad__category {
    display: none;
  }

  .launchpad__row {
    grid-template-columns: 20px 40px minmax(0, 1fr) 14px;
  }

  .launchpad__foot span:last-child {
    display: none;
  }


}

/* Phone widths: readable meta on two rows instead of 8px microtype. */
@media (max-width: 430px) {
  .card__meta {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 5px 8px;
    font-size: 10px;
    letter-spacing: 0.11em;
  }

  .card__index {
    grid-column: 1;
    grid-row: 1;
  }

  .card__category {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    padding-left: 15px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .card__status {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: start;
    margin-left: 0;
    padding-top: 5px;
    font-size: 10px;
    letter-spacing: 0.1em;
  }

  .card__status i {
    width: 6px;
    height: 6px;
  }

  .card__tag {
    font-size: 9.5px;
    padding: 4px 7px;
  }

  .card__action {
    font-size: 11.5px;
  }
}

/* --------------------------------------------------------------------------
   Reduced motion
   -------------------------------------------------------------------------- */

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

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

  .gate__spinner {
    animation: none;
    border-top-color: var(--accent);
  }
}
