/* ============================================================
   SHAFRAN — ranglar logotip va bannerdan olingan
   ============================================================ */
:root {
  --bg: #0d1510;
  --bg-2: #121d16;
  --surface: #172419;
  --surface-2: #1d2d20;
  --line: rgba(140, 198, 63, .18);
  --green: #8cc63f;        /* logodagi och yashil */
  --green-2: #6fa52c;
  --green-deep: #3f6b1c;
  --white: #ffffff;
  --text: #e9efe8;
  --muted: #9fb0a2;
  --radius: 22px;
  --shadow: 0 20px 60px rgba(0, 0, 0, .45);
  --script: "Satisfy", "Brush Script MT", cursive;
  --sans: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  --header-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; line-height: 1.15; color: var(--white); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.7rem); font-weight: 800; letter-spacing: -.02em; }
h3 { font-size: 1.5rem; font-weight: 700; }
p { margin: 0; }

.container { width: min(1200px, 100% - 32px); margin-inline: auto; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: .78rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  color: var(--green);
}
.eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--green); border-radius: 2px; }

/* ---------- Buttons ---------- */
.btn {
  --pad: 14px 26px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: var(--pad); border: 0; border-radius: 999px; cursor: pointer;
  font: 700 1rem/1 var(--sans); letter-spacing: .01em;
  transition: transform .2s ease, box-shadow .25s ease, background .25s ease;
}
.btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn--primary {
  color: #0b140c;
  background: linear-gradient(135deg, #a6db55, var(--green) 45%, var(--green-2));
  box-shadow: 0 10px 30px rgba(140, 198, 63, .35), inset 0 1px 0 rgba(255,255,255,.4);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px rgba(140, 198, 63, .5), inset 0 1px 0 rgba(255,255,255,.4); }
.btn--primary:active { transform: translateY(0); }
.btn--ghost { color: var(--text); background: transparent; border: 1.5px solid var(--line); }
.btn--ghost:hover { border-color: var(--green); color: var(--green); }
.btn--sm { --pad: 11px 20px; font-size: .9rem; }
.btn--lg { --pad: 20px 36px; font-size: 1.15rem; }
.btn--block { width: 100%; }
.btn:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: rgba(13, 21, 16, .78);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s;
}
.header.is-scrolled { border-color: var(--line); background: rgba(13, 21, 16, .92); }
.header__inner { height: 100%; display: flex; align-items: center; gap: 28px; }

/* Shafran logotipi — asl logodan kesib olingan rasm (images/logo.png) */
.logo { display: block; flex-shrink: 0; }
.logo img { height: 48px; width: auto; filter: drop-shadow(0 2px 4px rgba(0,0,0,.45)); }

.nav { display: flex; gap: 26px; margin-left: auto; }
.nav a { font-size: .92rem; font-weight: 600; color: var(--muted); position: relative; padding: 6px 0; transition: color .2s; }
.nav a::after { content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 2px; background: var(--green); transform: scaleX(0); transform-origin: left; transition: transform .25s; }
.nav a:hover { color: var(--white); }
.nav a:hover::after { transform: scaleX(1); }

.lang { display: flex; padding: 3px; border-radius: 999px; border: 1px solid var(--line); background: rgba(0,0,0,.25); flex-shrink: 0; }
.lang__btn {
  border: 0; background: transparent; color: var(--muted); cursor: pointer;
  font: 700 .78rem/1 var(--sans); letter-spacing: .06em; padding: 8px 11px; border-radius: 999px;
  transition: background .2s, color .2s;
}
.lang__btn:hover { color: var(--white); }
.lang__btn[aria-pressed="true"] { background: var(--green); color: #0b140c; }

.burger { display: none; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 12px; background: transparent; cursor: pointer; padding: 0; flex-direction: column; justify-content: center; align-items: center; gap: 5px; }
.burger span { width: 18px; height: 2px; background: var(--white); border-radius: 2px; transition: transform .3s, opacity .3s; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; background: var(--bg); }
.hero__frame { position: relative; width: 100%; aspect-ratio: 1248 / 560; max-height: calc(100vh - var(--header-h)); overflow: hidden; background: #0f1912; }
.hero__img { width: 100%; height: 100%; object-fit: cover; object-position: center; animation: heroIn 1.4s cubic-bezier(.2,.7,.2,1) both; }
.hero__shade { position: absolute; inset: auto 0 0 0; height: 30%; background: linear-gradient(to bottom, transparent, var(--bg)); pointer-events: none; }
@keyframes heroIn { from { opacity: 0; transform: scale(1.06); } to { opacity: 1; transform: scale(1); } }

/* ---------- Partner band ---------- */
.partner { position: relative; padding: 40px 0 70px; }
.partner__inner {
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: space-between; gap: 32px;
  padding: 44px 52px; border-radius: 28px;
  background:
    radial-gradient(600px 240px at 100% 0%, rgba(140,198,63,.22), transparent 70%),
    linear-gradient(135deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.partner__inner::after { /* banner'dagi to'lqin chizig'i */
  content: ""; position: absolute; left: -10%; right: -10%; bottom: -60px; height: 120px;
  border-top: 3px solid var(--green); border-radius: 50%; opacity: .35; pointer-events: none;
}
.partner__text { max-width: 620px; }
.partner__text h2 { margin: 12px 0 10px; }
.partner__text p { color: var(--muted); font-size: 1.05rem; }
.partner .btn--lg { flex-shrink: 0; position: relative; z-index: 1; }

/* ---------- Products ---------- */
.products { padding: 30px 0 0; }
.section-head { text-align: center; max-width: 760px; margin: 0 auto 30px; }
.section-head h2 { margin-top: 14px; }

.category { padding: 46px 0; position: relative; }
.category + .category { border-top: 1px solid rgba(255,255,255,.04); }
.category__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.category__num { font-family: var(--script); font-size: 1.3rem; color: var(--green); display: block; margin-bottom: 2px; }
.category__head h3 { font-size: clamp(1.4rem, 2.6vw, 2rem); font-weight: 800; }
.category__head p { color: var(--muted); margin-top: 6px; max-width: 520px; }
.category__arrows { display: flex; gap: 10px; flex-shrink: 0; }

/* gazli / gazsiz qatorlari */
.row-group + .row-group { margin-top: 18px; }
.row-group__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.row-group__label {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 1.05rem; font-weight: 700; color: var(--white);
}
.row-group__label::after { content: ""; width: 60px; height: 2px; border-radius: 2px; background: var(--green); opacity: .6; }
.arrow {
  width: 46px; height: 46px; border-radius: 50%; border: 1.5px solid var(--line);
  background: transparent; color: var(--white); cursor: pointer; display: grid; place-items: center;
  transition: border-color .2s, background .2s, color .2s;
}
.arrow:hover { border-color: var(--green); background: var(--green); color: #0b140c; }
.arrow svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* gorizontal qator */
.row {
  display: grid; grid-auto-flow: column; grid-auto-columns: clamp(230px, 22vw, 275px);
  gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  padding: 6px max(16px, (100% - 1200px) / 2) 24px;
  scroll-padding-inline: max(16px, (100% - 1200px) / 2); /* snap kartani chetga yopishtirmasin */
  scrollbar-width: none;
}
.row::-webkit-scrollbar { display: none; }
.row--fit { justify-content: center; }

.card {
  scroll-snap-align: start; position: relative;
  border-radius: var(--radius); overflow: hidden;
  background: linear-gradient(180deg, var(--surface-2), var(--surface) 70%);
  border: 1px solid rgba(255,255,255,.06);
  transition: transform .35s cubic-bezier(.2,.7,.2,1), border-color .3s, box-shadow .35s;
}
.card:hover { transform: translateY(-6px); border-color: var(--line); box-shadow: 0 24px 50px rgba(0,0,0,.4); }
.card__media {
  position: relative; height: 300px; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 60%, rgba(140,198,63,.20), transparent 62%);
}
.card__media img, .card__media svg { height: 86%; width: auto; max-width: 90%; object-fit: contain; filter: drop-shadow(0 18px 22px rgba(0,0,0,.5)); transition: transform .45s cubic-bezier(.2,.7,.2,1); }
.card:hover .card__media img, .card:hover .card__media svg { transform: translateY(-6px) scale(1.04); }
/* haqiqiy surat — kartaning yuqori qismini to'liq egallaydi, hech joyi kesilmaydi */
.card--photo .card__media {
  height: auto; aspect-ratio: 720 / 1080; background: #fff; overflow: hidden;
}
.card--photo .card__media img {
  width: 100%; height: 100%; max-width: none; object-fit: contain; filter: none;
}
.card--photo:hover .card__media img { transform: none; }
.card__body { padding: 18px 20px 22px; border-top: 1px solid rgba(255,255,255,.05); }
.card__title { font-weight: 700; font-size: 1.05rem; color: var(--white); }
.card__meta { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; color: var(--muted); font-size: .9rem; }
.card__vol { font-weight: 800; color: var(--green); font-size: 1.15rem; }

/* ---------- Footer ---------- */
.footer { position: relative; background: #09100b; margin-top: 40px; padding: 30px 0 34px; text-align: center; }
.footer__wave { position: absolute; left: 0; right: 0; top: -79px; height: 80px; }
.footer__wave svg { width: 100%; height: 100%; fill: #09100b; }
.footer__wave::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, var(--green) 30%, var(--green) 70%, transparent); height: 2px; top: 46%; opacity: .0; }
.footer__inner { display: flex; flex-direction: column; align-items: center; }

.footer__logo { display: block; margin-top: 10px; }
.footer__logo img { width: clamp(260px, 52vw, 560px); height: auto; filter: drop-shadow(0 10px 30px rgba(0,0,0,.6)); }
.footer__slogan { margin-top: 18px; letter-spacing: .4em; text-transform: uppercase; font-weight: 600; color: var(--muted); font-size: clamp(.8rem, 1.6vw, 1rem); }

.socials { display: flex; gap: 14px; margin: 34px 0 40px; flex-wrap: wrap; justify-content: center; }
.socials a {
  width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center;
  border: 1.5px solid var(--line); color: var(--white);
  transition: transform .25s, background .25s, color .25s, border-color .25s;
}
.socials a:hover { transform: translateY(-4px); background: var(--green); border-color: var(--green); color: #0b140c; }
.socials svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.socials svg .fill { fill: currentColor; stroke: none; }

.footer__info {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; width: 100%;
  background: rgba(255,255,255,.06); border-radius: 18px; overflow: hidden;
}
.footer__info p { margin: 0; }
.footer__info > div { background: #0c140e; padding: 20px; color: var(--text); font-size: .95rem; }
.footer__info span { display: block; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--green); font-weight: 700; margin-bottom: 6px; }
.footer__info a:hover { color: var(--green); }
.footer__copy { margin-top: 26px; color: #6b7c6e; font-size: .85rem; }

/* ---------- Modal / form ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; visibility: hidden; }
.modal.is-open { visibility: visible; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(4, 8, 5, .72); backdrop-filter: blur(6px); opacity: 0; transition: opacity .3s; }
.modal.is-open .modal__backdrop { opacity: 1; }
.modal__box {
  position: relative; width: min(480px, 100%); max-height: calc(100vh - 32px); overflow-y: auto;
  padding: 38px 34px 32px; border-radius: 26px;
  background: radial-gradient(400px 200px at 100% 0%, rgba(140,198,63,.18), transparent 70%), var(--surface);
  border: 1px solid var(--line); box-shadow: var(--shadow);
  opacity: 0; transform: translateY(24px) scale(.97);
  transition: opacity .3s, transform .35s cubic-bezier(.2,.7,.2,1);
}
.modal.is-open .modal__box { opacity: 1; transform: none; }
.modal__close { position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255,255,255,.06); color: var(--white); font-size: 1.6rem; line-height: 1; cursor: pointer; transition: background .2s; }
.modal__close:hover { background: rgba(255,255,255,.14); }

.form h3 { font-size: 1.8rem; margin: 10px 0 6px; }
.form__hint { color: var(--muted); font-size: .92rem; margin-bottom: 22px; }
.field { display: block; margin-bottom: 16px; }
.field span { display: block; font-size: .82rem; font-weight: 600; color: var(--muted); margin-bottom: 8px; }
.field input {
  width: 100%; padding: 15px 18px; border-radius: 14px;
  background: rgba(0,0,0,.28); border: 1.5px solid rgba(255,255,255,.08); color: var(--white);
  font: 500 1rem var(--sans); transition: border-color .2s, background .2s;
}
.field input::placeholder { color: #5f6f62; }
.field input:focus { outline: none; border-color: var(--green); background: rgba(0,0,0,.4); }
.field.is-invalid input { border-color: #e2685a; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form__status { min-height: 1.4em; font-size: .9rem; margin: 2px 0 12px; color: #f0907f; }

.btn__spinner { display: none; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(0,0,0,.25); border-top-color: #0b140c; animation: spin .8s linear infinite; }
.btn.is-loading .btn__spinner { display: inline-block; }
.btn.is-loading { pointer-events: none; opacity: .85; }
@keyframes spin { to { transform: rotate(360deg); } }

.form-success { text-align: center; padding: 16px 0 4px; }
.form-success__icon { width: 76px; height: 76px; margin: 0 auto 18px; border-radius: 50%; display: grid; place-items: center; background: rgba(140,198,63,.15); border: 2px solid var(--green); }
.form-success__icon svg { width: 36px; height: 36px; fill: none; stroke: var(--green); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.form-success h3 { font-size: 1.8rem; }
.form-success p { color: var(--muted); margin: 8px 0 22px; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- 3D sahna ---------- */
.stage { position: relative; height: 300vh; background: var(--bg); }
.stage + .stage { border-top: 1px solid rgba(255,255,255,.04); }
.stage[hidden] { display: none; }
.stage__pin { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.stage__glow {
  position: absolute; inset: -10%;
  background: var(--stage-glow, var(--green));
  -webkit-mask-image: radial-gradient(60% 46% at 50% 72%, #000, transparent 100%);
  mask-image: radial-gradient(60% 46% at 50% 72%, #000, transparent 100%);
  opacity: .34; transition: background .8s ease;
}
.stage__canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: pan-y; cursor: grab; opacity: 0; transition: opacity .8s ease; }
.stage.is-ready .stage__canvas { opacity: 1; }

.stage__head { position: absolute; left: 16px; right: 16px; top: calc(var(--header-h) + 22px); text-align: center; transition: opacity .35s ease; }
.stage__num { font-family: var(--script); font-size: 1.3rem; color: var(--green); display: block; }
.stage__head h3 { font-size: clamp(1.5rem, 3vw, 2.3rem); font-weight: 800; }
.stage.is-detail .stage__head { opacity: 0; }

.stage__ui {
  position: absolute; left: 50%; bottom: 34px; transform: translateX(-50%);
  width: min(460px, 100% - 32px); display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px 14px;
  text-align: center; transition: opacity .35s ease, transform .35s ease;
}
.stage__name strong { display: block; font-size: clamp(1.15rem, 2.4vw, 1.5rem); font-weight: 800; color: var(--white); line-height: 1.2; }
.stage__name span { color: var(--green); font-weight: 700; font-size: .95rem; }
.stage__more { grid-column: 1 / -1; justify-self: center; }
.stage.is-detail .stage__ui { opacity: 0; transform: translate(-50%, 20px); pointer-events: none; }

.stage__steps { position: absolute; left: max(32px, (100% - 1200px) / 2); top: 50%; width: min(420px, 40%); height: 0; }
.stage__step {
  position: absolute; left: 0; right: 0; top: 0; transform: translateY(-30%);
  opacity: 0; visibility: hidden; transition: opacity .45s ease, transform .55s cubic-bezier(.2,.7,.2,1), visibility 0s linear .45s;
}
.stage__step.is-on { opacity: 1; visibility: visible; transform: translateY(-50%); transition: opacity .45s ease, transform .55s cubic-bezier(.2,.7,.2,1), visibility 0s; }
.stage__step h3 { font-size: clamp(2rem, 4.4vw, 3.4rem); font-weight: 800; letter-spacing: -.02em; }
.stage__step p { margin-top: 14px; color: var(--text); font-size: clamp(1rem, 1.6vw, 1.2rem); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column; gap: 0; margin: 0;
    background: rgba(13,21,16,.97); border-bottom: 1px solid var(--line);
    padding: 8px 16px 16px; transform: translateY(-120%); z-index: -1;
    /* yopiq menyu umuman ko'rinmasin (aks holda "Байланыш" header ustidan chiqib qoladi) */
    visibility: hidden; transition: transform .35s ease, visibility 0s linear .35s;
  }
  .nav.is-open { transform: none; visibility: visible; transition: transform .35s ease, visibility 0s; }
  .nav a { padding: 14px 4px; border-bottom: 1px solid rgba(255,255,255,.05); font-size: 1rem; }
  .nav a::after { display: none; }
  .lang { margin-left: auto; }
  .burger { display: flex; }

  .partner__inner { flex-direction: column; align-items: flex-start; padding: 34px 26px; }
  .partner .btn--lg { width: 100%; }
  .footer__info { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  /* telefonda banner chetlari kesiladi, logo markazda qoladi */
  .hero__frame { aspect-ratio: 4 / 3.4; }
  .category__arrows { display: none; }
  .row { grid-auto-columns: 72%; gap: 14px; }
  .card__media { height: 250px; }
  .header__cta { display: none; } /* telefonda hamkorlik tugmasi hero ostida turibdi */
  .header__inner { gap: 12px; }
  .stage__steps { left: 16px; right: 16px; width: auto; top: auto; bottom: 170px; }
  .stage__step { top: auto; bottom: 0; text-align: center; transform: translateY(20px); }
  .stage__step.is-on { transform: none; }
  .logo img { height: 42px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
