/* (SIDE A) PRE-READNOW */

/* RESET & BASE STYLES */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body,
html {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  width: 100%;
  height: 100%;
  zoom: reset;
  -webkit-text-size-adjust: none;
  -moz-text-size-adjust: none;
  -ms-text-size-adjust: none;
  text-size-adjust: none;
}

/* MAIN CONTAINER & BACKGROUND */
.pre-readnow {
  position: relative;
  width: 100vw;
  height: 100vh;
  background: linear-gradient(
    180deg,
    #e3ed6a 20%,
    rgba(255, 245, 219, 0.9) 50%,
    #F0EFAA 100%
  );
  background-size: 100% 100%;
  background-attachment: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  transform-origin: center center;
  zoom: 1;
  overflow: hidden;
}

/* MAIN CONTENT CONTAINER */
.content-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  width: 100%;
  height: 100%;
  max-width: none;
}

/* MAIN TEXT CONTENT */
.main-text {
  position: relative;
  width: min(1400px, 98vw);
  height: auto;
  font-family: "Sora", sans-serif;
  font-style: normal;
  font-weight: 800;
  font-size: clamp(2rem, 8vw, 7.2rem);
  text-shadow: 0px 7px 7px rgba(0, 0, 0, 0.25);
  line-height: clamp(2.2rem, 8.5vw, 8.5rem);
  text-align: center;
  color: #110349;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  white-space: nowrap;
  margin: 0 auto;
}

.text-line {
  display: block;
  width: 100%;
  white-space: nowrap;
  text-align: center;
}

.text-line:first-child {
  margin-bottom: clamp(0px, 1vw, 10px);
}

.text-line:last-child {
  margin-top: clamp(0px, 1vw, 10px);
}

/* RESPONSIVE BREAKPOINTS */

/* Mobile Phones (up to 480px) */
@media (max-width: 480px) {
  .pre-readnow {
    padding: 10px;
    background-size: 100% 100%;
    background-position: center;
  }

  .content-container {
    padding: 20px 5px;
  }

  .main-text {
    width: 98vw;
    font-size: clamp(2rem, 8vw, 5rem);
    line-height: clamp(2.6rem, 10vw, 6rem);
    padding: 10px;
    white-space: normal;
  }

  .text-line {
    white-space: normal;
  }
}

/* Tablets (481px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
  .pre-readnow {
    background-size: 100% 100%;
    background-position: center;
  }

  .content-container {
    padding: 30px 15px;
  }

  .main-text {
    width: 95vw;
    font-size: clamp(2rem, 6vw, 3.5rem);
    line-height: clamp(2.2rem, 7vw, 4rem);
    padding: 15px;
    white-space: normal;
  }

  .text-line {
    white-space: normal;
  }
}

/* Small Laptops (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
  .content-container {
    padding: 40px 30px;
  }

  .main-text {
    width: 80vw;
    font-size: clamp(3rem, 6vw, 4.5rem);
    line-height: clamp(3.6rem, 7vw, 5.4rem);
    padding: 25px;
  }
}

/* Desktop (1025px - 1440px) */
@media (min-width: 1025px) and (max-width: 1440px) {
  .content-container {
    padding: 50px 40px;
  }

  .main-text {
    width: 75vw;
    max-width: 900px;
    font-size: clamp(4rem, 5vw, 5.5rem);
    line-height: clamp(4.8rem, 6vw, 6.6rem);
    padding: 30px;
  }
}

/* Large Desktop (1441px - 1919px) */
@media (min-width: 1441px) and (max-width: 1919px) {
  .content-container {
    padding: 60px 50px;
  }

  .main-text {
    width: 1000px;
    font-size: 6rem;
    line-height: 7.2rem;
    padding: 35px;
  }
}

/* Ultra Wide (1920px - 2559px) */
@media (min-width: 1920px) and (max-width: 2559px) {
  .content-container {
    padding: 80px 60px;
  }

  .main-text {
    width: 1178px;
    font-size: 7.2rem;
    line-height: 9rem;
    padding: 40px;
  }
}

/* Extra Ultra Wide (2560px+) */
@media (min-width: 2560px) {
  .pre-readnow {
    transform-origin: center center;
  }

  .content-container {
    padding: clamp(80px, 8vh, 120px) clamp(60px, 4vw, 100px);
    width: auto;
    height: auto;
    max-width: 90vw;
    display: block;
  }

  .main-text {
    width: clamp(1400px, 50vw, 1800px);
    max-width: none;
    font-size: clamp(7.2rem, 6vw, 10rem);
    line-height: clamp(9rem, 7.5vw, 12rem);
    padding: clamp(40px, 4vh, 60px);
    margin: 0 auto;
    position: relative;
    transform: none;
    display: block;
    text-align: center;
  }

  .text-line {
    text-align: center;
    display: block;
    width: 100%;
  }
}

/* LANDSCAPE ORIENTATION */
@media (orientation: landscape) and (max-height: 600px) {
  .pre-readnow {
    background-size: 100% 100%;
    background-position: center;
  }

  .content-container {
    padding: 20px 30px;
  }

  .main-text {
    font-size: clamp(2rem, 6vw, 4rem);
    line-height: clamp(2.4rem, 7vw, 4.8rem);
    padding: 15px;
  }
}

@media (orientation: landscape) and (max-height: 600px) and (max-width: 768px) {
  .content-container {
    padding: 15px 20px;
  }

  .main-text {
    font-size: clamp(1.5rem, 5vw, 2.5rem);
    line-height: clamp(1.8rem, 6vw, 3rem);
    padding: 10px;
  }
}

@media (orientation: landscape) and (max-height: 600px) and (min-width: 769px) {
  .content-container {
    padding: 25px 40px;
  }

  .main-text {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    line-height: clamp(3rem, 6vw, 4.2rem);
    padding: 20px;
  }
}

/* ACCESSIBILITY & PERFORMANCE */

@media (prefers-contrast: high) {
  .main-text {
    color: #000000;
  }
}

@media (prefers-reduced-motion: reduce) {
  .main-text {
    transition: none;
  }
}

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .main-text {
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
}

@media print {
  .main-text {
    color: #000000 !important;
  }
}

/* ENTRY ANIMATIONS */
.content-container {
  opacity: 0;
  transform: translateY(30px);
  animation: contentFadeIn 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.3s
    forwards;
}

.main-text {
  opacity: 0;
  transform: translateY(20px);
  animation: textFadeIn 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.6s forwards;
}

/* Entry animation keyframes */
@keyframes contentFadeIn {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes textFadeIn {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ACCESSIBILITY & REDUCED MOTION */
@media (prefers-reduced-motion: reduce) {
  .content-container,
  .main-text {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* TOUCH DEVICE */
@media (hover: none) and (pointer: coarse) {
  .main-text {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }
}

/* HIGH DPI DISPLAY */
@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
  only screen and (min-device-pixel-ratio: 1.5),
  only screen and (min-resolution: 144dpi),
  only screen and (min-resolution: 1.5dppx) {
  .main-text {
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
}

/* VERY SMALL SCREENS (320px and below) */
@media (max-width: 320px) {
  .main-text {
    font-size: clamp(1.2rem, 7vw, 1.8rem);
    line-height: clamp(1.4rem, 8vw, 2.2rem);
    padding: 10px;
  }
}

/* EXTRA TALL SCREENS */
@media (min-height: 1080px) and (orientation: portrait) {
  .content-container {
    padding: clamp(60px, 8vh, 100px) clamp(30px, 4vw, 50px);
  }
}

/* EXTRA WIDE SCREENS IN LANDSCAPE */
@media (min-width: 3840px) {
  .content-container {
    width: auto;
    height: auto;
    max-width: 85vw;
  }

  .main-text {
    width: clamp(1400px, 45vw, 2000px);
    font-size: clamp(8rem, 5vw, 14rem);
    line-height: clamp(10rem, 6.5vw, 17rem);
    margin: 0 auto;
    text-align: center;
  }
}
