/* Home */

/* Hero: stem-green field, photo, the visitor's own note card */
.hero {
    background: var(--stelo);
    color: var(--stelo-ink);
    padding: 1.5rem 0 3rem;
    overflow: hidden;
}

.hero__grid {
    display: grid;
    gap: 1.25rem;
    grid-template-areas: "copy" "media" "form";
}

.hero__copy {
    grid-area: copy;
}

.hero h1 {
    color: #fff;
    font-size: clamp(2.3rem, 9vw, 5.4rem);
    letter-spacing: -.045em;
    line-height: .95;
}

.hero__lead {
    margin-top: .75rem;
    max-width: 36ch;
    font-size: 1rem;
    color: var(--stelo-ink);
}

.hero__media {
    grid-area: media;
    position: relative;
    margin: 0 calc(-1 * var(--gutter)) 2.25rem;
}

.hero__media img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.hero__note {
    position: absolute;
    left: var(--gutter);
    bottom: -2.25rem;
    width: min(70%, 22rem);
    padding-top: 1.8rem;
    padding-bottom: 1rem;
}

.hero__note .note__text {
    font-size: 2rem;
    min-height: 0;
}

.hero__note .note__text {
    transition: opacity .25s;
}

.hero__form {
    grid-area: form;
    display: grid;
    gap: .7rem;
    align-content: start;
}

.hero__form label {
    font-weight: 600;
    color: #fff;
}

.hero__field input {
    width: 100%;
    height: 3.4rem;
    padding: 0 1.1rem;
    border: 1px solid rgba(230, 239, 226, .35);
    border-radius: 10px;
    background: rgba(255, 255, 255, .06);
    color: #fff;
    font: 500 1.0625rem var(--font);
    caret-color: var(--ciclamino);
    transition: border-color .2s, background-color .2s;
}

.hero__field input::placeholder {
    color: var(--stelo-muted);
}

.hero__field input:focus {
    outline: none;
    border-color: #fff;
    background: rgba(255, 255, 255, .1);
}

.hero__form .btn {
    justify-self: start;
}

.hero__hint {
    font-size: .9rem;
    color: var(--stelo-muted);
    max-width: 40ch;
}

@media (min-width: 900px) {
    .hero {
        padding: 4.5rem 0 5.5rem;
    }

    .hero__grid {
        grid-template-columns: 1fr 1.1fr;
        grid-template-areas: "copy media" "form media";
        column-gap: clamp(2rem, 5vw, 5rem);
        row-gap: 2.5rem;
        align-items: end;
    }

    .hero__form {
        align-self: start;
    }

    .hero__media {
        margin: 0;
    }

    .hero__media img {
        aspect-ratio: 1;
        border-radius: 6px;
    }

    .hero__note .note__text {
        font-size: 2.6rem;
    }

    .hero__note {
        left: -3.5rem;
        bottom: 2.5rem;
        width: 20rem;
    }
}

/* Shop grid */
.shop {
    padding: 5.5rem 0 4rem;
    scroll-margin-top: 4rem;
}

.shop__head {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    justify-content: space-between;
    gap: 1.2rem;
    margin-bottom: 2rem;
}

.shop h2,
.occasions h2,
.story h2 {
    font-size: clamp(2rem, 6vw, 3.4rem);
    color: var(--stelo);
}

.chips {
    display: flex;
    gap: .5rem;
    overflow-x: auto;
    scrollbar-width: none;
}

.chip {
    flex: none;
    height: 2.5rem;
    padding: 0 1.1rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--carta);
    color: var(--ink);
    font: 550 .95rem var(--font);
    cursor: pointer;
    transition: background-color .2s, color .2s, border-color .2s;
}

.chip:hover {
    border-color: var(--stelo);
}

.chip.is-on {
    background: var(--stelo);
    border-color: var(--stelo);
    color: #fff;
}

.grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem 1rem;
}

.tile[hidden] {
    display: none;
}

.tile a {
    display: grid;
    gap: .3rem;
    text-decoration: none;
}

.tile__img {
    display: block;
    overflow: hidden;
    border-radius: 6px;
    border: 1px solid var(--line);
    margin-bottom: .5rem;
}

.tile__img img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    transition: transform .8s var(--ease);
}

.tile a:hover .tile__img img {
    transform: scale(1.04);
}

.tile__name {
    font-weight: 650;
    font-size: 1.125rem;
    line-height: 1.2;
}

.tile__price {
    font-variant-numeric: tabular-nums;
    color: var(--muted);
}

.tile__price s {
    margin-right: .3rem;
    opacity: .7;
}

.shop__note {
    margin-top: 2rem;
    font-size: .9rem;
    color: var(--muted);
}

@media (min-width: 700px) {
    .grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2.5rem 1.5rem;
    }
}

@media (min-width: 1100px) {
    .grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Occasions: a row of written notes */
.occasions {
    background: var(--foglia);
    padding: 4.5rem 0 5rem;
    overflow: hidden;
}

.occasions__list {
    list-style: none;
    margin: 2.5rem 0 0;
    padding: 2.5rem 0 1rem;
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.occasions__list li {
    flex: none;
    width: 13rem;
    scroll-snap-align: start;
}

.occasions__list a {
    display: grid;
    gap: 1.3rem;
    text-decoration: none;
}

.occasions__list .note {
    display: block;
    height: 9.5rem;
    transition: transform .5s var(--ease);
}

.occasions__list li:nth-child(even) .note {
    transform: rotate(2.5deg);
}

.occasions__list a:hover .note {
    transform: rotate(0) translateY(-6px);
}

.occasions__list .note__text {
    font-size: 2rem;
}

.occasions__label {
    font-weight: 650;
    color: var(--stelo);
}

@media (min-width: 1100px) {
    .occasions__list {
        overflow: visible;
        justify-content: space-between;
    }

    .occasions__list li {
        width: calc((100% - 6rem) / 5);
    }
}

/* Trust: four facts, each owning one true number or promise */
.trust {
    padding: 4.5rem 0;
}

.trust__grid {
    display: grid;
    gap: 1.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--line);
}

.trust__score {
    font-size: clamp(1.6rem, 4.5vw, 2.6rem);
    font-weight: 700;
    letter-spacing: -.03em;
    line-height: 1.15;
    color: var(--stelo);
    max-width: 22ch;
}

.trust__score a {
    color: var(--ciclamino);
    text-decoration: none;
}

.trust__score a:hover {
    text-decoration: underline;
}

.trust__score .icon {
    display: inline;
    width: .8em;
    height: .8em;
    fill: currentColor;
    stroke: none;
    vertical-align: -.02em;
}

.trust__text {
    font-size: 1.125rem;
    color: var(--muted);
    max-width: 46ch;
}

@media (min-width: 900px) {
    .trust__grid {
        grid-template-columns: 1.3fr 1fr;
        align-items: end;
        column-gap: 4rem;
    }
}

/* Story */
.story {
    padding: 2rem 0 6rem;
}

.story__grid {
    display: grid;
    gap: 3.5rem;
    align-items: start;
}

.story__copy p {
    margin-top: 1.1rem;
    max-width: 58ch;
    font-size: 1.125rem;
}

.story .btn {
    margin-top: 2rem;
}

.story__side {
    position: relative;
    padding-bottom: 3rem;
}

.story__photo {
    margin: 0;
    display: grid;
    place-items: center;
    aspect-ratio: 4 / 3;
    padding: 2rem;
    border: 1.5px dashed var(--stelo-muted);
    border-radius: 6px;
    background: var(--foglia);
    color: var(--muted);
    font-size: .95rem;
    text-align: center;
}

.story__note {
    position: absolute;
    right: -.5rem;
    bottom: 0;
    width: min(80%, 18rem);
    padding-top: 1.8rem;
    transform: rotate(3deg);
}

.story__note .note__text {
    font-size: 1.9rem;
    min-height: 0;
}

@media (min-width: 900px) {
    .story__grid {
        grid-template-columns: 1.4fr 1fr;
    }
}

/* Load moment: the note is written in once, as with a pen */
@media (prefers-reduced-motion: no-preference) {
    .hero__note {
        animation: note-in 1s .25s var(--ease) both;
    }

    .hero__note .note__text {
        animation: ink-in 1.4s .7s ease-out both;
    }
}

@keyframes note-in {
    from {
        transform: translateY(1.5rem) rotate(-9deg);
        opacity: 0;
    }

    to {
        transform: rotate(-3deg);
        opacity: 1;
    }
}

@keyframes ink-in {
    from {
        clip-path: inset(0 100% 0 0);
    }

    to {
        clip-path: inset(0 0 0 0);
    }
}
