/* ==========================================================================
   Studio Jiloco – Stylesheet
   Studio: ruhiges Papier + Tinte. Farbe gehört den Spielen:
   .theme-orefall (warmer Stollen, Erz-Amber) und .theme-tetherlight (Tinte, Licht).
   Gestaltungsregeln: siehe .claude/skills/unslop (CC BY 4.0, Damir Sokolovsky).
   ========================================================================== */

/* ---------- Fonts (lokal gehostet → keine Daten an Google) */
@font-face { font-family: "Bricolage Grotesque"; font-weight: 400; font-display: swap; src: url("../fonts/bricolage-grotesque-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Bricolage Grotesque"; font-weight: 500; font-display: swap; src: url("../fonts/bricolage-grotesque-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Bricolage Grotesque"; font-weight: 600; font-display: swap; src: url("../fonts/bricolage-grotesque-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-weight: 400; font-display: swap; src: url("../fonts/instrument-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-weight: 500; font-display: swap; src: url("../fonts/instrument-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-weight: 600; font-display: swap; src: url("../fonts/instrument-sans-latin-600-normal.woff2") format("woff2"); }

/* ---------- Tokens: Studio (Papier & Tinte) */
:root, .theme-studio {
  --bg: #f7f4ee;
  --surface: #fdfbf7;
  --raised: #efe9df;
  --text: #1f1b16;
  --text-2: #5e554a;
  --muted: #7b7266;
  --line: rgba(31, 27, 22, 0.1);
  --accent: #a8481a;
  --btn-bg: #1f1b16;
  --btn-fg: #fdfbf7;
  --btn2-bg: #efe9df;
  --focus: #a8481a;
  color-scheme: light;
}

/* Orefall: warmer Stollen, Erz als Akzent */
.theme-orefall {
  --bg: #14110e;
  --surface: #1c1814;
  --raised: #262019;
  --text: #efe9de;
  --text-2: #aaa398;
  --muted: #8a847a;
  --line: rgba(239, 233, 222, 0.09);
  --accent: #e3a440;
  --btn-bg: #e3a440;
  --btn-fg: #1f1408;
  --btn2-bg: #262019;
  --focus: #e3a440;
  color-scheme: dark;
}

/* Tetherlight: Tinte und ein einzelnes Licht */
.theme-tetherlight {
  --bg: #0b0d14;
  --surface: #11141c;
  --raised: #1a1e28;
  --text: #eef0f5;
  --text-2: #a3a9b8;
  --muted: #7a8296;
  --line: rgba(238, 240, 245, 0.09);
  --accent: #a9d4ff;
  --btn-bg: #eef0f5;
  --btn-fg: #0b0d14;
  --btn2-bg: #1a1e28;
  --focus: #a9d4ff;
  color-scheme: dark;
}

:root {
  --font-display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --font-ui: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --container: 1200px;
  --gutter: 32px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-decoration-thickness: 1px; text-underline-offset: 4px; transition: color 160ms var(--ease), text-decoration-color 160ms var(--ease); }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; border-radius: 4px; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 500; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); line-height: 1.04; letter-spacing: -0.03em; }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.5rem); line-height: 1.1; letter-spacing: -0.02em; }
h3 { font-size: 1.25rem; line-height: 1.3; letter-spacing: -0.005em; }
p { margin: 0; }
.sub { font-size: clamp(1.0625rem, 1.5vw, 1.25rem); line-height: 1.55; color: var(--text-2); max-width: 36rem; }
.meta { font-size: 0.875rem; line-height: 1.4; color: var(--muted); font-variant-numeric: tabular-nums; }

.container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
@media (max-width: 720px) { :root { --gutter: 16px; } }
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--btn-bg); color: var(--btn-fg); padding: 8px 16px; border-radius: 8px; }
.skip-link:focus { left: 8px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Platzhalter (nur in Rechtstexten) – bewusst auffällig, damit nichts vergessen wird */
.ph { background: #fff1b8; color: #5c4400; outline: 1px dashed #c9a227; border-radius: 4px; padding: 0 4px; font-style: normal; }

/* ---------- Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 20px; border-radius: 10px;
  font: 500 1rem/1 var(--font-ui); text-decoration: none; white-space: nowrap;
  border: 1px solid transparent; cursor: pointer;
  transition: background-color 160ms var(--ease), border-color 160ms var(--ease), color 160ms var(--ease), transform 120ms var(--ease);
}
.btn:active { transform: scale(0.98); }
.btn svg { width: 18px; height: 18px; }
.btn--primary { background: var(--btn-bg); color: var(--btn-fg); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12); }
.btn--primary:hover { background: color-mix(in srgb, var(--btn-bg) 86%, var(--bg)); }
.btn--secondary { background: var(--btn2-bg); color: var(--text); border-color: var(--line); }
.btn--secondary:hover { border-color: color-mix(in srgb, var(--text) 22%, transparent); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

.status { display: inline-flex; align-items: center; gap: 8px; font-size: 0.9375rem; color: var(--text-2); }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

.arrow-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; text-decoration: none; }
.arrow-link svg { width: 16px; height: 16px; transition: transform 160ms var(--ease); }
.arrow-link:hover svg { transform: translateX(3px); }

/* ---------- Header */
.site-header { position: relative; z-index: 20; border-bottom: 1px solid var(--line); background: var(--bg); }
.site-header--overlay { position: absolute; top: 0; left: 0; right: 0; background: transparent; border-bottom-color: transparent; }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand svg { width: 28px; height: 28px; }
.brand span { font: 600 1.0625rem/1 var(--font-display); letter-spacing: -0.01em; white-space: nowrap; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { font-size: 0.9375rem; color: var(--text-2); text-decoration: none; padding: 8px 12px; border-radius: 8px; transition: color 160ms var(--ease), background-color 160ms var(--ease); }
.nav a:hover { color: var(--text); background: color-mix(in srgb, var(--text) 6%, transparent); }
.nav a[aria-current="page"] { color: var(--text); }
.nav .lang { margin-left: 8px; padding-left: 16px; border-left: 1px solid var(--line); border-radius: 0; }
.nav .lang:hover { background: none; }
.nav-toggle { display: none; }

@media (max-width: 760px) {
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line);
    background: transparent; color: var(--text); cursor: pointer;
  }
  .nav-toggle svg { width: 18px; height: 18px; }
  .js .nav {
    position: absolute; left: 0; right: 0; top: 64px; z-index: 30;
    display: none; flex-direction: column; align-items: stretch; gap: 2px;
    padding: 8px var(--gutter) 16px; background: var(--bg); border-bottom: 1px solid var(--line);
  }
  .js .nav.is-open { display: flex; animation: menu-in 200ms var(--ease); }
  .js .nav a { padding: 12px 8px; font-size: 1rem; }
  .js .nav .lang { margin: 8px 0 0; padding: 12px 8px 0; border-left: 0; border-top: 1px solid var(--line); }
  html:not(.js) .site-header .container { height: auto; flex-wrap: wrap; padding-top: 12px; padding-bottom: 12px; }
}
@keyframes menu-in { from { opacity: 0; transform: translateY(-6px); } }

/* ---------- Einmaliger Einstieg beim Laden */
.enter { animation: enter 480ms var(--ease) both; }
.enter--2 { animation-delay: 60ms; }
@keyframes enter { from { opacity: 0; transform: translateY(10px); } }

/* ---------- Sections */
.section { padding: 112px 0; }
.section + .section { border-top: 1px solid var(--line); }
@media (max-width: 720px) { .section { padding: 72px 0; } }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 40px; }
.split { display: grid; grid-template-columns: 5fr 7fr; gap: 64px; align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; gap: 24px; } }

/* ---------- Studio-Hero */
.studio-hero { padding: 120px 0 0; }
.studio-hero h1 { max-width: 14ch; }
.studio-hero .sub { margin-top: 24px; }
.studio-hero .actions { margin-top: 40px; }
@media (max-width: 720px) { .studio-hero { padding-top: 56px; } }

/* ---------- Spiele-Panels (Startseite) */
.games { padding: 80px 0 112px; }
.games-grid { display: grid; grid-template-columns: 7fr 5fr; gap: 20px; }
@media (max-width: 900px) { .games-grid { grid-template-columns: 1fr; } .games { padding: 56px 0 72px; } }
.game-card {
  position: relative; display: flex; flex-direction: column;
  border-radius: 20px; overflow: hidden;
  background: var(--surface); color: var(--text);
  text-decoration: none;
}
.game-card__art { position: relative; height: 360px; background: var(--bg); overflow: hidden; }
.game-card__art svg { position: absolute; inset: 0; width: 100%; height: 100%; transition: transform 500ms var(--ease); }
.game-card:hover .game-card__art svg { transform: scale(1.015); }
.game-card__body { display: flex; flex-direction: column; gap: 8px; padding: 24px 28px 28px; border-top: 1px solid var(--line); flex: 1; }
.game-card__body h3 { font-size: 2rem; line-height: 1.1; letter-spacing: -0.02em; }
.game-card__body p { color: var(--text-2); max-width: 32rem; }
.game-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: auto; padding-top: 16px; }
.game-card .arrow-link { color: var(--text); }
@media (max-width: 720px) { .game-card__art { height: 240px; } .game-card__body { padding: 20px; } }

/* ---------- Studio-Infos */
.prose-lg p { font-size: 1.125rem; line-height: 1.65; color: var(--text-2); }
.prose-lg p + p { margin-top: 16px; }
.facts { margin: 40px 0 0; display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.facts div { padding: 16px 0; border-bottom: 1px solid var(--line); }
.facts div:nth-child(odd) { padding-right: 24px; }
.facts dt { font-size: 0.875rem; color: var(--muted); }
.facts dd { margin: 4px 0 0; font-weight: 500; }
@media (max-width: 480px) { .facts { grid-template-columns: 1fr; } .facts div:nth-child(odd) { padding-right: 0; } }

.mail-big { display: inline-block; margin-top: 24px; font: 500 clamp(1.5rem, 4vw, 2.5rem)/1.15 var(--font-display); letter-spacing: -0.02em; word-break: break-word; }

/* ---------- Spielseiten: Szenen-Hero */
.scene-hero { position: relative; min-height: min(100vh, 880px); display: flex; align-items: flex-start; overflow: hidden; }
.scene-hero > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.scene-hero__content { position: relative; z-index: 2; padding-top: 144px; padding-bottom: 96px; }
.scene-hero h1 { font-size: clamp(3.5rem, 10vw, 7rem); line-height: 0.95; letter-spacing: -0.04em; }
.scene-hero .meta { margin-bottom: 20px; }
.scene-hero .sub { margin-top: 24px; max-width: 30rem; }
.scene-hero .actions { margin-top: 36px; align-items: center; gap: 20px; }
@media (max-width: 720px) {
  .scene-hero { min-height: 0; flex-direction: column; }
  .scene-hero > svg { position: relative; order: 2; height: 300px; }
  .scene-hero__content { padding-top: 112px; padding-bottom: 40px; }
}

/* Tiefenmesser – das Erkennungszeichen von Orefall */
.depth { list-style: none; margin: 0; padding: 0 0 0 40px; position: relative; }
.depth::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 1px; background: var(--line); }
.depth li { position: relative; padding: 24px 0; border-bottom: 1px solid var(--line); }
.depth li:first-child { padding-top: 0; }
.depth li::before { content: ""; position: absolute; left: -40px; top: 34px; width: 15px; height: 1px; background: var(--muted); }
.depth li:first-child::before { top: 10px; }
.depth li::after { content: ""; position: absolute; left: -36px; top: 31px; width: 7px; height: 7px; transform: rotate(45deg); background: var(--accent); }
.depth li:first-child::after { top: 7px; }
.depth .n { display: block; font-size: 0.8125rem; color: var(--muted); font-variant-numeric: tabular-nums; margin-bottom: 4px; }
.depth h3 { font-size: 1.375rem; }
.depth p { color: var(--text-2); margin-top: 4px; }

.depth--compact li { padding: 16px 0; }
.depth--compact li::before { top: 26px; }
.depth--compact li::after { top: 23px; }
.depth--compact h3 { font-size: 1.5rem; }

/* Feature-Bereiche: ein Highlight + ruhige Textblöcke */
.feature-layout { display: grid; grid-template-columns: 5fr 7fr; gap: 20px; align-items: stretch; }
@media (max-width: 900px) { .feature-layout { grid-template-columns: 1fr; } }
.highlight { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 24px 28px 28px; display: flex; flex-direction: column; }
.highlight__art { margin: -4px -8px 20px; }
.highlight__art svg { width: 100%; height: auto; font-family: var(--font-ui); }
.highlight h3 { font-size: 1.5rem; letter-spacing: -0.01em; }
.highlight p { color: var(--text-2); margin-top: 8px; }
.feat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; align-content: start; }
.feat-grid--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 760px) { .feat-grid, .feat-grid--3 { grid-template-columns: 1fr; } }
.feat { padding: 24px 0; border-top: 1px solid var(--line); }
.feature-layout .feat-grid .feat:nth-child(-n+2) { border-top: 0; padding-top: 4px; }
@media (max-width: 760px) { .feature-layout .feat-grid .feat:nth-child(2) { border-top: 1px solid var(--line); padding-top: 24px; } }
.feat h3 { font-size: 1.25rem; }
.feat p { color: var(--text-2); margin-top: 8px; }

/* Tetherlight-Bausteine */
.story p { font-family: var(--font-display); font-size: clamp(1.25rem, 2.2vw, 1.625rem); line-height: 1.4; letter-spacing: -0.01em; color: var(--text); }
.story p + p { color: var(--text-2); }
.name-list { list-style: none; margin: 32px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.name-list li { padding: 12px 16px 12px 0; border-bottom: 1px solid var(--line); font-weight: 500; }
@media (max-width: 560px) { .name-list { grid-template-columns: 1fr 1fr; } }
.figure { margin-top: 32px; color: var(--text-2); max-width: 22rem; }
.figure span { display: block; font: 500 clamp(3.5rem, 7vw, 5rem)/1 var(--font-display); letter-spacing: -0.03em; color: var(--accent); font-variant-numeric: tabular-nums; margin-bottom: 12px; }
.spec { margin: 0; border-top: 1px solid var(--line); }
.spec div { display: grid; grid-template-columns: 9rem 1fr; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.spec dt { color: var(--muted); font-size: 0.9375rem; padding-top: 2px; }
.spec dd { margin: 0; }
@media (max-width: 560px) { .spec div { grid-template-columns: 1fr; gap: 4px; } }

/* Medien (erscheinen erst, wenn Screenshots/Trailer eingetragen sind) */
.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.shots--landscape { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.shots img { width: 100%; border-radius: 16px; border: 1px solid var(--line); }
.video { position: relative; aspect-ratio: 16 / 9; border-radius: 20px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video button { position: absolute; inset: 0; width: 100%; display: grid; place-items: center; gap: 12px; align-content: center; background: none; border: 0; color: var(--text); font: 500 1rem var(--font-ui); cursor: pointer; }
.video button small { color: var(--muted); font-size: 0.8125rem; max-width: 28rem; padding: 0 16px; }

/* Weitere Links (Support / Presse / Datenschutz) */
.link-rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.link-rows li { border-bottom: 1px solid var(--line); }
.link-rows a { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; padding: 20px 0; text-decoration: none; }
.link-rows strong { font-weight: 500; display: block; }
.link-rows span { color: var(--text-2); font-size: 0.9375rem; }
.link-rows svg { width: 18px; height: 18px; color: var(--muted); transition: transform 160ms var(--ease), color 160ms var(--ease); }
.link-rows a:hover svg { transform: translateX(3px); color: var(--text); }

/* Store-Badge */
.store-badge img { height: 56px; width: auto; }

/* ---------- Support */
.page-head { padding: 96px 0 56px; border-bottom: 1px solid var(--line); }
.page-head .sub { margin-top: 20px; }
@media (max-width: 720px) { .page-head { padding: 56px 0 40px; } }
.cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px; }
@media (max-width: 900px) { .cols { grid-template-columns: 1fr; gap: 40px; } }
.cols h2 { font-size: 1.375rem; letter-spacing: -0.01em; margin-bottom: 12px; }
.cols p { color: var(--text-2); }
.list { margin: 16px 0 0; padding: 0 0 0 20px; color: var(--text-2); }
.list li + li { margin-top: 6px; }
.list li::marker { color: var(--muted); }

/* ---------- Rechtstexte */
.legal { max-width: 720px; padding: 56px 0 112px; }
.legal h2 { font-size: 1.5rem; margin: 48px 0 12px; letter-spacing: -0.01em; }
.legal h3 { font-size: 1.125rem; margin: 32px 0 8px; }
.legal p, .legal li { color: var(--text-2); }
.legal p + p { margin-top: 12px; }
.legal ul { padding-left: 20px; margin: 12px 0; }
.legal li + li { margin-top: 6px; }
.legal address { font-style: normal; color: var(--text-2); }
.legal a { color: var(--text); }
.note { border: 1px solid var(--line); background: var(--raised); border-radius: 12px; padding: 16px 20px; margin-bottom: 32px; color: var(--text); font-size: 0.9375rem; }

/* ---------- Footer */
.site-footer { border-top: 1px solid var(--line); padding: 64px 0 40px; font-size: 0.9375rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.footer-grid h2 { font: 500 0.875rem/1.4 var(--font-ui); color: var(--muted); margin-bottom: 12px; letter-spacing: 0; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li + li { margin-top: 8px; }
.footer-grid a { color: var(--text-2); text-decoration: none; }
.footer-grid a:hover { color: var(--text); }
.footer-brand p { color: var(--text-2); margin-top: 16px; max-width: 22rem; }
.footer-bottom { margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 0.875rem; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }

/* ---------- 404 */
.notfound { padding: 160px 0; }
.notfound .actions { margin-top: 32px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
