/* Ibtido Ta'lim — vebinar landinglari
   Brend: mis (#D97A3D), ko'mir (#1A1A1A), Playfair Display + Inter (ibtidotalim.uz)
   Qorong'i mavzu: "madrasa kechasi" — g'isht-jigarrang, firuza koshin, oltin chiroq. */

:root {
  --bg: #120E0B;
  --bg-outer: #0A0807;
  --ink: #FFFFFF;
  --ink-soft: rgba(255, 255, 255, .78);
  --muted: rgba(255, 255, 255, .5);
  --line: rgba(255, 255, 255, .12);
  --surface: rgba(255, 255, 255, .06);

  --copper: #D97A3D;
  --copper-dark: #B8612C;
  --copper-light: #E8A87C;
  --gold: #F1C27D;
  --teal: #2BA3A0;
  --teal-dark: #155553;

  --font-display: "Oswald", "Arial Narrow", sans-serif;
  --font-serif: "Playfair Display", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;

  --gutter: 18px;
  --radius: 18px;
}

.theme-light {
  --bg: #FAFAF7;
  --bg-outer: #F1EEE8;
  --ink: #1A1A1A;
  --ink-soft: #4A4A4A;
  --muted: #8A8580;
  --line: #E5E0D8;
  --surface: #FFFFFF;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
html.no-scroll, html.no-scroll body { overflow: hidden; }
body {
  min-height: 100vh;
  background: var(--bg-outer);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; }
b, strong { font-weight: 700; color: var(--ink); }

.page {
  position: relative;
  max-width: 440px;
  min-height: 100vh;
  margin: 0 auto;
  background: var(--bg);
  overflow: hidden;
}
@media (min-width: 480px) {
  body:not(.theme-light) { background: linear-gradient(rgba(10, 8, 7, .88), rgba(10, 8, 7, .88)), url("../img/girih.svg") 0 0 / 60px, var(--bg-outer); }
  .page { box-shadow: 0 0 0 1px var(--line), 0 30px 80px rgba(0, 0, 0, .45); }
}

/* ---------- Hero: tugma doim birinchi ekranda ko'rinadi ---------- */
.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 100vh;
  min-height: min(100svh, 920px);
  padding: 14px var(--gutter) 20px;
}
.hero > * { position: relative; z-index: 2; }
.hero > .layer { position: absolute; z-index: 0; pointer-events: none; }

/* Fon qatlamlari */
.layer--sky { inset: 0; background:
  radial-gradient(120% 55% at 50% 0%, #2B1D13 0%, rgba(43, 29, 19, 0) 62%),
  radial-gradient(70% 40% at 50% 62%, rgba(217, 122, 61, .38) 0%, rgba(217, 122, 61, 0) 70%),
  var(--bg); }
.layer--girih { inset: 0 0 45% 0; background: url("../img/girih.svg") center top / 54px;
  opacity: .09; -webkit-mask-image: linear-gradient(#000, transparent); mask-image: linear-gradient(#000, transparent); }
.layer--madrasa { left: -14%; right: -14%; bottom: 76px; height: 46%;
  background: url("../img/madrasa-facade.svg") center bottom / contain no-repeat; opacity: .55; }
.layer--madrasa::after { content: ""; position: absolute; left: 0; right: 0; bottom: -80px; height: 150px;
  background: linear-gradient(rgba(18, 14, 11, 0), var(--bg) 55%); }
.layer--teal { inset: 0; background:
  radial-gradient(90% 50% at 15% 30%, rgba(43, 163, 160, .45), rgba(43, 163, 160, 0) 65%),
  radial-gradient(60% 40% at 90% 70%, rgba(217, 122, 61, .3), rgba(217, 122, 61, 0) 70%); }

/* Sana / vaqt */
.meta {
  display: flex; align-items: center; justify-content: space-between;
  height: 44px; padding: 0 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .1);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  font-size: 15px; font-weight: 500;
}
.meta span { display: inline-flex; align-items: center; gap: 8px; }
.meta svg { width: 18px; height: 18px; color: var(--gold); flex: none; }
.meta--pill { align-self: center; gap: 12px; padding: 0 18px; height: 40px; font-size: 14.5px; }
.meta--pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--copper); box-shadow: 0 0 0 4px rgba(217, 122, 61, .18); }
.meta--pill .sep { width: 1px; height: 14px; background: currentColor; opacity: .3; }

.eyebrow {
  align-self: center;
  max-width: 100%;
  padding: 7px 14px;
  border-radius: 14px;
  background: rgba(241, 194, 125, .1);
  border: 1px solid rgba(241, 194, 125, .25);
  color: var(--gold);
  font-size: 14.5px; line-height: 1.32;
  text-align: center;
}
.eyebrow--logo { display: flex; align-items: center; gap: 10px; text-align: left; padding: 7px 14px 7px 8px; }
.eyebrow--logo img { width: 38px; height: 38px; border-radius: 10px; background: #fff; padding: 4px; object-fit: contain; flex: none; }

.title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(22px, 6.6vw, 29px);
  line-height: 1.14;
  letter-spacing: .2px;
  text-transform: uppercase;
  text-align: center;
  text-wrap: balance;
}
.title em { font-style: normal; color: var(--gold); }
.title--lg { font-size: clamp(25px, 7.6vw, 33px); }
.title--serif { font-family: var(--font-serif); font-weight: 700; text-transform: none; font-size: clamp(25px, 7.7vw, 35px); line-height: 1.12; letter-spacing: -.3px; }
.title--serif em { font-style: italic; color: var(--copper); letter-spacing: .6px; }
.lead { font-size: clamp(15px, 4.3vw, 17px); line-height: 1.5; color: var(--ink-soft); text-align: center; text-wrap: pretty; }

/* Rasm maydoni — qolgan bo'sh joyni egallaydi, ekran kichik bo'lsa kichrayadi */
.photo { position: relative; flex: 1 1 0; min-height: 210px; margin: 0 calc(var(--gutter) * -1); }
.photo__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: center bottom; }
/* rasm pastini tugmaga silliq ulash */
.photo__img, .photo .portal {
  -webkit-mask-image: linear-gradient(#000 calc(100% - 48px), transparent);
  mask-image: linear-gradient(#000 calc(100% - 48px), transparent); }

.nametag {
  position: absolute; z-index: 4; left: var(--gutter); bottom: 14px;
  padding: 8px 12px 9px;
  border-radius: 12px;
  background: rgba(18, 14, 11, .72);
  border: 1px solid rgba(241, 194, 125, .3);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  line-height: 1.25;
}
.nametag b { display: block; font-size: 15px; color: #fff; }
.nametag span { font-size: 12.5px; color: var(--gold); }
.theme-light .nametag { background: rgba(255, 255, 255, .88); border-color: rgba(255, 255, 255, .6); box-shadow: 0 6px 20px rgba(0, 0, 0, .12); }
.theme-light .nametag b { color: var(--ink); }
.theme-light .nametag span { color: var(--copper-dark); }

/* 1-variant: kartochka */
.photo--card { margin: 0; border-radius: 22px; overflow: hidden; background: #E9E2D6; box-shadow: 0 20px 50px -20px rgba(80, 50, 20, .45); }
.photo--card .photo__img { object-fit: cover; object-position: center 30%; -webkit-mask-image: none; mask-image: none; }

/* 2-variant: ravoq (arka) ichida */
.photo--arch .arch {
  position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
  height: 100%; aspect-ratio: 100 / 128; max-width: 84%;
}
.arch__inner {
  position: absolute; inset: 0;
  -webkit-mask: url("../img/arch-mask.svg") center / 100% 100% no-repeat;
  mask: url("../img/arch-mask.svg") center / 100% 100% no-repeat;
  background:
    radial-gradient(80% 55% at 50% 70%, rgba(241, 163, 95, .55), rgba(241, 163, 95, 0) 70%),
    url("../img/girih.svg") center / 40px,
    linear-gradient(#123F3E, #1B1410 85%);
}
.arch__inner img { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); width: 104%; max-width: none; height: 92%; object-fit: contain; object-position: center bottom; }
.arch__frame { position: absolute; inset: -6px; background: url("../img/arch-frame.svg") center / 100% 100% no-repeat; pointer-events: none; }

/* 3-variant: peshtoq oldida */
.photo--portal .portal { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); height: 96%; aspect-ratio: 300 / 380; max-width: 92%;
  background: url("../img/portal.svg") center bottom / 100% 100% no-repeat; border-radius: 4px 4px 0 0; box-shadow: 0 0 60px rgba(217, 122, 61, .25); }
.photo--portal .photo__img { top: auto; height: 84%; }

/* 5-variant: gumbaz doirasi */
.photo--dome .dome {
  position: absolute; left: 50%; top: 4%; transform: translateX(-50%);
  height: 84%; aspect-ratio: 1; max-width: 92%;
  border-radius: 50%;
  background:
    repeating-conic-gradient(from 0deg, rgba(255, 255, 255, .07) 0 5deg, rgba(255, 255, 255, 0) 5deg 15deg),
    radial-gradient(circle at 50% 38%, #3FB8B0 0%, #1B7A77 48%, #0E3F3E 78%);
  box-shadow: 0 0 0 3px rgba(241, 194, 125, .85), 0 0 0 10px rgba(241, 194, 125, .12), 0 0 80px rgba(43, 163, 160, .45);
}
.quote { font-family: var(--font-serif); font-style: italic; font-weight: 700; font-size: clamp(26px, 8vw, 34px); line-height: 1.1; text-align: center; color: var(--gold); }
.quote::before { content: "\201C"; margin-right: 2px; }
.quote::after { content: "\201D"; margin-left: 2px; }

/* 4-variant: ustozlar jamoasi */
.team { display: flex; justify-content: center; gap: 6px; margin-top: -6px; }
.team figure { width: 74px; text-align: center; }
.team img { width: 56px; height: 56px; margin: 0 auto 5px; border-radius: 50%; object-fit: cover; object-position: center 20%;
  border: 2px solid var(--gold); background: #2a201a; }
.team figcaption { font-size: 11px; line-height: 1.2; color: var(--ink-soft); }
.team figcaption b { display: block; font-size: 11.5px; color: #fff; font-weight: 600; }

/* ---------- Stikerlar ---------- */
.sticker {
  position: absolute; z-index: 4;
  width: var(--s, 60px); height: auto;
  transform: rotate(var(--r, 0deg));
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .45));
  animation: float 6s ease-in-out infinite;
  animation-delay: var(--d, 0s);
  pointer-events: none;
}
@keyframes float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -7px; }
}

/* ---------- CTA tugma ---------- */
.cta {
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 66px; padding: 0 20px;
  border-radius: 18px;
  background: linear-gradient(180deg, #F8D29A 0%, #EAA25E 52%, #D97A3D 100%);
  color: #3A1C06;
  font-weight: 800; font-size: clamp(18px, 5.4vw, 21px); letter-spacing: 1.4px; text-transform: uppercase;
  box-shadow: 0 12px 32px -8px rgba(217, 122, 61, .75), inset 0 1px 0 rgba(255, 255, 255, .65), inset 0 -3px 0 rgba(120, 50, 10, .25);
  animation: pulse 2.4s ease-in-out infinite;
}
.cta::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: -40%; width: 30%;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .55), rgba(255, 255, 255, 0));
  transform: skewX(-18deg);
  animation: shine 3.2s ease-in-out infinite;
}
.cta:active { transform: translateY(1px) scale(.99); }
.cta svg { width: 22px; height: 22px; flex: none; }
@keyframes pulse { 0%, 100% { scale: 1; } 50% { scale: 1.025; } }
@keyframes shine { 0% { left: -40%; } 55%, 100% { left: 120%; } }
.theme-light .cta { background: var(--copper); color: #fff; box-shadow: 0 14px 30px -10px rgba(217, 122, 61, .8), inset 0 -3px 0 rgba(0, 0, 0, .12); }
.cta-wrap { padding: 8px var(--gutter) 0; }

/* ---------- Taymer ---------- */
.urgent {
  position: relative;
  margin: 16px var(--gutter) 0;
  padding: 18px 16px 20px;
  border: 1.5px dashed rgba(255, 255, 255, .35);
  border-radius: 20px;
  text-align: center;
}
.urgent__title { font-family: var(--font-display); font-weight: 600; font-size: 22px; letter-spacing: .6px; text-transform: uppercase; }
.urgent__row { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 10px; font-family: var(--font-display); font-size: 26px; font-weight: 600; }
.urgent__box { min-width: 58px; height: 54px; border-radius: 12px; background: #fff; color: #1A1A1A; font-size: 32px; line-height: 54px; font-variant-numeric: tabular-nums; box-shadow: 0 6px 20px rgba(0, 0, 0, .3); }
.urgent.is-done .urgent__box { background: #F3D2B8; color: var(--copper-dark); }
.urgent .sticker { --s: 46px; }

/* ---------- Jonli darsda siz ---------- */
.benefits { padding: 34px var(--gutter) 6px; }
.section-title { margin-bottom: 16px; font-family: var(--font-display); font-weight: 600; font-size: 28px; text-transform: uppercase; text-align: center; letter-spacing: .4px; }
.section-title em { font-style: normal; color: var(--gold); }
.card {
  display: grid; grid-template-columns: 62px 1fr; gap: 14px; align-items: center;
  margin-bottom: 12px; padding: 16px 16px 16px 14px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, .075), rgba(255, 255, 255, .03));
  border: 1px solid var(--line);
}
.card__icon { position: relative; width: 62px; height: 62px; }
.card__icon img { width: 100%; height: 100%; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .35)); }
.card__num { position: absolute; right: -6px; bottom: -4px; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 12px;
  background: var(--copper); color: #fff; font: 700 13px/24px var(--font-body); text-align: center; box-shadow: 0 0 0 3px var(--bg); }
.card p { font-size: 15.5px; line-height: 1.45; color: var(--ink-soft); }
.card p b { color: #fff; }

/* ---------- Footer ---------- */
.footer { padding: 34px var(--gutter) 40px; text-align: center; color: var(--muted); font-size: 12.5px; line-height: 1.6; }
.footer img { width: 92px; margin: 0 auto 10px; opacity: .9; }

/* ---------- Ro'yxatdan o'tish modali ---------- */
.modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.modal[hidden] { display: none; }
.modal__overlay { position: absolute; inset: 0; background: rgba(8, 6, 5, .62); opacity: 0; transition: opacity .2s; }
.modal__panel {
  position: relative; width: 100%; max-width: 440px;
  padding: 26px 20px calc(24px + env(safe-area-inset-bottom));
  border-radius: 24px 24px 0 0;
  background: #FFFDF9; color: #1A1A1A;
  transform: translateY(100%); transition: transform .24s cubic-bezier(.2, .8, .2, 1);
}
.modal.is-open .modal__overlay { opacity: 1; }
.modal.is-open .modal__panel { transform: none; }
@media (min-width: 480px) {
  .modal { align-items: center; }
  .modal__panel { border-radius: 24px; transform: translateY(24px); opacity: 0; transition: transform .24s, opacity .2s; }
  .modal.is-open .modal__panel { opacity: 1; }
}
.modal__close { position: absolute; top: 12px; right: 12px; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: #6B6B6B; background: #F2EEE8; }
.modal__close svg { width: 14px; height: 14px; }
.modal__step { display: inline-block; margin-bottom: 10px; padding: 4px 10px; border-radius: 999px; background: #FBF4ED; color: var(--copper-dark); font-size: 12.5px; font-weight: 600; }
.modal__title { padding-right: 36px; font-family: var(--font-display); font-weight: 600; font-size: 25px; line-height: 1.15; text-transform: uppercase; }
.field { margin-top: 18px; }
.field label { display: block; margin-bottom: 8px; font-size: 15px; font-weight: 600; }
.phone {
  display: flex; align-items: center;
  height: 58px; padding: 0 14px;
  border: 1.5px solid #E5E0D8; border-radius: 14px;
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.phone:focus-within { border-color: var(--copper); box-shadow: 0 0 0 4px rgba(217, 122, 61, .15); }
.phone.is-invalid { border-color: #D94B3D; box-shadow: 0 0 0 4px rgba(217, 75, 61, .12); }
.phone__code { display: flex; align-items: center; gap: 8px; padding-right: 10px; margin-right: 10px; border-right: 1px solid #E5E0D8; font-size: 18px; font-weight: 600; }
.phone__code svg { width: 24px; height: 16px; border-radius: 3px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .08); }
.phone input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; font: 500 19px var(--font-body); letter-spacing: .5px; color: #1A1A1A; }
.phone input::placeholder { color: #B8B2AA; }
.field__error { margin-top: 8px; font-size: 13.5px; color: #C8392B; }
.modal .cta { margin-top: 18px; min-height: 60px; animation: none; font-size: 18px; }
.modal .cta[disabled] { opacity: .75; }
.modal__privacy { display: flex; gap: 8px; align-items: flex-start; margin-top: 14px; font-size: 12.5px; line-height: 1.4; color: #8A8580; }
.modal__privacy svg { width: 16px; height: 16px; flex: none; margin-top: 1px; }

/* ---------- Rahmat sahifasi ---------- */
.page-thanks .page { display: flex; flex-direction: column; }
.thanks { position: relative; isolation: isolate; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 40px 22px; text-align: center; }
.thanks > * { position: relative; z-index: 2; }
.thanks > .layer { position: absolute; z-index: 0; pointer-events: none; }
.steps { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-soft); }
.steps i { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font-style: normal; font-weight: 700; font-size: 13px; }
.steps .done { background: var(--teal); color: #fff; }
.steps .now { background: var(--gold); color: #3A1C06; box-shadow: 0 0 0 4px rgba(241, 194, 125, .2); }
.steps .bar { width: 34px; height: 2px; background: linear-gradient(90deg, var(--teal), var(--gold)); }
.thanks__title { font-family: var(--font-display); font-weight: 700; font-size: clamp(38px, 12vw, 50px); line-height: 1; text-transform: uppercase; }
.thanks__text { max-width: 330px; font-size: 18px; line-height: 1.5; color: var(--ink-soft); }
.thanks__text em { font-style: normal; color: var(--gold); font-weight: 700; }
.arrow-down { width: 44px; height: 44px; color: var(--gold); animation: bounce 1.4s ease-in-out infinite; }
@keyframes bounce { 0%, 100% { translate: 0 0; } 50% { translate: 0 8px; } }
.tg-btn {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  width: 100%; max-width: 380px; min-height: 70px;
  border-radius: 20px;
  background: linear-gradient(180deg, #37AEE2, #1E96C8);
  color: #fff; text-decoration: none;
  font-weight: 800; font-size: 21px; letter-spacing: 1.4px; text-transform: uppercase;
  box-shadow: 0 14px 34px -10px rgba(34, 158, 217, .8), inset 0 1px 0 rgba(255, 255, 255, .4);
  animation: pulse 2.4s ease-in-out infinite;
}
.tg-btn svg { width: 28px; height: 28px; }
.thanks__hint { font-size: 13px; color: var(--muted); }
/* 1-variant (och mavzu) dan kelganda */
.theme-light .thanks { background: radial-gradient(90% 50% at 50% 40%, #FBE9DA, rgba(251, 233, 218, 0) 70%); }
.theme-light .thanks .layer--sky { display: none; }
.theme-light .thanks .layer--girih { opacity: .18; }
.theme-light .steps .now { background: var(--copper); color: #fff; box-shadow: 0 0 0 4px rgba(217, 122, 61, .18); }
.theme-light .steps .bar { background: linear-gradient(90deg, var(--teal), var(--copper)); }
.theme-light .thanks__text em { color: var(--copper-dark); }
.theme-light .arrow-down { color: var(--copper); }

/* Past ekranlar (iPhone SE, Instagram ichki brauzeri): tugma birinchi ekrandan tushib ketmasin */
@media (max-height: 720px) {
  .hero { gap: 9px; padding-top: 10px; padding-bottom: 14px; }
  .meta { height: 38px; font-size: 14px; }
  .eyebrow { font-size: 13.5px; padding: 6px 12px; }
  .title { font-size: clamp(20px, 6vw, 25px); }
  .title--lg { font-size: clamp(22px, 6.8vw, 28px); }
  .title--serif { font-size: clamp(25px, 7.4vw, 31px); }
  .lead { font-size: 14.5px; }
  .photo { min-height: 150px; }
  .team img { width: 44px; height: 44px; }
  .team figcaption { font-size: 10.5px; }
  .cta { min-height: 58px; }
}

@media (max-height: 600px) {
  .photo { min-height: 130px; }
  .team figcaption { display: none; }
}

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