/* =====================================================================
   Directline — «ماذا تريد أن تحقق لأعمالك الآن؟» (#solutions) v2
   Choice cards + one panel: copy/CTA on the right, a visual preview per
   goal on the left. Loaded after motion.css / hero.css.
   Preview pieces keep their tilt in `transform`; the entrance uses the
   individual `translate`/`scale` properties, so the angles are never lost.
   ===================================================================== */

.gp {
  --gp-ink: #2a164d;
  --gp-lav: #efe9f5;
  --gp-lav-2: #e7def1;
  --gp-line: #ddd2e8;
}

/* ---------- head ----------------------------------------------------- */
.gp .gp-head { margin-bottom: 30px; }
.gp .gp-head > p { color: #6f6379; font-size: 14px; }

/* ---------- choice cards (tabs) -------------------------------------- */
.gp-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.gp-tabs button {
  position: relative; display: flex; align-items: center; gap: 18px;
  min-height: 92px; padding: 0 26px; border-radius: 12px; overflow: hidden;
  background: var(--gp-lav); color: var(--gp-ink); text-align: start;
  font-size: 18px; font-weight: 500; line-height: 1.5;
  transition: background-color var(--motion-ui) var(--ease-ui), color var(--motion-ui) var(--ease-ui), translate var(--motion-ui) var(--ease-ui), box-shadow var(--motion-ui) var(--ease-ui);
}
.gp-tabs button::after { /* yellow bar under the active card */
  content: ''; position: absolute; inset: auto 0 0 0; height: 5px; background: var(--lime);
  transform: scaleX(0); transform-origin: right; transition: transform 280ms var(--ease-out);
}
.gp-ico { flex: none; width: 34px; height: 34px; color: var(--purple); transition: color var(--motion-ui) var(--ease-ui); }
.gp-ico svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.gp-label { flex: 1; }
.gp-mark { flex: none; width: 18px; height: 18px; border-radius: 50%; border: 3.5px solid var(--lime); opacity: 0; scale: .4; transition: opacity 200ms var(--ease-ui), scale 260ms var(--ease-out); }
@media (hover: hover) {
  .gp-tabs button[aria-selected="false"]:hover { background: var(--gp-lav-2); translate: 0 -2px; box-shadow: 0 8px 18px rgb(40 26 57 / .07); }
}
.gp-tabs button[aria-selected="true"] { background: var(--gp-ink); color: #fff; }
.gp-tabs button[aria-selected="true"] .gp-ico { color: #fff; }
.gp-tabs button[aria-selected="true"]::after { transform: scaleX(1); }
.gp-tabs button[aria-selected="true"] .gp-mark { opacity: 1; scale: 1; }
.gp-tabs button:focus-visible { outline: 3px solid #a483db; outline-offset: 4px; }

/* ---------- panel ---------------------------------------------------- */
.gp-panel {
  margin-top: 22px; border-radius: 16px; background: var(--gp-lav);
  display: grid; grid-template-columns: 1fr 1.08fr; align-items: center; gap: 28px;
  padding: 46px 48px 40px; overflow: hidden;
}
.gp-main { max-width: 470px; }
.gp-main .badge { font-size: 12px; color: #6e5a86; }
.gp-main h3 { font-size: clamp(32px, 3.1vw, 44px); line-height: 1.45; letter-spacing: -.6px; margin: 18px 0 12px; font-weight: 600; }
.gp-accent { color: var(--purple); }
.gp-main > p { font-size: 15px; color: #6c6077; line-height: 1.9; }
.gp-items { list-style: none; margin: 22px 0 26px; padding: 0; }
.gp-items li { display: flex; align-items: center; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--gp-line); font-size: 16px; font-weight: 500; }
.gp-items li:last-child { border-bottom: 0; }
.gp-check { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: #ddd0ec; color: var(--purple); }
.gp-check svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.gp-cta {
  width: 100%; max-width: 420px; min-height: 64px; justify-content: space-between;
  background: var(--gp-ink); color: #fff; font-size: 16px; padding: 14px 28px;
}
.gp-cta:hover { background: #3d2269; }
.gp-cta > span { color: var(--lime); }
.gp-more { margin-top: 14px; font-size: 13px; color: #4a3a5c; }

/* ---------- visual preview ------------------------------------------- */
.gp-visual { position: relative; align-self: stretch; min-height: 300px; }
.gp-stage {           /* fixed 600×500 design box; app.js zooms it to fit */
  position: relative; width: 600px; height: 500px; direction: ltr;
  margin-inline: auto;
}
.gp-code {
  position: absolute; left: 0; bottom: 0; direction: ltr;
  font: 11px Arial, sans-serif; letter-spacing: 2.5px; color: #7a6a8c;
}
.gp-scene { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity 260ms var(--ease-ui), visibility 0s linear 260ms; }
.gp-scene.is-on { opacity: 1; visibility: visible; transition: opacity 320ms var(--ease-out), visibility 0s; }
.gp-scene > * { position: absolute; }

/* entrance of the active scene's pieces: 50ms stagger, translate/scale only */
.motion-ok .gp-scene.is-on .gp-el { animation: gp-in 420ms var(--ease-out) both; animation-delay: calc(var(--i, 0) * 50ms); }
@keyframes gp-in { from { opacity: 0; translate: 0 16px; scale: .97; } }

/* shared decor */
.gp-arc { width: 430px; height: 430px; left: 8px; top: 92px; border-radius: 50%;
  background: radial-gradient(circle at 60% 25%, #b49ad6 0%, #8f6fbd 55%, #7a5aa8 100%); opacity: .9; }
.gp-arc::after { content: ''; position: absolute; inset: 58px; border-radius: 50%; background: var(--gp-lav); }
.gp-geo { width: 150px; height: 130px; left: 40px; top: 8px; background: var(--lime); transform: skewX(-14deg); border-radius: 10px; }
.gp img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* chips */
.gp-chip { display: inline-flex; align-items: center; gap: 8px; direction: rtl; z-index: 6;
  padding: 7px 13px; border-radius: 9px; background: #e9defa; color: #553083; font-size: 13px; font-weight: 500; white-space: nowrap;
  box-shadow: 0 6px 16px rgb(40 26 57 / .12); }
.gp-chip svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.gp-note { z-index: 6; right: 0; bottom: -2px; direction: rtl; font-size: 11px; color: #7a6a8c; background: rgb(255 255 255 / .7); padding: 4px 10px; border-radius: 999px; }

/* --- content (matches the reference) --- */
[data-scene="content"] .gp-photo { margin: 0; left: 82px; top: 18px; width: 330px; height: 395px; z-index: 2;
  transform: rotate(-4deg); border: 11px solid #f8f5ef; border-radius: 4px; background: #f8f5ef;
  box-shadow: 0 24px 50px rgb(40 26 57 / .22); }
[data-scene="content"] .gp-photo img { object-position: center 30%; }
.gp-post { left: 352px; top: 182px; width: 212px; z-index: 3; transform: rotate(4deg);
  background: #fff; border-radius: 14px; padding: 10px 10px 8px; box-shadow: 0 22px 44px rgb(40 26 57 / .22); }
.gp-post-head { display: flex; align-items: center; gap: 8px; height: 30px; font-size: 12px; color: #2a164d; }
.gp-avatar { width: 24px; height: 24px; border-radius: 50%; overflow: hidden; flex: none; border: 1px solid #e5dcef; }
.gp-avatar img { object-position: 15% 10%; transform: scale(2.2); transform-origin: 15% 10%; }
.gp-post-head i { margin-left: auto; font-style: normal; color: #8a7d97; letter-spacing: 1px; }
.gp-post-img { height: 196px; border-radius: 4px; overflow: hidden; margin-top: 4px; }
.gp-post-img img { object-position: center 55%; }
.gp-post-foot { display: flex; align-items: center; gap: 9px; height: 34px; padding: 0 2px; }
.gp-post-foot svg { width: 18px; height: 18px; fill: none; stroke: #2a164d; stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.gp-post-foot span { flex: 1; }
.gp-frame { left: 22px; top: 330px; width: 300px; height: 158px; z-index: 4; transform: rotate(2deg);
  border-radius: 12px; overflow: hidden; border: 4px solid #f8f5ef; box-shadow: 0 20px 40px rgb(40 26 57 / .26); }
.gp-frame img { object-position: 30% 72%; }
.gp-vf { position: absolute; inset: 14px; pointer-events: none;   /* camera viewfinder corners, no fake player */
  background:
    linear-gradient(#fff,#fff) top left / 18px 2px no-repeat, linear-gradient(#fff,#fff) top left / 2px 18px no-repeat,
    linear-gradient(#fff,#fff) top right / 18px 2px no-repeat, linear-gradient(#fff,#fff) top right / 2px 18px no-repeat,
    linear-gradient(#fff,#fff) bottom left / 18px 2px no-repeat, linear-gradient(#fff,#fff) bottom left / 2px 18px no-repeat,
    linear-gradient(#fff,#fff) bottom right / 18px 2px no-repeat, linear-gradient(#fff,#fff) bottom right / 2px 18px no-repeat;
  opacity: .9; }
.gp-chip-photo { left: 418px; top: 140px; }
.gp-chip-video { left: 24px; top: 290px; }

/* --- leads: ad + illustrative request intake --- */
[data-scene="leads"] .gp-ad { left: 70px; top: 26px; width: 290px; height: 362px; z-index: 2; transform: rotate(-4deg);
  border: 11px solid #f8f5ef; border-radius: 4px; background: #f8f5ef; box-shadow: 0 24px 50px rgb(40 26 57 / .22); }
.gp-form { left: 318px; top: 186px; width: 262px; z-index: 3; transform: rotate(3deg); direction: rtl;
  background: #fff; border-radius: 14px; padding: 18px 18px 16px; box-shadow: 0 22px 44px rgb(40 26 57 / .2); }
.gp-form-head { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; color: #2a164d; margin-bottom: 8px; }
.gp-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 3px rgb(243 239 48 / .3); }
.gp-row { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid #eee7f4; }
.gp-row small { width: 46px; font-size: 11px; color: #7a6a8c; }
.gp-row i { height: 8px; border-radius: 4px; background: #e5dcef; }
.gp-form-btn { display: block; margin-top: 14px; padding: 9px; border-radius: 8px; text-align: center; font-size: 12px; font-weight: 600; background: #2a164d; color: #fff; }
.gp-chip-ad { left: 26px; top: 360px; }
.gp-chip-req { left: 398px; top: 142px; }

/* --- launch: illustrative identity applications (no client) --- */
.gp-mark-demo { position: relative; display: inline-block; width: 34px; height: 34px; }
.gp-mark-demo i { position: absolute; inset: 0 12px 12px 0; border-radius: 50% 50% 0 50%; background: var(--lime); }
.gp-mark-demo b { position: absolute; inset: 12px 0 0 12px; border-radius: 4px; background: #b49ad6; }
.gp-bar { display: block; height: 9px; border-radius: 5px; background: rgb(255 255 255 / .35); margin-top: 10px; }
.gp-bar.w60 { width: 60%; } .gp-bar.w40 { width: 40%; } .gp-bar.w50 { width: 50%; } .gp-bar.w55 { width: 55%; } .gp-bar.w35 { width: 35%; }
.gp-cover { left: 58px; top: 34px; width: 400px; height: 220px; z-index: 2; transform: rotate(-3deg); padding: 30px 32px;
  border-radius: 12px; background: linear-gradient(135deg, #2a164d 0%, #553083 60%, #553083 100%); box-shadow: 0 24px 50px rgb(40 26 57 / .25); }
.gp-cover .gp-mark-demo { width: 52px; height: 52px; margin-bottom: 30px; }
.gp-cover .gp-mark-demo i { inset: 0 18px 18px 0; } .gp-cover .gp-mark-demo b { inset: 18px 0 0 18px; }
.gp-social { left: 66px; top: 268px; width: 196px; height: 196px; z-index: 3; transform: rotate(-2deg); padding: 22px;
  border-radius: 12px; background: #f8f5ef; box-shadow: 0 20px 40px rgb(40 26 57 / .2); display: flex; flex-direction: column; justify-content: flex-end; }
.gp-social .gp-bar { background: #d9cbe9; }
.gp-social .gp-mark-demo { position: absolute; top: 22px; right: 22px; }
.gp-bcard { left: 312px; top: 232px; width: 250px; height: 148px; z-index: 4; transform: rotate(5deg); padding: 22px 24px;
  border-radius: 10px; background: #fff; box-shadow: 0 20px 40px rgb(40 26 57 / .2); }
.gp-bcard .gp-bar { background: #e5dcef; }
.gp-swatches { left: 340px; top: 410px; display: flex; gap: 8px; z-index: 4; }
.gp-swatches i { width: 26px; height: 26px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 4px 10px rgb(40 26 57 / .15); }
.gp-swatches i:nth-child(1) { background: #2a164d; } .gp-swatches i:nth-child(2) { background: #553083; }
.gp-swatches i:nth-child(3) { background: var(--lime); } .gp-swatches i:nth-child(4) { background: #f8f5ef; }
.gp-chip-cover { left: 404px; top: 18px; } .gp-chip-card { left: 494px; top: 206px; } .gp-chip-social { left: 40px; top: 448px; }

/* --- search: a results page with the business on top + a maps card --- */
.gp-serp { left: 24px; top: 56px; width: 410px; z-index: 2; transform: rotate(-2deg);
  border-radius: 12px; overflow: hidden; background: #fff; box-shadow: 0 26px 52px rgb(40 26 57 / .25); }
.gp-browser-bar { display: flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; background: #f3eff7; direction: ltr; }
.gp-browser-bar i { width: 8px; height: 8px; border-radius: 50%; background: #cbbfd8; }
.gp-browser-bar span { margin-left: 12px; height: 12px; flex: 1; max-width: 190px; border-radius: 6px; background: #e5dcef; }
.gp-serp-body { padding: 18px 20px 22px; direction: rtl; }
.gp-q { display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 16px; border-radius: 21px; border: 1px solid #e2dce7;
  font-size: 14px; color: #2a164d; box-shadow: 0 4px 12px rgb(40 26 57 / .06); margin-bottom: 16px; }
.gp-q svg { width: 18px; height: 18px; fill: none; stroke: #553083; stroke-width: 2; stroke-linecap: round; }
.gp-res { position: relative; display: grid; gap: 6px; padding: 12px 14px; border-radius: 12px; margin-bottom: 8px; }
.gp-res small { font-size: 11px; color: #5f8a3a; min-height: 8px; }
.gp-res small:empty { width: 30%; height: 8px; border-radius: 4px; background: #eee9f3; }
.gp-res b { font-size: 15px; color: #2a164d; }
.gp-res b.gp-ph { width: 58%; height: 12px; border-radius: 6px; background: #e5dcef; }
.gp-res i { height: 8px; border-radius: 4px; background: #eee9f3; }
.gp-res.is-top { background: #fdfbe0; box-shadow: inset 0 0 0 2px var(--lime); }
.gp-rank { position: absolute; left: -24px; top: -24px; width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center;
  background: #2a164d; color: var(--lime); font: 700 17px/1 inherit; box-shadow: 0 10px 20px rgb(40 26 57 / .3); direction: ltr; }
.gp-map { left: 418px; top: 150px; width: 160px; height: 290px; z-index: 3; transform: rotate(4deg);
  border-radius: 26px; border: 7px solid #1f0e3a; overflow: hidden; background: #fff; box-shadow: 0 24px 48px rgb(40 26 57 / .3); }
.gp-map-bg { position: relative; height: 120px; background: #ece6f4;
  background-image: linear-gradient(90deg, transparent 46%, #fff 46% 52%, transparent 52%), linear-gradient(0deg, transparent 58%, #fff 58% 63%, transparent 63%),
  linear-gradient(35deg, transparent 30%, #dfd6ea 30% 33%, transparent 33%); }
.gp-pin { position: absolute; left: 50%; top: 40%; translate: -50% -60%; width: 38px; height: 38px; border-radius: 50% 50% 50% 0; rotate: -45deg;
  background: #553083; display: grid; place-items: center; box-shadow: 0 8px 16px rgb(40 26 57 / .3); }
.gp-pin svg { width: 18px; height: 18px; rotate: 45deg; fill: none; stroke: #fff; stroke-width: 1.8; }
.gp-place { padding: 10px 12px; direction: rtl; display: grid; gap: 4px; }
.gp-place img { width: 100%; height: 54px; object-fit: cover; border-radius: 8px; }
.gp-place b { font-size: 13px; color: #2a164d; } .gp-place small { font-size: 10px; color: #5f5469; }
.gp-place span { margin-top: 2px; text-align: center; padding: 5px; border-radius: 6px; background: #553083; color: #fff; font-size: 11px; font-weight: 600; }
.gp-chip-serp { left: 40px; top: 20px; } .gp-chip-map { left: 456px; top: 106px; }

/* ---------- responsive ----------------------------------------------- */
@media (max-width: 1150px) {
  .gp-tabs button { padding: 0 18px; gap: 12px; font-size: 16px; min-height: 80px; }
  .gp-ico { width: 28px; height: 28px; }
  .gp-panel { padding: 36px 32px 32px; gap: 18px; }
}
@media (max-width: 800px) {
  .gp-tabs { grid-template-columns: 1fr 1fr; gap: 10px; }
  .gp-tabs button { min-height: 68px; font-size: 15px; padding: 0 16px; }
  .gp-panel { grid-template-columns: 1fr; padding: 30px 24px 22px; gap: 18px; }
  .gp-main { max-width: none; }
  .gp-cta { max-width: none; }
  .gp-visual { min-height: 0; }
}
@media (max-width: 520px) {
  .gp .gp-head { margin-bottom: 22px; }
  .gp-tabs button { min-height: 60px; font-size: 13.5px; gap: 9px; padding: 0 12px; }
  .gp-ico { width: 22px; height: 22px; }
  .gp-mark { width: 14px; height: 14px; border-width: 3px; }
  .gp-panel { padding: 26px 18px 18px; border-radius: 14px; }
  .gp-main h3 { font-size: 28px; }
  .gp-items li { font-size: 15px; padding: 11px 0; }
  .gp-cta { min-height: 56px; font-size: 14px; padding: 12px 20px; }
  .gp-chip { font-size: 15px; } /* stays legible once the stage is zoomed down */
}
@media (max-width: 360px) {
  .gp-tabs button { font-size: 12.5px; padding: 0 10px; }
  .gp-mark { display: none; }
}

/* the 600px design box must never widen the grid: columns can shrink and
   app.js zooms the stage to the column width */
.gp-panel { grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); }
.gp-main, .gp-visual { min-width: 0; }
.gp-visual { overflow: hidden; overflow: clip; overflow-clip-margin: 24px; }
@media (max-width: 800px) { .gp-panel { grid-template-columns: minmax(0, 1fr); } }

/* phones: the stage is zoomed to ~0.5, so labels are drawn larger in stage
   units to stay readable (~11px on screen); the decorative code is hidden */
@media (max-width: 520px) {
  .gp-chip { font-size: 23px; padding: 9px 16px; gap: 10px; border-radius: 12px; }
  .gp-chip svg { width: 26px; height: 26px; }
  .gp-note { font-size: 20px; padding: 6px 14px; }
  .gp-code { display: none; }
  .gp-chip-card { left: 440px; }
  .gp-chip-req { left: 330px; top: 128px; }
  .gp-chip-photo { left: 380px; top: 120px; }
  .gp-chip-map { left: 420px; top: 92px; }
  .gp-chip-cover { left: 360px; }
}

/* ---------- One-screen rule (desktop/landscape) ------------------------
   The whole section (head → panel) must be visible at once. On shorter
   screens the inner spacing tightens first; section-fit.js then zooms the
   three blocks together if it is still taller than the viewport. */
@media (min-width: 801px) and (max-height: 920px) {
  .gp .gp-head { margin-bottom: 20px; }
  .gp .gp-head h2 { margin-top: 8px; }
  .gp-tabs button { min-height: 74px; }
  .gp-panel { margin-top: 16px; padding: 32px 40px 28px; }
  .gp-main h3 { margin: 12px 0 8px; }
  .gp-items { margin: 14px 0 18px; }
  .gp-items li { padding: 9px 0; }
  .gp-cta { min-height: 56px; }
  .gp-more { margin-top: 10px; }
}

/* anchor jumps (#solutions / #services / #work) land with the section's
   content just under the sticky header instead of its top padding */
@media (min-width: 801px) {
  #solutions, #services { scroll-margin-top: -108px; }
  #work { scroll-margin-top: -96px; }
}
@media (min-width: 801px) and (max-height: 740px) {
  .gp .gp-head { margin-bottom: 14px; }
  .gp-tabs button { min-height: 62px; }
  .gp-panel { margin-top: 12px; padding: 24px 34px 20px; }
  .gp-main h3 { margin: 8px 0 6px; }
  .gp-items { margin: 10px 0 14px; }
  .gp-items li { padding: 6px 0; }
  .gp-cta { min-height: 50px; }
}

/* ---------- readability (owner's request): larger copy, never zoomed below
   its intended size by space we can save elsewhere ---------------------
   The CTA and the details link share one row, the copy column is a little
   wider so the larger text keeps the same number of lines. */
.gp .gp-head > p { font-size: 16px; }
.gp-main { max-width: 540px; }
.gp-main .badge { font-size: 14px; }
.gp-main > p { font-size: 17px; line-height: 1.85; }
.gp-items li { font-size: 17px; }
.gp-cta { width: auto; min-width: 280px; font-size: 17px; gap: 40px; vertical-align: middle; }
.gp-more { font-size: 15px; margin: 0 26px 0 0; vertical-align: middle; }
@media (min-width: 801px) and (max-height: 920px) { .gp-more { margin-top: 0; } }
@media (max-width: 800px) {
  .gp-cta { width: 100%; min-width: 0; }
  .gp-more { display: flex; margin: 14px 0 0; }
}
/* laptop heights: the title runs on one line (same two tones), so the copy can
   stay at full size and the whole section still fits one screen */
@media (min-width: 801px) and (max-height: 920px) {
  .gp .gp-head h2 br { display: none; }
  .gp-tabs button { min-height: 64px; }
  .gp-panel { padding: 26px 40px 22px; }
}
@media (min-width: 801px) and (max-height: 800px) {
  .gp .gp-head { margin-bottom: 14px; }
  .gp-tabs button { min-height: 58px; }
  .gp-panel { margin-top: 12px; padding: 22px 36px 18px; }
  .gp-main h3 { margin: 8px 0 6px; }
  .gp-items { margin: 10px 0 14px; }
  .gp-items li { padding: 6px 0; }
  .gp-cta { min-height: 50px; }
}
/* small labels a touch larger (desktop; phones keep their own sizes above) */
@media (min-width: 521px) {
  .gp .eyebrow { font-size: 14px; }
  .gp-chip { font-size: 15.5px; }
  .gp-note { font-size: 13.5px; padding: 5px 12px; }
}
