/* ============================================
   HOME PAGE — home.css
   ============================================ */

@font-face {
  font-family: 'FCB';
  src: url('../fonts/fcb-light.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'FCB';
  src: url('../fonts/fcb-regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'FCB';
  src: url('../fonts/fcb-semibold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'FCB';
  src: url('../fonts/fcb-bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'FCB';
  src: url('../fonts/fcb-extrabold.woff2') format('woff2');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

/* ── Variables ── */
:root {
  --bg:             #f5f2ec;
  --surface:        #ffffff;
  --text-primary:   #1a1a1a;
  --text-secondary: #4a4a4a;
  --text-meta:      #999999;
  --accent:         #c8102e;
  --accent-alt:     #004d98;
  --border:         #dedad3;
  --header-bg:      #003DA5;
  --header-text:    #ffffff;
  --senyera-yellow: #FCCA00;

  --font-display:   'FCB', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body:      'FCB', -apple-system, BlinkMacSystemFont, sans-serif;

  --max-width:      min(88vw, 1600px);
  --gutter:         40px;
}

/* ── Reset ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Header ── */
.site-header {
  background-color: var(--header-bg);
  padding: 0 var(--gutter);
  height: 56px;
  display: flex;
  align-items: center;
  gap: 20px;
  border-bottom: 4px solid transparent;
  border-image: linear-gradient(to right, var(--accent) 50%, var(--senyera-yellow) 50%) 1;
}

.site-header__spacer {
  flex: 1;
}

.site-header .logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo__mark {
  width: 36px;
  height: 24px;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.logo__mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.logo__mark--placeholder {
  font-family: var(--font-display);
  font-size: 0.65rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.logo__tagline {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.75);
  letter-spacing: 0.5px;
  border-left: 1px solid rgba(255, 255, 255, 0.3);
  padding-left: 16px;
  font-style: italic;
}

/* ── Language selector ── */
.lang-selector {
  position: relative;
}

.lang-selector__current {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: transparent;
  transition: border-color 0.15s ease;
  user-select: none;
}

.lang-selector__current:hover {
  border-color: rgba(255, 255, 255, 0.5);
}

.lang-selector__flag {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.15);
}

.lang-selector__name {
  font-family: var(--font-body);
  font-size: 0.78rem;
  color: #cccccc;
  letter-spacing: 0.3px;
}

.lang-selector__arrow {
  font-size: 0.6rem;
  color: #666;
  transition: transform 0.15s ease;
  margin-left: 2px;
}

.lang-selector--open .lang-selector__arrow {
  transform: rotate(180deg);
}

.lang-selector--open .lang-selector__current {
  border-color: rgba(255, 255, 255, 0.5);
}

/* Dropdown */
.lang-selector__dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 3px;
  min-width: 130px;
  overflow: hidden;
  z-index: 100;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}

.lang-selector--open .lang-selector__dropdown {
  display: block;
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background 0.1s ease;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
}

.lang-option:hover {
  background: #252525;
}

.lang-option--active {
  background: #222;
}

.lang-option__flag {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.1);
}

.lang-option__name {
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: #cccccc;
}

.lang-option--active .lang-option__name {
  color: #ffffff;
  font-weight: 600;
}

/* ── Intro strip ── */
.site-intro {
  background-color: #eae6de;
  border-bottom: 1px solid var(--border);
  padding: 32px 0;
}

.site-intro__inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.site-intro__text {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.75;
  font-style: italic;
  border-left: 3px solid var(--accent);
  padding-left: 16px;
}

/* ── Song list ── */
.song-list {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 40px 0 0;
  flex: 1;
}

.song-list__heading {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--text-meta);
  margin-bottom: 4px;
}

.song-list__count {
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--text-meta);
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

/* ── Song entry ── */
.song-entry {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 20px 24px;
  border: 1px solid var(--border);
  border-radius: 3px;
  margin-bottom: 10px;
  background: var(--surface);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.song-entry__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.song-entry__content {
  flex: 1;
  display: flex;
  align-items: baseline;
  gap: 20px;
  flex-wrap: wrap;
}

.song-entry__title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  transition: color 0.15s ease;
  white-space: nowrap;
}


.song-entry__desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
  font-weight: 300;
  flex: 1;
  min-width: 200px;
}

.song-entry__arrow {
  font-size: 1rem;
  color: var(--border);
  flex-shrink: 0;
  transition: color 0.15s ease, transform 0.15s ease;
}

.song-entry:hover {
  border-color: var(--accent);
  box-shadow: 2px 2px 0 var(--accent);
}

.song-entry:hover .song-entry__title {
  color: var(--accent);
}

.song-entry:hover .song-entry__arrow {
  color: var(--accent);
  transform: translateX(4px);
}

/* ── Footer ── */
.site-footer {
  max-width: var(--max-width);
  margin: 48px auto 0;
  padding: 20px 0;
  border-top: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--text-meta);
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .logo__tagline {
    display: none;
  }

  .song-entry__title {
    font-size: 1.2rem;
  }

  .site-footer {
    flex-direction: column;
    gap: 6px;
    text-align: center;
  }
}
