/* =========================================================
   G-Stat - inner pages (about, services, case studies, blog, careers, contact)
   Loads AFTER css/styles.css and reuses its tokens and base components
   (.container, .section, .eyebrow, .h2, .lead, .btn, .link-arrow, .reveal,
   .frame, .client-logo, .marquee, .form-card, .field, .stat, .footer).
   Only page-specific components live here.
   ========================================================= */

/* =========================================================
   Page hero - shorter sibling of the homepage hero
   ========================================================= */
.page-hero {
  position: relative;
  padding: calc(var(--header-h) + clamp(56px, 7vw, 104px)) 0 clamp(48px, 6vw, 88px);
  overflow: hidden;
}
.page-hero::before {
  content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(70% 90% at 78% 10%, rgba(22, 139, 255, .14), transparent 62%),
    radial-gradient(60% 80% at 8% 90%, rgba(120, 87, 255, .10), transparent 60%);
}
.page-hero-art {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  opacity: .22;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 34%, #000 72%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 34%, #000 72%, transparent 100%);
}
.page-hero-art img { width: 100%; height: 100%; object-fit: cover; }
.page-hero-particles { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; display: block; }
.page-hero .container { position: relative; z-index: 2; }
.page-hero .h1 { max-width: 20ch; }
.page-hero .lead { margin-top: 20px; max-width: 64ch; }
.page-hero .page-hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 34px; }

/* English category titles read better unbroken */
.page-hero .h1.en { max-width: none; }

/* Latin headings keep LTR reading order but stay right-aligned like the rest of the RTL page */
.h1.en, .h2.en, .card h3.en, .story-copy h2.en, .feature h3.en { text-align: right; }

/* Breadcrumbs */
.crumbs {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: 13px; color: var(--faint); margin-bottom: 20px;
}
.crumbs a { transition: color .3s; }
.crumbs a:hover { color: var(--cyan); }
.crumbs span[aria-current] { color: var(--muted); }
.crumbs .sep { opacity: .5; }

/* =========================================================
   Anchor rail - the numbered sub-service tabs from the wireframe
   ========================================================= */
.anchor-rail {
  position: sticky; top: var(--header-h); z-index: 20;
  margin-top: clamp(28px, 4vw, 44px);
  padding: 14px 0;
  background: rgba(3, 7, 13, .72);
  backdrop-filter: blur(12px);
  border-block: 1px solid var(--line);
}
.anchor-rail .container { display: flex; gap: 10px; flex-wrap: wrap; }
.anchor-rail a {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 18px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(11, 23, 38, .6);
  font-size: 15px; font-weight: 500; color: var(--muted);
  transition: color .3s, border-color .3s, background .3s, transform .3s var(--ease-out);
}
.anchor-rail a .n {
  font-size: 12px; font-weight: 700; letter-spacing: .08em; direction: ltr;
  color: var(--faint); transition: color .3s;
}
.anchor-rail a:hover { color: var(--text); border-color: var(--line-strong); transform: translateY(-2px); }
.anchor-rail a.is-active {
  color: var(--text); border-color: var(--cyan);
  background: rgba(88, 215, 255, .10);
}
.anchor-rail a.is-active .n { color: var(--cyan); }

/* =========================================================
   Service block - copy + visual, then the ICON feature grid
   ========================================================= */
.svc-block { position: relative; padding: clamp(72px, 8vw, 116px) 0; scroll-margin-top: calc(var(--header-h) + 76px); }
.svc-block + .svc-block { border-top: 1px solid var(--line); }
.svc-split {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 4vw, 64px);
  align-items: center;
}
.svc-copy .h2 { margin-top: 4px; }
.svc-copy .lead { margin-top: 20px; }
.svc-copy .btn { margin-top: 30px; }
.svc-visual .frame { aspect-ratio: 4 / 3; }
.svc-visual .frame img { opacity: .9; }

/* Partner badge (Salesforce Official Partner etc.) */
.partner-badges { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.partner-badge {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 10px 18px 10px 12px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: rgba(11, 23, 38, .7);
  font-size: 14px; font-weight: 500; color: var(--muted);
}
/* the mark sits straight in the pill: ink by default, brand colour on hover */
.partner-badge .p-mark { position: relative; flex: none; width: 22px; height: 22px; }
.partner-badge .p-mark img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; transition: opacity .35s; }
.partner-badge .p-mark .c { opacity: 0; }
.partner-badge:hover .p-mark .c { opacity: 1; }
.partner-badge:hover .p-mark .m { opacity: 0; }

/* Feature grid - the numbered ICON cards */
.feature-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
  margin-top: clamp(40px, 5vw, 64px);
}
.feature-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.feature {
  position: relative; overflow: hidden;
  padding: 30px 28px 32px; border-radius: 20px;
  border: 1px solid var(--line); background: rgba(7, 17, 30, .55);
  transition: border-color .4s, transform .4s var(--ease-out), background .4s;
}
.feature::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: radial-gradient(80% 70% at 85% 0%, rgba(88, 215, 255, .12), transparent 62%);
  transition: opacity .4s;
}
.feature:hover { transform: translateY(-4px); border-color: var(--line-strong); background: rgba(11, 23, 38, .7); }
.feature:hover::after { opacity: 1; }
.feature-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.feature-icon {
  width: 46px; height: 46px; border-radius: 14px; flex: none;
  display: grid; place-items: center;
  border: 1px solid var(--line-strong);
  background: linear-gradient(150deg, rgba(22, 139, 255, .16), rgba(120, 87, 255, .08));
}
.feature-icon svg { width: 22px; height: 22px; stroke: var(--cyan); fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.feature .num {
  font-size: 13px; font-weight: 700; letter-spacing: .14em; direction: ltr;
  color: var(--faint);
}
.feature h3 { font-size: 19px; line-height: 1.3; margin-bottom: 10px; }
.feature p { color: var(--muted); font-size: 15px; line-height: 1.65; }
.feature.gold .feature-icon { border-color: rgba(246, 182, 22, .4); background: linear-gradient(150deg, rgba(246, 182, 22, .18), rgba(246, 182, 22, .04)); }
.feature.gold .feature-icon svg { stroke: var(--gold); }

/* =========================================================
   About - numbers row, team, values
   ========================================================= */
.numbers-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.who-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 4vw, 64px); align-items: center; }
.who-visual {
  position: relative; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line);
  background: radial-gradient(90% 80% at 50% 45%, #0a1426 0%, #060d19 55%, #030811 100%);
  aspect-ratio: 4 / 3; display: grid; place-items: center; padding: 12%;
}
.who-visual img { width: 100%; height: auto; object-fit: contain; opacity: .92; }
/* the G-Stat mark itself stays in brand gold - it is the page subject, not a third-party logo */

.team-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.person {
  border-radius: 20px; overflow: hidden;
  border: 1px solid var(--line); background: rgba(7, 17, 30, .55);
  transition: border-color .4s, transform .4s var(--ease-out);
}
.person:hover { transform: translateY(-4px); border-color: var(--line-strong); }
.person-photo {
  aspect-ratio: 1 / 1; display: grid; place-items: center;
  background: linear-gradient(160deg, rgba(22, 139, 255, .12), rgba(3, 7, 13, .6));
  border-bottom: 1px solid var(--line);
  color: var(--faint); font-size: 13px; letter-spacing: .12em;
}
.person-photo img { width: 100%; height: 100%; object-fit: cover; }
.person-body { padding: 22px 22px 26px; }
.person .role {
  display: block; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--cyan); direction: ltr; text-align: right; margin-bottom: 10px;
}
.person h3 { font-size: 18px; margin-bottom: 8px; }
.person p { color: var(--muted); font-size: 14px; line-height: 1.6; }

.values-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }

/* CTA band - the ethics / DE&I document row */
.cta-band {
  display: flex; align-items: center; justify-content: space-between; gap: 26px; flex-wrap: wrap;
  margin-top: clamp(36px, 4vw, 56px);
  padding: clamp(24px, 3vw, 36px) clamp(26px, 3vw, 40px);
  border-radius: 24px; border: 1px solid var(--line-strong);
  background: linear-gradient(120deg, rgba(11, 23, 38, .9), rgba(7, 17, 30, .6));
}
.cta-band .eyebrow { margin-bottom: 10px; }
.cta-band p { color: var(--muted); max-width: 60ch; }
.cta-band .btn { flex: none; }

/* =========================================================
   Card grids - case studies lobby, blog lobby, related stories
   ========================================================= */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  display: flex; flex-direction: column; overflow: hidden;
  border-radius: 22px; border: 1px solid var(--line); background: rgba(7, 17, 30, .55);
  transition: border-color .4s, transform .4s var(--ease-out), box-shadow .4s;
}
.card:hover { transform: translateY(-5px); border-color: var(--line-strong); box-shadow: 0 24px 50px rgba(0, 0, 0, .45); }
.card-media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease-out); opacity: .82; }
.card:hover .card-media img { transform: scale(1.06); opacity: 1; }
.card-media::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(3, 7, 13, .1) 40%, rgba(3, 7, 13, .78));
}
.card-tag {
  position: absolute; z-index: 2; top: 16px; right: 16px;
  padding: 6px 14px; border-radius: 999px;
  background: rgba(3, 7, 13, .7); border: 1px solid var(--line-strong);
  font-size: 12px; font-weight: 700; letter-spacing: .08em; color: var(--text);
  backdrop-filter: blur(6px);
}
.card-tag.en { direction: ltr; }
.card-body { display: flex; flex-direction: column; flex: 1; padding: 24px 24px 26px; }
.card-org {
  display: flex; align-items: center; gap: 10px; margin-bottom: 12px;
  font-size: 14px; font-weight: 700; letter-spacing: .06em; color: var(--cyan); direction: ltr;
}
.card-org .org-logo {
  flex: none; display: block; width: auto; height: auto;
  max-height: 22px; max-width: 96px; object-fit: contain;
  opacity: .85; transition: var(--logo-ease);
}
.card:hover .org-logo, .card:focus-visible .org-logo { opacity: 1; filter: brightness(1.16); }
.card h3 { font-size: 20px; line-height: 1.3; margin-bottom: 12px; }
.card p { color: var(--muted); font-size: 15px; line-height: 1.6; }
.card .link-arrow { margin-top: auto; padding-top: 20px; font-size: 15px; }
.card .card-date { font-size: 13px; color: var(--faint); margin-bottom: 10px; direction: ltr; text-align: right; }
.card.is-placeholder .card-media { background: linear-gradient(150deg, rgba(22, 139, 255, .1), rgba(3, 7, 13, .7)); }
.card.is-placeholder .card-org { color: var(--faint); }

/* Filter chips */
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: clamp(28px, 3.5vw, 44px); }
.filters .f-label { align-self: center; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); font-weight: 700; margin-inline-end: 6px; }
.chip {
  padding: 9px 18px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: rgba(11, 23, 38, .55);
  font-size: 15px; color: var(--muted);
  transition: color .3s, border-color .3s, background .3s;
}
.chip:hover { color: var(--text); border-color: var(--line-strong); }
.chip.is-active { color: var(--bg); background: var(--cyan); border-color: var(--cyan); font-weight: 700; }
.card.is-hidden { display: none; }

.load-more { display: flex; justify-content: center; margin-top: clamp(34px, 4vw, 52px); }
.load-more .btn svg { transform: rotate(-90deg); }
.load-more .btn:hover svg { transform: rotate(-90deg) translateX(-4px); }

/* =========================================================
   Case study - story blocks
   ========================================================= */
.case-meta {
  display: grid; grid-template-columns: repeat(4, auto); gap: 34px; justify-content: start;
  margin-top: 34px; padding-top: 26px; border-top: 1px solid var(--line);
}
.case-meta div strong { display: block; font-size: 19px; font-weight: 700; direction: ltr; text-align: right; }
.case-meta div span { display: block; margin-top: 4px; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.case-hero-org { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.case-hero-org .org-logo {
  flex: none; display: block; width: auto; height: auto;
  max-height: 30px; max-width: 132px; object-fit: contain;
}
.case-hero-org b { font-size: 15px; font-weight: 700; letter-spacing: .14em; color: var(--cyan); direction: ltr; }

.story-block { position: relative; padding: clamp(64px, 7vw, 100px) 0; scroll-margin-top: calc(var(--header-h) + 20px); }
.story-block + .story-block { border-top: 1px solid var(--line); }
.story-split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 4vw, 64px); align-items: center; }
.story-block:nth-child(even) .story-visual { order: -1; }
.story-step {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%; margin-bottom: 18px;
  border: 1px solid var(--line-strong); background: rgba(11, 23, 38, .8);
  font-size: 15px; font-weight: 700; color: var(--cyan); direction: ltr;
}
.story-copy h2 { font-size: var(--h3); margin-bottom: 8px; }
.story-copy .q {
  display: block; margin: 18px 0 14px; font-size: 18px; font-weight: 500; color: var(--text);
}
.story-copy p { color: var(--muted); font-size: 16px; line-height: 1.75; }
.story-copy p + p { margin-top: 16px; }
.story-visual .frame { aspect-ratio: 4 / 3; }

.pull-quote {
  position: relative; margin-top: 30px; padding: 26px 30px 26px 30px;
  border-radius: 20px; border: 1px solid var(--line-strong);
  background: linear-gradient(120deg, rgba(22, 139, 255, .08), rgba(7, 17, 30, .5));
  font-size: 19px; font-weight: 500; line-height: 1.6; color: var(--text);
}
.pull-quote::before {
  content: '\201D'; position: absolute; top: 6px; inset-inline-start: 18px;
  font-size: 54px; line-height: 1; color: rgba(88, 215, 255, .3);
}

/* =========================================================
   Careers - why grid, job accordion, CV band
   ========================================================= */
.why-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.why {
  display: flex; gap: 18px; padding: 28px 26px;
  border-radius: 20px; border: 1px solid var(--line); background: rgba(7, 17, 30, .55);
  transition: border-color .4s, transform .4s var(--ease-out);
}
.why:hover { transform: translateY(-3px); border-color: var(--line-strong); }
.why .feature-icon { margin-top: 2px; }
.why p { color: var(--muted); font-size: 16px; line-height: 1.7; }

.jobs { display: grid; gap: 14px; }
.job {
  border-radius: 20px; border: 1px solid var(--line); background: rgba(7, 17, 30, .55);
  overflow: hidden; transition: border-color .4s, background .4s;
}
.job.is-open { border-color: var(--line-strong); background: rgba(11, 23, 38, .75); }
.job-head {
  width: 100%; display: grid; grid-template-columns: auto 1fr auto; gap: 20px; align-items: center;
  padding: 26px 28px; background: none; border: 0; cursor: pointer; text-align: start;
}
.job-id {
  font-size: 13px; font-weight: 700; letter-spacing: .1em; direction: ltr;
  color: var(--faint); padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line);
}
.job-head h3 { font-size: 20px; margin-bottom: 8px; }
.job-head p { color: var(--muted); font-size: 15px; line-height: 1.55; }
.job-toggle {
  display: inline-flex; align-items: center; gap: 8px; flex: none;
  font-size: 14px; font-weight: 700; color: var(--cyan);
}
.job-toggle svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; transition: transform .4s var(--ease-out); }
.job.is-open .job-toggle svg { transform: rotate(180deg); }
.job-body { display: none; padding: 0 28px 30px; }
.job.is-open .job-body { display: block; }
.job-body .badge {
  display: inline-block; margin-bottom: 20px; padding: 6px 14px; border-radius: 999px;
  border: 1px solid rgba(246, 182, 22, .4); background: rgba(246, 182, 22, .1);
  font-size: 13px; font-weight: 700; color: var(--gold);
}
.job-body h4 { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); margin: 24px 0 12px; }
.job-body h4:first-of-type { margin-top: 0; }
.job-body p { color: var(--muted); font-size: 16px; line-height: 1.75; }
.req-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.req-list li { position: relative; padding-inline-start: 24px; color: var(--muted); font-size: 16px; }
.req-list li::before {
  content: ''; position: absolute; inset-inline-start: 0; top: 10px;
  width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 10px rgba(88, 215, 255, .6);
}
.job-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line);
}
.job-share { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--faint); }
.job-share a { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; transition: border-color .3s, background .3s; }
.job-share a:hover { border-color: var(--cyan); background: rgba(88, 215, 255, .08); }
.job-share svg { width: 15px; height: 15px; fill: var(--muted); }

.cv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 4vw, 64px); align-items: center; }
.cv-visual .frame { aspect-ratio: 4 / 3; }

/* =========================================================
   Contact page - info panel + map
   ========================================================= */
.contact-page-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(28px, 3.5vw, 52px); align-items: start; }
.contact-panel {
  padding: clamp(24px, 3vw, 36px); border-radius: 26px;
  border: 1px solid var(--line); background: rgba(7, 17, 30, .7);
}
.contact-rows { display: grid; gap: 22px; }
.contact-rows .row { display: grid; grid-template-columns: 46px 1fr; gap: 16px; align-items: start; }
.contact-rows .row .ic {
  width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center;
  border: 1px solid var(--line-strong); background: rgba(22, 139, 255, .1);
}
.contact-rows .row .ic svg { width: 20px; height: 20px; stroke: var(--cyan); fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.contact-rows .row h3 { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); font-weight: 700; margin-bottom: 6px; }
.contact-rows .row a, .contact-rows .row p { font-size: 18px; font-weight: 500; }
.contact-rows .row a:hover { color: var(--cyan); }
.map-links { display: flex; gap: 10px; margin-top: 12px; }
.map-links a {
  padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line);
  font-size: 14px; color: var(--muted); transition: color .3s, border-color .3s, background .3s;
}
.map-links a:hover { color: var(--text); border-color: var(--cyan); background: rgba(88, 215, 255, .08); }
.map-frame {
  margin-top: 26px; border-radius: 20px; overflow: hidden;
  border: 1px solid var(--line); aspect-ratio: 16 / 10; background: var(--surface);
}
.map-frame iframe { width: 100%; height: 100%; border: 0; display: block; filter: grayscale(1) invert(.92) hue-rotate(180deg) contrast(.88); }

/* =========================================================
   Placeholder styling - content that is still pending from the client
   ========================================================= */
.is-pending { color: var(--faint); }
.pending-chip {
  display: inline-block; padding: 4px 12px; border-radius: 999px;
  border: 1px dashed var(--line-strong); font-size: 12px; color: var(--faint);
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1100px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .numbers-row { grid-template-columns: repeat(2, 1fr); }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 960px) {
  .svc-split, .story-split, .who-grid, .cv-grid, .contact-page-grid { grid-template-columns: 1fr; gap: 36px; }
  .story-block:nth-child(even) .story-visual { order: 0; }
  .svc-visual, .story-visual, .cv-visual { order: -1; }
  .values-grid { grid-template-columns: 1fr; }
  .why-grid { grid-template-columns: 1fr; }
  .anchor-rail .container { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .anchor-rail .container::-webkit-scrollbar { display: none; }
  .anchor-rail a { flex: none; }
}
@media (max-width: 640px) {
  .feature-grid, .feature-grid.cols-2 { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: 1fr; }
  .numbers-row { grid-template-columns: 1fr 1fr; gap: 12px; }
  .case-meta { grid-template-columns: 1fr 1fr; gap: 20px; }
  .job-head { grid-template-columns: 1fr; gap: 14px; }
  .job-toggle { justify-self: start; }
  .cta-band { flex-direction: column; align-items: flex-start; }
}
