:root {
  --blue: #0056c7;
  --blue-700: #0047a5;
  --ink: #16263f;
  --ink-soft: #3c5170;
  --muted: #7d90ab;
  --line: rgba(22, 38, 63, 0.14);
  --field-bg: rgba(255, 255, 255, 0.55);
  --field-border: rgba(22, 38, 63, 0.16);
  --shadow: 0 24px 60px -28px rgba(16, 47, 99, 0.45);
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: #e9f0f7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---------- Orqa fon ---------- */
.bg {
  position: fixed;
  inset: 0;
  background: url("/assets/background.png") center center / cover no-repeat;
  transform: scale(1.04);
  filter: saturate(1.05);
  z-index: -3;
  animation: breathe 15s ease-in-out infinite;
}
@keyframes breathe {
  0%   { transform: scale(1.06) translate(0, 0); }
  50%  { transform: scale(1.15) translate(-1.4%, -1%); }
  100% { transform: scale(1.06) translate(0, 0); }
}
/* Yengil oqimtir parda — qo‘l ko‘rinib tursin, matn esa o‘qilsin */
.bg-veil {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(115% 80% at 50% 40%, rgba(255, 255, 255, 0) 0%, rgba(244, 249, 255, 0.08) 55%, rgba(232, 242, 252, 0.42) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0.04) 20%, rgba(255, 255, 255, 0.04) 72%, rgba(232, 242, 252, 0.55) 100%);
}
.grain {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Yon yozuvlar ---------- */
.edge {
  position: fixed;
  top: 50%;
  font-size: 11px;
  letter-spacing: 0.42em;
  color: var(--muted);
  text-transform: uppercase;
  writing-mode: vertical-rl;
  transform: translateY(-50%);
  z-index: 2;
}
.edge--left { left: 26px; transform: translateY(-50%) rotate(180deg); }
.edge--right { right: 26px; }

.accent-line {
  position: fixed;
  right: 26px;
  bottom: 34px;
  width: 74px;
  height: 2px;
  background: var(--blue);
  z-index: 2;
  transform-origin: right center;
  animation: lineGrow 1.1s 0.9s both cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes lineGrow { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ---------- Markaz ---------- */
.stage {
  position: relative;
  z-index: 1;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 64px 24px;
}

.kicker {
  margin: 0 0 38px;
  font-size: 11px;
  letter-spacing: 0.45em;
  color: var(--ink-soft);
  text-transform: uppercase;
  font-weight: 600;
}

.mark { margin-bottom: 22px; }
.mark img {
  display: block;
  filter: drop-shadow(0 10px 24px rgba(0, 86, 199, 0.25));
  animation: floatY 5.5s ease-in-out 1.3s infinite;
}
@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

.wordmark {
  margin: 0;
  font-family: "Jost", sans-serif;
  font-weight: 300;
  font-size: clamp(2.4rem, 9vw, 5.2rem);
  letter-spacing: 0.14em;
  line-height: 1;
  color: var(--ink);
  text-transform: lowercase;
}
.wordmark .dot { color: var(--blue); }

.subline {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 22px 0 0;
}
.subline .rule { width: 46px; height: 1px; background: var(--line); }
.subline .sub {
  font-family: "Jost", sans-serif;
  font-weight: 400;
  font-size: 13px;
  letter-spacing: 0.55em;
  color: var(--blue);
  text-indent: 0.55em;
}

.lede {
  margin: 30px 0 0;
  width: 100%;
  max-width: 30rem;
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink-soft);
}

/* ---------- Countdown ---------- */
.countdown {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 40px 0 4px;
}
.cd { display: flex; flex-direction: column; align-items: center; min-width: 62px; }
.cd-num {
  font-family: "Jost", sans-serif;
  font-weight: 300;
  font-size: clamp(2rem, 6vw, 2.9rem);
  line-height: 1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}
.cd-num.tick { animation: tick 0.45s cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes tick {
  0% { opacity: 0.35; transform: translateY(-7px); }
  100% { opacity: 1; transform: translateY(0); }
}
.cd-lbl {
  margin-top: 8px;
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
}
.cd-sep {
  font-family: "Jost", sans-serif;
  font-weight: 200;
  font-size: clamp(1.6rem, 5vw, 2.4rem);
  color: var(--line);
  line-height: 1.1;
  transform: translateY(2px);
}

/* ---------- Forma ---------- */
.lead-form {
  display: flex;
  gap: 10px;
  margin-top: 38px;
  width: min(540px, 100%);
  flex-wrap: wrap;
  justify-content: center;
}
.field { flex: 1 1 180px; min-width: 0; }
.field input {
  width: 100%;
  height: 52px;
  padding: 0 18px;
  font-family: inherit;
  font-size: 15px;
  color: var(--ink);
  background: var(--field-bg);
  border: 1px solid var(--field-border);
  border-radius: 12px;
  backdrop-filter: blur(8px);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.field input::placeholder { color: var(--muted); }
.field input:focus {
  outline: none;
  border-color: var(--blue);
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 0 0 4px rgba(0, 86, 199, 0.12);
}
.field input.invalid { border-color: #d64545; box-shadow: 0 0 0 4px rgba(214, 69, 69, 0.12); }

.btn {
  flex: 0 0 auto;
  height: 52px;
  padding: 0 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: var(--blue);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: background 0.2s, transform 0.12s, box-shadow 0.2s;
}
.btn { position: relative; overflow: hidden; }
.btn::after {
  content: "";
  position: absolute;
  top: 0;
  left: -120%;
  width: 60%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-18deg);
  transition: left 0.6s ease;
}
.btn:hover::after { left: 140%; }
.btn:hover { background: var(--blue-700); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.65; cursor: default; }
.btn-spinner {
  display: none;
  width: 16px; height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.btn.loading .btn-spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

.form-msg {
  margin: 16px 0 0;
  min-height: 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
}
.form-msg.ok { color: var(--blue); }
.form-msg.err { color: #c23b3b; }

/* Muvaffaqiyatdan keyin formani yashirish */
.lead-form.done { display: none; }

/* ---------- Aloqa ---------- */
.contacts {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 46px;
}
.contact {
  font-size: 14px;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 0.2s;
}
.contact:hover { color: var(--blue); }
.contact-sep { width: 1px; height: 16px; background: var(--line); }
.socials { display: flex; gap: 10px; }
.soc {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.5);
  transition: all 0.2s;
}
.soc:hover { color: #fff; background: var(--blue); border-color: var(--blue); transform: translateY(-2px); }

/* ---------- Kirish animatsiyasi ---------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  animation: revealUp 0.9s var(--d, 0ms) both cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes revealUp { to { opacity: 1; transform: translateY(0); } }

@media (prefers-reduced-motion: reduce) {
  .reveal, .accent-line, .bg, .mark img, .cd-num.tick { animation: none; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Responsiv ---------- */
@media (max-width: 560px) {
  .edge { display: none; }
  .countdown { gap: 4px; }
  .cd { min-width: 50px; }
  .cd-lbl { letter-spacing: 0.16em; }
  .lead-form { flex-direction: column; gap: 12px; }
  .field, .btn { width: 100%; flex: 0 0 auto; }
  .stage { padding: 56px 20px; }
  .kicker { font-size: 9px; letter-spacing: 0.22em; }
  .lede { font-size: 14px; }
  .wordmark { font-size: clamp(2rem, 8.4vw, 3rem); letter-spacing: 0.06em; }
  /* Telefon uchun alohida vertikal orqa fon */
  .bg {
    background-image: url("/assets/background-phone.png");
    transform: scale(1);
    animation: breathePhone 15s ease-in-out infinite;
    -webkit-mask-image: radial-gradient(150% 80% at 50% 32%, #000 60%, transparent 100%);
    mask-image: radial-gradient(150% 80% at 50% 32%, #000 60%, transparent 100%);
  }
  @keyframes breathePhone {
    0%   { transform: scale(1.02) translate(0, 0); }
    50%  { transform: scale(1.1) translate(0, -1.4%); }
    100% { transform: scale(1.02) translate(0, 0); }
  }
}
