/* Firasa AI — shared page styles (non-home) */

/* ---------- Page hero ---------- */
.page-hero {
  padding: clamp(60px, 9vw, 140px) 0 clamp(40px, 6vw, 80px);
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: "";
  position: absolute;
  inset-inline-end: -10%; top: -20%;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in oklch, var(--accent) 40%, transparent) 0%, transparent 60%);
  opacity: 0.6;
  pointer-events: none;
}
.page-hero__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(48px, 8vw, 128px);
  letter-spacing: -0.035em;
  line-height: 0.96;
  margin: 24px 0 32px;
  max-width: 18ch;
  text-wrap: balance;
  position: relative;
}
html[dir="rtl"] .page-hero__title { letter-spacing: 0; line-height: 1.1; }
.page-hero__lede {
  max-width: 620px;
  color: var(--fg-muted);
  font-size: clamp(15px, 1.2vw, 19px);
  line-height: 1.7;
  margin: 0;
  position: relative;
}

/* ---------- SERVICES PAGE ---------- */
.srv-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}
@media (min-width: 720px) { .srv-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) { .srv-grid { grid-template-columns: repeat(3, 1fr); } }
.srv-card {
  border: 1px solid var(--line);
  background: var(--bg-1);
  border-radius: var(--r-lg);
  padding: 32px;
  display: flex; flex-direction: column; gap: 16px;
  transition: border-color .3s, transform .3s;
  min-height: 320px;
}
.srv-card:hover { border-color: var(--accent-soft); transform: translateY(-4px); }
.srv-card--feature {
  background: linear-gradient(160deg, var(--brand-deep-2) 0%, var(--brand-deep) 100%);
  border-color: var(--accent-soft);
  color: #F4F1FA;
}
.srv-card--feature .srv-card__list li { border-color: rgba(255,255,255,0.14); }
.srv-card__head { display: flex; justify-content: space-between; align-items: center; color: var(--fg-muted); font-size: 13px; }
.srv-card--feature .srv-card__head { color: rgba(255,255,255,0.6); }
.srv-card h3 {
  font-family: var(--font-display);
  font-size: clamp(24px, 2.2vw, 32px);
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
html[dir="rtl"] .srv-card h3 { letter-spacing: 0; line-height: 1.3; }
.srv-card p { color: var(--fg-muted); font-size: 14px; line-height: 1.65; margin: 0; }
.srv-card--feature p { color: rgba(255,255,255,0.76); }
.srv-card__list { list-style: none; padding: 0; margin: auto 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.srv-card__list li {
  padding: 6px 12px; border-radius: var(--r-pill);
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-muted);
}
.srv-card--feature .srv-card__list li { color: rgba(255,255,255,0.8); }

/* Engage grid */
.engage-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}
@media (min-width: 880px) { .engage-grid { grid-template-columns: repeat(3, 1fr); } }
.engage-card {
  padding: 36px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: var(--bg-1);
  display: flex; flex-direction: column; gap: 16px;
  min-height: 260px;
}
.engage-card--feat { background: var(--accent); color: #0A0812; border-color: var(--accent); }
.engage-card__head { display: flex; align-items: center; gap: 14px; }
.engage-card__head .mono { font-size: 13px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px; }
.engage-card--feat .engage-card__head .mono { border-color: rgba(10,8,18,0.3); }
.engage-card h3 { font-family: var(--font-display); font-size: 24px; font-weight: 700; margin: 0; letter-spacing: -0.015em; }
.engage-card p { font-size: 14px; line-height: 1.65; color: var(--fg-muted); margin: 0; }
.engage-card--feat p { color: rgba(10,8,18,0.75); }
.engage-card__price { font-size: 12px; color: var(--fg-muted); margin-top: auto; letter-spacing: 0.08em; }
.engage-card--feat .engage-card__price { color: rgba(10,8,18,0.75); }

/* ===== Masarif personal-project showcase ===== */
.masarif-card {
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  padding: 40px;
  background:
    radial-gradient(120% 80% at 100% 0%, color-mix(in oklch, var(--accent) 14%, transparent) 0%, transparent 55%),
    var(--bg-1);
  position: relative;
  overflow: hidden;
  margin-bottom: 48px;
}
.masarif-card::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(135deg, transparent 0%, transparent 60%, color-mix(in oklch, var(--accent) 8%, transparent) 100%);
  pointer-events: none;
}
.masarif-card > * { position: relative; z-index: 1; }
.masarif-card__meta {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12px; color: var(--fg-muted);
  letter-spacing: 0.08em; text-transform: uppercase;
  padding-bottom: 28px;
}
.masarif-card__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px color-mix(in oklch, var(--accent) 30%, transparent); animation: pulse 2.4s infinite; }
.masarif-card__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: start;
}
@media (min-width: 900px) { .masarif-card__grid { grid-template-columns: 1.1fr 1fr; gap: 56px; } }
.masarif-card__title {
  font-family: var(--font-display);
  font-size: clamp(28px, 3vw, 44px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
}
html[dir="rtl"] .masarif-card__title { letter-spacing: 0; line-height: 1.3; }
.masarif-card__lede { color: var(--fg-muted); font-size: 15px; line-height: 1.7; margin: 0 0 28px; max-width: 54ch; }
.masarif-card__flow {
  list-style: none; padding: 0; margin: 0 0 28px;
  display: flex; flex-direction: column; gap: 14px;
}
.masarif-card__flow li {
  display: flex; gap: 14px; align-items: flex-start;
  font-size: 14px; line-height: 1.55; color: var(--fg);
}
.masarif-card__step {
  flex: none;
  width: 32px; height: 32px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: color-mix(in oklch, var(--accent) 10%, transparent);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px;
  color: var(--accent);
}
.masarif-card__stack { display: flex; flex-wrap: wrap; gap: 8px; }
.masarif-card__stack .chip {
  font-size: 11px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--fg-muted);
  letter-spacing: 0.1em;
}

/* Masarif viz */
.masarif-card__viz {
  display: grid;
  gap: 18px;
  padding: 24px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: color-mix(in oklch, var(--bg) 70%, transparent);
}
.msf-sms {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  background: var(--bg-1);
  max-width: 320px;
}
.msf-sms__bank { font-size: 11px; color: var(--fg-dim); margin-bottom: 6px; letter-spacing: 0.12em; }
.msf-sms__line { font-size: 13px; line-height: 1.55; color: var(--fg); }
.msf-flow { width: 100%; height: 32px; }
.msf-dash {
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  padding: 16px;
  background: var(--bg-1);
}
.msf-dash__head {
  display: flex; justify-content: space-between; align-items: baseline;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  font-size: 11px; color: var(--fg-muted); letter-spacing: 0.1em;
}
.msf-dash__total { font-family: var(--font-display); font-size: 20px; color: var(--fg); letter-spacing: -0.01em; font-weight: 600; }
.msf-dash__bars {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  height: 110px;
  padding: 16px 0 12px;
  align-items: end;
}
.msf-bar {
  position: relative;
  height: var(--h);
  background: linear-gradient(to top, color-mix(in oklch, var(--accent) 50%, transparent), var(--accent));
  border-radius: 4px 4px 0 0;
  animation: msfGrow 1.2s ease-out backwards;
}
.msf-bar:nth-child(1) { animation-delay: 0.1s; }
.msf-bar:nth-child(2) { animation-delay: 0.2s; }
.msf-bar:nth-child(3) { animation-delay: 0.3s; }
.msf-bar:nth-child(4) { animation-delay: 0.4s; }
.msf-bar:nth-child(5) { animation-delay: 0.5s; }
@keyframes msfGrow { from { height: 0; } to { height: var(--h); } }
.msf-bar__lbl {
  position: absolute;
  inset-inline: 0;
  bottom: -18px;
  text-align: center;
  font-size: 9px;
  color: var(--fg-muted);
  letter-spacing: 0.08em;
}
.msf-dash__row {
  margin-top: 22px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  display: flex; align-items: center; gap: 10px;
  font-size: 12px; color: var(--fg-muted);
}
.msf-dash__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex: none; }

.engage-note { margin: 0 0 18px; color: var(--fg-muted); font-size: 12px; letter-spacing: 0.1em; }
.engage-grid--single { grid-template-columns: 1fr !important; max-width: 520px; }

/* CTA strip */
.cta-strip__inner {
  display: grid; grid-template-columns: 1fr; gap: 32px;
  align-items: center;
  padding: clamp(40px, 6vw, 72px);
  border-radius: var(--r-xl);
  background: var(--bg-1);
  border: 1px solid var(--line);
}
@media (min-width: 900px) { .cta-strip__inner { grid-template-columns: 2fr 1fr; gap: 60px; } }
.cta-strip__inner h2 {
  font-size: clamp(32px, 4vw, 56px);
  font-weight: 700; margin: 0;
  letter-spacing: -0.025em;
  line-height: 1;
  max-width: 18ch;
  text-wrap: balance;
}
html[dir="rtl"] .cta-strip__inner h2 { letter-spacing: 0; line-height: 1.2; }
.cta-strip__inner .pill { justify-self: start; }
@media (min-width: 900px) { .cta-strip__inner .pill { justify-self: end; } }

/* ---------- USE CASES PAGE ---------- */
.cases-shell {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--bg-1);
}
@media (min-width: 900px) { .cases-shell { grid-template-columns: 280px 1fr; } }
.cases-sidebar {
  display: flex; flex-direction: column;
  border-inline-end: 1px solid var(--line);
}
.case-tab {
  display: flex; justify-content: space-between; align-items: center;
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  color: var(--fg-muted);
  transition: background .2s, color .2s;
  text-align: start;
  cursor: pointer;
  background: transparent;
  width: 100%;
  font-family: inherit;
}
.case-tab:last-child { border-bottom: none; }
.case-tab:hover { color: var(--fg); background: var(--bg-2); }
.case-tab .case-tab__icon { opacity: 0.4; transition: opacity .2s, transform .2s, color .2s; }
.case-tab--active { color: var(--accent); background: var(--bg-2); }
.case-tab--active .case-tab__icon { opacity: 1; color: var(--accent); transform: rotate(-45deg); }
html[dir="rtl"] .case-tab--active .case-tab__icon { transform: rotate(-135deg); }

.case-panel {
  position: relative;
  padding: 48px;
  min-height: 520px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: center;
}
@media (min-width: 1100px) { .case-panel { grid-template-columns: 280px 1fr; gap: 48px; } }

.case-net {
  width: 100%;
  aspect-ratio: 1;
  max-width: 280px;
  justify-self: center;
}
.case-motion {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  max-width: 300px;
  justify-self: center;
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 50%, color-mix(in oklch, var(--accent) 14%, transparent) 0%, transparent 65%),
    linear-gradient(180deg, var(--bg-2), var(--bg-1));
  border: 1px solid var(--line);
  overflow: hidden;
  isolation: isolate;
}
.case-motion__svg { width: 100%; height: 100%; display: block; }
.case-motion__grain {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 20px 20px;
  opacity: 0.35;
  mask-image: radial-gradient(circle at 50% 50%, rgba(0,0,0,0.9), transparent 70%);
  pointer-events: none;
}
.case-motion__label {
  position: absolute; left: 14px; bottom: 12px;
  font-size: 10px; letter-spacing: 0.18em;
  color: var(--fg-muted);
}

.case-content { display: none; opacity: 0; transform: translateY(8px); transition: opacity .4s, transform .4s; }
.case-content--active { display: block; opacity: 1; transform: none; }
.case-content h3 {
  font-family: var(--font-display);
  font-size: clamp(32px, 3vw, 44px);
  font-weight: 700;
  margin: 0 0 20px;
  letter-spacing: -0.02em;
}
html[dir="rtl"] .case-content h3 { letter-spacing: 0; line-height: 1.3; }
.case-content p {
  color: var(--fg-muted);
  font-size: 14px;
  line-height: 1.7;
  margin: 0 0 14px;
  max-width: 54ch;
}
.case-content p strong { color: var(--fg); font-weight: 600; }

.case-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.case-meta span {
  padding: 6px 12px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-muted);
}

/* ---------- ABOUT ---------- */
.about-grid {
  display: grid; grid-template-columns: 1fr; gap: 32px;
}
@media (min-width: 900px) { .about-grid { grid-template-columns: 1.2fr 1fr; gap: 60px; } }
.about-text p {
  color: var(--fg-muted);
  font-size: 16px;
  line-height: 1.75;
  margin: 0 0 20px;
  max-width: 58ch;
}
.about-text p strong { color: var(--fg); font-weight: 600; }

.principles { display: grid; grid-template-columns: 1fr; gap: 18px; }
@media (min-width: 700px) { .principles { grid-template-columns: repeat(2, 1fr); } }
.principle {
  padding: 28px; border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--bg-1);
}
.principle .mono { color: var(--accent); font-size: 13px; }
.principle h4 { font-family: var(--font-display); font-size: 22px; margin: 16px 0 8px; font-weight: 700; letter-spacing: -0.01em; }
.principle p { color: var(--fg-muted); font-size: 14px; line-height: 1.65; margin: 0; }

.team-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px;
}
@media (min-width: 880px) { .team-grid { grid-template-columns: repeat(4, 1fr); } }
.team-card {
  background: var(--bg-1); border: 1px solid var(--line);
  border-radius: var(--r-lg); overflow: hidden;
  transition: transform .3s;
}
.team-card:hover { transform: translateY(-4px); }
.team-card__photo {
  aspect-ratio: 4/5;
  background:
    repeating-linear-gradient(135deg, var(--bg-2) 0 14px, var(--bg-3) 14px 28px);
  position: relative;
}
.team-card__photo::after {
  content: attr(data-initials);
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 56px; font-weight: 700;
  color: var(--fg-dim);
}
.team-card__body { padding: 18px 20px; }
.team-card__body h4 { margin: 0; font-family: var(--font-display); font-size: 17px; font-weight: 600; }
.team-card__body span { display: block; color: var(--fg-muted); font-size: 12px; font-family: var(--font-mono); letter-spacing: 0.06em; margin-top: 4px; }

/* ---------- CONTACT ---------- */
.contact-grid {
  display: grid; grid-template-columns: 1fr; gap: 32px;
}
@media (min-width: 960px) { .contact-grid { grid-template-columns: 1.2fr 1fr; gap: 56px; } }

.form {
  background: var(--bg-1); border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(28px, 4vw, 48px);
}
.form__row { display: grid; grid-template-columns: 1fr; gap: 18px; margin-bottom: 18px; }
@media (min-width: 720px) { .form__row--2 { grid-template-columns: 1fr 1fr; } }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12px; font-family: var(--font-mono); letter-spacing: 0.08em; color: var(--fg-muted); text-transform: uppercase; }
.field input, .field select, .field textarea {
  background: var(--bg-2);
  border: 1px solid var(--line);
  color: var(--fg);
  border-radius: var(--r-sm);
  padding: 14px 16px;
  font-family: var(--font-sans);
  font-size: 15px;
  transition: border-color .2s, background .2s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg-3);
}
.field textarea { min-height: 140px; resize: vertical; }
.field.is-error input, .field.is-error select, .field.is-error textarea { border-color: #E85C5C; }
.field__err { font-size: 12px; color: #E85C5C; min-height: 14px; }

.check-row { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--fg-muted); margin: 8px 0 24px; }
.check-row input { accent-color: var(--accent); margin-top: 3px; }

.form__submit { display: flex; align-items: center; gap: 14px; }
.form__submit .pill { padding: 16px 28px; }
.form__status { font-size: 13px; color: var(--fg-muted); font-family: var(--font-mono); }
.form__status--ok { color: var(--accent); }

.contact-side {
  display: flex; flex-direction: column; gap: 18px;
}
.contact-card {
  border: 1px solid var(--line);
  background: var(--bg-1);
  border-radius: var(--r-lg);
  padding: 28px;
}
.contact-card__label { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.1em; color: var(--fg-muted); text-transform: uppercase; }
.contact-card__value { font-family: var(--font-display); font-size: 22px; font-weight: 600; margin-top: 8px; letter-spacing: -0.01em; }
.contact-card__value a { color: var(--fg); }
.contact-card__value a:hover { color: var(--accent); }

.map-card {
  background: var(--brand-deep);
  border-radius: var(--r-lg);
  padding: 32px;
  color: #F4F1FA;
  overflow: hidden;
  position: relative;
}
.map-card__grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.08) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.08) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(circle at 50% 50%, black 30%, transparent 85%);
  -webkit-mask-image: radial-gradient(circle at 50% 50%, black 30%, transparent 85%);
}
.map-card__pin {
  position: relative; z-index: 2;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--accent);
  margin: 100px auto 40px;
  box-shadow: 0 0 0 6px color-mix(in oklch, var(--accent) 30%, transparent), 0 0 0 18px color-mix(in oklch, var(--accent) 14%, transparent);
  animation: pulse 2.4s infinite;
}
.map-card__addr { position: relative; z-index: 2; text-align: center; font-family: var(--font-display); font-size: 20px; }
