/*
Theme Name: Festizine
Theme URI: https://festizine.de/
Description: Schlankes Frontend für Festizine.de – die offene Schreibmaschine.
Version: 0.3.0
Author: Festizine
License: GPL-2.0-or-later
Text Domain: festizine
*/

:root {
  --paper: #f4f0e6;
  --paper-dark: #e8e1d3;
  --ink: #171717;
  --muted: #6c675e;
  --line: #cfc7b8;
  --max: 980px;
  --sheet: 760px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: #ddd8cf;
  color: var(--ink);
  font-family: Georgia, 'Times New Roman', serif;
  line-height: 1.55;
}
a { color: inherit; }

.site-header {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 16px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
}
.site-title {
  margin: 0;
  font-family: 'Courier New', Courier, monospace;
  font-size: clamp(30px, 5vw, 52px);
  font-weight: 700;
  letter-spacing: -0.06em;
  text-transform: uppercase;
}
.site-title a { text-decoration: none; }
.site-tagline {
  margin: 0;
  font-family: 'Courier New', Courier, monospace;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
}

.site-nav {
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto 28px;
  padding: 8px 0;
  display: flex;
  gap: 20px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 13px;
  text-transform: uppercase;
}
.site-nav a { text-decoration: none; }
.site-nav a:hover { text-decoration: underline; }
.site-nav a.is-active { font-weight: 700; text-decoration: underline; }

.main {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding-bottom: 60px;
}

.sheet {
  width: min(100%, var(--sheet));
  min-height: 930px;
  margin: 0 auto;
  padding: 58px 70px 54px;
  background: var(--paper);
  box-shadow: 0 8px 24px rgba(0,0,0,.16);
  position: relative;
}
.sheet::before {
  content: '';
  position: absolute;
  inset: 20px;
  border: 1px solid rgba(0,0,0,.16);
  pointer-events: none;
}
.sheet-header,
.sheet-body,
.sheet-footer { position: relative; z-index: 1; }

.sheet-kicker {
  font-family: 'Courier New', Courier, monospace;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 42px;
}
.sheet-text {
  white-space: pre-wrap;
  font-family: 'Courier New', Courier, monospace;
  font-size: 20px;
  line-height: 1.55;
  min-height: 650px;
}
.sheet-meta {
  margin-top: 44px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 13px;
}
.sheet-meta span:last-child { text-align: right; }

.sheet-empty {
  min-height: 650px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--muted);
  font-family: 'Courier New', Courier, monospace;
}

.home-intro {
  width: min(100%, var(--sheet));
  margin: 0 auto 18px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 13px;
}
.home-intro strong { font-size: 16px; }

.sheet-actions {
  width: min(100%, var(--sheet));
  margin: 16px auto 0;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 13px;
}
.button {
  display: inline-block;
  border: 1px solid var(--ink);
  padding: 7px 12px;
  text-decoration: none;
  background: transparent;
}
.button:hover { background: var(--ink); color: var(--paper); }

.page-title {
  font-family: 'Courier New', Courier, monospace;
  text-transform: uppercase;
  font-size: 28px;
  margin: 0 0 24px;
}
.archive-list { display: grid; gap: 14px; }
.archive-card {
  background: var(--paper);
  padding: 20px 24px;
  border: 1px solid var(--line);
}
.archive-card h2 { margin: 0 0 5px; font-size: 23px; }
.archive-card p { margin: 3px 0; }
.archive-meta { font-family: 'Courier New', Courier, monospace; font-size: 12px; color: var(--muted); }

.site-footer {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  border-top: 1px solid var(--ink);
  padding: 18px 0 30px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 12px;
  color: var(--muted);
}

@media (max-width: 700px) {
  .site-header { display: block; }
  .site-tagline { margin-top: 5px; }
  .site-nav { overflow-x: auto; white-space: nowrap; }
  .sheet { min-height: 780px; padding: 42px 28px 38px; }
  .sheet::before { inset: 12px; }
  .sheet-text { font-size: 17px; min-height: 540px; }
  .sheet-empty { min-height: 540px; }
  .sheet-meta { display: block; }
  .sheet-meta span { display: block; margin-top: 4px; }
  .sheet-meta span:last-child { text-align: left; }
}


.text-navigation {
  width: min(100%, var(--sheet));
  margin: 18px auto 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'Courier New', Courier, monospace;
}
.text-arrow {
  width: 54px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  line-height: 1;
  text-decoration: none;
  border: 1px solid var(--line);
  background: rgba(244,240,230,.55);
}
.text-arrow:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.text-arrow-disabled { opacity: .25; }
.issue-links { display:flex; flex-wrap:wrap; gap:8px; margin:18px 0 30px; }
.issue-detail { max-width: var(--sheet); margin: 0 auto; }
.continuous-reading { margin-top: 28px; }
.continuous-reading h3 { font-family:'Courier New',Courier,monospace; text-transform:uppercase; font-size:18px; }
.continuous-text { background:var(--paper); border-top:1px solid var(--line); padding:26px 30px; }
.continuous-text-number { font-family:'Courier New',Courier,monospace; font-size:12px; color:var(--muted); margin-bottom:14px; }
.continuous-text-body { font-family:'Courier New',Courier,monospace; white-space:normal; }
.continuous-text-meta { margin-top:18px; font-family:'Courier New',Courier,monospace; font-size:13px; text-align:right; }
.pdf-links { display:flex; flex-wrap:wrap; gap:7px; }
.standard-page { max-width:var(--sheet); margin:0 auto; background:var(--paper); padding:40px 50px; min-height:500px; }
.page-content { font-family:'Courier New',Courier,monospace; }
@media (max-width:700px){ .standard-page{padding:30px 25px;} .text-arrow{width:48px;height:38px;} }


/* v0.2.1: compact text controls — arrows directly beside centered random text */
.text-controls {
  width: min(100%, var(--sheet));
  margin: 18px auto 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: 'Courier New', Courier, monospace;
}
.text-controls .text-arrow {
  flex: 0 0 54px;
}
.random-text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 7px 14px;
  border: 1px solid var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.random-text-link:hover { background: var(--ink); color: var(--paper); }

/* Clear distinction between the online reading view and PDF files. */
.issue-links .button,
.pdf-links .button { font-family: 'Courier New', Courier, monospace; }

@media (max-width: 700px) {
  .text-controls { gap: 6px; }
  .text-controls .text-arrow { flex-basis: 48px; }
  .random-text-link { padding-left: 10px; padding-right: 10px; }
}

/* v0.3.0 – compact sheets, searchable text archive and clearer navigation */
.main { padding-bottom: 42px; }
.sheet { min-height: 0; padding-top: 48px; padding-bottom: 42px; }
.sheet-text { min-height: 220px; }
.sheet-short .sheet-text { min-height: 190px; }
.sheet-medium .sheet-text { min-height: 260px; }
.sheet-long .sheet-text { min-height: 340px; }
.sheet-kicker { margin-bottom: 30px; }
.sheet-meta { margin-top: 32px; }
.home-intro { display:flex; justify-content:space-between; gap:18px; align-items:baseline; }
.home-intro a { font-family:'Courier New',Courier,monospace; }

.text-controls { margin-top: 16px; flex-wrap:wrap; }
.text-nav-button, .random-text-link {
  min-height: 42px; display:inline-flex; align-items:center; justify-content:center;
  padding:7px 14px; border:1px solid var(--ink); text-decoration:none; white-space:nowrap;
}
.text-nav-button:hover, .random-text-link:hover { background:var(--ink); color:var(--paper); }
.text-nav-button.is-disabled { opacity:.28; cursor:default; }
.text-position { width:min(100%,var(--sheet)); margin:8px auto 0; text-align:center; font-family:'Courier New',Courier,monospace; font-size:12px; color:var(--muted); }

.section-heading-row { display:flex; justify-content:space-between; gap:18px; align-items:flex-start; margin-bottom:18px; }
.section-heading-row .page-title { margin-bottom:6px; }
.result-count { font-family:'Courier New',Courier,monospace; border:1px solid var(--line); padding:7px 10px; white-space:nowrap; }

.continuous-text { padding:22px 28px; }
.continuous-text-footer { display:flex; align-items:flex-end; justify-content:space-between; gap:18px; margin-top:18px; }
.continuous-text-meta { margin-top:0; text-align:left; }
.continuous-text-actions, .text-db-actions { display:flex; flex-wrap:wrap; align-items:center; gap:7px; }
.button-small { padding:5px 9px; font-size:12px; }
.button-quiet { border-color:var(--line); color:var(--muted); }

.text-filter { background:var(--paper); border:1px solid var(--line); padding:18px; display:grid; grid-template-columns:2fr repeat(5,1fr); gap:12px; margin-bottom:18px; }
.text-filter label { display:flex; flex-direction:column; gap:5px; font-family:'Courier New',Courier,monospace; font-size:11px; text-transform:uppercase; letter-spacing:.04em; }
.text-filter input, .text-filter select { width:100%; padding:8px 9px; border:1px solid var(--line); background:#fffdf8; font:14px 'Courier New',Courier,monospace; min-width:0; }
.filter-actions { grid-column:1/-1; display:flex; gap:8px; }
.text-db-list { display:grid; gap:10px; }
.text-db-card { background:var(--paper); border:1px solid var(--line); padding:18px 20px; }
.text-db-meta { display:flex; justify-content:space-between; gap:16px; margin-bottom:12px; font-family:'Courier New',Courier,monospace; font-size:12px; color:var(--muted); }
.text-db-meta strong { color:var(--ink); }
.text-db-body { font-family:'Courier New',Courier,monospace; font-size:16px; line-height:1.5; margin-bottom:14px; }
.empty-result { background:var(--paper); border:1px solid var(--line); padding:24px; }

@media (max-width: 980px) {
  .text-filter { grid-template-columns:repeat(2,1fr); }
  .filter-search { grid-column:1/-1; }
}
@media (max-width: 700px) {
  .sheet { min-height:0; padding:36px 26px 32px; }
  .sheet-text, .sheet-short .sheet-text, .sheet-medium .sheet-text, .sheet-long .sheet-text { min-height:150px; font-size:17px; }
  .home-intro { display:block; }
  .home-intro a { display:inline-block; margin-top:5px; }
  .text-nav-button span { display:none; }
  .text-nav-button { min-width:48px; padding-left:9px; padding-right:9px; }
  .continuous-text-footer, .section-heading-row, .text-db-meta { display:block; }
  .continuous-text-actions { margin-top:12px; }
  .text-filter { grid-template-columns:1fr; }
  .filter-search, .filter-actions { grid-column:auto; }
}
