/* ===========================================================
   audio.bartechbooks.com — design tokens
   Dziedziczone 1:1 z bartech-books.com (assets/css/style.css),
   ten sam papierowy, cieply system. Nie duplikowac wartosci tutaj
   recznie jesli main site zmieni palete - skopiowac blok :root.
   =========================================================== */

@font-face {
  font-family: 'Caveat';
  src: url('../fonts/Caveat-Bold.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: 'Nunito';
  src: url('../fonts/Nunito-Variable.woff2') format('woff2-variations');
  font-weight: 300 900;
  font-display: swap;
}

:root {
  --paper:        #FFFBF2;
  --paper-dim:    #EAF0F5;
  --ink:          #4A4038;
  --ink-soft:     #8A8275;
  --accent-blue:   #4F84B0;
  --sage:         #3A7D6B;
  --mustard:      #F2C14E;
  --line:         #6B5D4F;
  --line-soft:    #C9C2B4;

  --font-display: 'Caveat', cursive;
  --font-body:    'Nunito', system-ui, -apple-system, sans-serif;

  --max-width: 1120px;
  --gutter: clamp(20px, 5vw, 56px);
  --radius: 16px;
  --stroke: 1.5px;

  --shadow-pop: 0 10px 28px rgba(74, 64, 56, 0.13), 0 2px 6px rgba(74, 64, 56, 0.08);
  --shadow-card: 0 4px 16px rgba(74, 64, 56, 0.08), 0 1px 3px rgba(74, 64, 56, 0.06);
  --shadow-soft: 0 8px 24px rgba(74, 64, 56, 0.08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 500;
  line-height: 1.55;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-blue); text-decoration: none; }
a:hover { text-decoration: underline; }

img, svg { max-width: 100%; display: block; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  margin: 0 0 12px;
  line-height: 1.15;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------------- Header (uproszczony, bez i18n na razie) ---------------- */

.site-header {
  border-bottom: var(--stroke) solid var(--line-soft);
  background: var(--paper);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px var(--gutter);
  gap: 20px;
  flex-wrap: wrap;
}

@media (max-width: 480px) {
  .header-row { align-items: flex-end; }
  .brand { font-size: 24px; gap: 8px; }
  .brand-mark { height: 48px; }
  .back-to-main { font-size: 12px; }
}

.brand {
  display: inline-flex;
  align-items: flex-end;
  gap: 14px;
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 700;
  line-height: 1;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  height: 80px;
  width: auto;
  flex-shrink: 0;
}

.brand-text {
  transform: translateY(1px);
}

.back-to-main {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  gap: 6px;
}
.back-to-main:hover { color: var(--accent-blue); }

/* ---------------- Hero / intro sekcji ---------------- */

.page-hero {
  padding: 48px 0 24px;
  text-align: center;
}

.page-hero h1 {
  font-size: clamp(32px, 5vw, 48px);
}

.page-hero p {
  max-width: 620px;
  margin: 0 auto;
  color: var(--ink-soft);
  font-size: 18px;
}

/* ---------------- Karty wyboru kategorii (Ptaki / Plazy / Maszyny) ---------------- */

.category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  padding: 24px 0 64px;
}

@media (max-width: 880px) {
  .category-grid { grid-template-columns: 1fr; }
}

.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  padding: 40px 24px;
  border: var(--stroke) solid var(--line-soft);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-pop);
  text-decoration: none;
}

.category-card-icon {
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--paper-dim);
  font-size: 36px;
}

.category-card-icon-image {
  width: 200px;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--paper-dim);
}

.category-card-icon-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-card-title {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  color: var(--ink);
}

.category-card-desc {
  color: var(--ink-soft);
  font-size: 15px;
}

.category-card-disabled {
  opacity: 0.55;
  cursor: default;
}
.category-card-disabled:hover {
  transform: none;
  box-shadow: var(--shadow-card);
}

.category-card-badge {
  font-size: 12px;
  font-weight: 800;
  color: var(--ink-soft);
  background: var(--paper-dim);
  padding: 3px 10px;
  border-radius: 999px;
}

/* ---------------- Grid kart ptakow ---------------- */

.bird-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding: 8px 0 64px;
}

@media (max-width: 1020px) {
  .bird-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 720px) {
  .bird-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 460px) {
  .bird-grid { grid-template-columns: 1fr; }
}

.bird-card {
  display: flex;
  flex-direction: column;
  border: var(--stroke) solid var(--line-soft);
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.2s ease;
}

.bird-card:hover {
  box-shadow: var(--shadow-pop);
}

.bird-card-highlighted {
  animation: bird-highlight-pulse 1.3s ease-in-out 2;
  position: relative;
  z-index: 1;
}

@keyframes bird-highlight-pulse {
  0%, 100% { box-shadow: var(--shadow-card); }
  50% { box-shadow: 0 0 0 4px var(--accent-blue), var(--shadow-pop); }
}

/* Wariant B: 3/4 obrazek + 1/4 odtwarzacz, w ramach kwadratu */
.bird-card-art {
  aspect-ratio: 896 / 1200;
  flex: 3;
  background: linear-gradient(135deg, var(--paper-dim), #DCE8F0);
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: var(--stroke) solid var(--line-soft);
  overflow: hidden;
  position: relative;
}

.bird-info-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.85);
  color: var(--ink-soft);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  line-height: 1;
}
.bird-info-btn:hover { background: #fff; color: var(--accent-blue); }

.bird-attribution-popup {
  position: absolute;
  top: 32px;
  right: 6px;
  max-width: 85%;
  background: #fff;
  border: var(--stroke) solid var(--line-soft);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 11px;
  line-height: 1.4;
  color: var(--ink-soft);
  box-shadow: var(--shadow-card);
  z-index: 3;
  display: none;
}
.bird-attribution-popup.visible { display: block; }
.bird-attribution-popup a { font-size: 11px; }

.bird-card-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bird-card-art-placeholder {
  width: 56px;
  height: 56px;
  color: var(--line-soft);
}

.bird-card-player {
  flex: 1;
  padding: 8px 12px 8px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 4px;
}

.bird-card-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  line-height: 1.1;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bird-card-name-lat {
  font-family: var(--font-body);
  font-style: italic;
  font-weight: 600;
  font-size: 12px;
  line-height: 1.1;
  color: var(--ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.bird-card-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bird-play-btn {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 50%;
  border: var(--stroke) solid var(--accent-blue);
  background: #fff;
  color: var(--accent-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}
.bird-play-btn:hover { background: var(--paper-dim); }
.bird-play-btn svg { width: 14px; height: 14px; }

.bird-progress {
  flex: 1;
  height: 4px;
  background: var(--line-soft);
  border-radius: 2px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
}

.bird-progress-fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 0%;
  background: var(--accent-blue);
  border-radius: 2px;
}

.bird-loop-btn {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  border: none;
  background: none;
  color: var(--ink-soft);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 4px;
}
.bird-loop-btn svg { width: 16px; height: 16px; }
.bird-loop-btn.active { color: var(--accent-blue); background: var(--paper-dim); }

.bird-card-meta {
  font-size: 11px;
  color: var(--ink-soft);
}

/* ---------------- Footer minimalny ---------------- */

.site-footer {
  border-top: var(--stroke) solid var(--line-soft);
  padding: 24px var(--gutter) 40px;
  text-align: center;
  font-size: 13px;
  color: var(--ink-soft);
}
