/* Thalkirchen.com — site.css
   Page-specific rules translating the design-system React components
   (SiteHeader, CategoryNav, StoryCard, PanelCTA, SectionTitle, ArrowButton,
   Button, Tag, Input, SiteFooter) into plain HTML + CSS. */

/* ============ RESET / BASE ============ */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--surface-page);
  color: var(--text-body);
  font-family: var(--font-sans);
  font-size: var(--type-body-size);
  line-height: var(--type-body-leading);
}
img, svg { display: block; max-width: 100%; }
a { color: var(--tk-isar-500); }
a:hover { color: var(--tk-isar-700); }
::-webkit-scrollbar { display: none; }
* { scrollbar-width: none; }

h1, h2, h3, p, figure { margin: 0; }

button {
  font-family: var(--font-sans);
  cursor: pointer;
}

/* Focus visibility — accessibility baseline */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

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

.skip-link {
  position: absolute;
  left: var(--layout-gutter);
  top: -100px;
  background: #fff;
  color: var(--text-body);
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  z-index: 200;
  font-weight: 700;
  text-decoration: none;
  transition: top var(--dur-fast) var(--ease-out);
}
.skip-link:focus {
  top: 12px;
}

/* ============ LAYOUT HELPERS ============ */
.wrap {
  max-width: var(--layout-max);
  margin: 0 auto;
}

.gutter {
  padding-left: var(--layout-gutter);
  padding-right: var(--layout-gutter);
}

/* ============ SITE HEADER ============ */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 24px var(--layout-gutter);
  background: var(--surface-brand);
  font-family: var(--font-sans);
}

.wordmark {
  text-decoration: none;
  color: #fff;
  font-weight: 800;
  font-size: 19px;
  line-height: 1.02;
  letter-spacing: -0.02em;
  display: inline-block;
}

.site-header .wordmark { cursor: default; }

.menu-toggle {
  background: none;
  border: none;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.menu-toggle span {
  width: 28px;
  height: 3px;
  background: #fff;
  border-radius: 2px;
  transition: transform var(--dur-fast) var(--ease-out);
}

.menu-toggle:hover span:first-child { transform: translateX(-3px); }
.menu-toggle:hover span:last-child { transform: translateX(3px); }

/* ============ CATEGORY NAV ============ */
.category-nav {
  display: flex;
  background: var(--surface-brand);
  font-family: var(--font-sans);
  list-style: none;
  margin: 48px 0 0;
  padding: 0;
  flex-wrap: wrap;
}

.category-nav li { flex: 1; min-width: 96px; }

.category-nav button {
  width: 100%;
  text-align: left;
  text-decoration: none;
  background: none;
  color: #fff;
  border: none;
  border-top: 3px solid rgba(255, 255, 255, 0.35);
  padding: 18px 20px 26px;
  font-weight: 700;
  font-size: var(--type-label-size);
  letter-spacing: -0.01em;
  opacity: 0.8;
  transition: border-color var(--dur-fast) var(--ease-out), opacity var(--dur-fast) var(--ease-out);
  font-family: var(--font-sans);
}

.category-nav button:hover,
.category-nav button.is-active {
  border-top-color: #fff;
  opacity: 1;
}

/* ============ HERO ============ */
.hero {
  background: var(--surface-brand);
  display: flex;
  flex-direction: column;
  min-height: 560px;
}

.hero-headline-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 var(--layout-gutter);
}

.hero-headline {
  margin: 0;
  color: var(--text-display-on-brand);
  text-align: left;
  font-size: clamp(64px, 9vw, 150px);
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: -0.035em;
  max-width: 100%;
}

/* ============ SECTION TITLE ============ */
.section-title {
  font-family: var(--font-sans);
  margin: 0;
  color: var(--text-brand);
  font-size: var(--type-h1-size);
  font-weight: var(--type-h1-weight);
  line-height: var(--type-h1-leading);
  letter-spacing: var(--type-h1-tracking);
  text-wrap: balance;
}

.section-title.is-ink { color: var(--text-body); }
.section-title.is-accent { color: var(--text-accent); }

/* ============ ARROW BUTTON ============ */
.arrow-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: currentColor;
  display: inline-flex;
  transform: translateX(0);
  transition: transform var(--dur-fast) var(--ease-out);
}

.arrow-btn:hover,
.story-card:hover .arrow-btn {
  transform: translateX(8px);
}

.arrow-btn--back:hover {
  transform: translateX(-8px);
}

.arrow-btn svg { display: block; }

/* ============ PANEL / FEATURED / CTA ============ */
.panel {
  position: relative;
  border-radius: var(--radius-lg);
  min-height: 420px;
  padding: clamp(24px, 4vw, 56px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-family: var(--font-sans);
  color: #fff;
}

.panel--media { background: var(--surface-media); min-height: 440px; }
.panel--accent { background: var(--surface-accent); }
.panel--brand { background: var(--surface-brand); }
.panel--green { background: var(--surface-green); }

.panel--media .panel__title { color: var(--text-highlight-on-media); }

.panel__title {
  position: relative;
  font-size: clamp(40px, 5.5vw, 80px);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.03em;
  color: #fff;
  max-width: 12ch;
}

.panel__footer {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.panel__body {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  max-width: 34ch;
  font-weight: 500;
}

.panel__media-note {
  position: absolute;
  top: 14px;
  right: 16px;
  color: rgba(255, 255, 255, 0.35);
  font-size: 11px;
  font-weight: 500;
}

/* ============ STORY RAIL ============ */
.rail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 16px;
  padding: 0 var(--layout-gutter);
  margin-bottom: -18px;
  position: relative;
  z-index: 2;
}

.rail-header .section-title { max-width: 10ch; }

.rail-controls {
  display: flex;
  gap: 20px;
  padding-bottom: 24px;
}

.rail-controls .arrow-btn { color: var(--tk-kiesel-900); }

.rail {
  display: flex;
  gap: var(--layout-card-gap);
  overflow-x: auto;
  padding: 0 var(--layout-gutter) 8px;
  scroll-behavior: smooth;
  scroll-snap-type: x proximity;
}

.rail-empty {
  padding: var(--space-6) var(--layout-gutter);
  color: var(--text-muted);
  font-size: var(--type-body-sm-size);
}

/* ============ TAG ============ */
.tag {
  font-family: var(--font-sans);
  font-size: var(--type-meta-size);
  font-weight: 600;
  letter-spacing: var(--type-meta-tracking);
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
}

.tag--on-media {
  background: rgba(17, 18, 20, 0.55);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

/* ============ STORY CARD ============ */
.story-card {
  position: relative;
  display: block;
  width: 300px;
  height: 420px;
  flex: 0 0 auto;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface-media);
  font-family: var(--font-sans);
  scroll-snap-align: start;
  text-decoration: none;
  color: inherit;
}

.story-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1);
  transition: transform var(--dur-med) var(--ease-out);
}

.story-card:hover img { transform: scale(1.03); }

.story-card__overlay {
  position: absolute;
  inset: 0;
  background: var(--overlay-media);
}

.story-card__tag {
  position: absolute;
  top: 14px;
  left: 14px;
}

.story-card__note {
  position: absolute;
  top: 14px;
  right: 16px;
  color: rgba(255, 255, 255, 0.35);
  font-size: 11px;
  font-weight: 500;
}

.story-card__content {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 14px;
  color: var(--text-on-media);
}

.story-card__title {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}

.story-card__foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.story-card__meta {
  font-size: var(--type-meta-size);
  font-weight: 500;
  opacity: 0.85;
}

/* ============ NEWSLETTER ============ */
.newsletter {
  padding: var(--layout-block-gap) var(--layout-gutter);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
  flex-wrap: wrap;
}

.newsletter .section-title {
  font-size: clamp(32px, 4vw, 56px);
  max-width: 16ch;
}

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

.newsletter__hint {
  margin: 0;
  font-size: var(--type-body-sm-size);
  color: var(--text-muted);
  max-width: 32ch;
}

/* ============ BUTTON ============ */
.btn {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 17px;
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  transition: background var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}

.btn:active { transform: scale(0.98); }

.btn--primary {
  background: var(--interactive-primary);
  color: #fff;
}
.btn--primary:hover { background: var(--interactive-primary-hover); color: #fff; }

.btn--accent {
  background: var(--interactive-accent);
  color: #fff;
}
.btn--accent:hover { background: var(--interactive-accent-hover); color: #fff; }

.btn--outline {
  background: transparent;
  color: var(--text-body);
  border: 1.5px solid var(--border-strong);
}
.btn--outline:hover { background: rgba(19, 19, 22, 0.06); color: var(--text-body); }

/* ============ FOOTER ============ */
.site-footer {
  background: var(--surface-brand);
  font-family: var(--font-sans);
  padding: 48px var(--layout-gutter) 24px;
  overflow: hidden;
  position: relative;
}

.site-footer__wordmark {
  color: var(--text-display-on-brand);
  font-weight: 800;
  font-size: clamp(72px, 13vw, 200px);
  line-height: 0.88;
  letter-spacing: -0.04em;
  margin-bottom: 48px;
  white-space: nowrap;
  overflow-x: auto;
}

.site-footer__wordmark span { padding-left: 0.9em; }

.site-footer__body {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}

.site-footer__cols {
  display: flex;
  gap: 64px;
  flex-wrap: wrap;
}

.site-footer__links {
  display: flex;
  flex-direction: column;
}

.site-footer__links a,
.site-footer__links button {
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  opacity: 0.9;
  display: block;
  margin-bottom: 8px;
  background: none;
  border: none;
  padding: 0;
  text-align: left;
  font-family: var(--font-sans);
}

.site-footer__links a:hover,
.site-footer__links button:hover {
  opacity: 1;
  color: #fff;
  text-decoration: underline;
}

.site-footer__fact {
  margin: 0;
  color: #fff;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.35;
  max-width: 30ch;
  align-self: flex-end;
}

.site-footer__operator {
  margin-top: 48px;
  color: rgba(255, 255, 255, 0.65);
  font-size: var(--type-meta-size);
  font-weight: 500;
}

/* ============ MENU OVERLAY ============ */
.menu-overlay {
  position: fixed;
  inset: 0;
  background: var(--surface-brand);
  z-index: 50;
  display: flex;
  flex-direction: column;
  padding: 24px var(--layout-gutter);
}

.menu-overlay[hidden] { display: none; }

.menu-overlay__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.menu-overlay__close {
  background: none;
  border: none;
  color: #fff;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  font-family: var(--font-sans);
  padding: 4px 8px;
}

.menu-overlay__nav {
  margin: auto 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  list-style: none;
  padding: 0;
}

.menu-overlay__nav button,
.menu-overlay__nav a {
  display: inline-block;
  background: none;
  border: none;
  color: var(--text-display-on-brand);
  text-decoration: none;
  font-weight: 800;
  font-size: clamp(40px, 6vw, 88px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-sans);
  padding: 4px 0;
  transition: color var(--dur-fast) var(--ease-out);
}

.menu-overlay__nav button:hover,
.menu-overlay__nav button:focus-visible,
.menu-overlay__nav a:hover,
.menu-overlay__nav a:focus-visible {
  color: #fff;
}

/* ============ PAGE HEADER (legal pages) ============ */
.page-hero {
  background: var(--surface-page);
  padding: var(--space-9) var(--layout-gutter) var(--space-7);
}

.page-hero__kicker {
  display: block;
  font-size: var(--type-meta-size);
  font-weight: 600;
  letter-spacing: var(--type-meta-tracking);
  text-transform: none;
  color: var(--text-muted);
  margin-bottom: var(--space-3);
}

.page-hero__title {
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.03em;
  color: var(--text-brand);
  max-width: 20ch;
}

.legal {
  padding: 0 var(--layout-gutter) var(--layout-block-gap);
}

.legal__content {
  max-width: 72ch;
}

.legal__content h2 {
  font-size: var(--type-h3-size);
  font-weight: var(--type-h3-weight);
  line-height: var(--type-h3-leading);
  letter-spacing: var(--type-h3-tracking);
  color: var(--text-body);
  margin-top: var(--space-7);
  margin-bottom: var(--space-3);
}

.legal__content h2:first-child { margin-top: 0; }

.legal__content p {
  margin-bottom: var(--space-4);
  color: var(--text-body);
}

.legal__content ul {
  margin: 0 0 var(--space-4);
  padding-left: 1.2em;
}

.legal__content li { margin-bottom: var(--space-2); }

.legal__content a { text-decoration: underline; }

.placeholder {
  background: var(--tk-isar-100);
  color: var(--tk-isar-700);
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 600;
}

.legal__note {
  margin-top: var(--space-7);
  padding: var(--space-5);
  background: var(--surface-card);
  border: 1px solid var(--border-line);
  border-radius: var(--radius-md);
  font-size: var(--type-body-sm-size);
  color: var(--text-muted);
}

/* ============ SECTION SPACING ============ */
.section-featured { padding: var(--space-7) var(--layout-gutter) 0; }
.section-stories { padding: var(--layout-block-gap) 0 0; }
.section-history { padding: var(--layout-block-gap) var(--layout-gutter) 0; }

/* ============ RESPONSIVE ============ */
@media (max-width: 640px) {
  .category-nav { flex-wrap: wrap; }
  .category-nav li { flex: 1 1 50%; }
  .site-footer__cols { gap: 40px; }
  .rail-header { flex-direction: column; align-items: flex-start; }
  .rail-header .rail-controls { padding-bottom: 8px; }
  .newsletter { align-items: flex-start; }
}

@media (max-width: 480px) {
  .story-card { width: 78vw; height: 400px; }
}

/* ============ ARTICLE PAGES ============ */
.article-hero {
  padding: var(--space-9) var(--layout-gutter) var(--space-6);
  max-width: var(--layout-max);
}

.tag--neutral {
  background: transparent;
  color: var(--text-body);
  border: 1px solid var(--border-strong);
}

.article-kicker {
  margin: var(--space-4) 0 var(--space-3);
  font-size: var(--type-meta-size);
  font-weight: 600;
  letter-spacing: var(--type-meta-tracking);
  color: var(--text-muted);
}

.article-title {
  font-size: clamp(40px, 6vw, 88px);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: var(--text-brand);
  max-width: 18ch;
  text-wrap: balance;
}

.article-media {
  position: relative;
  margin: 0 var(--layout-gutter) var(--space-7);
  background: var(--surface-media);
  border-radius: var(--radius-lg);
  min-height: clamp(220px, 40vw, 420px);
  overflow: hidden;
}

.article-body {
  padding: 0 var(--layout-gutter) var(--layout-block-gap);
}

.article-prose {
  max-width: 68ch;
}

.article-prose p {
  margin-bottom: var(--space-4);
}

.article-prose h2 {
  font-size: var(--type-h3-size);
  font-weight: var(--type-h3-weight);
  line-height: var(--type-h3-leading);
  letter-spacing: var(--type-h3-tracking);
  color: var(--text-body);
  margin-top: var(--space-7);
  margin-bottom: var(--space-3);
}

.factbox {
  background: var(--surface-card);
  border: 1px solid var(--border-line);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  margin: var(--space-6) 0;
}

.factbox__title {
  font-size: var(--type-label-size);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 var(--space-3);
}

.factbox ul {
  margin: 0;
  padding-left: 1.1em;
}

.factbox li {
  margin-bottom: var(--space-2);
  font-size: var(--type-body-sm-size);
  line-height: var(--type-body-sm-leading);
}

.factbox li:last-child { margin-bottom: 0; }

.article-end {
  margin-top: var(--space-7);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  align-items: flex-start;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--text-brand);
  font-weight: 700;
  font-size: var(--type-label-size);
  letter-spacing: -0.01em;
  text-decoration: none;
}

.back-link__arrow {
  display: inline-flex;
  transform: rotate(180deg);
  transition: transform var(--dur-fast) var(--ease-out);
}

.back-link:hover .back-link__arrow {
  transform: rotate(180deg) translateX(8px);
}

.article-updated {
  margin: 0;
  font-size: var(--type-meta-size);
  font-weight: 500;
  color: var(--text-muted);
}
