/* ═══════════════════════════════════════════════
   NEXER TECHNOLOGY — pages.css
   Service, product, blog and article pages.
   Inherits every token from site.css.
   ═══════════════════════════════════════════════ */

/* ─────────────────────────────────────────────
   DETAIL HERO
───────────────────────────────────────────── */
.phero {
  position: relative; overflow: hidden;
  padding-block: clamp(2.5rem, 5vw, 4rem) clamp(3rem, 6vw, 4.5rem);
  background:
    radial-gradient(46% 62% at 88% 12%, var(--a-wash, var(--cyan-wash)) 0%, transparent 72%),
    var(--paper);
  border-bottom: 1px solid var(--line);
}

.crumb {
  display: flex; width: fit-content; align-items: center; gap: 0.45rem;
  font-size: 0.86rem; color: var(--ink-3);
  text-decoration: none; margin-bottom: 1.8rem;
}
.crumb svg { width: 14px; height: 14px; transition: transform 0.2s ease; }
.crumb:hover { color: var(--ink); }
.crumb:hover svg { transform: translateX(-3px); }

.phero__kicker {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-size: 0.74rem; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--a-ink, var(--cyan-ink));
  margin-bottom: 1rem;
}
.phero__kicker::before {
  content: ''; width: 13px; height: 13px; background: var(--a, var(--cyan));
  -webkit-mask: url('/assets/images/brand-x.svg') center / contain no-repeat;
  mask: url('/assets/images/brand-x.svg') center / contain no-repeat;
}

.phero h1 { max-width: 16ch; margin-bottom: 1.3rem; }
.phero__intro { font-size: clamp(1.05rem, 1.4vw, 1.2rem); line-height: 1.7; color: var(--ink-2); max-width: 62ch; }

.phero__meta { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 1.8rem; }


/* ─────────────────────────────────────────────
   BODY BLOCKS
───────────────────────────────────────────── */
.pblock { padding-block: clamp(3rem, 6vw, 5rem); }
.pblock + .pblock { border-top: 1px solid var(--line); }
.pblock--mist { background: var(--mist); }

.block-label {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-size: 0.74rem; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink-3); margin-bottom: 2rem;
}
.block-label::before {
  content: ''; width: 13px; height: 13px; background: var(--a, var(--cyan));
  -webkit-mask: url('/assets/images/brand-x.svg') center / contain no-repeat;
  mask: url('/assets/images/brand-x.svg') center / contain no-repeat;
}

/* lead: sticky heading beside the narrative */
.lead { display: grid; grid-template-columns: minmax(0,0.78fr) minmax(0,1.22fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.lead h2 { position: sticky; top: 6.5rem; font-size: clamp(1.6rem, 2.6vw, 2.2rem); }
.lead__text p { font-size: 1.02rem; line-height: 1.85; color: var(--ink-2); max-width: 66ch; }
.lead__text p + p { margin-top: 1.15rem; }


/* ─────────────────────────────────────────────
   CAPABILITIES
───────────────────────────────────────────── */
/* capability copy runs long on some services — two columns keeps the measure readable */
.caps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); gap: 1.1rem; }
.cap {
  display: grid; grid-template-columns: 46px 1fr; gap: 1.1rem; align-items: start;
  padding: 1.5rem 1.6rem;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s;
}
.cap:hover { transform: translateY(-3px); box-shadow: var(--sh-2); border-color: var(--line-2); }
.cap__icon {
  width: 46px; height: 46px; border-radius: var(--r-sm);
  display: grid; place-items: center; background: var(--a-wash, var(--cyan-wash));
}
.cap__icon img { width: 23px; height: 23px; object-fit: contain; }
.cap__glyph {
  width: 22px; height: 22px; display: block;
  background: var(--a-ink, var(--cyan-ink));
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}
.cap__glyph.is-missing {
  -webkit-mask-image: url('/assets/images/brand-x.svg');
  mask-image: url('/assets/images/brand-x.svg');
}
/* the plain brand-mark fallback — must not clobber .cap__glyph mask */
.cap__icon > span:not(.cap__glyph) {
  width: 16px; height: 16px; display: block; background: var(--a, var(--cyan));
  -webkit-mask: url('/assets/images/brand-x.svg') center / contain no-repeat;
  mask: url('/assets/images/brand-x.svg') center / contain no-repeat;
}
.cap h3 { font-size: 1.06rem; margin-bottom: 0.35rem; }
.cap p  { font-size: 0.93rem; line-height: 1.7; color: var(--ink-2); }


/* ─────────────────────────────────────────────
   WHY NEXER
───────────────────────────────────────────── */
.why { display: grid; grid-template-columns: minmax(0,0.82fr) minmax(0,1.18fr); gap: clamp(2rem, 5vw, 3.5rem); align-items: start; }
.why__media {
  border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line);
  aspect-ratio: 4 / 3; background: var(--cloud);
}
.why__media img { width: 100%; height: 100%; object-fit: cover; }
.why__media.is-empty { display: grid; place-items: center; }
.why__media.is-empty img { display: none; }
.why__media.is-empty::after {
  content: 'Image coming soon';
  font-size: 0.74rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3);
}
.why__text { font-size: 1.02rem; line-height: 1.85; color: var(--ink-2); max-width: 62ch; }
.why__points { list-style: none; display: grid; gap: 0.7rem; margin-top: 1.8rem; }
.why__points li {
  display: flex; gap: 0.75rem; align-items: flex-start;
  font-size: 0.97rem; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 0.9rem 1.1rem;
}
.why__points li::before {
  content: ''; flex-shrink: 0; margin-top: 0.3rem;
  width: 13px; height: 13px; background: var(--a, var(--cyan));
  -webkit-mask: url('/assets/images/brand-x.svg') center / contain no-repeat;
  mask: url('/assets/images/brand-x.svg') center / contain no-repeat;
}


/* ─────────────────────────────────────────────
   PLATFORM BADGES
───────────────────────────────────────────── */
.platforms { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.platform {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-size: 0.88rem; font-weight: 500; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 999px; padding: 0.55rem 1.15rem;
}
.platform i { width: 7px; height: 7px; border-radius: 50%; display: block; }


/* ─────────────────────────────────────────────
   COUNTRIES
───────────────────────────────────────────── */
.countries { display: grid; gap: 1.1rem; }
.country {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: clamp(1.4rem, 3vw, 2rem);
}
.country__head { display: flex; align-items: center; gap: 0.9rem; margin-bottom: 0.9rem; }
.country__flag {
  width: 40px; height: 27px; object-fit: cover; flex-shrink: 0;
  border-radius: 5px; border: 1px solid var(--line);
}
.country__head h3 { font-size: 1.32rem; }
.country__intro { font-size: 0.97rem; line-height: 1.75; color: var(--ink-2); max-width: 70ch; margin-bottom: 1.4rem; }
.country__topics { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); gap: 0.9rem; }
.topic { background: var(--mist); border-radius: var(--r); padding: 1.2rem 1.3rem; }
.topic h4 { font-size: 0.97rem; margin-bottom: 0.35rem; }
.topic p  { font-size: 0.89rem; line-height: 1.65; color: var(--ink-2); }


/* ─────────────────────────────────────────────
   VIDEO / DIAGRAM
───────────────────────────────────────────── */
.media-embed {
  width: 100%; max-width: 900px; aspect-ratio: 16 / 9;
  border-radius: var(--r-lg); overflow: hidden;
  border: 1px solid var(--line); background: var(--ink);
}
.media-embed iframe,
.media-embed video { width: 100%; height: 100%; border: none; display: block; }
/* the recording is letterboxed already, so contain avoids cropping it twice */
.media-embed video { object-fit: contain; background: #000; }

.diagram { width: 100%; max-width: 900px; border-radius: var(--r-lg); border: 1px solid var(--line); }
.diagram.is-empty {
  aspect-ratio: 16 / 5; background: var(--mist);
  border-style: dashed; display: grid; place-items: center;
}
.diagram.is-empty img { display: none; }
.diagram.is-empty::after {
  content: 'Diagram coming soon';
  font-size: 0.74rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3);
}


/* ─────────────────────────────────────────────
   RELATED POST
───────────────────────────────────────────── */
.postref {
  display: block; text-decoration: none; max-width: 640px;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 1.8rem;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.postref:hover { transform: translateY(-3px); box-shadow: var(--sh-2); }
.postref h3 { font-size: 1.24rem; margin: 0.9rem 0 0.5rem; }
.postref p  { font-size: 0.94rem; line-height: 1.65; color: var(--ink-2); }


/* ─────────────────────────────────────────────
   CTA BAR
───────────────────────────────────────────── */
.ctabar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 2rem; flex-wrap: wrap;
  background: var(--ink); color: rgba(255,255,255,0.75);
  border-radius: var(--r-lg); padding: clamp(1.8rem, 4vw, 2.8rem);
}
.ctabar h3 { color: #fff; font-size: clamp(1.3rem, 2.2vw, 1.75rem); margin-bottom: 0.5rem; max-width: 24ch; }
.ctabar p  { font-size: 0.97rem; max-width: 52ch; }


/* ─────────────────────────────────────────────
   BLOG LISTING
───────────────────────────────────────────── */
.postcard {
  display: flex; flex-direction: column;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r);
  padding: 1.8rem 1.7rem; text-decoration: none;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s;
}
.postcard:hover { transform: translateY(-4px); box-shadow: var(--sh-2); border-color: var(--line-2); }
.postcard h3 { font-size: 1.18rem; margin-bottom: 0.5rem; }
.postcard p  { font-size: 0.93rem; line-height: 1.65; color: var(--ink-2); flex: 1; }
.postcard .t-meta { margin-top: 1.1rem; }


/* ─────────────────────────────────────────────
   ARTICLE
───────────────────────────────────────────── */
.article { max-width: 720px; margin-inline: auto; }
.article__head { padding-block: clamp(2.5rem, 5vw, 3.5rem) 2rem; }
.article__head h1 { font-size: clamp(2rem, 4.2vw, 3.1rem); margin: 1rem 0 1rem; }
.article__meta { display: flex; flex-wrap: wrap; gap: 0.5rem 0.9rem; font-size: 0.88rem; color: var(--ink-3); }

.article__body { font-size: 1.08rem; line-height: 1.85; color: var(--ink-2); padding-bottom: 3rem; }
.article__body > * + * { margin-top: 1.3rem; }
.article__body h2 { font-size: 1.6rem; margin-top: 2.6rem; }
.article__body h3 { font-size: 1.25rem; margin-top: 2rem; }
.article__body ul, .article__body ol { padding-left: 1.3rem; }
.article__body li + li { margin-top: 0.5rem; }
.article__body blockquote {
  border-left: 3px solid var(--a, var(--cyan));
  padding: 0.3rem 0 0.3rem 1.3rem; color: var(--ink);
  font-size: 1.16rem; font-style: italic;
}
.article__body a { color: var(--cyan-ink); text-decoration: underline; text-underline-offset: 2px; }

.author {
  display: grid; grid-template-columns: 68px 1fr; gap: 1.2rem; align-items: start;
  padding: 1.7rem; background: var(--mist); border-radius: var(--r-lg); margin-bottom: 2.5rem;
}
.author__img {
  width: 68px; height: 68px; border-radius: 50%; overflow: hidden;
  background: var(--cloud); display: grid; place-items: center;
}
.author__img img { width: 100%; height: 100%; object-fit: cover; }
.author__img.is-empty img { display: none; }
.author__img.is-empty::after {
  content: attr(data-initials);
  font-family: var(--display); font-size: 1.25rem; font-weight: 500; color: var(--ink-3);
}
.author__label { font-size: 0.74rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 0.3rem; }
.author h3 { font-size: 1.1rem; }
.author__role { font-size: 0.9rem; color: var(--cyan-ink); margin-bottom: 0.6rem; }
.author p { font-size: 0.93rem; line-height: 1.7; }

/* coming soon */
.comingsoon { text-align: center; max-width: 520px; margin-inline: auto; padding-block: clamp(3rem, 8vw, 6rem); }
.comingsoon img { width: 74px; margin: 0 auto 1.8rem; opacity: 0.9; }
.comingsoon p { margin-top: 1rem; }
.comingsoon .btn { margin-top: 2rem; }


/* ─────────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────────── */
@media (max-width: 900px) {
  .lead { grid-template-columns: 1fr; gap: 1.5rem; }
  .lead h2 { position: static; }
  .why  { grid-template-columns: 1fr; }
  .why__media { aspect-ratio: 16 / 9; }
  .ctabar { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 560px) {
  .cap { grid-template-columns: 1fr; gap: 0.9rem; }
  .author { grid-template-columns: 1fr; }
}
