/* ============================================================================
 * TraPay — /buy-utopia custom layout
 * Sibling of buy-tether.css / buy-trx.css. Teal palette (Utopia uUSD identity).
 * Utopia = private digital cash + prepaid vouchers, the Perfect Money replacement.
 * ============================================================================ */

:root {
    --utopia-teal: #0e9aa0;
    --utopia-cyan: #2fc4c4;
    --utopia-bg-1: #06211f;
    --utopia-bg-2: #0f172a;
}

/* HERO */
.utopia-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--utopia-bg-1) 0%, var(--utopia-bg-2) 100%);
    color: #f8fafc;
    padding: 5rem 1.5rem 6rem;
    isolation: isolate;
}
.utopia-hero__bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.utopia-hero__glow { position: absolute; width: 40rem; height: 40rem; border-radius: 50%; filter: blur(120px); opacity: 0.35; }
.utopia-hero__glow--teal { background: var(--utopia-teal); top: -10rem; right: -10rem; }
.utopia-hero__glow--brand { background: var(--brand, #0d3e7e); bottom: -15rem; left: -10rem; opacity: 0.55; }
.utopia-hero__grid { position: absolute; inset: 0; width: 100%; height: 100%; color: rgba(255,255,255,0.08); }

.utopia-hero__inner { position: relative; max-width: 72rem; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr); gap: 3rem; align-items: center; }
@media (min-width: 900px) { .utopia-hero__inner { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 5rem; } }

/* minmax(0,1fr) on the TRACK + min-width:0 on the ITEM both needed: a long LTR
   token (uUSD, uVoucher) sets the item's min-content, and a bare 1fr track grows to
   that min-content → column becomes wider than the viewport and shifts left in RTL. */
.utopia-hero__inner > * { min-width: 0; }
.utopia-hero__copy { max-width: 36rem; min-width: 0; }
.utopia-title, .utopia-lead { overflow-wrap: anywhere; word-break: break-word; min-width: 0; }
.utopia-badge {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.4rem 0.85rem;
    background: rgba(14, 154, 160, 0.16);
    color: #7fe3e3;
    border: 1px solid rgba(14, 154, 160, 0.4);
    border-radius: 999px;
    font-size: 0.8125rem; font-weight: 600;
}
.utopia-badge__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--utopia-cyan); box-shadow: 0 0 12px var(--utopia-cyan); animation: utopia-pulse 2s ease-in-out infinite; }
@keyframes utopia-pulse { 0%,100%{opacity:1} 50%{opacity:0.4} }

.utopia-title {
    margin: 1.5rem 0 0;
    font-family: 'Estedad','Vazirmatn',sans-serif;
    font-weight: 800;
    font-size: clamp(2rem, 1.5rem + 2vw, 3.2rem);
    line-height: 1.25;
    letter-spacing: -0.01em;
}
.utopia-title__accent {
    background: linear-gradient(120deg, var(--utopia-cyan) 0%, var(--utopia-teal) 100%);
    -webkit-background-clip: text; background-clip: text;
    color: transparent;
}
.utopia-lead { margin-top: 1.25rem; font-size: 1.0625rem; line-height: 1.95; color: rgba(248, 250, 252, 0.75); max-width: 32rem; }

/* CALCULATOR */
.utopia-calc {
    position: relative;
    background: rgba(255,255,255,0.04);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 1.5rem;
    padding: 1.75rem;
    box-shadow: 0 30px 80px -20px rgba(0,0,0,0.5);
}
.utopia-calc__header { display: flex; align-items: center; gap: 0.85rem; padding-bottom: 1.25rem; border-bottom: 1px solid rgba(255,255,255,0.08); margin-bottom: 1.5rem; }
.utopia-calc__mark {
    width: 48px; height: 48px;
    background: var(--utopia-teal);
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 8px 24px -8px rgba(14,154,160,0.6);
    color: white; font-size: 1.5rem; font-weight: 800;
}
.utopia-calc__mark img { width: 30px; height: 30px; }
.utopia-calc__title { font-size: 1.0625rem; font-weight: 700; color: #f8fafc; }
.utopia-calc__sub { font-size: 0.8125rem; color: rgba(248,250,252,0.55); margin-top: 2px; }

.utopia-calc__field { display: block; margin-bottom: 0; }
.utopia-calc__field + .utopia-calc__field { margin-top: 0.5rem; }
.utopia-calc__label { display: block; font-size: 0.8125rem; font-weight: 600; color: rgba(248,250,252,0.55); margin-bottom: 0.5rem; }
.utopia-calc__input {
    display: flex; align-items: center; gap: 0.5rem;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 0.875rem;
    padding: 0.85rem 1rem;
    transition: border-color 0.2s, background 0.2s;
}
.utopia-calc__input:focus-within { border-color: rgba(14,154,160,0.5); background: rgba(255,255,255,0.08); }
.utopia-calc__input input, .utopia-calc__input output {
    flex: 1; min-width: 0; background: transparent; border: none; outline: none;
    color: #f8fafc;
    font-family: 'Estedad','Vazirmatn',sans-serif;
    font-size: 1.5rem; font-weight: 700;
    direction: ltr; text-align: end;
    font-variant-numeric: tabular-nums;
}
.utopia-calc__unit { flex-shrink: 0; font-size: 0.875rem; font-weight: 600; color: rgba(248,250,252,0.55); }
.utopia-calc__unit--brand { color: var(--utopia-cyan); }

.utopia-calc__swap {
    display: flex; align-items: center; justify-content: center;
    margin: 0.75rem auto; width: 36px; height: 36px;
    background: linear-gradient(135deg, var(--utopia-teal) 0%, var(--utopia-cyan) 100%);
    border-radius: 50%; box-shadow: 0 4px 12px rgba(14,154,160,0.5); color: white;
}
.utopia-calc__swap svg { width: 16px; height: 16px; }

.utopia-calc__field--out .utopia-calc__input { border-color: rgba(14,154,160,0.3); }

.utopia-calc__cta {
    display: flex; align-items: center; justify-content: center; gap: 0.6rem;
    margin-top: 1.5rem; padding: 1rem 1.5rem;
    background: linear-gradient(120deg, var(--utopia-teal) 0%, var(--utopia-cyan) 100%);
    color: white; border-radius: 0.875rem;
    font-weight: 700; font-size: 0.95rem; text-decoration: none;
    box-shadow: 0 12px 32px -8px rgba(14,154,160,0.5);
    transition: transform 0.2s, box-shadow 0.2s;
}
.utopia-calc__cta:hover { transform: translateY(-2px); box-shadow: 0 20px 40px -8px rgba(14,154,160,0.6); }
.utopia-calc__cta svg { width: 18px; height: 18px; }

.utopia-calc__meta { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,0.08); font-size: 0.8125rem; color: rgba(248,250,252,0.55); text-align: center; }
.utopia-calc__meta strong { color: #f8fafc; font-weight: 600; }

/* SHARED H2 */
.utopia-h2 {
    font-family: 'Estedad','Vazirmatn',sans-serif;
    font-weight: 800;
    font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
    line-height: 1.4;
    color: var(--ink, #111827);
    margin: 0 0 1.5rem;
}
.dark .utopia-h2 { color: #f8fafc; }

/* WHY */
.utopia-why { max-width: 72rem; margin: 0 auto; padding: 5rem 1.5rem; }
.utopia-why__grid { display: grid; grid-template-columns: 1fr; gap: 1.25rem; margin-top: 2rem; }
@media (min-width: 700px) { .utopia-why__grid { grid-template-columns: repeat(3, 1fr); } }
.utopia-why__card {
    padding: 2rem;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 1.25rem;
    transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}
.dark .utopia-why__card { background: #1f2937; border-color: #374151; }
.utopia-why__card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px -16px rgba(0,0,0,0.15); }
.utopia-why__icon {
    width: 48px; height: 48px; border-radius: 0.875rem;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 1rem;
}
.utopia-why__icon svg { width: 24px; height: 24px; }
.utopia-why__icon--teal { background: color-mix(in srgb, var(--utopia-teal) 12%, white); color: var(--utopia-teal); }
.utopia-why__icon--brand { background: color-mix(in srgb, var(--brand, #0d3e7e) 10%, white); color: var(--brand, #0d3e7e); }
.utopia-why__icon--amber { background: color-mix(in srgb, var(--accent, #f59e0b) 14%, white); color: var(--accent, #f59e0b); }
.utopia-why__card h3 { margin: 0 0 0.5rem; font-size: 1.0625rem; font-weight: 700; color: var(--ink, #111827); }
.dark .utopia-why__card h3 { color: #f8fafc; }
.utopia-why__card p { margin: 0; font-size: 0.9375rem; line-height: 1.85; color: var(--muted, #6b7280); }

/* FLOW (4 steps) */
.utopia-flow { max-width: 72rem; margin: 0 auto; padding: 5rem 1.5rem; background: var(--brand-50, #eef4fc); border-radius: 0; }
.dark .utopia-flow { background: #0b1220; }
.utopia-flow__steps { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
@media (min-width: 700px) { .utopia-flow__steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .utopia-flow__steps { grid-template-columns: repeat(4, 1fr); } }
.utopia-flow__steps li {
    position: relative; padding: 2.5rem 1.5rem 1.75rem;
    background: white; border: 1px solid #e2e8f0; border-radius: 1.25rem;
    transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}
.dark .utopia-flow__steps li { background: #1f2937; border-color: #374151; }
.utopia-flow__steps li:hover { transform: translateY(-4px); box-shadow: 0 16px 40px -16px rgba(14,154,160,0.25); border-color: var(--utopia-teal); }
.utopia-flow__steps li span {
    position: absolute; top: -1rem; right: 1.5rem;
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    background: var(--utopia-teal); color: white;
    font-family: 'Estedad','Vazirmatn',sans-serif;
    font-weight: 800; font-size: 0.95rem;
    border-radius: 50%; box-shadow: 0 6px 18px -4px rgba(14,154,160,0.45);
}
.utopia-flow__steps li h3 { margin: 0 0 0.5rem; font-weight: 700; font-size: 1.0625rem; color: var(--ink, #111827); }
.dark .utopia-flow__steps li h3 { color: #f8fafc; }
.utopia-flow__steps li p { margin: 0; font-size: 0.9375rem; line-height: 1.75; color: var(--muted, #6b7280); }

/* PRODUCTS — uUSD vs uVoucher compare cards */
.utopia-kinds { max-width: 72rem; margin: 0 auto; padding: 5rem 1.5rem; }
.utopia-kinds__sub { color: var(--muted, #6b7280); margin: -1rem 0 2rem; font-size: 0.9375rem; }
.utopia-kinds__grid { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
@media (min-width: 800px) { .utopia-kinds__grid { grid-template-columns: repeat(2, 1fr); } }
.utopia-kind { background: white; border: 1px solid #e2e8f0; border-radius: 1.25rem; overflow: hidden; transition: transform 0.25s, box-shadow 0.25s; }
.dark .utopia-kind { background: #1f2937; border-color: #374151; }
.utopia-kind:hover { transform: translateY(-4px); box-shadow: 0 20px 50px -16px rgba(0,0,0,0.15); }
.utopia-kind--pick { border-color: var(--utopia-teal); box-shadow: 0 0 0 4px rgba(14, 154, 160, 0.08); }
.utopia-kind__head { display: grid; grid-template-columns: auto 1fr auto; gap: 0.85rem; align-items: center; padding: 1.25rem 1.5rem; background: color-mix(in srgb, var(--utopia-teal) 8%, white); border-bottom: 1px solid color-mix(in srgb, var(--utopia-teal) 15%, transparent); }
.dark .utopia-kind__head { background: color-mix(in srgb, var(--utopia-teal) 18%, #1f2937); }
.utopia-kind__icon { width: 40px; height: 40px; background: var(--utopia-teal); color: white; border-radius: 0.6rem; display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 16px -6px rgba(14,154,160,0.6); }
.utopia-kind__icon svg { width: 22px; height: 22px; }
.utopia-kind__head strong { font-size: 1rem; font-weight: 800; color: var(--ink, #111827); }
.dark .utopia-kind__head strong { color: #f8fafc; }
.utopia-kind__head small { display: block; font-size: 0.8125rem; color: var(--muted, #6b7280); margin-top: 2px; }
.utopia-kind__star { font-size: 0.75rem; font-weight: 700; color: white; background: var(--utopia-teal); padding: 0.3rem 0.65rem; border-radius: 999px; white-space: nowrap; }
.utopia-kind__body { padding: 1.25rem 1.5rem; }
.utopia-kind__body ul { margin: 0 0 1.25rem; padding: 0; list-style: none; display: grid; gap: 0.6rem; }
.utopia-kind__body li { position: relative; padding-inline-start: 1.6rem; font-size: 0.9375rem; line-height: 1.8; color: var(--ink, #111827); }
.dark .utopia-kind__body li { color: #e5e7eb; }
.utopia-kind__body li::before { content: "✓"; position: absolute; inset-inline-start: 0; top: 0; color: var(--utopia-teal); font-weight: 800; }
.utopia-kind__cta {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
    width: 100%; padding: 0.85rem 1.25rem; border-radius: 0.75rem;
    background: linear-gradient(120deg, var(--utopia-teal) 0%, var(--utopia-cyan) 100%);
    color: white; font-weight: 700; font-size: 0.9375rem; text-decoration: none;
    box-shadow: 0 10px 26px -10px rgba(14,154,160,0.6);
    transition: transform 0.15s, box-shadow 0.15s;
}
.utopia-kind__cta:hover { transform: translateY(-2px); box-shadow: 0 16px 32px -10px rgba(14,154,160,0.7); }
.utopia-kind__cta svg { width: 16px; height: 16px; }

/* FAQ */
.utopia-faq { max-width: 60rem; margin: 0 auto; padding: 4rem 1.5rem; }
.utopia-faq details { background: white; border: 1px solid #e2e8f0; border-radius: 1rem; padding: 1.25rem 1.5rem; margin-bottom: 0.75rem; transition: border-color 0.2s, background 0.2s; }
.dark .utopia-faq details { background: #1f2937; border-color: #374151; }
.utopia-faq details[open] { border-color: var(--utopia-teal); background: color-mix(in srgb, var(--utopia-teal) 3%, white); }
.dark .utopia-faq details[open] { background: color-mix(in srgb, var(--utopia-teal) 12%, #1f2937); }
.utopia-faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: 1rem; color: var(--ink, #111827); }
.dark .utopia-faq summary { color: #f8fafc; }
.utopia-faq summary::-webkit-details-marker { display: none; }
.utopia-faq__chev { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; font-weight: 300; background: color-mix(in srgb, var(--utopia-teal) 12%, white); color: var(--utopia-teal); border-radius: 50%; transition: transform 0.25s, background 0.25s; }
.utopia-faq details[open] .utopia-faq__chev { transform: rotate(45deg); background: var(--utopia-teal); color: white; }
.utopia-faq p { margin: 1rem 0 0; color: var(--muted, #6b7280); line-height: 2; font-size: 0.9375rem; }
.utopia-faq p a { color: var(--brand, #0d3e7e); font-weight: 600; text-decoration: none; }
.utopia-faq p a:hover { text-decoration: underline; }

/* ARTICLE (SEO long-form) */
.utopia-article { max-width: 60rem; margin: 0 auto; padding: 4rem 1.5rem; }
.utopia-article__inner h2.utopia-h2 { margin-bottom: 1.5rem; }
.utopia-article__inner h3 {
    font-family: 'Estedad','Vazirmatn',sans-serif;
    font-weight: 700; font-size: 1.25rem; line-height: 1.5;
    color: var(--ink, #111827);
    margin: 2.5rem 0 1rem;
}
.dark .utopia-article__inner h3 { color: #f8fafc; }
.utopia-article__inner p { margin: 0 0 1rem; font-size: 1rem; line-height: 2; color: var(--ink, #111827); }
.dark .utopia-article__inner p { color: #e5e7eb; }
.utopia-article__inner ul { margin: 0 0 1.5rem; padding-inline-start: 1.5rem; list-style: disc; }
.utopia-article__inner li { margin: 0.5rem 0; font-size: 1rem; line-height: 1.95; color: var(--ink, #111827); }
.dark .utopia-article__inner li { color: #e5e7eb; }
.utopia-article__inner li strong { color: var(--utopia-teal); }
.dark .utopia-article__inner li strong { color: #7fe3e3; }
.utopia-article__inner a { color: var(--brand, #0d3e7e); font-weight: 600; text-decoration: none; }
.utopia-article__inner a:hover { text-decoration: underline; }

/* FINAL CTA */
.utopia-cta-end { padding: 4rem 1.5rem 6rem; }
.utopia-cta-end__inner {
    max-width: 60rem; margin: 0 auto;
    background: linear-gradient(135deg, var(--utopia-teal) 0%, #0b7f84 100%);
    border-radius: 1.75rem; padding: 2.5rem;
    display: grid; grid-template-columns: 1fr; gap: 1.5rem; align-items: center;
    color: white;
    box-shadow: 0 30px 70px -20px rgba(14,154,160,0.45);
}
@media (min-width: 700px) { .utopia-cta-end__inner { grid-template-columns: auto 1fr auto; padding: 2rem 3rem; gap: 2rem; } }
.utopia-cta-end__coin {
    width: 64px; height: 64px;
    background: white;
    border-radius: 1rem; padding: 12px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 12px 30px -8px rgba(0,0,0,0.3);
}
.utopia-cta-end__coin img { width: 100%; height: 100%; object-fit: contain; }
.utopia-cta-end__inner h2 { margin: 0; font-family: 'Estedad','Vazirmatn',sans-serif; font-weight: 800; font-size: 1.5rem; }
.utopia-cta-end__inner p { margin: 0.35rem 0 0; color: rgba(255,255,255,0.85); font-size: 0.9375rem; }
.utopia-cta-end__inner a {
    display: inline-flex; align-items: center; gap: 0.5rem;
    background: white; color: var(--utopia-teal);
    padding: 0.85rem 1.5rem; border-radius: 0.875rem;
    font-weight: 700; font-size: 0.9375rem; text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s; white-space: nowrap;
}
.utopia-cta-end__inner a:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -8px rgba(0,0,0,0.3); }
.utopia-cta-end__inner a svg { width: 16px; height: 16px; }

.tnum { font-variant-numeric: tabular-nums; }
[dir="rtl"] .rtl-flip { transform: scaleX(-1); }

/* RELATED ARTICLES (pillar → spoke down-links) */
.utopia-related { max-width: 72rem; margin: 0 auto; padding: 3rem 1.5rem 1rem; }
.utopia-related__grid { display: grid; grid-template-columns: 1fr; gap: 0.85rem; }
@media (min-width: 700px) { .utopia-related__grid { grid-template-columns: repeat(2, 1fr); } }
.utopia-related__grid a {
    display: flex; align-items: center; gap: 0.6rem;
    padding: 1rem 1.25rem; border: 1px solid #e2e8f0; border-radius: 0.875rem;
    background: white; color: var(--ink, #111827); text-decoration: none; font-weight: 600;
    font-size: 0.95rem; transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.dark .utopia-related__grid a { background: #1f2937; border-color: #374151; color: #f8fafc; }
.utopia-related__grid a::before { content: "←"; color: var(--utopia-teal); font-weight: 800; }
.utopia-related__grid a:hover { border-color: var(--utopia-teal); transform: translateY(-2px); box-shadow: 0 12px 30px -14px rgba(14,154,160,0.4); }

/* ORDER CTA CARD (replaces the calculator — nice price + button, no inputs) */
.utopia-order {
    position: relative;
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 1.5rem;
    padding: 2rem 1.75rem;
    box-shadow: 0 30px 80px -20px rgba(0,0,0,0.5);
    text-align: center;
}
.utopia-order__mark {
    width: 60px; height: 60px; margin: 0 auto 1.25rem;
    background: linear-gradient(135deg, var(--utopia-teal) 0%, var(--utopia-cyan) 100%);
    border-radius: 18px; display: flex; align-items: center; justify-content: center;
    box-shadow: 0 12px 30px -10px rgba(14,154,160,0.7);
}
.utopia-order__price { margin-bottom: 1.5rem; }
.utopia-order__price-label { display: block; font-size: 0.8125rem; color: rgba(248,250,252,0.55); margin-bottom: 0.4rem; }
.utopia-order__price strong { font-size: 1.9rem; font-weight: 800; color: #f8fafc; }
.utopia-order__price strong small { font-size: 0.85rem; font-weight: 600; color: var(--utopia-cyan); }
.utopia-order__cta {
    display: flex; align-items: center; justify-content: center; gap: 0.6rem;
    width: 100%; padding: 1.05rem 1.5rem;
    background: linear-gradient(120deg, var(--utopia-teal) 0%, var(--utopia-cyan) 100%);
    color: white; border-radius: 0.875rem;
    font-weight: 700; font-size: 1rem; text-decoration: none;
    box-shadow: 0 14px 34px -8px rgba(14,154,160,0.6);
    transition: transform 0.2s, box-shadow 0.2s;
}
.utopia-order__cta:hover { transform: translateY(-2px); box-shadow: 0 22px 44px -8px rgba(14,154,160,0.75); }
.utopia-order__cta svg { width: 18px; height: 18px; }
.utopia-order__hint { display: block; margin-top: 1rem; font-size: 0.8rem; color: rgba(248,250,252,0.5); }
