/*
  Rollback-Palette (warmes Creme, Stand vor Mist-Umstellung):
  --mist: #f3f0e8;
  --mist-deep: #e9e4d8;
  --paper: #f3f0e8;
  --paper-deep: #e9e4d8;
  theme-color / field-veil: #f3f0e8 → rgb(243, 240, 232)
*/
:root {
  --ink: #16211d;
  --ink-soft: #3a4540;
  --mist: #e6eef2;
  --mist-deep: #dde7ed;
  --paper: #e6eef2;
  --paper-deep: #dde7ed;
  --paper-ui: rgba(255, 255, 255, 0.72);
  --orange: #e8683a;
  --lime: #c9ff57;
  --signal: #0b7f72;
  --signal-deep: #065f56;
  --market: #c41e2a;
  --market-deep: #9e1822;
  --market-soft: rgba(196, 30, 42, 0.14);
  --forge: #b45309;
  --forge-deep: #8a3d06;
  --steel: #5c6b78;
  --line: rgba(22, 33, 29, 0.12);
  --shadow: 0 18px 50px rgba(22, 33, 29, 0.12);
  --font-display: "Bricolage Grotesque", Georgia, serif;
  --font-body: "Figtree", system-ui, sans-serif;
  --radius: 18px;
  --pad: clamp(1.25rem, 4vw, 3rem);
  --max: 1120px;
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  overflow-x: clip;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 500;
  line-height: 1.5;
  background: transparent;
  overflow-x: hidden;
  overflow-x: clip;
}

@media (prefers-reduced-motion: reduce) {
  body { background: var(--paper); }
  #living-field { display: none; }
}

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

/* Original Imperiums-Feld (empire-field) */
#living-field,
#ambient-field {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: block;
  pointer-events: none;
}

.field-veil {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(100% 70% at 50% 0%, rgba(230, 238, 242, 0.28), transparent 55%),
    linear-gradient(180deg, rgba(230, 238, 242, 0.08) 0%, rgba(230, 238, 242, 0.22) 55%, rgba(230, 238, 242, 0.55) 100%);
}

main,
.foot {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

.brand {
  --brand-scale: 1;
  display: inline-flex;
  align-items: center;
  gap: calc(12px * var(--brand-scale));
  font-family: "Manrope", var(--font-body), sans-serif;
  font-weight: 700;
  font-size: calc(18px * var(--brand-scale));
  letter-spacing: 0.02em;
  color: var(--ink);
}

.brand small,
.brand-name small,
.hero-brand-dot {
  color: var(--orange);
  font-weight: 700;
  font-size: inherit;
  letter-spacing: 0.02em;
  margin-left: -0.12em;
}

/* Gewohntes Lindic-Logo wie auf /itp */
.brand-mark,
.hero-brand-mark {
  position: relative;
  display: grid;
  width: calc(30px * var(--brand-scale, 1));
  height: calc(30px * var(--brand-scale, 1));
  place-items: center;
  transform: rotate(45deg);
  flex: 0 0 auto;
}

.brand-mark::before,
.hero-brand-mark::before {
  position: absolute;
  inset: calc(3px * var(--brand-scale, 1));
  border: calc(2px * var(--brand-scale, 1)) solid var(--ink);
  content: "";
}

.brand-mark i,
.hero-brand-mark i {
  position: absolute;
  width: calc(4px * var(--brand-scale, 1));
  height: calc(4px * var(--brand-scale, 1));
  background: var(--orange);
}

.brand-mark i:first-child,
.hero-brand-mark i:first-child { top: 0; left: calc(13px * var(--brand-scale, 1)); }
.brand-mark i:nth-child(2),
.hero-brand-mark i:nth-child(2) { right: 0; bottom: calc(13px * var(--brand-scale, 1)); }
.brand-mark i:last-child,
.hero-brand-mark i:last-child { bottom: 0; left: calc(13px * var(--brand-scale, 1)); }

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: clamp(1.25rem, 3.5vh, 2.25rem) var(--pad) clamp(1rem, 3vh, 1.75rem);
  max-width: calc(var(--max) + 2 * var(--pad));
  margin: 0 auto;
}

.hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: clamp(1rem, 3vw, 2.5rem);
  width: 100%;
}

.hero-brand-block {
  flex: 0 1 auto;
  min-width: 0;
  animation: rise 0.9s ease both;
}

.hero-lead {
  flex: 1 1 14rem;
  max-width: min(26rem, 46%);
  margin: 0;
  padding-top: 0.15rem;
  text-align: right;
  font-size: clamp(1.05rem, 2.1vw, 1.28rem);
  line-height: 1.35;
  color: var(--ink-soft);
  animation: rise 0.9s 0.06s ease both;
}

.hero-kicker {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--steel);
  font-weight: 600;
}

.hero-brand {
  margin: 0;
  display: flex;
  align-items: center;
  gap: clamp(0.85rem, 2.5vw, 1.6rem);
  font-family: "Manrope", var(--font-display), sans-serif;
  font-size: clamp(3.2rem, 12vw, 7.5rem);
  line-height: 0.9;
  letter-spacing: 0.02em;
  font-weight: 700;
}

.hero-brand-mark {
  --brand-scale: 2.8;
}

@media (min-width: 720px) {
  .hero-brand-mark {
    --brand-scale: 3.6;
  }
}

@media (min-width: 1100px) {
  .hero-brand-mark {
    --brand-scale: 4.2;
  }
}

.hero-brand-text {
  display: flex;
  flex-direction: column;
  font-size: 0.42em;
}

.hero-brand-line,
.hero-brand-dot {
  display: block;
  font-size: 1em;
  letter-spacing: 0.18em;
}

.hero-brand-dot {
  margin-top: 0.15em;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.5rem;
  animation: rise 1.05s 0.24s ease both;
}

.cta {
  --cta-width: 22rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.2rem;
  width: min(100%, var(--cta-width));
  min-width: min(100%, var(--cta-width));
  min-height: 5.65rem;
  padding: 1.05rem 1.25rem;
  border-radius: 1rem;
  background: var(--paper-ui);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.45s ease, border-color 0.45s ease;
}

.cta:hover {
  transform: translateY(-4px) scale(1.015);
  box-shadow: 0 24px 60px rgba(20, 26, 31, 0.16);
}

.cta-label {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
}

.cta-hint {
  font-size: 0.92rem;
  color: var(--steel);
}

.cta-market {
  border-color: rgba(196, 30, 42, 0.32);
  box-shadow: 0 18px 50px rgba(196, 30, 42, 0.08);
}

.cta-market:hover {
  border-color: rgba(196, 30, 42, 0.48);
  box-shadow: 0 24px 60px rgba(196, 30, 42, 0.14);
}

.cta-market .cta-label {
  color: var(--market);
}

.cta-forge {
  border-color: rgba(180, 83, 9, 0.32);
  box-shadow: 0 18px 50px rgba(180, 83, 9, 0.08);
}

.cta-forge:hover {
  border-color: rgba(180, 83, 9, 0.48);
  box-shadow: 0 24px 60px rgba(180, 83, 9, 0.14);
}

.cta-forge .cta-label {
  color: var(--forge-deep);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.realm {
  max-width: calc(var(--max) + 2 * var(--pad));
  margin: 0 auto;
  padding: clamp(3rem, 8vh, 5.5rem) var(--pad);
}

.realm-market {
  padding-top: clamp(2.75rem, 7vh, 4.5rem);
}

#itp {
  scroll-margin-top: 0.65rem;
}

.realm-head {
  max-width: 40rem;
  margin-bottom: 1.75rem;
}

.realm-kicker {
  margin: 0 0 0.4rem;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--steel);
  font-weight: 700;
}

.realm h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.1rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.realm-lead {
  margin: 0.85rem 0 0;
  color: var(--ink-soft);
  font-size: 1.08rem;
}

/* Querfeed wie Kleinanzeiger (inserate slogan-ticker) */
.rubric-banner {
  --ticker-sec: 38s;
  --ticker-fade: #2a0c10;
  position: relative;
  width: 100%;
  margin: 0 0 1.75rem;
  overflow: hidden;
  isolation: isolate;
  border-radius: 14px;
  border-bottom: 1px solid color-mix(in srgb, #f25555 50%, transparent);
  background:
    linear-gradient(90deg,
      color-mix(in srgb, #6b1218 92%, #000),
      color-mix(in srgb, #c41e2a 48%, #2a0c10) 48%,
      color-mix(in srgb, #f25555 35%, #401018));
  box-shadow: 0 8px 24px rgba(42, 12, 16, 0.28);
}

.rubric-banner::before,
.rubric-banner::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: clamp(2rem, 8vw, 4.5rem);
  z-index: 2;
  pointer-events: none;
}

.rubric-banner::before {
  left: 0;
  background: linear-gradient(90deg, var(--ticker-fade), transparent);
}

.rubric-banner::after {
  right: 0;
  background: linear-gradient(270deg, var(--ticker-fade), transparent);
}

.rubric-banner-track {
  display: flex;
  width: max-content;
  will-change: transform;
  animation: rubric-marquee var(--ticker-sec, 38s) linear infinite;
  animation-play-state: paused;
}

.rubric-banner.is-ready .rubric-banner-track {
  animation-play-state: running;
}

@keyframes rubric-marquee {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(var(--ticker-shift, -50%), 0, 0); }
}

.rubric-banner-line {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 0;
  margin: 0;
  padding: 0.55rem 0;
  white-space: nowrap;
}

.rubric-item {
  flex-shrink: 0;
  margin: 0 1.35rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.05rem, 3.4vw, 1.55rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
  white-space: nowrap;
  color: #fff;
  -webkit-text-fill-color: #fff;
}

.rubric-item.rubric-accent {
  color: #fff;
  -webkit-text-fill-color: #fff;
}

.rubric-sep {
  flex-shrink: 0;
  color: color-mix(in srgb, #f25555 80%, #fff);
  font-size: 0.7rem;
  opacity: 0.85;
  transform: translateY(0.05em);
  animation: rubric-spark 2.4s ease-in-out infinite;
}

.rubric-pulse {
  animation: rubric-lift 3.6s ease-in-out infinite;
}

.rubric-banner-line .rubric-item:nth-child(4n + 1) { animation-delay: 0.2s; }
.rubric-banner-line .rubric-item:nth-child(4n + 3) { animation-delay: 1.1s; }
.rubric-banner-line .rubric-sep:nth-child(4n + 2) { animation-delay: 0.6s; }
.rubric-banner-line .rubric-sep:nth-child(4n + 4) { animation-delay: 1.4s; }

@keyframes rubric-lift {
  0%, 100% { transform: translateY(0); letter-spacing: -0.03em; }
  50% { transform: translateY(-2px); letter-spacing: -0.01em; }
}

@keyframes rubric-spark {
  0%, 100% { opacity: 0.45; transform: translateY(0.05em) scale(0.9) rotate(0deg); }
  50% { opacity: 1; transform: translateY(-1px) scale(1.15) rotate(18deg); }
}

@media (prefers-reduced-motion: reduce) {
  .rubric-banner-track {
    width: 100%;
    justify-content: center;
    animation: none !important;
    transform: none !important;
    flex-wrap: wrap;
  }

  .rubric-banner-line {
    flex-wrap: wrap;
    white-space: normal;
    justify-content: center;
    gap: 0.35rem 0.75rem;
  }

  .rubric-banner-line[data-clone] {
    display: none;
  }

  .rubric-item,
  .rubric-sep {
    animation: none !important;
  }

  .rubric-item {
    margin-inline: 0.65rem;
    white-space: normal;
    text-align: center;
  }
}

.live-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 0.9rem;
  margin-bottom: 1.35rem;
}

.live-strip[hidden] {
  display: none;
}

.live-status {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--steel);
}

.live-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 11.5rem;
  padding: 1rem;
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, transparent 10%, rgba(20, 26, 31, 0.72) 100%),
    var(--card-wash, linear-gradient(135deg, #0b7f72, #1f3a45));
  color: #f4f8fa;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  animation: card-in 0.7s ease both;
}

.live-card:hover {
  transform: translateY(-5px) scale(1.02);
}

.live-card-cat {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  opacity: 0.85;
}

.live-card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  line-height: 1.2;
}

.live-card-meta {
  margin-top: 0.35rem;
  font-size: 0.88rem;
  opacity: 0.88;
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.realm-cta {
  display: inline-flex;
  margin-top: 1.5rem;
}

.forge-mosaic {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
}

.forge-tile {
  position: relative;
  min-height: 12.5rem;
  border-radius: var(--radius);
  overflow: hidden;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.15rem;
  color: #f7f3ee;
  box-shadow: var(--shadow);
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.forge-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(20, 26, 31, 0.15), rgba(20, 26, 31, 0.78)),
    var(--img) center / cover no-repeat;
  z-index: -1;
  transform: scale(1.04);
  transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1), filter 0.8s ease;
}

.forge-tile:hover {
  transform: translateY(-4px);
}

.forge-tile:hover::before {
  transform: scale(1.1);
  filter: saturate(1.15);
}

.forge-tile-wide {
  grid-column: span 2;
}

.forge-tile-cta {
  color: var(--forge-deep);
  background: var(--paper-ui);
  border: 1px solid rgba(180, 83, 9, 0.34);
  box-shadow: 0 18px 50px rgba(180, 83, 9, 0.1);
  justify-content: center;
  text-align: left;
  backdrop-filter: blur(10px);
}

.forge-tile-cta::before {
  display: none;
}

.forge-tile-cta:hover {
  border-color: rgba(180, 83, 9, 0.5);
  box-shadow: 0 24px 60px rgba(180, 83, 9, 0.16);
  transform: translateY(-4px) scale(1.015);
}

.forge-tile-cta .forge-tile-label {
  font-size: 1.45rem;
}

.forge-tile-cta .forge-tile-copy {
  opacity: 1;
  color: var(--steel);
  max-width: none;
}

.forge-tile-label {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
}

.forge-tile-copy {
  margin-top: 0.25rem;
  font-size: 0.95rem;
  opacity: 0.9;
  max-width: 28rem;
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.is-in {
  opacity: 1;
  transform: translateY(0);
}

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding: 2.5rem var(--pad) 3rem;
  max-width: calc(var(--max) + 2 * var(--pad));
  margin: 0 auto;
  border-top: 1px solid var(--line);
  color: var(--steel);
  font-size: 0.92rem;
}

.brand-foot {
  font-family: var(--font-display);
  color: var(--ink);
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.1rem;
}

.foot-links a:hover {
  color: var(--ink);
}

.quick-top {
  position: fixed;
  z-index: 90;
  right: calc(20px + env(safe-area-inset-right, 0px));
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 6px 6px 6px 17px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(22, 33, 29, 0.94);
  box-shadow: 0 12px 34px rgba(22, 33, 29, 0.22);
  color: #fff;
  text-decoration: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  pointer-events: none;
}

.quick-top:not(.is-visible) {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.quick-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.quick-top-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.quick-top-icon {
  display: grid;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--lime);
  color: var(--ink);
  font-size: 18px;
  line-height: 1;
  place-items: center;
  transform-origin: center;
}

.quick-top.is-visible .quick-top-icon {
  animation: quick-top-heartbeat 1.35s ease-in-out infinite;
}

@keyframes quick-top-heartbeat {
  0%, 100% { transform: scale(1); }
  8% { transform: scale(1.18); }
  16% { transform: scale(1); }
  24% { transform: scale(1.12); }
  32%, 100% { transform: scale(1); }
}

@media (max-width: 860px) {
  .forge-mosaic {
    grid-template-columns: 1fr 1fr;
  }

  .forge-tile-wide {
    grid-column: span 2;
  }
}

@media (max-width: 720px) {
  :root {
    --pad: 1.25rem;
  }

  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    overflow-x: clip;
  }

  main {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .hero,
  .realm,
  .foot {
    width: 100%;
    max-width: 100%;
    margin-inline: 0;
    padding-inline: max(var(--pad), env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px));
    box-sizing: border-box;
  }

  .hero {
    align-items: stretch;
    padding-top: clamp(1rem, 3vh, 1.5rem);
    text-align: left;
    overflow-x: clip;
  }

  .hero-top {
    align-items: flex-start;
    gap: 0.75rem 1rem;
  }

  .hero-lead {
    flex: 1 1 42%;
    max-width: 48%;
    width: auto;
    margin: 0;
    padding-top: 0.1rem;
    text-align: right;
    font-size: clamp(0.9rem, 3.4vw, 1.05rem);
  }

  .hero-kicker {
    width: auto;
    text-align: left;
    font-size: 0.72rem;
    margin-bottom: 0.55rem;
  }

  .hero-brand {
    display: inline-flex;
    justify-content: flex-start;
    align-items: center;
    width: auto;
    max-width: 100%;
    min-width: 0;
    margin: 0;
    font-size: clamp(2rem, 9.5vw, 2.7rem);
    gap: 0.5rem;
  }

  .hero-brand-mark {
    --brand-scale: 1.55;
    flex: 0 0 auto;
  }

  .hero-brand-text {
    min-width: 0;
    align-items: flex-start;
    text-align: left;
  }

  .hero-brand-line,
  .hero-brand-dot {
    max-width: 100%;
  }

  .hero-cta {
    width: 100%;
    max-width: 22rem;
    margin-inline: 0;
    justify-content: flex-start;
  }

  .forge-mosaic {
    grid-template-columns: 1fr;
    width: 100%;
    max-width: 100%;
  }

  .forge-tile-wide {
    grid-column: span 1;
  }

  .forge-tile {
    min-width: 0;
  }

  .cta {
    width: 100%;
    min-width: 0;
    max-width: 22rem;
    margin-inline: auto;
  }

  .realm-cta {
    display: flex;
    width: min(100%, 22rem);
    max-width: 22rem;
    margin-inline: auto;
  }

  .realm-head {
    width: 100%;
    max-width: 40rem;
    margin-inline: auto;
    text-align: center;
  }

  .realm h2 {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .foot {
    justify-content: center;
    text-align: center;
  }

  .foot-links {
    justify-content: center;
  }

  .quick-top {
    right: calc(14px + env(safe-area-inset-right, 0px));
    bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    min-height: 46px;
    padding: 5px;
  }

  .quick-top-label {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .brand-mark,
  .cta,
  .live-card,
  .forge-tile,
  .forge-tile::before,
  .reveal,
  .rubric-banner-track,
  .rubric-item,
  .rubric-sep,
  .quick-top,
  .quick-top.is-visible .quick-top-icon {
    animation: none !important;
    transition: none !important;
  }
  .reveal { opacity: 1; transform: none; }
}
