/* ============================================================
   FINEXIA — marketing site
   Design language: "the shop ledger" — grounded in the real
   thing this product touches every day: a small merchant's
   order book. Warm stone paper, ikat indigo, apricot (o'rik)
   accent, receipt-tape rhythm instead of generic numbered steps.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=Inter:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  --paper: #F7F5EF;
  --paper-card: #EFEADD;
  --paper-card-line: #E2DBC9;
  --ink: #1C2333;
  --ink-soft: #565F76;
  --indigo: #2C3E82;
  --indigo-deep: #1D2A5E;
  --apricot: #E38430;
  --apricot-deep: #BE6A1E;
  --apricot-tint: #FBEBDA;
  --line: #DCD5C4;
  --white: #FFFDF9;

  --display: 'Fraunces', Georgia, serif;
  --body: 'Inter', -apple-system, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;

  --wrap: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.08; margin: 0; }
p { margin: 0; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 28px; }

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

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* ---------- eyebrow / dividers (structure = information, not decoration) ---------- */
.eyebrow {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--apricot-deep);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.eyebrow::before {
  content: '';
  width: 7px; height: 7px;
  background: var(--apricot);
  border-radius: 50%;
  flex-shrink: 0;
}
.divider-dashed {
  border: none;
  border-top: 1.5px dashed var(--line);
  margin: 0;
}

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247, 245, 239, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}
.logo {
  font-family: var(--display);
  font-weight: 700;
  font-size: 22px;
  color: var(--indigo-deep);
  letter-spacing: -0.01em;
}
.logo span { color: var(--apricot); }
.nav-links {
  display: flex; align-items: center; gap: 34px;
  font-size: 14.5px; font-weight: 500; color: var(--ink-soft);
}
.nav-links a:hover { color: var(--indigo); }
.nav-cta {
  background: var(--indigo);
  color: var(--white) !important;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  transition: background 0.15s ease;
}
.nav-cta:hover { background: var(--indigo-deep); }
.nav-toggle { display: none; }

@media (max-width: 860px) {
  .nav-links { position: fixed; inset: 72px 0 0 0; background: var(--paper); flex-direction: column; justify-content: flex-start; padding: 32px 28px; gap: 22px; transform: translateX(100%); transition: transform 0.25s ease; }
  .nav-links.open { transform: translateX(0); }
  .nav-toggle { display: block; background: none; border: none; font-size: 26px; cursor: pointer; color: var(--indigo-deep); }
}

/* ---------- hero ---------- */
.hero {
  padding: 84px 0 0;
  position: relative;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 48px;
  align-items: center;
}
.hero h1 {
  font-size: clamp(38px, 5.2vw, 64px);
  letter-spacing: -0.015em;
  color: var(--indigo-deep);
}
.hero h1 em { font-style: italic; color: var(--apricot-deep); }
.hero-sub {
  margin-top: 22px;
  font-size: 19px;
  color: var(--ink-soft);
  max-width: 480px;
}
.hero-actions {
  margin-top: 34px;
  display: flex; gap: 14px; flex-wrap: wrap;
}
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 26px;
  border-radius: 9px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--apricot); color: var(--white); }
.btn-primary:hover { background: var(--apricot-deep); }
.btn-ghost { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn-ghost:hover { border-color: var(--indigo); color: var(--indigo); }

.hero-visual {
  position: relative;
}
.phone-mock {
  background: var(--indigo-deep);
  border-radius: 28px;
  padding: 14px;
  box-shadow: 0 30px 60px -20px rgba(28,35,51,0.35);
  max-width: 420px;
  margin-left: auto;
}
.phone-mock .screen {
  background: var(--white);
  border-radius: 18px;
  overflow: hidden;
  height: 620px;
  position: relative;
}
.phone-mock img { width: 100%; }
.live-frame {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}
.live-caption {
  text-align: center;
  margin-top: 16px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink-soft);
}
@media (max-width: 860px) {
  .phone-mock .screen { height: 520px; }
}

/* ---------- receipt ticker (signature element) ---------- */
.ticket {
  margin-top: 64px;
  background: var(--paper-card);
  border-top: 1.5px dashed var(--line);
  border-bottom: 1.5px dashed var(--line);
  padding: 14px 0;
  overflow: hidden;
  position: relative;
}
.ticket::before, .ticket::after {
  content: '';
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 20px; height: 20px;
  background: var(--paper);
  border-radius: 50%;
  z-index: 2;
}
.ticket::before { left: -10px; }
.ticket::after { right: -10px; }
.ticket-track {
  display: flex;
  gap: 0;
  width: max-content;
  animation: ticket-scroll 34s linear infinite;
  font-family: var(--mono);
  font-size: 13.5px;
  color: var(--ink-soft);
}
.ticket-item {
  display: flex; align-items: center; gap: 10px;
  padding: 0 28px;
  border-right: 1px dashed var(--line);
  white-space: nowrap;
}
.ticket-item b { color: var(--indigo-deep); font-weight: 600; }
.ticket-item .amt { color: var(--apricot-deep); }
@keyframes ticket-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- sections ---------- */
section { padding: 96px 0; }
.section-head {
  max-width: 640px;
  margin-bottom: 52px;
}
.section-head h2 {
  font-size: clamp(28px, 3.4vw, 40px);
  color: var(--indigo-deep);
  letter-spacing: -0.01em;
}
.section-head p {
  margin-top: 16px;
  font-size: 17px;
  color: var(--ink-soft);
}

/* problem cards */
.problem-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.why-list {
  list-style: none;
  margin: 28px 0 40px;
  padding: 0;
  display: grid;
  gap: 12px;
}
.why-list li {
  position: relative;
  padding-left: 26px;
  color: var(--ink-soft);
  font-size: 15.5px;
}
.why-list li::before {
  content: '✕';
  position: absolute;
  left: 0;
  color: var(--apricot-deep);
  font-weight: 700;
  font-size: 13px;
}
.stats-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
  padding-top: 40px;
  border-top: 1.5px dashed var(--line);
}
.stats-strip .stat-item b {
  display: block;
  font-family: var(--mono);
  font-size: 26px;
  color: var(--indigo-deep);
  margin-bottom: 6px;
}
.stats-strip .stat-item span {
  font-size: 14px;
  color: var(--ink-soft);
}
@media (max-width: 860px) {
  .stats-strip { grid-template-columns: 1fr; gap: 20px; }
}

/* ---------- testimonials ---------- */
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.testimonial-card {
  background: var(--paper-card);
  border: 1px solid var(--paper-card-line);
  border-radius: 14px;
  padding: 26px;
  display: flex;
  flex-direction: column;
}
.testimonial-card p {
  font-size: 15px;
  color: var(--ink);
  line-height: 1.55;
  margin-bottom: 18px;
  flex: 1;
}
.testimonial-card p::before { content: '\201C'; }
.testimonial-card p::after { content: '\201D'; }
.testimonial-author {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--indigo-deep);
  font-weight: 600;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
}
.testimonial-author span { color: var(--ink-soft); font-weight: 400; }
.problem-card {
  background: var(--white);
  padding: 30px 26px;
}
.problem-card .num {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--apricot-deep);
  margin-bottom: 14px;
}
.problem-card h3 { font-size: 18px; margin-bottom: 10px; color: var(--indigo-deep); }
.problem-card p { font-size: 14.5px; color: var(--ink-soft); }
.problem-card .fix {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  font-size: 14px;
  color: var(--indigo-deep);
}
.problem-card .fix b { color: var(--apricot-deep); }

@media (max-width: 860px) {
  .problem-grid { grid-template-columns: 1fr 1fr; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { max-width: 340px; margin: 32px auto 0; }
}
@media (max-width: 560px) {
  .problem-grid { grid-template-columns: 1fr; }
}

/* products */
.products-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.product-row {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 40px;
  align-items: center;
  padding: 40px 0;
  border-top: 1.5px dashed var(--line);
}
.product-row:last-child { border-bottom: 1.5px dashed var(--line); }
.product-tag {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink-soft);
  align-self: start;
  padding-top: 6px;
}
.product-row h3 { font-size: 26px; color: var(--indigo-deep); margin-bottom: 12px; }
.product-row p { color: var(--ink-soft); font-size: 15.5px; margin-bottom: 18px; }
.product-row .price-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 14px;
  background: var(--apricot-tint);
  color: var(--apricot-deep);
  padding: 6px 12px;
  border-radius: 6px;
  margin-bottom: 18px;
}
.product-visual {
  background: var(--paper-card);
  border-radius: 14px;
  aspect-ratio: 4/3;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  border: 1px solid var(--paper-card-line);
}
.product-visual img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 860px) {
  .product-row { grid-template-columns: 1fr; gap: 18px; }
  .product-visual { order: -1; aspect-ratio: 16/9; }
}

/* stats */
.stats-band {
  background: var(--indigo-deep);
  color: var(--white);
  padding: 64px 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}
.stat b {
  display: block;
  font-family: var(--display);
  font-size: 42px;
  color: var(--apricot);
  font-weight: 600;
}
.stat span { font-size: 14px; color: rgba(255,255,255,0.65); }
@media (max-width: 760px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
}

/* demo cta */
.demo-band {
  background: var(--apricot-tint);
  border-radius: 20px;
  padding: 56px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  align-items: center;
}
.demo-band h2 { font-size: 30px; color: var(--indigo-deep); margin-bottom: 14px; }
.demo-band p { color: var(--ink-soft); font-size: 15.5px; margin-bottom: 26px; }
@media (max-width: 860px) {
  .demo-band { grid-template-columns: 1fr; padding: 36px 24px; text-align: left; }
}

/* footer */
.site-footer {
  border-top: 1.5px dashed var(--line);
  padding: 48px 0 32px;
}
.footer-grid {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 24px;
  padding-bottom: 28px;
}
.footer-grid .logo { font-size: 18px; }
.footer-links { display: flex; gap: 28px; font-size: 14px; color: var(--ink-soft); }
.footer-links a:hover { color: var(--indigo); }
.footer-bottom {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--ink-soft);
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

/* floating telegram contact */
.float-contact {
  position: fixed;
  right: 24px; bottom: 24px;
  z-index: 60;
  background: var(--indigo);
  color: var(--white);
  padding: 14px 22px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 14.5px;
  box-shadow: 0 12px 28px -8px rgba(28,35,51,0.45);
  display: flex; align-items: center; gap: 9px;
  transition: transform 0.15s ease, background 0.15s ease;
}
.float-contact:hover { background: var(--indigo-deep); transform: translateY(-2px); }

/* product-page specific */
.product-hero {
  padding: 64px 0 48px;
}
.product-hero .eyebrow { margin-bottom: 20px; }
.product-hero h1 {
  font-size: clamp(34px, 4.6vw, 52px);
  color: var(--indigo-deep);
  max-width: 720px;
}
.product-hero .lead {
  margin-top: 20px;
  font-size: 18px;
  color: var(--ink-soft);
  max-width: 560px;
}
.feature-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  margin-top: 20px;
}
.feature-item {
  background: var(--white);
  padding: 26px;
}
.feature-item h4 { font-size: 16px; color: var(--indigo-deep); margin-bottom: 8px; }
.feature-item p { font-size: 14px; color: var(--ink-soft); }
@media (max-width: 720px) { .feature-list { grid-template-columns: 1fr; } }

.pricing-card {
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: 16px;
  padding: 36px;
  max-width: 380px;
}
.pricing-card .amount {
  font-family: var(--display);
  font-size: 40px;
  color: var(--indigo-deep);
}
.pricing-card .amount span { font-size: 15px; color: var(--ink-soft); font-family: var(--body); }
.pricing-card ul { list-style: none; margin: 24px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.pricing-card li { font-size: 14.5px; color: var(--ink-soft); padding-left: 22px; position: relative; }
.pricing-card li::before { content: '—'; position: absolute; left: 0; color: var(--apricot-deep); }

/* pricing grid — 3-tariff layout (homepage #narxlar) */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: stretch;
}
.pricing-grid .pricing-card {
  max-width: none;
  width: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.pricing-grid .pricing-card.featured {
  border-color: var(--indigo);
  border-width: 2px;
  box-shadow: 0 24px 48px -24px rgba(44,62,130,0.28);
}
.pricing-card .plan-name {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 10px;
}
.pricing-card .plan-popular-tag {
  position: absolute;
  top: -14px; left: 32px;
  background: var(--indigo);
  color: var(--white);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 20px;
  white-space: nowrap;
}
.trial-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--apricot-tint);
  color: var(--apricot-deep);
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  width: fit-content;
}
.pricing-card .trial-tag { margin-top: 14px; }
.pricing-card .cta-block { margin-top: auto; padding-top: 26px; }
@media (max-width: 860px) {
  .pricing-grid { grid-template-columns: 1fr; }
}

/* =========================================================
   Animation system
   ========================================================= */

/* scroll reveal */
.section-head,
.problem-card,
.testimonial-card,
.pricing-grid .pricing-card,
.stats-grid .stat,
.stats-strip .stat-item {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.65s cubic-bezier(.2,.8,.2,1), transform 0.65s cubic-bezier(.2,.8,.2,1), box-shadow 0.25s ease;
}
.section-head.in-view,
.problem-card.in-view,
.testimonial-card.in-view,
.pricing-grid .pricing-card.in-view,
.stats-grid .stat.in-view,
.stats-strip .stat-item.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* stagger within grids */
.problem-grid .problem-card:nth-child(2) { transition-delay: .08s; }
.problem-grid .problem-card:nth-child(3) { transition-delay: .16s; }
.problem-grid .problem-card:nth-child(4) { transition-delay: .24s; }
.problem-grid .problem-card:nth-child(5) { transition-delay: .32s; }

.testimonial-grid .testimonial-card:nth-child(2) { transition-delay: .06s; }
.testimonial-grid .testimonial-card:nth-child(3) { transition-delay: .12s; }
.testimonial-grid .testimonial-card:nth-child(4) { transition-delay: .18s; }
.testimonial-grid .testimonial-card:nth-child(5) { transition-delay: .24s; }
.testimonial-grid .testimonial-card:nth-child(6) { transition-delay: .30s; }
.testimonial-grid .testimonial-card:nth-child(7) { transition-delay: .36s; }
.testimonial-grid .testimonial-card:nth-child(8) { transition-delay: .42s; }

.pricing-grid .pricing-card:nth-child(2) { transition-delay: .1s; }
.pricing-grid .pricing-card:nth-child(3) { transition-delay: .2s; }

.stats-grid .stat:nth-child(2) { transition-delay: .06s; }
.stats-grid .stat:nth-child(3) { transition-delay: .12s; }
.stats-grid .stat:nth-child(4) { transition-delay: .18s; }

.stats-strip .stat-item:nth-child(2) { transition-delay: .08s; }
.stats-strip .stat-item:nth-child(3) { transition-delay: .16s; }

/* hover lift */
.problem-card, .testimonial-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.65s ease;
}
.problem-card:hover, .testimonial-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 34px -22px rgba(28,35,51,0.28);
  position: relative;
  z-index: 1;
  background: var(--white);
}
.pricing-grid .pricing-card:hover { transform: translateY(-6px); }
.pricing-grid .pricing-card.featured:hover { transform: translateY(-10px); }

/* floating phone mockup */
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.phone-mock { animation: floaty 5s ease-in-out infinite; }

/* pulsing trial badge */
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(214,111,42,0); }
  50% { box-shadow: 0 0 0 6px rgba(214,111,42,0.14); }
}
.trial-tag { animation: pulseGlow 2.8s ease-in-out infinite; }

/* animated underline on nav links */
.nav-links a {
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute; left: 0; bottom: -6px;
  width: 0; height: 2px;
  background: var(--apricot-deep);
  transition: width 0.25s ease;
}
.nav-links a:hover::after { width: 100%; }

/* button micro-interaction */
.btn { transition: transform 0.18s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 22px -10px rgba(214,111,42,0.45); }

@media (prefers-reduced-motion: reduce) {
  .section-head, .problem-card, .testimonial-card, .pricing-grid .pricing-card,
  .stats-grid .stat, .stats-strip .stat-item {
    opacity: 1; transform: none; transition: none;
  }
  .phone-mock, .trial-tag { animation: none; }
}
