/* =========================================================
   Bobur Naves — Ishga qabul sayti
   Ranglar (Naves brendi bilan bir xil):
     --orange  #F5771D
     --ink     #0A0A0A
     --paper   #E7E5E1
   ========================================================= */

:root {
  --orange: #F5771D;
  --orange-dark: #DC6510;
  --ink: #0A0A0A;
  --ink-soft: #3A3A3A;
  --paper: #E7E5E1;
  --white: #FFFFFF;
  --panel: #151515;
  --muted: #9A9A9A;
  --field-bg: #FAFAF9;
  --field-border: #DCDAD6;
  --danger: #E03131;

  --card-max: 520px;
  --pad-x: 26px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
}

body {
  font-family: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  justify-content: center;
  min-height: 100vh;
}

img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

@keyframes bnRise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

/* =========================================================
   Card
   ========================================================= */

.card {
  width: 100%;
  max-width: var(--card-max);
  background: var(--white);
  box-shadow: 0 0 0 1px rgba(10, 10, 10, 0.06);
  overflow: hidden;
}

/* =========================================================
   Hero
   ========================================================= */

.hero {
  position: relative;
  padding: 32px var(--pad-x) 26px;
  background: var(--white);
  animation: bnRise .5s ease both;
}

.hero__accent {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 6px;
  background: var(--orange);
}

.hero__logo {
  display: flex;
  justify-content: center;
  padding: 12px 0 2px;
}

.hero__logo img {
  width: 168px;
  height: auto;
  object-fit: contain;
}

.hero__title-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.hero__title {
  margin: 0;
  width: 100%;
  font-family: 'Archivo Black', 'Archivo', sans-serif;
  font-size: clamp(26px, 7.4vw, 34px);
  line-height: 1.1;
  letter-spacing: -0.5px;
  white-space: nowrap;
  text-align: center;
}

.hero__title span { color: var(--orange); }

.hero__tagline {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  justify-content: center;
}

.hero__rule {
  flex: 1;
  max-width: 54px;
  height: 2px;
  background: var(--ink);
}

.hero__tagline-text {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
}

/* =========================================================
   Til almashtirgich (UZ / RU)
   ========================================================= */

.lang-switch {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  border: 1.5px solid var(--ink);
  background: var(--white);
}

.lang-switch__btn {
  appearance: none;
  border: none;
  background: transparent;
  padding: 7px 11px;
  font-family: 'Archivo', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--ink);
  cursor: pointer;
  transition: background .18s ease, color .18s ease;
}

.lang-switch__btn:hover { color: var(--orange); }
.lang-switch__btn.is-active { background: var(--ink); color: var(--white); }
.lang-switch__btn.is-active:hover { color: var(--white); }

.lang-switch__sep {
  width: 1.5px;
  align-self: stretch;
  background: var(--ink);
}

/* =========================================================
   Intro
   ========================================================= */

.intro {
  padding: 4px var(--pad-x) 26px;
}

.intro p {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-soft);
  text-align: center;
  text-wrap: pretty;
}

/* =========================================================
   Section heading
   ========================================================= */

.section-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.section-head__num {
  font-family: 'Archivo Black', sans-serif;
  font-size: 12px;
  letter-spacing: 3px;
  color: var(--orange);
}

.section-head__title {
  margin: 0;
  font-family: 'Archivo Black', 'Archivo', sans-serif;
  font-size: 20px;
  letter-spacing: 0.4px;
  color: var(--ink);
}

/* =========================================================
   Anketa
   ========================================================= */

.apply {
  padding: 28px var(--pad-x) 30px;
}

.apply-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 400px) {
  .row2 { grid-template-columns: 1fr; }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.field__label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #6A6A6A;
}

.field__req { color: var(--orange); }

.field__opt {
  color: #A0A0A0;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: none;
}

.field__hint {
  font-size: 12px;
  color: #8A8A8A;
  letter-spacing: 0;
  text-transform: none;
}

.field input,
.field textarea {
  padding: 0 14px;
  border: 1.5px solid var(--field-border);
  background: var(--field-bg);
  font-size: 16px;
  font-family: inherit;
  color: var(--ink);
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.field input { height: 50px; }

.field textarea {
  padding: 12px 14px;
  resize: vertical;
  min-height: 82px;
}

.field input:focus,
.field textarea:focus { border-color: var(--orange); }

/* --- Viloyat tanlash (select) --- */
.select-wrap {
  position: relative;
  display: block;
}

.select-wrap select {
  width: 100%;
  height: 50px;
  padding: 0 40px 0 14px;
  border: 1.5px solid var(--field-border);
  background: var(--field-bg);
  font-size: 16px;
  font-family: inherit;
  color: var(--ink);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.select-wrap select:focus { border-color: var(--orange); }

/* placeholder (bo'sh qiymat) och rangda */
.select-wrap select:required:invalid { color: #9A9A9A; }
.select-wrap select option { color: var(--ink); }
.select-wrap select option[value=""] { color: #9A9A9A; }

.select-wrap__chev {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: var(--ink);
  pointer-events: none;
}

.select-wrap.is-invalid select {
  border-color: var(--danger);
  box-shadow: 0 0 0 2px rgba(224, 49, 49, 0.14);
}

/* --- Telefon prefiks --- */
.phone-input {
  display: flex;
  align-items: stretch;
  border: 1.5px solid var(--field-border);
  background: var(--field-bg);
  transition: border-color .15s ease, box-shadow .15s ease;
}

.phone-input__prefix {
  display: flex;
  align-items: center;
  padding: 0 10px 0 14px;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  border-right: 1.5px solid var(--field-border);
  user-select: none;
  white-space: nowrap;
}

.phone-input input {
  flex: 1;
  border: none;
  background: transparent;
  width: 100%;
}

.phone-input:focus-within { border-color: var(--orange); }

/* --- Xato holati --- */
.field input.is-invalid,
.field textarea.is-invalid,
.phone-input.is-invalid,
.photo-drop.is-invalid {
  border-color: var(--danger);
  box-shadow: 0 0 0 2px rgba(224, 49, 49, 0.14);
}

.phone-input.is-invalid .phone-input__prefix { border-right-color: var(--danger); }

/* =========================================================
   Surat yuklash zonasi
   ========================================================= */

.photo-drop {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 2px dashed var(--ink);
  background: var(--field-bg);
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease;
  overflow: hidden;
}

.photo-drop:hover,
.photo-drop--over {
  border-color: var(--orange);
  background: #FFF7F1;
}

.photo-drop__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 30px 20px;
  text-align: center;
}

.photo-drop__inner svg {
  width: 40px;
  height: 40px;
  color: var(--ink);
}

.photo-drop--over .photo-drop__inner svg,
.photo-drop:hover .photo-drop__inner svg { color: var(--orange); }

.photo-drop__text {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}

.photo-drop__hint {
  font-size: 12px;
  color: #8A8A8A;
}

/* tanlangandan keyin */
.photo-drop--filled {
  border-style: solid;
  border-color: var(--ink);
  background: var(--ink);
}

.photo-preview {
  position: relative;
  display: block;
}

.photo-preview img {
  width: 100%;
  max-height: 340px;
  object-fit: contain;
  background: #000;
  display: block;
}

.photo-preview__remove {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  line-height: 1;
  color: var(--white);
  background: rgba(10, 10, 10, 0.72);
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: background .15s ease;
}

.photo-preview__remove:hover { background: var(--danger); }

/* =========================================================
   Tugmalar + xabarlar
   ========================================================= */

.apply-form__error {
  margin: 0;
  font-size: 13px;
  color: var(--danger);
}

.btn-submit {
  min-height: 56px;
  background: var(--orange);
  color: var(--white);
  border: none;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.4px;
  transition: background .2s ease;
}

.btn-submit:hover { background: var(--orange-dark); }
.btn-submit:disabled { opacity: .6; cursor: default; }

.apply-form__privacy {
  margin: 2px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: #8A8A8A;
  text-align: center;
}

.apply-form__success {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 24px 10px 8px;
  text-align: center;
  animation: bnRise .3s ease both;
}

.apply-form__success svg { width: 46px; height: 46px; }

.apply-form__success-title {
  font-family: 'Archivo Black', sans-serif;
  font-size: 19px;
  color: var(--ink);
}

.apply-form__success-text {
  font-size: 14px;
  line-height: 1.55;
  color: #6A6A6A;
  max-width: 300px;
}

.btn-again {
  margin-top: 6px;
  min-height: 48px;
  padding: 0 22px;
  background: transparent;
  color: var(--ink);
  border: 2px solid var(--ink);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.4px;
  transition: background .18s ease, color .18s ease;
}

.btn-again:hover { background: var(--ink); color: var(--white); }

/* =========================================================
   Ishonch bloki
   ========================================================= */

.perks {
  padding: 26px var(--pad-x) 30px;
  background: var(--ink);
}

.perk-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.perk {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: var(--panel);
  font-size: 14px;
  font-weight: 600;
  color: var(--white);
}

.perk svg {
  width: 26px;
  height: 26px;
  flex: none;
  color: var(--orange);
}

/* =========================================================
   Footer
   ========================================================= */

.footer {
  padding: 24px var(--pad-x) 28px;
  background: var(--ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  border-top: 1px solid #222;
}

.footer__mark {
  width: 40px;
  height: 2px;
  background: var(--orange);
}

.footer__copy {
  margin: 0;
  font-size: 12px;
  color: #6A6A6A;
  text-align: center;
}

/* =========================================================
   Accessibility
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
}

:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}
