@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700;900&family=Permanent+Marker&display=swap');

/* === GENERAL === */
body {
  margin: 0;
  background: url('background.jpg') no-repeat center center;
  background-size: cover;
  background-attachment: fixed;
  color: #fff;
  font-family: 'Roboto', sans-serif;
  text-align: center;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow: hidden;
}

/* --- iOS Safari fix for background scaling --- */
@supports (-webkit-touch-callout: none) {
  body {
    background-attachment: scroll !important;
    background-size: cover !important;
    background-position: center top !important;
  }
}

/* --- Android fix (make full image visible) --- */
@media screen and (max-width: 1024px) and (orientation: portrait) {
  body {
    background: url('backgroundmobile.png') no-repeat center bottom;
    background-size: contain;
    background-attachment: scroll;
    background-color: black;
  }
}

/* --- Tablet landscape --- */
@media (max-width: 1024px) and (orientation: landscape) {
  body {
    background: url('backgroundmobile.png') no-repeat center center;
    background-size: cover;
    background-attachment: scroll;
  }
}

/* --- Mobile phones --- */
@media (max-width: 768px) {
  body {
    overflow-y: auto;
    background: url('backgroundmobile.png') no-repeat center bottom;
    background-size: contain;
    background-attachment: scroll;
    background-color: black;
  }
}

/* === FADE ANIMATIONS === */
.fade-in {
  opacity: 0;
  animation: fadeIn 1.2s ease forwards;
}

.fade-in-up {
  opacity: 0;
  transform: translateY(40px);
  animation: fadeInUp 1.4s ease forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* === HEADER === */
header {
  padding: 20px 0 10px 0;
  background: rgba(0, 0, 0, 0.6);
}

.logo {
  font-family: 'Permanent Marker', cursive;
  font-size: 2.8rem;
  margin: 0;
}

/* === MAIN CONTENT === */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  background: rgba(0, 0, 0, 0.6);
}

.how-it-works {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto 20px auto;
}

.how-it-works h2 {
  font-size: 2rem;
  font-weight: 900;
  margin-bottom: 15px;
  text-align: left;
  padding-left: 50px;
}

.steps.horizontal {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 15px;
}

.step {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 15px;
  padding: 15px;
  text-align: center;
  width: 22%;
  transition: transform 0.3s ease, background 0.3s ease;
}

.step:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.15);
}

.step h3 {
  font-size: 1.5rem;
  margin-bottom: 8px;
  color: #00ffcc;
}

.step p {
  font-size: 0.95rem;
  line-height: 1.4;
}

/* === CHART === */
.chart-container {
  position: fixed;
  top: 62%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 70%;
  max-width: 1200px;
  height: 350px;
  border-radius: 15px;
  z-index: 10;
  opacity: 0;
  animation: chartFadeSlide 1.8s ease-out forwards;
}

.chart-container iframe {
  width: 100%;
  height: 100%;
  border-radius: 15px;
  border: none;
}

@keyframes chartFadeSlide {
  0% {
    opacity: 0;
    transform: translate(-50%, -40%);
  }
  60% {
    opacity: 1;
    transform: translate(-50%, -52%);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

/* === FOOTER === */
footer {
  padding: 10px;
  background: rgba(0, 0, 0, 0.8);
}

footer nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
}

footer a {
  color: white;
  font-weight: 700;
  text-decoration: none;
  transition: opacity 0.3s;
}

footer a:hover {
  opacity: 0.7;
}

/* === RESPONSIVE CHART === */
@media (max-width: 1024px) {
  .steps.horizontal {
    flex-wrap: wrap;
  }

  .step {
    width: 45%;
  }

  .chart-container {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    width: 95%;
    height: 300px;
    margin: 20px auto 0;
    opacity: 1;
    animation: none;
  }
}

@media (max-width: 768px) {
  .logo {
    font-size: 2.2rem;
  }

  .how-it-works h2 {
    font-size: 1.8rem;
    padding-left: 0;
    text-align: center;
  }

  .steps.horizontal {
    flex-direction: column;
    align-items: center;
  }

  .step {
    width: 80%;
  }

  .chart-container {
    height: 230px;
    position: relative;
    margin: 30px auto 0;
  }
}
