@font-face {
    font-family: 'Headline';
    src: local('Impact'), local('Haettenschweiler'), local('Arial Narrow Bold'), local('Roboto Condensed Bold');
    font-weight: 800;
    font-display: swap;
}

:root {
    color-scheme: light;
    --paper: #f3e9dc;
    --paper-light: #fcf4e8;
    --ink: #2e241e;
    --muted: #68574a;
    --copper: #8c4b30;
    --clay: #ead0b5;
    --rule: #cdb9a6;
    --focus: #844028;
    --body-font: Arial, Helvetica, sans-serif;
    --display-font: Headline, 'Arial Narrow', 'Roboto Condensed', 'Arial Black', Arial, sans-serif;
    --label-font: 'Courier New', Courier, monospace;
    --gutter: clamp(1rem, 5.15vw, 4.5rem);
}

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

html.modal-open { overflow: hidden; padding-right: var(--scrollbar-width, 0px); }

body {
    margin: 0;
    min-width: 0;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    background: var(--paper);
    color: var(--ink);
    font: 1rem/1.45 var(--body-font);
    padding-inline: env(safe-area-inset-left) env(safe-area-inset-right);
    padding-top: env(safe-area-inset-top);
}

button, input { font: inherit; }
button { color: inherit; }
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:not(:disabled), a[href] { cursor: pointer; }
[hidden] { display: none !important; }

:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 4px;
}

.shell {
    width: calc(100% - 2 * var(--gutter));
    max-width: 1280px;
    margin-inline: auto;
}

.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .5rem;
    min-height: 72px;
    border-bottom: 1px solid var(--rule);
}

.brand, .header-nav, .header-socials, .footer-socials {
    display: flex;
    align-items: center;
}

.brand {
    gap: .65rem;
    padding-block: 4px;
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: 900;
    letter-spacing: -.04em;
}

.brand img {
    display: block;
    border-radius: 6px;
    border: 1px solid #9c765b;
}

.header-nav { gap: clamp(.125rem, 1vw, .85rem); }

.nav-button, .icon-link {
    display: inline-grid;
    place-items: center;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    border: 0;
    border-radius: 3px;
    background: transparent;
    color: var(--ink);
    text-decoration: none;
    transition: color .16s ease, background-color .16s ease, transform .16s ease;
}

.nav-button {
    padding-inline: .45rem;
    font-size: .8125rem;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.header-socials {
    border-left: 1px solid var(--rule);
    padding-left: clamp(.1rem, .8vw, .7rem);
}

.icon {
    display: block;
    width: 20px;
    height: 20px;
    flex: none;
    background: var(--icon) no-repeat center / contain;
}

.icon-x { --icon: url('assets/icons/x.svg'); }
.icon-telegram { --icon: url('assets/icons/telegram.svg'); }
.icon-pumpfun { --icon: url('assets/icons/pumpfun.svg'); }
.icon-dexscreener { --icon: url('assets/icons/dexscreener.svg'); }

.landing {
    display: grid;
    grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
    grid-template-areas: 'intro portrait' 'actions portrait' 'polish contract';
    reading-flow: grid-rows;
    column-gap: clamp(1.5rem, 4vw, 4rem);
    margin-top: auto;
}

.intro {
    grid-area: intro;
    position: relative;
    z-index: 1;
    align-self: end;
    padding-top: clamp(2.25rem, 5vh, 4.25rem);
}

.intro h1 {
    margin: 0 0 clamp(1.125rem, 2.9vh, 2rem) -.035em;
    font: 800 clamp(4.4rem, 8.45vw, 8.05rem)/.885 var(--display-font);
    letter-spacing: -.022em;
    text-transform: uppercase;
}

.intro h1 span {
    display: block;
    white-space: nowrap;
    transform: scaleX(var(--headline-scale, 1));
    transform-origin: left center;
}
.intro h1 span + span { color: var(--copper); }

.ticker {
    display: inline-block;
    border: 1px solid #a57358;
    border-radius: 3px;
    padding: .32rem .62rem .26rem;
    color: var(--copper);
    font: 700 .875rem/1.2 var(--label-font);
    letter-spacing: .08em;
}

.slogan {
    margin: clamp(.75rem, 2.25vh, 1.35rem) 0 .19rem;
    font-size: clamp(1.3rem, 2.33vw, 2rem);
    line-height: 1.13;
    font-weight: 800;
    letter-spacing: -.044em;
}

.tagline {
    margin: .35rem 0 0;
    color: var(--muted);
    font-size: clamp(1rem, 1.55vw, 1.25rem);
}

.hero-actions {
    grid-area: actions;
    position: relative;
    z-index: 1;
    align-self: start;
    display: flex;
    flex-wrap: wrap;
    gap: .65rem;
    margin: clamp(1.15rem, 3vh, 1.75rem) 0 clamp(2rem, 5vh, 4rem);
}

.buy-note {
    position: absolute;
    bottom: calc(100% + .45rem);
    left: 0;
    margin: 0;
    padding: .3rem .55rem;
    border: 1px solid var(--rule);
    border-radius: 4px;
    color: var(--muted);
    background: var(--paper-light);
    font-size: .875rem;
}

.buy-note:empty { border: 0; padding: 0; }

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5em;
    min-height: 49px;
    padding: .7rem clamp(.85rem, 2vw, 1.6rem);
    border: 1px solid transparent;
    border-radius: 4px;
    text-decoration: none;
    font-size: .875rem;
    font-weight: 800;
    letter-spacing: .04em;
    line-height: 1.15;
    text-align: center;
    text-transform: uppercase;
    transition: transform .15s ease, background-color .16s ease, color .16s ease, border-color .16s ease;
}

.button svg { flex: none; }
.button:active:not(:disabled):not([aria-disabled='true']) { transform: translateY(2px); }
.button-primary { background: var(--ink); color: var(--paper-light); }
.button-primary[aria-disabled='true'] { background: #5b4b3f; color: #fff1df; }
.button-outline { border-color: #aa907a; background: transparent; color: var(--ink); }

.portrait {
    grid-area: portrait;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    margin: 0;
    min-height: clamp(27rem, 62vh, 37rem);
    mask-image: linear-gradient(180deg, transparent, #000 40px);
}

.portrait-stage {
    position: absolute;
    width: min(100%, 650px);
    aspect-ratio: 1;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
}

.master-art {
    display: block;
    width: 100%;
    height: auto;
    mask-image: radial-gradient(ellipse 73% 73% at 50% 54%, #000 61%, transparent 98%),
                linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent),
                linear-gradient(180deg, #000 0% 87%, transparent 100%);
    mask-composite: intersect, intersect;
}

.shine-art {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    mix-blend-mode: screen;
}

#spot-target {
    fill: transparent;
    stroke: transparent;
    stroke-width: 2;
    vector-effect: non-scaling-stroke;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    pointer-events: fill;
    touch-action: manipulation;
    cursor: pointer;
}

#spot-target:focus-visible {
    stroke: #fff8e7;
    stroke-dasharray: 4 4;
}

#spot-gloss-layer {
    opacity: var(--spot-shine, 0);
    transition: opacity .32s ease;
}

#polish-sweep, #polish-sparkles, #final-sparkles { opacity: 0; }

.polish-panel, .contract-panel {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(.65rem, 2vw, 1.5rem);
    min-height: 100px;
    border: 1px solid var(--rule);
    border-radius: 6px;
    padding: .9rem clamp(.85rem, 1.8vw, 1.35rem);
}

.polish-panel { grid-area: polish; background: #eee0cf; }
.contract-panel { grid-area: contract; background: #f7eee3; }

.button-polish {
    min-width: min(16.2rem, 100%);
    padding-inline: clamp(.65rem, 1.1vw, .95rem);
    background: var(--clay);
    border-color: #b77d58;
    color: #4d291d;
    white-space: nowrap;
}

.shine-meter, .contract-details { min-width: 0; flex: 1; }

.shine-meter label, .contract-details label {
    display: block;
    font: 700 .875rem/1.2 var(--label-font);
    letter-spacing: .035em;
    text-transform: uppercase;
}

.shine-meter label { white-space: nowrap; }

.shine-meter progress {
    appearance: none;
    display: block;
    width: 100%;
    height: 7px;
    margin: .37rem 0 .32rem;
    border: 0;
    background: #d5bea9;
    color: var(--copper);
    mask-image: repeating-linear-gradient(90deg, #000 0 calc(10% - 2px), transparent calc(10% - 2px) 10%);
}

.shine-meter progress::-webkit-progress-bar { background: #d5bea9; }
.shine-meter progress::-webkit-progress-value { background: var(--copper); transition: width .23s ease; }
.shine-meter progress::-moz-progress-bar { background: var(--copper); }

#shine-message {
    margin: 0;
    min-height: 1.4em;
    color: var(--muted);
    font-size: .875rem;
    line-height: 1.28;
}

.complete #shine-message { font-weight: 900; color: #73371f; }

.contract-value {
    display: block;
    width: 100%;
    min-width: 0;
    margin-top: .35rem;
    padding: .22rem 0;
    background: transparent;
    color: var(--muted);
    border: 0;
    border-radius: 2px;
    font: 400 .875rem/1.3 var(--label-font);
    text-overflow: ellipsis;
}

.contract-value:focus { text-overflow: clip; }
.contract-value:disabled { opacity: 1; }
.contract-value::placeholder { color: var(--muted); opacity: 1; }
.copy-status { display: block; color: var(--muted); font-size: .8125rem; }

.button-copy {
    padding-inline: .7rem;
    min-width: 100px;
    min-height: 44px;
    color: var(--ink);
    border-color: var(--rule);
    background: transparent;
    font-size: .8125rem;
}

.button-copy:disabled { color: var(--muted); }
.button-copy.copied { background: var(--clay); border-color: #b77d58; }

.site-footer {
    min-height: 68px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-areas: 'copy disclaimer socials';
    align-items: center;
    gap: .75rem;
    margin-top: auto;
    padding-block: .55rem calc(.55rem + env(safe-area-inset-bottom));
    color: var(--muted);
    font-size: .8125rem;
}

.site-footer:has(.footer-socials[hidden]) {
    grid-template-columns: 1fr auto;
    grid-template-areas: 'copy disclaimer';
}

.site-footer p { margin: 0; }
.footer-copy { grid-area: copy; display: flex; align-items: baseline; flex-wrap: wrap; gap: .3rem .9rem; }
.copyright { color: var(--ink); font-weight: 800; text-transform: uppercase; letter-spacing: .035em; }
.disclaimer { grid-area: disclaimer; justify-self: center; }
.footer-socials { grid-area: socials; justify-self: end; }

.modal {
    width: min(35rem, calc(100% - 2rem));
    max-width: none;
    max-height: none;
    margin: auto;
    padding: 0;
    overflow: visible;
    border: 0;
    background: transparent;
    color: var(--ink);
}

.modal-chart { width: min(68rem, calc(100% - 2rem)); }

.modal::backdrop {
    background: rgb(41 28 20 / 54%);
    opacity: 0;
    transition: opacity .18s ease;
}

.modal-panel {
    position: relative;
    max-height: calc(100vh - 2rem);
    max-height: calc(100dvh - 2rem);
    overflow: auto;
    overscroll-behavior: contain;
    padding: clamp(1.15rem, 4vw, 2.25rem);
    border: 1px solid #aa8e76;
    border-radius: 9px;
    background: var(--paper-light);
    box-shadow: 0 16px 50px rgb(38 23 14 / 24%);
    opacity: 0;
    transform: translateY(9px);
    transition: opacity .18s ease, transform .18s ease;
}

.modal.is-visible::backdrop { opacity: 1; }
.modal.is-visible .modal-panel { opacity: 1; transform: translateY(0); }

.modal-close {
    position: absolute;
    top: .7rem;
    right: .7rem;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--rule);
    border-radius: 4px;
    background: transparent;
}

.modal h2 {
    margin: 0 46px .8rem 0;
    font: 800 clamp(2.05rem, 5vw, 2.8rem)/1 var(--display-font);
    letter-spacing: -.012em;
    text-transform: uppercase;
    text-wrap: balance;
}

.about-copy { color: var(--muted); }
.about-copy p { margin: .7rem 0; }
.about-copy strong { color: var(--ink); }

.character-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin: 1.3rem 0 0;
    border: 1px solid var(--rule);
    border-radius: 4px;
    background: #f1e3d2;
}

.character-stats div { padding: .75rem .9rem; }
.character-stats div:nth-child(even) { border-left: 1px solid var(--rule); }
.character-stats div:nth-child(n+3) { border-top: 1px solid var(--rule); }
.character-stats dt { font: 700 .8125rem/1.2 var(--label-font); text-transform: uppercase; }
.character-stats dd { margin: .2rem 0 0; color: var(--copper); font-size: 1.4rem; font-weight: 900; }

#chart-subtitle { margin: -.35rem 0 1rem; color: var(--muted); }

.chart-slot {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 112px;
    overflow: hidden;
    margin-bottom: 1rem;
    border: 1px solid var(--rule);
    border-radius: 4px;
    background: #efe0cd;
    color: var(--muted);
}

.chart-slot:has(iframe) { height: clamp(270px, calc(100dvh - 15rem), 650px); }
.chart-slot p { margin: .75rem; }
.chart-slot iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.chart-slot iframe.is-loading { visibility: hidden; }
.chart-external { min-height: 44px; }
.chart-external .icon { width: 17px; height: 17px; }

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

@media (hover: hover) {
    .nav-button:hover, .icon-link[href]:hover { color: var(--copper); background-color: #eadecf; }
    .icon-link[href]:hover { transform: translateY(-2px); }
    .button-primary[href]:hover { background-color: #50372a; }
    .button-outline:hover, .button-copy:not(:disabled):hover, .modal-close:hover { background-color: #eadac7; border-color: #9c7a61; }
    .button-polish:hover { background-color: #e4bd99; }
}

@media (min-width: 851px) and (max-height: 810px) {
    .site-header { min-height: 62px; }
    .portrait { min-height: 520px; }
    .portrait-stage { width: min(100%, 560px); }
    .intro { padding-top: 1.75rem; }
    .intro h1 { font-size: clamp(4.4rem, 7.85vw, 7.25rem); }
    .hero-actions { margin-bottom: 2rem; }
    .site-footer { min-height: 59px; }
}

@media (min-width: 851px) and (max-width: 1050px) {
    .landing { column-gap: 1.25rem; }
    .polish-panel, .contract-panel { padding-inline: .75rem; }
    .button-polish { font-size: .8125rem; }
    .button-polish svg { width: 17px; height: 17px; }
}

@media (max-width: 850px) {
    :root { --gutter: clamp(1rem, 5vw, 2.75rem); }
    .site-header { min-height: 63px; }

    .landing {
        max-width: 560px;
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: 'intro' 'portrait' 'polish' 'contract' 'actions';
        row-gap: .75rem;
        margin-top: 0;
    }

    .intro { padding-top: 2rem; text-align: center; }
    .intro h1 { font-size: clamp(4.1rem, 13.4vw, 7.7rem); margin: 0 0 .9rem; }
    .intro h1 span { transform-origin: center; }
    .slogan { margin-top: .85rem; font-size: clamp(1.25rem, 4.5vw, 1.9rem); }
    .tagline { margin-top: .2rem; font-size: 1rem; }

    .portrait {
        width: calc(100% + 2 * var(--gutter));
        max-width: 540px;
        justify-self: center;
        aspect-ratio: 1 / .91;
        min-height: 0;
        margin-top: -.28rem;
        margin-bottom: -.42rem;
        mask-image: linear-gradient(180deg, transparent, #000 19px);
    }

    .polish-panel, .contract-panel { min-height: 86px; }
    .hero-actions { display: grid; grid-template-columns: 1fr 1fr; margin: .05rem 0 0; }

    .site-footer {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: 'socials' 'copy' 'disclaimer';
        justify-items: center;
        gap: .25rem;
        margin-top: 0;
        padding-block: .6rem calc(1.25rem + env(safe-area-inset-bottom));
        text-align: center;
    }

    .site-footer:has(.footer-socials[hidden]) {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: 'copy' 'disclaimer';
    }

    .footer-socials { justify-self: center; }
    .footer-copy { justify-content: center; }
}

@media (max-width: 600px), (min-width: 851px) and (max-width: 1175px) {
    .polish-panel { flex-direction: column; align-items: stretch; gap: .65rem; }
    .button-polish { min-width: 0; }

    .shine-meter {
        display: grid;
        grid-template-columns: max-content minmax(0, 1fr);
        align-items: center;
        column-gap: .65rem;
    }

    .shine-meter progress { grid-row: 2; grid-column: 1 / -1; margin: .42rem 0 .1rem; }
    #shine-message { min-height: 0; justify-self: end; text-align: right; }
}

@media (max-width: 540px) {
    .brand { gap: .4rem; font-size: .95rem; }
    .brand img { width: 32px; height: 32px; }
    .header-nav { gap: 0; }
    .nav-button { padding-inline: .3rem; font-size: .75rem; }
}

@media (max-width: 380px) {
    .brand { gap: .32rem; font-size: .875rem; }
    .brand img { width: 30px; height: 30px; }
    .header-socials { padding-left: 0; }
    .header-socials .icon-link { min-width: 39px; }
    .nav-button { min-width: 42px; padding-inline: .1rem; font-size: .6875rem; }
    .intro { padding-top: 1.65rem; }
    .intro h1 { font-size: clamp(3.7rem, 15.5vw, 4.1rem); }
    .slogan { font-size: 1.1875rem; }
    .polish-panel, .contract-panel { padding-inline: .65rem; }
    .shine-meter label, #shine-message { font-size: .8125rem; }
    .button-copy { min-width: 87px; }
    .hero-actions .button { padding-inline: .5rem; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; }
    .button:active, .icon-link[href]:hover { transform: none !important; }
}

@media (forced-colors: active) {
    .button { border-color: ButtonText; }
    .shine-meter progress { appearance: auto; mask: none; }
    #spot-target:focus-visible { stroke: CanvasText; }
}
