/* ==========================================================================
   e-Pragma front page
   Scoped to .ep-home so nothing here leaks into the documentation pages.
   Palette is driven by CSS custom properties so light and dark stay in sync.
   ========================================================================== */

.ep-home {
  --ep-bg: #ffffff;
  --ep-fg: #12141f;
  --ep-muted: #5a6178;
  --ep-line: #e4e7f0;
  --ep-card: #ffffff;
  --ep-navy: #12132e;
  --ep-navy-2: #1c1e42;
  --ep-brand: #4051b5;
  --ep-brand-2: #6c7bff;
  --ep-accent: #ff7a1a;
  --ep-accent-2: #ffb347;
  --ep-radius: 16px;
  --ep-radius-sm: 10px;
  --ep-shadow: 0 1px 2px rgba(16, 20, 45, .06), 0 12px 32px rgba(16, 20, 45, .07);
  --ep-shadow-lg: 0 2px 6px rgba(16, 20, 45, .08), 0 24px 60px rgba(16, 20, 45, .12);
}

[data-md-color-scheme="slate"] .ep-home {
  --ep-bg: #14161f;
  --ep-fg: #eef0f6;
  --ep-muted: #a4abc0;
  --ep-line: #2b2f3d;
  --ep-card: #1b1e29;
  --ep-navy: #0d0f1c;
  --ep-navy-2: #171a30;
  --ep-shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 32px rgba(0, 0, 0, .35);
  --ep-shadow-lg: 0 2px 6px rgba(0, 0, 0, .5), 0 24px 60px rgba(0, 0, 0, .45);
}

/* ---------- Layout shell ---------- */

.ep-wrap {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.ep-section {
  padding: 88px 0;
}

.ep-section--tight {
  padding: 64px 0;
}

.ep-section--alt {
  background: var(--ep-bg);
  border-top: 1px solid var(--ep-line);
  border-bottom: 1px solid var(--ep-line);
}

.md-typeset .ep-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ep-brand);
  margin: 0 0 14px;
}

[data-md-color-scheme="slate"] .ep-home .ep-eyebrow {
  color: var(--ep-brand-2);
}

.md-typeset .ep-eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--ep-accent);
  border-radius: 2px;
}

/* The theme ships `.md-typeset h1, .md-typeset h2 { font-weight: 300 }` and
   `.md-typeset h1 { color: var(--md-default-fg-color--light) }`, both of which
   have a specificity of (0,1,1). Every heading below therefore has to be
   scoped twice to win against them. */

.md-typeset .ep-h2 {
  font-size: clamp(1.85rem, 3.4vw, 2.75rem);
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: -.02em;
  color: var(--ep-fg);
  margin: 0 0 14px;
}

.md-typeset .ep-lead {
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  line-height: 1.65;
  color: var(--ep-muted);
  max-width: 640px;
  margin: 0 0 40px;
}

.ep-section-head {
  margin-bottom: 48px;
}

.ep-section-head--center {
  text-align: center;
}

.ep-section-head--center .ep-lead {
  margin-left: auto;
  margin-right: auto;
}

/* ---------- Buttons ---------- */

.ep-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  border: 0;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
  white-space: nowrap;
}

.ep-btn:hover {
  transform: translateY(-2px);
}

.ep-btn--primary {
  background: linear-gradient(135deg, var(--ep-accent) 0%, var(--ep-accent-2) 100%);
  color: #fff !important;
  box-shadow: 0 10px 26px rgba(255, 122, 26, .32);
}

.ep-btn--primary:hover {
  color: #fff !important;
  box-shadow: 0 16px 36px rgba(255, 122, 26, .42);
}

.ep-btn--ghost {
  background: transparent;
  color: var(--ep-fg) !important;
  box-shadow: inset 0 0 0 2px var(--ep-line);
}

.ep-btn--ghost:hover {
  box-shadow: inset 0 0 0 2px var(--ep-brand);
  color: var(--ep-brand) !important;
}

.ep-btn--light {
  background: #fff;
  color: var(--ep-navy) !important;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .2);
}

.ep-btn--outline-light {
  background: transparent;
  color: #fff !important;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .4);
}

.ep-btn--outline-light:hover {
  box-shadow: inset 0 0 0 2px #fff;
  color: #fff !important;
}

.ep-btn--sm {
  padding: 11px 20px;
  font-size: .9rem;
}

/* ---------- Hero ---------- */

.ep-hero {
  position: relative;
  overflow: hidden;
  background: var(--ep-navy);
  color: #fff;
  isolation: isolate;
}

.ep-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(1100px 600px at 78% 18%, rgba(108, 123, 255, .38), transparent 62%),
    radial-gradient(760px 520px at 8% 88%, rgba(255, 122, 26, .26), transparent 60%),
    linear-gradient(140deg, var(--ep-navy) 0%, var(--ep-navy-2) 100%);
  z-index: -2;
}

.ep-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 68px 68px;
  mask-image: radial-gradient(circle at 50% 40%, #000 0%, transparent 78%);
  z-index: -1;
}

.ep-hero__inner {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 56px;
  align-items: center;
  padding: 96px 0 88px;
}

.md-typeset .ep-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .78);
  margin: 0 0 22px;
}

.md-typeset .ep-hero__eyebrow::before {
  content: "";
  width: 30px;
  height: 2px;
  background: var(--ep-accent);
  border-radius: 2px;
}

.md-typeset .ep-hero__title {
  font-size: clamp(2.5rem, 5.6vw, 4.15rem);
  font-weight: 800;
  line-height: 1.03;
  letter-spacing: -.03em;
  color: #fff;
  margin: 0 0 22px;
}

.md-typeset .ep-hero__title em {
  font-style: normal;
  display: block;
  background: linear-gradient(100deg, var(--ep-accent-2), var(--ep-accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.md-typeset .ep-hero__text {
  font-size: clamp(1.02rem, 1.6vw, 1.2rem);
  line-height: 1.62;
  color: rgba(255, 255, 255, .82);
  max-width: 560px;
  margin: 0 0 34px;
}

.ep-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 34px;
}

.ep-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 30px;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, .14);
}

.ep-hero__meta div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.ep-hero__meta strong {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -.02em;
  color: #fff;
  line-height: 1.1;
}

.ep-hero__meta span {
  font-size: .84rem;
  color: rgba(255, 255, 255, .66);
}

/* Hero visual - browser mockup framing real work */

.ep-hero__visual {
  position: relative;
}

.ep-shot {
  position: relative;
  z-index: 1;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 30px 70px rgba(0, 0, 0, .45);
  border: 1px solid rgba(255, 255, 255, .14);
  transform: rotate(-1.2deg);
  transition: transform .4s ease;
}

.ep-shot:hover {
  transform: rotate(0deg) translateY(-4px);
}

.ep-shot img {
  display: block;
  width: 100%;
  height: auto;
}

.ep-shot__bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 14px;
  background: #f1f2f7;
  border-bottom: 1px solid #e2e4ee;
}

.ep-shot__bar i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #d3d6e2;
  display: block;
}

.ep-shot__bar i:nth-child(1) { background: #ff5f57; }
.ep-shot__bar i:nth-child(2) { background: #febc2e; }
.ep-shot__bar i:nth-child(3) { background: #28c840; }

.ep-shot__url {
  margin-left: 8px;
  font-size: .72rem;
  color: #7a819a;
  background: #fff;
  border-radius: 999px;
  padding: 3px 12px;
  border: 1px solid #e2e4ee;
}

.ep-hero__chip {
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .97);
  color: var(--ep-navy);
  font-size: .86rem;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .32);
}

/* The mockup is rotated, so the chips are pulled further out to clear it
   instead of being cut in half by the tilted edge. */
.ep-hero__chip--tl {
  top: -28px;
  left: -34px;
}

.ep-hero__chip--br {
  bottom: -28px;
  right: -26px;
}

.ep-hero__chip span {
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, .2);
}

/* ---------- Trust strip ---------- */

.ep-trust {
  background: var(--ep-card);
  border-bottom: 1px solid var(--ep-line);
  padding: 26px 0;
}

.md-typeset .ep-trust__label {
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ep-muted);
  text-align: center;
  margin: 0 0 18px;
}

.ep-trust__row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 14px 40px;
}

.md-typeset .ep-trust__row a {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--ep-muted);
  text-decoration: none;
  transition: color .18s ease;
}

.md-typeset .ep-trust__row a:hover {
  color: var(--ep-brand);
}

/* ---------- Services ---------- */

.ep-services {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

/* The fifth card (custom apps & games) spans the full row so the grid ends
   on a clean edge instead of leaving a hole. */
.ep-service--wide {
  grid-column: 1 / -1;
}

.ep-service {
  display: flex;
  flex-direction: column;
  padding: 36px 32px 30px;
  border: 1px solid var(--ep-line);
  border-radius: var(--ep-radius);
  background: var(--ep-card);
  box-shadow: var(--ep-shadow);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.ep-service:hover {
  transform: translateY(-4px);
  box-shadow: var(--ep-shadow-lg);
  border-color: color-mix(in srgb, var(--ep-brand) 35%, var(--ep-line));
}

.ep-service__icon {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--ep-brand) 0%, var(--ep-brand-2) 100%);
  color: #fff;
  margin-bottom: 22px;
  box-shadow: 0 8px 20px rgba(64, 81, 181, .28);
}

.ep-service__icon svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.md-typeset .ep-service h3 {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -.01em;
  color: var(--ep-fg);
  margin: 0 0 10px;
  line-height: 1.25;
}

.md-typeset .ep-service p {
  font-size: .98rem;
  line-height: 1.62;
  color: var(--ep-muted);
  margin: 0 0 20px;
}

.md-typeset .ep-service ul {
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.md-typeset .ep-service ul li {
  font-size: .78rem;
  font-weight: 600;
  color: var(--ep-muted);
  background: color-mix(in srgb, var(--ep-brand) 9%, transparent);
  border: 1px solid color-mix(in srgb, var(--ep-brand) 18%, transparent);
  border-radius: 999px;
  padding: 4px 11px;
}

.ep-service__link {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: .92rem;
  font-weight: 700;
  color: var(--ep-brand) !important;
  text-decoration: none;
}

.ep-service__link::after {
  content: "→";
  transition: transform .18s ease;
}

.ep-service:hover .ep-service__link::after {
  transform: translateX(4px);
}

/* ---------- Work / portfolio ---------- */

.ep-work {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.ep-work__item {
  display: block;
  border-radius: var(--ep-radius);
  overflow: hidden;
  background: var(--ep-card);
  border: 1px solid var(--ep-line);
  box-shadow: var(--ep-shadow);
  transition: transform .25s ease, box-shadow .25s ease;
  text-decoration: none !important;
}

.ep-work__item:hover {
  transform: translateY(-4px);
  box-shadow: var(--ep-shadow-lg);
}

.ep-work__thumb {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--ep-navy);
  display: block;
}

.ep-work__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: transform .4s ease;
}

.ep-work__item:hover .ep-work__thumb img {
  transform: scale(1.04);
}

.ep-work__body {
  padding: 18px 20px 20px;
}

.md-typeset .ep-work__body h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ep-fg);
  margin: 0 0 4px;
  line-height: 1.35;
}

.md-typeset .ep-work__body span {
  font-size: .84rem;
  color: var(--ep-muted);
}

.ep-work__more {
  display: flex;
  justify-content: center;
  margin-top: 40px;
}

/* ---------- Process ---------- */

.ep-process {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  counter-reset: ep-step;
}

.ep-step {
  position: relative;
  padding: 30px 24px;
  border-radius: var(--ep-radius);
  background: var(--ep-card);
  border: 1px solid var(--ep-line);
  box-shadow: var(--ep-shadow);
}

.ep-step::before {
  counter-increment: ep-step;
  content: "0" counter(ep-step);
  display: block;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.04em;
  color: var(--ep-accent);
  margin-bottom: 16px;
}

.md-typeset .ep-step h3 {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--ep-fg);
  margin: 0 0 8px;
  line-height: 1.3;
}

.md-typeset .ep-step p {
  font-size: .92rem;
  line-height: 1.6;
  color: var(--ep-muted);
  margin: 0;
}

/* ---------- Why us / differentiators ---------- */

.ep-why {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.ep-why__item {
  padding: 32px 28px;
  border-radius: var(--ep-radius);
  background: var(--ep-card);
  border: 1px solid var(--ep-line);
  box-shadow: var(--ep-shadow);
}

.md-typeset .ep-why__item h3 {
  font-size: 1.18rem;
  font-weight: 800;
  color: var(--ep-fg);
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 11px;
}

.ep-why__item h3 svg {
  width: 22px;
  height: 22px;
  flex: none;
  fill: none;
  stroke: var(--ep-accent);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.md-typeset .ep-why__item p {
  font-size: .95rem;
  line-height: 1.62;
  color: var(--ep-muted);
  margin: 0;
}

/* ---------- Final CTA ---------- */

.ep-cta {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(900px 460px at 15% 10%, rgba(108, 123, 255, .34), transparent 60%),
    linear-gradient(135deg, var(--ep-navy) 0%, var(--ep-navy-2) 100%);
  color: #fff;
  text-align: center;
  padding: 92px 24px;
}

.md-typeset .ep-cta h2 {
  font-size: clamp(1.9rem, 3.6vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.14;
  color: #fff;
  margin: 0 auto 18px;
  max-width: 780px;
}

.md-typeset .ep-cta p {
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  line-height: 1.65;
  color: rgba(255, 255, 255, .8);
  max-width: 640px;
  margin: 0 auto 36px;
}

.ep-cta__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

.md-typeset .ep-cta__contact {
  margin-top: 32px;
  font-size: .9rem;
  color: rgba(255, 255, 255, .6);
}

.md-typeset .ep-cta__contact a {
  color: rgba(255, 255, 255, .9);
  font-weight: 600;
}

/* ---------- Responsive ---------- */

@media screen and (max-width: 1024px) {
  .ep-hero__inner {
    grid-template-columns: 1fr;
    gap: 48px;
    padding: 72px 0 68px;
  }

  .ep-hero__chip--tl { left: 0; top: -20px; }
  .ep-hero__chip--br { right: 0; bottom: -20px; }

  .ep-work { grid-template-columns: repeat(2, 1fr); }
  .ep-process { grid-template-columns: repeat(2, 1fr); }
}

@media screen and (max-width: 760px) {
  .ep-wrap { padding: 0 18px; }
  .ep-section { padding: 60px 0; }
  .ep-section--tight { padding: 46px 0; }
  .ep-lead { margin-bottom: 32px; }

  .ep-services,
  .ep-why,
  .ep-work,
  .ep-process {
    grid-template-columns: 1fr;
  }

  .ep-service { padding: 28px 24px 26px; }
  .ep-hero__inner { padding: 56px 0 52px; }
  .ep-hero__meta { gap: 18px 26px; }
  .ep-hero__actions .ep-btn { flex: 1 1 100%; }
  .ep-cta { padding: 64px 18px; }
  .ep-cta__actions .ep-btn { flex: 1 1 100%; }
  .ep-shot { transform: none; }
}

/* ---------- Header CTA (front page only) ---------- */

.ep-cta-btn {
  display: inline-flex;
  align-items: center;
  padding: 9px 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--ep-accent) 0%, var(--ep-accent-2) 100%);
  color: #fff !important;
  font-size: .82rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 6px 16px rgba(255, 122, 26, .3);
  transition: transform .18s ease, box-shadow .18s ease;
}

.ep-cta-btn:hover {
  color: #fff !important;
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(255, 122, 26, .4);
}

@media screen and (max-width: 900px) {
  .ep-cta-btn { display: none; }
}

/* ---------- Home page: strip the docs chrome ---------- */

.md-content__inner:has(.ep-home) {
  margin: 0 !important;
  padding: 0 !important;
  max-width: none !important;
}

.md-content:has(.ep-home) {
  padding: 0 !important;
}

.md-main:has(.ep-home) .md-main__inner {
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.md-main:has(.ep-home) {
  margin-top: 0 !important;
}
