@tailwind base;
@tailwind components;
@tailwind utilities;

        html, body {
            padding: 0;
            margin: 0;
            height: 100vh;
            justify-content: center;
            align-items: center;
            background: white;
            scroll-behavior: smooth;
        }

        .hero-gradient{
            background: radial-gradient(circle, rgba(255, 232, 228, 1) 0%, rgba(255, 232, 228, 0.1) 50%);
        }

        .carousel-container {
            position: relative;
            width: 320px;
            height: 500px;
            margin: 0 auto;
        }

        .frame-overlay {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: url("../images/hero/mobile frame.png") no-repeat center center;
            background-size: contain;
            z-index: 10;
            pointer-events: none;
        }

        .left-btn-overlay {
            position: absolute;
            top: 50%;
            left: -5%;
            width: 40px;
            height: 40px;
            background: url("../images/icons/left-btn.png") no-repeat center center;
            background-size: contain;
            z-index: 10;
        }

        .right-btn-overlay {
            position: absolute;
            top: 50%;
            right: -5%;
            width: 40px;
            height: 40px;
            background: url("../images/icons/right-btn.png") no-repeat center center;
            background-size: contain;
            z-index: 10;
        }

        .carousel {
            display: flex;
            justify-content: center;
            align-items: center;
            width: 100%;
            height: 100%;
        }

        .carousel__list {
            display: flex;
            list-style: none;
            position: relative;
            width: 100%;
            height: 100%;
            perspective: 300px;
        }

        .carousel__item {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 100%;
            height: 100%;
            border-radius: 12px;
            position: absolute;
            transition: all 0.7s ease-in-out;
            background-size: cover;
            background-position: center;
        }

        .carousel__item:nth-child(1) { background: url("../images/hero/get_started.png") no-repeat center; }
        .carousel__item:nth-child(2) { background: url("../images/hero/explore.png") no-repeat center; }
        .carousel__item:nth-child(3) { background: url("../images/hero/signin.png") no-repeat center; }
        .carousel__item:nth-child(4) { background: url("../images/hero/signup.png") no-repeat center; }
        .carousel__item:nth-child(5) { background: url("../images/hero/profile_overview.png") no-repeat center; }

        .carousel__item[data-pos="0"] {
            z-index: 5;
            transform: scale(1);
        }

        .carousel__item[data-pos="-1"], .carousel__item[data-pos="1"] {
            opacity: 0.7;
            filter: blur(1px) grayscale(10%);
        }

        .carousel__item[data-pos="-1"] {
            transform: translateX(-75%) scale(0.9);
            z-index: 4;
        }

        .carousel__item[data-pos="1"] {
            transform: translateX(75%) scale(0.9);
            z-index: 4;
        }

        .carousel__item[data-pos="-2"], .carousel__item[data-pos="2"] {
            opacity: 0.4;
            filter: blur(3px) grayscale(20%);
        }

        .carousel__item[data-pos="-2"] {
            transform: translateX(-140%) scale(0.8);
            z-index: 3;
        }

        .carousel__item[data-pos="2"] {
            transform: translateX(140%) scale(0.8);
            z-index: 3;
        }


        .animate-on-scroll {
            opacity: 0;
            transform: translateY(20px);
            transition: opacity 0.6s ease-out, transform 0.6s ease-out;
        }

        .animate-on-scroll.animated {
            opacity: 1;
            transform: translateY(0);
        }

        .stagger-item {
            opacity: 0;
            transform: translateY(20px);
            transition: opacity 0.6s ease-out, transform 0.6s ease-out;
        }

        .stagger-container.animated .stagger-item:nth-child(1) { transition-delay: 0s; }
        .stagger-container.animated .stagger-item:nth-child(2) { transition-delay: 0.1s; }
        .stagger-container.animated .stagger-item:nth-child(3) { transition-delay: 0.2s; }
        .stagger-container.animated .stagger-item:nth-child(4) { transition-delay: 0.3s; }
        .stagger-container.animated .stagger-item:nth-child(5) { transition-delay: 0.4s; }
        .stagger-container.animated .stagger-item:nth-child(6) { transition-delay: 0.5s; }

        .stagger-container.animated .stagger-item {
            opacity: 1;
            transform: translateY(0);
        }











        #cards {
	padding-bottom: calc(var(--numcards) * var(--card-top-offset)); /* Make place at bottom, as items will slide to that position*/
	margin-bottom: var(--card-margin); /* Don't include the --card-margin in padding, as that will affect the scroll-timeline*/
}

#card_1 {
	--index: 1;
}

#card_2 {
	--index: 2;
}

#card_3 {
	--index: 3;
}

#card_4 {
	--index: 4;
}

#card_5 {
	--index: 5;
}

#card_6 {
	--index: 6;
}

.card {
	position: sticky;
	top: 0;
	padding-top: calc(var(--index) * var(--card-top-offset));
}

@supports (animation-timeline: works) {

	@scroll-timeline cards-element-scrolls-in-body {
		source: selector(body);
		scroll-offsets:
			/* Start when the start edge touches the top of the scrollport */
			selector(#cards) start 1,
			/* End when the start edge touches the start of the scrollport */
			selector(#cards) start 0
		;
		start: selector(#cards) start 1; /* Start when the start edge touches the top of the scrollport */
		end: selector(#cards) start 0; /* End when the start edge touches the start of the scrollport */
		time-range: 4s;
	}

	.card {
		--index0: calc(var(--index) - 1); /* 0-based index */
		--reverse-index: calc(var(--numcards) - var(--index0)); /* reverse index */
		--reverse-index0: calc(var(--reverse-index) - 1); /* 0-based reverse index */
	}

	.card__content {
		transform-origin: 50% 0%;
		will-change: transform;

		--duration: calc(var(--reverse-index0) * 1s);
		--delay: calc(var(--index0) * 1s);

		animation: var(--duration) linear scale var(--delay) forwards;
		animation-timeline: cards-element-scrolls-in-body;
	}

	@keyframes scale {
		to {
			transform:
				scale(calc(
					1.1
					-
					calc(0.1 * var(--reverse-index))
				));
		}
	}
}

/** DEBUG **/

#debug {
  position: fixed;
  top: 1em;
  left: 1em;
}
#debug::after {
  content: " Show Debug";
  margin-left: 1.5em;
  color: white;
  white-space: nowrap;
}

#debug:checked ~ main {
  --outline-width: 1px;
}


/** PAGE STYLING **/

* { /* Poor Man's Reset */
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

:root {
  --card-height: 80vh; /* Changed from 20vw to 80vh for better initial visibility */
  --card-height-mobile: 80vh; /* Changed from 20vw to 80vh for better initial visibility */
  --card-margin: 2vh; /* Adjusted margin */
  --card-top-offset: 1em;
  --numcards: 6;
  --outline-width: 0px;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  overflow-x: hidden;
}

header,
main {
  margin: 0 auto;
  width: 100%;
}

header {
  display: grid;
  place-items: center;
}

#cards {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: repeat(var(--numcards), var(--card-height));
  gap: var(--card-margin);
  position: relative;
}

.card {
  position: sticky;
  top: 0;
  margin-top: var(--card-top-offset);
  height: var(--card-height);
}

@media only screen and (max-width: 600px) {

.card{
    height: var(--card-height-mobile);
}

#cards{
    grid-template-rows: repeat(var(--numcards), var(--card-height-mobile));
}

}


.card__content {
  /*box-shadow: 0 0.2em 1em rgba(0, 0, 0, 0.1), 0 1em 2em rgba(0, 0, 0, 0.1);*/
  background: rgb(255, 255, 255);
  color: rgb(10, 5, 7);
  border-radius: 1em;
  overflow: hidden;
  height: 100%;
  display: grid;
  grid-template-areas: "img text";
  grid-template-columns: 1fr 1fr;
  align-items: center;
}

.card__content > div {
  grid-area: text;
  width: 80%;
  place-self: center;
  text-align: left;
  display: grid;
  gap: 1em;
  place-items: start;
}

.card__content > figure {
  grid-area: img;
  overflow: hidden;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card__content > figure > img {
  width: 100%;
  height: auto;
  max-height: 80%;
  object-fit: contain;
}



.btn {
	background: rgb(188 87 36);
	color: rgb(255 255 255);
	text-decoration: none;
	display: inline-block;
	padding: 0.5em;
	border-radius: 0.25em;
}

aside {
	width: 50vw;
	margin: 0 auto;
	text-align: left;
}

aside p {
	margin-bottom: 1em;
}




.heading-transition {
    display: inline-block;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.heading-transition.fade-out {
    opacity: 0;
    transform: translateY(-10px);
}

.heading-transition.fade-in {
    opacity: 1;
    transform: translateY(0);
}

.mission-transition {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.mission-transition.fade-out {
    opacity: 0;
    transform: translateY(-10px);
}

.mission-transition.fade-in {
    opacity: 1;
    transform: translateY(0);
}

.modal-transition {
      transition: opacity 0.3s ease, transform 0.3s ease;
    }

    .modal-hidden {
      opacity: 0;
      pointer-events: none;
      transform: scale(0.95);
    }

    .modal-visible {
      opacity: 1;
      transform: scale(1);
    }

        .carousel-item {
            transition: transform 0.5s ease;
        }
        .indicator {
            transition: width 0.5s ease;
        }
        @supports (-moz-appearance: none) {
        .lottie-align{
        display: inline-flex;
        }
        }

.safari-inline-flex {
      display: -webkit-inline-flex;
      justify-content: center;
    }