/* ============================================================
   services.css
   Styles scoped to .page--services (services/index.html).
   Shares the space-background layout foundation from about.css
   (html.has-space-bg rules for scrolling, dark background, and
   site-wrapper z-stacking). This file covers only the
   services-specific sections and components.

   Sections:
     .services-hero           — hero card with eyebrow, h1, and body
     .services-offerings      — "Our Services" card with offering grid
     .services-offering-item  — individual service card
     .services-section        — generic section card (How It Works)
     .services-steps          — numbered process steps list
     .services-cta            — call-to-action card
   ============================================================ */

/* ── Shared card shell ─────────────────────────────────────────────────── */

/* Same frosted-glass treatment as the about page cards.
   Applied to all card containers on this page.               */
.services-hero__card,
.services-offerings__card,
.services-section__card,
.services-cta__card {
  background: var(--overlay-card-bg);
  border: 1px solid var(--overlay-card-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
}

/* ── Section heading ──────────────────────────────────────────────────── */

/* Shared heading style used by section-level h2 elements. */
.services-section__heading {
  font-size: clamp(1.25rem, 3vw, 1.625rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--overlay-text);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--overlay-divider-faint);
}

/* ── Hero section ─────────────────────────────────────────────────────── */

.services-hero__eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--overlay-accent);
  margin-bottom: var(--space-sm);
}

.services-hero__card {
  text-align: center;
}

.services-hero__heading {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--overlay-text);
  line-height: 1.15;
  margin-bottom: 0;
}

/* ── Offerings grid ───────────────────────────────────────────────────── */

/* Two-column grid for the bespoke + code-ownership cards.
   The multilingual card sits below as a full-width item.               */
.services-offerings__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}

.services-offering-item {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--overlay-divider-faint);
  border-radius: var(--radius-md, 0.75rem);
  padding: var(--space-lg);
}

/* Full-width multilingual card — sits below the two-item grid */
.services-offering-item--lang {
  margin-top: var(--space-md);
}

.services-offering-item__title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--overlay-accent);
  margin-bottom: var(--space-sm);
  letter-spacing: -0.01em;
}

.services-offering-item__body {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--overlay-text-dim);
}

/* Accent-coloured stat callout used inline within body text */
.services-stat {
  color: var(--overlay-accent);
  font-weight: 700;
}

/* Footnote citation below the multilingual card body */
.services-offering-item__footnote {
  margin-top: var(--space-md);
  font-size: 0.75rem;
  line-height: 1.6;
  color: var(--overlay-text-dim);
  opacity: 0.6;
  border-top: 1px solid var(--overlay-divider-faint);
  padding-top: var(--space-sm);
}

/* ── Language typer (multilingual card) ──────────────────────────────── */

/* Large display line below the multilingual card body text.
   Accent colour on the cycling language name to draw attention.         */
.services-lang-typer {
  margin-top: var(--space-md);
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--overlay-text);
  line-height: 1.3;
}

.services-lang-typer__text {
  color: var(--overlay-accent);
}

/* RTL scripts (Arabic etc.): flip the line direction so the cursor sits on the
   left (the correct trailing edge) and text grows rightward as it is typed.
   Applied and removed dynamically by services-typer.js.                     */
.services-lang-typer--rtl {
  direction: rtl;
}

/* ── Process steps ────────────────────────────────────────────────────── */

.services-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-md);
}

.services-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  /* Two-per-row: each card takes ~half minus the gap */
  flex: 0 1 calc(50% - var(--space-md) / 2);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--overlay-divider-faint);
  border-radius: var(--radius-md, 0.75rem);
  padding: var(--space-lg);
}

/* Circled step number */
.services-step__num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--overlay-accent);
  color: var(--color-white);
  font-size: 0.8125rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-bottom: var(--space-xs);
}

.services-step__title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--overlay-text);
  letter-spacing: -0.01em;
}

.services-step__body {
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--overlay-text-dim);
  align-self: stretch;
}

/* ── CTA section ──────────────────────────────────────────────────────── */

.services-cta__card {
  text-align: center;
  border-color: var(--overlay-border-dim);
}

.services-cta__subheading {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--overlay-text);
  letter-spacing: -0.01em;
  margin-bottom: var(--space-xs);
}

.services-cta__heading {
  font-size: clamp(1.375rem, 3.5vw, 1.875rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--overlay-text);
  margin-bottom: var(--space-lg);
}

.services-cta__btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  background: var(--overlay-accent);
  color: var(--color-white);
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: background 0.2s ease, transform 0.2s ease;
}

.services-cta__btn:hover,
.services-cta__btn:focus-visible {
  background: var(--overlay-accent-hover);
  transform: scale(1.03);
  outline: none;
}

/* ── Responsive ───────────────────────────────────────────────────────── */

/* Single column on narrow screens */
@media (max-width: 600px) {
  .services-offerings__list {
    grid-template-columns: 1fr;
  }

  .services-step {
    flex: 1 1 100%;
  }

  .services-hero__card,
  .services-offerings__card,
  .services-section__card,
  .services-cta__card {
    padding: var(--space-lg);
  }

  .services-lang-typer {
    font-size: clamp(1.25rem, 5vw, 1.75rem);
  }
}
