/* Shared Bitcoin vs Everything design system. Loaded by Main and Key Safety. */

@font-face {
    font-family: "Instrument Sans";
    src: url("/static/fonts/instrument-sans-latin.woff2") format("woff2");
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
}

@font-face {
    font-family: Inter;
    src: url("/static/fonts/inter-latin.woff2") format("woff2");
    font-style: normal;
    font-weight: 400 900;
    font-display: swap;
}

@font-face {
    font-family: Inter;
    src: url("/static/fonts/inter-latin-ext.woff2") format("woff2");
    font-style: normal;
    font-weight: 400 900;
    font-display: swap;
}

@font-face {
    font-family: "JetBrains Mono";
    src: url("/static/fonts/jetbrains-mono-latin.woff2") format("woff2");
    font-style: normal;
    font-weight: 400 500;
    font-display: swap;
}

:root {
    --bg-base: #08090a;
    --bg-raised: #0e1011;
    --bg-overlay: #121516;
    --bg-subtle: #171a1c;
    --bg-hover: #1d2123;
    --bg-active: #24282b;
    --text-primary: #f2f3ef;
    --text-secondary: #a2a7a2;
    --text-tertiary: #858b86;
    --border-subtle: rgba(255, 255, 255, 0.065);
    --border-default: rgba(255, 255, 255, 0.11);
    --border-strong: rgba(255, 255, 255, 0.18);
    --accent: #f7931a;
    --accent-hover: #ffa22e;
    --positive: #65d897;
    --negative: #ff7a7a;
    --font-heading: "Instrument Sans", Inter, sans-serif;
    --font-body: Inter, -apple-system, sans-serif;
    --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
    --container-max: 1180px;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    /* Key Safety aliases consume the same source of truth. */
    --canvas: var(--bg-base);
    --paper: var(--bg-raised);
    --paper-2: var(--bg-overlay);
    --ink: var(--text-primary);
    --muted: var(--text-secondary);
    --faint: #6f7571;
    --line: var(--border-subtle);
    --line-strong: var(--border-strong);
    --orange: var(--accent);
    --sans: var(--font-body);
    --serif: var(--font-heading);
    --mono: var(--font-mono);
    --max: var(--container-max);
}

html {
    color-scheme: dark;
}

body {
    min-height: 100vh;
    margin: 0;
    background-color: var(--bg-base);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 400;
    line-height: 1.7;
    letter-spacing: -0.006em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

button,
input,
select,
textarea {
    font-family: var(--font-body);
}

main h1,
main h2,
main h3,
main h4 {
    font-family: var(--font-heading);
}

.container,
.wrap {
    width: 100%;
    max-width: 1228px;
    margin-inline: auto;
    padding-inline: 24px;
}

main .page-title.page-title {
    color: var(--text-primary);
    font-family: var(--font-heading);
    font-size: clamp(2.75rem, 6vw, 5.25rem);
    font-weight: 600;
    line-height: 0.98;
    letter-spacing: -0.06em;
    text-wrap: balance;
}

.page-lead.page-lead {
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: clamp(1rem, 1.5vw, 1.16rem);
    font-weight: 400;
    line-height: 1.7;
}

body.menu-open {
    overflow: hidden;
}

.global-nav,
.global-nav *,
.currency-bar,
.currency-bar *,
.nav-mobile,
.nav-mobile *,
.nav-overlay {
    box-sizing: border-box;
}

.global-nav {
    position: sticky;
    z-index: 1000;
    top: 0;
    display: flex;
    align-items: center;
    width: 100%;
    height: 72px;
    padding: 0 28px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(8, 9, 10, 0.74);
    backdrop-filter: blur(24px) saturate(130%);
    -webkit-backdrop-filter: blur(24px) saturate(130%);
}

.global-nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1180px;
    height: 72px;
    margin: 0 auto;
}

.nav-brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    padding: 0;
    color: #f2f3ef;
    font-family: "Instrument Sans", Inter, sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.7;
    text-decoration: none;
    text-transform: none;
    white-space: nowrap;
}

.nav-brand-mark {
    display: block;
    flex: 0 0 auto;
    width: 31px;
    height: 31px;
    border-radius: 6px;
    object-fit: cover;
}

.nav-brand-name {
    color: #f2f3ef;
    font-family: "Instrument Sans", Inter, sans-serif;
    font-size: 14.4px;
    font-weight: 700;
    letter-spacing: inherit;
    line-height: 1.7;
}

.nav-brand-name span {
    color: #a2a7a2;
    font-weight: 500;
}

.nav-brand:hover {
    color: #f2f3ef;
}

.nav-brand:hover .nav-brand-mark {
    opacity: 0.88;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 3px;
    width: 450px;
    padding: 4px;
    border: 1px solid rgba(255, 255, 255, 0.065);
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.025);
}

.nav-link {
    display: block;
    padding: 8px 15px;
    border: 1px solid transparent;
    border-radius: 9999px;
    color: #a2a7a2;
    font-family: Inter, -apple-system, sans-serif;
    font-size: 12.48px;
    font-weight: 500;
    letter-spacing: normal;
    line-height: 1.7;
    text-decoration: none;
    white-space: nowrap;
    transition: background 200ms, color 200ms;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.045);
    color: #f2f3ef;
}

.nav-link.active {
    border-color: transparent;
    background: #24282b;
    color: #f2f3ef;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.055);
}

.nav-hamburger {
    display: none;
    width: auto;
    height: auto;
    padding: 8px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #a2a7a2;
    cursor: pointer;
    font: inherit;
}

.nav-hamburger:hover {
    background: rgba(255, 255, 255, 0.045);
    color: #f2f3ef;
}

.nav-hamburger svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
}

.currency-bar {
    position: relative;
    width: 100%;
    height: 39.203125px;
    padding: 8px 28px 0;
    background: var(--bg-base);
}

.currency-bar::after {
    content: "";
    position: absolute;
    z-index: 1;
    top: 100%;
    right: 0;
    left: 0;
    height: 1px;
    background: var(--bg-base);
    pointer-events: none;
}

.currency-bar-inner {
    display: flex;
    justify-content: flex-end;
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
}

.currency-switcher {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 3px;
    border: 1px solid rgba(255, 255, 255, 0.065);
    border-radius: 9999px;
    background: #121516;
}

.currency-switcher .currency-option {
    width: auto;
    min-width: 0;
    height: auto;
    margin: 0;
    padding: 5px 11px;
    border: 1px solid transparent;
    border-radius: 9999px;
    background: transparent;
    color: var(--text-tertiary);
    cursor: pointer;
    font-family: Inter, -apple-system, sans-serif;
    font-size: 11.2px;
    font-weight: 600;
    letter-spacing: 0.05em;
    line-height: 1;
    text-transform: uppercase;
    transition: background 200ms, color 200ms, border-color 200ms;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
}

.currency-switcher .currency-option:hover {
    background: #1d2123;
    color: #a2a7a2;
}

.currency-switcher .currency-option.active {
    border-color: rgba(255, 255, 255, 0.11);
    background: #24282b;
    color: #f2f3ef;
}

.currency-switcher .currency-option[data-currency="inr"] {
    width: 54.8125px;
}

.nav-mobile {
    display: none;
}

.nav-overlay {
    position: fixed;
    z-index: 999;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity 200ms;
}

.nav-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

@media (max-width: 768px) {
    .global-nav,
    .currency-bar {
        padding-right: 20px;
        padding-left: 20px;
    }
}

@media (max-width: 640px) {
    .global-nav,
    .global-nav-inner {
        height: 64px;
    }

    .nav-brand-name span {
        display: none;
    }

    .nav-links {
        display: none;
    }

    .nav-hamburger {
        display: grid;
        place-items: center;
        width: 38px;
        height: 38px;
        padding: 0;
        border: 1px solid rgba(255, 255, 255, 0.065);
        border-radius: 50%;
    }

    .nav-mobile {
        position: fixed;
        z-index: 1000;
        right: 0;
        bottom: 0;
        left: 0;
        display: flex;
        flex-direction: column;
        gap: 4px;
        padding: 18px 20px max(34px, env(safe-area-inset-bottom));
        border: 1px solid rgba(255, 255, 255, 0.14);
        border-bottom: 0;
        border-radius: 22px 22px 0 0;
        background: rgba(12, 14, 15, 0.98);
        box-shadow: 0 -24px 70px rgba(0, 0, 0, 0.42);
        transform: translateY(100%);
        visibility: hidden;
        pointer-events: none;
        transition: transform 220ms ease;
    }

    .nav-mobile::before {
        content: "";
        align-self: center;
        width: 36px;
        height: 4px;
        margin: 0 auto 16px;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.14);
    }

    .nav-mobile.open {
        transform: translateY(0);
        visibility: visible;
        pointer-events: auto;
    }

    .nav-mobile .nav-link {
        display: block;
        min-height: 48px;
        padding: 14px 16px;
        border-radius: 10px;
        font-size: 15.2px;
        font-weight: 600;
    }
}

@media (prefers-reduced-motion: reduce) {
    .nav-mobile,
    .nav-overlay {
        transition: none;
    }
}

/* Shared action clusters */
.share-cluster {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.share-cluster .share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    white-space: nowrap;
}

/* Shared footer */
.site-footer {
    width: 100%;
    max-width: 1228px;
    margin: 132px auto 0;
    padding: 58px 24px 34px;
    border-top: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.6;
    text-align: left;
}

.footer-inner {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) 170px 190px;
    gap: 52px;
}

.footer-wordmark {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--text-primary) !important;
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.6;
    text-decoration: none;
}

.footer-wordmark img {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    object-fit: cover;
}

.footer-brand p {
    max-width: 410px;
    margin: 15px 0 0;
    color: var(--text-tertiary);
    font-size: 13.44px;
    line-height: 1.6;
}

.footer-column {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 9px;
}

.footer-label {
    margin-bottom: 5px;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 10.08px;
    font-weight: 500;
    letter-spacing: 0.12em;
    line-height: 1.6;
    text-transform: uppercase;
}

.footer-column a {
    color: var(--text-secondary);
    font-size: 13.12px;
    line-height: 1.6;
    text-decoration: none;
}

.footer-column a:hover {
    color: var(--text-primary);
}

.footer-column a.active {
    color: var(--accent);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 54px;
    padding-top: 22px;
    border-top: 1px solid var(--border-subtle);
    color: var(--text-tertiary);
    font-size: 11.2px;
    line-height: 1.6;
}

.footer-bottom p,
.footer-bottom .footer-disclaimer {
    max-width: none;
    margin: 0;
    color: inherit;
    font-size: inherit;
    line-height: inherit;
}

@media (max-width: 900px) {
    .footer-inner {
        grid-template-columns: 1fr 1fr;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .container,
    .wrap,
    .site-footer {
        padding-right: 20px;
        padding-left: 20px;
    }

    .site-footer {
        margin-top: 96px;
    }
}

@media (max-width: 640px) {
    .footer-inner {
        grid-template-columns: 1fr 1fr;
        gap: 40px 26px;
    }

    .footer-bottom {
        flex-direction: column;
    }
}

@media (max-width: 440px) {
    .container,
    .wrap,
    .site-footer {
        padding-right: 16px;
        padding-left: 16px;
    }

    .share-cluster.share-cluster {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .share-cluster > .share-label,
    .share-cluster > span:first-child {
        grid-column: 1 / -1;
    }

    .share-cluster .share-btn {
        width: 100%;
        min-height: 40px;
        padding: 8px 10px;
    }

    .footer-inner { grid-template-columns: 1fr 1fr; }
    .footer-brand { grid-column: 1 / -1; }
}
