:root {
  color-scheme: light;
  --background: #f3f0e8;
  --surface: #fbfaf6;
  --surface-strong: #ffffff;
  --text: #191a17;
  --muted: #666961;
  --soft: #858980;
  --border: rgba(25, 26, 23, 0.13);
  --border-strong: rgba(25, 26, 23, 0.22);
  --accent: #dba900;
  --accent-ink: #201b08;
  --focus: #b18400;
  --shadow: 0 18px 45px rgba(36, 31, 18, 0.08);
  --radius: 1.25rem;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --background: #10110f;
  --surface: #171815;
  --surface-strong: #1d1e1a;
  --text: #f2f2eb;
  --muted: #a7aaa0;
  --soft: #85897e;
  --border: rgba(242, 242, 235, 0.12);
  --border-strong: rgba(242, 242, 235, 0.2);
  --accent: #f0be16;
  --accent-ink: #171407;
  --focus: #f0be16;
  --shadow: 0 20px 55px rgba(0, 0, 0, 0.28);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]),
  :root[data-theme="system"] {
    color-scheme: dark;
    --background: #10110f;
    --surface: #171815;
    --surface-strong: #1d1e1a;
    --text: #f2f2eb;
    --muted: #a7aaa0;
    --soft: #85897e;
    --border: rgba(242, 242, 235, 0.12);
    --border-strong: rgba(242, 242, 235, 0.2);
    --accent: #f0be16;
    --accent-ink: #171407;
    --focus: #f0be16;
    --shadow: 0 20px 55px rgba(0, 0, 0, 0.28);
  }
}

* {
  box-sizing: border-box;
}

html {
  min-width: 20rem;
  background: var(--background);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 10% -10%, color-mix(in srgb, var(--accent) 9%, transparent), transparent 28rem),
    var(--background);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

button,
select,
input,
textarea {
  font: inherit;
}

a {
  color: inherit;
}

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

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: 0.65rem;
  color: var(--accent-ink);
  background: var(--accent);
  font-weight: 700;
  transform: translateY(-150%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-shell {
  width: min(100% - 2.5rem, 70rem);
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 5.5rem;
  gap: 1rem;
  border-bottom: 1px solid var(--border);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  font-size: 1.08rem;
  font-weight: 750;
  letter-spacing: -0.03em;
}

.brand-mark {
  display: grid;
  width: 1.75rem;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 0.55rem;
  color: var(--accent-ink);
  background: var(--accent);
  font-size: 1rem;
  font-weight: 800;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.segmented-control {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
}

.control-button {
  display: grid;
  min-width: 2.15rem;
  min-height: 2.15rem;
  padding: 0.35rem 0.55rem;
  place-items: center;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 750;
  line-height: 1;
}

.control-button svg {
  width: 1rem;
  height: 1rem;
  stroke-width: 1.8;
}

.control-button:hover {
  color: var(--text);
}

.control-button[aria-pressed="true"] {
  color: var(--text);
  background: var(--surface-strong);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.control-button:focus-visible,
.brand:focus-visible,
.app-card:focus-visible,
.text-link:focus-visible,
.support-link:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--focus) 70%, transparent);
  outline-offset: 3px;
}

.intro {
  max-width: 45rem;
  padding: clamp(4.5rem, 9vw, 7.75rem) 0 clamp(3rem, 6vw, 5rem);
}

.eyebrow {
  margin: 0 0 0.9rem;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.intro h1 {
  max-width: 14ch;
  margin: 0;
  font-size: clamp(2.7rem, 7vw, 5.4rem);
  font-weight: 760;
  letter-spacing: -0.07em;
  line-height: 0.98;
}

.intro-copy {
  max-width: 38rem;
  margin: 1.5rem 0 0;
  color: var(--muted);
  font-size: clamp(1.04rem, 2vw, 1.25rem);
}

.projects {
  padding-bottom: 1rem;
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.section-heading h2 {
  margin: 0;
  font-size: 1.03rem;
  letter-spacing: -0.02em;
}

.project-count {
  margin: 0;
  color: var(--soft);
  font-size: 0.82rem;
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.app-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03);
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.app-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
  transform: translateY(-0.25rem);
}

.app-card-unavailable:hover {
  border-color: var(--border);
  box-shadow: none;
  transform: none;
}

.app-preview {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  background: #232323;
}

.app-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 350ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.app-card:hover .app-preview img {
  transform: scale(1.025);
}

.app-preview-placeholder {
  display: grid;
  place-content: center;
  color: #eeeee7;
  background:
    linear-gradient(135deg, rgba(240, 190, 22, 0.18), transparent 50%),
    radial-gradient(circle at 70% 35%, #303328, transparent 28%),
    #171815;
  text-align: center;
}

.placeholder-mark {
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  font-weight: 780;
  letter-spacing: -0.06em;
}

.placeholder-copy {
  margin-top: 0.35rem;
  color: #a8aa9f;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.status-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.34rem 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: #f8f8f2;
  background: rgba(10, 10, 9, 0.68);
  backdrop-filter: blur(10px);
  font-size: 0.66rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.app-card-body {
  display: flex;
  min-height: 10.6rem;
  padding: 1.2rem;
  flex-direction: column;
}

.app-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.app-title-row h3 {
  margin: 0;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
}

.external-arrow {
  color: var(--soft);
  font-size: 1.1rem;
  line-height: 1;
  transition: color 180ms ease, transform 180ms ease;
}

.app-card:hover .external-arrow {
  color: var(--text);
  transform: translate(0.12rem, -0.12rem);
}

.app-description {
  margin: 0.5rem 0 1.25rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.app-action {
  margin-top: auto;
  color: var(--text);
  font-size: 0.77rem;
  font-weight: 750;
}

.support-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  margin-top: clamp(3.5rem, 7vw, 6rem);
  padding: clamp(1.25rem, 4vw, 2rem);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 78%, transparent);
}

.support-copy h2 {
  margin: 0;
  font-size: 1.08rem;
  letter-spacing: -0.025em;
}

.support-copy p {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.support-link {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.45rem;
  padding: 0.72rem 0.95rem;
  border-radius: 999px;
  color: var(--accent-ink);
  background: var(--accent);
  font-size: 0.82rem;
  font-weight: 800;
  text-decoration: none;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 2.75rem 0 3rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.text-link {
  text-decoration-color: color-mix(in srgb, currentColor 40%, transparent);
  text-underline-offset: 0.22em;
}

.text-link:hover {
  color: var(--text);
  text-decoration-color: currentColor;
}

.legal-shell,
.message-shell {
  width: min(100% - 2.5rem, 45rem);
  margin-inline: auto;
}

.legal-main,
.message-main {
  padding: clamp(3.5rem, 8vw, 6rem) 0 1rem;
}

.legal-main h1,
.message-main h1 {
  margin: 0;
  font-size: clamp(2.4rem, 8vw, 4.2rem);
  letter-spacing: -0.06em;
  line-height: 1;
}

.legal-date,
.message-copy {
  margin: 0.8rem 0 2.75rem;
  color: var(--muted);
}

.legal-main h2 {
  margin: 2.5rem 0 0.55rem;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.legal-main p,
.legal-main ul {
  margin: 0 0 1rem;
}

.legal-main ul {
  padding-left: 1.25rem;
}

.legal-main li {
  margin-bottom: 0.35rem;
}

.legal-main a,
.message-main a {
  text-decoration-color: color-mix(in srgb, currentColor 45%, transparent);
  text-underline-offset: 0.2em;
}

.legal-main a:hover,
.message-main a:hover {
  color: var(--accent);
}

[data-language-panel="de"] {
  display: none;
}

html[lang="de"] [data-language-panel="en"] {
  display: none;
}

html[lang="de"] [data-language-panel="de"] {
  display: block;
}

.translation-note {
  padding: 0.85rem 1rem;
  border-left: 3px solid var(--accent);
  color: var(--muted);
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  font-size: 0.88rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 2rem;
  font-weight: 700;
}

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

@media (max-width: 54rem) {
  .app-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 40rem) {
  .site-shell,
  .legal-shell,
  .message-shell {
    width: min(100% - 1.5rem, 70rem);
  }

  .site-header {
    min-height: 4.75rem;
  }

  .brand {
    gap: 0.5rem;
  }

  .brand-mark {
    width: 1.55rem;
    border-radius: 0.48rem;
  }

  .header-controls {
    gap: 0.35rem;
  }

  .control-button {
    min-width: 1.85rem;
    min-height: 1.85rem;
    padding-inline: 0.4rem;
  }

  .intro {
    padding-top: 4rem;
  }

  .intro h1 {
    font-size: clamp(2.55rem, 14vw, 4rem);
  }

  .app-grid {
    grid-template-columns: 1fr;
  }

  .app-card-body {
    min-height: 9.6rem;
  }

  .support-panel,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .support-panel {
    gap: 1.25rem;
  }

  .site-footer {
    gap: 0.65rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
