/* background.css */
/* Page intent:
   - Persistent left navigation (color panel)
   - Dense “bookshelf” grid on the right
   - Typography-first, minimal decoration, strong composition
*/

:root{
  /* You can tune these without touching the layout */
  --bg-panel: #f2c94c;          /* accent panel (Wakuli-like) */
  --bg-paper: #111111;          /* base text */
  --bg-surface: #ffffff;        /* main surface */
  --bg-muted: rgba(17,17,17,.65);
  --bg-hairline: rgba(17,17,17,.16);

  --nav-w: 280px;
  --header-h: 56px;            /* injected top header height */
  --gap: 18px;
  --radius: 14px;

  --grid-min: 220px;            /* lower = denser */
  --grid-gap: 12px;             /* lower = denser */

  --type: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ===== Background-only top header (injected partial) ===== */
/* Default: fixed + transparent container (so the yellow sidebar reaches the top visually) */
.page-background .site-header{
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-h);
  background: transparent;
  border-bottom: 0;
}

/* When footer becomes visible, JS adds .bg-header-released and sets --header-release-top */
.page-background.bg-header-released .site-header{
  position: absolute;
  top: var(--header-release-top, 0px);
}

.page-background .site-header__inner{
  height: var(--header-h);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 10px 16px;

  /* fontos: a belső sáv csak a jobb oldalon kap “fehér header” felületet */
  background: linear-gradient(
    to right,
    transparent 0,
    transparent var(--nav-w),
    rgba(255,255,255,.90) var(--nav-w),
    rgba(255,255,255,.90) 100%
  );

  border-bottom: 1px solid var(--bg-hairline);
  backdrop-filter: blur(10px);
}

.page-background .site-header__brand{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--bg-paper);
}

.page-background .site-header__brandmark{
  width: 180px;
  height: 40px;

  background-color: #b08a00; /* sötét sárga – ezt változtatod */

  -webkit-mask: url("/assets/shared/icons/falcopolis-H-600.svg") center / contain no-repeat;
  mask: url("/assets/shared/icons/falcopolis-H-600.svg") center / contain no-repeat;

  border: 0;
  border-radius: 0;
}

/*.page-background .site-header__brandtext{
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
}*/

.page-background .site-header__brandtext{
  display: none;
}

.page-background .site-header__nav{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.page-background .site-header__link{
  text-decoration: none;
  color: rgba(17,17,17,.78);
  font-size: 13px;
  padding: 6px 10px;
  border-radius: 999px;
}

.page-background .site-header__link:hover{
  background: rgba(17,17,17,.06);
  color: rgba(17,17,17,.92);
}

.page-background .site-header__link.is-current,
.page-background .site-header__link[aria-current="page"]{
  background: rgba(17,17,17,.10);
  color: rgba(17,17,17,.95);
}

.page-background .site-header__right{
  display: flex;
  justify-content: end;
}

.page-background .site-header__back{
  text-decoration: none;
  color: rgba(17,17,17,.88);
  font-size: 13px;
  padding: 8px 12px;
  border: 1px solid var(--bg-hairline);
  border-radius: 999px;
  white-space: nowrap;
}

.page-background .site-header__back:hover{
  border-color: rgba(17,17,17,.28);
  background: rgba(17,17,17,.02);
}

@media (max-width: 720px){
  .page-background .site-header{
    position: sticky;
    height: auto;
  }
  .page-background.bg-header-released .site-header{
    position: sticky;
    top: 0;
  }
  .page-background .site-header__inner{
    height: auto;
    grid-template-columns: 1fr;
    justify-items: start;
    gap: 10px;
  }
  .page-background .site-header__nav{ justify-content: start; }
  .page-background .site-header__right{ width: 100%; justify-content: start; }

  .bg-main{
    padding: 18px 16px 50px 16px;
  }
}

/* Basic reset helpers (safe, local) */
.page-background{
  background: var(--bg-surface);
  color: var(--bg-paper);
  font-family: var(--type);
}

.skip-link{
  position: absolute;
  left: -9999px;
  top: 8px;
}
.skip-link:focus{
  left: 12px;
  z-index: 9999;
  background: var(--bg-surface);
  border: 1px solid var(--bg-paper);
  padding: 10px 12px;
  border-radius: 999px;
}

/* Layout */
.bg-layout{
  display: grid;
  grid-template-columns: var(--nav-w) 1fr;
  min-height: 100vh;
}

.bg-nav{
  position: sticky;
  top: 0;
  height: 100vh;
  background: var(--bg-panel);
  border-right: 1px solid rgba(0,0,0,.12);
}

.bg-nav__inner{
  height: 100%;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 18px;
  padding: 22px 18px;
  padding-top: calc(22px + var(--header-h));
}

.bg-nav__kicker{
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  opacity: .9;
}

.bg-nav__title{
  margin: 8px 0 6px 0;
  font-size: 30px;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.bg-nav__subtitle{
  margin: 0;
  font-size: 13px;
  line-height: 1.35;
  color: rgba(0,0,0,.70);
  max-width: 24ch;
}

.bg-nav__menu{
  display: grid;
  gap: 8px;
  align-content: start;
}

.bg-nav__link{
  display: inline-flex;
  align-items: center;
  gap: 10px;

  color: rgba(0,0,0,.85);
  text-decoration: none;
  font-size: 14px;
  line-height: 1.2;
  padding: 8px 10px;
  border-radius: 999px;
}

.bg-nav__link:hover{
  background: rgba(0,0,0,.08);
}

.bg-nav__link.is-active{
  background: rgba(0,0,0,.14);
  color: rgba(0,0,0,.95);
}

.bg-nav__meta{
  align-self: start;
}

.bg-legend{
  display: grid;
  gap: 8px;
  padding-top: 6px;
  border-top: 1px solid rgba(0,0,0,.15);
}

.bg-legend__item{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: rgba(0,0,0,.70);
}

.bg-nav__footer{
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: rgba(0,0,0,.70);
}

.bg-nav__smalllink{
  color: rgba(0,0,0,.85);
  text-decoration: none;
}
.bg-nav__smalllink:hover{
  text-decoration: underline;
}

.bg-nav__sep{
  opacity: .55;
}

/* Main */
.bg-main{
  padding: calc(22px + var(--header-h)) 22px 60px 22px;
  background: var(--bg-surface);
}

.bg-top{
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 18px;
  align-items: end;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--bg-hairline);
  margin-bottom: 18px;
}

.bg-top__heading{
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.01em;
}

.bg-top__hint{
  margin-top: 6px;
  color: var(--bg-muted);
  font-size: 13px;
}

.bg-search{
  display: grid;
  gap: 6px;
}
.bg-search__label{
  font-size: 12px;
  color: var(--bg-muted);
}
.bg-search__input{
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--bg-hairline);
  border-radius: 999px;
  font-size: 14px;
  outline: none;
}
.bg-search__input:focus{
  border-color: rgba(17,17,17,.38);
}

/* Sections */
.bg-section{
  padding-top: 24px;
}

.bg-section__header{
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  margin-bottom: 12px;
}

.bg-section__title{
  margin: 0;
  font-size: 14px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.bg-section__desc{
  margin: 0;
  color: var(--bg-muted);
  font-size: 13px;
  line-height: 1.35;
  max-width: 64ch;
}

/* Dense bookshelf grid */
.bg-grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--grid-min), 1fr));
  gap: var(--grid-gap);
  align-items: stretch;
}

/* Items */
.bg-item{
  border: 1px solid var(--bg-hairline);
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
}

.bg-item__link{
  display: grid;
  gap: 8px;
  padding: 12px 12px 12px 12px;
  color: inherit;
  text-decoration: none;
  height: 100%;
}

.bg-item__link:hover{
  border-color: rgba(17,17,17,.28);
  background: rgba(17,17,17,.02);
}

.bg-item__top{
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--bg-muted);
}

.bg-item__type{
  text-transform: uppercase;
  letter-spacing: .10em;
  font-size: 11px;
}

.bg-item__year{
  margin-left: auto;
  font-variant-numeric: tabular-nums;
}

.bg-item__title{
  margin: 0;
  font-size: 14px;
  line-height: 1.2;
  letter-spacing: -0.01em;

  /* Keep bookshelf density */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 3.6em;
}

.bg-item__meta{
  font-size: 12.5px;
  color: var(--bg-muted);
  line-height: 1.25;

  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.5em;
}

.bg-item__cta{
  margin-top: 2px;
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: rgba(17,17,17,.78);
}

/* Dots: ultra-minimal type encoding */
.bg-dot{
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: rgba(0,0,0,.35);
  flex: 0 0 auto;
  border: 1px solid rgba(0,0,0,.25);
}

.bg-dot.is-paper{ background: rgba(0,0,0,.85); }
.bg-dot.is-film{ background: rgba(0,0,0,.55); }
.bg-dot.is-field{ background: rgba(0,0,0,.70); }
.bg-dot.is-visual{ background: rgba(0,0,0,.40); }
.bg-dot.is-book{ background: rgba(0,0,0,.30); }
.bg-dot.is-link{ background: rgba(0,0,0,.18); }

/* Optional: links grid can be slightly denser */
.bg-grid--links{
  --grid-min: 200px;
}

/* Responsive: collapse sidebar into a top bar */
@media (max-width: 980px){
  :root{ --nav-w: 100%; }

  .bg-layout{
    grid-template-columns: 1fr;
  }

  .bg-nav{
    position: relative;
    border-right: none;
    border-bottom: 1px solid rgba(0,0,0,.12);
    top: 0;
    height: auto;
  }

  .bg-nav__inner{
    grid-template-rows: auto auto auto;
    padding: 18px 16px;
    padding-top: 18px;
  }

  .bg-nav__subtitle{
    max-width: 70ch;
  }

  .bg-legend{
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .bg-top{
    grid-template-columns: 1fr;
  }

  .bg-main{
    padding: 18px 16px 50px 16px;
  }
}

@media (max-width: 520px){
  :root{
    --grid-min: 170px;
    --grid-gap: 10px;
    --radius: 12px;
  }
  .bg-nav__title{ font-size: 26px; }
  .bg-item__link{ padding: 10px; }
}