@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@500;700;900&display=swap');

:root {
  --ink: #1b1c34;
  --ink-2: #444868;
  --muted: #646a8e;
  --eth: #627eea;
  --eth-mid: #5468d8;
  --eth-deep: #3b4bb0;
  --eth-soft: #8fa4f2;
  --pearl: #f6f7fd;
  --mist: #eef1fd;
  --line: #dde1f5;
  --night: #14152b;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--pearl);
  background-image: linear-gradient(180deg, #e9edfd 0, var(--pearl) 560px);
  background-repeat: no-repeat;
}

h1, h2, h3, label, button, .label {
  font-family: 'Roboto', Arial, sans-serif;
}

/* ---------- Фоновый ромб Ethereum (две половинки) ---------- */
body::before,
body::after {
  content: "";
  position: fixed;
  top: 110px;
  right: -70px;
  width: 360px;
  height: 570px;
  pointer-events: none;
  z-index: 0;
}

body::before {
  clip-path: polygon(50% 0, 100% 55%, 50% 74%, 0 55%);
  background: linear-gradient(160deg, rgba(98, 126, 234, 0.22), rgba(98, 126, 234, 0.05));
}

body::after {
  clip-path: polygon(0 63%, 50% 82%, 100% 63%, 50% 100%);
  background: linear-gradient(160deg, rgba(98, 126, 234, 0.13), rgba(143, 164, 242, 0.04));
}

main,
.info-block,
.footer {
  position: relative;
  z-index: 1;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid var(--eth-deep);
  outline-offset: 3px;
}

/* ---------- Шапка / логотип ---------- */
.logo-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  padding: 14px max(20px, calc((100vw - 1080px) / 2));
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.logo-header a {
  display: inline-flex;
  align-items: center;
}

.logo-img {
  height: 36px;
  display: block;
  margin: 0;
}

/* ---------- Главная панель с формой ---------- */
.container {
  position: relative;
  max-width: 760px;
  margin: 56px auto 0;
  padding: 44px 44px 44px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 28px 56px -28px rgba(59, 75, 176, 0.30);
}

h1 {
  position: relative;
  margin: 0 0 32px;
  padding: 84px 0 0;
  font-size: clamp(30px, 5vw, 46px);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-align: left;
  color: var(--ink);
}

/* Иконка-ромб над заголовком */
h1::before,
h1::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 40px;
  height: 60px;
}

h1::before {
  clip-path: polygon(50% 0, 100% 55%, 50% 74%, 0 55%);
  background: linear-gradient(135deg, var(--eth), var(--eth-deep));
}

h1::after {
  clip-path: polygon(0 63%, 50% 82%, 100% 63%, 50% 100%);
  background: linear-gradient(135deg, var(--eth-soft), var(--eth));
}

/* ---------- Форма ---------- */
form br { display: none; }

label {
  display: block;
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}

input[type="text"],
input[type="number"] {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 16px 18px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  color: var(--ink);
  background: var(--pearl);
  border: 2px solid var(--line);
  border-radius: 12px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

input[type="text"]::placeholder,
input[type="number"]::placeholder {
  color: #858bab;
}

input[type="text"]:focus,
input[type="number"]:focus {
  background: #fff;
  border-color: var(--eth);
  box-shadow: 0 0 0 5px rgba(98, 126, 234, 0.2);
}

button {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 20px 0 0;
  padding: 17px 28px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.2px;
  color: #fff;
  background: linear-gradient(135deg, var(--eth-mid), var(--eth-deep));
  border: none;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 12px 24px -10px rgba(59, 75, 176, 0.65);
  transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
}

button:hover {
  transform: translateY(-2px);
  filter: brightness(1.07);
  box-shadow: 0 16px 30px -10px rgba(59, 75, 176, 0.75);
}

button:active {
  transform: translateY(0);
}

/* ---------- Результат (если генерируется JS) ---------- */
.result-box {
  margin-top: 24px;
  padding: 22px;
  font-size: 16px;
  text-align: center;
  color: var(--ink);
  background: var(--mist);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.result-box img,
.container canvas {
  max-width: 100%;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
}

/* ---------- SEO-текст ---------- */
.seo-section {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 40px auto 0;
  padding: 44px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink-2);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
}

.seo-section h1,
.seo-section h2,
.seo-section h3 {
  color: var(--ink);
}

.seo-section h2 {
  margin: 48px 0 14px;
  font-size: 27px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.seo-section h2::before {
  content: "";
  display: inline-block;
  width: 12px;
  height: 14px;
  margin-right: 12px;
  vertical-align: 0.05em;
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  background: linear-gradient(135deg, var(--eth), var(--eth-deep));
}

.seo-section h3 {
  margin: 30px 0 6px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--eth-deep);
}

.seo-section p {
  margin: 0 0 18px;
}

.seo-section > p:first-child {
  font-size: 18px;
  color: var(--ink);
}

.seo-section strong,
.seo-section b {
  font-weight: 700;
  color: var(--ink);
}

.seo-section em {
  font-style: italic;
  color: var(--eth-deep);
}

.seo-section a {
  color: var(--eth-deep);
  text-underline-offset: 3px;
}

.seo-section ul,
.seo-section ol {
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
}

.seo-section ol { counter-reset: step; }

.seo-section li {
  position: relative;
  margin: 0 0 12px;
  padding-left: 36px;
}

.seo-section ol li { counter-increment: step; }

.seo-section ul li::before {
  content: "";
  position: absolute;
  top: 0.62em;
  left: 8px;
  width: 10px;
  height: 12px;
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  background: var(--eth);
}

.seo-section ol li::before {
  content: counter(step);
  position: absolute;
  top: 0.2em;
  left: 0;
  width: 24px;
  height: 24px;
  font-family: 'Roboto', Arial, sans-serif;
  font-size: 13px;
  font-weight: 700;
  line-height: 24px;
  text-align: center;
  color: var(--eth-deep);
  background: var(--mist);
  border-radius: 8px;
}

/* ---------- Блок контактов (подвал) ---------- */
.info-block {
  margin: 64px 0 0;
  padding: 44px 24px 52px;
  text-align: center;
  color: #d5daf5;
  background: var(--night);
  border-top: 4px solid var(--eth);
}

.info-block .label {
  margin-bottom: 8px;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

.info-block .value p {
  margin: 6px 0;
  word-break: break-word;
}

.info-block a {
  color: #b9c6fb;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: rgba(185, 198, 251, 0.5);
  transition: color 0.2s;
}

.info-block a:hover {
  color: #fff;
}

.footer {
  max-width: 760px;
  margin: 48px auto 30px;
  font-size: 14px;
  text-align: center;
  color: var(--muted);
}

/* ---------- Mobile ---------- */
@media (max-width: 900px) {
  body::before,
  body::after {
    width: 240px;
    height: 380px;
    right: -60px;
    top: 90px;
  }
}

@media (max-width: 600px) {
  .logo-header { padding: 12px 16px; }
  .logo-img { height: 30px; }
  .container {
    margin: 28px 14px 0;
    padding: 30px 20px 28px;
    border-radius: 20px;
  }
  h1 { margin-bottom: 24px; padding-top: 74px; }
  h1::before,
  h1::after { width: 34px; height: 52px; }
  .seo-section {
    margin: 24px 14px 0;
    padding: 28px 20px;
    border-radius: 20px;
  }
  .seo-section h2 { font-size: 23px; margin-top: 38px; }
  .info-block { margin-top: 44px; }
}

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