/* ---------- GLOBAL STYLES ---------- */
body {
  scroll-behavior: smooth;
  background: linear-gradient(to bottom,
      #f8f9fa 0%,
      #f8f9fa 50%,
      #000000 80%);
  cursor: url("imgs/cursor.png") 16 16, auto;
}

section {
  min-height: 100vh;
  padding: 4rem 2rem;
  scroll-margin-top: 100px;
}


/* ---------- LANGUAGE TOGGLE BUTTONS ---------- */
.language-toggle {
  z-index: 9999;
  /* ensures it's always above clouds and parallax */
}

.language-toggle .btn {
  background-color: rgba(57, 98, 156);
  color: #dbdcd7;
  border: none;
  font-weight: 600;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

.language-toggle .btn:hover {
  background-color: #0b5ed7;
  transform: scale(1.05);
}


/* ---------- INTRO SECTION WITH TOP-CENTERED TITLE & SUBTITLE ---------- */
#intro {
  position: relative;
  overflow: hidden;
  background: none;
}

@import url('https://fonts.googleapis.com/css2?family=Bevan:ital@0;1&family=Luxurious+Roman&family=Merriweather:ital,opsz,wght@0,18..144,300..900;1,18..144,300..900&display=swap');

#intro h1,
#intro p.lead {
  position: absolute;
  left: 50%;
  top: 30%;
  transform: translateX(-50%);
  text-align: center;
  margin: 0 0 0 0;
  line-height: 7rem;
  z-index: 10;

  font-family: 'Luxurious Roman', serif;
  font-weight: 700;
  letter-spacing: 2px;

  /* Gradient text for moving glare */
  background: linear-gradient(120deg, #FFD700, #FFA500, #FF4500, #FFD700);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;

  text-shadow: 
    0 0 5px rgba(255, 215, 0, 0.6),
    0 0 10px rgba(255, 140, 0, 0.5),
    0 0 20px rgba(255, 69, 0, 0.4);

  animation: gradientMove 3s linear infinite, fadeInUp 2s ease-out forwards;
}

#intro h2 {
  position: absolute;
  left: 50%;
  top: 46%;
  transform: translateX(-50%);
  text-align: center;
  margin: 0;
  z-index: 10;

  font-family: 'Luxurious Roman', serif;
  font-weight: 700;
  letter-spacing: 2px;

  /* Gradient text for moving glare */
  background: linear-gradient(120deg, #FFD700, #FFA500, #FF4500, #FFD700);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;

  text-shadow: 
    0 0 5px rgba(255, 215, 0, 0.6),
    0 0 10px rgba(255, 140, 0, 0.5),
    0 0 20px rgba(255, 69, 0, 0.4);

  animation: gradientMove 3s linear infinite, fadeInUp 2s ease-out forwards;
}

@keyframes fadeInUp {
  0% { opacity: 0; transform: translateX(-50%) translateY(50px); }
  100% { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes gradientMove {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}



#intro h1 {
  top: 20px;
  /* distance from top of viewport */
  font-size: 4rem;
  font-weight: 800;
}

#intro p.lead {
  top: 100px;
  /* below title */
  font-size: 1.8rem;
  font-weight: 500;
  text-shadow: 1px 1px 6px rgba(0, 0, 0, 0.4);
}

/* Keep horizontal timeline below */
.timeline-horizontal {
  position: relative;
  z-index: 10;
  /* above parallax */
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: auto;
  padding: 2rem 1rem;
  background-color: rgba(255, 255, 255, 0.85);
  border-radius: 50px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  margin-top: 220px;
  /* leave space below title & subtitle */
}


/* ---------- HORIZONTAL TIMELINE ---------- */
.timeline-horizontal {
  position: relative;
  z-index: 10;                  /* above parallax */
  display: flex;
  justify-content: flex-start;   /* nodes start from left */
  align-items: flex-start;       /* buttons pinned at top */
  overflow-x: auto;
  padding: 2rem 1rem;
  background-color: rgba(255, 255, 255, 0.85);
  border-radius: 50px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  margin-top: 2rem;
}

/* timeline node image (if needed) */
.timeline-img {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 50%;
}

/* ---------- TIMELINE NODE ---------- */
.timeline-node {
  display: flex;
  flex-direction: column;      /* button above text */
  align-items: center;         /* center horizontally */
  margin: 0 1rem;
  text-align: center;
  min-width: 80px;             /* ensures consistent spacing */
}

/* timeline button stays pinned */
.timeline-node button {
  width: 55px;
  height: 55px;
  border-radius: 50%;
  border: none;
  background-color: rgba(57, 98, 156, 0);
  color: #fff;
  font-weight: bold;
  transition: 0.3s;
  flex-shrink: 0;              /* never shrink */
  margin-bottom: 0.5rem;       /* space between button and text */
  display: block;
}

.timeline-node img {
  width: 55px;
  height: 55px;
  margin-left: -0.3rem;
  border-radius: 50%;
  margin-bottom: 0.3rem;
}

/* timeline text below button wraps without moving button */
.timeline-node p {
  margin: 0;
  margin-top: 0.25rem;
  font-weight: 600;
  color: #394E9C;
  text-align: center;
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: normal;
  max-width: 85px; /* prevents excessive width */
  line-height: 1.2;
}


.timeline-node button:disabled {
  width: 55px;
  height: 55px;
  border-radius: 50%;
  border: none;
  background-color: gray;
  color: #fff;
  font-weight: bold;
  transition: 0.3s;
  cursor: not-allowed;
}


.timeline-node button:hover {
  background-color: #0b5dd700;
  transform: scale(1.1);
}

/* ---------- PARALLAX BACKGROUND ---------- */
.parallax-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 120%;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  will-change: transform;
  pointer-events: none;
}

.parallax-bg.sky {
  background-image: url("imgs/cielo.png");
  background-attachment: fixed;
  z-index: 0;
}

.parallax-bg.cloud1 {
  background-image: url("imgs/clouds3.png");
  background-size: contain;
  z-index: 1;
}

.parallax-bg.cloud2 {
  background-image: url("imgs/clouds1fix.png");
  background-size: contain;
  z-index: 2;
  top: 57vh;
}

.parallax-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
  /* all parallax behind content */
}

/* ---------- VERTICAL TIMELINE ---------- */
.timeline-wrapper {
  position: relative;
  margin: 0 auto;
  width: 100%;
  max-width: none;
  /* allow wrapper to span the full viewport so each section can use 50vw */
  padding: 4rem 0;
  box-sizing: border-box;
  /* stacking context so we can layer a top gradient under cards but below the vertical line */
  z-index: 0;
}

.timeline-wrapper::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  background-color: rgba(57, 98, 156);
  /* keep the central vertical line above the gradient and cards so it appears to come out of nothing */
  z-index: 0;
}

/* top gradient that fades to transparent so the vertical line appears to emerge from it */
.timeline-wrapper::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 220px; /* adjust to taste */
  background: linear-gradient(to bottom, #f8f9fa 20%, rgba(248,249,250,0.95) 20%, rgba(248,249,250,0) 100%);
  pointer-events: none;
  z-index: 1; /* below cards but above page background */
}

.timeline-section {
  position: relative;
  width: 50vw;
  /* use viewport fraction so it truly occupies half the screen */
  padding: 2rem;
  /* make sections behave as flexible columns so cards can align toward center line */
  display: flex;
  align-items: center;
  min-height: 30vh;
  /* slightly larger to give the card vertical room */
  box-sizing: border-box;
}

.timeline-section .timeline-content {
  background-color: #d8d8d8;
  border-radius: 10px;
  padding: 2rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  position: relative;
}

.timeline-section::before {
  /* hide legacy pseudo-element dots — we render real .timeline-dot elements
                                                                                                                                                                                                                                                                                                                 from JS to ensure precise centering and avoid duplicates */
  display: none;
}

.timeline-section.left {
  /* place the section in the left column and align its content to the right
                                                                                                                                                                                                                                                                                                                          so the card sits next to the central timeline */
  margin-left: 0;
  text-align: right;
}

/* keep the legacy pseudo hidden */
.timeline-section.left::before {
  display: none;
}

/* ---------- PHASE CARD (image + text + links with preview) ---------- */
.phase-card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 10px;
  padding: 1rem;
  width: 95%;
  /* occupy nearly the full half-screen column */
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  /* ensure cards sit above the top gradient */
  position: relative;
  z-index: 2;
}

.timeline-section.left {
  justify-content: flex-end;
}

.timeline-section.right {
  justify-content: flex-start;
}

/* push right-side sections into the right half */
.timeline-section.right {
  margin-left: 50%;
}

.phase-top {
  display: flex;
  align-items: stretch;
  gap: 1rem;
  min-height: 240px;
  /* larger so images and titles fill the half better */
}

.phase-img {
  width: 46%;
  /* left portion of the top area */
  overflow: hidden;
  min-height: 200px;
}

.phase-img img {
  width: 46%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Placeholder variant: keeps the same space as an image but shows an empty area
 so images can be added later without changing layout. */
.phase-img.empty {
  width: 0%;
  min-height: 200px;
  box-sizing: border-box;
}

.phase-text {
  text-align: justify;
  width: 54%;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: rgba(255, 255, 255, 0.98);
  border-radius: 6px;
}

.phase-text h2 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.phase-bottom {
  margin-top: 1rem;
  background: rgba(255, 255, 255, 0.98);
  padding: 1rem;
  border-radius: 6px;
}

.phase-bottom ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: flex-start;
}

.phase-bottom ul li {
  margin: 0;
}

.phase-bottom ul li a {
  display: inline-block;
  padding: 0.5rem 0.8rem;
  border-radius: 6px;
  background: rgba(57, 98, 156);
  color: #fff;
  text-decoration: none;
  transition: transform 0.15s ease, background 0.15s ease;
}

.phase-bottom ul li a:hover {
  transform: translateY(-3px);
  background: #0b5ed7;
}

/* ---------- PREVIEW CARD ---------- */
.preview-card {
  position: absolute;
  display: none;
  /* allow the card to size to its content but cap the width */
  width: auto;
  max-width: 260px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  z-index: 99999;
  opacity: 0;
  transition: opacity 0.12s ease;
}

.preview-card .preview-img {
  /* let the image determine the height so the whole image is visible */
  height: auto;
  overflow: visible;
}

.preview-card .preview-img img {
  /* limit width, keep aspect ratio and show full image */
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
}

/* Tag that shows status (released / wip) on the preview image */
.preview-card .preview-img {
  position: relative;
  /* ancestor for absolute tag */
}

/* Hide the tag visually while keeping it in the DOM for JS to update.
                                                                             The tag's content and classes remain available to scripts, but it's not shown. */
.preview-card .preview-img .tag {
  display: none !important;
  visibility: hidden !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
}

/* Visual hint for disabled (wip) links in lists */
.phase-bottom ul li a.disabled {
  cursor: not-allowed;
  opacity: 0.78;
  background-color: gray;
  /* make WIP links visually gray */
  color: #fff;
  /* ensure text remains readable */
}

.phase-bottom ul li a.disabled:hover {
  background-color: gray;
  transform: none;
}

.preview-card .preview-text {
  padding: 0.75rem;
  font-size: 0.95rem;
  color: #111;
}

/* Make preview card background match the link state: released -> blue, wip -> gray */
.preview-card.released {
  background: rgba(57, 98, 156);
  /* same base blue as links */
  color: #fff;
}

.preview-card.released .preview-text {
  color: #fff;
}

.preview-card.released .preview-img .tag {
  /* use a stronger blue for the tag so it remains distinct */
  background: #0b5ed7;
}

.preview-card.wip {
  background: gray;
  color: #fff;
}

.preview-card.wip .preview-text {
  color: #fff;
}

.preview-card.wip .preview-img .tag {
  background: #6c757d;
  /* bootstrap secondary-ish */
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 768px) {

  .timeline-section,
  .timeline-section.left,
  .timeline-section.right {
    width: 100%;
    left: 0 !important;
    text-align: left;
  }


  .timeline-section::before {
    /* on small screens the section is full-width; center the dot at 50% */
    left: 50%;
    transform: translate(-50%, -50%);
  }

  .timeline-wrapper::before {
    left: 50%;
  }
}

/* Real, script-driven dots (positioned inside .timeline-wrapper) */
.timeline-dot {
  position: absolute;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: rgba(57, 98, 156);
  z-index: 6;
  /* above the vertical line and cards */
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.05);
}

@media (max-width: 768px) {
  .timeline-dot {
    left: 50%;
    transform: translate(-50%, -50%);
  }
}