/*
 * UI Lib design system: tokens and shared components.
 *
 * Copied from the main site's uilib theme
 * (ui-lib-website/wordpress/themes/uilib/assets/css/base.css) so the blog
 * and the store share one look. Keep the two in step: change a token
 * there, change it here.
 */

:root {
    /* Colour */
    --u-ink: #111111;
    --u-text: #2B2B2B;
    --u-muted: #454545;
    --u-subtle: #8F8F8F;
    --u-line: #E1E4E8;
    --u-line-strong: #CBD0D6;
    --u-surface: #FFFFFF;
    --u-surface-soft: #F4F6F8;
    --u-surface-warm: #FBF6E8;
    --u-header-bg: rgba(251, 250, 248, 0.92);
    --u-brand: #D62828;
    --u-brand-hover: #AE1F1F;
    --u-accent: #FFD730;
    --u-accent-soft: #FFE96B;
    --u-accent-pale: #FFF0A8;
    --u-positive: #0A7A50;
    --u-dark: #0D0D0D;
    --u-dark-2: #1C1C1C;
    --u-dark-3: #262626;
    --u-dark-line: #3D3D3D;
    --u-dark-text: #C4C4C4;
    --u-dark-muted: #B5B5B5;

    /* Type */
    --u-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --u-display-xl: clamp(38px, 5.6vw, 72px);
    --u-display-l: clamp(28px, 3.4vw, 44px);
    --u-display-m: clamp(24px, 2.8vw, 36px);

    /* Layout */
    --u-container: 1200px;
    --u-gutter: 24px;
    --u-section: clamp(64px, 7vw, 96px);
    --u-radius: 6px;
    --u-radius-lg: 8px;
    --u-header-h: 64px;
}

/* Base -------------------------------------------------------------- */

/* reset.css sets overflow-x:hidden on html and body, which turns body
   into a scroll container and silently disables position:sticky.
   "clip" hides overflow the same way without doing that. */
html,
body.u-site {
    overflow-x: clip;
}

body.u-site {
    margin: 0;
    font-family: var(--u-font);
    color: var(--u-ink) !important; /* edd-widgets style.css sets !important */
    background: var(--u-surface);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.u-site a {
    text-decoration: none;
}

.u-site img {
    max-width: 100%;
    height: auto;
}

.u-container {
    max-width: calc(var(--u-container) + 2 * var(--u-gutter));
    margin-inline: auto;
    padding-inline: var(--u-gutter);
}

.u-section {
    padding-block: var(--u-section) 0;
}

.screen-reader-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
}

.u-skip-link:focus {
    clip: auto;
    width: auto;
    height: auto;
    z-index: 1000;
    top: 8px;
    left: 8px;
    padding: 10px 14px;
    background: var(--u-surface);
    color: var(--u-ink);
}

/* Type -------------------------------------------------------------- */

.u-eyebrow {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 18px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--u-muted);
}

.u-eyebrow::before {
    content: "";
    width: 22px;
    height: 1px;
    background: var(--u-brand);
    flex-shrink: 0;
}

.u-eyebrow--brand {
    color: var(--u-brand);
}

.u-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 36px;
}

.u-section-head--center {
    justify-content: center;
    text-align: center;
}

.u-section-head--center .u-eyebrow {
    justify-content: center;
}

.u-section-head__title {
    margin: 0;
    max-width: 24ch;
    font-size: var(--u-display-l);
    line-height: 1.06;
    letter-spacing: -0.036em;
    font-weight: 800;
    color: inherit;
    text-wrap: pretty;
}

.u-section-head--center .u-section-head__title {
    margin-inline: auto;
}

.u-section-head__text {
    margin: 14px 0 0;
    max-width: 62ch;
    font-size: 16px;
    line-height: 1.6;
    color: var(--u-muted);
}

.u-section-head--center .u-section-head__text {
    margin-inline: auto;
}

.u-prose {
    font-size: 16px;
    line-height: 1.65;
    color: var(--u-text);
}

/* Buttons ----------------------------------------------------------- */

.u-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 28px;
    border: 1px solid transparent;
    border-radius: var(--u-radius);
    font-family: var(--u-font);
    font-size: 14px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: .055em;
    text-transform: uppercase;
    text-align: center;
    cursor: pointer;
    transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}

/* The label is one flex item, so a long label wraps as ordinary text.
   Without the span, anything inline in it (WordPress swaps emoji for
   <img class="emoji">) became a separate item in its own column. */
.u-btn__label {
    min-width: 0;
    overflow-wrap: anywhere;
}

.u-btn__label img.emoji {
    display: inline;
    width: 1em;
    height: 1em;
    margin: 0 .1em;
    vertical-align: -0.1em;
}

/* .u-btn sets display, which would otherwise override the hidden attribute. */
.u-btn[hidden] {
    display: none;
}

.u-btn--sm {
    padding: 12px 18px;
    font-size: 12.5px;
    letter-spacing: .06em;
}

.u-btn--block {
    display: flex;
    width: 100%;
}

.u-site .u-btn--primary {
    background: var(--u-brand);
    color: #fff;
}

.u-site .u-btn--primary:hover {
    background: var(--u-brand-hover);
    color: #fff;
}

.u-site .u-btn--dark {
    background: var(--u-dark-3);
    color: #fff;
}

.u-site .u-btn--dark:hover {
    background: var(--u-brand);
    color: #fff;
}

.u-site .u-btn--outline {
    background: var(--u-surface);
    border-color: var(--u-line-strong);
    color: var(--u-ink);
}

.u-site .u-btn--outline:hover {
    border-color: var(--u-ink);
    color: var(--u-ink);
}

.u-site .u-btn--light {
    background: #fff;
    color: var(--u-ink);
}

.u-site .u-btn--light:hover {
    background: var(--u-accent);
    color: var(--u-ink);
}

.u-site .u-btn--ghost-dark {
    border-color: #4D4D4D;
    color: #fff;
}

.u-site .u-btn--ghost-dark:hover {
    background: #fff;
    color: var(--u-ink);
}

.u-site .u-btn--soft {
    background: var(--u-surface-soft);
    border-color: #D8DCE1;
    color: var(--u-ink);
}

.u-site .u-btn--soft:hover {
    background: var(--u-dark-3);
    border-color: var(--u-dark-3);
    color: #fff;
}

.u-btn--compact {
    padding: 10px 14px;
    font-size: 11.5px;
}

.u-site .u-textlink {
    font-size: 12.5px;
    font-weight: 800;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--u-brand);
}

.u-site .u-textlink:hover {
    color: var(--u-brand-hover);
}

.u-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

/* Small pieces ------------------------------------------------------- */

.u-chip {
    display: inline-block;
    padding: 2px 10px;
    border: 1px solid var(--u-line);
    border-radius: 4px;
    font-size: 10.5px;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--u-muted);
}

.u-badge {
    display: inline-block;
    padding: 5px 9px;
    border-radius: 4px;
    background: var(--u-ink);
    color: #fff;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.u-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: repeating-linear-gradient(135deg, var(--u-surface-soft) 0 10px, #E8EBEE 10px 20px);
    color: var(--u-muted);
    font-size: 11px;
    letter-spacing: .08em;
    text-transform: uppercase;
}

@media (prefers-reduced-motion: reduce) {
    .u-site *,
    .u-site *::before,
    .u-site *::after {
        animation-duration: 1ms !important;
        transition-duration: 1ms !important;
    }
}
