/*
 * CircleZone public front page.
 * Same identity as the web app and admin panel: Nile blue, ink, pale Nile, and gold ONLY for collateral.
 * One memorable element: the ring (hero background, collateral gauge, closing band).
 */

:root {
    --ink: #0a2533;
    --ink-2: #123a50;
    --nile: #0b6e8a;
    --nile-deep: #08566d;
    --nile-soft: #6fbfd2;
    --nile-bright: #38b6d6;
    --mist: #e3f1f5;
    --gold: #e0a526;
    --gold-ring: #a87508;

    --page: #f5f9fa;
    --surface: #ffffff;
    --line: #d5e0e5;
    --text: #0a2533;
    --muted: #506975;
    --link: #0b6e8a;
    --warn: #8a4b06;
    --warn-bg: #fef3dc;
    --ok: #137f5c;
    --bad: #b8324a;

    --radius: 16px;
    --display: 'Reem Kufi', 'IBM Plex Sans Arabic', sans-serif;
    --body: 'IBM Plex Sans Arabic', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
    --maxw: 1120px;
    --gutter: clamp(16px, 4vw, 32px);

    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root {
        --page: #081821;
        --surface: #12202b;
        --line: #24384a;
        --text: #e6f1f5;
        --muted: #97afbb;
        --mist: #0f2a38;
        --link: #6fbfd2;
        --warn: #f2c46b;
        --warn-bg: #2c2410;
        color-scheme: dark;
    }
}

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

html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--page);
    color: var(--text);
    font: 400 1.0625rem/1.75 var(--body);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--link); }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 700; line-height: 1.3; text-wrap: balance; word-spacing: .14em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
bdi { unicode-bidi: isolate; }

:focus-visible { outline: 2px solid var(--nile-bright); outline-offset: 3px; border-radius: 6px; }

.skip {
    position: absolute; inset-inline-start: 12px; top: -60px; z-index: 50;
    background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px;
}
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }

/* ------------------------------------------------------------------ buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    min-height: 52px; padding: 0 26px; border-radius: 14px; border: 1.5px solid transparent;
    font: 600 1.0625rem/1 var(--body); text-decoration: none; cursor: pointer;
    transition: transform .15s ease, background-color .15s ease, border-color .15s ease;
}
.btn svg { width: 20px; height: 20px; fill: currentColor; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--nile); color: #fff; box-shadow: 0 8px 22px -10px rgba(11, 110, 138, .8); }
.btn-primary:hover { background: var(--nile-deep); }
.btn-ghost { border-color: var(--line); color: var(--text); background: var(--surface); }
.btn-ghost:hover { border-color: var(--nile); }
.btn-ghost-light { border-color: rgba(255, 255, 255, .35); color: #fff; }
.btn-ghost-light:hover { border-color: #fff; }
.btn-light { background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .25); }
.btn-light:hover { background: rgba(255, 255, 255, .22); }
.btn-small { min-height: 44px; padding: 0 20px; font-size: 1rem; }

.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.cta-center { justify-content: center; }
.hint { margin-top: 16px; font-size: .9375rem; color: var(--muted); }

/* ------------------------------------------------------------------ header */
.top {
    position: sticky; top: 0; z-index: 30;
    background: rgba(10, 37, 51, .92);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.top-in { display: flex; align-items: center; gap: 20px; min-height: 68px; }
.lockup { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font: 700 1.375rem/1 var(--display); }
.links { display: none; margin-inline: auto; gap: 4px; }
.links a { color: #cfe3ea; text-decoration: none; padding: 10px 14px; border-radius: 10px; font-weight: 500; font-size: 1rem; }
.links a:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.top .btn { margin-inline-start: auto; }
@media (min-width: 900px) {
    .links { display: flex; }
    .top .btn { margin-inline-start: 0; }
}

/* ------------------------------------------------------------------ hero */
.hero {
    position: relative; overflow: hidden; isolation: isolate;
    background: radial-gradient(120% 90% at 85% 0%, var(--ink-2) 0%, var(--ink) 62%);
    color: #fff;
    padding-block: clamp(40px, 8vw, 88px) clamp(56px, 9vw, 104px);
}
.rings { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.rings i {
    position: absolute; border-radius: 50%; border: 1.5px solid rgba(111, 191, 210, .16);
    inset-inline-start: -14%; top: 50%; translate: 0 -50%;
}
.rings i:nth-child(1) { width: 520px; height: 520px; }
.rings i:nth-child(2) { width: 820px; height: 820px; border-color: rgba(111, 191, 210, .1); inset-inline-start: -30%; }
.rings i:nth-child(3) { width: 1120px; height: 1120px; border-color: rgba(111, 191, 210, .06); inset-inline-start: -46%; }

.hero-in { display: grid; gap: 40px; align-items: center; }
@media (min-width: 960px) { .hero-in { grid-template-columns: 1.1fr .9fr; gap: 56px; } }

.eyebrow {
    display: inline-block; margin-bottom: 14px; padding: 4px 14px; border-radius: 999px;
    background: var(--mist); color: var(--nile);
    font-size: .9375rem; font-weight: 600;
}
.hero .eyebrow { background: rgba(56, 182, 214, .14); color: var(--nile-soft); }
.block-mist .eyebrow { background: var(--surface); }
.hero h1 { font-size: clamp(2rem, 5.6vw, 3.4rem); letter-spacing: 0; line-height: 1.28; }
.lead { margin-top: 18px; max-width: 34em; font-size: 1.1875rem; line-height: 1.85; color: #cfe3ea; }
.hero .hint { color: #9db8c4; }

.notice {
    margin-top: 22px; padding: 12px 16px; border-radius: 12px;
    background: var(--warn-bg); color: var(--warn); font-weight: 500; font-size: 1rem;
}

/* the offers card: a faithful picture of the product */
.demo {
    margin: 0; padding: 16px; border-radius: 22px;
    background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12);
    box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .6);
}
.demo-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 6px 14px; }
.demo-title { display: inline-flex; align-items: center; gap: 10px; font: 700 1.25rem/1 var(--display); }
.demo-tag { font-size: .875rem; color: #cfe3ea; border: 1px dashed rgba(255, 255, 255, .35); border-radius: 999px; padding: 3px 12px; }
.dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; }
.dot-buy { background: #3fcf8e; }
.dot-sell { background: #ef6b6b; }

.offer {
    margin-top: 10px; padding: 14px 16px; border-radius: 14px;
    background: rgba(10, 37, 51, .55); border-inline-start: 4px solid var(--nile-soft);
}
.offer.is-best { border-inline-start-color: var(--nile-bright); background: rgba(56, 182, 214, .12); }
.offer-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 1.0625rem; }
.badge { padding: 2px 12px; border-radius: 999px; background: var(--nile-bright); color: var(--ink); font-size: .875rem; font-weight: 700; }
.offer-price { margin-top: 6px; font: 700 1.75rem/1.3 var(--display); }
.offer-price small { font: 500 .9375rem/1 var(--body); color: #b9d2dc; }
.offer-meta { display: grid; gap: 4px; margin-top: 10px; font-size: .9375rem; color: #cfe3ea; }
.offer-meta li { display: flex; align-items: center; gap: 8px; }
.offer-meta svg { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--nile-soft); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.demo figcaption { margin-top: 14px; padding-inline: 6px; font-size: .9375rem; color: #9db8c4; }

/* ------------------------------------------------------------------ trust strip */
.trust { background: var(--surface); border-bottom: 1px solid var(--line); }
.trust-in { display: grid; gap: 4px 28px; padding-block: 22px; }
@media (min-width: 640px) { .trust-in { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .trust-in { grid-template-columns: repeat(4, 1fr); } }
.fact { display: flex; align-items: center; gap: 14px; padding: 10px 0; }
.fact svg { width: 32px; height: 32px; flex: none; fill: none; stroke: var(--nile); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.fact svg .gold { fill: var(--gold); stroke: none; }
.fact strong { display: block; font-weight: 700; font-size: 1.0625rem; line-height: 1.5; }
.fact span { display: block; font-size: .9375rem; color: var(--muted); line-height: 1.5; }

/* ------------------------------------------------------------------ sections */
.block { padding-block: clamp(56px, 8vw, 96px); }
.head { margin-bottom: clamp(28px, 5vw, 48px); }
.block h2 { font-size: clamp(1.625rem, 3.6vw, 2.375rem); }

/* steps */
.flows { display: grid; gap: 20px; }
@media (min-width: 860px) { .flows { grid-template-columns: 1fr 1fr; gap: 28px; } }
.flow { padding: clamp(22px, 4vw, 34px); border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.flow h3 { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; font-size: 1.5rem; }
.flow-buy { border-top: 4px solid #3fcf8e; }
.flow-sell { border-top: 4px solid #ef6b6b; }
.steps { counter-reset: s; display: grid; gap: 20px; }
.steps li { counter-increment: s; position: relative; padding-inline-start: 52px; }
.steps li::before {
    content: counter(s); position: absolute; inset-inline-start: 0; top: 0;
    width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
    background: var(--mist); color: var(--nile); font: 700 1.125rem/1 var(--display);
}
.steps b { display: block; font-weight: 700; font-size: 1.0625rem; line-height: 1.6; }
.steps span { display: block; margin-top: 2px; color: var(--muted); font-size: 1rem; line-height: 1.7; }

/* collateral */
.block-dark { background: var(--ink); color: #fff; position: relative; overflow: hidden; }
.block-dark .eyebrow { background: rgba(224, 165, 38, .16); color: var(--gold); }
.collateral { display: grid; gap: 44px; align-items: center; }
@media (min-width: 900px) { .collateral { grid-template-columns: 1.2fr .8fr; gap: 64px; } }
.collateral .lead { color: #cfe3ea; }
.ticks { display: grid; gap: 14px; margin-top: 26px; }
.ticks li { position: relative; padding-inline-start: 34px; color: #e3f1f5; line-height: 1.75; }
.ticks li::before {
    content: ''; position: absolute; inset-inline-start: 0; top: .5em; width: 20px; height: 20px; border-radius: 50%;
    background: var(--nile-bright) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='m5.5 10.5 3 3 6-6.5' fill='none' stroke='%230a2533' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
}

.gauge { margin: 0; padding: 28px; border-radius: 24px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .1); text-align: center; }
.gauge-ring { position: relative; width: min(100%, 260px); margin-inline: auto; }
.gauge-ring svg { width: 100%; height: auto; transform: rotate(-90deg); }
[dir='rtl'] .gauge-ring svg { transform: rotate(-90deg) scaleY(-1); }
.gauge-ring circle { fill: none; stroke-width: 16; }
.g-track { stroke: rgba(255, 255, 255, .08); }
.g-free { stroke: var(--nile-soft); stroke-linecap: round; }
.g-held { stroke: var(--gold); stroke-linecap: round; }
.gauge-mid { position: absolute; inset: 0; display: grid; place-content: center; gap: 0; line-height: 1.3; }
.gauge-mid small { font-size: .9375rem; color: #b9d2dc; }
.gauge-mid b { font: 700 2.5rem/1.2 var(--display); }
.legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; margin-top: 18px; font-size: .9375rem; color: #e3f1f5; }
.legend li { display: inline-flex; align-items: center; gap: 8px; }
.sw { width: 14px; height: 14px; border-radius: 50%; }
.sw-held { background: var(--gold); }
.sw-free { background: var(--nile-soft); }
.gauge figcaption { margin-top: 14px; font-size: .9375rem; color: #9db8c4; }

/* safety cards */
.cards { display: grid; gap: 16px; }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .cards { grid-template-columns: repeat(4, 1fr); gap: 20px; } }
.card { padding: 26px 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.card svg { width: 38px; height: 38px; margin-bottom: 16px; fill: none; stroke: var(--nile); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { font-size: 1.3125rem; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 1rem; line-height: 1.8; }

/* merchants */
.block-mist { background: var(--mist); }
.merchants { display: grid; gap: 32px 56px; }
@media (min-width: 900px) { .merchants { grid-template-columns: 1fr 1fr; align-items: start; } .merchants .cta, .merchants .hint { grid-column: 1; } }
.merchants .lead { color: var(--muted); }
.perks { display: grid; gap: 14px; }
@media (min-width: 900px) { .perks { grid-column: 2; grid-row: 1 / span 3; } }
.perks li { padding: 18px 20px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.perks b { display: block; font-size: 1.125rem; }
.perks span { display: block; margin-top: 2px; color: var(--muted); font-size: 1rem; line-height: 1.7; }
.merchants .cta { margin-top: 0; }
.merchants .hint { margin-top: 0; }

/* faq */
.faq-wrap { max-width: 820px; }
.faq { display: grid; gap: 10px; }
.faq details { border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.faq summary {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    min-height: 56px; padding: 12px 20px; cursor: pointer; list-style: none;
    font-weight: 600; font-size: 1.125rem; line-height: 1.6;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
    content: ''; flex: none; width: 12px; height: 12px;
    border-inline-end: 2.5px solid var(--nile); border-bottom: 2.5px solid var(--nile);
    rotate: 45deg; transition: rotate .2s ease;
}
.faq details[open] summary::after { rotate: 225deg; }
.faq details[open] { border-color: var(--nile); }
.faq details p { padding: 0 20px 18px; color: var(--muted); line-height: 1.85; }

/* closing band */
.closing { position: relative; overflow: hidden; isolation: isolate; background: var(--nile-deep); color: #fff; text-align: center; padding-block: clamp(56px, 8vw, 88px); }
.rings-end i { border-color: rgba(255, 255, 255, .12); inset-inline-start: 50%; translate: 50% -50%; }
[dir='rtl'] .rings-end i { translate: -50% -50%; }
.rings-end i:nth-child(1) { width: 420px; height: 420px; }
.rings-end i:nth-child(2) { width: 700px; height: 700px; border-color: rgba(255, 255, 255, .07); }
.closing h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
.closing p { margin-top: 10px; color: #d6ebf1; font-size: 1.1875rem; }
.closing .btn-primary { background: #fff; color: var(--ink); box-shadow: none; }
.closing .btn-primary:hover { background: var(--mist); }

/* footer */
.foot { background: var(--ink); color: #cfe3ea; padding-block: 36px 28px; }
.foot-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 28px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.foot nav a { color: #cfe3ea; text-decoration: none; padding: 10px 0; font-size: 1rem; }
.foot nav a:hover { color: #fff; text-decoration: underline; }
.lockup-foot { font-size: 1.25rem; }
.risk { margin-top: 18px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: .9375rem; color: #9db8c4; line-height: 1.8; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { transition: none !important; }
}
