/* Token Page styles. */

.token-page {
    width: 100%;
    min-width: 0;
}

h1,
h2,
h3 {
    font-family: Syne, sans-serif;
}

h1 {
    font-size: clamp(4.5rem, 9vw, 9rem);
    line-height: 0.8;
    letter-spacing: -0.075em;
    margin: 30px 0 36px;
}

h1 span {
    color: #fff;
}

.section {
    padding: 120px 7vw;
}

.section-inner {
    max-width: 1500px;
    margin: auto;
}

.section-head {
    display: grid;
    grid-template-columns: 1fr 0.75fr;
    gap: 8vw;
    align-items: end;
    margin-bottom: 55px;
}

.section-head h2 {
    font-size: clamp(3rem, 6vw, 6rem);
    line-height: 0.88;
    letter-spacing: -0.06em;
    margin: 0;
}

.section-head p {
    color: var(--muted);
    line-height: 1.75;
    margin: 0;
}

.section-kicker {
    color: var(--acid);
    font-size: 0.75rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.zel-reference-title {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: min(100%, 760px);
    max-width: 760px;
    margin: 0;
    font: 700 clamp(3.2rem, 7vw, 6.8rem) / 0.88 Syne,
        sans-serif;
    letter-spacing: -0.065em;
    text-transform: uppercase;
}

.zel-reference-title>span {
    display: block;
}

.zel-title-dark {
    color: #fff;
}

.zel-title-dark .title-accent {
    display: inline-block;
    color: transparent;
    background: none;
    -webkit-background-clip: initial;
    background-clip: initial;
    -webkit-text-fill-color: transparent;
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.82);
    text-shadow: none;
}

.zel-title-light {
    color: #111016;
}

.zel-title-light .title-accent {
    display: inline-block;
    color: transparent;
    background: linear-gradient(100deg, #7c4dff 0%, #a640ef 45%, #dd158a 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    -webkit-text-stroke: 0;
    text-shadow: none;
    padding-right: 0.09em;
    margin-right: -0.04em;
}

.section-head h2.zel-reference-title,
.zel-copy h1.zel-reference-title {
    width: min(100%, 760px);
    max-width: 760px;
    margin: 0;
    font: 700 clamp(3.2rem, 7vw, 6.8rem) / 0.88 Syne,
        sans-serif;
    letter-spacing: -0.065em;
    text-transform: uppercase;
}

/* Hero layout, action buttons and token artwork. */

.zelene-token {
    min-height: 850px;
    padding: 165px 7vw 80px;
    position: relative;
    overflow: hidden;
}

.token-page .zelene-token {
    display: block !important;
    width: 100%;
}

.zel-grid {
    max-width: 1500px;
    margin: auto;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 5vw;
    align-items: center;
    position: relative;
    z-index: 2;
}

.token-page .zel-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr) !important;
    gap: 5vw;
    align-items: center;
    width: 100%;
}

.zel-copy p {
    max-width: 660px;
    color: #c2bdc9;
    font-size: 1.08rem;
    line-height: 1.75;
}

.zel-copy h1 {
    line-height: 0.95;
}

.zel-copy strong {
    color: #fff;
}

.zel-copy h1.zel-reference-title {
    margin: 30px 0 36px;
}

.zel-copy h1.zel-reference-title .title-accent {
    color: transparent;
    -webkit-text-fill-color: transparent;
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.82);
}

.token-page .zel-copy,
.token-page .token-visual {
    min-width: 0;
}

.zel-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 34px;
}

.zel-actions-space {
    margin-top: 34px;
}

.primary,
.secondary {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 50px;
    padding: 0 22px;
    border-radius: 7px;
    font-weight: 700;
    transition: 0.25s;
}

.primary {
    background: var(--acid);
    color: #fff;
    box-shadow: 6px 6px 0 var(--violet);
}

.primary:hover {
    transform: translate(-2px, -2px);
    box-shadow: 8px 8px 0 var(--violet);
}

.primary.chain-hover {
    position: relative;
    background: linear-gradient(110deg, var(--acid) 0%, #c71cc2 55%, #ae24e8 100%);
    box-shadow: 0 0 0 var(--violet);
    transform: translate(0, 0);
    will-change: transform, box-shadow;
    transition: transform 0.28s cubic-bezier(0.2, 0.75, 0.2, 1),
        box-shadow 0.28s cubic-bezier(0.2, 0.75, 0.2, 1),
        filter 0.28s ease;
}

.primary.chain-hover:hover,
.primary.chain-hover:focus-visible {
    transform: translate(-4px, -4px);
    box-shadow: 11px 11px 0 var(--violet);
    filter: saturate(1.08) brightness(1.03);
}

.primary.chain-hover:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.88);
    outline-offset: 4px;
}

.primary.chain-hover:active {
    transform: translate(-1px, -1px);
    box-shadow: 5px 5px 0 var(--violet);
    transition-duration: 0.1s;
}

.secondary {
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.04);
}

.secondary:hover {
    border-color: var(--violet);
    background: rgba(124, 77, 255, 0.1);
}

.token-visual {
    min-height: 480px;
    display: grid;
    place-items: center;
    position: relative;
}

.token-page .token-visual {
    width: 100%;
    justify-self: stretch;
}

.token-orbit {
    position: absolute;
    width: min(34vw, 440px);
    aspect-ratio: 1;
    border: 1px solid rgba(124, 77, 255, 0.32);
    border-radius: 50%;
    animation: spin 24s linear infinite;
}

.token-orbit::before,
.token-orbit::after {
    content: "";
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--acid);
    box-shadow: 0 0 22px var(--acid);
}

.token-orbit::before {
    top: 11%;
    left: 16%;
}

.token-orbit::after {
    right: 4%;
    bottom: 27%;
    background: var(--violet);
    box-shadow: 0 0 22px var(--violet);
}

.token-page .token-disc {
    position: relative;
    z-index: 2;
    display: grid;
    place-items: center;
}

.token-page .token-disc img {
    display: block;
    width: min(400px, 100%);
    height: auto;
    max-width: 100%;
}

.token-page #start-token-section::before,
.token-page #start-token-section::after {
    background: none !important;
    background-image: none !important;
}

/* Utility cards for the planned ZEL features. */

.uses {
    background: #fff;
    color: #130d1e;
}

.uses .section-head p {
    color: #6f6877;
}

.use-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.use-card {
    min-height: 260px;
    padding: 28px;
    border: 1px solid rgba(13, 9, 24, 0.13);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: #fff;
    transition: 0.25s;
}

.use-card:hover {
    transform: translateY(-5px);
    box-shadow: 10px 10px 0 rgba(124, 77, 255, 0.16);
}

.use-number {
    font: 700 4rem Syne;
    color: rgba(124, 77, 255, 0.16);
}

.use-card h3 {
    font-size: 1.3rem;
    margin: 0 0 10px;
}

.use-card p {
    margin: 0;
    color: #6d6673;
    line-height: 1.6;
}

/* Token distribution and doughnut chart. */

.tokenomics {
    background: #09070f;
}

.allocation-layout {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 45px;
    align-items: center;
}

.donut-wrap {
    display: grid;
    place-items: center;
    position: relative;
}

.donut {
    width: min(430px, 76vw);
    aspect-ratio: 1;
    border-radius: 50%;
    background: conic-gradient(var(--acid) 0 15%,
            var(--violet) 15% 40%,
            #a46eff 40% 60%,
            #f062c0 60% 75%,
            #4f2d88 75% 85%,
            #67e8c2 85% 92.5%,
            #ff83c7 92.5% 97.5%,
            #6f6877 97.5% 100%);
    position: relative;
    box-shadow: 0 30px 90px rgba(124, 77, 255, 0.2);
}

.token-page .donut {
    position: relative;
    width: min(500px, 85vw);
    aspect-ratio: 1;
    display: block;
    background: conic-gradient(#dd158a 0% 25%,
            #7c4dff 25% 50%,
            #a46eff 50% 60%,
            #f062c0 60% 70%,
            #4f2d88 70% 85%,
            #67e8c2 85% 92%,
            #ff83c7 92% 97%,
            #6f6877 97% 100%);
}

/* Hide the placeholder once Chart.js has rendered the chart. */
.token-page .donut.is-chart-ready {
    background: transparent;
}

.token-page .donut.is-chart-ready::after {
    display: none;
}

.token-page .donut canvas {
    position: absolute;
    inset: 0;
    display: block;
    width: 100% !important;
    height: 100% !important;
}

.donut::after {
    content: "";
    position: absolute;
    inset: 22%;
    border-radius: 50%;
    background: #09070f;
    border: 1px solid var(--line);
}

.donut-center {
    position: absolute;
    z-index: 2;
    text-align: center;
}

.donut-center strong {
    display: block;
    font: 800 2.2rem Syne;
}

.donut-center span {
    color: var(--muted);
    font-size: 0.8rem;
}

.token-page .donut-center {
    pointer-events: none;
}

.allocation-list {
    display: grid;
    gap: 8px;
}

.allocation-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 16px;
    border: 1px solid var(--line);
    background: transparent;
}

.token-page .allocation-item {
    min-width: 0;
    transition: border-color 180ms ease, background-color 180ms ease;
}

/* Highlight the allocation selected in the chart or by keyboard. */
.token-page .allocation-item.is-active,
.token-page .allocation-item:hover,
.token-page .allocation-item:focus-within {
    border-color: rgba(255, 255, 255, .33);
    background: rgba(255, 255, 255, .05);
}

.swatch {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    background: var(--swatch-color);
}

.allocation-item b {
    font-family: Syne;
}

.allocation-item small {
    display: block;
    color: var(--muted);
    margin-top: 4px;
}

.token-page .allocation-info {
    min-width: 0;
}

.percent {
    font: 700 1.25rem Syne;
}

.token-page .allocation-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 13px;
    white-space: nowrap;
    direction: ltr;
}

.token-page .allocation-actions .percent {
    font-variant-numeric: tabular-nums;
    margin: 0;
}

/* Copy buttons and their success/error feedback. */
.token-page .allocation-copy {
    display: inline-grid;
    place-items: center;
    width: 37px;
    height: 37px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 8px;
    background: rgba(255, 255, 255, .045);
    color: #c8c3d2;
    padding: 0;
    cursor: pointer;
    transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.token-page .allocation-copy:hover,
.token-page .allocation-copy:focus-visible {
    border-color: #dd158a;
    background: rgba(221, 21, 138, .12);
    color: #ffffff;
}

.token-page .allocation-copy.is-copied {
    border-color: #67e8c2;
    color: #67e8c2;
}

.token-page .allocation-copy:disabled {
    opacity: .4;
    cursor: not-allowed;
}

.token-page .allocation-copy:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

.token-page .allocation-wallet-note {
    margin: 12px 0 0;
    color: #aaa5b3;
    font-size: .76rem;
    line-height: 1.6;
}

.token-page .allocation-copy-feedback {
    margin: 0;
    min-height: 1.2em;
    color: #67e8c2;
    font-size: .8rem;
}

/* Multisig and security information. */

.wallets {
    background: linear-gradient(145deg, rgba(124, 77, 255, 0.08), transparent 45%), var(--ink);
}

.security-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 28px;
}

.security-card {
    padding: 26px;
    border: 1px solid var(--line);
    background: transparent !important;
    min-height: 205px;
}

.security-card:hover {
    border-color: #dd158a;
    background: rgba(255, 255, 255, .05);
}

.security-card strong {
    display: block;
    margin-bottom: 12px;
    font: 700 1.15rem Syne;
}

.security-card p {
    margin: 0;
    color: #aaa5b3;
    line-height: 1.65;
}

.security-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 7px 10px;
    border-radius: 999px;
    color: var(--acid);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.multisig-kicker {
    display: block;
    margin-bottom: 18px !important;
}

/* Vesting milestones and their connecting line. */

.vesting {
    background: #fff;
    color: #130d1e;
}

.timeline {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    position: relative;
}

.timeline::before {
    content: "";
    position: absolute;
    top: 19px;
    left: 4%;
    right: 4%;
    height: 1px;
    background: rgba(13, 9, 24, 0.2);
}

.milestone {
    position: relative;
    padding: 55px 24px 10px 0;
}

.milestone::before {
    content: "";
    position: absolute;
    top: 12px;
    left: 0;
    width: 14px;
    height: 14px;
    border: 6px solid var(--paper);
    border-radius: 50%;
    background: var(--violet);
    box-shadow: 0 0 0 1px rgba(13, 9, 24, 0.2);
}

.milestone small {
    color: #766e7d;
}

.milestone h3 {
    margin: 9px 0;
    font-size: 1.25rem;
}

.milestone p {
    margin: 0;
    color: #6d6673;
    line-height: 1.6;
}

.zel-actions-flex {
    display: flex;
    justify-content: flex-end;
}

/* Arabic text reads right to left without reversing the overall layout. */

html[dir="rtl"] .token-page {
    direction: ltr;
}

html[dir="rtl"] .token-page .zel-grid,
html[dir="rtl"] .token-page .section-head,
html[dir="rtl"] .token-page .use-grid,
html[dir="rtl"] .token-page .allocation-layout,
html[dir="rtl"] .token-page .allocation-list,
html[dir="rtl"] .token-page .allocation-item,
html[dir="rtl"] .token-page .security-grid,
html[dir="rtl"] .token-page .timeline,
html[dir="rtl"] .token-page .zel-actions {
    direction: ltr;
}

html[dir="rtl"] .token-page .zel-copy p,
html[dir="rtl"] .token-page .zel-reference-title>span,
html[dir="rtl"] .token-page .section-head p,
html[dir="rtl"] .token-page .section-kicker,
html[dir="rtl"] .token-page .use-card h3,
html[dir="rtl"] .token-page .use-card p,
html[dir="rtl"] .token-page .allocation-item b,
html[dir="rtl"] .token-page .allocation-item small,
html[dir="rtl"] .token-page .security-badge,
html[dir="rtl"] .token-page .security-card strong,
html[dir="rtl"] .token-page .security-card p,
html[dir="rtl"] .token-page .milestone small,
html[dir="rtl"] .token-page .milestone h3,
html[dir="rtl"] .token-page .milestone p,
html[dir="rtl"] .token-page .zel-actions a {
    direction: rtl;
    unicode-bidi: plaintext;
}

html[dir="rtl"] .token-page .zel-copy p,
html[dir="rtl"] .token-page .section-head p,
html[dir="rtl"] .token-page .use-card h3,
html[dir="rtl"] .token-page .use-card p,
html[dir="rtl"] .token-page .allocation-item>div,
html[dir="rtl"] .token-page .security-card,
html[dir="rtl"] .token-page .milestone {
    text-align: right;
}

html[dir="rtl"] .token-page .zel-reference-title {
    direction: ltr;
    align-items: flex-start;
    text-align: left;
}

html[dir="rtl"] .token-page .percent,
html[dir="rtl"] .token-page code {
    direction: ltr;
    unicode-bidi: isolate;
    text-align: left;
}

html[dir="rtl"] .token-page .zel-actions {
    flex-direction: row;
}

/* Orbit rotation around the token artwork. */

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive rules: larger breakpoints first, narrower screens last. */

@media (max-width: 1100px) {
    .zel-grid {
        grid-template-columns: 1fr 0.7fr;
    }

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

    .token-page .zel-grid {
        grid-template-columns: minmax(0, 1fr) minmax(280px, 0.7fr) !important;
        gap: 4vw;
    }
}

@media (max-width: 900px) {
    .zelene-token {
        padding-top: 130px;
    }

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

    .token-visual {
        min-height: 330px;
    }

    .token-orbit {
        width: 310px;
    }

    .token-disc {
        width: 230px;
    }

    .allocation-layout {
        grid-template-columns: 1fr;
    }

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

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

    .timeline::before {
        display: none;
    }

    .milestone {
        padding-top: 42px;
    }

    .section-head {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .token-page .zel-grid {
        grid-template-columns: 1fr !important;
    }

    html[dir="rtl"] .token-page .zel-grid {
        direction: ltr;
    }
}

@media (max-width: 820px) {

    .zel-reference-title,
    .section-head h2.zel-reference-title,
    .zel-copy h1.zel-reference-title {
        width: 100%;
        max-width: 100%;
        font-size: clamp(3.2rem, 12vw, 5.2rem);
    }
}

@media (max-width: 560px) {
    h1 {
        font-size: 4.1rem;
    }

    .zelene-token {
        min-height: auto;
    }

    .token-visual {
        min-height: 285px;
    }

    .token-orbit {
        width: 245px;
    }

    .token-disc {
        width: 185px;
    }

    .use-grid,
    .timeline {
        grid-template-columns: 1fr;
    }

    .section {
        padding: 90px 20px;
    }

    .zelene-token {
        padding-inline: 20px;
    }

    .allocation-item {
        grid-template-columns: auto 1fr;
    }

    .percent {
        grid-column: 2;
    }

    .zel-reference-title,
    .section-head h2.zel-reference-title,
    .zel-copy h1.zel-reference-title {
        font-size: clamp(2.7rem, 13.5vw, 4.25rem);
        line-height: 0.88;
    }

    .zel-title-dark .title-accent {
        -webkit-text-stroke-width: 1px;
    }

    .zel-title-light .title-accent {
        padding-right: 0.12em;
        margin-right: 0;
    }

    .token-page .zel-actions {
        width: 100%;
    }

    .token-page .zel-actions .primary,
    .token-page .zel-actions .secondary {
        flex: 1 1 auto;
    }

    html[dir="rtl"] .token-page .zel-actions {
        direction: ltr;
    }

    .token-page .allocation-item {
        grid-template-columns: 12px minmax(0, 1fr) auto;
        gap: 10px;
        padding: 13px;
    }

    .token-page .allocation-actions {
        grid-column: auto;
        gap: 6px;
    }

    .token-page .allocation-actions .percent {
        grid-column: auto;
        font-size: 1rem;
    }

    /* Copy buttons and their success/error feedback. */
    .token-page .allocation-copy {
        width: 32px;
        height: 32px;
    }

    .token-page #vesting .section-head {
        grid-template-columns: minmax(0, 1fr);
    }

    .token-page #vesting .section-head>div {
        min-width: 0;
    }

    .token-page #vesting h2.zel-reference-title {
        width: 100%;
        max-width: 100%;
        font-size: clamp(1.75rem, 8.5vw, 3.1rem);
        line-height: 0.95;
    }

    .token-page #vesting h2.zel-reference-title>span {
        max-width: 100%;
        white-space: normal;
        overflow-wrap: anywhere;
    }
}

@media (max-width: 390px) {
    .token-page .allocation-item {
        grid-template-columns: 12px minmax(0, 1fr);
    }

    .token-page .allocation-actions {
        grid-column: 2;
        justify-self: end;
    }
}

/* Stop optional motion for visitors who prefer a calmer interface. */

@media (prefers-reduced-motion: reduce) {
    .primary.chain-hover {
        transition: none;
    }

    .token-page .allocation-item,
    /* Copy buttons and their success/error feedback. */
    .token-page .allocation-copy {
        transition: none;
    }
}



/* Responsive: Vesting y vestings */
@media (max-width: 560px) {

    .token-page #vesting .section-head {
        grid-template-columns: minmax(0, 1fr);
    }

    .token-page #vesting .section-head>div {
        min-width: 0;
    }

    .token-page #vesting h2.zel-reference-title {
        width: 100%;
        max-width: 100%;
        font-size: clamp(1.75rem, 8.5vw, 3.1rem);
        line-height: 0.95;
    }

    .token-page #vesting h2.zel-reference-title>span {
        max-width: 100%;
        white-space: normal;
        overflow-wrap: anywhere;
    }
}