/* ------------------------------------------------------ */
/* BASE SETTINGS */
/* ------------------------------------------------------ */

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: transparent;
  font-family: Arial, sans-serif;
  font-size: 13px;
  overflow-x: hidden;
}

/* Default: homepage has no vertical scroll */
body {
  overflow-y: hidden;
}

/* Internal pages (like Tolerâncias) can scroll */
body.internal-page {
  overflow-y: auto;
}

/* Simple white pages can scroll */
body.simple-photo-page {
  overflow-y: auto;
  background: white;
  color: black;
}

/* Make sizing predictable */
* {
  box-sizing: border-box;
}

/* ------------------------------------------------------ */
/* HOMEPAGE VIDEO  */
/* ------------------------------------------------------ */

.bg-video {
  position: fixed;
  top: 0;
  left: 0;
  width: 110vw;
  height: 110vh;
  object-fit: cover;
  z-index: -1;
  pointer-events: none;
  filter: blur(19px);
  transform: translate(-5vw, -5vh);
}

/* ------------------------------------------------------ */
/* INTERNAL PAGES — BLURRED VIDEO BACKGROUND */
/* ------------------------------------------------------ */

.bg-video-internal {
  position: fixed;
  top: 0;
  left: 0;
  width: 110vw;
  height: 110vh;
  object-fit: cover;
  z-index: -1;
  pointer-events: none;
  filter: blur(10px);
  transform: translate(-5vw, -5vh);
}

/* ------------------------------------------------------ */
/* MENU (adaptive contrast) */
/* ------------------------------------------------------ */

.side-nav {
  position: fixed;
  top: 50%;
  left: 65%;
  transform: translate(-50%, -50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 16px;
  mix-blend-mode: difference;
}

.side-nav a {
  color: white;
  mix-blend-mode: difference;
  text-decoration: none;
  font-size: 20px;
  letter-spacing: 0.03em;
  transition: opacity 0.3s;
}

.side-nav a:hover {
  opacity: 0.6;
}

/* On white pages, disable blend-mode and use black */
body.simple-photo-page .side-nav,
body.simple-photo-page .side-nav a {
  mix-blend-mode: normal;
  color: black;
}

/* ------------------------------------------------------ */
/* INTERNAL PAGE TEXT (Tolerâncias etc.) */
/* ------------------------------------------------------ */

.internal-content {
  position: relative;
  z-index: 10;
  padding: 40px;
  max-width: 800px;
  margin: 60px auto;
  color: white;
  mix-blend-mode: difference;
}

/* FIX: remove default <p> spacing + control line spacing */
body.internal-page .internal-content p {
  margin: 0 0 10px 0;
  line-height: 1.35;
}

/* Links on internal (video) pages */
body.internal-page .internal-content a {
  color: white;
  mix-blend-mode: difference;
  text-decoration: none;
}

body.internal-page .internal-content a:hover {
  opacity: 0.6;
}

/* ------------------------------------------------------ */
/* SIMPLE WHITE PAGES (textos / contato / ensaios) */
/* ------------------------------------------------------ */

.simple-content {
  max-width: 900px;
  margin: 60px auto;
  padding: 20px;
  text-align: left;
  font-size: 16px;
  color: black;
}

body.simple-photo-page a {
  color: black;
  text-decoration: none;
}

body.simple-photo-page a:hover {
  opacity: 0.7;
}

/* ------------------------------------------------------ */
/* TOLERÂNCIAS — poems styling */
/* ------------------------------------------------------ */

.poems-intro {
  margin-top: 40px;
  margin-bottom: 20px;
  font-size: 13px;
}

.poem-block {
  margin-top: 30px;
  margin-bottom: 30px;
  color: white;
  mix-blend-mode: difference;  /* adaptive contrast for poem block */
}

.poem-header {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;             /* wraps on small screens */
}

/* .poem-title no longer used for text, but can stay harmless */
.poem-title {
  margin: 0;
  font-size: 21px;
  font-weight: normal;
}

.poem-audio {
  min-width: 200px;
}

.poem-text {
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.6;
  color: white;
  mix-blend-mode: difference;  /* poems adapt to background too */
}

.poem-text pre {
  margin: 0;
  font-family: inherit;        /* same font as the site */
  font-size: 13px;
  line-height: 1.4;
  white-space: pre-wrap;       /* wraps if line is too long */
}

/* Bigger fonts on internal pages (Tolerâncias etc.) */
body.internal-page .poems-intro {
  font-size: 16px;     /* 13 -> 16 */
}

body.internal-page .poem-text {
  font-size: 16px;     /* 13 -> 16 */
}

body.internal-page .poem-text pre {
  font-size: 16px;     /* 13 -> 16 */
}

/* ------------------------------------------------------ */
/* TOLERÂNCIAS: force LEFT alignment + fix spacing */
/* ------------------------------------------------------ */

body.internal-page .internal-content.internal-left {
  max-width: 800px;
  margin: 60px 0 60px 40px;  /* LEFT, not centered */
  padding: 0;
}

/* remove default <p> margins + tighten line spacing */
body.internal-page .internal-content.internal-left p {
  margin: 0 0 10px 0;
  line-height: 1.35;
}

/* audio bars aligned with the same left edge */
body.internal-page .internal-content.internal-left .poem-audio {
  display: block;
  width: 100%;
  max-width: 800px;
  margin: 0;
}

/* ------------------------------------------------------ */
/* MOBILE */
/* ------------------------------------------------------ */

@media (max-width: 768px) {

  .side-nav {
    top: 70px;
    left: 30px;
    transform: none;
  }

  .side-nav a {
    font-size: 18px;
  }

  .internal-content {
    padding: 20px;
    margin: 40px auto;
  }

  .simple-content {
    margin: 30px auto;
    padding: 16px;
    font-size: 15px;
  }

  .poems-intro,
  .poem-text,
  .poem-text pre {
    font-size: 15px;
  }

  .bg-video,
  .bg-video-internal {
    object-fit: cover;
  }
}

/* ------------------------------------------------------ */
/* DESKTOP */
/* ------------------------------------------------------ */

@media (min-width: 769px) {

  .side-nav {
    top: 45%;
    left: 25%;
    transform: translate(-50%, -50%);
  }

  .side-nav a {
    font-size: 20px;
  }
}