/* ============================================================
   VESNA-like style: warm cream background, ink text,
   one accent, big tight headings, pill buttons, soft cards
   ============================================================ */

/* ============ Fonts (TTNorms) ============ */
@font-face {
  font-family: "TTNorms";
  src: url("fonts/TTNorms-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "TTNorms";
  src: url("fonts/TTNorms-Medium.otf") format("opentype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "TTNorms";
  src: url("fonts/TTNorms-Bold.otf") format("opentype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "TTNorms";
  src: url("fonts/TTNorms-ExtraBold.otf") format("opentype");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #F7F7F8;
  --surface: #FFFFFF;
  --ink: #17171A;
  --ink-soft: #75757D;
  --accent: #67509C;
  --ok: #1F9D55;
  --err: #D8391F;
  --line: rgba(23, 23, 26, 0.12);
  --radius: 20px;
  --font: 'TTNorms', 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img { display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; }

/* ============ Top bar ============ */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  gap: 20px;
  padding: 18px clamp(20px, 4vw, 44px);
}
.topbar__logo { display: flex; align-items: center; gap: 12px; }
.topbar__logo img { height: 26px; width: auto; }
.topbar__logo-text { font-weight: 800; font-size: 18px; letter-spacing: 0.02em; }
.topbar__contacts {
  display: flex;
  gap: 24px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
}
.topbar__link { transition: color 0.2s; }
.topbar__link:hover { color: var(--accent); }

/* ============ Hero (вводная часть) ============ */
.hero { margin-bottom: 0; }
.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 40px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 56px 24px 64px;
}
.hero__title {
  font-size: clamp(32px, 5.4vw, 56px);
  line-height: 1.18;
  font-weight: 500;
  letter-spacing: -2px;
}
.hero__title .accent { color: var(--accent); }
.hero__aside {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 22px;
  padding-bottom: 6px;
}
.hero__desc {
  max-width: 300px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
}
.hero__band {
  background: #212126;
  position: relative;
  overflow: hidden;
}
.hero__mark {
  max-width: 1129px;
  margin: 0 auto;
  padding: 40px 24px;
}
.hero__mark img {
  display: block;
  width: 100%;
  height: auto;
  opacity: 0.5;
}

/* ============ Page & state switching ============ */
.page {
  flex: 1;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 40px 24px 56px;
}
.state { display: none; }
body.is-loading .state--loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40vh;
}
body.is-success .state--success { display: block; }
body.is-error .state--error {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 30vh;
}

/* ============ Loading ============ */
.loader-card {
  text-align: center;
  width: 100%;
}
.loader-card__logo { margin: 0 auto 32px; height: 34px; width: auto; }
.loader-card__spinner { margin: 0 auto 28px; animation: spin 1s linear infinite; }
.loader-card__title { font-size: 18px; font-weight: 600; }
.loader-card__sub { margin-top: 8px; font-size: 14px; color: var(--ink-soft); }

/* ============ Success ============ */
.success {
  display: flex;
  align-items: flex-start;
  gap: 32px;
  animation: fade-rise 0.6s ease both;
}
.success__main {
  flex-shrink: 0;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  max-width: 340px;
}
.success__icon { width: 44px; height: 44px; margin-top: 4px; animation: pop 0.55s cubic-bezier(0.2, 0.9, 0.3, 1.4) 0.1s both; }
.success__text {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chip {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ok);
}
.success__title {
  margin: 0;
  font-size: clamp(26px, 4vw, 36px);
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.success__title .accent { color: var(--accent); }

.success__data {
  flex: 1;
  min-width: 0;
  border-left: 1px solid var(--line);
  padding-left: 32px;
}

.card-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 8px;
}

.ip-card {
  max-width: 440px;
}
.ip-card__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.ip-card__value {
  font-family: var(--mono);
  font-size: clamp(17px, 3vw, 22px);
  font-weight: 500;
  letter-spacing: -0.01em;
  word-break: break-all;
}
.copy-btn {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.copy-btn:hover { border-color: var(--ink); }
.copy-btn.copied { background: var(--ok); border-color: var(--ok); color: #fff; }
.copy-btn__icon--done { display: none; }
.copy-btn.copied .copy-btn__icon:first-child { display: none; }
.copy-btn.copied .copy-btn__icon--done { display: block; }

.decision-card {
  margin-top: 22px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
  max-width: 520px;
}
.decision-card__text {
  font-size: clamp(14px, 2vw, 16px);
  line-height: 1.55;
  color: var(--ink);
}

/* ============ Error (компактный, две колонки) ============ */
.error-card {
  width: 100%;
  max-width: 860px;
  display: flex;
  align-items: flex-start;
  gap: 32px;
  animation: fade-rise 0.5s ease both;
}
.error-card__main {
  flex-shrink: 0;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  max-width: 340px;
}
.error-card__icon { width: 44px; height: 44px; margin-top: 4px; }
.error-card__title { margin: 0; font-size: clamp(20px, 3.4vw, 26px); font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
.error-card__detail {
  flex: 1;
  min-width: 0;
  border-left: 1px solid var(--line);
  padding-left: 32px;
}
.error-card__reason { margin: 0; font-size: 14px; line-height: 1.5; color: var(--ink-soft); }
.error-card__detail .btn { margin-top: 18px; }

/* ============ Buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
  padding: 15px 28px;
  border-radius: 999px;
  border: none;
  transition: transform 0.2s, box-shadow 0.2s;
}
.btn__arrow { display: inline-block; transition: transform 0.2s; }
.btn:hover .btn__arrow { transform: translateX(4px); }
.btn--accent {
  background: var(--accent);
  color: #fff;
  margin-top: 32px;
}
.btn--accent:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px -12px rgba(103, 80, 156, 0.5);
}

/* ============ Footer ============ */
.footer {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding: 48px clamp(20px, 4vw, 44px) 28px;
}
.footer__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 320px));
  gap: 40px;
  max-width: 1080px;
  margin: 0 auto 40px;
}
.footer__title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 16px;
}
.footer__list li { font-size: 14px; margin-bottom: 10px; }
.footer__list a { transition: color 0.2s; }
.footer__list a:hover { color: var(--accent); }
.footer__bottom {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
  font-size: 13px;
  color: var(--ink-soft);
}

/* ============ Animations ============ */
@keyframes fade-rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pop {
  from { opacity: 0; transform: scale(0.6); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============ Responsive ============ */
@media (max-width: 900px) {
  .hero__inner {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 28px;
    padding: 40px 20px 48px;
  }
  .hero__aside { padding-bottom: 0; }
}
@media (max-width: 720px) {
  .success {
    flex-direction: column;
    gap: 20px;
  }
  .success__main { max-width: none; }
  .success__data {
    width: 100%;
    border-left: none;
    padding-left: 0;
    border-top: 1px solid var(--line);
    padding-top: 18px;
  }
  .error-card {
    flex-direction: column;
    gap: 20px;
    max-width: none;
  }
  .error-card__main { max-width: none; }
  .error-card__detail {
    width: 100%;
    border-left: none;
    padding-left: 0;
    border-top: 1px solid var(--line);
    padding-top: 18px;
  }
}
@media (max-width: 640px) {
  .topbar__contacts { gap: 14px; font-size: 12px; }
  .footer__grid { grid-template-columns: 1fr; gap: 28px; }
  .footer__bottom { flex-direction: column; gap: 8px; }
  .hero__mark { padding: 28px 16px; }
}
@media (max-width: 420px) {
  .topbar__contacts a:first-child { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

