/* مكوّناتٌ جاهزة تُبنى من tokens.css — بطاقة، زرّ، شارة، معرض صور. تُستعمل، ولا تُعرَّف من جديد في صفحة.
   يقابل core/design/components في تطبيق دفتري. */

.site-nav {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255, 255, 255, .92); backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.site-nav-inner {
  max-width: var(--container); margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: var(--gap);
}
.site-nav .brand {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 800; color: var(--ink); text-decoration: none; font-size: 1.05rem;
}
.brand-mark { overflow: visible; flex: none; animation: brand-pop .5s cubic-bezier(.2,.8,.3,1.2) both, brand-pulse 2.6s ease-in-out 1.5s infinite; }
.brand-mark-disc { fill: var(--brand); stroke: var(--accent); stroke-width: 1.2; }
.brand-mark-pole, .brand-mark-flag { fill: #fff; }
@keyframes brand-pop { from { transform: scale(0) rotate(-8deg); opacity: 0; } 70% { transform: scale(1.12) rotate(2deg); opacity: 1; } to { transform: scale(1) rotate(0); opacity: 1; } }
@keyframes brand-pulse { 0%, 100% { filter: drop-shadow(0 0 0 rgba(245, 158, 11, 0)); } 50% { filter: drop-shadow(0 0 5px rgba(245, 158, 11, .65)); } }
@media (prefers-reduced-motion: reduce) { .brand-mark { animation: none; } }
.site-nav .links { display: flex; align-items: center; gap: var(--gap-md); flex-wrap: wrap; }
.site-nav .links a:not(.nav-login) { color: var(--muted); text-decoration: none; font-size: .9rem; transition: color var(--transition); }
.site-nav .links a:not(.nav-login):hover { color: var(--brand); }
.nav-login {
  color: var(--brand) !important; text-decoration: none; font-size: .84rem; font-weight: 700;
  border: 1.5px solid var(--brand); border-radius: 999px; padding: 6px 16px;
  transition: background var(--transition), color var(--transition);
}
.nav-login:hover { background: var(--brand); color: #fff !important; }

.back-link {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--brand); text-decoration: none; font-size: .9rem; font-weight: 600;
}
.back-link:hover { text-decoration: underline; }
.back-link.standalone { margin-bottom: var(--gap-md); }

.section-sub { color: var(--muted); margin: -6px 0 var(--gap-lg); font-size: .92rem; }

.work-title { color: var(--ink); text-decoration: none; }
.work-title:hover { color: var(--brand); }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  transition: box-shadow var(--transition), transform var(--transition);
}
.card :where(h3) { margin: 0 0 var(--gap-sm); font-size: 1.02rem; }
.card :where(p) { margin: 0; color: var(--muted); font-size: .92rem; }
.card > h2:first-child { margin-top: 0; }
.grid .card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }

.work {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--gap-lg);
  box-shadow: var(--shadow);
  transition: box-shadow var(--transition), transform var(--transition);
}
#work .work:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.work-top { display: flex; gap: var(--gap-lg); align-items: flex-start; flex-wrap: wrap; }
.work .icon {
  width: 56px; height: 56px; border-radius: var(--radius);
  background: var(--brand-soft); display: flex; align-items: center; justify-content: center;
  font-size: 1.7rem; flex: none; overflow: hidden;
}
.work .icon img { width: 100%; height: 100%; object-fit: cover; }
.work .body { flex: 1; min-width: 220px; }
.work h3 { margin: 0 0 4px; font-size: 1.1rem; }
.work h1 { margin: 0 0 4px; font-size: 1.4rem; }
.work .role { color: var(--muted); font-size: .86rem; margin: 0 0 var(--gap-sm); }
.work p { margin: 0 0 10px; font-size: .94rem; }

.pill {
  display: inline-block; background: var(--brand-soft); color: var(--brand);
  padding: 3px 11px; border-radius: 999px; font-size: .78rem;
  margin-inline-end: var(--gap-sm); margin-bottom: var(--gap-sm);
}

.shots {
  display: flex; gap: var(--gap); overflow-x: auto;
  padding: var(--gap-lg) 2px 4px; margin-top: var(--gap-sm); scrollbar-width: thin;
}
.shots img {
  height: 340px; border-radius: var(--radius-lg); border: 1px solid var(--line);
  box-shadow: 0 10px 24px rgba(15, 23, 42, .12); flex: none;
}

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--brand); color: #fff !important; text-decoration: none;
  padding: 11px 22px; border-radius: 999px; font-size: .94rem; font-weight: 600;
  font-family: inherit; line-height: 1.5; min-height: var(--control-h);
  border: none; cursor: pointer; transition: background var(--transition), transform var(--transition);
}
.btn:hover { background: var(--brand-dark); transform: translateY(-1px); }
.btn.ghost { background: var(--card); color: var(--brand) !important; border: 1.5px solid var(--brand); }
.btn.ghost:hover { background: var(--brand-soft); }
.btn.light { background: #fff; color: var(--brand) !important; }
.btn.small { padding: 6px 14px; font-size: .82rem; min-height: 34px; }
.btn.block { width: 100%; justify-content: center; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: var(--gap-md); }
.inline-form { display: inline; }
.section-lead { color: var(--ink); margin-bottom: 14px; }

.field { margin-bottom: var(--gap-lg); }
.field > label { display: block; font-size: .9rem; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.control, .field :where(input:not([type=checkbox], [type=radio], [type=file], [type=hidden]), textarea, select) {
  display: block; width: 100%; min-height: var(--control-h); padding: 9px 14px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--card); color: var(--ink);
  font-family: inherit; font-size: .95rem; line-height: 1.6;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.control:focus, .field :is(input, textarea, select):focus { outline: none; border-color: var(--brand); box-shadow: var(--focus-ring); }
.control::placeholder, .field ::placeholder { color: var(--placeholder); }
.field textarea { resize: vertical; min-height: 120px; max-height: 420px; field-sizing: content; }
.field input[type=number] { max-width: 180px; }
select.control, .field select { height: var(--control-h); padding-block: 0; }
.field input[type=file] {
  display: block; width: 100%; padding: 10px; font-family: inherit; font-size: .88rem; color: var(--muted);
  border: 1.5px dashed var(--line-strong); border-radius: var(--radius-sm); background: var(--bg); cursor: pointer;
}
.field input[type=file]::file-selector-button {
  font-family: inherit; font-size: .84rem; font-weight: 600; color: var(--brand); background: var(--card);
  border: 1.5px solid var(--brand); border-radius: 999px; padding: 5px 16px; margin-inline-end: 12px; cursor: pointer;
}
.field small { display: block; margin-top: 6px; color: var(--muted); font-size: .8rem; line-height: 1.7; }
.check-inline {
  display: inline-flex; align-items: center; gap: 8px; min-height: var(--control-h); padding: 0 14px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--card);
  color: var(--ink); font-size: .9rem; white-space: nowrap; cursor: pointer; user-select: none;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}
.check-inline input { width: 18px; height: 18px; margin: 0; accent-color: var(--brand); cursor: pointer; }
.check-inline:has(input:checked) { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); font-weight: 600; }
.hp-field { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; clip-path: inset(50%); }

.flash-ok { background: var(--success-soft); color: var(--success); padding: 10px 16px; border-radius: 10px; margin-bottom: var(--gap-md); }
.flash-err { background: var(--danger-soft); color: var(--danger); padding: 10px 16px; border-radius: 10px; margin-bottom: var(--gap-md); }

.status-badge {
  display: inline-block; padding: 3px 12px; border-radius: 999px;
  font-size: .76rem; font-weight: 700; margin-bottom: var(--gap-sm);
}
.status-pending { background: #fef9c3; color: #854d0e; }
.status-done { background: #dcfce7; color: #166534; }
.status-declined { background: #f1f5f9; color: var(--muted); }
.feedback-card .admin-note { color: var(--brand); font-size: .86rem; margin-top: var(--gap-sm); }

.soon {
  border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px;
  text-align: center; color: var(--ink); opacity: .8; font-size: .9rem; margin-top: var(--gap-md);
}

.icon-svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.services { gap: 20px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.service { position: relative; overflow: hidden; padding: 28px 24px; }
.service::after {
  content: ''; position: absolute; inset-inline: 0; top: 0; height: 3px;
  background: linear-gradient(90deg, var(--brand), var(--accent)); transform: scaleX(0); transition: transform .35s var(--ease-out);
}
.service:hover::after { transform: scaleX(1); }
.service-icon {
  display: grid; place-items: center; width: 54px; height: 54px; margin-bottom: 18px;
  border-radius: var(--radius); background: var(--brand-soft); color: var(--brand); transition: background var(--transition), color var(--transition);
}
.service:hover .service-icon { background: var(--brand); color: #fff; }
.card.service h3 { font-size: 1.1rem; margin-bottom: 8px; }
.card.service p { line-height: 1.95; }

.work-feature {
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center;
  padding: 40px; border-radius: var(--radius-xl); margin-bottom: var(--gap-lg);
}
.work-head { display: flex; gap: 16px; align-items: center; margin-bottom: 18px; }
.work-feature .icon { width: 68px; height: 68px; border-radius: 18px; box-shadow: var(--shadow); }
.work-feature h3 { font-size: 1.55rem; margin: 0; }
.work-feature .role { margin: 2px 0 0; }
.work-feature .work-desc { font-size: 1rem; line-height: 2; color: #334155; margin: 0 0 18px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pills .pill { margin: 0; padding: 4px 12px; font-weight: 600; }
.work-shots {
  position: relative; display: block; height: 390px; border-radius: var(--radius-lg);
  background: radial-gradient(circle at 50% 42%, #dbeafe, var(--brand-soft) 72%);
}
.work-shots img {
  position: absolute; top: 50%; left: 50%; width: 172px; border-radius: 22px;
  box-shadow: 0 18px 40px rgba(11, 20, 51, .22); transition: transform .5s var(--ease-out);
}
.work-shots img:nth-child(1) { z-index: 3; transform: translate(-50%, -50%); }
.work-shots img:nth-child(2) { z-index: 2; transform: translate(-102%, -47%) rotate(-8deg) scale(.86); }
.work-shots img:nth-child(3) { z-index: 1; transform: translate(2%, -47%) rotate(8deg) scale(.86); }
.work-shots:hover img:nth-child(1) { transform: translate(-50%, -53%); }
.work-shots:hover img:nth-child(2) { transform: translate(-114%, -48%) rotate(-11deg) scale(.88); }
.work-shots:hover img:nth-child(3) { transform: translate(14%, -48%) rotate(11deg) scale(.88); }

.facts { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; margin: 0; }
.fact { grid-column: span 2; }
.fact:nth-child(n+4) { grid-column: span 3; }
.fact {
  background: var(--card); border: 1px solid var(--line); border-inline-start: 3px solid var(--brand);
  border-radius: var(--radius); padding: 16px 20px; box-shadow: var(--shadow);
}
.fact dt { color: var(--muted); font-size: .82rem; }
.fact dd { margin: 2px 0 0; font-weight: 700; color: var(--ink); overflow-wrap: anywhere; }

.contact-intro .section-lead { font-size: 1.05rem; line-height: 2; margin: 0 0 20px; }
.contact-mail {
  display: flex; width: fit-content; align-items: center; gap: 10px; margin-bottom: 18px;
  padding: 10px 18px; border-radius: 999px; background: var(--card); border: 1px solid var(--line);
  box-shadow: var(--shadow); color: var(--brand); font-weight: 700; text-decoration: none;
}
.contact-mail .icon-svg { width: 20px; height: 20px; }
.contact-card { padding: 28px; }

.js-reveal .reveal { opacity: 0; }
.js-reveal .reveal.is-in { animation: rise .5s var(--ease-out) var(--reveal-delay, 0s) both; }
.services .reveal:nth-child(2) { --reveal-delay: .08s; }
.services .reveal:nth-child(3) { --reveal-delay: .16s; }
.services .reveal:nth-child(4) { --reveal-delay: .24s; }
@media (prefers-reduced-motion: reduce) { .js-reveal .reveal { opacity: 1; } .js-reveal .reveal.is-in { animation: none; } }

@media (max-width: 900px) {
  .work-feature { grid-template-columns: 1fr; padding: 28px; gap: 28px; }
  .facts { grid-template-columns: 1fr; }
  .fact, .fact:nth-child(n+4) { grid-column: auto; }
}
@media (max-width: 600px) {
  .work-feature { padding: 20px; border-radius: var(--radius-lg); }
  .work-feature h3 { font-size: 1.3rem; }
  .work-shots { height: 300px; }
  .work-shots img { width: 128px; border-radius: 16px; }
  .contact-card { padding: 20px; }
}

/* تطبيقاتُ التجربة في قسم الأعمال: مربّعاتٌ بعرضٍ محدود على الحاسوب، وبطاقاتٌ أفقيّةٌ بعرضٍ كاملٍ على الهاتف */
.trials { margin-top: var(--gap-lg); padding: 20px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.trials h3 { margin: 0 0 4px; font-size: 1.05rem; }
.trials-note { margin: 0 0 var(--gap-md); color: var(--muted); font-size: .86rem; }
.trials-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 200px)); gap: var(--gap-sm); }
.trial-tile {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 10px 14px;
  text-align: center; text-decoration: none; color: inherit; background: var(--card);
  border: 1px solid var(--line); border-radius: 16px; transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
}
.trial-tile:hover, .trial-tile:focus-visible { border-color: var(--brand); box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.trial-icon { width: 88px; height: 88px; border-radius: 22px; object-fit: cover; box-shadow: var(--shadow); }
.trial-icon-fallback { display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font-size: 2rem; font-weight: 800; }
.trial-text { display: grid; gap: 2px; }
.trial-name { font-size: .98rem; line-height: 1.4; }
.trial-meta { color: var(--muted); font-size: .78rem; }
.trial-cta { margin-top: 2px; padding: 8px 18px; border-radius: 999px; background: var(--brand); color: #fff; font-size: .8rem; font-weight: 600; }
@media (max-width: 480px) {
  .trials { padding: 14px; }
  .trials-grid { grid-template-columns: 1fr; }
  .trial-tile { flex-direction: row; text-align: start; gap: 14px; padding: 12px 14px; }
  .trial-icon { width: 56px; height: 56px; border-radius: 14px; flex: none; }
  .trial-text { flex: 1 1 auto; min-width: 0; }
  .trial-cta { margin-inline-start: auto; }
}
