/* ============ Dar Al-Meshkat — style.css ============ */
:root {
  --purple: #7b2f8f;
  --purple-dark: #5e2270;
  --purple-soft: #f4ecf7;
  --ink: #1d1626;
  --ink-2: #4d4457;
  --muted: #776e82;
  --line: #e9e3ee;
  --bg: #ffffff;
  --bg-alt: #f8f6fa;
  --dark: #221631;
  --radius: 14px;
  --shadow: 0 12px 40px rgba(34, 22, 49, 0.10);
  --font: "IBM Plex Sans", -apple-system, "Segoe UI", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.section { padding: 96px 0; }
.center { text-align: center; }

h1, h2, h3 { line-height: 1.2; font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); margin-bottom: 20px; }
h3 { font-size: 1.15rem; }

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--purple);
  margin-bottom: 14px;
}
.eyebrow.center { display: block; }
.eyebrow.light { color: #d9b7e6; }

/* ============ Buttons ============ */
.btn {
  display: inline-block;
  padding: 13px 28px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
}
.btn-primary { background: var(--purple); color: #fff; }
.btn-primary:hover { background: var(--purple-dark); transform: translateY(-1px); }
.btn-ghost { border: 1.5px solid rgba(255, 255, 255, 0.55); color: #fff; }
.btn-ghost:hover { border-color: #fff; background: rgba(255, 255, 255, 0.1); }
.btn-outline { border: 1.5px solid var(--line); color: var(--purple); background: #fff; }
.btn-outline:hover { border-color: var(--purple); }

.text-link {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--purple);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.text-link::after { content: "\2192"; transition: transform 0.2s; }
.text-link:hover::after { transform: translateX(4px); }

/* ============ Header ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.site-header.scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 6px 24px rgba(34, 22, 49, 0.06);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 74px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { height: 44px; width: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 1rem; letter-spacing: -0.01em; }
.brand-text small { font-size: 0.72rem; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; }

.site-nav { display: flex; gap: 26px; margin-left: auto; }
.site-nav a {
  font-size: 0.93rem;
  font-weight: 500;
  color: var(--ink-2);
  transition: color 0.2s;
}
.site-nav a:hover { color: var(--purple); }
.nav-store { color: var(--purple) !important; font-weight: 600 !important; }
.header-cta { padding: 10px 22px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
  margin-left: auto;
}
.nav-toggle span { width: 22px; height: 2px; background: var(--ink); transition: transform 0.25s, opacity 0.25s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============ Hero ============ */
.hero { position: relative; min-height: 620px; display: flex; align-items: center; overflow: hidden; }
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 30%;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(100deg, rgba(24, 12, 34, 0.86) 0%, rgba(24, 12, 34, 0.62) 42%, rgba(24, 12, 34, 0.18) 78%),
    linear-gradient(0deg, rgba(24, 12, 34, 0.35), rgba(24, 12, 34, 0.05) 40%);
}
.hero-content { position: relative; z-index: 1; padding-top: 40px; padding-bottom: 90px; }
.hero h1 { color: #fff; font-size: clamp(2.1rem, 5vw, 3.4rem); margin-bottom: 22px; }
.hero .lead {
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.08rem;
  max-width: 560px;
  margin-bottom: 34px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ============ Trust bar ============ */
.trustbar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-top: -58px;
  position: relative;
  z-index: 2;
  overflow: hidden;
}
.trustbar li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 26px 24px;
  border-inline-end: 1px solid var(--line);
}
.trustbar li:last-child { border-inline-end: 0; }
.trustbar svg { width: 34px; height: 34px; color: var(--purple); flex-shrink: 0; }
.trustbar strong { display: block; font-size: 0.95rem; line-height: 1.3; }
.trustbar span { font-size: 0.82rem; color: var(--muted); }

/* ============ Brands ============ */
.brands { padding-top: 110px; padding-bottom: 70px; }
.brand-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 44px;
}
.brand-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 26px 30px;
  min-height: 110px;
  transition: box-shadow 0.25s, transform 0.25s;
}
.brand-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.brand-card img { max-height: 52px; width: auto; max-width: 100%; object-fit: contain; }

/* ============ Products ============ */
.products { background: var(--bg-alt); }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 44px;
}
.section-head h2 { margin-bottom: 0; max-width: 560px; }

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.product-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: box-shadow 0.25s, transform 0.25s;
}
.product-card:hover { box-shadow: var(--shadow); transform: translateY(-4px); }
.product-card h3 { margin-top: 4px; }
.product-card p { font-size: 0.92rem; color: var(--ink-2); flex-grow: 1; }

.icon-tile {
  width: 54px;
  height: 54px;
  border-radius: 12px;
  background: var(--purple-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--purple);
}
.icon-tile svg { width: 28px; height: 28px; }
.icon-tile.small { width: 46px; height: 46px; border-radius: 10px; flex-shrink: 0; }
.icon-tile.small svg { width: 24px; height: 24px; }

/* ============ Why us ============ */
.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 48px;
}
.why-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px 30px;
  transition: box-shadow 0.25s, transform 0.25s;
}
.why-card:hover { box-shadow: var(--shadow); transform: translateY(-4px); }
.why-card h3 { margin: 18px 0 10px; }
.why-card > p { color: var(--ink-2); font-size: 0.95rem; margin-bottom: 16px; }

.checks li {
  position: relative;
  padding-inline-start: 28px;
  margin-bottom: 9px;
  font-size: 0.93rem;
  color: var(--ink-2);
}
.checks li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 5px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--purple-soft);
}
.checks li::after {
  content: "";
  position: absolute;
  inset-inline-start: 4px;
  top: 9px;
  width: 7px;
  height: 4px;
  border-inline-start: 2px solid var(--purple);
  border-bottom: 2px solid var(--purple);
  transform: rotate(-45deg);
}
.checks.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 20px;
  margin-top: 22px;
}

/* ============ About ============ */
.about { background: var(--bg-alt); }
.about-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 64px;
  align-items: center;
}
.about-media { position: relative; }
.about-media img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  aspect-ratio: 4 / 3.4;
  object-fit: cover;
  width: 100%;
}
.about-badge {
  position: absolute;
  inset-inline-end: -18px;
  bottom: 28px;
  background: var(--purple);
  color: #fff;
  border-radius: 12px;
  padding: 16px 22px;
  box-shadow: 0 14px 36px rgba(123, 47, 143, 0.35);
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}
.about-badge strong { font-size: 1.15rem; }
.about-badge span { font-size: 0.8rem; opacity: 0.85; }
.about-copy p { color: var(--ink-2); margin-bottom: 16px; }

/* ============ Training ============ */
.training { background: var(--dark); color: #fff; }
.training-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: end;
  margin-bottom: 48px;
}
.training-head h2 { color: #fff; margin-bottom: 0; }
.training-intro { color: rgba(255, 255, 255, 0.75); font-size: 1rem; }
.training-gallery {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 20px;
}
.training-gallery img {
  border-radius: var(--radius);
  width: 100%;
  aspect-ratio: 16 / 9.5;
  object-fit: cover;
}
.training-gallery figcaption {
  margin-top: 12px;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.65);
}

/* ============ Runyes verify strip ============ */
.verify { background: linear-gradient(105deg, var(--purple-dark), var(--purple)); color: #fff; }
.verify-inner {
  display: flex;
  align-items: center;
  gap: 26px;
  padding-top: 44px;
  padding-bottom: 44px;
  flex-wrap: wrap;
}
.verify-icon {
  width: 62px;
  height: 62px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.verify-icon svg { width: 32px; height: 32px; }
.verify-copy { flex: 1; min-width: 260px; }
.verify-copy h2 { font-size: 1.4rem; margin-bottom: 6px; }
.verify-copy p { color: rgba(255, 255, 255, 0.82); font-size: 0.95rem; }
.btn-light { background: #fff; color: var(--purple-dark); }
.btn-light:hover { background: var(--purple-soft); transform: translateY(-1px); }

/* ============ Training CTA ============ */
.training-cta {
  margin-top: 44px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding-top: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.training-cta p { color: rgba(255, 255, 255, 0.8); font-size: 0.98rem; }

/* ============ Videos ============ */
.video-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 44px;
}
.video-card { margin: 0; }
.video-thumb {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--dark);
  cursor: pointer;
  box-shadow: 0 6px 22px rgba(34, 22, 49, 0.10);
}
.video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}
.video-thumb:hover img { transform: scale(1.05); }
.video-thumb iframe { width: 100%; height: 100%; border: 0; display: block; }
.play-btn {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--purple);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 26px rgba(24, 12, 34, 0.35);
  transition: transform 0.25s, background 0.25s, color 0.25s;
}
.play-btn svg { width: 28px; height: 28px; margin-inline-start: 3px; }
.video-thumb:hover .play-btn { transform: scale(1.08); background: var(--purple); color: #fff; }
.video-card figcaption {
  margin-top: 12px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink-2);
}
.videos-cta { text-align: center; margin-top: 44px; }

/* ============ Socials ============ */
.socials { display: flex; gap: 12px; margin-top: 26px; }
.socials a {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-2);
  transition: color 0.2s, border-color 0.2s, background 0.2s, transform 0.2s;
}
.socials a:hover {
  color: #fff;
  background: var(--purple);
  border-color: var(--purple);
  transform: translateY(-2px);
}
.socials svg { width: 22px; height: 22px; }

/* ============ Training program list (dark section) ============ */
.t-program {
  list-style: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.t-program li {
  display: flex;
  align-items: flex-start;
  gap: 22px;
  padding: 22px 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.t-program li:last-child { border-bottom: 1px solid rgba(255, 255, 255, 0.12); }
.tp-num {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #cf9fdd;
  line-height: 1.9;
  min-width: 30px;
}
.t-program strong {
  display: block;
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 4px;
}
.t-program p {
  font-size: 0.9rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.62);
}

/* ============ Research teaser ============ */
.research-teaser[hidden] { display: none; }
.research-teaser { background: var(--light, #f8f6fa); }
.rt-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 44px;
}
.rt-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.25s, transform 0.25s;
}
.rt-card:hover { box-shadow: var(--shadow); transform: translateY(-4px); }
.rt-cover {
  display: block;
  aspect-ratio: 16 / 10;
  background: linear-gradient(150deg, #2a1a3d, var(--dark));
  overflow: hidden;
}
.rt-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.35s ease;
}
.rt-card:hover .rt-cover img { transform: scale(1.04); }
.rt-body { display: flex; flex-direction: column; gap: 7px; padding: 18px 20px 20px; }
.rt-meta { font-size: 0.78rem; font-weight: 600; color: var(--purple); }
.rt-body strong { font-size: 0.98rem; line-height: 1.45; color: var(--ink); }
.rt-authors { font-size: 0.82rem; color: var(--muted); }

/* two publications — balanced columns */
.rt-grid.rt-two { grid-template-columns: repeat(2, 1fr); }

/* one publication — full-width featured card */
.rt-grid.rt-single { grid-template-columns: 1fr; }
.rt-featured {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  transition: box-shadow 0.25s, transform 0.25s;
}
.rt-featured:hover { box-shadow: var(--shadow); transform: translateY(-4px); }
.rt-fcover {
  display: block;
  min-height: 300px;
  background: linear-gradient(150deg, #2a1a3d, var(--dark));
  overflow: hidden;
}
.rt-fcover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.35s ease;
}
.rt-featured:hover .rt-fcover img { transform: scale(1.03); }
.rt-fbody {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 34px 38px;
  justify-content: center;
}
.rt-fbody strong { font-size: 1.35rem; line-height: 1.45; color: var(--ink); }
.rt-abstract {
  font-size: 0.92rem;
  color: var(--ink-2);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.rt-readbtn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  align-self: flex-start;
  margin-top: 8px;
  background: var(--purple);
  color: #fff;
  border-radius: 10px;
  padding: 12px 24px;
  font-size: 0.92rem;
  font-weight: 600;
  transition: background 0.2s;
}
.rt-featured:hover .rt-readbtn { background: var(--purple-dark); }
.rt-readbtn svg { width: 18px; height: 18px; }

@media (max-width: 1024px) and (min-width: 641px) {
  .rt-grid { grid-template-columns: repeat(2, 1fr); }
  .rt-grid:not(.rt-two):not(.rt-single) .rt-card:nth-child(3) { display: none; }
}
@media (max-width: 860px) {
  .rt-featured { grid-template-columns: 1fr; }
  .rt-fcover { min-height: 0; aspect-ratio: 16 / 9; }
  .rt-fbody { padding: 24px 22px 28px; }
}
@media (max-width: 640px) {
  .rt-grid { grid-template-columns: 1fr; }
}

/* ============ Contact ============ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 0.9fr;
  gap: 64px;
  align-items: center;
}
.contact-copy > p { color: var(--ink-2); max-width: 480px; }
.contact-actions { display: flex; flex-direction: column; gap: 14px; margin-top: 30px; }
.contact-item {
  display: flex;
  align-items: center;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 20px;
  transition: box-shadow 0.25s, border-color 0.25s, transform 0.25s;
  max-width: 420px;
}
.contact-item:hover { box-shadow: var(--shadow); border-color: var(--purple); transform: translateY(-2px); }
.contact-item.static:hover { box-shadow: none; border-color: var(--line); transform: none; }
.contact-item strong { display: block; font-size: 0.97rem; }
.contact-item small { color: var(--muted); font-size: 0.85rem; }
.contact-media img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: 100%;
  aspect-ratio: 4 / 4.6;
  object-fit: cover;
  object-position: center top;
}

/* ============ Footer ============ */
.site-footer { background: var(--bg-alt); border-top: 1px solid var(--line); padding: 44px 0; }
.footer-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}
.site-footer .brand img { height: 38px; }
.footer-nav { display: flex; gap: 18px 22px; margin-left: auto; flex-wrap: wrap; }
.footer-nav a { font-size: 0.9rem; color: var(--ink-2); }
.footer-nav a:hover { color: var(--purple); }
.footer-socials { margin-top: 0; }
.copyright { width: 100%; font-size: 0.83rem; color: var(--muted); margin-top: 6px; line-height: 1.9; }

/* ============ Reveal animation ============ */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ============ Responsive ============ */
@media (max-width: 1024px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .trustbar { grid-template-columns: repeat(2, 1fr); }
  .trustbar li:nth-child(2) { border-inline-end: 0; }
  .trustbar li:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .why-grid { grid-template-columns: 1fr; max-width: 640px; margin-inline: auto; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 44px; }
  .about-badge { inset-inline-end: 16px; }
  .training-head { grid-template-columns: 1fr; gap: 18px; }
  .training-gallery { grid-template-columns: 1fr; }
  .contact-media { order: -1; }
  .contact-media img { aspect-ratio: 16 / 10; object-position: center 20%; }
}

@media (max-width: 1024px) {
  .header-cta { display: none; }
  .nav-toggle { display: flex; }
  .site-nav {
    position: fixed;
    top: 74px;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    flex-direction: column;
    gap: 0;
    padding: 10px 24px 18px;
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s, transform 0.25s;
  }
  .site-nav.open { transform: none; opacity: 1; pointer-events: auto; }
  .site-nav a { padding: 12px 0; border-bottom: 1px solid var(--bg-alt); font-size: 1rem; }
  .site-nav a:last-child { border-bottom: 0; }
}

@media (max-width: 1024px) and (min-width: 641px) {
  .video-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .section { padding: 70px 0; }
  .video-grid { grid-template-columns: 1fr; }
  .verify-inner { flex-direction: column; align-items: flex-start; }
  .hero { min-height: 560px; }
  .trustbar { grid-template-columns: 1fr; margin-top: -40px; }
  .trustbar li { border-inline-end: 0; border-bottom: 1px solid var(--line); padding: 18px 22px; }
  .trustbar li:last-child { border-bottom: 0; }
  .brand-row { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: 1fr; }
  .checks.two-col { grid-template-columns: 1fr; }
  .brand-text small { display: none; }
}
