@font-face {
  font-family: Vazirmatn;
  src: url("assets/vazirmatn.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --purple: #261C78;
  --yellow: #FFDC00;
  --white: #FFFFFF;
  --muted: #D4D0EE;
  --line: rgba(255, 255, 255, 0.18);
  --surface: rgba(255, 255, 255, 0.045);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}

body {
  margin: 0;
  background: var(--purple);
  color: var(--white);
  font-family: Vazirmatn, Tahoma, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.8;
}

h1, h2, h3, p {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

button, a {
  -webkit-tap-highlight-color: transparent;
}

a:hover {
  color: var(--yellow);
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 6px;
}

::selection {
  background: var(--yellow);
  color: var(--purple);
}

.container {
  width: min(1240px, calc(100% - 96px));
  margin-inline: auto;
}

/* شريط التنقل */

.header {
  border-bottom: 1px solid var(--line);
}

.nav-row {
  min-height: 104px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: Arial, sans-serif;
  font-size: 29px;
  font-weight: 800;
  letter-spacing: -1.3px;
}

.brand img {
  flex-shrink: 0;
}

.brand-light {
  font-weight: 400;
}

.brand i {
  font-style: normal;
  color: var(--yellow);
}

nav {
  display: flex;
  gap: 34px;
  font-size: 14px;
  align-self: stretch;
  align-items: center;
}

nav a {
  position: relative;
  color: var(--muted);
}

nav .active {
  color: var(--yellow);
}

nav .active::after {
  content: "";
  position: absolute;
  bottom: -38px;
  right: 0;
  left: 0;
  height: 3px;
  background: var(--yellow);
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 14px;
}

.contact-link span {
  color: var(--yellow);
  font-family: Arial, sans-serif;
  font-size: 23px;
}

.menu-toggle {
  display: none;
}

/* عنوان الصفحة */

.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 56px 0 28px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 1.5px;
}

.square {
  display: inline-block;
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  background: var(--yellow);
}

h1 {
  margin: 9px 0 2px;
  font-size: clamp(42px, 5.4vw, 74px);
  line-height: 1.5;
  font-weight: 800;
  letter-spacing: -2px;
}

h1 span {
  color: var(--yellow);
}

.page-heading p {
  color: var(--muted);
}

.edition {
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-family: Arial, sans-serif;
  font-size: 12px;
  letter-spacing: 2px;
}

.edition-line {
  height: 1px;
  background: var(--line);
}

.demo-notice {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-bottom: 18px;
  font-size: 12px;
  color: var(--muted);
}

/* المقال الرئيسي */

.featured {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  min-height: 454px;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: var(--surface);
}

.featured-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  padding: 38px 40px 23px;
}

.meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
  color: var(--muted);
  font-size: 12px;
}

.tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 5px;
  background: var(--yellow);
  color: var(--purple);
  font-size: 12px;
  font-weight: 700;
}

.featured h2 {
  margin: 19px 0 13px;
  font-size: clamp(29px, 3.2vw, 44px);
  line-height: 1.65;
  letter-spacing: -1px;
}

.featured h2 em {
  font-style: normal;
  color: var(--yellow);
}

.featured-copy > p {
  max-width: 450px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.95;
}

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 30px;
  min-height: 48px;
  padding: 12px 20px;
  border: 0;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 700;
  transition: background 0.2s, transform 0.2s;
}

.yellow {
  background: var(--yellow);
  color: var(--purple);
}

.yellow:hover {
  background: var(--white);
  color: var(--purple);
}

.button:active {
  transform: translateY(1px);
}

.featured .button {
  margin-top: 23px;
}

.button-symbol {
  font-size: 23px;
  line-height: 1;
}

.featured-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  width: 100%;
  margin-top: auto;
  padding-top: 27px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 1px;
}

.feature-art {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  padding: 26px 30px;
  overflow: hidden;
  direction: ltr;
  background: var(--yellow);
  color: var(--purple);
  font-family: Arial, sans-serif;
}

.art-top,
.art-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: 0.7px;
}

.art-top span:last-child {
  text-align: right;
  font-weight: 400;
}

.big-type {
  align-self: center;
  padding-right: 24px;
  font-size: clamp(180px, 25vw, 340px);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -32px;
  transform: rotate(-8deg);
}

.big-type span {
  font-size: 0.7em;
}

.art-bottom {
  padding-top: 16px;
  border-top: 1px solid var(--purple);
}

/* بطاقات المقالات */

.stories {
  padding: 50px 0 56px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}

.section-heading h2 {
  display: flex;
  align-items: center;
  gap: 13px;
  font-size: 23px;
}

.section-note {
  color: var(--muted);
  font-size: 14px;
}

.story-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.story-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 13px;
  overflow: hidden;
  background: var(--surface);
  transition: transform 0.25s, border-color 0.25s;
}

.story-card:hover {
  transform: translateY(-5px);
  border-color: var(--yellow);
}

.card-art {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 217px;
  padding: 19px 24px;
  direction: ltr;
  font-family: Arial, sans-serif;
}

.art-label,
.art-caption {
  font-size: 12px;
  letter-spacing: 1px;
}

.type-art {
  align-self: center;
  font-size: 80px;
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: -5px;
}

.art-one {
  background: var(--yellow);
  color: var(--purple);
}

.art-one .type-art {
  direction: rtl;
  font-family: Vazirmatn, Tahoma, sans-serif;
  letter-spacing: -4px;
}

.art-two {
  background: var(--white);
  color: var(--purple);
}

.art-two .type-art {
  font-weight: 400;
  letter-spacing: -7px;
}

.art-two .type-art span {
  display: inline-block;
  margin-left: 20px;
  border-bottom: 7px solid var(--yellow);
  color: var(--purple);
  font-family: Vazirmatn, Tahoma, sans-serif;
  line-height: 1.1;
}

.art-three {
  border-bottom: 1px solid var(--line);
  background: var(--purple);
  color: var(--yellow);
}

.art-three .type-art {
  font-size: 66px;
  letter-spacing: -4px;
}

.card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 24px;
}

.category {
  color: var(--yellow);
}

.card-body h3 {
  margin: 15px 0 9px;
  font-size: 21px;
  line-height: 1.7;
  letter-spacing: -0.3px;
}

.card-body p {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.9;
}

.read-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  min-height: 48px;
  margin-top: auto;
  padding: 17px 0 0;
  border: 0;
  background: transparent;
  font-size: 14px;
  text-align: right;
}

.card-body p + .read-link {
  margin-top: 22px;
  border-top: 1px solid var(--line);
}

.read-link span {
  color: var(--yellow);
  font-size: 24px;
  line-height: 1;
}

.read-link:hover {
  color: var(--yellow);
}

/* التواصل */

.contact-panel {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 36px 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.contact-panel::before {
  content: "";
  position: absolute;
  right: -1px;
  top: 32px;
  bottom: 32px;
  width: 3px;
  background: var(--yellow);
}

.contact-panel h2 {
  margin: 8px 0;
  font-size: 34px;
  line-height: 1.7;
}

.contact-panel h2 span {
  color: var(--yellow);
}

.contact-panel p {
  color: var(--muted);
  font-size: 16px;
}

.contact-actions {
  display: flex;
  flex-direction: column;
  min-width: 230px;
  gap: 11px;
}

.social-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  min-height: 48px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: transparent;
  font-family: Arial, sans-serif;
  font-size: 16px;
}

.social-button:hover {
  border-color: var(--yellow);
}

.copy-status {
  min-height: 22px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  overflow-wrap: anywhere;
}

/* أسفل الصفحة */

footer {
  padding-top: 52px;
}

.footer-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 30px;
}

.footer-main .brand {
  font-size: 25px;
}

.footer-main p,
.footer-main > a:last-child {
  color: var(--muted);
  font-size: 14px;
}

.footer-main > a:last-child:hover {
  color: var(--yellow);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 0 30px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.footer-bottom > span:nth-child(2) {
  font-family: Arial, sans-serif;
  letter-spacing: 1.8px;
}

#back-top {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
}

#back-top:hover {
  color: var(--yellow);
}

/* نافذة قراءة المقال */

dialog {
  width: min(660px, calc(100% - 32px));
  max-height: 85vh;
  max-height: 85dvh;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--purple);
  color: var(--white);
}

dialog::backdrop {
  background: rgba(10, 5, 32, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.dialog-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 26px;
  border-bottom: 1px solid var(--line);
}

#close-dialog {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  font-size: 27px;
  line-height: 1;
}

#close-dialog:hover {
  background: var(--yellow);
  color: var(--purple);
}

.dialog-content {
  padding: 30px;
}

.dialog-content h2 {
  margin: 19px 0;
  font-size: 29px;
  line-height: 1.65;
}

.dialog-content p {
  margin: 15px 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.source-link {
  display: inline-block;
  margin-top: 15px;
  color: var(--yellow);
  font-size: 14px;
  text-decoration: underline;
  text-underline-offset: 6px;
}

body.modal-open {
  overflow: hidden;
}

.skip {
  position: fixed;
  top: -100px;
  right: 20px;
  z-index: 5;
  padding: 12px;
  background: var(--yellow);
  color: var(--purple);
}

.skip:focus {
  top: 10px;
}

/* الشاشات الكبيرة */

@media (min-width: 1500px) {
  .container {
    width: min(1320px, calc(100% - 120px));
  }
}

/* الأجهزة اللوحية */

@media (max-width: 1050px) {
  .container {
    width: calc(100% - 48px);
  }

  nav {
    gap: 20px;
  }

  .featured-copy {
    padding: 30px;
  }

  .featured h2 {
    font-size: 34px;
  }

  .story-grid {
    gap: 16px;
  }

  .card-body {
    padding: 20px;
  }

  .card-body h3 {
    font-size: 19px;
  }

  .type-art {
    font-size: 64px;
  }

  .art-three .type-art {
    font-size: 50px;
  }

  .card-art {
    min-height: 195px;
  }

  .footer-main p {
    display: none;
  }
}

/* الهواتف */

@media (max-width: 760px) {
  html {
    scroll-padding-top: 30px;
  }

  .container {
    width: calc(100% - 36px);
  }

  .nav-row {
    position: relative;
    min-height: 80px;
    flex-wrap: wrap;
    gap: 12px;
  }

  .brand {
    gap: 8px;
    font-size: 25px;
  }

  .brand img {
    width: 35px;
    height: 35px;
  }

  .contact-link {
    margin-right: auto;
    padding: 7px 10px;
    gap: 8px;
    font-size: 14px;
  }

  .contact-link span {
    font-size: 18px;
  }

  .menu-toggle {
    display: flex;
    order: 3;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: transparent;
  }

  .menu-toggle span {
    width: 17px;
    height: 2px;
    background: var(--white);
  }

  nav {
    display: none;
    order: 4;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0 0 20px;
  }

  nav.open {
    display: flex;
  }

  nav a {
    padding: 12px;
  }

  nav .active::after {
    display: none;
  }

  .page-heading {
    padding: 34px 0 20px;
  }

  .page-heading h1 {
    font-size: 48px;
  }

  .edition {
    display: none;
  }

  .demo-notice {
    line-height: 1.8;
  }

  .featured {
    grid-template-columns: minmax(0, 1fr);
  }

  .featured-copy {
    order: 2;
    padding: 26px;
  }

  .featured h2 {
    font-size: 32px;
  }

  .feature-art {
    min-height: 285px;
    padding: 20px 24px;
  }

  .big-type {
    font-size: 215px;
    letter-spacing: -22px;
    line-height: 0.9;
  }

  .art-bottom {
    padding-top: 10px;
  }

  .featured-bottom {
    padding-top: 27px;
  }

  .stories {
    padding: 35px 0;
  }

  .section-heading h2 {
    font-size: 21px;
  }

  .section-note {
    display: none;
  }

  .story-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .card-art {
    min-height: 210px;
  }

  .type-art {
    font-size: 80px;
  }

  .art-three .type-art {
    font-size: 74px;
  }

  .card-body {
    padding: 23px;
  }

  .card-body h3 {
    font-size: 22px;
  }

  .contact-panel {
    flex-direction: column;
    align-items: stretch;
    gap: 22px;
    padding: 28px 24px;
  }

  .contact-panel h2 {
    font-size: 29px;
  }

  .contact-actions {
    min-width: 0;
  }

  .footer-main {
    flex-direction: column;
    align-items: flex-start;
    gap: 19px;
  }

  .footer-bottom {
    flex-wrap: wrap;
  }

  .footer-bottom > span:nth-child(2) {
    display: none;
  }

  .dialog-content {
    padding: 24px;
  }

  .dialog-content h2 {
    font-size: 25px;
  }
}

@media (max-width: 380px) {
  .nav-row {
    gap: 8px;
  }

  .nav-row .brand {
    font-size: 21px;
  }

  .nav-row .brand img {
    width: 30px;
    height: 30px;
  }

  .contact-link {
    padding: 7px 9px;
  }

  .contact-link span {
    display: none;
  }

  .featured-copy {
    padding: 22px;
  }

  .featured h2 {
    font-size: 29px;
  }

  .art-top,
  .art-bottom {
    letter-spacing: 0;
  }
}

/* احترام إعداد تقليل الحركة */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}
