/* Version 7: original FilimoSchool UI, with the approved version 6 content and order. */

/* FilimoDemo, self-hosted next to this page instead of Vazirmatn from Google Fonts.
   The files are copies of /fonts/filimoDemo so the landing stays isolated from the app. */
@font-face { font-family: 'FilimoDemo'; font-style: normal; font-weight: 400; font-display: swap; src: url(./fonts/FilimoDemo-Regular.woff2) format('woff2'); }
@font-face { font-family: 'FilimoDemo'; font-style: normal; font-weight: 500; font-display: swap; src: url(./fonts/FilimoDemo-Medium.woff2) format('woff2'); }
@font-face { font-family: 'FilimoDemo'; font-style: normal; font-weight: 600; font-display: swap; src: url(./fonts/FilimoDemo-SemiBold.woff2) format('woff2'); }
@font-face { font-family: 'FilimoDemo'; font-style: normal; font-weight: 700; font-display: swap; src: url(./fonts/FilimoDemo-Bold.woff2) format('woff2'); }
@font-face { font-family: 'FilimoDemo'; font-style: normal; font-weight: 800; font-display: swap; src: url(./fonts/FilimoDemo-ExtraBold.woff2) format('woff2'); }
@font-face { font-family: 'FilimoDemo'; font-style: normal; font-weight: 900; font-display: swap; src: url(./fonts/FilimoDemo-Black.woff2) format('woff2'); }

:root {
  color-scheme: light;
  --red: #fa3924;
  --red-2: #ff5b46;
  --red-soft: #fff0ee;
  /* Deeper red for buttons so white label text meets WCAG AA (4.5:1). */
  --red-btn: #d92b17;
  --red-btn-2: #e0301b;
  --purple: #6f3cc3;
  --purple-deep: #4a237f;
  --purple-soft: #f2ebff;
  --yellow: #ffbf3c;
  --ink: #151515;
  --muted: #6c6577;
  --line: #e8e3ef;
  --surface: #fff;
  --surface-alt: #faf8fd;
  --shadow: 0 22px 60px rgba(56, 30, 94, .12);
  font-family: 'FilimoDemo', Tahoma, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 92px; }
body { margin: 0; color: var(--ink); background: var(--surface); font-family: inherit; font-size: 16px; line-height: 1.8; direction: rtl; -webkit-font-smoothing: antialiased; overflow-x: clip; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
a, button { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { letter-spacing: 0; }
h1, h2 { line-height: 1.4; }
h3 { line-height: 1.6; }
[hidden]:not([hidden=until-found]) { display: none !important; }
.sprite { position: absolute; }
/* Keeps a phrase such as the brand name on one line inside wrapped headings. */
.nowrap { white-space: nowrap; }
:focus-visible { outline: 3px solid var(--purple); outline-offset: 4px; }
.wrap { width: min(1160px, calc(100% - 40px)); margin-inline: auto; }
section { padding-block: 104px; scroll-margin-top: 90px; }
.sec-head { max-width: 760px; margin: 0 auto 46px; text-align: center; }
.sec-head h2 { font-size: clamp(1.35rem, 2.15vw, 1.85rem); font-weight: 900; text-wrap: balance; }
.sec-head p { margin-top: 16px; color: var(--muted); }

/* Original rounded rectangular buttons and brand colours. */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 54px; padding: 12px 26px; border: 0; border-radius: 16px; font-family: inherit; font-size: 1rem; font-weight: 800; text-align: center; transition: transform 180ms ease, box-shadow 180ms ease; }
.btn:hover { transform: translateY(-2px); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-red { background: linear-gradient(135deg, var(--red-btn), var(--red-btn-2)); color: #fff; box-shadow: 0 13px 28px rgba(250, 57, 36, .24); }
.btn-white { background: #fff; color: var(--purple-deep); box-shadow: 0 14px 32px rgba(28, 14, 46, .16); }

/* The official, unchanged image replaces the reference document's traced logo. */
#hdr { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .94); border-bottom: 1px solid rgba(232, 227, 239, .8); backdrop-filter: blur(18px); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 28px; min-height: 76px; }
.logo { display: flex; align-items: center; flex: 0 0 auto; }
.logo img { display: block; width: auto; height: 40px; }
.links { display: flex; align-items: center; gap: 24px; color: #4f485a; font-size: .93rem; font-weight: 600; }
.links a { transition: color 180ms ease; }
.links a:hover, .links a.active { color: var(--red); }
.nav > .btn { min-height: 44px; padding: 8px 18px; font-size: .9rem; box-shadow: none; }
.burger { display: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); place-items: center; }
.mobile-menu { display: none; }

/* Hero and stats stay in the approved position with the original UI treatment. */
.hero { position: relative; isolation: isolate; padding-block: 76px 0; background: radial-gradient(circle at 12% 12%, rgba(255, 191, 60, .14), transparent 26%), linear-gradient(180deg, #fff, #fcf9ff); }
.hero::before { content: ''; position: absolute; z-index: -1; right: -90px; top: 36px; width: 220px; height: 220px; border-radius: 50%; background: #ffd9d4; filter: blur(30px); opacity: .45; pointer-events: none; }
.hero-grid { display: grid; grid-template-columns: 1.13fr .87fr; align-items: center; gap: 68px; }
.hero-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 22px; min-width: 0; }
.pill { display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px; border-radius: 999px; color: var(--purple-deep); background: var(--purple-soft); font-size: .88rem; font-weight: 800; }
.pill::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 5px rgba(250, 57, 36, .13); flex: none; }
.hero h1 { font-size: clamp(1.6rem, 2.5vw, 2.15rem); font-weight: 900; line-height: 1.45; text-wrap: balance; }
.hero h1 em { color: var(--red); font-weight: 900; font-style: normal; }
.lead { max-width: 650px; color: var(--muted); font-size: 1.08rem; line-height: 2; }
.hero-copy > .btn { margin-top: 8px; }
.video { position: relative; width: 100%; padding: 10px; border-radius: 26px; background: linear-gradient(145deg, var(--purple), var(--red)); box-shadow: var(--shadow); min-width: 0; }
/* The label sits on the frame above the player so it never covers player controls. */
.tag { position: absolute; z-index: 2; top: -30px; right: 24px; left: auto; padding: 8px 16px; border-radius: 12px; background: var(--yellow); color: var(--ink); font-size: .82rem; font-weight: 900; transform: rotate(-2deg); }
.video iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 16px; background: #1c1526; }
.stats { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 74px; overflow: hidden; border: 1px solid var(--line); border-radius: 26px; background: #fff; box-shadow: 0 18px 45px rgba(45, 24, 74, .08); transform: translateY(44px); }
.stat { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 28px 24px; text-align: center; min-width: 0; }
.stat + .stat { border-inline-start: 1px solid var(--line); }
.stat:last-child { background: linear-gradient(145deg, var(--red-soft), #fff); }
.stat .n { color: var(--purple-deep); font-size: clamp(1.8rem, 3vw, 2.5rem); line-height: 1.3; font-weight: 900; font-variant-numeric: tabular-nums; }
.stat .l { color: var(--muted); font-size: .92rem; }

/* The original four pastel cards, with aligned title rows. */
.why { padding-top: 154px; }
.cards4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.card { min-width: 0; }
.cards4 > .card { position: relative; display: grid; grid-template-rows: 64px auto; align-content: start; padding: 126px 26px 26px; border: 0; border-radius: 22px; overflow: hidden; }
.cards4 > .card:nth-child(1) { background: var(--red-soft); }
.cards4 > .card:nth-child(2) { background: var(--purple-soft); }
.cards4 > .card:nth-child(3) { background: #fff7da; }
.cards4 > .card:nth-child(4) { background: var(--ink); color: #fff; }
.cards4 > .card::before { position: absolute; top: 18px; left: 20px; font-size: 3.5rem; line-height: 1.2; font-weight: 900; opacity: .18; }
.cards4 > .card:nth-child(1)::before { content: '۰۱'; }
.cards4 > .card:nth-child(2)::before { content: '۰۲'; }
.cards4 > .card:nth-child(3)::before { content: '۰۳'; }
.cards4 > .card:nth-child(4)::before { content: '۰۴'; color: var(--red); opacity: .55; }
.card h3 { font-size: 1.0625rem; font-weight: 800; }
.card p { color: #655d70; font-size: .91rem; line-height: 1.9; }
.cards4 > .card:nth-child(4) p { color: #cfc8d9; }

/* The calculator retains its existing functionality in the original income-card UI. */
#calc { background: var(--surface-alt); }
.calc-grid { display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; gap: 80px; }
.calc-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; min-width: 0; }
.calc-copy h2 { font-size: clamp(1.35rem, 2.15vw, 1.85rem); font-weight: 900; text-wrap: balance; }
.calc-copy p { color: var(--muted); font-size: 1.05rem; }
.calc { position: relative; min-width: 0; padding: 30px; border: 1px solid var(--line); border-radius: 30px; background: #fff; box-shadow: var(--shadow); transform: rotate(1.2deg); }
.result { text-align: center; }
.result .cap { display: block; color: var(--muted); font-size: .9rem; }
.amt { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; margin-block: 16px 12px; }
.amt b { color: var(--purple); font-size: clamp(2rem, 3.2vw, 2.75rem); font-weight: 900; line-height: 1.4; font-variant-numeric: tabular-nums; }
.amt > span { color: var(--muted); }
.basis { display: block; color: var(--muted); font-size: .78rem; }
.meter { height: 6px; margin-block: 24px 30px; border-radius: 99px; background: var(--purple-soft); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(270deg, var(--purple), var(--red)); transition: width 350ms ease; }
.calc .q { margin-bottom: 14px; text-align: center; font-weight: 800; }
.seg { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.seg button { min-height: 46px; padding: 9px 5px; border: 1px solid var(--line); border-radius: 12px; color: var(--muted); background: #fff; font-size: .87rem; font-weight: 700; }
.seg button[aria-checked='true'] { background: var(--purple); border-color: var(--purple); color: #fff; box-shadow: 0 6px 16px rgba(111, 60, 195, .2); }

/* Requirement cards use the original soft surfaces and numbered-card proportions. */
.req .sec-head { max-width: 800px; }
.cards3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.cards3 .card { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding: 28px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface-alt); }
.cards3 .ico { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; color: #fff; background: var(--red); }
.cards3 .ico.v { background: var(--purple); }
.cards3 .ico svg { width: 26px; height: 26px; }

/* Original full-width purple process section, retaining current step content. */
#steps { color: #fff; background: var(--purple-deep); }
.steps-band { position: relative; }
.steps-band .sec-head h2 { color: #fff; }
.steps { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; padding: 0; margin: 0; list-style: none; }
.steps::before { content: ''; position: absolute; top: 24px; right: 6%; left: 6%; height: 2px; background: linear-gradient(90deg, var(--yellow), var(--red)); opacity: .4; }
.step { position: relative; padding-top: 76px; min-width: 0; }
.num { position: absolute; top: 0; right: 0; z-index: 1; display: grid; place-items: center; width: 50px; height: 50px; border: 2px solid var(--yellow); border-radius: 16px; color: var(--yellow); background: var(--purple-deep); font-size: 1.2rem; font-weight: 900; box-shadow: 0 8px 24px rgba(20, 8, 37, .24); }
.step h3 { margin-bottom: 10px; font-size: 1.0625rem; }
.step p { color: #ddd3eb; font-size: .9rem; }
.steps-cta { display: flex; justify-content: center; margin-top: 40px; }

/* The three original testimonial cards. */
#voices { background: var(--surface-alt); }
.track { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; padding-top: 14px; }
.quote { display: flex; flex-direction: column; justify-content: space-between; gap: 26px; min-width: 0; margin: 0; padding: 30px; border: 1px solid var(--line); border-radius: 22px; background: #fff; box-shadow: 0 12px 35px rgba(50, 27, 82, .06); }
.quote.hl { transform: translateY(-14px); border-color: rgba(250, 57, 36, .28); }
.quote p { font-size: 1rem; font-weight: 500; line-height: 2; }
.who { display: flex; align-items: center; gap: 12px; }
.av { display: grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px; border-radius: 15px; background: var(--purple-soft); color: var(--purple); font-weight: 900; }
.who b { display: block; font-size: .97rem; }
.who small { display: block; margin-top: 4px; color: var(--muted); font-size: .82rem; }

/* Original FAQ proportions, with accessible existing buttons and answer panels. */
#faq { border-top: 1px solid var(--line); }
.faq-list { max-width: 840px; display: grid; gap: 12px; margin-inline: auto; }
.faq-item { overflow: hidden; border: 1px solid var(--line); border-radius: 17px; background: #fff; }
.faq-item.open { border-color: rgba(250, 57, 36, .4); }
.faq-q { display: flex; align-items: center; justify-content: space-between; gap: 20px; width: 100%; min-height: 64px; padding: 18px 20px; border: 0; background: transparent; color: var(--ink); text-align: right; font-size: 1rem; font-weight: 800; }
.pm { display: grid; place-items: center; flex: 0 0 24px; width: 24px; height: 24px; color: var(--red); transition: transform 180ms ease; }
.pm svg { width: 18px; height: 18px; }
.faq-item.open .pm { transform: rotate(45deg); }
.faq-a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 200ms ease; }
.faq-item.open .faq-a { grid-template-rows: 1fr; }
.faq-a > div { overflow: hidden; }
.faq-a p { padding: 0 20px 20px; color: var(--muted); font-size: .95rem; }

.final { padding-block: 72px; background: linear-gradient(120deg, var(--red), var(--red) 45%, var(--red-2)); color: #fff; }
.cta-box { display: flex; align-items: center; justify-content: space-between; gap: 42px; }
.cta-box h2 { max-width: 760px; font-size: clamp(1.4rem, 2.3vw, 1.9rem); font-weight: 900; }
body > footer { padding-block: 24px; background: #fff; border-top: 1px solid var(--line); }
.foot { text-align: center; }
.foot small { color: var(--muted); font-size: .84rem; }

@media (max-width: 980px) {
  .links, .nav > .btn-desk { display: none; }
  .burger { display: grid; }
  .mobile-menu:not([hidden]) { display: flex; flex-direction: column; gap: 4px; width: min(1160px, calc(100% - 40px)); margin-inline: auto; padding-block: 0 18px; }
  .mobile-menu a { padding: 12px 14px; border-radius: 12px; font-weight: 600; }
  .mobile-menu a:not(.btn):hover { background: var(--purple-soft); }
  .hero-grid, .calc-grid { grid-template-columns: 1fr; gap: 54px; }
  .hero-copy { align-items: center; text-align: center; }
  .hero-copy h1 { max-width: 760px; }
  .hero-copy > p { max-width: 650px; }
  .video { max-width: 620px; margin-inline: auto; }
  .cards4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .calc-copy { align-items: center; text-align: center; }
  .calc-copy p { max-width: 650px; }
  .calc { width: min(580px, 100%); margin-inline: auto; }
  .cards3 { grid-template-columns: 1fr; }
  .cards3 .card { display: grid; grid-template-columns: 46px 1fr; column-gap: 18px; align-items: start; }
  .cards3 .ico { grid-row: 1 / 3; }
  .track { grid-template-columns: 1fr; }
  .quote.hl { transform: none; }
  .quote { gap: 20px; }
}

@media (max-width: 680px) {
  html { scroll-padding-top: 90px; }
  .wrap, .mobile-menu:not([hidden]) { width: min(1160px, calc(100% - 28px)); }
  section { padding-block: 76px; scroll-margin-top: 88px; }
  .nav { min-height: 68px; gap: 18px; }
  .logo img { height: 30px; }
  .hero { padding-block: 46px 0; }
  .hero-copy { gap: 20px; }
  .hero h1 { font-size: clamp(1.4rem, 6.1vw, 1.8rem); }
  .lead { font-size: 1rem; }
  .hero-copy > .btn { width: 100%; }
  .hero-grid { gap: 46px; }
  .video { padding: 8px; border-radius: 20px; }
  .video iframe { border-radius: 12px; }
  .tag { top: -26px; right: 18px; font-size: .76rem; padding: 6px 12px; }
  .stats { grid-template-columns: 1fr; margin-top: 54px; transform: translateY(36px); }
  .stat { padding: 22px; }
  .stat + .stat { border-inline-start: 0; border-top: 1px solid var(--line); }
  .why { padding-top: 118px; }
  .sec-head { margin-bottom: 34px; }
  .sec-head h2 { font-size: clamp(1.25rem, 5.2vw, 1.6rem); }
  .cards4 { grid-template-columns: 1fr; }
  .cards4 > .card { grid-template-rows: auto auto; row-gap: 8px; padding-top: 84px; }
  .calc-grid { gap: 38px; }
  .calc-copy h2 { font-size: clamp(1.25rem, 5.2vw, 1.6rem); }
  .calc { padding: 28px 20px; transform: none; }
  .amt b { font-size: clamp(2rem, 9vw, 3rem); }
  .seg { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cards3 .card { padding: 22px; }
  .steps { grid-template-columns: 1fr; gap: 28px; }
  .steps::before { top: 24px; bottom: 24px; right: 24px; left: auto; width: 2px; height: auto; }
  .step { padding: 2px 70px 0 0; min-height: 90px; }
  .quote { padding: 26px; }
  .final { padding-block: 54px; text-align: center; }
  .cta-box { flex-direction: column; gap: 28px; }
  .cta-box .btn { width: 100%; }
  .cta-box h2 { font-size: clamp(1.3rem, 5.6vw, 1.6rem); }
}

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

@media print {
  #hdr { display: none !important; }
  section { break-inside: avoid; }
}
