@font-face {
    font-family: "Fraunces";
    src: url("../assets/fonts/Fraunces-VariableFont.ttf") format("truetype");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Source Sans 3";
    src: url("../assets/fonts/SourceSans3-VariableFont_wght.ttf") format("truetype");
    font-weight: 200 900;
    font-style: normal;
    font-display: swap;
}

:root {
    --paper: #f6f1e8;
    --ink: #24211c;
    --indigo: #44518f;
    --terracotta: #a6573f;
    --line: #d9d0c2;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

html {
    overflow-x: clip;
}

body {
    position: relative;
    overflow-x: clip;
    margin: 0;
    background: var(--paper);
    color: var(--ink);
}

body::before {
    position: fixed;
    top: 8%;
    right: -13vw;
    width: min(48vw, 680px);
    aspect-ratio: 1;
    border: 1px solid rgba(68, 81, 143, 0.16);
    border-radius: 50%;
    content: "";
}

main {
    position: relative;
    display: grid;
    overflow-x: clip;
    min-height: 100vh;
    min-height: 100svh;
    place-items: center;
    padding: clamp(2rem, 7vw, 7rem);
}

main::before {
    position: absolute;
    top: 4%;
    right: 5%;
    color: rgba(68, 81, 143, 0.09);
    content: "“";
    font-family: "Fraunces", Georgia, serif;
    font-size: clamp(15rem, 32vw, 32rem);
    line-height: 1;
}

.quote-content {
    position: relative;
    z-index: 1;
    width: min(100%, 1050px);
}

figure,
blockquote {
    margin: 0;
}

figure {
    position: relative;
    width: 100%;
    padding: clamp(0.25rem, 1vw, 1rem) 0 clamp(0.25rem, 1vw, 1rem) clamp(1.6rem, 4vw, 4rem);
}

figure::before {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 4px;
    border-radius: 999px;
    background: var(--terracotta);
    content: "";
}

h1 {
    margin: 0;
    font-family: "Fraunces", Georgia, serif;
    font-size: clamp(3.4rem, 7.2vw, 7rem);
    font-variation-settings: "opsz" 72, "wght" 480;
    letter-spacing: -0.06em;
    line-height: 0.96;
}

.quote-length-medium h1 {
    font-size: clamp(2.8rem, 5vw, 5rem);
    line-height: 0.98;
}

.quote-length-long main {
    padding-block: clamp(2rem, 4vw, 4rem);
}

.quote-length-long h1 {
    font-size: clamp(2.2rem, 3.6vw, 4rem);
    letter-spacing: -0.045em;
    line-height: 1;
}

figcaption {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: clamp(1.5rem, 3vw, 2.5rem);
    font-family: "Fraunces", Georgia, serif;
    font-size: clamp(1.1rem, 1.8vw, 1.45rem);
    font-variation-settings: "opsz" 48, "wght" 650;
}

figcaption::after {
    width: min(12rem, 25vw);
    height: 1px;
    background: var(--line);
    content: "";
}

.quoter-cta {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1rem;
    align-items: center;
    margin: clamp(2.5rem, 5vw, 4.5rem) 0 0 clamp(1.6rem, 4vw, 4rem);
    padding-top: 1.35rem;
    border-top: 1px solid var(--line);
    font-family: "Source Sans 3", Arial, sans-serif;
}

.quoter-mark {
    display: grid;
    width: 2.35rem;
    height: 2.35rem;
    place-items: center;
    border-radius: 50%;
    background: var(--indigo);
    color: #fff;
    font-family: "Fraunces", Georgia, serif;
    font-size: 1.75rem;
    line-height: 1;
}

.quoter-cta p {
    margin: 0;
    color: #625d55;
    font-size: 1rem;
    font-weight: 600;
}

.quoter-cta a {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    justify-self: end;
    padding: 0.72rem 1rem;
    border: 1px solid var(--indigo);
    border-radius: 10px;
    background: var(--indigo);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 750;
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(52, 61, 112, 0.14);
    transition: background 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.quoter-cta a:hover,
.quoter-cta a:focus-visible {
    background: #343d70;
    box-shadow: 0 10px 24px rgba(52, 61, 112, 0.2);
    transform: translateY(-2px);
}

@media (max-width: 640px) {
    body::before {
        display: none;
    }

    main {
        place-items: center start;
        padding: 2rem;
    }

    main::before {
        display: none;
    }

    figure {
        padding-left: 1.35rem;
    }

    h1 {
        font-size: clamp(3rem, 15vw, 4.5rem);
    }

    .quote-length-medium h1 {
        font-size: clamp(2.35rem, 10vw, 3.4rem);
    }

    .quote-length-long h1 {
        font-size: clamp(1.85rem, 7.5vw, 2.6rem);
        line-height: 1.02;
    }

    .quoter-cta {
        grid-template-columns: auto 1fr;
        margin-left: 1.35rem;
    }

    .quoter-cta a {
        grid-column: 2;
        justify-self: start;
        justify-content: center;
        margin-top: 0.25rem;
    }
}
