@font-face {
    font-family: 'Poppins';
    src: url('/assets/fonts/Poppins-Regular.ttf');
    font-weight: 400;
    font-style: normal;
}
@font-face {
    font-family: 'Poppins';
    src: url('/assets/fonts/Poppins-Italic.ttf');
    font-weight: 400;
    font-style: italic;
}
@font-face {
    font-family: 'Poppins';
    src: url('/assets/fonts/Poppins-Bold.ttf');
    font-weight: 700;
    font-style: normal;
}
@font-face {
    font-family: 'Poppins';
    src: url('/assets/fonts/Poppins-BoldItalic.ttf');
    font-weight: 700;
    font-style: italic;
}
/* @font-face {
    font-family: 'Poppins';
    src: url('/assets/fonts/Poppins-ExtraBold.ttf');
    font-weight: 900;
} */
:root {
    /* ## Colors */
    /* ### Primary */
    --purple: hsl(259, 100%, 65%);
    --light-red: hsl(0, 100%, 67%);

    /* ### Neutral */
    --white: hsl(0, 0%, 100%);
    --off-white: hsl(0, 0%, 94%);
    --light-grey: hsl(0, 0%, 86%);
    --smokey-grey: hsl(0, 1%, 44%);
    --off-black: hsl(0, 0%, 8%);

    /* ## Typography */
    /* ### Body Copy */
    --font-size: 32px;
}

/* Box sizing rules */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* Remove default margin */
body,
h1, h2, h3, h4, p,
figure, blockquote,
dl, dd {
    margin: 0;
    font-family: 'Poppins';
}

/* Set core root defaults */
html:focus-within {
    scroll-behavior: smooth;
}

/* Set core body defaults */
body {
    min-height: 100vh;
    text-rendering: optimizeSpeed;
    line-height: 1.5;
    background-color: var(--off-white);
}

/* A elements that don't have a class get default styles */
a:not([class]) {
    text-decoration-skip-ink: auto;
}

/* Make images easier to work with */
img,
picture {
    max-width: 100%;
    display: block;
}

/* Inherit fonts for inputs and buttons */
input, button, textarea, select {
    font: inherit;
}

/* Chrome, Safari, Edge, Opera */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Firefox */
input[type=number] {
  -moz-appearance: textfield;
}

/* Remove all animations, transitions and smooth scroll for people that prefer not to see them */
@media (prefers-reduced-motion: reduce) {
    html:focus-within {
    scroll-behavior: auto;
    }
    
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
  }
}


.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1rem;
}

.card {
    background-color: var(--white);
    min-height: 30.375rem;
    max-width: max(80vw, 22rem);
    border-radius: 1.375rem 1.375rem 6.25rem 1.375rem;
    padding: 1.5rem;
}

.input {
    display: flex;
    flex-direction: row;
    align-content: space-between;
    gap: 1rem
}

.input > * {
    flex-grow: 1;
}

.input .input-group {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-width: 5.375rem;
    color: var(--smokey-grey);
    font-weight: 800;
}

.input .input-group label {
    font-size: 0.75rem;
    letter-spacing: 0.25rem;
    padding-bottom: 0.375rem;
}

.input .input-group input {
    padding-left: 1rem;
    padding-top: 0.675rem;
    padding-bottom: 0.675rem;
    border-radius: 0.4375rem;
    border: 1px solid var(--light-grey);
    font-size: 1.25rem;
    color: var(--off-black);
}

.input .input-group input:active {
    border-color: var(--purple);
    outline:0;
}

.input .input-group input:hover {
    border-color: var(--purple);
    outline:0;
}

/* IS INVALID */

.input .input-group > span {
    display: none;
}

.input .input-group.is-invalid > span {
    display: inline-block;
    font-size: 0.75rem;
    padding-top: 0.375rem;
    font-weight: 400;
    font-style: italic;
    color: var(--light-red);
}

.input .input-group.is-invalid > label {
    color: var(--light-red);

}
.input .input-group.is-invalid > input{
    border-color: var(--light-red);
}

/* DIVIDER */

.divider {
    position: relative;
    width: 100%;
    margin-top: 3rem;
    margin-bottom: 3rem;
    border-bottom: 1px solid var(--light-grey);
}

.divider .button-icon {
    position: absolute;
    top:-2rem;
    right: 50%;
    transform: translateX(50%);
    width: 4rem;
    height: 4rem;
    border-radius: 2rem;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--purple);
    border-style: none;
}

.divider .button-icon:hover {
    background-color: var(--off-black);
    cursor: pointer;
}

/* OUTPUT */
.output-group {
    font-size: 3.375rem;
    font-weight: 700;
    font-style: italic;
    letter-spacing: 0;
    line-height: 1;
    color: var(--off-black);
  }

.output-group span {
    color: var(--purple);
}

.attribution { 
    position: sticky;
    bottom: 1rem;
    font-size: 11px; 
    text-align: center; }
.attribution a { 
    color:var(--purple) }

@media (max-height: 35em) {
    .attribution {
        display: none;
    }
}
@media (min-width: 62em) {
    .card {
        width: 52.5rem;
        height: 40.625rem;
        border-radius: 1.4rem 1.4rem 12.5rem 1.4rem;
        padding: 3.75rem;
    }

    .input {
        align-content: flex-start;
        gap: 2rem
    }

    .input .input-group {
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        max-width: 9.9375rem;
        color: var(--smokey-grey);
        font-weight: 800;
    }
    
    .input .input-group label {
        font-size: 0.875rem;
        padding-bottom: 0.625rem;
    }
    
    .input .input-group input {
        padding-left: 1.5rem;
        font-size: 2rem;
    }
   
    /* IS INVALID */
        
    .input .input-group.is-invalid > span {
        padding-top: 0.5rem;
        font-size: 0.875rem;
    }
    
    /* DIVIDER */

    .divider .button-icon {
        top: -3rem;
        right: 0;
        transform: translate(0);
        width: 6rem;
        height: 6rem;
        border-radius: 3rem;
    }

    /* OUTPUT */

    .output-group {
        font-size: 6.25rem;
        letter-spacing: 0.188rem;
      }
}
