/* TIMEQUEST – ruhiges, statisches Editorial-Design */
:root {
  --bg: #0a0a0b;
  --bg-raised: #111113;
  --panel: #17171a;
  --text: #f0ede7;
  --text-soft: #c2bdb5;
  --muted: #89847d;
  --line: rgba(240, 237, 231, 0.13);
  --line-strong: rgba(240, 237, 231, 0.26);
  --accent: #d7a56d;
  --accent-soft: rgba(215, 165, 109, 0.13);
  --violet: #a698c8;
  --content: 980px;
  --reading: 720px;
  --radius: 18px;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 2rem;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 50% 0%, rgba(166, 152, 200, 0.065), transparent 34rem),
    var(--bg);
  font-family: var(--sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  pointer-events: none;
  opacity: 0.35;
  background-image: linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 100% 5px;
}

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

p,
h1,
h2,
h3 {
  margin-top: 0;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 20;
  padding: 0.65rem 0.9rem;
  color: var(--bg);
  background: var(--text);
  border-radius: 0.4rem;
  font-weight: 700;
  transform: translateY(-150%);
}

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

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

.site-shell {
  width: min(var(--content), calc(100% - 64px));
  margin: 0 auto;
}

main {
  overflow: hidden;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 26px 90px rgba(0, 0, 0, 0.26);
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  font-size: 0.79rem;
  font-weight: 760;
  letter-spacing: 0.22em;
}

.brand-mark {
  display: grid;
  grid-template-columns: repeat(3, 5px);
  align-items: end;
  gap: 3px;
  width: 21px;
  height: 21px;
}

.brand-mark span {
  display: block;
  height: 45%;
  background: var(--muted);
  border-radius: 1px;
}

.brand-mark span:nth-child(2) {
  height: 100%;
  background: var(--accent);
}

.brand-mark span:nth-child(3) {
  height: 70%;
  background: var(--violet);
}

.top-nav {
  display: flex;
  gap: clamp(1rem, 3vw, 2.2rem);
  color: var(--muted);
  font-size: 0.86rem;
}

.top-nav a {
  position: relative;
  padding: 0.5rem 0;
  transition: color 180ms ease;
}

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

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

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

.hero {
  display: flex;
  min-height: 0;
  padding: clamp(3rem, 6vw, 4.25rem) clamp(2rem, 6vw, 4rem);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.eyebrow {
  margin-bottom: 1.5rem;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.19em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 700px;
  margin-bottom: 1.35rem;
  font-family: var(--serif);
  font-size: clamp(2.75rem, 5.2vw, 4.35rem);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 0.98;
}

.hero h1 em {
  color: var(--text-soft);
  font-weight: 400;
}

.hero-text {
  max-width: 560px;
  margin-bottom: 1.6rem;
  color: var(--text-soft);
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
}

.text-link,
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text);
  font-size: 0.87rem;
  font-weight: 700;
}

.text-link {
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--line-strong);
}

.text-link span,
.back-link span {
  color: var(--accent);
  transition: transform 180ms ease;
}

.text-link:hover span {
  transform: translateY(3px);
}

.about,
.archive {
  display: block;
  padding: clamp(2.75rem, 5vw, 3.75rem) clamp(2rem, 6vw, 4rem);
  border-top: 1px solid var(--line);
}

.section-kicker {
  display: flex;
  gap: 1rem;
  align-items: baseline;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  justify-content: center;
  margin-bottom: 1.4rem;
}

.section-kicker span {
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.section-kicker p {
  margin-bottom: 0;
}

.about-copy {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
}

.about-copy h2,
.archive-heading h2,
.story-hero h1 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1.08;
}

.about-copy h2 {
  margin-bottom: 1.45rem;
  font-size: clamp(2rem, 3.7vw, 3rem);
}

.about-copy p {
  max-width: 600px;
  margin-right: auto;
  margin-bottom: 0.9rem;
  margin-left: auto;
  color: var(--text-soft);
  font-size: clamp(0.96rem, 1.25vw, 1.06rem);
  text-align: left;
}

.archive {
  padding-bottom: clamp(2.9rem, 5vw, 4rem);
}

.archive-heading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  margin-bottom: 1.6rem;
  flex-direction: column;
  text-align: center;
}

.archive-heading h2 {
  margin-bottom: 0;
  font-size: clamp(2rem, 3.7vw, 3rem);
}

.archive-count {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.archive-count strong {
  margin-right: 0.25rem;
  color: var(--text);
  font-size: 1.05rem;
}

.story-list {
  overflow: hidden;
  background: rgba(255, 255, 255, 0.018);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.story-card {
  border-bottom: 1px solid var(--line);
}

.story-card:last-child {
  border-bottom: 0;
}

.story-card > a {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 76px;
  gap: clamp(1rem, 3vw, 2.2rem);
  align-items: start;
  padding: 1.4rem 1.6rem;
  transition: padding 180ms ease, background 180ms ease;
}

.story-card > a:hover {
  padding-right: 1.8rem;
  padding-left: 1.8rem;
  background: rgba(255, 255, 255, 0.035);
}

.story-index {
  padding-top: 0.1rem;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 1.1rem;
  font-variant-numeric: tabular-nums;
}

.story-tags {
  display: flex;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.story-tags span + span::before {
  margin-right: 0.65rem;
  color: var(--line-strong);
  content: "/";
}

.story-card h3 {
  margin-bottom: 0.65rem;
  font-family: var(--serif);
  font-size: clamp(1.55rem, 2.6vw, 2.15rem);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

.story-card-content > p {
  max-width: 600px;
  margin-bottom: 0;
  color: var(--text-soft);
}

.story-card-action {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.74rem;
}

.story-card-action .arrow {
  display: grid;
  width: 2.45rem;
  height: 2.45rem;
  place-items: center;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 1.05rem;
  transition: color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.story-card a:hover .arrow {
  color: var(--accent);
  border-color: var(--accent);
  transform: rotate(8deg);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.7rem 0 2.5rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 0.78rem;
}

.site-footer p {
  margin-bottom: 0;
}

/* Einzelne Geschichte */
.story-hero {
  max-width: 820px;
  margin: 0 auto;
  padding: clamp(3.5rem, 8vw, 6rem) clamp(2rem, 5vw, 3.5rem) clamp(3rem, 6vw, 4.5rem);
}

.back-link {
  margin-bottom: clamp(2.5rem, 6vw, 4.5rem);
  color: var(--muted);
}

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

.back-link:hover span {
  transform: translateX(-3px);
}

.story-hero h1 {
  max-width: 900px;
  margin-bottom: 1.5rem;
  font-size: clamp(2rem, 3.2vw, 2.8rem);
}

.story-deck {
  max-width: 720px;
  margin-bottom: 2rem;
  color: var(--text-soft);
  font-family: var(--serif);
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  line-height: 1.55;
}

.story-subline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.story-subline span + span::before {
  margin-right: 0.7rem;
  color: var(--line-strong);
  content: "/";
}

.story-layout {
  display: block;
  padding: clamp(3rem, 6vw, 5rem) clamp(2rem, 6vw, 4rem);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.story-aside {
  max-width: var(--reading);
  margin: 0 auto 2.8rem;
  padding-bottom: 1.1rem;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  font-size: 0.75rem;
}

.story-aside-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.55rem;
  position: static;
}

.story-aside p {
  margin-bottom: 0;
}

.story-aside p + p::before {
  margin-right: 0.55rem;
  color: var(--line-strong);
  content: "/";
}

.story-aside strong {
  color: var(--text-soft);
  font-weight: 650;
}

.story-reading {
  width: 100%;
  max-width: var(--reading);
  margin: 0 auto;
}

.story-reading p {
  margin: 0;
  color: #d5d0c8;
  font-family: var(--serif);
  font-size: clamp(1.12rem, 1.45vw, 1.24rem);
  line-height: 1.82;
}

.story-reading p + p {
  margin-top: 1.12em;
}

.story-reading .lead {
  margin-bottom: 2.1rem;
  color: var(--text);
  font-size: clamp(1.35rem, 2vw, 1.65rem);
  line-height: 1.55;
}

.story-reading .standalone {
  margin: 2rem 0;
  color: var(--accent);
  font-family: var(--sans);
  font-size: clamp(1.1rem, 1.7vw, 1.3rem);
  font-weight: 720;
  letter-spacing: -0.01em;
}

.story-reading .divider {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  margin: 3.2rem 0;
  color: var(--accent);
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.35em;
}

.story-end {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.8rem clamp(2rem, 5vw, 3.5rem) 2.2rem;
}

.story-end .back-link {
  margin-bottom: 0;
}

.story-end p {
  margin-bottom: 0;
  color: var(--muted);
  font-family: var(--serif);
  font-style: italic;
}

@media (max-width: 760px) {
  .site-shell {
    width: min(100% - 32px, var(--content));
  }

  .site-header {
    min-height: 70px;
  }

  .top-nav {
    gap: 1rem;
    font-size: 0.76rem;
  }

  .top-nav a:first-child {
    display: none;
  }

  .hero {
    min-height: auto;
  }

  .hero h1 {
    font-size: clamp(2.4rem, 11vw, 3.4rem);
  }

  .archive-heading {
    align-items: start;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2rem;
  }

  .story-card > a {
    grid-template-columns: 32px minmax(0, 1fr);
    padding: 1.4rem;
  }

  .story-card > a:hover {
    padding-right: 1.4rem;
    padding-left: 1.4rem;
  }

  .story-card-action {
    display: none;
  }

  .story-end,
  .site-footer {
    flex-direction: column;
  }
}

@media (max-width: 420px) {
  .brand {
    letter-spacing: 0.16em;
  }

  .story-tags {
    display: block;
  }

  .story-tags span {
    display: block;
  }

  .story-tags span + span::before {
    content: none;
  }
}

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

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
