:root {
--gradient-start:#a87ffb; /* hsl(249, 99%, 64%) */
--gradient-end:#5e1da8; /* hsl(278, 94%, 30%) */
--error-red:#ff5252; /* hsl(0, 100%, 66%) */
--white:#ffffff; /* hsl(0, 0%, 100%) */
--light-gray-violet: #eae8eb; /* hsl(270, 3%, 87%) */
--dark-gray-violet:#8c8694; /* hsl(279, 6%, 55%) */
--very-dark-violet:#21092f; /* hsl(278, 68%, 11%) */

/* fuente */
--fuente-principal:"Space Grotesk", sans-serif;
}

/* globales */
html {
    font-size: 62.5%;
    box-sizing: border-box;
}

*, *:before, *:after {
    box-sizing: inherit;
}

body{
    font-family: var(--fuente-principal);
}

h1,h2,h3{
    margin: 0;
}

h1{
    font-size: 3rem;
}

h2{
    font-size: 2rem;
}

h3{
    font-size: 1rem;
}

button{
    border: none;
}

img{
    max-width: 100%;
    display: block;
}

.container{
    width: min(90%, 1440px);
    margin: 0 auto;
}


.boton{
    width: 100%;
    background-color: var(--very-dark-violet);
    color: var(--white);
    padding: 1rem;
    font-size: 1.5rem;
    border-radius: .5rem;
    margin-top: 4rem;
}


.boton:hover{
    cursor: pointer;
}

/* utilidades */
.opacity-50{
  opacity: 0.5;
}

.m-0{
  margin: 0;
}


/* card-display */

.card--display{
    background-image: url(../images/bg-main-desktop.png);
    background-repeat: no-repeat;
    background-size: cover;
    width: 100%;
    max-width: 50rem;
    background-position: top center;
    display: flex;
    align-items: center;
    justify-content: center;
   
}
.card--display {
    position: relative;
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    justify-content: center;
    gap: 2rem;
  }
  
  .card--front,
  .card--back {
    position: relative;
    width: 100%;
    max-width: 30rem;
  }
  
  .card--img {
    width: 100%;
    display: block;
    border-radius: 0.75rem;
  }
  
  /* Posición del texto encima de la imagen */
  .card--front__textos {
    position: absolute;
    top: 0;
    left: 0;
    padding: 2rem;
    width: 100%;
    height: 100%;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    font-family: 'Space Grotesk', sans-serif;
  }
  .card--font__logo{
    position: absolute;
    top: 0;
    left: 0;
    padding: 2rem;
  }

  .card--front{
    margin-top: -8rem;
    margin-right: 7rem;
    z-index: 1;
  }

  .card--back{
    margin-left: 7rem;
  }

  @media (min-width: 768px) {
       .card--front{
            margin-top: 0;
       }
  }
  
  .card--numero {
    font-size: 1.6rem;
    letter-spacing: 0.2rem;
    margin-bottom: 2rem;
  }
  
  .card--nombre-expira {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    text-transform: uppercase;
  }
  
  .card--cvc {
    position: absolute;
    top: 43%;
    right: 5rem;
    font-size: 0.9rem;
    color: white;
  }

  .fecha{
    display: flex;
    align-items: center;
    gap: .5rem;
  }
  
  /* Responsive */
  @media (min-width: 768px) {
    .card--display {
      flex-direction: column;
    }
  
    .card--front,
    .card--back {
      max-width: 40rem;
    }
  
    .card--front {
      margin-left: 35rem;
    }
  
    .card--back {
      margin-left: 45rem;
    }
  }
  

.grid{
    display: grid;
    grid-template-rows: repeat(2,1fr);
    height: 70rem;
   
}

@media (min-width: 768px) {
     .grid{
        display: grid;
        grid-template-columns: repeat(2,1fr);
        column-gap: 8rem;
        grid-template-rows: unset;
        height: 100vh;
     }
}

/* form-section */
.form__section{
    display: flex;
    align-items: center;
    justify-content: center;
}

.formulario__grupo{
    margin-bottom: 2rem;
}

.formulario__label{
    display: block;
    margin-bottom: .5rem;
    color: var(--very-dark-violet);
    font-weight: 400;
    text-transform: uppercase;
}
.formulario__input{
    width: 100%;
    padding: .7rem;
    border: 1px solid var(--light-gray-violet);
    border-radius: .5rem;
}

.formulario__input:focus{
  cursor: pointer;
  border: 1px solid var(--gradient-end);
  outline: none;
}

.formulario__fecha{
  display: flex;
  align-items: center;
  gap: 1rem ;
}

.formulario__alerta{
  color: var(--error-red);
  font-family: var(--fuente-principal);
}


/* gracias */

/* Animación de entrada */
@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.gracias{
    display: none;
    animation: fadeSlideIn 0.6s ease-out forwards;
    opacity: 0; /* Importante: necesario para controlar la opacidad inicial */
}

.gracias__imagen{
   margin: 0 auto;
   width: 100%;
   max-width: 7rem;
   padding-bottom: 2rem;
}

.gracias__contenido{
    text-align: center;
}

.gracias__titulo{
    font-size: 4rem;
    font-weight: 400;
    text-transform: uppercase;
    color: var(--very-dark-violet);
}

.gracias__parrafo{
    color: var(--dark-gray-violet);
    font-size: 1.5rem;
    margin-bottom: 3rem;
}