/* =========================================================
   ALEX I BRUNA — CASA
   Desktop base neta
   ========================================================= */

.page-casa {
  height: 100vh;
  overflow: hidden;
}

.casa-shell {
  height: 100vh;
  overflow: hidden;
  background-color: #faf7f4;
}

.casa-background {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  object-position: center center;
  transform: none;
  transform-origin: center center;
  z-index: 0;
  pointer-events: none;
}

.casa-content {
  position: relative;
  z-index: 2;
  height: 100vh;
  overflow: hidden;
}

/* Menú superior */
.casa-nav {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: Helvetica, Arial, sans-serif;
  color: rgba(47, 42, 38, 0.72);
}

.casa-nav .nav-entry {
  margin-bottom: 9px;
  font-size: 0.82rem;
  color: rgba(47, 42, 38, 0.54);
  opacity: 0.75;
  letter-spacing: 0.03em;
  text-decoration: none;
}

.casa-nav .nav-links {
  display: flex;
  gap: 2rem;
}

.casa-nav .nav-links a {
  font-size: 0.95rem;
  color: rgba(47, 42, 38, 0.72);
  text-decoration: none;
}

.casa-nav a:hover {
  color: #35556f;
}

/* Capítols */
.casa-chapters {
  position: absolute;
  left: 37.8%;
  top: 55%;
  transform: translateY(-50%);
  width: 330px;
}

.chapter-list {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}

.chapter-link {
  display: block;
  width: fit-content;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.34;
  font-weight: 580;
  text-decoration: none;
  border-radius: 999px;
  padding: 0.04rem 0.48rem;
}

/* 1. Llegit */
.chapter-link.is-read {
  color: #183a5a;
  background: transparent;
  border: none;
  font-weight: 650;
}

/* 2. Estic llegint */
.chapter-link.is-reading {
  color: #183a5a;
  background: transparent;
  border: none;
  font-weight: 650;
}

/* 3. Proper disponible */
.chapter-link.is-available {
  color: #183a5a;
  background: rgba(218, 234, 246, 0.42);
  border: 1px solid rgba(145, 185, 215, 0.42);
  font-weight: 650;
}

/* 4. Bloquejat */
.chapter-link.is-locked {
  color: rgba(82, 76, 70, 0.46);
  background: transparent;
  cursor: default;
  pointer-events: none;
}

/* Continuar lectura */
.casa-continue {
  position: absolute;
  left: 55.3%;
  top: 31.8%;
  transform: translateY(-50%);
}

.casa-continue a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 205px;
  padding: 0.62rem 1.15rem;
  border-radius: 21px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.25rem;
  color: white;
  text-decoration: none;
  background: rgba(38, 68, 101, 0.58);
  border: 1px solid rgba(210, 232, 255, 0.7);
  box-shadow:
    0 0 12px rgba(120, 190, 255, 0.45),
    inset 0 0 9px rgba(255,255,255,0.12);
}

/* Coses compartides */
.casa-spaces {
  position: absolute;
  right: 18px;
  top: 48%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  align-items: flex-end;
  text-align: right;
}

.casa-spaces a {
  white-space: nowrap;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 1.35rem;
  font-weight: 500;
  color: #274b6d;
  text-decoration: none;
  transition: color .2s ease;
}

.casa-spaces a:hover {
  color: #183a5a;
}

/* Footer */
.casa-footer {
  position: absolute;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  align-items: center;
  white-space: nowrap;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 0.85rem;
  color: rgba(47, 42, 38, 0.55);
}

.casa-footer a {
  color: rgba(47, 42, 38, 0.55);
  text-decoration: none;
}

.casa-footer a:hover,
.casa-nav a:hover,
.casa-spaces a:hover,
.casa-continue a:hover {
  color: #35556f;
}
.chapter-link.is-current,
.chapter-link.is-available {
  background: rgba(230, 242, 251, 0.75);
  color: #274b6d;
  border-radius: 999px;
  padding: 4px 10px;
  font-weight: 600;
}

.chapter-link.is-read {
  color: #274b6d;
  font-weight: 600;
}

.chapter-link.is-locked {
  color: rgba(80, 80, 80, 0.32);
  pointer-events: none;
}
@media (max-width: 700px) {
  .page-casa,
  .casa-shell,
  .casa-content {
    height: 100svh;
    min-height: 100svh;
    overflow: hidden;
  }

  .casa-background {
  content: url("../img/fonsMOBILcasaDEF.png");
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100svh;
  object-fit: cover;
  object-position: 48% top;
  transform: none;
  opacity: 1;
  background-color: #faf7f4;
}

  .casa-content {
    padding: 0;
  }

  .casa-nav {
    position: absolute;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
  }

  .casa-nav .nav-entry {
    margin-bottom: 8px;
    font-size: 0.78rem;
  }

  .casa-nav .nav-links {
    gap: 1.8rem;
  }

  .casa-nav .nav-links a {
    font-size: 0.9rem;
  }

  .casa-continue {
    position: absolute;
    left: 50%;
    top: 23%;
    transform: translateX(-50%);
  }

  .casa-continue a {
    min-width: 220px;
    font-size: 1.18rem;
    padding: 0.68rem 1.2rem;
  }

  .casa-chapters {
    position: absolute;
    left: 50%;
    top: 31%;
    transform: translateX(-50%);
    width: 310px;
  }

  .chapter-list {
    align-items: center;
    gap: 0.48rem;
  }

  .chapter-link {
    font-size: 0.92rem;
    text-align: center;
  }

  .casa-spaces {
  position: absolute;
  left: 50%;
  right: auto;
  top: auto;
  bottom: 98px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 0.82rem;
  align-items: center;
  text-align: center;
  z-index: 4;
}

.casa-spaces a {
  font-size: 1.14rem;
  font-weight: 600;
  line-height: 1.15;
  color: #274b6d;
  text-decoration: none;
  white-space: nowrap;
  text-shadow: 0 1px 5px rgba(255,255,255,0.78);
  transition: color .2s ease;
}

.casa-spaces a:hover {
  color: #183a5a;
}

  .casa-footer {
    position: absolute;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.35rem 0.5rem;
    font-size: 0.72rem;
    max-width: 320px;
  }
}
@media (max-width: 380px) and (max-height: 760px) {

  .casa-spaces {
    bottom: 72px;
    gap: 0.58rem;
  }

  .casa-spaces a {
    font-size: 1.02rem;
  }

  .casa-footer {
    bottom: 12px;
    font-size: 0.68rem;
  }

}