@font-face {
  font-family: "Feileacan";
  src: url("/fonts/Feileacan-Regular.ttf") format("truetype");
  font-display: swap;
}

:root {
  --font-display: "Feileacan", Georgia, "Times New Roman", serif;
  --bg: #faf7f2;
  --surface: #ffffff;
  --text: #222;
  --muted: #777;
  --accent: #1f6f4a;
  --title-green: #0d3b24;
  --border: #e6dfd3;
  --sidebar-w: 260px;
  --banner-h: clamp(160px, 28vw, 300px);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 Georgia, "Times New Roman", serif;
}

a { color: var(--accent); }

/* Banner */
.banner {
  position: relative;
  display: flex;
  align-items: flex-end;
  height: var(--banner-h);
  padding: 1rem 1.5rem;
  background: #1b2a4a url("/drog.JPG") center 58% / cover no-repeat;
  z-index: 20;
}

.banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
}

.brand {
  position: relative;
  padding: 0.15em 0.6em;
  background: rgba(250, 247, 242, 0.92);
  border-radius: 6px;
  color: var(--title-green);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 5vw, 3.2rem);
  font-weight: normal;
}

/* Burger */
.burger {
  position: absolute;
  top: 1rem;
  left: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0 10px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 8px;
  cursor: pointer;
}

.burger span {
  display: block;
  height: 3px;
  background: #fff;
  border-radius: 2px;
}

.burger:hover { background: rgba(0, 0, 0, 0.65); }

/* Layout */
.layout {
  position: relative;
  flex: 1;
  display: flex;
  min-height: 0;
}

.sidebar {
  flex: 0 0 var(--sidebar-w);
  width: var(--sidebar-w);
  padding: 1rem 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  transition: margin-left 0.2s;
}

body.nav-closed .sidebar { margin-left: calc(var(--sidebar-w) * -1); }

.sidebar a {
  display: block;
  padding: 0.5rem 1.5rem;
  border-left: 4px solid transparent;
  color: var(--text);
  text-decoration: none;
}

.sidebar a:hover { background: var(--bg); }

.sidebar a.active {
  border-left-color: var(--accent);
  background: var(--bg);
  color: var(--accent);
  font-weight: bold;
}

.scrim { display: none; }

/* Viewing pane */
.pane {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  text-align: center;
}

.pane h1 {
  margin: 0 0 1.5rem;
  font-size: 1rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.poem {
  max-width: 600px;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2rem);
  line-height: 1.7;
}

.poem p { margin: 0.3rem 0; }

.hint { color: var(--muted); font-style: italic; }

/* Narrow screens: sidebar becomes an overlay drawer */
@media (max-width: 800px) {
  .sidebar {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 10;
    margin-left: 0;
    transition: transform 0.2s;
  }

  body.nav-closed .sidebar {
    margin-left: 0;
    transform: translateX(-100%);
  }

  body:not(.nav-closed) .scrim {
    display: block;
    position: absolute;
    inset: 0;
    z-index: 5;
    background: rgba(0, 0, 0, 0.35);
  }
}
