/* Pieces reused across pages. */

/* BUTTON */
.button {
    all: unset;
    position: relative;
    z-index: 1;
    overflow: hidden;
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 16px 32px 16px 16px;
    border-radius: 32px;
    background: var(--accent);
    color: white;
    font-size: var(--default_font_size);
    font-weight: var(--weight);
    cursor: pointer;
    text-decoration: none !important;
    transition: color 200ms ease-in-out, background 200ms ease-in-out;
}

.button::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    opacity: 0;
    background: linear-gradient(319deg, #eecbaa, #ffff7c 50%, #f5e197);
    transition: opacity 200ms ease-in-out;
}

.button path {
    fill: white !important;
    transition: fill 200ms ease-in-out;
}

.button:hover::before {
    opacity: 1;
}

.button:hover {
    color: black !important;
}

.button:hover path {
    fill: var(--accent) !important;
}

.button.reverse {
    background: white !important;
    color: black !important;
}

.button.reverse::before {
    background: var(--accent) !important;
}

.button.reverse path,
.button.reverse:hover path {
    fill: var(--accent) !important;
}

.button.reverse:hover {
    color: white !important;
}

.button.reverse:hover path {
    fill: white !important;
}

/* TAGS */
span.section_tag {
    display: flex;
    gap: 8px;
    align-items: center;
    width: fit-content;
    height: fit-content;
    padding: 6px 16px;
    border: 1px solid #c8c8c8;
    border-radius: var(--radius);
    font-weight: var(--weight);
}

span.section_tag[data-light="True"] {
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

span.section_tag[data-light="True"] path {
    fill: white;
}

span.dev_tag {
    z-index: 2;
    padding: 4px 12px;
    border-radius: var(--radius);
    background: var(--accent);
    color: white;
    font-size: 14px;
}

/* CIRCLE LINK */
.link {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    justify-self: end;
    height: 32px;
    width: 32px;
    border-radius: 100%;
    background: white;
    cursor: pointer;
    transition: all 300ms;
}

.link path {
    fill: black;
    transition: fill 300ms;
}

.link:hover {
    transform: rotate(180deg);
    background: var(--accent);
}

.link:hover path {
    fill: white;
}

.bold_accent {
    color: var(--accent) !important;
    font-weight: var(--weight);
}

.bold_accent:hover {
    color: black !important;
}

/* ANIMATED ANCHOR */
div[data-animated-anchor="true"] {
    cursor: pointer;
}

div[data-animated-anchor="true"],
a[data-animated-anchor="true"] {
    display: inline-block;
    overflow: hidden;
    height: 1.5em;
    width: fit-content;
    vertical-align: bottom;
    text-decoration: none;
}

div[data-animated-anchor="true"] p,
a[data-animated-anchor="true"] p,
a[data-animated-anchor="true"] strong {
    display: block;
    height: 1.5em;
    line-height: 1.5em;
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

div[data-animated-anchor="true"]:hover p,
a[data-animated-anchor="true"]:hover p,
a[data-animated-anchor="true"]:hover strong {
    transform: translateY(-1.5em);
}

div[data-animated-anchor="true"]:hover p:last-child,
a[data-animated-anchor="true"]:hover p:last-child,
a[data-animated-anchor="true"]:hover strong:last-child {
    text-decoration: underline;
    text-underline-offset: 5px;
}

/* STATS */
.stats {
    display: flex;
    flex-wrap: wrap;
    gap: var(--gap);
    margin: 40px 0;
}

.stat {
    flex: 1 0 160px;
    padding-top: 12px;
    border-top: 2px solid var(--accent);
}

.stat strong {
    display: block;
    font-size: 32px;
    letter-spacing: -.56px;
    line-height: 1.1em;
}

.stat p {
    padding-top: 4px;
    color: var(--sub_text_color);
}

/* MEDIA */
.media {
    margin: 48px 0;
}

.media_frame {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--foreground);
}

.media_frame video,
.media_frame img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.media_placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
    border: 1px dashed #c9c9c9;
    border-radius: var(--radius);
}

.media_placeholder path {
    fill: #c9c9c9;
}

figcaption {
    padding-top: 8px;
    font-size: 14px;
}

/* QUOTE */
.quote {
    margin: 48px 0;
    padding: 4px 0 4px var(--gap);
    border-left: 2px solid var(--accent);
}

.quote p {
    font-size: 24px;
    letter-spacing: -.4px;
    line-height: 1.35em;
}

.quote cite {
    display: block;
    padding-top: 12px;
    font-size: 14px;
    font-style: normal;
    color: var(--sub_text_color);
}

/* HELPERS */
.h_flex_container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.image_container_404 {
    position: relative;
    background: whitesmoke;
}

.image_container_404:after {
    content: "Image is loading could not be loaded";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: grey;
}

.gradient_light,
.gradient_dark {
    display: block;
    position: absolute;
    inset: auto 0 0 0;
    z-index: 2;
    height: 100%;
    width: 100%;
}

.gradient_light {
    background: linear-gradient(180deg, #ffffff00 50%, #fbfbfb75 100%);
}

.gradient_dark {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 50%, rgba(9, 9, 9, 0.46) 100%);
}
