/* ===== Шрифты (те же, что на utonic.org) ===== */
@font-face { font-family: "Cabin Condensed"; src: url(../fonts/Cabin_Condensed-Medium.ttf) format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Cabin Condensed"; src: url(../fonts/Cabin_Condensed-SemiBold.ttf) format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Cabin Condensed"; src: url(../fonts/Cabin_Condensed-Bold.ttf) format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Cabin"; src: url(../fonts/Cabin-VariableFont.ttf) format("truetype"); font-weight: 400 700; font-display: swap; }

/* ===== Палитра utonic.org ===== */
:root {
    --cream: #FDF3E4;        /* шапка, hero */
    --page: #FFF8F3;         /* фон страницы */
    --card: #FFF0DD;         /* карточка */
    --panel: #FFFDF6;        /* поля внутри карточки */
    --ink: #000;
    --muted: #6B6B6B;
    --yellow: #FEC107;
    --yellow-soft: #FFEED3;
    --blue: #6273D8;         /* волна */
    --navy: #221A4D;         /* логотип */
    --ton: #0098EA;          /* кнопка кошелька */
    --red: #FF435B;
    --line: 1px solid var(--ink);
    --display: "Cabin Condensed", "Arial Narrow", Arial, sans-serif;
    --body: "Cabin", "Segoe UI", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--page);
    color: var(--ink);
    font: 500 16px/1.5 var(--body);
}
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img { display: block; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

/* ===== Шапка ===== */
.header { background: var(--cream); position: sticky; top: 0; z-index: 10; }
.header__inner {
    max-width: 1280px; margin: 0 auto; height: 66px; padding: 0 20px;
    display: flex; align-items: center; gap: 40px;
}
.header__logo { flex: none; }
.nav { display: flex; gap: 14px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; padding: 4px 0; }
.nav::-webkit-scrollbar { display: none; }
.nav__link {
    flex: none; padding: 4px 15px; border: 2px solid var(--ink); border-radius: 99px;
    font: 600 15px/1.4 var(--display); letter-spacing: .02em; text-decoration: none;
    transition: background-color .15s;
}
.nav__link:hover { background: var(--yellow-soft); }
.nav__link.is-active { background: #FFDEB5; }
.header__wallet { flex: none; margin-left: auto; }

/* ===== Кнопки ===== */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    border-radius: 61px; font-weight: 700; white-space: nowrap;
    transition: opacity .15s, transform .1s;
}
.btn:hover { opacity: .8; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .35; cursor: not-allowed; transform: none; }
.btn--wallet { height: 40px; padding: 0 16px; background: var(--ton); color: #fff; font-size: 15px; box-shadow: 0 4px 14px rgba(0, 152, 234, .3); }
.btn--main { width: 100%; height: 52px; background: var(--yellow); font: 600 18px var(--display); letter-spacing: .02em; }

.wallet { display: flex; align-items: center; gap: 4px; height: 40px; padding: 0 4px 0 14px; border: var(--line); border-radius: 99px; background: var(--panel); }
.wallet__address { font: 600 15px var(--display); letter-spacing: .03em; }
.wallet__off { padding: 5px 12px; border-radius: 99px; font-size: 13px; font-weight: 600; color: var(--muted); }
.wallet__off:hover { background: var(--yellow-soft); color: var(--ink); }

.icon-btn { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 10px; border: var(--line); border-radius: 99px; background: var(--panel); font: 600 14px var(--display); }
.icon-btn:hover { background: var(--yellow-soft); }
.icon-btn--round { width: 40px; padding: 0; justify-content: center; }

/* ===== Hero: заголовок и карточка по центру, волна внизу ===== */
.hero { position: relative; overflow: hidden; background: var(--cream); border-bottom: var(--line); }
.hero::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: clamp(90px, 13vw, 190px);
    background: url(../img/wave-bottom.svg) no-repeat center bottom / 100% 100%;
}
.hero__inner {
    position: relative; z-index: 1; max-width: 800px; margin: 0 auto;
    padding: 48px 20px calc(clamp(90px, 13vw, 190px) + 40px);
    text-align: center;
}
h1 { font: 700 clamp(40px, 5.2vw, 60px)/1.08 var(--display); letter-spacing: -.01em; text-wrap: balance; }
.accent { color: var(--yellow); }
.hero__lead { margin: 12px auto 28px; max-width: 34em; font-size: 18px; line-height: 1.45; color: #3A2F53; text-wrap: balance; }

.hero__decor { display: none; }
.decor { position: absolute; }
@media (min-width: 1100px) {
    .hero__decor { display: block; }
    .decor--star-a { width: 84px; left: calc(50% - 470px); top: 150px; }
    .decor--drop-a { width: 46px; left: calc(50% - 370px); top: 330px; }
    .decor--drop-b { width: 96px; left: calc(50% + 330px); top: 210px; }
    .decor--star-b { width: 52px; left: calc(50% + 450px); top: 420px; }
}
/* ===== Карточка свопа ===== */
.swap { background: var(--card); border: var(--line); border-radius: 28px; padding: 20px 20px 18px; text-align: left; max-width: 460px; margin: 0 auto; }
.swap__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.swap__head h2 { font: 700 28px/1 var(--display); }
.swap__panel { margin-bottom: 16px; }

.field { background: var(--panel); border: var(--line); border-radius: 18px; padding: 14px 16px; transition: box-shadow .15s; }
.field:focus-within { box-shadow: 0 0 0 2px var(--yellow); }
.field.is-error { border-color: var(--red); box-shadow: 0 0 0 1px var(--red); }
.field__top { display: flex; justify-content: space-between; align-items: center; min-height: 22px; font-size: 14px; color: var(--muted); }
.field__balance { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.field__balance b { margin-left: 4px; padding: 1px 7px; border-radius: 4px; background: var(--yellow-soft); color: var(--ink); font: 700 12px var(--display); letter-spacing: .04em; }
button.field__balance:hover b { background: var(--yellow); }
.field__row { display: flex; align-items: center; gap: 12px; margin-top: 6px; }
.field__usd { margin-top: 2px; font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.field__input {
    flex: 1; min-width: 0; width: 100%; padding: 0; border: 0; outline: 0; background: none;
    font: 600 32px/1.2 var(--display); font-variant-numeric: tabular-nums; text-overflow: ellipsis;
}
.field__input::placeholder { color: #B7B1BE; }

.token { flex: none; display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 12px 0 7px; border: var(--line); border-radius: 99px; background: #fff; font: 600 18px var(--display); }
.token:hover { background: var(--yellow-soft); }
.token img { border-radius: 50%; }

.flip {
    display: flex; align-items: center; justify-content: center; position: relative; z-index: 1;
    width: 44px; height: 44px; margin: -12px auto; border: var(--line); border-radius: 50%; background: var(--yellow);
    transition: transform .25s;
}
.flip:hover { transform: rotate(180deg); }

.swap__error { margin-bottom: 12px; padding: 8px 12px; border-radius: 10px; background: #FFE3E7; color: #B0122A; font-size: 14px; }
.swap__gas { margin-top: 12px; padding: 6px 10px; border-radius: 8px; background: linear-gradient(90deg, #FDF88C55, #FFD45855); text-align: center; font-size: 13px; color: #7A6A2A; }

.details { margin-top: 14px; font-size: 14px; }
.details summary { display: flex; justify-content: space-between; align-items: center; cursor: pointer; list-style: none; font-weight: 600; font-variant-numeric: tabular-nums; }
.details summary::-webkit-details-marker { display: none; }
.details summary svg { transition: transform .2s; }
.details[open] summary svg { transform: rotate(180deg); }
.details dl { margin-top: 10px; padding-top: 10px; border-top: 1px dashed rgba(0, 0, 0, .25); display: grid; gap: 6px; }
.details dl div, .summary__list div { display: flex; justify-content: space-between; gap: 16px; }
.details dt, .summary__list dt { color: var(--muted); }
.details dd, .summary__list dd { font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }

/* ===== Полоса с цифрами ===== */
.band { display: grid; grid-template-columns: repeat(3, 1fr); background: linear-gradient(90deg, #EEFCFF, #FBFFCA); border-bottom: var(--line); text-align: center; }
.band div { padding: 26px 12px; }
.band div + div { border-left: var(--line); }
.band strong { display: block; font: 600 40px/1.1 var(--display); font-variant-numeric: tabular-nums; }
.band span { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 15px; }
.band img { border-radius: 50%; }

/* ===== Секции ===== */
.section { max-width: 1180px; margin: 0 auto; padding: 80px 20px 0; }
.section--narrow { max-width: 780px; padding-bottom: 96px; }
.section > h2 { font: 700 40px/1.1 var(--display); margin-bottom: 28px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.steps li { background: var(--panel); border: var(--line); border-radius: 21px; padding: 24px; }
.steps b { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: var(--line); border-radius: 50%; background: var(--yellow); font: 700 20px var(--display); }
.steps h3 { margin: 16px 0 6px; font: 600 24px/1.2 var(--display); }
.steps p, .faq p { color: #52466A; }

.faq { display: grid; gap: 10px; }
.faq details { background: var(--panel); border: var(--line); border-radius: 15px; }
.faq summary { display: flex; justify-content: space-between; gap: 16px; padding: 16px 20px; cursor: pointer; list-style: none; font: 600 20px/1.3 var(--display); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 24px; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details[open] { background: var(--card); }
.faq p { padding: 0 20px 18px; max-width: 60ch; }

.footer { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding: 28px max(20px, calc((100vw - 1140px) / 2)); background: var(--cream); border-top: var(--line); font-size: 14px; color: var(--muted); }
.footer a { margin-left: auto; color: var(--ink); font-weight: 600; }

/* ===== Модальные окна ===== */
.modal { width: min(420px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 22px 24px 24px; border: var(--line); border-radius: 24px; background: var(--card); color: var(--ink); }
.modal::backdrop { background: rgba(34, 26, 77, .45); }
.modal[open] { animation: pop .18s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.modal__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.modal h2 { font: 700 24px/1.2 var(--display); }
.modal__text { margin-bottom: 16px; font-size: 15px; color: #52466A; }

.token-list { display: grid; gap: 8px; }
.token-list button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 14px; border: var(--line); border-radius: 12px; background: var(--panel); text-align: left; }
.token-list button:hover, .token-list button.is-active { background: #FFDEB5; }
.token-list img { border-radius: 50%; }
.token-list__name { flex: 1; display: grid; }
.token-list__name b { font: 600 18px/1.2 var(--display); }
.token-list__name small { font-size: 13px; color: var(--muted); }
.token-list__balance { font-weight: 600; font-variant-numeric: tabular-nums; }

.slippage { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.slippage button, .slippage__custom { height: 40px; padding: 0 14px; border: var(--line); border-radius: 99px; background: var(--panel); font: 600 16px var(--display); }
.slippage button.is-active { background: linear-gradient(90deg, #FDF88C, #FFD458); }
.slippage__custom { flex: 1; min-width: 110px; display: flex; align-items: center; gap: 4px; }
.slippage__custom:focus-within { box-shadow: 0 0 0 2px var(--yellow); }
.slippage__custom input { flex: 1; min-width: 0; width: 100%; border: 0; outline: 0; background: none; font-size: 16px; }

.summary { margin-bottom: 14px; padding: 14px 16px; border: var(--line); border-radius: 18px; background: var(--panel); }
.summary__side { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.summary__side + .summary__side { margin-top: 12px; padding-top: 12px; border-top: 1px dashed rgba(0, 0, 0, .25); }
.summary__side div { display: grid; justify-items: end; }
.summary__side small { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.summary__side span { color: var(--muted); font-size: 14px; }
.summary__side strong { font: 600 24px/1.2 var(--display); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; text-align: right; }
.summary__list { display: grid; gap: 6px; margin-bottom: 18px; font-size: 14px; }

.done { text-align: center; }
.done__mark { display: flex; align-items: center; justify-content: center; width: 64px; height: 64px; margin: 6px auto 16px; border: var(--line); border-radius: 50%; background: #F1FFA8; }
.done p { margin-top: 8px; color: #52466A; }
.done__hash { font-size: 13px; margin-bottom: 20px; }
.done code { font-family: Consolas, Menlo, monospace; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 50; padding: 10px 18px; border: var(--line); border-radius: 99px; background: var(--navy); color: #fff; font-size: 15px; font-weight: 600; white-space: nowrap; }

/* ===== Адаптив ===== */
@media (max-width: 960px) {
    .header__inner { gap: 16px; }
    .steps { grid-template-columns: 1fr; }
    .section { padding: 56px 16px 0; }
    .section--narrow { padding-bottom: 64px; }
    .section > h2 { font-size: 32px; }
}
@media (max-width: 640px) {
    .header__inner { flex-wrap: wrap; height: auto; padding: 10px 16px 6px; gap: 6px 12px; }
    .nav { order: 3; flex-basis: 100%; gap: 8px; }
    .nav__link { font-size: 14px; padding: 3px 12px; }
    .hero__inner { padding-top: 28px; padding-left: 16px; padding-right: 16px; }
    .hero__lead { font-size: 16px; margin-bottom: 20px; }
    .swap { padding: 16px 14px; border-radius: 22px; }
    .field__input { font-size: 28px; }
    .band strong { font-size: 26px; }
    .band span { font-size: 13px; }
    .band div { padding: 18px 6px; }
    .faq summary { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
