/* ==========================================================================
   Stefan Zweig Digital Nachlass-Ontologie — Stylesheet
   Visual language derived from Stefan Zweig Digital / Klawiter Bibliography
   ========================================================================== */

:root {
  --sz-burgundy: #631a34;
  --sz-burgundy-dark: #4A1228;
  --sz-burgundy-light: #7A2D45;
  --sz-gold: #C2A360;
  --sz-gold-light: #D4B87A;
  --sz-cream: #FAF8F3;
  --sz-white: #FFFFFF;
  --sz-text: #2D2D2D;
  --sz-text-light: #6B6B6B;
  --sz-border: #E0D8CC;
  --sz-border-light: #EDE8DF;

  --font-serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --font-sans: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Consolas', 'Monaco', 'Courier New', monospace;

  --max-width: 1200px;
  --sidebar-width: 260px;
  --header-height: 56px;
}

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

body {
  font-family: var(--font-serif);
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--sz-text);
  background: var(--sz-cream);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--sz-burgundy); text-decoration: none; }
a:hover { color: var(--sz-burgundy-dark); text-decoration: underline; }

h1, h2, h3, h4 { font-family: var(--font-serif); font-weight: 400; }

/* --- Header --- */
.site-header {
  background: var(--sz-burgundy);
  position: sticky;
  top: 0;
  z-index: 30;
  height: var(--header-height);
}
.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.header-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--sz-white);
  text-decoration: none;
}
.header-brand:hover { color: var(--sz-gold-light); text-decoration: none; }
.header-logo { height: 32px; }
.header-title {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  letter-spacing: 0.03em;
}
.header-nav { display: flex; gap: 1.5rem; }
.header-nav a {
  color: rgba(255,255,255,0.85);
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.header-nav a:hover { color: var(--sz-gold-light); text-decoration: none; }

/* --- Footer --- */
.site-footer {
  background: var(--sz-burgundy);
  color: rgba(255,255,255,0.7);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  margin-top: auto;
  padding: 1rem 1.5rem;
  text-align: center;
}
.site-footer a { color: var(--sz-gold-light); }

/* --- Landing Page --- */
.landing { max-width: var(--max-width); margin: 0 auto; padding: 2rem 1.5rem; }
.landing-hero {
  text-align: center;
  padding: 3rem 0 2rem;
}
.landing-hero h1 {
  font-size: 2.5rem;
  color: var(--sz-burgundy);
  margin-bottom: 0.5rem;
}
.landing-subtitle {
  font-size: 1.1rem;
  color: var(--sz-text-light);
}
.landing-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}
.card {
  background: var(--sz-white);
  border: 1px solid var(--sz-border);
  border-radius: 6px;
  padding: 1.5rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  display: block;
  color: var(--sz-text);
}
.card:hover {
  border-color: var(--sz-burgundy-light);
  box-shadow: 0 2px 12px rgba(122,27,45,0.08);
  text-decoration: none;
  color: var(--sz-text);
}
.card h2 {
  font-size: 1.15rem;
  color: var(--sz-burgundy);
  margin-bottom: 0.5rem;
}
.card p { font-size: 0.875rem; color: var(--sz-text-light); margin-bottom: 0.75rem; }
.card-meta {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  color: var(--sz-gold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.landing-about {
  margin: 2rem 0;
  padding: 1.5rem;
  background: var(--sz-white);
  border: 1px solid var(--sz-border);
  border-radius: 6px;
}
.landing-about h2 {
  font-size: 1.15rem;
  color: var(--sz-gold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
}
.landing-about p { margin-bottom: 0.5rem; }

/* ==========================================================================
   Ontology Documentation Page
   ========================================================================== */

/* --- Layout with sidebar --- */
.onto-layout {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem;
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  gap: 2rem;
}

/* --- Sidebar --- */
.onto-sidebar {
  position: sticky;
  top: calc(var(--header-height) + 1rem);
  align-self: start;
  max-height: calc(100vh - var(--header-height) - 2rem);
  overflow-y: auto;
  padding-right: 1rem;
}
.onto-sidebar h3 {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--sz-gold);
  margin: 1.25rem 0 0.4rem;
}
.onto-sidebar h3:first-child { margin-top: 0; }
.onto-sidebar a {
  display: block;
  padding: 0.15rem 0 0.15rem 0.75rem;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  color: var(--sz-text-light);
  border-left: 2px solid transparent;
  transition: all 0.15s;
}
.onto-sidebar a:hover {
  color: var(--sz-burgundy);
  border-left-color: var(--sz-burgundy);
  text-decoration: none;
}
.onto-sidebar .download-links {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--sz-border);
}
.onto-sidebar .download-links a {
  display: inline-block;
  padding: 0.3rem 0.6rem;
  margin: 0.2rem;
  background: var(--sz-burgundy);
  color: var(--sz-white);
  border-radius: 3px;
  font-size: 0.72rem;
  border-left: none;
}
.onto-sidebar .download-links a:hover {
  background: var(--sz-burgundy-dark);
  color: var(--sz-white);
  text-decoration: none;
}

/* --- Main content --- */
.onto-content { min-width: 0; }

.onto-content h1 {
  font-size: 1.8rem;
  color: var(--sz-burgundy);
  margin-bottom: 0.25rem;
}
.onto-content .onto-version {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: var(--sz-text-light);
  margin-bottom: 1.5rem;
}

/* Section headings */
.onto-content h2 {
  font-size: 1.3rem;
  color: var(--sz-burgundy);
  border-bottom: 1px solid var(--sz-border);
  padding-bottom: 0.4rem;
  margin: 2rem 0 1rem;
}
.onto-content h3 {
  font-size: 1.05rem;
  color: var(--sz-text);
  margin: 1.5rem 0 0.5rem;
}

/* --- Class/Property cards --- */
.entity-card {
  background: var(--sz-white);
  border: 1px solid var(--sz-border);
  border-radius: 6px;
  padding: 1.25rem;
  margin-bottom: 1rem;
}
.entity-card:target {
  border-color: var(--sz-burgundy);
  box-shadow: 0 0 0 2px rgba(122,27,45,0.15);
}
.entity-card .entity-name {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--sz-burgundy);
  font-weight: 600;
}
.entity-card .entity-uri {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--sz-text-light);
  word-break: break-all;
}
.entity-card .entity-labels {
  margin: 0.5rem 0;
}
.entity-card .label-de,
.entity-card .label-en {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  margin-right: 0.3rem;
}
.entity-card .label-de {
  background: var(--sz-burgundy);
  color: var(--sz-white);
}
.entity-card .label-en {
  background: var(--sz-border-light);
  color: var(--sz-text);
}
.entity-card .entity-comment {
  font-size: 0.875rem;
  color: var(--sz-text);
  margin: 0.5rem 0;
}
.entity-card .entity-comment .comment-en {
  color: var(--sz-text-light);
  font-style: italic;
}

/* --- Badges for external vocabularies --- */
.badge {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  border-radius: 3px;
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  vertical-align: middle;
}
.badge-rico { background: #1a6b47; color: #fff; }
.badge-lrm { background: #2c5aa0; color: #fff; }
.badge-crm { background: #8b5e3c; color: #fff; }
.badge-skos { background: #6a5acd; color: #fff; }
.badge-foaf { background: #e67e22; color: #fff; }
.badge-schema { background: #0f9d58; color: #fff; }
.badge-dc { background: #555; color: #fff; }
.badge-gams { background: var(--sz-burgundy); color: #fff; }

/* --- Property table --- */
.prop-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
  margin: 0.5rem 0;
}
.prop-table th {
  text-align: left;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--sz-text-light);
  padding: 0.4rem 0.6rem;
  border-bottom: 2px solid var(--sz-border);
}
.prop-table td {
  padding: 0.4rem 0.6rem;
  border-bottom: 1px solid var(--sz-border-light);
  vertical-align: top;
}
.prop-table code {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--sz-burgundy);
}

/* --- Bilingual toggle --- */
.lang-toggle {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  display: inline-flex;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 3px;
  overflow: hidden;
}
.lang-toggle button {
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.7);
  padding: 0.2rem 0.5rem;
  cursor: pointer;
  font-size: 0.75rem;
}
.lang-toggle button.active {
  background: rgba(255,255,255,0.15);
  color: var(--sz-white);
}

/* Hide language-specific content based on body class */
body.lang-de .en-only { display: none; }
body.lang-en .de-only { display: none; }

/* --- Verbund Bar --- */
.verbund-bar {
  background: #f2f2f2;
  border-bottom: 1px solid var(--sz-border);
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  height: 28px;
  padding: 0 1rem;
}
.verbund-mark {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--sz-burgundy);
  line-height: 1;
}
.verbund-bar a {
  color: var(--sz-text-light);
  text-decoration: none;
  transition: color 0.15s;
}
.verbund-bar a:hover {
  color: var(--sz-burgundy);
  text-decoration: none;
}
.verbund-bar .verbund-active {
  color: var(--sz-burgundy);
  font-weight: 600;
}
.verbund-sep {
  color: var(--sz-border);
}

/* --- Prose overview section --- */
.onto-prose {
  max-width: 680px;
  margin: 1.5rem 0 2rem;
  padding: 1.5rem 1.75rem;
  background: var(--sz-white);
  border: 1px solid var(--sz-border);
  border-left: 4px solid var(--sz-gold);
  border-radius: 6px;
  font-family: var(--font-serif);
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--sz-text);
}
.onto-prose h2 {
  font-size: 1.3rem;
  color: var(--sz-burgundy);
  border-bottom: 1px solid var(--sz-border);
  padding-bottom: 0.4rem;
  margin: 0 0 1rem;
}
.onto-prose h3 {
  font-size: 1.05rem;
  color: var(--sz-burgundy-light);
  margin: 1.5rem 0 0.5rem;
  font-weight: 600;
}
.onto-prose p {
  margin-bottom: 1rem;
}
.onto-prose p:last-child {
  margin-bottom: 0;
}
.onto-prose a {
  color: var(--sz-burgundy);
  text-decoration: underline;
  text-decoration-color: var(--sz-gold);
  text-underline-offset: 2px;
}
.onto-prose a:hover {
  color: var(--sz-burgundy-dark);
}
.onto-prose strong {
  font-weight: 600;
  color: var(--sz-burgundy);
}

/* --- Stats & Utility --- */
.stat-value {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--sz-burgundy);
}

.stat-card {
  text-align: center;
  cursor: default;
}

.inline-nav {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  justify-content: center;
  text-align: center;
  padding: 1rem 1.5rem;
}

.inline-nav a {
  color: var(--sz-burgundy);
  font-family: var(--font-sans);
  font-size: 0.85rem;
}

.properties-heading {
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: var(--sz-gold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .onto-layout {
    grid-template-columns: 1fr;
  }
  .onto-sidebar {
    position: static;
    max-height: none;
    border-bottom: 1px solid var(--sz-border);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
  }
  .landing-hero h1 { font-size: 1.8rem; }
  .header-nav { gap: 0.75rem; }
}
