
@font-face {
  font-family: 'RoundStyle';
  src: url('../fonts/RoundStyle-Book.ttf') format('truetype');
}

body,
html {
  height: 100%;  
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
}

.scroll-container {
  padding-top: 80px; /* Match navbar height */
}

.screen {
  height: 100vh;
  width: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  position: relative;
  margin-top: -80px;
  padding-top: 80px;
}





.bgimg-1,
.bgimg-2,
.bgimg-3,
.bgimg-4 {
  position: relative;
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.bgimg-2,
.bgimg-3,
.bgimg-4 {
  opacity: 100%;
}

.bgimg-1 {
  background-image: url("../images/bgtop.webp");
  min-height: 100%;
}

/* Final screen layout */
.screen-final {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 80px); /* Subtract navbar height */
  overflow: hidden; /* Prevent any scrolling */
  margin-bottom: 0; /* Prevent any bottom margin */
  scroll-snap-align: end; /* Snap to end instead of start */
}

.bgimg-5 {
  flex: 1;
  min-height: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  background-image: url("../images/eyes.webp");
  height: 100%;
}




.bgimg-2 {
  background-image: url("../images/img2.webp");
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bgimg-3 {
  background-image: url("../images/key.webp");
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bgimg-4 {
  background-image: url("../images/bed.webp");
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.caption {
  position: absolute;
  left: 0;
  bottom: 10%;
  width: 100%;
  text-align: center;
  font-family: "RoundStyle";
}

.caption span.border {
  background-color: var(--black);
  color: var(--white);
  padding: 18px;
  font-size: 25px;
  letter-spacing: 3px;
  opacity: 90%;
}

h3 {
  letter-spacing: 5px;
  text-transform: uppercase;
  font-size: 20px;
  color: var(--white);
}

.about-me {
  color: var(--white);
  background-color: var(--black);
  padding: 50px 80px;
  text-align: justify;
  border-radius: 15px;
  opacity: 90%;
  position: absolute;
  right: 100px;
  top: 200px;
  width: 700px;
  font-size: 18px;
}

.subscribe-info {
  color: var(--white);
  background-color: var(--black);
  padding: 50px 80px;
  text-align: justify;
  border-radius: 15px;
  opacity: 90%;
  position: absolute;
  right: 100px;
  top: 200px;
  width: 700px;
  font-size: 18px;
}


.section-content {
  font-size: 20px;
}

.surrender {
  font-family: "RoundStyle";
  color: var(--white);
  text-align: center;
  position: absolute;
  right: 200px;
  top: 50px;
  font-size: 50px;
  font-weight: bold;
}

.purple {
  color: var(--light-purple);
  text-shadow: 1px 0 0 #fff, 0 -1px 0 #fff, 0 1px 0 #fff, -1px 0 0 #fff;
}

/* Turn off parallax scrolling for tablets and phones */
@media only screen and (max-device-width: 1024px) {

  .bgimg-1,
  .bgimg-2,
  .bgimg-3,
  .bgimg-4,
  .bgimg-5 {
    background-attachment: fixed;
  }

  /* Hide duplicate content/typography sections on mobile */
  .mobile-hide {
    display: none !important;
  }

  /* Fallback for mobile browsers that do NOT support background-attachment: fixed (e.g., iOS Safari)
     This uses a pseudo-element to simulate a fixed background image. The content scrolls over the image. */
  .bgimg-1,
  .bgimg-2,
  .bgimg-3,
  .bgimg-4,
  .bgimg-5 {
    position: relative;
    overflow: hidden;
  }
  .bgimg-1::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: url("../images/bgtop.webp");
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    z-index: -1;
    pointer-events: none;
  }
  .bgimg-2::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: url("../images/img2.webp");
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    z-index: -1;
    pointer-events: none;
  }
  .bgimg-3::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: url("../images/key.webp");
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    z-index: -1;
    pointer-events: none;
  }
  .bgimg-4::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: url("../images/bed.webp");
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    z-index: -1;
    pointer-events: none;
  }
  .bgimg-5::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: url("../images/eyes.webp");
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    z-index: -1;
    pointer-events: none;
  }
}

.about-img {
  width: 200px;
}

.listen-img {
  width: 220px;
  max-width: 80vw;
}

.spoil-img {
  width: 200px;
}

.contact-img {
  width: 100px;
}

.section-header {
  font-family: "RoundStyle";
  font-size: 38px;
  color: var(--white);
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.section-text {
  color: var(--white);
  max-width: 1080px;
  margin: auto;
  font-size: 1.15rem;
  line-height: 1.5;
}

.fixate {
  font-family: "RoundStyle";
  color: var(--white);
  text-align: center;
  position: static;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  font-size: 42px;
  font-weight: bold;
}

.fixate-text {
  width: 100%;
  max-width: 900px;
  margin: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5em;
}

@media (min-width: 1700px) {
  .fixate-text {
    flex-direction: row;
    max-width: none;
    justify-content: center;
  }
}

@media (max-width: 600px) {
  #about .about-img {
    width: 160px;
  }
  #about .section-header {
    font-size: 1.6rem;
  }
  #about .section-text {
    font-size: 1rem;
  }

  /* Make surrender, fixate, and spoil text larger on mobile */
  .surrender {
    font-size: 2.2rem;
  }
  .fixate {
    font-size: 2.2rem;
  }
  .spoil-text {
    font-size: 2.2rem;
  }
}
@media (max-width: 400px) {
  #about .about-img {
    width: 110px;
  }
  #about .section-header {
    font-size: 1.1rem;
  }
  #about .section-text {
    font-size: 0.85rem;
  }

  .surrender {
    font-size: 1.5rem;
  }
  .fixate {
    font-size: 1.5rem;
  }
  .spoil-text {
    font-size: 1.5rem;
  }
}
@media (max-width: 340px) {
  #about .about-img {
    width: 80px;
  }
  #about .section-header {
    font-size: 0.9rem;
  }
  #about .section-text {
    font-size: 0.7rem;
  }
}

.spoil {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  padding: 2rem;
}

.spoil-text {
  font-family: "RoundStyle";
  color: var(--white);
  text-align: center;
  font-size: 50px;
  font-weight: bold;
  display: flex;
  flex-direction: column;
  gap: 0.5em;
}

.spoil-text span:not(.purple) {
  text-shadow: 1px 0 0 #000, 0 -1px 0 #000, 0 1px 0 #000, -1px 0 0 #000;
}

.spoil-text-left, .spoil-text-right {
  display: flex;
  flex-direction: column;
  gap: 0.5em;
}

@media (min-width: 750px) {
  .spoil {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 10%;
  }
  
  .spoil-text {
    width: auto;
  }
  
  .spoil-text-left {
    position: absolute;
    left: 100px;
    top: 50%;
    transform: translateY(-50%);
  }
  
  .spoil-text-right {
    position: absolute;
    right: 100px;
    top: 50%;
    transform: translateY(-50%);
  }
}

@media (min-width: 1600px) {
  .spoil-text-left {
    position: absolute;
    left: 200px;
    top: 50%;
    transform: translateY(-50%);
  }
  
  .spoil-text-right {
    position: absolute;
    right: 200px;
    top: 50%;
    transform: translateY(-50%);
  }
}

@media (max-width: 992px) {
  .spoil-text {
    font-size: 40px;
  }
}
@media (max-width: 768px) {
  .spoil-text {
    font-size: 32px;
  }
}

.contact {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  padding: 2rem;
}

.contact-text {
  font-family: "RoundStyle";
  color: var(--white);
  text-align: center;
  font-size: 50px;
  font-weight: bold;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.contact-text span:not(.purple) {
  text-shadow: 1px 0 0 #000, 0 -1px 0 #000, 0 1px 0 #000, -1px 0 0 #000;
}

@media (min-width: 1700px) {
  .contact-text {
    gap: 1em;
  }
}

@media (max-width: 992px) {
  .contact {
    font-size: 40px;
  }
}

@media (max-width: 768px) {
  .contact {
    font-size: 32px;
  }
}

.homepage-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  padding: 2rem;
}

@media (min-width: 990px) {
  .surrender {
    font-size: 2.8rem;
  }
}

@media (max-height: 820px) {
  .surrender {
    font-size: 2rem;
  }
}

/* Make surrender, fixate, and spoil text even larger for very small devices */
@media (max-width: 500px) {
  .surrender {
    font-size: 11vw;
  }
  .fixate {
    font-size: 11vw;
  }
  .spoil-text {
    font-size: 11vw;
  }
}

@media (min-width: 320px) and (max-width: 500px) {
  .surrender {
    font-size: 8vw !important;
  }
  .fixate {
    font-size: 8vw !important;
  }
  .spoil-text {
    font-size: 10vw !important;
  }
}

@media (max-width: 1350px) {
  /* keep the scroll-container's top offset in sync with the navbar height */
  .scroll-container {
    padding-top: clamp(64px, 6.0vw, 80px);
  }
  
  .screen {
    margin-top: calc(-1 * clamp(64px, 6.0vw, 80px));
    padding-top: clamp(64px, 6.0vw, 80px);
  }
}

/* Between 992px and 1350px reduce absolute right offsets used on some hero sections
   (change from 200px -> 100px for better fit on medium screens) */
@media (min-width: 992px) and (max-width: 1350px) {
  .surrender,
  .fixate {
    right: 100px;
  }
}

/* Listen section: smaller typography on small mobile screens */
@media (max-width: 600px) {
  .listen .section-header {
    font-size: 1.6rem;
  }
  .listen .section-text {
    font-size: 1rem;
  }
  .listen .listen-img {
    width: 180px;
  }
}

@media (max-width: 400px) {
  .listen .section-header {
    font-size: 1.3rem;
  }
  .listen .section-text {
    font-size: 0.9rem;
  }
  .listen .listen-img {
    width: 150px;
  }
}

@media (max-width: 340px) {
  .listen .section-header {
    font-size: 1.1rem;
  }
  .listen .section-text {
    font-size: 0.82rem;
  }
  .listen .listen-img {
    width: 130px;
  }
}

/* Dynamic hero styles (moved from index.html) */
.hero-dynamic {
    display: inline-block;
    white-space: nowrap;
    /* min-width keeps the surrounding box from resizing; increase if you add longer words */
    min-width: 32ch;
    max-width: 90vw;
    text-align: center;
}

#dynamic {
    display: block; /* put the dynamic word on its own line */
    opacity: 1;
    transform: translateY(0);
    transition: opacity .5s cubic-bezier(.2,.8,.2,1), transform .5s cubic-bezier(.2,.8,.2,1);
    will-change: opacity, transform;
}

#dynamic.out {
    opacity: 0;
    transform: translateY(-10px) scale(0.98);
}

#dynamic.in {
    opacity: 1;
    transform: translateY(0) scale(1);
}

@media (max-width: 480px) {
    /* On small screens allow wrapping and let the box size down */
    .hero-dynamic { min-width: auto; white-space: normal; }
}

/* Surrender text animation styles */
.surrender-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.line {
    opacity: 0;
    transform: translate3d(0, 20px, 0);
    transition: opacity 0.5s ease, transform 0.5s ease;
    display: block;
    margin: 5px 0;
    text-align: center;
    will-change: transform, opacity;
    backface-visibility: hidden;
}

.line:not(.purple) {
    text-shadow: 1px 0 0 #000, 0 -1px 0 #000, 0 1px 0 #000, -1px 0 0 #000;
}

.line.visible {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

/* Add delay for each line */
.line:nth-child(1).visible { transition-delay: 0s; }
.line:nth-child(2).visible { transition-delay: 0.2s; }
.line:nth-child(3).visible { transition-delay: 0.4s; }
.line:nth-child(4).visible { transition-delay: 1.0s; }
.line:nth-child(5).visible { transition-delay: 1.2s; }
.line:nth-child(6).visible { transition-delay: 1.4s; }
.line:nth-child(7).visible { transition-delay: 1.6s; }
.line:nth-child(8).visible { transition-delay: 2.0s; }
.line:nth-child(9).visible { transition-delay: 2.4s; }

/* Fixate text: show span-by-span on one line */
.fixate {
    display: flex;
    align-items: center;
    justify-content: center;
}

.fixate-text {
    display: inline-flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    gap: 0.8rem; /* spacing between spans (increased) */
    white-space: nowrap; /* keep on one line */
}

.fixate-text > span {
    opacity: 0;
    transform: translate3d(0, 20px, 0);
    transition: opacity 0.6s ease, transform 0.6s ease;
    display: inline-block;
    will-change: transform, opacity;
    backface-visibility: hidden;
}

.fixate-text > span:not(.purple) {
    text-shadow: 1px 0 0 #000, 0 -1px 0 #000, 0 1px 0 #000, -1px 0 0 #000;
}

.fixate-text > span.visible {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

/* Add staggered delays for fixate text - just like surrender text */
.fixate-text > span:nth-child(1).visible { transition-delay: 0s; }
.fixate-text > span:nth-child(2).visible { transition-delay: 0.6s; }
.fixate-text > span:nth-child(3).visible { transition-delay: 1.2s; }
.fixate-text > span:nth-child(4).visible { transition-delay: 1.8s; }

/* Clean up will-change after animation completes */
.fixate-text > span.visible {
    will-change: auto;
}



/* Contact text: similar per-word animation but separate class so it's independent of fixate */
.contact-text {
    display: inline-flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    white-space: nowrap;
}

.contact-text > span {
    opacity: 0;
    transform: translate3d(0, 20px, 0);
    transition: opacity 0.6s ease, transform 0.6s ease;
    display: inline-block;
    will-change: transform, opacity;
    backface-visibility: hidden;
}

.contact-text > span.visible {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

/* Add staggered delays for contact text - just like surrender text */
.contact-text > span:nth-child(1).visible { transition-delay: 0s; }
.contact-text > span:nth-child(2).visible { transition-delay: 0.6s; }
.contact-text > span:nth-child(3).visible { transition-delay: 1.2s; }
.contact-text > span:nth-child(4).visible { transition-delay: 1.8s; }

/* Clean up will-change after animation completes */
.contact-text > span.visible {
    will-change: auto;
}



/* Spoil text: two columns (left/right) but animate six words in a single sequence
   (top-left -> bottom-left -> top-right -> bottom-right order naturally follows DOM order).
   Each word is on its own line and fades in with a slight upward motion. */
.spoil-text span {
    display: block; /* ensure each word is on its own line */
    opacity: 0;
    transform: translate3d(0, 20px, 0);
    transition: opacity 0.6s ease, transform 0.6s ease;
    margin: 6px 0;
    will-change: transform, opacity;
    backface-visibility: hidden;
}

.spoil-text span.visible {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

/* Add staggered delays for spoil text - 6 separate animations, top to bottom, left to right */
.spoil-text-left span:nth-child(1).visible { transition-delay: 0s; }      /* "Pleasing" */
.spoil-text-left span:nth-child(2).visible { transition-delay: 0.4s; }    /* "your" */
.spoil-text-left span:nth-child(3).visible { transition-delay: 0.8s; }    /* "Goddess" */
.spoil-text-right span:nth-child(1).visible { transition-delay: 1.2s; }   /* "is" */
.spoil-text-right span:nth-child(2).visible { transition-delay: 1.6s; }   /* "pleasing" */
.spoil-text-right span:nth-child(3).visible { transition-delay: 2.0s; }   /* "yourself." */

/* Clean up will-change after animation completes */
.spoil-text span.visible {
    will-change: auto;
}



/* Responsive rules for small screens up to 700px
   - make the hero container 90% of the viewport width
   - allow wrapping so the font can flow onto multiple lines
   - use a fluid/clamped font-size so the text scales but remains readable
   - ensure the dynamic word inherits the font-size and will wrap
 */
@media (max-width: 700px) {
    .hero-dynamic {
        display: inline-block; /* keep inline centering behavior */
        width: 90%;
        max-width: 90vw;
        min-width: auto; /* remove the 32ch minimum so it can shrink */
        white-space: normal; /* allow wrapping */
        box-sizing: border-box;
        /* fluid font size: minimum 1.0rem, preferred scales with viewport, max 2.2rem */
        font-size: clamp(1.0rem, 4.8vw, 2.2rem);
        line-height: 1.05;
        text-align: center; /* ensure text remains centered when wrapping */
        word-break: break-word;
    }

    /* dynamic word should inherit font-size and remain block-level for the line-break */
    #dynamic {
        font-size: inherit;
        display: block;
        white-space: normal;
        word-break: break-word;
    }
}

/* On small screens (<= 991px) switch absolute positioned text blocks to flow and center
   - makes .surrender, .fixate and spoil columns stack and center nicely on phones/tablets
   - also allow per-word containers to wrap and use normal white-space
 */
@media (max-width: 991px) {
    .surrender,
    .fixate,
    .spoil,
    .spoil-text,
    .spoil-text-left,
    .spoil-text-right {
        position: static !important;
        right: auto !important;
        left: auto !important;
        top: auto !important;
        transform: none !important;
        width: 100%;
        text-align: center;
        padding: 1rem;
    }

    /* slightly reduce font-size so long lines wrap comfortably */
    .surrender,
    .fixate,
    .spoil-text {
        font-size: clamp(1.5rem, 5.5vw, 2.5rem);
    }

    /* allow per-word/per-span containers to wrap and center their content */
    .fixate-text,
    .contact-text,
    .spoil-text {
        flex-wrap: wrap !important;
        white-space: normal !important;
        justify-content: center !important;
        gap: 0.5rem;
    }

    .spoil-text-left,
    .spoil-text-right {
        display: block;
        width: 100%;
        margin: 0.5rem 0;
    }
}
