:root {
  color-scheme: light;
  --ink: #111b32;
  --muted: #42516a;
  --navy: #263f61;
  --navy-dark: #1b3251;
  --border: #d6e1ef;
  --control: #7c91ad;
  --focus: #1763a4;
  --surface: #f8fbff;
  --error: #9b2835;
  --wrap: 1320px;
  --gutter: clamp(16px, 4vw, 60px);
  --control-height: 49px;
  --font: system-ui, "Segoe UI", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  color: var(--ink);
  background: radial-gradient(ellipse at 88% 25%, #dceafa 0%, transparent 49%), linear-gradient(160deg, #f6f7fc, #eaf2fb);
  font: 1rem/1.5 var(--font);
}
h1, h2, h3, p { margin: 0; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
[tabindex="-1"]:focus { outline: none; }
.wrap { width: min(var(--wrap), 100% - var(--gutter) * 2); margin-inline: auto; }
.icon { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.svg-library { position: absolute; width: 0; height: 0; overflow: hidden; }
.glass {
  border: 1px solid #fff;
  background: linear-gradient(146deg, #f9fbffe8, #edf4fbe0);
  box-shadow: 0 18px 46px #28466b13, inset 0 1px #fff;
}
.skip-link { position: fixed; inset: 8px auto auto 12px; z-index: 10; padding: 10px 16px; border-radius: 10px; background: #fff; transform: translateY(-150%); }
.skip-link:focus-visible { transform: none; }
.site-header { position: relative; z-index: 3; }
.header-inner { min-height: 84px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.brand { display: inline-flex; align-items: center; width: max-content; min-width: 0; }
.brand-lockup { display: block; flex: none; width: auto; height: var(--brand-height); aspect-ratio: 936.02 / 336.34; }
.header-inner > .brand { --brand-height: 56px; min-height: 44px; }
.header-actions { display: flex; align-items: center; gap: 12px; }
.button, .icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--control-height);
  padding: 9px 19px;
  border: 1px solid transparent;
  border-radius: 13px;
  background: transparent;
  color: var(--navy);
  text-align: center;
  font-weight: 680;
  cursor: pointer;
}
.button-primary { border-color: var(--navy); background: linear-gradient(155deg, #3a577c, var(--navy)); color: #fff; box-shadow: inset 0 1px #ffffff27; }
.button-primary:is(:hover, :active) { background: var(--navy-dark); }
.button-secondary { border-color: #8ea6c4; background: #e9f2fc80; }
.button-secondary:is(:hover, :active) { background: #dceafa; }
.button:disabled, .icon-button:disabled { opacity: .55; cursor: default; }
.icon-button { width: 44px; min-height: 44px; flex: none; padding: 0; }

.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .92fr);
  grid-template-areas: "intro exchange" "benefits exchange" "referral exchange";
  grid-template-rows: auto 1fr auto;
  align-items: start;
  column-gap: clamp(32px, 5.8vw, 82px);
  row-gap: clamp(22px, 2.4vw, 34px);
  padding-block: 34px clamp(78px, 7.4vw, 106px);
}
.hero::before { content: ""; position: absolute; z-index: -2; inset: -58px calc(var(--gutter) * -1) 0; pointer-events: none; background: radial-gradient(ellipse at 59% 56%, #b7d9ed8c, #d9e9fa47 35%, transparent 65%); }
.hero-arc { position: absolute; z-index: -1; width: min(57vw, 760px); height: 76%; top: 13%; left: 25%; border: 1px solid #ffffffbc; border-radius: 50%; box-shadow: inset 0 10px 40px #d0eafa66; transform: rotate(-29deg); pointer-events: none; }
.hero-coins { position: absolute; z-index: -1; width: clamp(260px, 36vw, 495px); height: auto; top: clamp(127px, 11.3vw, 166px); left: 24.4%; pointer-events: none; object-fit: contain; }
.hero-intro { grid-area: intro; align-self: end; padding-top: clamp(10px, 2.3vw, 34px); }
.hero h1 { max-width: 10.8em; font-size: clamp(2.25rem, 4.12vw, 3.75rem); font-weight: 780; letter-spacing: -.055em; line-height: 1.035; text-wrap: balance; }
.lead { max-width: 35ch; margin-top: 18px; color: #354761; font-size: clamp(1rem, 1.52vw, 1.3rem); line-height: 1.45; }
.benefits { grid-area: benefits; display: grid; gap: 11px; padding: 0; margin: 0; list-style: none; max-width: min(100%, 400px); }
.benefits li { display: flex; align-items: center; gap: 13px; min-height: 49px; }
.benefits strong { display: block; font-size: 1.08rem; line-height: 1.2; letter-spacing: -.025em; }
.benefits p { margin-top: 3px; font-size: .92rem; color: var(--muted); }
.icon-tile { display: grid; place-items: center; flex: none; width: 48px; height: 48px; border: 1px solid #ffffffdd; border-radius: 16px; background: linear-gradient(145deg, #f6faff, #dceefa); box-shadow: 0 3px 8px #294f751a, inset 0 0 0 1px #cbdced55; color: #24486d; }
.icon-tile .icon { width: 24px; height: 24px; }

.exchange-card { grid-area: exchange; min-width: 0; display: flex; flex-direction: column; padding: clamp(20px, 2.4vw, 34px); border-radius: 25px; scroll-margin-top: 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 19px; }
.card-brand { --brand-height: 44px; }
.card-user { color: var(--navy); }
.card-user:hover { background: #deebf9; }
.exchange-field > :is(label, p) { display: block; margin-bottom: 5px; font-weight: 620; }
.field-row { display: flex; align-items: stretch; min-height: 52px; border: 1px solid var(--control); border-radius: 12px; background: #f7fbffcc; }
.field-row:focus-within { border-color: var(--field-focus, var(--focus)); box-shadow: 0 0 0 1px var(--field-focus, var(--focus)); }
.field-row:has([aria-invalid="true"]) { --field-focus: var(--error); border-color: var(--error); }
.field-row > input { width: 100%; min-width: 0; padding: 9px 0 9px 15px; border: 0; background: transparent; border-radius: 12px; color: var(--ink); font-size: 1.18rem; font-weight: 700; }
.field-row > input::placeholder { color: var(--muted); font-size: .95rem; font-weight: 430; opacity: 1; }
.field-row > input:focus-visible { outline: none; box-shadow: none; }
.receive-row { background: #e8f2fbcc; }
.receive-value { flex: 1; min-width: 0; align-self: center; padding-inline: 15px 0; color: var(--muted); font-size: 1.12rem; }
.currency-trigger { flex: none; min-height: 50px; min-width: 108px; display: inline-flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 0 12px; border: 0; border-radius: 11px; background: transparent; color: var(--ink); font-size: .97rem; font-weight: 760; cursor: pointer; }
.currency-trigger:hover { background: #e0ecf9; }
.currency-trigger:focus-visible { outline-offset: -4px; }
.currency-trigger:disabled { cursor: default; }
.currency-trigger[aria-expanded="true"] { background: #e0ecf9; }
.currency-trigger[aria-expanded="true"] .chevron { transform: rotate(180deg); }
.currency-icon { width: 28px; height: 28px; flex: none; }
.currency-trigger .chevron { width: 17px; height: 17px; color: var(--navy); }
.swap-row { display: flex; justify-content: center; margin-block: 9px; }
.swap { min-height: 44px; border: 1px solid #9eafc5; border-radius: 50%; background: #f3f8fe; }
.swap .icon { width: 19px; height: 19px; }
.swap:hover { background: #e2effb; }
.quote-note, .exchange-note, .form-status, .field-error { margin-top: 9px; color: var(--muted); font-size: .85rem; }
.field-error, .form-status[data-error="true"] { color: var(--error); }
.exchange-submit { width: 100%; min-height: 54px; margin-top: 20px; font-size: 1.18rem; }
.exchange-note { display: flex; align-items: flex-start; gap: 8px; margin-top: 13px; }
.exchange-note .icon { width: 18px; height: 18px; }
.referral-entry { grid-area: referral; max-width: 460px; border-radius: 15px; padding: 15px; }
.referral-entry p { margin-bottom: 8px; color: var(--muted); font-size: .87rem; }
.referral-entry [data-kind="error"] { color: var(--error); }
.referral-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.site-footer { padding-block: 8px max(18px, env(safe-area-inset-bottom)); border-top: 1px solid var(--border); background: #f6f9fec4; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 0 20px; font-size: .86rem; color: #324662; }
.footer-nav a { display: inline-flex; align-items: center; min-height: 44px; max-width: 100%; font-weight: 620; overflow-wrap: anywhere; }
.footer-nav a:hover, .footer-legal a { text-decoration: underline; text-underline-offset: 3px; }
.footer-legal { color: var(--muted); font-size: .82rem; }

.picker {
  width: min(402px, calc(100% - 32px));
  max-height: min(650px, calc(100dvh - 32px));
  padding: 15px;
  border: 1px solid #fff;
  border-radius: 19px;
  background: #f6faff;
  color: var(--ink);
  box-shadow: 0 18px 65px #142d4e3b;
}
.picker[open] { display: flex; flex-direction: column; overflow: hidden; }
.picker:popover-open {
  position: fixed;
  inset: var(--picker-top, auto) auto var(--picker-bottom, auto) var(--picker-left, 12px);
  display: flex;
  flex-direction: column;
  width: min(265px, calc(100% - 24px));
  max-height: min(540px, var(--picker-height, calc(100dvh - 24px)));
  margin: 0;
  padding: 7px;
  overflow: hidden;
  border-color: #e3edf8;
  border-radius: 15px;
  box-shadow: 0 12px 36px #142d4e2c;
}
.picker::backdrop { background: #142d4e58; }
.picker:popover-open::backdrop { background: transparent; }
.picker-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; flex: none; align-items: center; gap: 6px; }
.picker h2 { grid-column: 1; grid-row: 1; padding-left: 4px; font-size: 1.25rem; letter-spacing: -.03em; }
.picker-close { grid-column: 2; grid-row: 1; }
.picker-close:hover { background: #e1effa; }
.picker-search { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; min-height: 46px; padding-inline: 10px; border: 1px solid var(--control); border-radius: 11px; background: #fff; color: var(--navy); }
.picker:popover-open h2 { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.picker:popover-open .picker-search { grid-column: 1; grid-row: 1; }
.picker-search .icon { width: 20px; height: 20px; }
.picker-search > input { min-width: 0; width: 100%; min-height: 44px; border: 0; background: transparent; color: var(--ink); }
.picker-search > input::placeholder { color: var(--muted); opacity: 1; }
.picker-search > input:focus-visible { outline-offset: -2px; border-radius: 7px; }
.picker-options { display: grid; gap: 2px; min-height: 0; overflow: auto; overscroll-behavior: contain; list-style: none; margin: 8px 0 0; padding: 3px; }
.picker-options button { display: flex; width: 100%; min-height: 46px; align-items: center; gap: 10px; text-align: left; padding: 4px 9px; border: 0; border-radius: 9px; background: transparent; color: var(--ink); cursor: pointer; }
.picker-options button:hover { background: #e4effa; }
.picker-options button[aria-pressed="true"] { background: #e0f3ed; }
.picker-options button:disabled { color: var(--muted); cursor: default; }
.picker-options button:focus-visible { outline-offset: -2px; }
.picker:popover-open .picker-options { gap: 0; margin-top: 5px; scrollbar-width: thin; scrollbar-color: #a4b8ce transparent; }
.picker:popover-open .picker-options button { min-height: 40px; padding-block: 3px; }
@media (pointer: coarse) { .picker:popover-open .picker-options button { min-height: 44px; } }
.picker-options :is(strong, small) { display: block; line-height: 1.2; }
.picker-options small { color: var(--muted); margin-top: 3px; }
.picker:popover-open .picker-options strong { font-size: .92rem; }
.picker:popover-open .picker-options small { margin-top: 1px; font-size: .75rem; }
.current-check { margin-left: auto; color: #197250; }
.picker-empty { margin: 12px 4px 5px; color: var(--muted); }

@media (max-width: 1020px) {
  .header-inner { min-height: 69px; }
  .header-inner > .brand { --brand-height: 50px; }
  .hero {
    grid-template-areas: "intro exchange" "benefits exchange" "art exchange" "referral exchange";
    grid-template-rows: auto auto 1fr auto;
    gap: 18px 24px;
    padding-bottom: 48px;
  }
  .hero-coins { position: static; grid-area: art; justify-self: end; width: min(36vw, 292px); height: clamp(176px, 24vw, 220px); margin-block: -9px -12px; }
  .hero-arc { width: 65%; height: min(76%, 62vw); }
}
@media (width < 1024px) {
  .picker { position: fixed; inset: auto 0 0; width: min(100%, 470px); max-height: min(640px, 87dvh); margin: 0 auto; padding-bottom: max(14px, env(safe-area-inset-bottom)); border-radius: 21px 21px 0 0; }
}
@media (max-width: 690px) {
  .header-inner { min-height: 63px; gap: 9px; }
  .header-actions { gap: 6px; }
  .header-actions .button { min-height: 44px; padding-inline: 10px; font-size: .84rem; }
  .header-inner > .brand { --brand-height: 42px; }
  .hero { grid-template-columns: minmax(0, 1fr); grid-template-areas: "intro" "art" "exchange" "referral" "benefits"; grid-template-rows: auto; gap: 12px; padding-block: 19px 33px; }
  .hero-intro { padding-top: 0; }
  .hero h1 { max-width: 10.9em; font-size: clamp(2rem, 8vw, 3rem); }
  .lead { max-width: 38ch; margin-top: 10px; font-size: .95rem; }
  .hero-coins { position: static; z-index: -1; grid-area: art; justify-self: center; width: min(69vw, 244px); height: 142px; margin-block: -8px -18px; }
  .hero-arc { top: 68px; left: 16%; width: 68%; height: 220px; }
  .exchange-card { border-radius: 21px; padding: 17px; }
  .card-head { margin-bottom: 8px; }
  .card-brand { --brand-height: 37px; }
  .benefits { margin-top: 4px; max-width: none; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .benefits li { align-items: flex-start; gap: 7px; }
  .benefits strong { font-size: .89rem; }
  .benefits p { font-size: .78rem; line-height: 1.32; }
  .icon-tile { width: 34px; height: 34px; border-radius: 10px; }
  .icon-tile .icon { width: 19px; height: 19px; }
}
@media (max-width: 430px) {
  .header-register { display: none; }
  .footer-nav { flex-direction: column; align-items: flex-start; }
  .footer-legal { margin-top: 6px; }
}
@media (max-width: 390px) {
  .hero { gap: 8px; padding-top: 16px; }
  .hero-coins { height: 119px; }
  .exchange-card { padding: 14px; }
  .card-head { margin-bottom: 6px; }
  .swap-row { margin-block: 4px; }
  .exchange-submit { margin-top: 12px; }
  .exchange-note { margin-top: 8px; }
}
@media (forced-colors: active) {
  .field-row:focus-within { outline: 2px solid Highlight; outline-offset: -1px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; } }
