*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    font-weight: normal;
    background: #0a0a0a;
    color: #fafafa;
}

main {
    display: flex;
    flex-direction: column;
    padding: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

h1, p {
    margin: 0;
    padding: 0;
}

h1 {
    font-size: 3rem;
}

#message {
    margin-top: 1rem;
    font-size: 1.25rem;
    line-height: 1.75;
}

.card-section {
    display: flex;
    flex-direction: column;
    padding-top: 2rem;
    gap: 0;
    padding-bottom: 20vh;
}

.card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 1rem;
    gap: 1rem;
    border-radius: 1rem;
    background: #fafafa;
    color: #0a0a0a;
    position: sticky;
    top: 5vh;
    box-shadow: 0 -20px 30px rgba(0, 0, 0, 0.3);
    min-height: 60vh;
    margin-bottom: 5vh;
}

.card:nth-child(1) {
    z-index: 1;
}

.card:nth-child(2) {
    z-index: 2;
}

.card:nth-child(3) {
    z-index: 3;
}

.card:nth-child(4) {
    z-index: 4;
}

.card:nth-child(5) {
    z-index: 5;
}

.card:nth-child(6) {
    z-index: 6;
}

.card-image {
    width: 100%;
    height: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 1rem;
}

.card-content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card-desc {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#card-label {
    color: #737373;
    font-size: 0.8125rem;
}

#card-title {
    font-size: 0.9375rem;
    line-height: 1.5;
}

.card-cta {
    width: 100%;
    display: flex;
    padding-top: 1rem;
    justify-content: space-between;
    align-items: center;
}

.card-cta p {
    font-size: 0.8125rem;
    background: #e5e5e5;
    color: #0a0a0a;
    padding: 0.5rem 0.75rem;
    border-radius: 9999px;
}

.hgi {
    background-color: #0a0a0a;
    color: #fafafa;
    padding: 0.625rem;
    border-radius: 9999px;
    cursor: pointer;
}

.other {
    display: flex;
    justify-content: center;
    align-items: center;
}

.other-2 {
    display: flex;
    justify-content: center;
    align-items: center;
}

.other-3 {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#amica {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serifs;
    font-size: 1.5rem;
    padding-bottom: 1rem;
}

.chat-form {
    width: 100%;
    max-width: 500px;
}

.textarea-wrapper {
    position: relative;
    width: 100%;
}

.textarea-wrapper textarea {
    width: 100%;
    min-height: 120px;
    resize: none;
    border-radius: 1rem;
    border: none;
    padding: 1rem 3.5rem 1rem 1rem;
    /* spazio per il bottone */
    font-family: inherit;
    font-size: 1rem;
    background: #1a1a1a;
    color: #fafafa;
    outline: none;
    border: 1px solid #fafafa20;
}

.textarea-wrapper textarea::placeholder {
    color: #737373;
}

.send-btn {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    border: none;
    background: transparent;
    padding: 0;
    cursor: pointer;
}

.send-btn .hgi {
    font-size: 0.875rem;
    background-color: #c4b5fd;
    color: #0a0a0a;
    padding: 0.625rem;
    border-radius: 9999px;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.send-btn .hgi:hover {
    transform: scale(1.1);
    opacity: 0.9;
}

#fine {
    font-size: 4rem;
    text-align: center;
    color: #c4b5fd;
}

.fine-main {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100svh;
}

@media (max-width: 768px) {
    main {
        padding: 1.5rem;
    }

    h1 {
        font-size: 2.25rem;
    }
}

@media (max-width: 480px) {
    main {
        padding: 1.25rem 1rem;
    }

    h1 {
        font-size: 1.75rem;
    }

    #message {
        font-size: 1rem;
        line-height: 1.75;
    }

    .card {
        grid-template-columns: 1fr;
        padding: 0.875rem;
        gap: 0.875rem;
        top: 2vh;
        min-height: auto;
        margin-bottom: 3vh;
    }

    .card-image {
        width: 100%;
        height: auto;
        max-height: none;
        display: block;
        object-fit: cover;
    }
}