/* Theme v19 – pārģenerēts dizains (sadaļas nemainās)
   Struktūra: Baneris -> Alfabēts -> Navigācija -> Saturs
*/

:root {
  --wrap: 1480px;
  --radius: 18px;
  --radius-lg: 26px;

  --text: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.72);
  --line: rgba(255,255,255,.16);

  --glass: rgba(14, 18, 28, .42);
  --glass-2: rgba(14, 18, 28, .32);
  --shadow: 0 14px 44px rgba(0,0,0,.28);

  --chip: rgba(255,255,255,.08);
  --chip-hover: rgba(255,255,255,.12);
  --chip-active: rgba(255,255,255,.18);

  --primary: #2f76d1;
  --primary-2: #275fb0;

  --bg-overlay: rgba(0,0,0,0.00);
}

[data-theme="light"] {
  --text: rgba(18, 18, 22, .92);
  --muted: rgba(18, 18, 22, .70);
  --line: rgba(18, 18, 22, .14);

  --glass: rgba(255,255,255,.72);
  --glass-2: rgba(255,255,255,.62);
  --shadow: 0 12px 36px rgba(0,0,0,.16);

  --chip: rgba(255,255,255,.70);
  --chip-hover: rgba(255,255,255,.82);
  --chip-active: rgba(255,255,255,.96);

  --bg-overlay: rgba(255,255,255,.00); /* light režīmā neliekam tumšu overlay */
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  letter-spacing: .15px;
  line-height: 1.5;
  overflow-x: hidden;
}

.wrap {
  max-width: var(--wrap);
  padding: 0 20px;
  margin: 0 auto;
}

.bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  background: url('../img/bg-sky.jpg') center top / cover no-repeat;
  filter: saturate(1.06) contrast(1.02);
}
.bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--bg-overlay);
}
/* papildus gradienta viegls "nosēdinājums" apakšā, lai kontrole pār kontrastu */
.bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,.00) 0%, rgba(0,0,0,.10) 55%, rgba(0,0,0,.20) 100%);
  opacity: 0;
  pointer-events: none;
}

.page-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: rgba(0,0,0,0.00);
  display: none;
}

/* ====== Baneris ====== */
.topbanner-wrap {
  padding: 14px 0 8px;
}
.topbanner {
  display: block;
  width: min(480px, 100%);
  margin: 0 auto;
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  box-shadow: 0 12px 26px rgba(0,0,0,.22);
  transform: translateZ(0);
}
.topbanner img {
  width: 100%;
  height: auto;
  display: block;
}

/* ====== Sticky topbar ====== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.topbar::before {
  content:"";
  position:absolute;
  inset:0;
  background: rgba(10, 12, 18, .30);
  border-bottom: 1px solid rgba(255,255,255,.10);
}
[data-theme="light"] .topbar::before {
  background: rgba(255,255,255,.58);
  border-bottom: 1px solid rgba(0,0,0,.08);
}
.topbar > * {
  position: relative;
}

.topbar__inner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 0 12px;
}
.topbar__rule {
  height: 1px;
  background: rgba(255,255,255,.10);
  opacity: .65;
}

/* ====== Alfabēts (virs navigācijas) ====== */
.topalpha {
  padding: 6px 0 0;
}
.topalpha__scroller {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 6px 2px 10px;
  scroll-snap-type: x mandatory;
}
.topalpha__scroller::-webkit-scrollbar {
  height: 8px;
}
.topalpha__scroller::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,.18);
  border-radius: 999px;
}
.alpha {
  scroll-snap-align: start;
  text-decoration: none;
  color: inherit;
  opacity: .90;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--chip);
  white-space: nowrap;
  transition: transform .12s ease, background .12s ease, opacity .12s ease;
}
.alpha:hover {
  background: var(--chip-hover);
  transform: translateY(-1px);
}
.alpha.is-active {
  background: var(--chip-active);
  opacity: 1;
}

/* ====== Brand + Nav ====== */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  min-width: 260px;
}
.brand__mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
}
.brand__mark img {
  width: 42px;
  height: 42px;
  filter: drop-shadow(0 8px 18px rgba(0,0,0,.26));
}
.brand__text {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  font-size: 32px;
  letter-spacing: .01em;
  white-space: nowrap;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  gap: 10px;
}
.nav__link {
  text-decoration: none;
  color: inherit;
  opacity: .92;
  font-size: 15px;
  padding: 9px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: background .12s ease, opacity .12s ease, transform .12s ease;
}
.nav__link:hover {
  opacity: 1;
  background: rgba(255,255,255,.10);
  transform: translateY(-1px);
}
[data-theme="light"] .nav__link:hover {
  background: rgba(0,0,0,.06);
}
.nav__link.is-active {
  opacity: 1;
  border-color: var(--line);
  background: rgba(255,255,255,.12);
}
[data-theme="light"] .nav__link.is-active {
  background: rgba(0,0,0,.06);
}

.topbar__tools {
  display: flex;
  align-items: center;
  gap: 10px;
}
.iconbtn {
  border: 1px solid var(--line);
  background: rgba(255,255,255,.10);
  color: inherit;
  height: 40px;
  width: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(0,0,0,.16);
}
[data-theme="light"] .iconbtn {
  background: rgba(0,0,0,.04);
}

.topbar__burger {
  display: none;
}

.topsearch {
  display: none;
}
.topsearch__input {
  height: 40px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.10);
  color: inherit;
  padding: 0 12px;
  outline: none;
}
.topsearch__input::placeholder { color: var(--muted); }

/* ====== Toggle ====== */
.toggle {
  position: relative;
  width: 84px;
  height: 40px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.10);
  box-shadow: 0 10px 22px rgba(0,0,0,.16);
  overflow: hidden;
}
.toggle__thumb {
  position: absolute;
  top: 9px;
  left: 10px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,.92);
  cursor: pointer;
  transition: transform .18s ease;
}
.toggle.is-on .toggle__thumb {
  transform: translateX(40px);
}
[data-theme="light"] .toggle__thumb {
  background: rgba(0,0,0,.78);
}

/* ====== Helpers ====== */
.muted { color: var(--muted); }

.glass {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.section {
  padding: 38px 0 72px;
}
.section--tight {
  padding: 22px 0 64px;
}

.pagehead {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 18px 16px;
  margin-bottom: 16px;
}
.pagehead__title {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  font-size: 40px;
}
.pagehead__sub {
  margin: 6px 0 0;
  color: var(--muted);
}

.crumb {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  margin: 8px 0 14px;
  color: var(--text);
  opacity: .88;
  text-decoration: none;
}
.crumb:hover { opacity: 1; }

/* ====== Hero ====== */
.hero {
  min-height: calc(100svh - 132px);
  display: grid;
  align-items: center;
  padding: 38px 0 18px;
}
.hero__inner {
  display: grid;
  place-items: center;
  gap: 18px;
}
.hero__emblem {
  display: grid;
  place-items: center;
  gap: 8px;
  margin-top: 8px;
}
.hero__emblem img {
  width: 112px;
  height: 112px;
  filter: drop-shadow(0 14px 26px rgba(0,0,0,.30));
}
.hero__sig {
  font-family: "Cormorant Garamond", Georgia, serif;
  letter-spacing: .22em;
  font-size: 22px;
  opacity: .86;
  margin-top: -10px;
}
.hero__panel {
  width: min(1160px, 100%);
  padding: 30px 26px 28px;
}
.hero__title {
  margin: 0;
  text-align: center;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  font-size: 38px;
}
.hero__lead {
  margin: 16px auto 0;
  max-width: 760px;
  text-align: center;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.75;
}
.hero__lead a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 4px;
  opacity: .95;
}
.hero__actions {
  margin-top: 22px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}
.btn {
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.10);
  padding: 12px 18px;
  border-radius: 14px;
  font-weight: 600;
  min-width: 172px;
  text-align: center;
  display: inline-flex;
  justify-content: center;
  gap: 8px;
  align-items: center;
  cursor: pointer;
  transition: transform .12s ease, background .12s ease, opacity .12s ease;
}
.btn:hover {
  background: rgba(255,255,255,.14);
  transform: translateY(-1px);
}
.btn--primary {
  background: linear-gradient(180deg, var(--primary), var(--primary-2));
  border-color: rgba(255,255,255,.22);
}
.btn--primary:hover {
  opacity: .98;
}

.scrollhint {
  display: grid;
  place-items: center;
  gap: 4px;
  margin-top: 18px;
  color: var(--text);
  text-decoration: none;
  opacity: .78;
}

/* ====== Filters ====== */
.filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding: 14px;
  margin-bottom: 16px;
}
.filters__row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.filters__label {
  font-size: 12px;
  opacity: .90;
}
.filters__input {
  height: 42px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.10);
  color: inherit;
  padding: 0 12px;
  outline: none;
  transition: box-shadow .12s ease, border-color .12s ease;
}
.filters__input:focus {
  border-color: rgba(255,255,255,.34);
  box-shadow: 0 0 0 4px rgba(47, 118, 209, .20);
}
[data-theme="light"] .filters__input {
  background: rgba(255,255,255,.72);
}
[data-theme="light"] .filters__input:focus {
  box-shadow: 0 0 0 4px rgba(47, 118, 209, .16);
}

/* ====== Sortbar ====== */
.sortbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.sortbar__label {
  margin-right: 6px;
  font-size: 13px;
  opacity: .9;
}
.sortbtn {
  text-decoration: none;
  color: inherit;
  opacity: .92;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.08);
  font-size: 14px;
}
.sortbtn:hover { opacity: 1; background: rgba(255,255,255,.12); }
.sortbtn.is-active { opacity: 1; background: rgba(255,255,255,.16); }

/* ====== Song grid ====== */
.songs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.song {
  position: relative;
  background: var(--glass-2);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 16px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 12px 28px rgba(0,0,0,.20);
  transition: transform .12s ease, background .12s ease;
}
.song:hover {
  transform: translateY(-2px);
  background: rgba(255,255,255,.08);
}
.song__title {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 24px;
  line-height: 1.15;
}
.song__meta {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.song__cta {
  margin-top: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.song__link {
  color: inherit;
  text-decoration: none;
  opacity: .92;
}
.song__link:hover {
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.song__num {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 12px;
  letter-spacing: .08em;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.10);
  color: var(--text);
  opacity: .92;
}

/* ====== Detail ====== */
.block {
  padding: 16px;
  margin-bottom: 14px;
}
.block__title {
  margin: 0 0 10px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  font-size: 26px;
}
.twocol {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 14px;
}
.lyrics {
  margin: 0;
  white-space: pre-wrap;
  color: var(--muted);
  line-height: 1.8;
  font-size: 15px;
}
.filelist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.fileitem {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.08);
}
.fileitem__type {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 18px;
}
.fileitem a {
  color: inherit;
  text-decoration: none;
  opacity: .92;
}
.fileitem a:hover {
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.prose h2 {
  font-family: "Cormorant Garamond", Georgia, serif;
  margin: 14px 0 8px;
}
.prose p, .prose li {
  color: var(--muted);
  line-height: 1.85;
}
.link {
  color: inherit;
  text-decoration: none;
  opacity: .92;
}
.link:hover {
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ====== Responsive ====== */
@media (max-width: 1200px) {
  .songs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
  .brand__text { font-size: 28px; }
  .nav { gap: 8px; }
  .songs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .twocol { grid-template-columns: 1fr; }
  .topsearch { display: block; }
}

@media (max-width: 720px) {
  .brand { min-width: 0; }
  .brand__text { font-size: 22px; }
  .nav {
    position: fixed;
    top: 118px;
    left: 12px;
    right: 12px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 10px;
    background: var(--glass);
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }
  .nav.is-open { display: flex; }
  .topbar__burger { display: grid; }
  .songs { grid-template-columns: 1fr; }
  .hero__title { font-size: 32px; }
  .hero__panel { padding: 22px 18px; }
  .btn { min-width: 150px; }
}

/* ====== Valodu izvēlne ====== */
.langswitch{
  margin: 0;
}
.langswitch__select{
  height: 40px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.10);
  color: inherit;
  padding: 0 10px;
  outline: none;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(0,0,0,.16);
}
[data-theme="light"] .langswitch__select{
  background: rgba(0,0,0,.04);
}
.langswitch__select option{
  color: #111;
}
