:root {
    --text-xxs: clamp(0.65rem, 0.5rem + 0.05vw, 0.775rem);
    --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
    --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
    --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
    --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
    --text-2lg: clamp(1.125rem, 1.2rem + 1vw, 2rem);
    --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
    --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);
    --text-3xl: clamp(2.5rem, 1.2rem + 3vw, 4rem);
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --container-border-radius: 30px;
    /* --bg: oklch(0.10 0.015 240); */
    /* --bg: rgb(29, 69, 191); */
    --bg: white;
    --bg-raised: oklch(0.14 0.018 240);
    --surface: oklch(0.98 0 0);
    --surface-accent: oklch(89.449% 0.0001 271.152);
    --border: oklch(0.26 0.025 240);
    --text-primary: oklch(40.833% 0.01243 238.925);
    --text-muted: oklch(0.72 0.015 240);
    /* --accent: oklch(0.65 0.22 25); */
    --red: oklch(65% 0.22 25);
    --accent: #205A9B;
    --black: #000;
    --accent-glow: oklch(0.65 0.22 25 / 0.15);
    --green: oklch(0.84 0.16 88);
    --yellow: #f3cf3e;
    --yellow-depressed: #f3cf3e;
    --ticker-bg: oklch(0.12 0.02 240);
    --text: #1b1b1b;
    --text-subdued: #1b1b1bbd;
    --text-reversed: #ffffff;
    --text-reversed-subdued: #ffffffc4;
    --ticker: rgb(82, 0, 0);
    --tp-backdrop: #000;
    --tp-accent: #ab0000;
}

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

html {
    background: var(--bg);
    color: var(--text-primary);
    font-family: 'Inter', system-ui, sans-serif;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

#bg-video {
    position: fixed;
    top: 0;
    left: 0;
    min-width: 350%;
    min-height: 350%;
    width: auto;
    height: auto;
    z-index: 3;
    object-fit: cover; /* Prevents video stretching */
    pointer-events: none; /* Allows users to click elements through the video */
    mix-blend-mode: soft-light;
    filter: brightness(0.3);
}

body {
    min-height: fit-content;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* justify-content: center; */
    /* padding: var(--space-8) var(--space-6); */
    position: relative;
    overflow-x: hidden;
    background: var(--bg);
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    /* background: radial-gradient(ellipse 80% 60% at 50% 40%, var(--accent-glow), transparent 70%); */
    pointer-events: none;
    z-index: 0;
}

.requires-js {
    display: none;
}

.ticker-warning {
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: center;
}

.ticker-warning a {
    font-weight: 900;
}

.ticker-warning a:hover {
    text-decoration: underline;
}

.subline,
.context-card-desc,
.source-bar-text,
.ticker-meta {
    color: var(--text);
}

.container {
    position: relative;
    z-index: 10;
    width: 100%;
    /* max-width: 900px; */
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 1rem 2rem 1rem;
    /* gap: var(--space-10); */
}

.container > * {
    background-color: var(--bg);
}

.header {
    color: white;
    background-color: var(--accent);
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-4);
}

.header-container {
    width: 100%;
    display: flex;
    padding: 0 20px 10px 20px;
    align-items: center;
    justify-content: space-between;
    flex-direction: column;
    min-height: 350px;
}

.header-container .logo-link {
    height: 104px;
}

.header-container img {
    min-height: 100px;
    max-height: 100px;
    transform: translateY(10px); /* compensate for built-in img padding */
}

.header-flag {
    display: none;
}

.headline {
    font-size: var(--text-3xl);
    font-weight: 900;
    line-height: 1.08;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    max-width: 760px;
}

.headline em {
    font-style: normal;
    color: var(--accent);
}

.headline-container {
    display: flex;
    height: 100%;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.subline {
    width: 100%;
    font-size: var(--text-sm);
    color: var(--text-muted);
    line-height: 1.6;
    text-align: center;
}

.scroller {
    width: 95%;
    /* font-size: var(--text-base); */
    font-size: var(--text-xs);
    color: var(--text-reversed-subdued);
    line-height: 1.6;
    text-align: center;
}

.logo-lockup {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.logo-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.eyebrow {
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    background: var(--accent-glow);
    padding: var(--space-1) var(--space-3);
    /* border-radius: 100px; */
    border: 1px solid var(--accent);
}

.ticker-card {
    border-top-left-radius: var(--container-border-radius);
    border-top-right-radius: var(--container-border-radius);
    width: 100%;
    /* background: var(--surface); */
    background: var(--yellow-depressed);
    /* border: 1px solid var(--border); */
    /* border-radius: 20px; */
    padding: var(--space-12) var(--space-10);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-3);
    box-shadow: 0 0 0 1px var(--border), 0 24px 80px oklch(0 0 0 / 0.3), inset 0 1px 0 oklch(1 0 0 / 0.05);
    position: relative;
    overflow: hidden;
}

/* .ticker-card::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0.4;
    animation: scan 4s linear infinite;
    pointer-events: none;
}

@keyframes scan {
    0% {
        top: -2px;
    }

    100% {
        top: 100%;
    }
} */

.ticker-label {
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.live-dot {
    position: absolute;
    left: 20px;
    top: 20px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--surface);
    flex-shrink: 0;
    will-change: transform, opacity;
    animation: pulse-dot 1.4s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(0.9);
        opacity: 0.7;
    }
}

a {
    color: inherit;
    text-decoration: none;
    font-weight: 700;
}

a:hover {
    text-decoration: underline;
}

.ticker-amount {
    font-family: 'Inter', system-ui;
    /* font-family: "Sixtyfour"; */
    font-size: clamp(1.3rem, 0.5rem + 5.5vw, 7rem);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.02em;
    /* text-shadow: 0 0 40px var(--accent-glow); */
    user-select: none;
    width: 100%;
    text-align: center;
    white-space: nowrap;
    overflow: visible;
    font-variant-numeric: tabular-nums;
}

.ticker-amount .cents {
    font-size: 0.5em;
    opacity: 0.7;
    color: var(--ticker);
    vertical-align: baseline;
}

.ticker-amount .dollars {
    color: var(--ticker);
    text-shadow: -1px -1px 1px rgba(40, 0, 0, 0.8), 1px  1px 1px rgba(255, 255, 255, 0.6); 
}

.ticker-meta {
    max-width: 80%;
    cursor: default;
    font-size: 8px;
    font-weight: 800;
    color: var(--text-subdued);
    letter-spacing: 0.05em;
    text-align: center;
}

.ticker-card a:hover {
    cursor: pointer;
}

.rate-blocks {
    padding: 20px;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
}

.rate-block {
    background: var(--surface);
    /* border: 1px solid var(--border); */
    border-radius: 12px;
    padding: var(--space-5) var(--space-6);
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    align-items: center;
    text-align: center;
}

.rate-block-value {
    font-family: 'Inter', system-ui;
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--accent);
    letter-spacing: -0.02em;
}

.rate-block-label {
    font-size: var(--text-xs);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
}

.rate-strip {
    width: 100%;
    display: flex;
    flex-direction: column;
    grid-template-columns: repeat(4, 1fr);
    justify-content: space-around;
    padding: 30px 30px 0 30px;
    gap: var(--space-4);
    align-items: center;
}

.rate-item {
    font-family: 'Inter', system-ui;
    align-items: center;
    width: 100%;
    /* border-radius: 12px; */
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    /* gap: 10px; */
    font-size: var(--text-md);
    font-weight: 600;
}

.rate-item:not(:last-child) {
    padding-bottom: 20px;
    border-bottom: 1px solid var(--surface);
}

.rate-container {
    background: var(--surface);
    border-bottom: 3px solid var(--surface-accent);
    padding: var(--space-4) 0;
    text-align: center;
    width: 120px;
}

.rate-value {
    font-family: 'Inter', system-ui;
    color: var(--green);
    /* letter-spacing: -0.02em; */
}

.rate-label {
    color: var(--text-muted);
    text-transform: uppercase;
    /* letter-spacing: 0.1em; */
}

.context-grid {
    padding: 20px;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
}

.context-card {
    /* border: 1px solid var(--surface); */
    background-color: var(--surface);
    border-radius: 14px;
    padding: var(--space-6);
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.context-card-title {
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--text-muted);
}

.context-card-value {
    font-size: var(--text-xl);
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.context-card-value.highlight {
    color: var(--accent);
}

.context-card-desc {
    font-size: var(--text-sm);
    color: var(--text-muted);
    line-height: 1.5;
    margin-top: var(--space-1);
}

.footer {
    padding: var(--space-4) var(--space-5) var(--space-3) var(--space-5);
    background: var(--bg);
    border-bottom-left-radius: var(--container-border-radius);
    border-bottom-right-radius: var(--container-border-radius);
    /* border: 1px solid var(--border); */
    /* border-radius: 10px; */
    width: 100%;
}

.footer-colophon {
    margin-top: 20px;
    border-top: 1px solid var(--surface-accent);
}

.footer-colophon-inner {
    padding-top: 15px;
    padding-bottom: var(--space-5);
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    font-size: var(--text-xs);
    font-weight: 600;
}

.footer-colophon-inner:hover {
    text-decoration: none;
    cursor: pointer;
}

.footer-copyright {
    font-size: inherit;
}

.footer-tagling {
    font-size: inherit;
}

.source-bar {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.source-bar-text {
    padding: 0 10px 0 25px;
    font-size: var(--text-xxs);
    color: var(--text-subdued);
    line-height: 1.5;
}

.source-bar-text li a {
    color: inherit;
}

.source-bar-text .authorisation a {
    color: inherit;
    font-weight: inherit;
}

.source-bar-text ul {
    display: flex;
    gap: 5px;
    flex-direction: column;
}

.source-bar-text a {
    color: var(--green);
    text-decoration: none;
    font-weight: 600;
}

.source-bar-text a:hover {
    text-decoration: underline;
}

/* CTA banner */
.cta-block {
    width: 100%;
}

.cta-banner {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-6);
    padding: var(--space-5) var(--space-6);
    background: var(--bg);
    /* border: 1px solid var(--border); */
    border-radius: 12px;
}

.cta-banner.no-qr {
    justify-content: center;
    gap: var(--space-8);
}

.cta-banner.no-qr .cta-qr {
    display: none;
}

.cta-left {
    width: 100%;
    justify-content: center;
    display: flex;
    align-items: center;
    gap: var(--space-5);
}

.cta-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-3);
    text-align: center;
}

.cta-text .heading {
    color: var(--accent);
    font-weight: 900;
    font-size: var(--text-2lg);
    line-height: 1.3;
    margin: 0;
}

.cta-btns {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    padding: var(--space-3) var(--space-6);
    border-radius: 100px;
    font-size: var(--text-sm);
    font-weight: 700;
    text-decoration: none;
    line-height: 1;
    white-space: nowrap;
    /* color: var(--text-subdued);
    background: var(--yellow); */
    color: var(--text-reversed-subdued);
    background: var(--accent);
    transition: opacity 0.15s ease;
    width: 100%;
    text-align: center;
    justify-content: center;
}

.cta-btn.secondary {
    background: var(--black);
}

.cta-btn.secondary:hover {
    filter: brightness(1.1);
}

.cta-btn:hover {
    opacity: 0.85;
}

.cta-btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.cta-qr {
    width: 150px;
    height: 150px;
    border-radius: 4px;
    display: none;
}

.cta-logo {
    display: none;
    padding: 0 20px 0 0;
    height: auto;
    flex-shrink: 1;
    min-width: 0;
}

.cta-logo-link {
    display: none;
}

.tp-block {
    width: 100%;
}

.tp-banner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    background-color: var(--tp-backdrop);
    border-top: 6px solid var(--tp-accent);
    padding: 20px var(--space-10);
}

.tp-text {
    color: var(--text-reversed-subdued);
    text-align: center;
}

.tp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-4) var(--space-5);
    border-radius: 100px;
    font-size: var(--text-sm);
    font-weight: 700;
    text-decoration: none;
    line-height: 1;
    text-align: center;
    color: var(--text-reversed);
    background: var(--tp-accent);
    transition: opacity 0.15s ease;
    white-space: nowrap;
    width: 100%;
}

.tp-btn .more {
    display: block;
}

.tp-btn:hover {
    filter: brightness(1.1);
}

.tp-logo {
    width: 200px;
}

@media (max-width: 300px) {
    .tp-logo {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .ticker-card {
        padding: var(--space-8) var(--space-5);
    }

    .context-grid {
        grid-template-columns: 1fr;
    }

    .headline {
        font-size: var(--text-3xl);
    }

    .tp-banner {
        padding: 20px 10%;
    }
}

@media (min-width: 450px) {
    .cta-btns {
        flex-direction: row;
        width: auto;
    }

    .cta-btn {
        width: 170px;
    }

    .ticker-meta {
        font-size: var(--text-xs);
    }
}

@media (min-width: 700px) {
    .scroller {
        width: 73%;
    }

    .tp-banner {
        height: 100px;
        flex-direction: row;
        padding: var(--space-1) var(--space-4);
    }

    .tp-logo {
        width: auto;
        height: 80%;
    }

    .tp-btn {
        width: auto;
    }

    .tp-btn .more {
        display: none;
    }

    .cta-logo {
        display: block;
        max-width: 150px;
    }

    .cta-logo-link {
        display: block;
    }

    .cta-qr {
        display: block;
    }

    .cta-left {
        width: auto;
        justify-content: flex-start;
    }

    .cta-btn.secondary {
        width: 100px;
    }

    .cta-text {
        align-items: flex-start;
        text-align: left;
    }
}

@media (min-width: 900px) {
    .tp-logo {
        height: 100%;
    }

    .cta-logo {
        max-width: 200px;
    }

    .cta-btn.secondary {
        width: 170px;
    }
}

@media (min-width: 1200px) {
    .rate-strip {
        flex-direction: row;
    }

    .rate-label {
        text-wrap: nowrap;
    }

    .rate-container {
        width: 100%;
    }

    .ticker-card {
        gap: var(--space-8);
    }

    .tp-btn .more {
        display: block;
    }

    /* .header-flag {
        display: flex;
        position: absolute; 
        top: 0; 
        right: 35px; 
        width: 180px; 
        height: 100px; 
        background-color: var(--yellow);
        align-items: center; 
        justify-content: center; 
        z-index: 10;
    } */

    /* .header-container img {
        display: none;
    } */

    /* .header-flag img {
        display: block;
        height: 80px;
        transform: translateY(-2px) translateX(-2px);
    } */

    .rate-blocks {
        grid-template-columns: repeat(4, 1fr);
    }

    .live-dot {
        width: 20px;
        height: 20px;
    }
}

html {
    background-color: var(--accent);
}

body {
    max-width: 900px;
    margin: auto;
    background: transparent;
    color: var(--text);
}

.header,
.ticker-card,
.rate-item,
.context-card,
.source-bar {
    /* background:
        linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .015)),
        linear-gradient(135deg, rgba(255, 46, 99, .14), rgba(255, 210, 77, .08) 42%, rgba(143, 53, 255, .12)); */
    border-color: var(--line);
    box-shadow: var(--shadow), inset 0 0 0 1px rgba(255, 255, 255, .06), 0 0 18px rgba(255, 210, 77, .18);
}

.header {
    /* border-bottom: 8px solid var(--yellow); */
    position: relative;
    overflow: hidden;
}

.eyebrow,
.ticker-label,
.rate-label,
.context-card-title {
    color: var(--gold-soft);
    text-transform: capitalize;
}

.headline,
.ticker-amount,
.rate-value,
.context-card-value {
    color: var(--gold);
    /* text-shadow: 0 0 10px rgba(255, 210, 77, .42), 0 0 28px rgba(255, 210, 77, .18); */
}

.headline {
    font-family: 'Inter', system-ui;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.live-dot {
    background: var(--red);
    box-shadow: 0 0 0 6px rgba(255, 46, 99, .16), 0 0 16px rgba(255, 46, 99, .65);
}

.highlight {
    color: #fff2aa;
    /* text-shadow: 0 0 14px rgba(255, 103, 183, .45), 0 0 24px rgba(255, 210, 77, .22); */
}

.source-bar {
    border-color: rgba(255, 103, 183, .42);
    /* box-shadow: var(--shadow), inset 0 0 0 1px rgba(255, 255, 255, .06), 0 0 18px rgba(255, 103, 183, .18); */
}